@unocss/runtime 0.61.2 → 0.61.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributify.global.js +1 -1
- package/core.global.js +1 -1
- package/dist/index.js +6 -4
- package/full.global.js +1 -1
- package/mini.global.js +1 -1
- package/package.json +4 -4
- package/preset-web-fonts.global.js +2 -2
- package/uno.global.js +1 -1
package/attributify.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var La=Object.defineProperty;var Ua=(e,t)=>{for(var r in t)La(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var tt=Q;function A(e=[]){return Array.isArray(e)?e:[e]}function be(e){return Array.from(new Set(e))}function En(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function O(e){return typeof e=="string"}function xe(e){return O(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function jn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function Wa(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(e[o][0]===t&&e[o][1]===r)return!1;return!0})}function ye(e){return e==null?"":Wa(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function rt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Mr(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return rt(n)&&rt(o)&&Object.keys(o).forEach(s=>{rt(n[s])&&rt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Mr(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Oe(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Oe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}return e}function zn(e){return O(e[0])}function An(e){return O(e[0])}var Na=/^\[(.+?)~?="(.*)"\]$/;var Da=/[\w\u00A0-\uFFFF%-?]/;function On(e){return e.match(Na)}function Ve(e=""){return Da.test(e)}function Vn(e){return typeof e=="function"?{match:e}:e}function _r(e){return e.length===3}function Fr(e){return e!=null}function Pn(){}var nt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},ot=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};var Pe=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function it(e){return e instanceof Pe}var st={};function Ba(e=["-",":"]){let t=e.join("|");return st[t]||(st[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),st[t].lastIndex=0,st[t]}function Ia(e,t=["-",":"],r=5){let n=Ba(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(f,p,u,d,m)=>{if(!t.includes(u))return f;o=!0,s.add(p+u);let g=m+p.length+u.length+1,x={length:f.length,items:[]};a.set(m,x);for(let $ of[...d.matchAll(/\S+/g)]){let j=g+$.index,b=a.get(j)?.items;b?a.delete(j):b=[{offset:j,length:$[0].length,className:$[0]}];for(let v of b)v.className=v.className==="~"?p:v.className.replace(/^(!?)(.*)/,`$1${p}${u}$2`),x.items.push(v)}return"$".repeat(f.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let f=0;for(let[p,u]of a)c+=e.slice(f,p),c+=u.items.map(d=>d.className).join(" "),f=p+u.length;c+=e.slice(f)}else{c=e;for(let[f,p]of a)c.overwrite(f,f+p.length,p.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return c.toString()}}}function Mn(e,t=["-",":"],r=5){let n=Ia(e,t,r);return typeof e=="string"?n.expanded:e}var _n=new Set;function se(e){_n.has(e)||(console.warn("[unocss]",e),_n.add(e))}var at=/[\\:]?[\s'"`;{}]+/g;function Ka(e){return e.split(at)}var ct={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ka(e)}};function Fn(){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 Me="default",lt="preflights",Ha="shortcuts",Ga="imports",Ln={[Ga]:-200,[lt]:-100,[Ha]:-10,[Me]:0};function Wn(e){return A(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Un="_uno_resolved";function qa(e){let t=typeof e=="function"?e():e;if(Un in t)return t;t={...t},Object.defineProperty(t,Un,{value:!0,enumerable:!1});let r=t.shortcuts?Wn(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=A(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}function Nn(e){let t=qa(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(A).flatMap(Nn);return[t,...r]}function Lr(e={},t={}){let r=Object.assign({},t,e),n=En((r.presets||[]).flatMap(A).flatMap(Nn),(h,y)=>h.name===y.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Ln,...i.map(h=>h.layers));function c(h){return be(i.flatMap(y=>A(y[h]||[])))}let f=c("extractors"),p=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=ct),p&&!f.includes(p)&&f.unshift(p),f.sort((h,y)=>(h.order||0)-(y.order||0));let u=c("rules"),d={},m=u.length,g=u.map((h,y)=>{if(zn(h)){A(h[2]?.prefix||"").forEach(V=>{d[V+h[0]]=[y,h[1],h[2],h]});return}return[y,...h]}).filter(Boolean).reverse(),x=Ya(i.map(h=>h.theme)),$=c("extendTheme");for(let h of $)x=h(x)||x;let j={templates:be(i.flatMap(h=>A(h.autocomplete?.templates))),extractors:i.flatMap(h=>A(h.autocomplete?.extractors)).sort((h,y)=>(h.order||0)-(y.order||0)),shorthands:Xa(i.map(h=>h.autocomplete?.shorthands||{}))},b=c("separators");b.length||(b=[":","-"]);let v={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:x,rulesSize:m,rulesDynamic:g,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:j,variants:c("variants").map(Vn).sort((h,y)=>(h.order||0)-(y.order||0)),shortcuts:Wn(c("shortcuts")).reverse(),extractors:f,safelist:c("safelist"),separators:b,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.(v);return v}function Ya(e){return e.map(t=>t?Oe(t):{}).reduce((t,r)=>Mr(t,r),{})}function Xa(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Dn="0.61.
|
|
1
|
+
"use strict";(()=>{var La=Object.defineProperty;var Ua=(e,t)=>{for(var r in t)La(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var tt=Q;function A(e=[]){return Array.isArray(e)?e:[e]}function be(e){return Array.from(new Set(e))}function En(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function O(e){return typeof e=="string"}function xe(e){return O(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function jn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function Wa(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(e[o][0]===t&&e[o][1]===r)return!1;return!0})}function ye(e){return e==null?"":Wa(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function rt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Mr(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return rt(n)&&rt(o)&&Object.keys(o).forEach(s=>{rt(n[s])&&rt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Mr(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Oe(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Oe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}return e}function zn(e){return O(e[0])}function An(e){return O(e[0])}var Na=/^\[(.+?)~?="(.*)"\]$/;var Da=/[\w\u00A0-\uFFFF%-?]/;function On(e){return e.match(Na)}function Ve(e=""){return Da.test(e)}function Vn(e){return typeof e=="function"?{match:e}:e}function _r(e){return e.length===3}function Fr(e){return e!=null}function Pn(){}var nt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},ot=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};var Pe=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function it(e){return e instanceof Pe}var st={};function Ba(e=["-",":"]){let t=e.join("|");return st[t]||(st[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),st[t].lastIndex=0,st[t]}function Ia(e,t=["-",":"],r=5){let n=Ba(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(f,p,u,d,m)=>{if(!t.includes(u))return f;o=!0,s.add(p+u);let g=m+p.length+u.length+1,x={length:f.length,items:[]};a.set(m,x);for(let $ of[...d.matchAll(/\S+/g)]){let j=g+$.index,b=a.get(j)?.items;b?a.delete(j):b=[{offset:j,length:$[0].length,className:$[0]}];for(let v of b)v.className=v.className==="~"?p:v.className.replace(/^(!?)(.*)/,`$1${p}${u}$2`),x.items.push(v)}return"$".repeat(f.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let f=0;for(let[p,u]of a)c+=e.slice(f,p),c+=u.items.map(d=>d.className).join(" "),f=p+u.length;c+=e.slice(f)}else{c=e;for(let[f,p]of a)c.overwrite(f,f+p.length,p.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return c.toString()}}}function Mn(e,t=["-",":"],r=5){let n=Ia(e,t,r);return typeof e=="string"?n.expanded:e}var _n=new Set;function se(e){_n.has(e)||(console.warn("[unocss]",e),_n.add(e))}var at=/[\\:]?[\s'"`;{}]+/g;function Ka(e){return e.split(at)}var ct={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ka(e)}};function Fn(){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 Me="default",lt="preflights",Ha="shortcuts",Ga="imports",Ln={[Ga]:-200,[lt]:-100,[Ha]:-10,[Me]:0};function Wn(e){return A(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Un="_uno_resolved";function qa(e){let t=typeof e=="function"?e():e;if(Un in t)return t;t={...t},Object.defineProperty(t,Un,{value:!0,enumerable:!1});let r=t.shortcuts?Wn(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=A(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}function Nn(e){let t=qa(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(A).flatMap(Nn);return[t,...r]}function Lr(e={},t={}){let r=Object.assign({},t,e),n=En((r.presets||[]).flatMap(A).flatMap(Nn),(h,y)=>h.name===y.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Ln,...i.map(h=>h.layers));function c(h){return be(i.flatMap(y=>A(y[h]||[])))}let f=c("extractors"),p=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=ct),p&&!f.includes(p)&&f.unshift(p),f.sort((h,y)=>(h.order||0)-(y.order||0));let u=c("rules"),d={},m=u.length,g=u.map((h,y)=>{if(zn(h)){A(h[2]?.prefix||"").forEach(V=>{d[V+h[0]]=[y,h[1],h[2],h]});return}return[y,...h]}).filter(Boolean).reverse(),x=Ya(i.map(h=>h.theme)),$=c("extendTheme");for(let h of $)x=h(x)||x;let j={templates:be(i.flatMap(h=>A(h.autocomplete?.templates))),extractors:i.flatMap(h=>A(h.autocomplete?.extractors)).sort((h,y)=>(h.order||0)-(y.order||0)),shorthands:Xa(i.map(h=>h.autocomplete?.shorthands||{}))},b=c("separators");b.length||(b=[":","-"]);let v={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:x,rulesSize:m,rulesDynamic:g,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:j,variants:c("variants").map(Vn).sort((h,y)=>(h.order||0)-(y.order||0)),shortcuts:Wn(c("shortcuts")).reverse(),extractors:f,safelist:c("safelist"),separators:b,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.(v);return v}function Ya(e){return e.map(t=>t?Oe(t):{}).reduce((t,r)=>Mr(t,r),{})}function Xa(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Dn="0.61.4";var ve={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector"},Ur=class{constructor(t={},r={}){this.userConfig=t;this.defaults=r;this.config=Lr(t,r),this.events.emit("config",this.config)}version=Dn;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=Fn();setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=Lr(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let o={original:t,code:t,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(it(s)&&it(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:ve,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(t,r){if(this.blocked.has(t))return;let n=`${t}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let o=t;for(let f of this.config.preprocess)o=f(t);if(this.isBlocked(o)){this.blocked.add(t),this._cache.set(n,null);return}let i=await this.matchVariants(t,o);if(!i||this.isBlocked(i[1])){this.blocked.add(t),this._cache.set(n,null);return}let s=this.makeContext(t,[r||i[0],i[1],i[2],i[3]]);this.config.details&&(s.variants=[...i[3]]);let a=await this.expandShortcut(s.currentSelector,s),c=a?await this.stringifyShortcuts(s.variantMatch,s,a[0],a[1]):(await this.parseUtil(s.variantMatch,s))?.map(f=>this.stringifyUtil(f,s)).filter(Fr);if(c?.length)return this._cache.set(n,c),c;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:c=!1}=r,f=this.config.outputToCssLayers,p=O(t)?await this.applyExtractors(t,n,c?new Pe:new Set):Array.isArray(t)?new Set(t):t;if(s){let y={generator:this,theme:this.config.theme};this.config.safelist.flatMap(R=>typeof R=="function"?R(y):R).forEach(R=>{p.has(R)||p.add(R)})}let u=a?"":`
|
|
2
2
|
`,d=new Set([Me]),m=c?new Map:new Set,g=new Map,x={},$=Array.from(p).map(async y=>{if(m.has(y))return;let R=await this.parseToken(y);if(R!=null){m instanceof Map?m.set(y,{data:R,count:it(p)?p.getCount(y):-1}):m.add(y);for(let V of R){let F=V[3]||"",H=V[4]?.layer;g.has(F)||g.set(F,[]),g.get(F).push(V),H&&d.add(H)}}});await Promise.all($),await(async()=>{if(!i)return;let y={generator:this,theme:this.config.theme},R=new Set([]);this.config.preflights.forEach(({layer:V=lt})=>{d.add(V),R.add(V)}),x=Object.fromEntries(await Promise.all(Array.from(R).map(async V=>{let H=(await Promise.all(this.config.preflights.filter(re=>(re.layer||lt)===V).map(async re=>await re.getCSS(y)))).filter(Boolean).join(u);return[V,H]})))})();let j=this.config.sortLayers(Array.from(d).sort((y,R)=>(this.config.layers[y]??0)-(this.config.layers[R]??0)||y.localeCompare(R))),b={},v=(y=Me)=>{if(b[y])return b[y];let R=Array.from(g).sort((F,H)=>(this.parentOrders.get(F[0])??0)-(this.parentOrders.get(H[0])??0)||F[0]?.localeCompare(H[0]||"")||0).map(([F,H])=>{let re=H.length,ge=H.filter(k=>(k[4]?.layer||Me)===y).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,,M,,N])=>[[[(k&&Qa(k,o))??"",M?.sort??0]],T,!!(N??M?.noMerge)]);if(!ge.length)return;let et=ge.reverse().map(([k,T,M],N)=>{if(!M&&this.config.mergeSelectors)for(let oe=N+1;oe<re;oe++){let Z=ge[oe];if(Z&&!Z[2]&&(k&&Z[0]||k==null&&Z[0]==null)&&Z[1]===T)return k&&Z[0]&&Z[0].push(...k),null}let ne=k?be(k.sort((oe,Z)=>oe[1]-Z[1]||oe[0]?.localeCompare(Z[0]||"")||0).map(oe=>oe[0]).filter(Boolean)):[];return ne.length?`${ne.join(`,${u}`)}{${T}}`:T}).filter(Boolean).reverse().join(u);if(!F)return et;let S=F.split(" $$ ");return`${S.join("{")}{${u}${et}${u}${"}".repeat(S.length)}`}).filter(Boolean).join(u);if(i&&(R=[x[y],R].filter(Boolean).join(u)),f&&R){let F=typeof f=="object"?f.cssLayerName?.(y):void 0;F!==null&&(F||(F=y),R=`@layer ${F}{${u}${R}${u}}`)}let V=a?"":`/* layer: ${y} */${u}`;return b[y]=R?V+R:""},h=(y=j,R)=>y.filter(V=>!R?.includes(V)).map(V=>v(V)||"").filter(Boolean).join(u);return{get css(){return h()},layers:j,matched:m,getLayers:h,getLayer:v}}async matchVariants(t,r){let n=new Set,o=[],i=r||t,s=!0,a={rawSelector:t,theme:this.config.theme,generator:this};for(;s;){s=!1;for(let c of this.config.variants){if(!c.multiPass&&n.has(c))continue;let f=await c.match(i,a);if(f){if(O(f)){if(f===i)continue;f={matcher:f}}i=f.matcher??i,o.unshift(f),n.add(c),s=!0;break}}if(!s)break;if(o.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[t,i,o,n]}applyVariants(t,r=t[4],n=t[1]){let i=r.slice().sort((f,p)=>(f.order||0)-(p.order||0)).reduceRight((f,p)=>u=>{let d=p.body?.(u.entries)||u.entries,m=Array.isArray(p.parent)?p.parent:[p.parent,void 0];return(p.handle??tc)({...u,entries:d,selector:p.selector?.(u.selector,d)||u.selector,parent:m[0]||u.parent,parentOrder:m[1]||u.parentOrder,layer:p.layer||u.layer,sort:p.sort||u.sort},f)},f=>f)({prefix:"",selector:ec(n),pseudo:"",entries:t[2]}),{parent:s,parentOrder:a}=i;s!=null&&a!=null&&this.parentOrders.set(s,a);let c={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:s,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let f of this.config.postprocess)f(c);return c}constructCustomCSS(t,r,n){let o=xe(r);if(O(o))return o;let{selector:i,entries:s,parent:a}=this.applyVariants([0,n||t.rawSelector,o,void 0,t.variantHandlers]),c=`${i}{${ye(s)}}`;return a?`${a}{${c}}`:c}async parseUtil(t,r,n=!1,o){let[i,s,a]=O(t)?await this.matchVariants(t):t;this.config.details&&(r.rules=r.rules??[]);let c=this.config.rulesStaticMap[s];if(c&&c[1]&&(n||!c[2]?.internal)){this.config.details&&r.rules.push(c[3]);let p=c[0],u=xe(c[1]),d=c[2];return O(u)?[[p,u,d]]:[[p,i,u,d,a]]}r.variantHandlers=a;let{rulesDynamic:f}=this.config;for(let[p,u,d,m]of f){if(m?.internal&&!n)continue;let g=s;if(m?.prefix){let b=A(m.prefix);if(o){let v=A(o);if(!b.some(h=>v.includes(h)))continue}else{let v=b.find(h=>s.startsWith(h));if(v==null)continue;g=s.slice(v.length)}}let x=g.match(u);if(!x)continue;let $=await d(x,r);if(!$)continue;if(this.config.details&&r.rules.push([u,d,m]),typeof $!="string")if(Symbol.asyncIterator in $){let b=[];for await(let v of $)v&&b.push(v);$=b}else Symbol.iterator in $&&!Array.isArray($)&&($=Array.from($).filter(Fr));let j=jn($).filter(b=>b.length);if(j.length)return j.map(b=>{if(O(b))return[p,b,m];let v=a;for(let h of b)h[0]===ve.variants?v=[...A(h[1]),...v]:h[0]===ve.parent?v=[{parent:h[1]},...v]:h[0]===ve.selector&&(v=[{selector:h[1]},...v]);return[p,i,b,m,v]})}}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:c}=this.applyVariants(t),f=ye(o);if(!f)return;let{layer:p,sort:u,...d}=t[3]??{},m={...d,layer:s??p,sort:a??u};return[t[0],n,f,i,m,this.config.details?r:void 0,c]}async expandShortcut(t,r,n=5){if(n===0)return;let o=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:Pn,i,s;for(let a of this.config.shortcuts){let c=t;if(a[2]?.prefix){let p=A(a[2].prefix).find(u=>t.startsWith(u));if(p==null)continue;c=t.slice(p.length)}if(An(a)){if(a[0]===c){i=i||a[2],s=a[1],o(a);break}}else{let f=c.match(a[0]);if(f&&(s=a[1](f,r)),s){i=i||a[2],o(a);break}}}if(s&&(s=A(s).map(a=>O(a)?Mn(a.trim()).split(/\s+/g):a).flat()),!s){let[a,c]=O(t)?await this.matchVariants(t):t;if(a!==c){let f=await this.expandShortcut(c,r,n-1);f&&(s=f[0].map(p=>O(p)?a.replace(c,p):p))}}if(s)return[(await Promise.all(s.map(async a=>(O(a)?(await this.expandShortcut(a,r,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(t,r,n,o={layer:this.config.shortcutsLayer}){let i=new ot,s=(await Promise.all(be(n).map(async p=>{let u=O(p)?await this.parseUtil(p,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",xe(p),void 0,[]]];return!u&&this.config.warn&&se(`unmatched utility "${p}" in shortcut "${t[1]}"`),u||[]}))).flat(1).filter(Boolean).sort((p,u)=>p[0]-u[0]),[a,,c]=t,f=[];for(let p of s){if(_r(p)){f.push([p[0],void 0,p[1],void 0,p[2],r,void 0]);continue}let{selector:u,entries:d,parent:m,sort:g,noMerge:x,layer:$}=this.applyVariants(p,[...p[4],...c],a);i.getFallback($??o.layer,new nt).getFallback(u,m,[[],p[0]])[0].push([d,!!(x??p[3]?.noMerge),g??0])}return f.concat(i.flatMap((p,u)=>p.map(([d,m],g,x)=>{let $=(b,v,h)=>{let y=Math.max(...h.map(V=>V[1])),R=h.map(V=>V[0]);return(b?[R.flat(1)]:R).map(V=>{let F=ye(V);if(F)return[m,g,F,x,{...o,noMerge:v,sort:y,layer:u},r,void 0]})};return[[d.filter(([,b])=>b).map(([b,,v])=>[b,v]),!0],[d.filter(([,b])=>!b).map(([b,,v])=>[b,v]),!1]].map(([b,v])=>[...$(!1,v,b.filter(([h])=>h.some(y=>y[0]===ve.shortcutsNoMerge))),...$(!0,v,b.filter(([h])=>h.every(y=>y[0]!==ve.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):O(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):O(o)?o===t:o.test(t)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};function In(e,t){return new Ur(e,t)}var Kn=/\s\$\$\s+/g;function Ja(e){return Kn.test(e)}function Qa(e,t){return Ja(e)?e.replace(Kn,t?` ${t} `:" "):t?`${t} ${e}`:e}var Bn=/^\[(.+?)(~?=)"(.*)"\]$/;function ec(e){return Bn.test(e)?e.replace(Bn,(t,r,n,o)=>`[${tt(r)}${n}"${tt(o)}"]`):`.${tt(e)}`}function tc(e,t){return t(e)}function rc(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 Hn(e,t,r,n){for(let o of Array.from(e.matchAll(r)))if(o!=null){let i=o[0],s=`${n}${rc(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 nc=/\/\/#\s*sourceMappingURL=.*\n?/g;function qn(e){return e.includes("sourceMappingURL=")?e.replace(nc,""):e}var oc=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,ic=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,sc=/^\[(?:\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function ac(e){let t=[];for(let o of e.matchAll(ic))o.index!==0&&!/^[\s'"`]/.test(e[o.index-1]??"")||t.push(o[0]);for(let o of e.matchAll(oc))t.push(o[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return e=Hn(e,r,/-\[[^\]]*\]/g,n),e&&e.split(at).forEach(o=>{o.includes(n)&&(o=Gn(o,r)),Ve(o)&&!sc.test(o)&&t.push(o)}),t}var Yn={name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:e}){return ac(qn(e))}};var Xn=[{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("")}}}];var W={l:["-left"],r:["-right"],t:["-top"],b:["-bottom"],s:["-inline-start"],e:["-inline-end"],x:["-left","-right"],y:["-top","-bottom"],"":[""],bs:["-block-start"],be:["-block-end"],is:["-inline-start"],ie:["-inline-end"],block:["-block-start","-block-end"],inline:["-inline-start","-inline-end"]},Wr={...W,s:["-inset-inline-start"],start:["-inset-inline-start"],e:["-inset-inline-end"],end:["-inset-inline-end"],bs:["-inset-block-start"],be:["-inset-block-end"],is:["-inset-inline-start"],ie:["-inset-inline-end"],block:["-inset-block-start","-inset-block-end"],inline:["-inset-inline-start","-inset-inline-end"]},Nr={l:["-top-left","-bottom-left"],r:["-top-right","-bottom-right"],t:["-top-left","-top-right"],b:["-bottom-left","-bottom-right"],tl:["-top-left"],lt:["-top-left"],tr:["-top-right"],rt:["-top-right"],bl:["-bottom-left"],lb:["-bottom-left"],br:["-bottom-right"],rb:["-bottom-right"],"":[""],bs:["-start-start","-start-end"],be:["-end-start","-end-end"],s:["-end-start","-start-start"],is:["-end-start","-start-start"],e:["-start-end","-end-end"],ie:["-start-end","-end-end"],ss:["-start-start"],"bs-is":["-start-start"],"is-bs":["-start-start"],se:["-start-end"],"bs-ie":["-start-end"],"ie-bs":["-start-end"],es:["-end-start"],"be-is":["-end-start"],"is-be":["-end-start"],ee:["-end-end"],"be-ie":["-end-end"],"ie-be":["-end-end"]},Jn={x:["-x"],y:["-y"],z:["-z"],"":["-x","-y"]},Qn=["x","y","z"],Zn=["top","top center","top left","top right","bottom","bottom center","bottom left","bottom right","left","left center","left top","left bottom","right","right center","right top","right bottom","center","center top","center bottom","center left","center right","center center"],U=Object.assign({},...Zn.map(e=>({[e.replace(/ /,"-")]:e})),...Zn.map(e=>({[e.replace(/\b(\w)\w+/g,"$1").replace(/ /,"")]:e}))),C=["inherit","initial","revert","revert-layer","unset"],_e=/^(calc|clamp|min|max)\s*\((.+)\)(.*)/,ft=/^(var)\s*\((.+)\)(.*)/;function we(e,t,r){if(e==="")return;let n=e.length,o=0,i=!1,s=0;for(let a=0;a<n;a++)switch(e[a]){case t:i||(i=!0,s=a),o++;break;case r:if(--o,o<0)return;if(o===0)return[e.slice(s,a+1),e.slice(a+1),e.slice(0,s)];break}}function ae(e,t,r,n){if(e===""||(O(n)&&(n=[n]),n.length===0))return;let o=e.length,i=0;for(let s=0;s<o;s++)switch(e[s]){case t:i++;break;case r:if(--i<0)return;break;default:for(let a of n){let c=a.length;if(c&&a===e.slice(s,s+c)&&i===0)return s===0||s===o-c?void 0:[e.slice(0,s),e.slice(s+c)]}}return[e,""]}function ue(e,t,r){r=r??10;let n=[],o=0;for(;e!=="";){if(++o>r)return;let i=ae(e,"(",")",t);if(!i)return;let[s,a]=i;n.push(s),e=a}if(n.length>0)return n}var Dr=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],eo=["%alpha","<alpha-value>"],cc=new RegExp(eo.map(e=>ie(e)).join("|"));function K(e=""){let t=lc(e);if(t==null||t===!1)return;let{type:r,components:n,alpha:o}=t,i=r.toLowerCase();if(n.length!==0&&!(Dr.includes(i)&&![1,3].includes(n.length)))return{type:i,components:n.map(s=>typeof s=="string"?s.trim():s),alpha:typeof o=="string"?o.trim():o}}function ee(e){let t=e.alpha??1;return typeof t=="string"&&eo.includes(t)?1:t}function P(e,t){if(typeof e=="string")return e.replace(cc,`${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}`,Dr.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function lc(e){if(!e)return;let t=fc(e);if(t!=null||(t=uc(e),t!=null)||(t=pc(e),t!=null)||(t=mc(e),t!=null)||(t=hc(e),t!=null))return t}function fc(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 uc(e){let t={rebeccapurple:[102,51,153,1]}[e];if(t!=null)return{type:"rgb",components:t.slice(0,3),alpha:t[3]}}function pc(e){let t=e.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!t)return;let[,r,n]=t,o=ue(n,",",5);if(o){if([3,4].includes(o.length))return{type:r,components:o.slice(0,3),alpha:o[3]};if(o.length!==1)return!1}}var dc=new RegExp(`^(${Dr.join("|")})\\((.+)\\)$`,"i");function mc(e){let t=e.match(dc);if(!t)return;let[,r,n]=t,o=to(`${r} ${n}`);if(o){let{alpha:i,components:[s,...a]}=o;return{type:s,components:a,alpha:i}}}function hc(e){let t=e.match(/^color\((.+)\)$/);if(!t)return;let r=to(t[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function to(e){let t=ue(e," ");if(!t)return;let r=t.length;if(t[r-2]==="/")return{components:t.slice(0,r-2),alpha:t[r-1]};if(t[r-2]!=null&&(t[r-2].endsWith("/")||t[r-1].startsWith("/"))){let i=t.splice(r-2);t.push(i.join(" ")),--r}let n=ue(t[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:t};let o=n.pop();return t[r-1]=n.join("/"),{components:t,alpha:o}}function ut(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}function B(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(s,a)=>a({...s,...t(s)})}},autocomplete:`${e}:`}}function I(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(s,a)=>a({...s,parent:`${s.parent?`${s.parent} $$ `:""}${t}`})}},autocomplete:`${e}:`}}function ce(e,t,r){if(t.startsWith(`${e}[`)){let[n,o]=we(t.slice(e.length),"[","]")??[];if(n&&o){for(let i of r)if(o.startsWith(i))return[n,o.slice(i.length),i];return[n,o,""]}}}function D(e,t,r){if(t.startsWith(e)){let n=ce(e,t,r);if(n){let[o="",i=n[1]]=D("/",n[1],r)??[];return[n[0],i,o]}for(let o of r.filter(i=>i!=="/")){let i=t.indexOf(o,e.length);if(i!==-1){let s=t.indexOf("/",e.length),a=s===-1||i<=s;return[t.slice(e.length,a?i:s),t.slice(i+o.length),a?"":t.slice(s+1,i)]}}}}var ro="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",no=new Uint8Array(64),gc=new Uint8Array(128);for(let e=0;e<ro.length;e++){let t=ro.charCodeAt(e);no[e]=t,gc[t]=e}var Br=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}};function oo(e){let t=new Int32Array(5),r=1024*16,n=r-36,o=new Uint8Array(r),i=o.subarray(0,n),s=0,a="";for(let c=0;c<e.length;c++){let f=e[c];if(c>0&&(s===r&&(a+=Br.decode(o),s=0),o[s++]=59),f.length!==0){t[0]=0;for(let p=0;p<f.length;p++){let u=f[p];s>n&&(a+=Br.decode(i),o.copyWithin(0,n,s),s-=n),p>0&&(o[s++]=44),s=Fe(o,s,t,u,0),u.length!==1&&(s=Fe(o,s,t,u,1),s=Fe(o,s,t,u,2),s=Fe(o,s,t,u,3),u.length!==4&&(s=Fe(o,s,t,u,4)))}}}return a+Br.decode(o.subarray(0,s))}function Fe(e,t,r,n,o){let i=n[o],s=i-r[o];r[o]=i,s=s<0?-s<<1|1:s<<1;do{let a=s&31;s>>>=5,s>0&&(a|=32),e[t++]=no[a]}while(s>0);return t}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 bc(){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 xc=bc(),Ir=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=oo(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,"+xc(this.toString())}};function yc(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 vc(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 wc=Object.prototype.toString;function $c(e){return wc.call(e)==="[object Object]"}function io(e){let t=e.split(`
|
|
4
4
|
`),r=[];for(let n=0,o=0;n<t.length;n++)r.push(o),o+=t[n].length+1;return function(o){let i=0,s=r.length;for(;i<s;){let f=i+s>>1;o<r[f]?s=f:i=f+1}let a=i-1,c=o-r[a];return{line:a,column:c}}}var kc=/\w/,Kr=class{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,r,n,o){if(r.length){let i=r.length-1,s=r.indexOf(`
|
package/core.global.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(()=>{function Ve(r){let e=r.length,t=-1,n,s="",i=r.charCodeAt(0);for(;++t<e;){if(n=r.charCodeAt(t),n===0){s+="\uFFFD";continue}if(n===37){s+="\\%";continue}if(n===44){s+="\\,";continue}if(n>=1&&n<=31||n===127||t===0&&n>=48&&n<=57||t===1&&n>=48&&n<=57&&i===45){s+=`\\${n.toString(16)} `;continue}if(t===0&&e===1&&n===45){s+=`\\${r.charAt(t)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=r.charAt(t);continue}s+=`\\${r.charAt(t)}`}return s}var N=Ve;function U(r=[]){return Array.isArray(r)?r:[r]}function D(r){return Array.from(new Set(r))}function oe(r,e){return r.reduce((t,n)=>(t.findIndex(i=>e(n,i))===-1&&t.push(n),t),[])}function A(r){return typeof r=="string"}function K(r){return A(r)?r:(Array.isArray(r)?r:Object.entries(r)).filter(e=>e[1]!=null)}function ae(r){return Array.isArray(r)?r.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?r.map(e=>K(e)):[r]:[K(r)]}function $e(r){return r.filter(([e,t],n)=>{if(e.startsWith("$$"))return!1;for(let s=n-1;s>=0;s--)if(r[s][0]===e&&r[s][1]===t)return!1;return!0})}function W(r){return r==null?"":$e(r).map(([e,t])=>t!=null?`${e}:${t};`:void 0).filter(Boolean).join("")}function z(r){return r&&typeof r=="object"&&!Array.isArray(r)}function ee(r,e,t=!1){let n=r,s=e;if(Array.isArray(s))return t&&Array.isArray(s)?[...n,...s]:[...s];let i={...n};return z(n)&&z(s)&&Object.keys(s).forEach(o=>{z(n[o])&&z(s[o])||Array.isArray(n[o])&&Array.isArray(s[o])?i[o]=ee(n[o],s[o],t):Object.assign(i,{[o]:s[o]})}),i}function F(r){let e,t,n;if(Array.isArray(r)){for(t=Array(e=r.length);e--;)t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}if(Object.prototype.toString.call(r)==="[object Object]"){t={};for(e in r)e==="__proto__"?Object.defineProperty(t,e,{value:F(r[e]),configurable:!0,enumerable:!0,writable:!0}):t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}return r}function ce(r){return A(r[0])}function le(r){return A(r[0])}function ue(r){return typeof r=="function"?{match:r}:r}function te(r){return r.length===3}function re(r){return r!=null}function fe(){}var Y=class{_map=new Map;get(e,t){let n=this._map.get(e);if(n)return n.get(t)}getFallback(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.has(t)||s.set(t,n),s.get(t)}set(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.set(t,n),this}has(e,t){return this._map.get(e)?.has(t)}delete(e,t){return this._map.get(e)?.delete(t)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([t,n])=>Array.from(n.entries()).map(([s,i])=>e(i,t,s)))}},q=class extends Map{getFallback(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}map(e){let t=[];return this.forEach((n,s)=>{t.push(e(n,s))}),t}flatMap(e){let t=[];return this.forEach((n,s)=>{t.push(...e(n,s))}),t}};var G=class extends Set{_map;constructor(e){super(e),this._map??=new Map}add(e){return this._map??=new Map,this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,t){return this._map.set(e,t),super.add(e)}};function Z(r){return r instanceof G}var J={};function Pe(r=["-",":"]){let e=r.join("|");return J[e]||(J[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),J[e].lastIndex=0,J[e]}function je(r,e=["-",":"],t=5){let n=Pe(e),s,i=r.toString(),o=new Set,a=new Map;do s=!1,i=i.replace(n,(p,c,f,S,x)=>{if(!e.includes(f))return p;s=!0,o.add(c+f);let M=x+c.length+f.length+1,w={length:p.length,items:[]};a.set(x,w);for(let T of[...S.matchAll(/\S+/g)]){let $=M+T.index,g=a.get($)?.items;g?a.delete($):g=[{offset:$,length:T[0].length,className:T[0]}];for(let y of g)y.className=y.className==="~"?c:y.className.replace(/^(!?)(.*)/,`$1${c}${f}$2`),w.items.push(y)}return"$".repeat(p.length)}),t-=1;while(s&&t);let u;if(typeof r=="string"){u="";let p=0;for(let[c,f]of a)u+=r.slice(p,c),u+=f.items.map(S=>S.className).join(" "),p=c+f.length;u+=r.slice(p)}else{u=r;for(let[p,c]of a)u.overwrite(p,p+c.length,c.items.map(f=>f.className).join(" "))}return{prefixes:Array.from(o),hasChanged:s,groupsByOffset:a,get expanded(){return u.toString()}}}function pe(r,e=["-",":"],t=5){let n=je(r,e,t);return typeof r=="string"?n.expanded:r}var de=new Set;function me(r){de.has(r)||(console.warn("[unocss]",r),de.add(r))}var ge=/[\\:]?[\s'"`;{}]+/g;function _e(r){return r.split(ge)}var Q={name:"@unocss/core/extractor-split",order:0,extract({code:r}){return _e(r)}};function he(){return{events:{},emit(r,...e){(this.events[r]||[]).forEach(t=>t(...e))},on(r,e){return(this.events[r]=this.events[r]||[]).push(e),()=>this.events[r]=(this.events[r]||[]).filter(t=>t!==e)}}}var H="default",X="preflights",Oe="shortcuts",ke="imports",ye={[ke]:-200,[X]:-100,[Oe]:-10,[H]:0};function xe(r){return U(r).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var Se="_uno_resolved";function Le(r){let e=typeof r=="function"?r():r;if(Se in e)return e;e={...e},Object.defineProperty(e,Se,{value:!0,enumerable:!1});let t=e.shortcuts?xe(e.shortcuts):void 0;if(e.shortcuts=t,e.prefix||e.layer){let n=s=>{s[2]||(s[2]={});let i=s[2];i.prefix==null&&e.prefix&&(i.prefix=U(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};t?.forEach(n),e.rules?.forEach(n)}return e}function be(r){let e=Le(r);if(!e.presets)return[e];let t=(e.presets||[]).flatMap(U).flatMap(be);return[e,...t]}function ne(r={},e={}){let t=Object.assign({},e,r),n=oe((t.presets||[]).flatMap(U).flatMap(be),(l,d)=>l.name===d.name),s=[...n.filter(l=>l.enforce==="pre"),...n.filter(l=>!l.enforce),...n.filter(l=>l.enforce==="post")],i=[...s,t],o=[...i].reverse(),a=Object.assign({},ye,...i.map(l=>l.layers));function u(l){return D(i.flatMap(d=>U(d[l]||[])))}let p=u("extractors"),c=o.find(l=>l.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=Q),c&&!p.includes(c)&&p.unshift(c),p.sort((l,d)=>(l.order||0)-(d.order||0));let f=u("rules"),S={},x=f.length,M=f.map((l,d)=>{if(ce(l)){U(l[2]?.prefix||"").forEach(E=>{S[E+l[0]]=[d,l[1],l[2],l]});return}return[d,...l]}).filter(Boolean).reverse(),w=De(i.map(l=>l.theme)),T=u("extendTheme");for(let l of T)w=l(w)||w;let $={templates:D(i.flatMap(l=>U(l.autocomplete?.templates))),extractors:i.flatMap(l=>U(l.autocomplete?.extractors)).sort((l,d)=>(l.order||0)-(d.order||0)),shorthands:Ke(i.map(l=>l.autocomplete?.shorthands||{}))},g=u("separators");g.length||(g=[":","-"]);let y={mergeSelectors:!0,warn:!0,sortLayers:l=>l,...t,blocklist:u("blocklist"),presets:s,envMode:t.envMode||"build",shortcutsLayer:t.shortcutsLayer||"shortcuts",layers:a,theme:w,rulesSize:x,rulesDynamic:M,rulesStaticMap:S,preprocess:u("preprocess"),postprocess:u("postprocess"),preflights:u("preflights"),autocomplete:$,variants:u("variants").map(ue).sort((l,d)=>(l.order||0)-(d.order||0)),shortcuts:xe(u("shortcuts")).reverse(),extractors:p,safelist:u("safelist"),separators:g,details:t.details??t.envMode==="dev"};for(let l of i)l?.configResolved?.(y);return y}function De(r){return r.map(e=>e?F(e):{}).reduce((e,t)=>ee(e,t),{})}function Ke(r){return r.reduce((e,t)=>{let n={};for(let s in t){let i=t[s];Array.isArray(i)?n[s]=`(${i.join("|")})`:n[s]=i}return{...e,...n}},{})}var Ce="0.61.
|
|
1
|
+
"use strict";(()=>{function Ve(r){let e=r.length,t=-1,n,s="",i=r.charCodeAt(0);for(;++t<e;){if(n=r.charCodeAt(t),n===0){s+="\uFFFD";continue}if(n===37){s+="\\%";continue}if(n===44){s+="\\,";continue}if(n>=1&&n<=31||n===127||t===0&&n>=48&&n<=57||t===1&&n>=48&&n<=57&&i===45){s+=`\\${n.toString(16)} `;continue}if(t===0&&e===1&&n===45){s+=`\\${r.charAt(t)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=r.charAt(t);continue}s+=`\\${r.charAt(t)}`}return s}var N=Ve;function U(r=[]){return Array.isArray(r)?r:[r]}function D(r){return Array.from(new Set(r))}function oe(r,e){return r.reduce((t,n)=>(t.findIndex(i=>e(n,i))===-1&&t.push(n),t),[])}function A(r){return typeof r=="string"}function K(r){return A(r)?r:(Array.isArray(r)?r:Object.entries(r)).filter(e=>e[1]!=null)}function ae(r){return Array.isArray(r)?r.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?r.map(e=>K(e)):[r]:[K(r)]}function $e(r){return r.filter(([e,t],n)=>{if(e.startsWith("$$"))return!1;for(let s=n-1;s>=0;s--)if(r[s][0]===e&&r[s][1]===t)return!1;return!0})}function W(r){return r==null?"":$e(r).map(([e,t])=>t!=null?`${e}:${t};`:void 0).filter(Boolean).join("")}function z(r){return r&&typeof r=="object"&&!Array.isArray(r)}function ee(r,e,t=!1){let n=r,s=e;if(Array.isArray(s))return t&&Array.isArray(s)?[...n,...s]:[...s];let i={...n};return z(n)&&z(s)&&Object.keys(s).forEach(o=>{z(n[o])&&z(s[o])||Array.isArray(n[o])&&Array.isArray(s[o])?i[o]=ee(n[o],s[o],t):Object.assign(i,{[o]:s[o]})}),i}function F(r){let e,t,n;if(Array.isArray(r)){for(t=Array(e=r.length);e--;)t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}if(Object.prototype.toString.call(r)==="[object Object]"){t={};for(e in r)e==="__proto__"?Object.defineProperty(t,e,{value:F(r[e]),configurable:!0,enumerable:!0,writable:!0}):t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}return r}function ce(r){return A(r[0])}function le(r){return A(r[0])}function ue(r){return typeof r=="function"?{match:r}:r}function te(r){return r.length===3}function re(r){return r!=null}function fe(){}var Y=class{_map=new Map;get(e,t){let n=this._map.get(e);if(n)return n.get(t)}getFallback(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.has(t)||s.set(t,n),s.get(t)}set(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.set(t,n),this}has(e,t){return this._map.get(e)?.has(t)}delete(e,t){return this._map.get(e)?.delete(t)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([t,n])=>Array.from(n.entries()).map(([s,i])=>e(i,t,s)))}},q=class extends Map{getFallback(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}map(e){let t=[];return this.forEach((n,s)=>{t.push(e(n,s))}),t}flatMap(e){let t=[];return this.forEach((n,s)=>{t.push(...e(n,s))}),t}};var G=class extends Set{_map;constructor(e){super(e),this._map??=new Map}add(e){return this._map??=new Map,this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,t){return this._map.set(e,t),super.add(e)}};function Z(r){return r instanceof G}var J={};function Pe(r=["-",":"]){let e=r.join("|");return J[e]||(J[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),J[e].lastIndex=0,J[e]}function je(r,e=["-",":"],t=5){let n=Pe(e),s,i=r.toString(),o=new Set,a=new Map;do s=!1,i=i.replace(n,(p,c,f,S,x)=>{if(!e.includes(f))return p;s=!0,o.add(c+f);let M=x+c.length+f.length+1,w={length:p.length,items:[]};a.set(x,w);for(let T of[...S.matchAll(/\S+/g)]){let $=M+T.index,g=a.get($)?.items;g?a.delete($):g=[{offset:$,length:T[0].length,className:T[0]}];for(let y of g)y.className=y.className==="~"?c:y.className.replace(/^(!?)(.*)/,`$1${c}${f}$2`),w.items.push(y)}return"$".repeat(p.length)}),t-=1;while(s&&t);let u;if(typeof r=="string"){u="";let p=0;for(let[c,f]of a)u+=r.slice(p,c),u+=f.items.map(S=>S.className).join(" "),p=c+f.length;u+=r.slice(p)}else{u=r;for(let[p,c]of a)u.overwrite(p,p+c.length,c.items.map(f=>f.className).join(" "))}return{prefixes:Array.from(o),hasChanged:s,groupsByOffset:a,get expanded(){return u.toString()}}}function pe(r,e=["-",":"],t=5){let n=je(r,e,t);return typeof r=="string"?n.expanded:r}var de=new Set;function me(r){de.has(r)||(console.warn("[unocss]",r),de.add(r))}var ge=/[\\:]?[\s'"`;{}]+/g;function _e(r){return r.split(ge)}var Q={name:"@unocss/core/extractor-split",order:0,extract({code:r}){return _e(r)}};function he(){return{events:{},emit(r,...e){(this.events[r]||[]).forEach(t=>t(...e))},on(r,e){return(this.events[r]=this.events[r]||[]).push(e),()=>this.events[r]=(this.events[r]||[]).filter(t=>t!==e)}}}var H="default",X="preflights",Oe="shortcuts",ke="imports",ye={[ke]:-200,[X]:-100,[Oe]:-10,[H]:0};function xe(r){return U(r).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var Se="_uno_resolved";function Le(r){let e=typeof r=="function"?r():r;if(Se in e)return e;e={...e},Object.defineProperty(e,Se,{value:!0,enumerable:!1});let t=e.shortcuts?xe(e.shortcuts):void 0;if(e.shortcuts=t,e.prefix||e.layer){let n=s=>{s[2]||(s[2]={});let i=s[2];i.prefix==null&&e.prefix&&(i.prefix=U(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};t?.forEach(n),e.rules?.forEach(n)}return e}function be(r){let e=Le(r);if(!e.presets)return[e];let t=(e.presets||[]).flatMap(U).flatMap(be);return[e,...t]}function ne(r={},e={}){let t=Object.assign({},e,r),n=oe((t.presets||[]).flatMap(U).flatMap(be),(l,d)=>l.name===d.name),s=[...n.filter(l=>l.enforce==="pre"),...n.filter(l=>!l.enforce),...n.filter(l=>l.enforce==="post")],i=[...s,t],o=[...i].reverse(),a=Object.assign({},ye,...i.map(l=>l.layers));function u(l){return D(i.flatMap(d=>U(d[l]||[])))}let p=u("extractors"),c=o.find(l=>l.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=Q),c&&!p.includes(c)&&p.unshift(c),p.sort((l,d)=>(l.order||0)-(d.order||0));let f=u("rules"),S={},x=f.length,M=f.map((l,d)=>{if(ce(l)){U(l[2]?.prefix||"").forEach(E=>{S[E+l[0]]=[d,l[1],l[2],l]});return}return[d,...l]}).filter(Boolean).reverse(),w=De(i.map(l=>l.theme)),T=u("extendTheme");for(let l of T)w=l(w)||w;let $={templates:D(i.flatMap(l=>U(l.autocomplete?.templates))),extractors:i.flatMap(l=>U(l.autocomplete?.extractors)).sort((l,d)=>(l.order||0)-(d.order||0)),shorthands:Ke(i.map(l=>l.autocomplete?.shorthands||{}))},g=u("separators");g.length||(g=[":","-"]);let y={mergeSelectors:!0,warn:!0,sortLayers:l=>l,...t,blocklist:u("blocklist"),presets:s,envMode:t.envMode||"build",shortcutsLayer:t.shortcutsLayer||"shortcuts",layers:a,theme:w,rulesSize:x,rulesDynamic:M,rulesStaticMap:S,preprocess:u("preprocess"),postprocess:u("postprocess"),preflights:u("preflights"),autocomplete:$,variants:u("variants").map(ue).sort((l,d)=>(l.order||0)-(d.order||0)),shortcuts:xe(u("shortcuts")).reverse(),extractors:p,safelist:u("safelist"),separators:g,details:t.details??t.envMode==="dev"};for(let l of i)l?.configResolved?.(y);return y}function De(r){return r.map(e=>e?F(e):{}).reduce((e,t)=>ee(e,t),{})}function Ke(r){return r.reduce((e,t)=>{let n={};for(let s in t){let i=t[s];Array.isArray(i)?n[s]=`(${i.join("|")})`:n[s]=i}return{...e,...n}},{})}var Ce="0.61.4";var I={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector"},se=class{constructor(e={},t={}){this.userConfig=e;this.defaults=t;this.config=ne(e,t),this.events.emit("config",this.config)}version=Ce;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=he();setConfig(e,t){e&&(t&&(this.defaults=t),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=ne(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,t,n=new Set){let s={original:e,code:e,id:t,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let o=await i.extract?.(s);if(o)if(Z(o)&&Z(n))for(let a of o)n.setCount(a,n.getCount(a)+o.getCount(a));else for(let a of o)n.add(a)}return n}makeContext(e,t){let n={rawSelector:e,currentSelector:t[1],theme:this.config.theme,generator:this,symbols:I,variantHandlers:t[2],constructCSS:(...s)=>this.constructCustomCSS(n,...s),variantMatch:t};return n}async parseToken(e,t){if(this.blocked.has(e))return;let n=`${e}${t?` ${t}`:""}`;if(this._cache.has(n))return this._cache.get(n);let s=e;for(let p of this.config.preprocess)s=p(e);if(this.isBlocked(s)){this.blocked.add(e),this._cache.set(n,null);return}let i=await this.matchVariants(e,s);if(!i||this.isBlocked(i[1])){this.blocked.add(e),this._cache.set(n,null);return}let o=this.makeContext(e,[t||i[0],i[1],i[2],i[3]]);this.config.details&&(o.variants=[...i[3]]);let a=await this.expandShortcut(o.currentSelector,o),u=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(p=>this.stringifyUtil(p,o)).filter(re);if(u?.length)return this._cache.set(n,u),u;this._cache.set(n,null)}async generate(e,t={}){let{id:n,scope:s,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:u=!1}=t,p=this.config.outputToCssLayers,c=A(e)?await this.applyExtractors(e,n,u?new G:new Set):Array.isArray(e)?new Set(e):e;if(o){let d={generator:this,theme:this.config.theme};this.config.safelist.flatMap(b=>typeof b=="function"?b(d):b).forEach(b=>{c.has(b)||c.add(b)})}let f=a?"":`
|
|
2
2
|
`,S=new Set([H]),x=u?new Map:new Set,M=new Map,w={},T=Array.from(c).map(async d=>{if(x.has(d))return;let b=await this.parseToken(d);if(b!=null){x instanceof Map?x.set(d,{data:b,count:Z(c)?c.getCount(d):-1}):x.add(d);for(let E of b){let v=E[3]||"",P=E[4]?.layer;M.has(v)||M.set(v,[]),M.get(v).push(E),P&&S.add(P)}}});await Promise.all(T),await(async()=>{if(!i)return;let d={generator:this,theme:this.config.theme},b=new Set([]);this.config.preflights.forEach(({layer:E=X})=>{S.add(E),b.add(E)}),w=Object.fromEntries(await Promise.all(Array.from(b).map(async E=>{let P=(await Promise.all(this.config.preflights.filter(_=>(_.layer||X)===E).map(async _=>await _.getCSS(d)))).filter(Boolean).join(f);return[E,P]})))})();let $=this.config.sortLayers(Array.from(S).sort((d,b)=>(this.config.layers[d]??0)-(this.config.layers[b]??0)||d.localeCompare(b))),g={},y=(d=H)=>{if(g[d])return g[d];let b=Array.from(M).sort((v,P)=>(this.parentOrders.get(v[0])??0)-(this.parentOrders.get(P[0])??0)||v[0]?.localeCompare(P[0]||"")||0).map(([v,P])=>{let _=P.length,L=P.filter(m=>(m[4]?.layer||H)===d).sort((m,C)=>m[0]-C[0]||(m[4]?.sort||0)-(C[4]?.sort||0)||m[5]?.currentSelector?.localeCompare(C[5]?.currentSelector??"")||m[1]?.localeCompare(C[1]||"")||m[2]?.localeCompare(C[2]||"")||0).map(([,m,C,,R,,V])=>[[[(m&&Ge(m,s))??"",R?.sort??0]],C,!!(V??R?.noMerge)]);if(!L.length)return;let B=L.reverse().map(([m,C,R],V)=>{if(!R&&this.config.mergeSelectors)for(let k=V+1;k<_;k++){let j=L[k];if(j&&!j[2]&&(m&&j[0]||m==null&&j[0]==null)&&j[1]===C)return m&&j[0]&&j[0].push(...m),null}let O=m?D(m.sort((k,j)=>k[1]-j[1]||k[0]?.localeCompare(j[0]||"")||0).map(k=>k[0]).filter(Boolean)):[];return O.length?`${O.join(`,${f}`)}{${C}}`:C}).filter(Boolean).reverse().join(f);if(!v)return B;let h=v.split(" $$ ");return`${h.join("{")}{${f}${B}${f}${"}".repeat(h.length)}`}).filter(Boolean).join(f);if(i&&(b=[w[d],b].filter(Boolean).join(f)),p&&b){let v=typeof p=="object"?p.cssLayerName?.(d):void 0;v!==null&&(v||(v=d),b=`@layer ${v}{${f}${b}${f}}`)}let E=a?"":`/* layer: ${d} */${f}`;return g[d]=b?E+b:""},l=(d=$,b)=>d.filter(E=>!b?.includes(E)).map(E=>y(E)||"").filter(Boolean).join(f);return{get css(){return l()},layers:$,matched:x,getLayers:l,getLayer:y}}async matchVariants(e,t){let n=new Set,s=[],i=t||e,o=!0,a={rawSelector:e,theme:this.config.theme,generator:this};for(;o;){o=!1;for(let u of this.config.variants){if(!u.multiPass&&n.has(u))continue;let p=await u.match(i,a);if(p){if(A(p)){if(p===i)continue;p={matcher:p}}i=p.matcher??i,s.unshift(p),n.add(u),o=!0;break}}if(!o)break;if(s.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,i,s,n]}applyVariants(e,t=e[4],n=e[1]){let i=t.slice().sort((p,c)=>(p.order||0)-(c.order||0)).reduceRight((p,c)=>f=>{let S=c.body?.(f.entries)||f.entries,x=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??Be)({...f,entries:S,selector:c.selector?.(f.selector,S)||f.selector,parent:x[0]||f.parent,parentOrder:x[1]||f.parentOrder,layer:c.layer||f.layer,sort:c.sort||f.sort},p)},p=>p)({prefix:"",selector:He(n),pseudo:"",entries:e[2]}),{parent:o,parentOrder:a}=i;o!=null&&a!=null&&this.parentOrders.set(o,a);let u={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:o,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let p of this.config.postprocess)p(u);return u}constructCustomCSS(e,t,n){let s=K(t);if(A(s))return s;let{selector:i,entries:o,parent:a}=this.applyVariants([0,n||e.rawSelector,s,void 0,e.variantHandlers]),u=`${i}{${W(o)}}`;return a?`${a}{${u}}`:u}async parseUtil(e,t,n=!1,s){let[i,o,a]=A(e)?await this.matchVariants(e):e;this.config.details&&(t.rules=t.rules??[]);let u=this.config.rulesStaticMap[o];if(u&&u[1]&&(n||!u[2]?.internal)){this.config.details&&t.rules.push(u[3]);let c=u[0],f=K(u[1]),S=u[2];return A(f)?[[c,f,S]]:[[c,i,f,S,a]]}t.variantHandlers=a;let{rulesDynamic:p}=this.config;for(let[c,f,S,x]of p){if(x?.internal&&!n)continue;let M=o;if(x?.prefix){let g=U(x.prefix);if(s){let y=U(s);if(!g.some(l=>y.includes(l)))continue}else{let y=g.find(l=>o.startsWith(l));if(y==null)continue;M=o.slice(y.length)}}let w=M.match(f);if(!w)continue;let T=await S(w,t);if(!T)continue;if(this.config.details&&t.rules.push([f,S,x]),typeof T!="string")if(Symbol.asyncIterator in T){let g=[];for await(let y of T)y&&g.push(y);T=g}else Symbol.iterator in T&&!Array.isArray(T)&&(T=Array.from(T).filter(re));let $=ae(T).filter(g=>g.length);if($.length)return $.map(g=>{if(A(g))return[c,g,x];let y=a;for(let l of g)l[0]===I.variants?y=[...U(l[1]),...y]:l[0]===I.parent?y=[{parent:l[1]},...y]:l[0]===I.selector&&(y=[{selector:l[1]},...y]);return[c,i,g,x,y]})}}stringifyUtil(e,t){if(!e)return;if(te(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?t:void 0,void 0];let{selector:n,entries:s,parent:i,layer:o,sort:a,noMerge:u}=this.applyVariants(e),p=W(s);if(!p)return;let{layer:c,sort:f,...S}=e[3]??{},x={...S,layer:o??c,sort:a??f};return[e[0],n,p,i,x,this.config.details?t:void 0,u]}async expandShortcut(e,t,n=5){if(n===0)return;let s=this.config.details?a=>{t.shortcuts=t.shortcuts??[],t.shortcuts.push(a)}:fe,i,o;for(let a of this.config.shortcuts){let u=e;if(a[2]?.prefix){let c=U(a[2].prefix).find(f=>e.startsWith(f));if(c==null)continue;u=e.slice(c.length)}if(le(a)){if(a[0]===u){i=i||a[2],o=a[1],s(a);break}}else{let p=u.match(a[0]);if(p&&(o=a[1](p,t)),o){i=i||a[2],s(a);break}}}if(o&&(o=U(o).map(a=>A(a)?pe(a.trim()).split(/\s+/g):a).flat()),!o){let[a,u]=A(e)?await this.matchVariants(e):e;if(a!==u){let p=await this.expandShortcut(u,t,n-1);p&&(o=p[0].map(c=>A(c)?a.replace(u,c):c))}}if(o)return[(await Promise.all(o.map(async a=>(A(a)?(await this.expandShortcut(a,t,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(e,t,n,s={layer:this.config.shortcutsLayer}){let i=new q,o=(await Promise.all(D(n).map(async c=>{let f=A(c)?await this.parseUtil(c,t,!0,s.prefix):[[Number.POSITIVE_INFINITY,"{inline}",K(c),void 0,[]]];return!f&&this.config.warn&&me(`unmatched utility "${c}" in shortcut "${e[1]}"`),f||[]}))).flat(1).filter(Boolean).sort((c,f)=>c[0]-f[0]),[a,,u]=e,p=[];for(let c of o){if(te(c)){p.push([c[0],void 0,c[1],void 0,c[2],t,void 0]);continue}let{selector:f,entries:S,parent:x,sort:M,noMerge:w,layer:T}=this.applyVariants(c,[...c[4],...u],a);i.getFallback(T??s.layer,new Y).getFallback(f,x,[[],c[0]])[0].push([S,!!(w??c[3]?.noMerge),M??0])}return p.concat(i.flatMap((c,f)=>c.map(([S,x],M,w)=>{let T=(g,y,l)=>{let d=Math.max(...l.map(E=>E[1])),b=l.map(E=>E[0]);return(g?[b.flat(1)]:b).map(E=>{let v=W(E);if(v)return[x,M,v,w,{...s,noMerge:y,sort:d,layer:f},t,void 0]})};return[[S.filter(([,g])=>g).map(([g,,y])=>[g,y]),!0],[S.filter(([,g])=>!g).map(([g,,y])=>[g,y]),!1]].map(([g,y])=>[...T(!1,y,g.filter(([l])=>l.some(d=>d[0]===I.shortcutsNoMerge))),...T(!0,y,g.filter(([l])=>l.every(d=>d[0]!==I.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(t=>Array.isArray(t)?t[0]:t).some(t=>typeof t=="function"?t(e):A(t)?t===e:t.test(e))}getBlocked(e){let t=this.config.blocklist.find(n=>{let s=Array.isArray(n)?n[0]:n;return typeof s=="function"?s(e):A(s)?s===e:s.test(e)});return t?Array.isArray(t)?t:[t,void 0]:void 0}};function Ee(r,e){return new se(r,e)}var Re=/\s\$\$\s+/g;function Fe(r){return Re.test(r)}function Ge(r,e){return Fe(r)?r.replace(Re,e?` ${e} `:" "):e?`${e} ${r}`:r}var Te=/^\[(.+?)(~?=)"(.*)"\]$/;function He(r){return Te.test(r)?r.replace(Te,(e,t,n,s)=>`[${N(t)}${n}"${N(s)}"]`):`.${N(r)}`}function Be(r,e){return e(r)}function Ne(r){return r.replace(/-(\w)/g,(e,t)=>t?t.toUpperCase():"")}function ve(r){return r.charAt(0).toUpperCase()+r.slice(1)}function Me(r){return r.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var we=["Webkit","Moz","ms"];function Ae(r){let e={};function t(n){let s=e[n];if(s)return s;let i=Ne(n);if(i!=="filter"&&i in r)return e[n]=Me(i);i=ve(i);for(let o=0;o<we.length;o++){let a=`${we[o]}${i}`;if(a in r)return e[n]=Me(ve(a))}return n}return({entries:n})=>n.forEach(s=>{s[0].startsWith("--")||(s[0]=t(s[0]))})}function Ue(r){return r.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}function ie(r={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}let e=window,t=window.document,n=()=>t.documentElement,s=e.__unocss||{},i=Object.assign({},r,s.runtime),o=i.defaults||{},a=i.cloakAttribute??"un-cloak";i.autoPrefix&&(o.postprocess=U(o.postprocess)).unshift(Ae(t.createElement("div").style)),i.configResolved?.(s,o);let u=Ee(s,o),p=h=>i.inject?i.inject(h):n().prepend(h),c=()=>i.rootElement?i.rootElement():t.body,f=new Map,S=!0,x=new Set,M,w,T=[],$=()=>new Promise(h=>{T.push(h),w!=null&&clearTimeout(w),w=setTimeout(()=>l().then(()=>{let m=T;T=[],m.forEach(C=>C())}),0)});function g(h,m=!1){if(h.nodeType!==1)return;let C=h;C.hasAttribute(a)&&C.removeAttribute(a),m&&C.querySelectorAll(`[${a}]`).forEach(R=>{R.removeAttribute(a)})}function y(h,m){let C=f.get(h);if(!C)if(C=t.createElement("style"),C.setAttribute("data-unocss-runtime-layer",h),f.set(h,C),m==null)p(C);else{let R=y(m),V=R.parentNode;V?V.insertBefore(C,R.nextSibling):p(C)}return C}async function l(){let h=[...x],m=await u.generate(h);return m.layers.reduce((R,V)=>(y(V,R).innerHTML=m.getLayer(V)??"",V),void 0),h.filter(R=>!m.matched.has(R)).forEach(R=>x.delete(R)),{...m,getStyleElement:R=>f.get(R),getStyleElements:()=>f}}async function d(h){let m=x.size;await u.applyExtractors(h,void 0,x),m!==x.size&&await $()}async function b(h=c()){let m=h&&h.outerHTML;m&&(await d(`${m} ${Ue(m)}`),g(n()),g(h,!0))}let E=new MutationObserver(h=>{S||h.forEach(async m=>{if(m.target.nodeType!==1)return;let C=m.target;for(let R of f)if(C===R[1])return;if(m.type==="childList")m.addedNodes.forEach(async R=>{if(R.nodeType!==1)return;let V=R;M&&!M(V)||(await d(V.outerHTML),g(V))});else{if(M&&!M(C))return;if(m.attributeName!==a){let R=Array.from(C.attributes).map(O=>O.value?`${O.name}="${O.value}"`:O.name).join(" "),V=`<${C.tagName.toLowerCase()} ${R}>`;await d(V)}g(C)}})}),v=!1;function P(){if(v)return;let h=i.observer?.target?i.observer.target():c();h&&(E.observe(h,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),v=!0)}function _(){i.bypassDefined&&ze(u.blocked),b(),P()}function L(){t.readyState==="loading"?e.addEventListener("DOMContentLoaded",_):_()}let B=e.__unocss_runtime=e.__unocss_runtime={version:u.version,uno:u,async extract(h){A(h)||(h.forEach(m=>x.add(m)),h=""),await d(h)},extractAll:b,inspect(h){M=h},toggleObserver(h){h===void 0?S=!S:S=!!h,!v&&!S&&L()},update:l,presets:e.__unocss_runtime?.presets??{}};i.ready?.(B)!==!1&&(S=!1,L())}function ze(r=new Set){for(let e=0;e<document.styleSheets.length;e++){let t=document.styleSheets[e],n;try{if(n=t.cssRules||t.rules,!n)continue;Array.from(n).flatMap(s=>s.selectorText?.split(/,/g)||[]).forEach(s=>{s&&(s=s.trim(),s.startsWith(".")&&(s=s.slice(1)),r.add(s))})}catch{continue}}return r}ie();})();
|
package/dist/index.js
CHANGED
|
@@ -81,9 +81,11 @@ function init(inlineConfig = {}) {
|
|
|
81
81
|
const el = node;
|
|
82
82
|
if (el.hasAttribute(cloakAttribute))
|
|
83
83
|
el.removeAttribute(cloakAttribute);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
if (isAll) {
|
|
85
|
+
el.querySelectorAll(`[${cloakAttribute}]`).forEach((n) => {
|
|
86
|
+
n.removeAttribute(cloakAttribute);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
87
89
|
}
|
|
88
90
|
function getStyleElement(layer, previousLayer) {
|
|
89
91
|
let styleElement = styleElements.get(layer);
|
|
@@ -239,7 +241,7 @@ function getDefinedCssSelectors(selectors = /* @__PURE__ */ new Set()) {
|
|
|
239
241
|
s = s.slice(1);
|
|
240
242
|
selectors.add(s);
|
|
241
243
|
});
|
|
242
|
-
} catch
|
|
244
|
+
} catch {
|
|
243
245
|
continue;
|
|
244
246
|
}
|
|
245
247
|
}
|
package/full.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var Ga=Object.defineProperty;var qa=(e,t)=>{for(var r in t)Ga(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var rt=Q;function O(e=[]){return Array.isArray(e)?e:[e]}function be(e){return Array.from(new Set(e))}function On(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function A(e){return typeof e=="string"}function xe(e){return A(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function An(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function Ya(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?"":Ya(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function nt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ve(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 nt(n)&&nt(o)&&Object.keys(o).forEach(s=>{nt(n[s])&&nt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Ve(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Ae(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Ae(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Ae(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Ae(n):n;return r}return e}function Vn(e){return A(e[0])}function Pn(e){return A(e[0])}var Xa=/^\[(.+?)~?="(.*)"\]$/;var Za=/[\w\u00A0-\uFFFF%-?]/;function Mn(e){return e.match(Xa)}function Pe(e=""){return Za.test(e)}function _n(e){return typeof e=="function"?{match:e}:e}function Fr(e){return e.length===3}function Ur(e){return e!=null}function Fn(){}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}};var Me=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 st(e){return e instanceof Me}var at={};function Ja(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 Qa(e,t=["-",":"],r=5){let n=Ja(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(f,u,p,d,m)=>{if(!t.includes(p))return f;o=!0,s.add(u+p);let g=m+u.length+p.length+1,x={length:f.length,items:[]};a.set(m,x);for(let $ of[...d.matchAll(/\S+/g)]){let j=g+$.index,b=a.get(j)?.items;b?a.delete(j):b=[{offset:j,length:$[0].length,className:$[0]}];for(let v of b)v.className=v.className==="~"?u:v.className.replace(/^(!?)(.*)/,`$1${u}${p}$2`),x.items.push(v)}return"$".repeat(f.length)}),r-=1;while(o&&r);let l;if(typeof e=="string"){l="";let f=0;for(let[u,p]of a)l+=e.slice(f,u),l+=p.items.map(d=>d.className).join(" "),f=u+p.length;l+=e.slice(f)}else{l=e;for(let[f,u]of a)l.overwrite(f,f+u.length,u.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return l.toString()}}}function Un(e,t=["-",":"],r=5){let n=Qa(e,t,r);return typeof e=="string"?n.expanded:e}var Ln=new Set;function se(e){Ln.has(e)||(console.warn("[unocss]",e),Ln.add(e))}var lt=/[\\:]?[\s'"`;{}]+/g;function el(e){return e.split(lt)}var ct={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return el(e)}};function Wn(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}var _e="default",ft="preflights",tl="shortcuts",rl="imports",Nn={[rl]:-200,[ft]:-100,[tl]:-10,[_e]:0};function Bn(e){return O(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Dn="_uno_resolved";function nl(e){let t=typeof e=="function"?e():e;if(Dn in t)return t;t={...t},Object.defineProperty(t,Dn,{value:!0,enumerable:!1});let r=t.shortcuts?Bn(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}function In(e){let t=nl(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(O).flatMap(In);return[t,...r]}function Lr(e={},t={}){let r=Object.assign({},t,e),n=On((r.presets||[]).flatMap(O).flatMap(In),(h,y)=>h.name===y.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({},Nn,...i.map(h=>h.layers));function l(h){return be(i.flatMap(y=>O(y[h]||[])))}let f=l("extractors"),u=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;u===void 0&&(u=ct),u&&!f.includes(u)&&f.unshift(u),f.sort((h,y)=>(h.order||0)-(y.order||0));let p=l("rules"),d={},m=p.length,g=p.map((h,y)=>{if(Vn(h)){O(h[2]?.prefix||"").forEach(V=>{d[V+h[0]]=[y,h[1],h[2],h]});return}return[y,...h]}).filter(Boolean).reverse(),x=ol(i.map(h=>h.theme)),$=l("extendTheme");for(let h of $)x=h(x)||x;let j={templates:be(i.flatMap(h=>O(h.autocomplete?.templates))),extractors:i.flatMap(h=>O(h.autocomplete?.extractors)).sort((h,y)=>(h.order||0)-(y.order||0)),shorthands:il(i.map(h=>h.autocomplete?.shorthands||{}))},b=l("separators");b.length||(b=[":","-"]);let v={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(_n).sort((h,y)=>(h.order||0)-(y.order||0)),shortcuts:Bn(l("shortcuts")).reverse(),extractors:f,safelist:l("safelist"),separators:b,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.(v);return v}function ol(e){return e.map(t=>t?Ae(t):{}).reduce((t,r)=>Ve(t,r),{})}function il(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Kn="0.61.
|
|
1
|
+
"use strict";(()=>{var Ga=Object.defineProperty;var qa=(e,t)=>{for(var r in t)Ga(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var rt=Q;function O(e=[]){return Array.isArray(e)?e:[e]}function be(e){return Array.from(new Set(e))}function On(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function A(e){return typeof e=="string"}function xe(e){return A(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function An(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function Ya(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?"":Ya(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function nt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ve(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 nt(n)&&nt(o)&&Object.keys(o).forEach(s=>{nt(n[s])&&nt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Ve(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Ae(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Ae(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Ae(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Ae(n):n;return r}return e}function Vn(e){return A(e[0])}function Pn(e){return A(e[0])}var Xa=/^\[(.+?)~?="(.*)"\]$/;var Za=/[\w\u00A0-\uFFFF%-?]/;function Mn(e){return e.match(Xa)}function Pe(e=""){return Za.test(e)}function _n(e){return typeof e=="function"?{match:e}:e}function Fr(e){return e.length===3}function Ur(e){return e!=null}function Fn(){}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}};var Me=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 st(e){return e instanceof Me}var at={};function Ja(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 Qa(e,t=["-",":"],r=5){let n=Ja(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(f,u,p,d,m)=>{if(!t.includes(p))return f;o=!0,s.add(u+p);let g=m+u.length+p.length+1,x={length:f.length,items:[]};a.set(m,x);for(let $ of[...d.matchAll(/\S+/g)]){let j=g+$.index,b=a.get(j)?.items;b?a.delete(j):b=[{offset:j,length:$[0].length,className:$[0]}];for(let v of b)v.className=v.className==="~"?u:v.className.replace(/^(!?)(.*)/,`$1${u}${p}$2`),x.items.push(v)}return"$".repeat(f.length)}),r-=1;while(o&&r);let l;if(typeof e=="string"){l="";let f=0;for(let[u,p]of a)l+=e.slice(f,u),l+=p.items.map(d=>d.className).join(" "),f=u+p.length;l+=e.slice(f)}else{l=e;for(let[f,u]of a)l.overwrite(f,f+u.length,u.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return l.toString()}}}function Un(e,t=["-",":"],r=5){let n=Qa(e,t,r);return typeof e=="string"?n.expanded:e}var Ln=new Set;function se(e){Ln.has(e)||(console.warn("[unocss]",e),Ln.add(e))}var lt=/[\\:]?[\s'"`;{}]+/g;function el(e){return e.split(lt)}var ct={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return el(e)}};function Wn(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}var _e="default",ft="preflights",tl="shortcuts",rl="imports",Nn={[rl]:-200,[ft]:-100,[tl]:-10,[_e]:0};function Bn(e){return O(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Dn="_uno_resolved";function nl(e){let t=typeof e=="function"?e():e;if(Dn in t)return t;t={...t},Object.defineProperty(t,Dn,{value:!0,enumerable:!1});let r=t.shortcuts?Bn(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}function In(e){let t=nl(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(O).flatMap(In);return[t,...r]}function Lr(e={},t={}){let r=Object.assign({},t,e),n=On((r.presets||[]).flatMap(O).flatMap(In),(h,y)=>h.name===y.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({},Nn,...i.map(h=>h.layers));function l(h){return be(i.flatMap(y=>O(y[h]||[])))}let f=l("extractors"),u=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;u===void 0&&(u=ct),u&&!f.includes(u)&&f.unshift(u),f.sort((h,y)=>(h.order||0)-(y.order||0));let p=l("rules"),d={},m=p.length,g=p.map((h,y)=>{if(Vn(h)){O(h[2]?.prefix||"").forEach(V=>{d[V+h[0]]=[y,h[1],h[2],h]});return}return[y,...h]}).filter(Boolean).reverse(),x=ol(i.map(h=>h.theme)),$=l("extendTheme");for(let h of $)x=h(x)||x;let j={templates:be(i.flatMap(h=>O(h.autocomplete?.templates))),extractors:i.flatMap(h=>O(h.autocomplete?.extractors)).sort((h,y)=>(h.order||0)-(y.order||0)),shorthands:il(i.map(h=>h.autocomplete?.shorthands||{}))},b=l("separators");b.length||(b=[":","-"]);let v={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(_n).sort((h,y)=>(h.order||0)-(y.order||0)),shortcuts:Bn(l("shortcuts")).reverse(),extractors:f,safelist:l("safelist"),separators:b,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.(v);return v}function ol(e){return e.map(t=>t?Ae(t):{}).reduce((t,r)=>Ve(t,r),{})}function il(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Kn="0.61.4";var ve={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector"},Wr=class{constructor(t={},r={}){this.userConfig=t;this.defaults=r;this.config=Lr(t,r),this.events.emit("config",this.config)}version=Kn;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=Wn();setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=Lr(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(st(s)&&st(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:ve,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(t,r){if(this.blocked.has(t))return;let n=`${t}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let o=t;for(let f of this.config.preprocess)o=f(t);if(this.isBlocked(o)){this.blocked.add(t),this._cache.set(n,null);return}let i=await this.matchVariants(t,o);if(!i||this.isBlocked(i[1])){this.blocked.add(t),this._cache.set(n,null);return}let s=this.makeContext(t,[r||i[0],i[1],i[2],i[3]]);this.config.details&&(s.variants=[...i[3]]);let a=await this.expandShortcut(s.currentSelector,s),l=a?await this.stringifyShortcuts(s.variantMatch,s,a[0],a[1]):(await this.parseUtil(s.variantMatch,s))?.map(f=>this.stringifyUtil(f,s)).filter(Ur);if(l?.length)return this._cache.set(n,l),l;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,f=this.config.outputToCssLayers,u=A(t)?await this.applyExtractors(t,n,l?new Me:new Set):Array.isArray(t)?new Set(t):t;if(s){let y={generator:this,theme:this.config.theme};this.config.safelist.flatMap(R=>typeof R=="function"?R(y):R).forEach(R=>{u.has(R)||u.add(R)})}let p=a?"":`
|
|
2
2
|
`,d=new Set([_e]),m=l?new Map:new Set,g=new Map,x={},$=Array.from(u).map(async y=>{if(m.has(y))return;let R=await this.parseToken(y);if(R!=null){m instanceof Map?m.set(y,{data:R,count:st(u)?u.getCount(y):-1}):m.add(y);for(let V of R){let F=V[3]||"",H=V[4]?.layer;g.has(F)||g.set(F,[]),g.get(F).push(V),H&&d.add(H)}}});await Promise.all($),await(async()=>{if(!i)return;let y={generator:this,theme:this.config.theme},R=new Set([]);this.config.preflights.forEach(({layer:V=ft})=>{d.add(V),R.add(V)}),x=Object.fromEntries(await Promise.all(Array.from(R).map(async V=>{let H=(await Promise.all(this.config.preflights.filter(re=>(re.layer||ft)===V).map(async re=>await re.getCSS(y)))).filter(Boolean).join(p);return[V,H]})))})();let j=this.config.sortLayers(Array.from(d).sort((y,R)=>(this.config.layers[y]??0)-(this.config.layers[R]??0)||y.localeCompare(R))),b={},v=(y=_e)=>{if(b[y])return b[y];let R=Array.from(g).sort((F,H)=>(this.parentOrders.get(F[0])??0)-(this.parentOrders.get(H[0])??0)||F[0]?.localeCompare(H[0]||"")||0).map(([F,H])=>{let re=H.length,ge=H.filter(k=>(k[4]?.layer||_e)===y).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,,M,,N])=>[[[(k&&ll(k,o))??"",M?.sort??0]],T,!!(N??M?.noMerge)]);if(!ge.length)return;let tt=ge.reverse().map(([k,T,M],N)=>{if(!M&&this.config.mergeSelectors)for(let oe=N+1;oe<re;oe++){let Z=ge[oe];if(Z&&!Z[2]&&(k&&Z[0]||k==null&&Z[0]==null)&&Z[1]===T)return k&&Z[0]&&Z[0].push(...k),null}let ne=k?be(k.sort((oe,Z)=>oe[1]-Z[1]||oe[0]?.localeCompare(Z[0]||"")||0).map(oe=>oe[0]).filter(Boolean)):[];return ne.length?`${ne.join(`,${p}`)}{${T}}`:T}).filter(Boolean).reverse().join(p);if(!F)return tt;let S=F.split(" $$ ");return`${S.join("{")}{${p}${tt}${p}${"}".repeat(S.length)}`}).filter(Boolean).join(p);if(i&&(R=[x[y],R].filter(Boolean).join(p)),f&&R){let F=typeof f=="object"?f.cssLayerName?.(y):void 0;F!==null&&(F||(F=y),R=`@layer ${F}{${p}${R}${p}}`)}let V=a?"":`/* layer: ${y} */${p}`;return b[y]=R?V+R:""},h=(y=j,R)=>y.filter(V=>!R?.includes(V)).map(V=>v(V)||"").filter(Boolean).join(p);return{get css(){return h()},layers:j,matched:m,getLayers:h,getLayer:v}}async matchVariants(t,r){let n=new Set,o=[],i=r||t,s=!0,a={rawSelector:t,theme:this.config.theme,generator:this};for(;s;){s=!1;for(let l of this.config.variants){if(!l.multiPass&&n.has(l))continue;let f=await l.match(i,a);if(f){if(A(f)){if(f===i)continue;f={matcher:f}}i=f.matcher??i,o.unshift(f),n.add(l),s=!0;break}}if(!s)break;if(o.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[t,i,o,n]}applyVariants(t,r=t[4],n=t[1]){let i=r.slice().sort((f,u)=>(f.order||0)-(u.order||0)).reduceRight((f,u)=>p=>{let d=u.body?.(p.entries)||p.entries,m=Array.isArray(u.parent)?u.parent:[u.parent,void 0];return(u.handle??cl)({...p,entries:d,selector:u.selector?.(p.selector,d)||p.selector,parent:m[0]||p.parent,parentOrder:m[1]||p.parentOrder,layer:u.layer||p.layer,sort:u.sort||p.sort},f)},f=>f)({prefix:"",selector:Nr(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 f of this.config.postprocess)f(l);return l}constructCustomCSS(t,r,n){let o=xe(r);if(A(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,s,a]=A(t)?await this.matchVariants(t):t;this.config.details&&(r.rules=r.rules??[]);let l=this.config.rulesStaticMap[s];if(l&&l[1]&&(n||!l[2]?.internal)){this.config.details&&r.rules.push(l[3]);let u=l[0],p=xe(l[1]),d=l[2];return A(p)?[[u,p,d]]:[[u,i,p,d,a]]}r.variantHandlers=a;let{rulesDynamic:f}=this.config;for(let[u,p,d,m]of f){if(m?.internal&&!n)continue;let g=s;if(m?.prefix){let b=O(m.prefix);if(o){let v=O(o);if(!b.some(h=>v.includes(h)))continue}else{let v=b.find(h=>s.startsWith(h));if(v==null)continue;g=s.slice(v.length)}}let x=g.match(p);if(!x)continue;let $=await d(x,r);if(!$)continue;if(this.config.details&&r.rules.push([p,d,m]),typeof $!="string")if(Symbol.asyncIterator in $){let b=[];for await(let v of $)v&&b.push(v);$=b}else Symbol.iterator in $&&!Array.isArray($)&&($=Array.from($).filter(Ur));let j=An($).filter(b=>b.length);if(j.length)return j.map(b=>{if(A(b))return[u,b,m];let v=a;for(let h of b)h[0]===ve.variants?v=[...O(h[1]),...v]:h[0]===ve.parent?v=[{parent:h[1]},...v]:h[0]===ve.selector&&(v=[{selector:h[1]},...v]);return[u,i,b,m,v]})}}stringifyUtil(t,r){if(!t)return;if(Fr(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),f=ye(o);if(!f)return;let{layer:u,sort:p,...d}=t[3]??{},m={...d,layer:s??u,sort:a??p};return[t[0],n,f,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 u=O(a[2].prefix).find(p=>t.startsWith(p));if(u==null)continue;l=t.slice(u.length)}if(Pn(a)){if(a[0]===l){i=i||a[2],s=a[1],o(a);break}}else{let f=l.match(a[0]);if(f&&(s=a[1](f,r)),s){i=i||a[2],o(a);break}}}if(s&&(s=O(s).map(a=>A(a)?Un(a.trim()).split(/\s+/g):a).flat()),!s){let[a,l]=A(t)?await this.matchVariants(t):t;if(a!==l){let f=await this.expandShortcut(l,r,n-1);f&&(s=f[0].map(u=>A(u)?a.replace(l,u):u))}}if(s)return[(await Promise.all(s.map(async a=>(A(a)?(await this.expandShortcut(a,r,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(t,r,n,o={layer:this.config.shortcutsLayer}){let i=new it,s=(await Promise.all(be(n).map(async u=>{let p=A(u)?await this.parseUtil(u,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",xe(u),void 0,[]]];return!p&&this.config.warn&&se(`unmatched utility "${u}" in shortcut "${t[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((u,p)=>u[0]-p[0]),[a,,l]=t,f=[];for(let u of s){if(Fr(u)){f.push([u[0],void 0,u[1],void 0,u[2],r,void 0]);continue}let{selector:p,entries:d,parent:m,sort:g,noMerge:x,layer:$}=this.applyVariants(u,[...u[4],...l],a);i.getFallback($??o.layer,new ot).getFallback(p,m,[[],u[0]])[0].push([d,!!(x??u[3]?.noMerge),g??0])}return f.concat(i.flatMap((u,p)=>u.map(([d,m],g,x)=>{let $=(b,v,h)=>{let y=Math.max(...h.map(V=>V[1])),R=h.map(V=>V[0]);return(b?[R.flat(1)]:R).map(V=>{let F=ye(V);if(F)return[m,g,F,x,{...o,noMerge:v,sort:y,layer:p},r,void 0]})};return[[d.filter(([,b])=>b).map(([b,,v])=>[b,v]),!0],[d.filter(([,b])=>!b).map(([b,,v])=>[b,v]),!1]].map(([b,v])=>[...$(!1,v,b.filter(([h])=>h.some(y=>y[0]===ve.shortcutsNoMerge))),...$(!0,v,b.filter(([h])=>h.every(y=>y[0]!==ve.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):A(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):A(o)?o===t:o.test(t)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};function Gn(e,t){return new Wr(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 Hn=/^\[(.+?)(~?=)"(.*)"\]$/;function Nr(e){return Hn.test(e)?e.replace(Hn,(t,r,n,o)=>`[${rt(r)}${n}"${rt(o)}"]`):`.${rt(e)}`}function cl(e,t){return t(e)}var Dr=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;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=Mn(i);if(!a)return;let l=a[1];if(l.startsWith(t))l=l.slice(t.length);else if(r)return;let f=a[2],[,u="",p=f]=f.match(Dr)||[];if(p==="~"||n&&p==="true"||!p)return`${u}${l}`;if(o==null){let d=s?.config?.separators?.join("|");d?o=new RegExp(`^(.*\\](?:${d}))(\\[[^\\]]+?\\])$`):o=!1}if(o){let[,d,m]=f.match(o)||[];if(m)return`${d}${u}${l}-${m}`}return`${u}${l}-${p}`}}}var fl=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,ul=/(\?|(?!\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 b of n){let[,v,h]=b,y=b.index+v.length;if(r>y&&r<=y+h.length){i=y,o=h;break}}if(!o)return null;let s=o.matchAll(ul),a=0,l,f;for(let b of s){let[v,h,y]=b,R=i+b.index;if(r>R&&r<=R+v.length){a=R,l=h,f=y?.slice(1);break}}if(!l||l==="class"||l==="className"||l===":class")return null;let u=!!e?.prefix&&l.startsWith(e.prefix);if(e?.prefixedOnly&&!u)return null;let p=u?l.slice(e.prefix.length):l;if(f===void 0)return{extracted:p,resolveReplacement(b){let v=u?e.prefix.length:0;return{start:a+v,end:a+l.length,replacement:b}}};let d=a+l.length+2,m=Xn.exec(f),g=0,x;for(;m;){let[b]=m;if(r>d+g&&r<=d+g+m.index){x=f.slice(g,g+m.index);break}g+=m.index+b.length,m=Xn.exec(f.slice(g))}x===void 0&&(x=f.slice(g));let[,$="",j]=x.match(Dr)||[];return{extracted:`${$}${p}-${j}`,transformSuggestions(b){return b.filter(v=>v.startsWith(`${$}${p}-`)).map(v=>$+v.slice($.length+p.length+1))},resolveReplacement(b){return{start:g+d,end:g+d+x.length,replacement:$+b.slice($.length+p.length+1)}}}}}}var pl=["v-bind:",":"],Jn=/[\s'"`;]+/g,Br=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,dl=/(\?|(?!\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(Br)).flatMap(i=>Array.from((i[1]||"").matchAll(dl))).flatMap(([,i,...s])=>{let a=s.filter(Boolean).join("");if(t.includes(i))return[];for(let l of pl)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):Br.test(a)?(Br.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 ml=(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=ml;function hl(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}${hl(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 gl=/\/\/#\s*sourceMappingURL=.*\n?/g;function no(e){return e.includes("sourceMappingURL=")?e.replace(gl,""):e}var bl=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,xl=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,yl=/^\[(?:\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function vl(e){let t=[];for(let o of e.matchAll(xl))o.index!==0&&!/^[\s'"`]/.test(e[o.index-1]??"")||t.push(o[0]);for(let o of e.matchAll(bl))t.push(o[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return e=to(e,r,/-\[[^\]]*\]/g,n),e&&e.split(lt).forEach(o=>{o.includes(n)&&(o=ro(o,r)),Pe(o)&&!yl.test(o)&&t.push(o)}),t}var oo={name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:e}){return vl(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("")}}}];var W={l:["-left"],r:["-right"],t:["-top"],b:["-bottom"],s:["-inline-start"],e:["-inline-end"],x:["-left","-right"],y:["-top","-bottom"],"":[""],bs:["-block-start"],be:["-block-end"],is:["-inline-start"],ie:["-inline-end"],block:["-block-start","-block-end"],inline:["-inline-start","-inline-end"]},Kr={...W,s:["-inset-inline-start"],start:["-inset-inline-start"],e:["-inset-inline-end"],end:["-inset-inline-end"],bs:["-inset-block-start"],be:["-inset-block-end"],is:["-inset-inline-start"],ie:["-inset-inline-end"],block:["-inset-block-start","-inset-block-end"],inline:["-inset-inline-start","-inset-inline-end"]},Hr={l:["-top-left","-bottom-left"],r:["-top-right","-bottom-right"],t:["-top-left","-top-right"],b:["-bottom-left","-bottom-right"],tl:["-top-left"],lt:["-top-left"],tr:["-top-right"],rt:["-top-right"],bl:["-bottom-left"],lb:["-bottom-left"],br:["-bottom-right"],rb:["-bottom-right"],"":[""],bs:["-start-start","-start-end"],be:["-end-start","-end-end"],s:["-end-start","-start-start"],is:["-end-start","-start-start"],e:["-start-end","-end-end"],ie:["-start-end","-end-end"],ss:["-start-start"],"bs-is":["-start-start"],"is-bs":["-start-start"],se:["-start-end"],"bs-ie":["-start-end"],"ie-bs":["-start-end"],es:["-end-start"],"be-is":["-end-start"],"is-be":["-end-start"],ee:["-end-end"],"be-ie":["-end-end"],"ie-be":["-end-end"]},ao={x:["-x"],y:["-y"],z:["-z"],"":["-x","-y"]},lo=["x","y","z"],so=["top","top center","top left","top right","bottom","bottom center","bottom left","bottom right","left","left center","left top","left bottom","right","right center","right top","right bottom","center","center top","center bottom","center left","center right","center center"],L=Object.assign({},...so.map(e=>({[e.replace(/ /,"-")]:e})),...so.map(e=>({[e.replace(/\b(\w)\w+/g,"$1").replace(/ /,"")]:e}))),C=["inherit","initial","revert","revert-layer","unset"],Fe=/^(calc|clamp|min|max)\s*\((.+)\)(.*)/,ut=/^(var)\s*\((.+)\)(.*)/;function we(e,t,r){if(e==="")return;let n=e.length,o=0,i=!1,s=0;for(let a=0;a<n;a++)switch(e[a]){case t:i||(i=!0,s=a),o++;break;case r:if(--o,o<0)return;if(o===0)return[e.slice(s,a+1),e.slice(a+1),e.slice(0,s)];break}}function ae(e,t,r,n){if(e===""||(A(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 ue(e,t,r){r=r??10;let n=[],o=0;for(;e!=="";){if(++o>r)return;let i=ae(e,"(",")",t);if(!i)return;let[s,a]=i;n.push(s),e=a}if(n.length>0)return n}var Gr=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],co=["%alpha","<alpha-value>"],wl=new RegExp(co.map(e=>ie(e)).join("|"));function K(e=""){let t=$l(e);if(t==null||t===!1)return;let{type:r,components:n,alpha:o}=t,i=r.toLowerCase();if(n.length!==0&&!(Gr.includes(i)&&![1,3].includes(n.length)))return{type:i,components:n.map(s=>typeof s=="string"?s.trim():s),alpha:typeof o=="string"?o.trim():o}}function ee(e){let t=e.alpha??1;return typeof t=="string"&&co.includes(t)?1:t}function P(e,t){if(typeof e=="string")return e.replace(wl,`${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}`,Gr.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function $l(e){if(!e)return;let t=kl(e);if(t!=null||(t=Sl(e),t!=null)||(t=Cl(e),t!=null)||(t=Tl(e),t!=null)||(t=El(e),t!=null))return t}function kl(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 Sl(e){let t={rebeccapurple:[102,51,153,1]}[e];if(t!=null)return{type:"rgb",components:t.slice(0,3),alpha:t[3]}}function Cl(e){let t=e.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!t)return;let[,r,n]=t,o=ue(n,",",5);if(o){if([3,4].includes(o.length))return{type:r,components:o.slice(0,3),alpha:o[3]};if(o.length!==1)return!1}}var Rl=new RegExp(`^(${Gr.join("|")})\\((.+)\\)$`,"i");function Tl(e){let t=e.match(Rl);if(!t)return;let[,r,n]=t,o=fo(`${r} ${n}`);if(o){let{alpha:i,components:[s,...a]}=o;return{type:s,components:a,alpha:i}}}function El(e){let t=e.match(/^color\((.+)\)$/);if(!t)return;let r=fo(t[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function fo(e){let t=ue(e," ");if(!t)return;let r=t.length;if(t[r-2]==="/")return{components:t.slice(0,r-2),alpha:t[r-1]};if(t[r-2]!=null&&(t[r-2].endsWith("/")||t[r-1].startsWith("/"))){let i=t.splice(r-2);t.push(i.join(" ")),--r}let n=ue(t[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:t};let o=n.pop();return t[r-1]=n.join("/"),{components:t,alpha:o}}function pt(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}function B(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(s,a)=>a({...s,...t(s)})}},autocomplete:`${e}:`}}function I(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(s,a)=>a({...s,parent:`${s.parent?`${s.parent} $$ `:""}${t}`})}},autocomplete:`${e}:`}}function le(e,t,r){if(t.startsWith(`${e}[`)){let[n,o]=we(t.slice(e.length),"[","]")??[];if(n&&o){for(let i of r)if(o.startsWith(i))return[n,o.slice(i.length),i];return[n,o,""]}}}function D(e,t,r){if(t.startsWith(e)){let n=le(e,t,r);if(n){let[o="",i=n[1]]=D("/",n[1],r)??[];return[n[0],i,o]}for(let o of r.filter(i=>i!=="/")){let i=t.indexOf(o,e.length);if(i!==-1){let s=t.indexOf("/",e.length),a=s===-1||i<=s;return[t.slice(e.length,a?i:s),t.slice(i+o.length),a?"":t.slice(s+1,i)]}}}}var uo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",po=new Uint8Array(64),jl=new Uint8Array(128);for(let e=0;e<uo.length;e++){let t=uo.charCodeAt(e);po[e]=t,jl[t]=e}var qr=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}};function mo(e){let t=new Int32Array(5),r=1024*16,n=r-36,o=new Uint8Array(r),i=o.subarray(0,n),s=0,a="";for(let l=0;l<e.length;l++){let f=e[l];if(l>0&&(s===r&&(a+=qr.decode(o),s=0),o[s++]=59),f.length!==0){t[0]=0;for(let u=0;u<f.length;u++){let p=f[u];s>n&&(a+=qr.decode(i),o.copyWithin(0,n,s),s-=n),u>0&&(o[s++]=44),s=Ue(o,s,t,p,0),p.length!==1&&(s=Ue(o,s,t,p,1),s=Ue(o,s,t,p,2),s=Ue(o,s,t,p,3),p.length!==4&&(s=Ue(o,s,t,p,4)))}}}return a+qr.decode(o.subarray(0,s))}function Ue(e,t,r,n,o){let i=n[o],s=i-r[o];r[o]=i,s=s<0?-s<<1|1:s<<1;do{let a=s&31;s>>>=5,s>0&&(a|=32),e[t++]=po[a]}while(s>0);return t}var dt=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))}},mt=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 zl(){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=zl(),Yr=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=mo(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 Al(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 Vl(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 Pl=Object.prototype.toString;function Ml(e){return Pl.call(e)==="[object Object]"}function ho(e){let t=e.split(`
|
|
4
4
|
`),r=[];for(let n=0,o=0;n<t.length;n++)r.push(o),o+=t[n].length+1;return function(o){let i=0,s=r.length;for(;i<s;){let f=i+s>>1;o<r[f]?s=f:i=f+1}let a=i-1,l=o-r[a];return{line:a,column:l}}}var _l=/\w/,Xr=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 go=Object.defineProperty;var bo=(t,e)=>{for(var r in e)go(t,r,{get:e[r],enumerable:!0})};function Y(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ee(t){let e=t.length,r=-1,n,i="",o=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){i+="\uFFFD";continue}if(n===37){i+="\\%";continue}if(n===44){i+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&o===45){i+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){i+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){i+=t.charAt(r);continue}i+=`\\${t.charAt(r)}`}return i}var Fe=ee;function A(t=[]){return Array.isArray(t)?t:[t]}function ie(t){return Array.from(new Set(t))}function Kt(t,e){return t.reduce((r,n)=>(r.findIndex(o=>e(n,o))===-1&&r.push(n),r),[])}function P(t){return typeof t=="string"}function oe(t){return P(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Ht(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>oe(e)):[t]:[oe(t)]}function xo(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let i=n-1;i>=0;i--)if(t[i][0]===e&&t[i][1]===r)return!1;return!0})}function se(t){return t==null?"":xo(t).map(([e,r])=>r!=null?`${e}:${r};`:void 0).filter(Boolean).join("")}function Ue(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ut(t,e,r=!1){let n=t,i=e;if(Array.isArray(i))return r&&Array.isArray(i)?[...n,...i]:[...i];let o={...n};return Ue(n)&&Ue(i)&&Object.keys(i).forEach(s=>{Ue(n[s])&&Ue(i[s])||Array.isArray(n[s])&&Array.isArray(i[s])?o[s]=ut(n[s],i[s],r):Object.assign(o,{[s]:i[s]})}),o}function ge(t){let e,r,n;if(Array.isArray(t)){for(r=Array(e=t.length);e--;)r[e]=(n=t[e])&&typeof n=="object"?ge(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:ge(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?ge(n):n;return r}return t}function Gt(t){return P(t[0])}function qt(t){return P(t[0])}var yo=/^\[(.+?)~?="(.*)"\]$/;var wo=/[\w\u00A0-\uFFFF%-?]/;function Yt(t){return t.match(yo)}function be(t=""){return wo.test(t)}function Xt(t){return typeof t=="function"?{match:t}:t}function ft(t){return t.length===3}function pt(t){return t!=null}function Zt(){}var _e=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let i=this._map.get(e);return i||(i=new Map,this._map.set(e,i)),i.has(r)||i.set(r,n),i.get(r)}set(e,r,n){let i=this._map.get(e);return i||(i=new Map,this._map.set(e,i)),i.set(r,n),this}has(e,r){return this._map.get(e)?.has(r)}delete(e,r){return this._map.get(e)?.delete(r)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([i,o])=>e(o,r,i)))}},We=class extends Map{getFallback(e,r){let n=this.get(e);return n===void 0?(this.set(e,r),r):n}map(e){let r=[];return this.forEach((n,i)=>{r.push(e(n,i))}),r}flatMap(e){let r=[];return this.forEach((n,i)=>{r.push(...e(n,i))}),r}};var xe=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 De(t){return t instanceof xe}var Ie={};function $o(t=["-",":"]){let e=t.join("|");return Ie[e]||(Ie[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Ie[e].lastIndex=0,Ie[e]}function So(t,e=["-",":"],r=5){let n=$o(e),i,o=t.toString(),s=new Set,a=new Map;do i=!1,o=o.replace(n,(u,p,f,d,h)=>{if(!e.includes(f))return u;i=!0,s.add(p+f);let b=h+p.length+f.length+1,w={length:u.length,items:[]};a.set(h,w);for(let $ of[...d.matchAll(/\S+/g)]){let R=b+$.index,g=a.get(R)?.items;g?a.delete(R):g=[{offset:R,length:$[0].length,className:$[0]}];for(let y of g)y.className=y.className==="~"?p:y.className.replace(/^(!?)(.*)/,`$1${p}${f}$2`),w.items.push(y)}return"$".repeat(u.length)}),r-=1;while(i&&r);let l;if(typeof t=="string"){l="";let u=0;for(let[p,f]of a)l+=t.slice(u,p),l+=f.items.map(d=>d.className).join(" "),u=p+f.length;l+=t.slice(u)}else{l=t;for(let[u,p]of a)l.overwrite(u,u+p.length,p.items.map(f=>f.className).join(" "))}return{prefixes:Array.from(s),hasChanged:i,groupsByOffset:a,get expanded(){return l.toString()}}}function Jt(t,e=["-",":"],r=5){let n=So(t,e,r);return typeof t=="string"?n.expanded:t}var Qt=new Set;function X(t){Qt.has(t)||(console.warn("[unocss]",t),Qt.add(t))}var Ne=/[\\:]?[\s'"`;{}]+/g;function vo(t){return t.split(Ne)}var Be={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return vo(t)}};function er(){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 ye="default",Ke="preflights",Co="shortcuts",ko="imports",tr={[ko]:-200,[Ke]:-100,[Co]:-10,[ye]:0};function nr(t){return A(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var rr="_uno_resolved";function Ro(t){let e=typeof t=="function"?t():t;if(rr in e)return e;e={...e},Object.defineProperty(e,rr,{value:!0,enumerable:!1});let r=e.shortcuts?nr(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=i=>{i[2]||(i[2]={});let o=i[2];o.prefix==null&&e.prefix&&(o.prefix=A(e.prefix)),o.layer==null&&e.layer&&(o.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}function ir(t){let e=Ro(t);if(!e.presets)return[e];let r=(e.presets||[]).flatMap(A).flatMap(ir);return[e,...r]}function dt(t={},e={}){let r=Object.assign({},e,t),n=Kt((r.presets||[]).flatMap(A).flatMap(ir),(m,x)=>m.name===x.name),i=[...n.filter(m=>m.enforce==="pre"),...n.filter(m=>!m.enforce),...n.filter(m=>m.enforce==="post")],o=[...i,r],s=[...o].reverse(),a=Object.assign({},tr,...o.map(m=>m.layers));function l(m){return ie(o.flatMap(x=>A(x[m]||[])))}let u=l("extractors"),p=s.find(m=>m.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=Be),p&&!u.includes(p)&&u.unshift(p),u.sort((m,x)=>(m.order||0)-(x.order||0));let f=l("rules"),d={},h=f.length,b=f.map((m,x)=>{if(Gt(m)){A(m[2]?.prefix||"").forEach(T=>{d[T+m[0]]=[x,m[1],m[2],m]});return}return[x,...m]}).filter(Boolean).reverse(),w=Eo(o.map(m=>m.theme)),$=l("extendTheme");for(let m of $)w=m(w)||w;let R={templates:ie(o.flatMap(m=>A(m.autocomplete?.templates))),extractors:o.flatMap(m=>A(m.autocomplete?.extractors)).sort((m,x)=>(m.order||0)-(x.order||0)),shorthands:To(o.map(m=>m.autocomplete?.shorthands||{}))},g=l("separators");g.length||(g=[":","-"]);let y={mergeSelectors:!0,warn:!0,sortLayers:m=>m,...r,blocklist:l("blocklist"),presets:i,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:w,rulesSize:h,rulesDynamic:b,rulesStaticMap:d,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:R,variants:l("variants").map(Xt).sort((m,x)=>(m.order||0)-(x.order||0)),shortcuts:nr(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:g,details:r.details??r.envMode==="dev"};for(let m of o)m?.configResolved?.(y);return y}function Eo(t){return t.map(e=>e?ge(e):{}).reduce((e,r)=>ut(e,r),{})}function To(t){return t.reduce((e,r)=>{let n={};for(let i in r){let o=r[i];Array.isArray(o)?n[i]=`(${o.join("|")})`:n[i]=o}return{...e,...n}},{})}var or="0.61.
|
|
1
|
+
"use strict";(()=>{var go=Object.defineProperty;var bo=(t,e)=>{for(var r in e)go(t,r,{get:e[r],enumerable:!0})};function Y(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ee(t){let e=t.length,r=-1,n,i="",o=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){i+="\uFFFD";continue}if(n===37){i+="\\%";continue}if(n===44){i+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&o===45){i+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){i+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){i+=t.charAt(r);continue}i+=`\\${t.charAt(r)}`}return i}var Fe=ee;function A(t=[]){return Array.isArray(t)?t:[t]}function ie(t){return Array.from(new Set(t))}function Kt(t,e){return t.reduce((r,n)=>(r.findIndex(o=>e(n,o))===-1&&r.push(n),r),[])}function P(t){return typeof t=="string"}function oe(t){return P(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Ht(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>oe(e)):[t]:[oe(t)]}function xo(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let i=n-1;i>=0;i--)if(t[i][0]===e&&t[i][1]===r)return!1;return!0})}function se(t){return t==null?"":xo(t).map(([e,r])=>r!=null?`${e}:${r};`:void 0).filter(Boolean).join("")}function Ue(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ut(t,e,r=!1){let n=t,i=e;if(Array.isArray(i))return r&&Array.isArray(i)?[...n,...i]:[...i];let o={...n};return Ue(n)&&Ue(i)&&Object.keys(i).forEach(s=>{Ue(n[s])&&Ue(i[s])||Array.isArray(n[s])&&Array.isArray(i[s])?o[s]=ut(n[s],i[s],r):Object.assign(o,{[s]:i[s]})}),o}function ge(t){let e,r,n;if(Array.isArray(t)){for(r=Array(e=t.length);e--;)r[e]=(n=t[e])&&typeof n=="object"?ge(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:ge(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?ge(n):n;return r}return t}function Gt(t){return P(t[0])}function qt(t){return P(t[0])}var yo=/^\[(.+?)~?="(.*)"\]$/;var wo=/[\w\u00A0-\uFFFF%-?]/;function Yt(t){return t.match(yo)}function be(t=""){return wo.test(t)}function Xt(t){return typeof t=="function"?{match:t}:t}function ft(t){return t.length===3}function pt(t){return t!=null}function Zt(){}var _e=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let i=this._map.get(e);return i||(i=new Map,this._map.set(e,i)),i.has(r)||i.set(r,n),i.get(r)}set(e,r,n){let i=this._map.get(e);return i||(i=new Map,this._map.set(e,i)),i.set(r,n),this}has(e,r){return this._map.get(e)?.has(r)}delete(e,r){return this._map.get(e)?.delete(r)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([i,o])=>e(o,r,i)))}},We=class extends Map{getFallback(e,r){let n=this.get(e);return n===void 0?(this.set(e,r),r):n}map(e){let r=[];return this.forEach((n,i)=>{r.push(e(n,i))}),r}flatMap(e){let r=[];return this.forEach((n,i)=>{r.push(...e(n,i))}),r}};var xe=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 De(t){return t instanceof xe}var Ie={};function $o(t=["-",":"]){let e=t.join("|");return Ie[e]||(Ie[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Ie[e].lastIndex=0,Ie[e]}function So(t,e=["-",":"],r=5){let n=$o(e),i,o=t.toString(),s=new Set,a=new Map;do i=!1,o=o.replace(n,(u,p,f,d,h)=>{if(!e.includes(f))return u;i=!0,s.add(p+f);let b=h+p.length+f.length+1,w={length:u.length,items:[]};a.set(h,w);for(let $ of[...d.matchAll(/\S+/g)]){let R=b+$.index,g=a.get(R)?.items;g?a.delete(R):g=[{offset:R,length:$[0].length,className:$[0]}];for(let y of g)y.className=y.className==="~"?p:y.className.replace(/^(!?)(.*)/,`$1${p}${f}$2`),w.items.push(y)}return"$".repeat(u.length)}),r-=1;while(i&&r);let l;if(typeof t=="string"){l="";let u=0;for(let[p,f]of a)l+=t.slice(u,p),l+=f.items.map(d=>d.className).join(" "),u=p+f.length;l+=t.slice(u)}else{l=t;for(let[u,p]of a)l.overwrite(u,u+p.length,p.items.map(f=>f.className).join(" "))}return{prefixes:Array.from(s),hasChanged:i,groupsByOffset:a,get expanded(){return l.toString()}}}function Jt(t,e=["-",":"],r=5){let n=So(t,e,r);return typeof t=="string"?n.expanded:t}var Qt=new Set;function X(t){Qt.has(t)||(console.warn("[unocss]",t),Qt.add(t))}var Ne=/[\\:]?[\s'"`;{}]+/g;function vo(t){return t.split(Ne)}var Be={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return vo(t)}};function er(){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 ye="default",Ke="preflights",Co="shortcuts",ko="imports",tr={[ko]:-200,[Ke]:-100,[Co]:-10,[ye]:0};function nr(t){return A(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var rr="_uno_resolved";function Ro(t){let e=typeof t=="function"?t():t;if(rr in e)return e;e={...e},Object.defineProperty(e,rr,{value:!0,enumerable:!1});let r=e.shortcuts?nr(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=i=>{i[2]||(i[2]={});let o=i[2];o.prefix==null&&e.prefix&&(o.prefix=A(e.prefix)),o.layer==null&&e.layer&&(o.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}function ir(t){let e=Ro(t);if(!e.presets)return[e];let r=(e.presets||[]).flatMap(A).flatMap(ir);return[e,...r]}function dt(t={},e={}){let r=Object.assign({},e,t),n=Kt((r.presets||[]).flatMap(A).flatMap(ir),(m,x)=>m.name===x.name),i=[...n.filter(m=>m.enforce==="pre"),...n.filter(m=>!m.enforce),...n.filter(m=>m.enforce==="post")],o=[...i,r],s=[...o].reverse(),a=Object.assign({},tr,...o.map(m=>m.layers));function l(m){return ie(o.flatMap(x=>A(x[m]||[])))}let u=l("extractors"),p=s.find(m=>m.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=Be),p&&!u.includes(p)&&u.unshift(p),u.sort((m,x)=>(m.order||0)-(x.order||0));let f=l("rules"),d={},h=f.length,b=f.map((m,x)=>{if(Gt(m)){A(m[2]?.prefix||"").forEach(T=>{d[T+m[0]]=[x,m[1],m[2],m]});return}return[x,...m]}).filter(Boolean).reverse(),w=Eo(o.map(m=>m.theme)),$=l("extendTheme");for(let m of $)w=m(w)||w;let R={templates:ie(o.flatMap(m=>A(m.autocomplete?.templates))),extractors:o.flatMap(m=>A(m.autocomplete?.extractors)).sort((m,x)=>(m.order||0)-(x.order||0)),shorthands:To(o.map(m=>m.autocomplete?.shorthands||{}))},g=l("separators");g.length||(g=[":","-"]);let y={mergeSelectors:!0,warn:!0,sortLayers:m=>m,...r,blocklist:l("blocklist"),presets:i,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:w,rulesSize:h,rulesDynamic:b,rulesStaticMap:d,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:R,variants:l("variants").map(Xt).sort((m,x)=>(m.order||0)-(x.order||0)),shortcuts:nr(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:g,details:r.details??r.envMode==="dev"};for(let m of o)m?.configResolved?.(y);return y}function Eo(t){return t.map(e=>e?ge(e):{}).reduce((e,r)=>ut(e,r),{})}function To(t){return t.reduce((e,r)=>{let n={};for(let i in r){let o=r[i];Array.isArray(o)?n[i]=`(${o.join("|")})`:n[i]=o}return{...e,...n}},{})}var or="0.61.4";var ae={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector"},ht=class{constructor(e={},r={}){this.userConfig=e;this.defaults=r;this.config=dt(e,r),this.events.emit("config",this.config)}version=or;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=er();setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=dt(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let i={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let o of this.config.extractors){let s=await o.extract?.(i);if(s)if(De(s)&&De(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:ae,variantHandlers:r[2],constructCSS:(...i)=>this.constructCustomCSS(n,...i),variantMatch:r};return n}async parseToken(e,r){if(this.blocked.has(e))return;let n=`${e}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let i=e;for(let u of this.config.preprocess)i=u(e);if(this.isBlocked(i)){this.blocked.add(e),this._cache.set(n,null);return}let o=await this.matchVariants(e,i);if(!o||this.isBlocked(o[1])){this.blocked.add(e),this._cache.set(n,null);return}let s=this.makeContext(e,[r||o[0],o[1],o[2],o[3]]);this.config.details&&(s.variants=[...o[3]]);let a=await this.expandShortcut(s.currentSelector,s),l=a?await this.stringifyShortcuts(s.variantMatch,s,a[0],a[1]):(await this.parseUtil(s.variantMatch,s))?.map(u=>this.stringifyUtil(u,s)).filter(pt);if(l?.length)return this._cache.set(n,l),l;this._cache.set(n,null)}async generate(e,r={}){let{id:n,scope:i,preflights:o=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,u=this.config.outputToCssLayers,p=P(e)?await this.applyExtractors(e,n,l?new xe:new Set):Array.isArray(e)?new Set(e):e;if(s){let x={generator:this,theme:this.config.theme};this.config.safelist.flatMap(C=>typeof C=="function"?C(x):C).forEach(C=>{p.has(C)||p.add(C)})}let f=a?"":`
|
|
2
2
|
`,d=new Set([ye]),h=l?new Map:new Set,b=new Map,w={},$=Array.from(p).map(async x=>{if(h.has(x))return;let C=await this.parseToken(x);if(C!=null){h instanceof Map?h.set(x,{data:C,count:De(p)?p.getCount(x):-1}):h.add(x);for(let T of C){let V=T[3]||"",W=T[4]?.layer;b.has(V)||b.set(V,[]),b.get(V).push(T),W&&d.add(W)}}});await Promise.all($),await(async()=>{if(!o)return;let x={generator:this,theme:this.config.theme},C=new Set([]);this.config.preflights.forEach(({layer:T=Ke})=>{d.add(T),C.add(T)}),w=Object.fromEntries(await Promise.all(Array.from(C).map(async T=>{let W=(await Promise.all(this.config.preflights.filter(H=>(H.layer||Ke)===T).map(async H=>await H.getCSS(x)))).filter(Boolean).join(f);return[T,W]})))})();let R=this.config.sortLayers(Array.from(d).sort((x,C)=>(this.config.layers[x]??0)-(this.config.layers[C]??0)||x.localeCompare(C))),g={},y=(x=ye)=>{if(g[x])return g[x];let C=Array.from(b).sort((V,W)=>(this.parentOrders.get(V[0])??0)-(this.parentOrders.get(W[0])??0)||V[0]?.localeCompare(W[0]||"")||0).map(([V,W])=>{let H=W.length,ne=W.filter(S=>(S[4]?.layer||ye)===x).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,,j,,M])=>[[[(S&&Oo(S,i))??"",j?.sort??0]],k,!!(M??j?.noMerge)]);if(!ne.length)return;let Le=ne.reverse().map(([S,k,j],M)=>{if(!j&&this.config.mergeSelectors)for(let q=M+1;q<H;q++){let B=ne[q];if(B&&!B[2]&&(S&&B[0]||S==null&&B[0]==null)&&B[1]===k)return S&&B[0]&&B[0].push(...S),null}let G=S?ie(S.sort((q,B)=>q[1]-B[1]||q[0]?.localeCompare(B[0]||"")||0).map(q=>q[0]).filter(Boolean)):[];return G.length?`${G.join(`,${f}`)}{${k}}`:k}).filter(Boolean).reverse().join(f);if(!V)return Le;let v=V.split(" $$ ");return`${v.join("{")}{${f}${Le}${f}${"}".repeat(v.length)}`}).filter(Boolean).join(f);if(o&&(C=[w[x],C].filter(Boolean).join(f)),u&&C){let V=typeof u=="object"?u.cssLayerName?.(x):void 0;V!==null&&(V||(V=x),C=`@layer ${V}{${f}${C}${f}}`)}let T=a?"":`/* layer: ${x} */${f}`;return g[x]=C?T+C:""},m=(x=R,C)=>x.filter(T=>!C?.includes(T)).map(T=>y(T)||"").filter(Boolean).join(f);return{get css(){return m()},layers:R,matched:h,getLayers:m,getLayer:y}}async matchVariants(e,r){let n=new Set,i=[],o=r||e,s=!0,a={rawSelector:e,theme:this.config.theme,generator:this};for(;s;){s=!1;for(let l of this.config.variants){if(!l.multiPass&&n.has(l))continue;let u=await l.match(o,a);if(u){if(P(u)){if(u===o)continue;u={matcher:u}}o=u.matcher??o,i.unshift(u),n.add(l),s=!0;break}}if(!s)break;if(i.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,o,i,n]}applyVariants(e,r=e[4],n=e[1]){let o=r.slice().sort((u,p)=>(u.order||0)-(p.order||0)).reduceRight((u,p)=>f=>{let d=p.body?.(f.entries)||f.entries,h=Array.isArray(p.parent)?p.parent:[p.parent,void 0];return(p.handle??Po)({...f,entries:d,selector:p.selector?.(f.selector,d)||f.selector,parent:h[0]||f.parent,parentOrder:h[1]||f.parentOrder,layer:p.layer||f.layer,sort:p.sort||f.sort},u)},u=>u)({prefix:"",selector:Vo(n),pseudo:"",entries:e[2]}),{parent:s,parentOrder:a}=o;s!=null&&a!=null&&this.parentOrders.set(s,a);let l={selector:[o.prefix,o.selector,o.pseudo].join(""),entries:o.entries,parent:s,layer:o.layer,sort:o.sort,noMerge:o.noMerge};for(let u of this.config.postprocess)u(l);return l}constructCustomCSS(e,r,n){let i=oe(r);if(P(i))return i;let{selector:o,entries:s,parent:a}=this.applyVariants([0,n||e.rawSelector,i,void 0,e.variantHandlers]),l=`${o}{${se(s)}}`;return a?`${a}{${l}}`:l}async parseUtil(e,r,n=!1,i){let[o,s,a]=P(e)?await this.matchVariants(e):e;this.config.details&&(r.rules=r.rules??[]);let l=this.config.rulesStaticMap[s];if(l&&l[1]&&(n||!l[2]?.internal)){this.config.details&&r.rules.push(l[3]);let p=l[0],f=oe(l[1]),d=l[2];return P(f)?[[p,f,d]]:[[p,o,f,d,a]]}r.variantHandlers=a;let{rulesDynamic:u}=this.config;for(let[p,f,d,h]of u){if(h?.internal&&!n)continue;let b=s;if(h?.prefix){let g=A(h.prefix);if(i){let y=A(i);if(!g.some(m=>y.includes(m)))continue}else{let y=g.find(m=>s.startsWith(m));if(y==null)continue;b=s.slice(y.length)}}let w=b.match(f);if(!w)continue;let $=await d(w,r);if(!$)continue;if(this.config.details&&r.rules.push([f,d,h]),typeof $!="string")if(Symbol.asyncIterator in $){let g=[];for await(let y of $)y&&g.push(y);$=g}else Symbol.iterator in $&&!Array.isArray($)&&($=Array.from($).filter(pt));let R=Ht($).filter(g=>g.length);if(R.length)return R.map(g=>{if(P(g))return[p,g,h];let y=a;for(let m of g)m[0]===ae.variants?y=[...A(m[1]),...y]:m[0]===ae.parent?y=[{parent:m[1]},...y]:m[0]===ae.selector&&(y=[{selector:m[1]},...y]);return[p,o,g,h,y]})}}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:i,parent:o,layer:s,sort:a,noMerge:l}=this.applyVariants(e),u=se(i);if(!u)return;let{layer:p,sort:f,...d}=e[3]??{},h={...d,layer:s??p,sort:a??f};return[e[0],n,u,o,h,this.config.details?r:void 0,l]}async expandShortcut(e,r,n=5){if(n===0)return;let i=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:Zt,o,s;for(let a of this.config.shortcuts){let l=e;if(a[2]?.prefix){let p=A(a[2].prefix).find(f=>e.startsWith(f));if(p==null)continue;l=e.slice(p.length)}if(qt(a)){if(a[0]===l){o=o||a[2],s=a[1],i(a);break}}else{let u=l.match(a[0]);if(u&&(s=a[1](u,r)),s){o=o||a[2],i(a);break}}}if(s&&(s=A(s).map(a=>P(a)?Jt(a.trim()).split(/\s+/g):a).flat()),!s){let[a,l]=P(e)?await this.matchVariants(e):e;if(a!==l){let u=await this.expandShortcut(l,r,n-1);u&&(s=u[0].map(p=>P(p)?a.replace(l,p):p))}}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(Boolean),o]}async stringifyShortcuts(e,r,n,i={layer:this.config.shortcutsLayer}){let o=new We,s=(await Promise.all(ie(n).map(async p=>{let f=P(p)?await this.parseUtil(p,r,!0,i.prefix):[[Number.POSITIVE_INFINITY,"{inline}",oe(p),void 0,[]]];return!f&&this.config.warn&&X(`unmatched utility "${p}" in shortcut "${e[1]}"`),f||[]}))).flat(1).filter(Boolean).sort((p,f)=>p[0]-f[0]),[a,,l]=e,u=[];for(let p of s){if(ft(p)){u.push([p[0],void 0,p[1],void 0,p[2],r,void 0]);continue}let{selector:f,entries:d,parent:h,sort:b,noMerge:w,layer:$}=this.applyVariants(p,[...p[4],...l],a);o.getFallback($??i.layer,new _e).getFallback(f,h,[[],p[0]])[0].push([d,!!(w??p[3]?.noMerge),b??0])}return u.concat(o.flatMap((p,f)=>p.map(([d,h],b,w)=>{let $=(g,y,m)=>{let x=Math.max(...m.map(T=>T[1])),C=m.map(T=>T[0]);return(g?[C.flat(1)]:C).map(T=>{let V=se(T);if(V)return[h,b,V,w,{...i,noMerge:y,sort:x,layer:f},r,void 0]})};return[[d.filter(([,g])=>g).map(([g,,y])=>[g,y]),!0],[d.filter(([,g])=>!g).map(([g,,y])=>[g,y]),!1]].map(([g,y])=>[...$(!1,y,g.filter(([m])=>m.some(x=>x[0]===ae.shortcutsNoMerge))),...$(!0,y,g.filter(([m])=>m.every(x=>x[0]!==ae.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 i=Array.isArray(n)?n[0]:n;return typeof i=="function"?i(e):P(i)?i===e:i.test(e)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};function ar(t,e){return new ht(t,e)}var lr=/\s\$\$\s+/g;function Ao(t){return lr.test(t)}function Oo(t,e){return Ao(t)?t.replace(lr,e?` ${e} `:" "):e?`${e} ${t}`:t}var sr=/^\[(.+?)(~?=)"(.*)"\]$/;function Vo(t){return sr.test(t)?t.replace(sr,(e,r,n,i)=>`[${Fe(r)}${n}"${Fe(i)}"]`):`.${Fe(t)}`}function Po(t,e){return e(t)}function zo(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 cr(t,e,r,n){for(let i of Array.from(t.matchAll(r)))if(i!=null){let o=i[0],s=`${n}${zo(o)}`;e.set(s,o),t=t.replace(o,s)}return t}function ur(t,e){for(let[r,n]of e.entries())t=t.replaceAll(r,n);return t}var Mo=/\/\/#\s*sourceMappingURL=.*\n?/g;function fr(t){return t.includes("sourceMappingURL=")?t.replace(Mo,""):t}var Lo=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,Fo=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,Uo=/^\[(?:\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function _o(t){let e=[];for(let i of t.matchAll(Fo))i.index!==0&&!/^[\s'"`]/.test(t[i.index-1]??"")||e.push(i[0]);for(let i of t.matchAll(Lo))e.push(i[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return t=cr(t,r,/-\[[^\]]*\]/g,n),t&&t.split(Ne).forEach(i=>{i.includes(n)&&(i=ur(i,r)),be(i)&&!Uo.test(i)&&e.push(i)}),e}var pr={name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:t}){return _o(fr(t))}};var dr=[{layer:"preflights",getCSS(t){if(t.theme.preflightBase){let e=se(Object.entries(t.theme.preflightBase));return A(t.theme.preflightRoot??["*,::before,::after","::backdrop"]).map(n=>`${n}{${e}}`).join("")}}}];var F={l:["-left"],r:["-right"],t:["-top"],b:["-bottom"],s:["-inline-start"],e:["-inline-end"],x:["-left","-right"],y:["-top","-bottom"],"":[""],bs:["-block-start"],be:["-block-end"],is:["-inline-start"],ie:["-inline-end"],block:["-block-start","-block-end"],inline:["-inline-start","-inline-end"]},mt={...F,s:["-inset-inline-start"],start:["-inset-inline-start"],e:["-inset-inline-end"],end:["-inset-inline-end"],bs:["-inset-block-start"],be:["-inset-block-end"],is:["-inset-inline-start"],ie:["-inset-inline-end"],block:["-inset-block-start","-inset-block-end"],inline:["-inset-inline-start","-inset-inline-end"]},gt={l:["-top-left","-bottom-left"],r:["-top-right","-bottom-right"],t:["-top-left","-top-right"],b:["-bottom-left","-bottom-right"],tl:["-top-left"],lt:["-top-left"],tr:["-top-right"],rt:["-top-right"],bl:["-bottom-left"],lb:["-bottom-left"],br:["-bottom-right"],rb:["-bottom-right"],"":[""],bs:["-start-start","-start-end"],be:["-end-start","-end-end"],s:["-end-start","-start-start"],is:["-end-start","-start-start"],e:["-start-end","-end-end"],ie:["-start-end","-end-end"],ss:["-start-start"],"bs-is":["-start-start"],"is-bs":["-start-start"],se:["-start-end"],"bs-ie":["-start-end"],"ie-bs":["-start-end"],es:["-end-start"],"be-is":["-end-start"],"is-be":["-end-start"],ee:["-end-end"],"be-ie":["-end-end"],"ie-be":["-end-end"]},mr={x:["-x"],y:["-y"],z:["-z"],"":["-x","-y"]},gr=["x","y","z"],hr=["top","top center","top left","top right","bottom","bottom center","bottom left","bottom right","left","left center","left top","left bottom","right","right center","right top","right bottom","center","center top","center bottom","center left","center right","center center"],we=Object.assign({},...hr.map(t=>({[t.replace(/ /,"-")]:t})),...hr.map(t=>({[t.replace(/\b(\w)\w+/g,"$1").replace(/ /,"")]:t}))),E=["inherit","initial","revert","revert-layer","unset"],$e=/^(calc|clamp|min|max)\s*\((.+)\)(.*)/,He=/^(var)\s*\((.+)\)(.*)/;function le(t,e,r){if(t==="")return;let n=t.length,i=0,o=!1,s=0;for(let a=0;a<n;a++)switch(t[a]){case e:o||(o=!0,s=a),i++;break;case r:if(--i,i<0)return;if(i===0)return[t.slice(s,a+1),t.slice(a+1),t.slice(0,s)];break}}function ce(t,e,r,n){if(t===""||(P(n)&&(n=[n]),n.length===0))return;let i=t.length,o=0;for(let s=0;s<i;s++)switch(t[s]){case e:o++;break;case r:if(--o<0)return;break;default:for(let a of n){let l=a.length;if(l&&a===t.slice(s,s+l)&&o===0)return s===0||s===i-l?void 0:[t.slice(0,s),t.slice(s+l)]}}return[t,""]}function ue(t,e,r){r=r??10;let n=[],i=0;for(;t!=="";){if(++i>r)return;let o=ce(t,"(",")",e);if(!o)return;let[s,a]=o;n.push(s),t=a}if(n.length>0)return n}var bt=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],br=["%alpha","<alpha-value>"],Wo=new RegExp(br.map(t=>Y(t)).join("|"));function Z(t=""){let e=Do(t);if(e==null||e===!1)return;let{type:r,components:n,alpha:i}=e,o=r.toLowerCase();if(n.length!==0&&!(bt.includes(o)&&![1,3].includes(n.length)))return{type:o,components:n.map(s=>typeof s=="string"?s.trim():s),alpha:typeof i=="string"?i.trim():i}}function Se(t){let e=t.alpha??1;return typeof e=="string"&&br.includes(e)?1:e}function U(t,e){if(typeof t=="string")return t.replace(Wo,`${e??1}`);let{components:r}=t,{alpha:n,type:i}=t;return n=e??n,i=i.toLowerCase(),["hsla","rgba"].includes(i)?`${i}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,bt.includes(i)?`${i}(${r.join(" ")}${n})`:`color(${i} ${r.join(" ")}${n})`)}function Do(t){if(!t)return;let e=Io(t);if(e!=null||(e=No(t),e!=null)||(e=Bo(t),e!=null)||(e=Ho(t),e!=null)||(e=Go(t),e!=null))return e}function Io(t){let[,e]=t.match(/^#([\da-f]+)$/i)||[];if(e)switch(e.length){case 3:case 4:let r=Array.from(e,i=>Number.parseInt(i,16)).map(i=>i<<4|i);return{type:"rgb",components:r.slice(0,3),alpha:e.length===3?void 0:Math.round(r[3]/255*100)/100};case 6:case 8:let n=Number.parseInt(e,16);return{type:"rgb",components:e.length===6?[n>>16&255,n>>8&255,n&255]:[n>>24&255,n>>16&255,n>>8&255],alpha:e.length===6?void 0:Math.round((n&255)/255*100)/100}}}function No(t){let e={rebeccapurple:[102,51,153,1]}[t];if(e!=null)return{type:"rgb",components:e.slice(0,3),alpha:e[3]}}function Bo(t){let e=t.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!e)return;let[,r,n]=e,i=ue(n,",",5);if(i){if([3,4].includes(i.length))return{type:r,components:i.slice(0,3),alpha:i[3]};if(i.length!==1)return!1}}var Ko=new RegExp(`^(${bt.join("|")})\\((.+)\\)$`,"i");function Ho(t){let e=t.match(Ko);if(!e)return;let[,r,n]=e,i=xr(`${r} ${n}`);if(i){let{alpha:o,components:[s,...a]}=i;return{type:s,components:a,alpha:o}}}function Go(t){let e=t.match(/^color\((.+)\)$/);if(!e)return;let r=xr(e[1]);if(r){let{alpha:n,components:[i,...o]}=r;return{type:i,components:o,alpha:n}}}function xr(t){let e=ue(t," ");if(!e)return;let r=e.length;if(e[r-2]==="/")return{components:e.slice(0,r-2),alpha:e[r-1]};if(e[r-2]!=null&&(e[r-2].endsWith("/")||e[r-1].startsWith("/"))){let o=e.splice(r-2);e.push(o.join(" ")),--r}let n=ue(e[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:e};let i=n.pop();return e[r-1]=n.join("/"),{components:e,alpha:i}}function yr(t){let e=function(n){let i=this.__options?.sequence||[];this.__options.sequence=[];for(let o of i){let s=t[o](n);if(s!=null)return s}};function r(n,i){return n.__options||(n.__options={sequence:[]}),n.__options.sequence.push(i),n}for(let n of Object.keys(t))Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get(){return r(this,n)}});return e}function J(t,e){let r;return{name:t,match(n,i){r||(r=new RegExp(`^${Y(t)}(?:${i.generator.config.separators.join("|")})`));let o=n.match(r);if(o)return{matcher:n.slice(o[0].length),handle:(s,a)=>a({...s,...e(s)})}},autocomplete:`${t}:`}}function ve(t,e){let r;return{name:t,match(n,i){r||(r=new RegExp(`^${Y(t)}(?:${i.generator.config.separators.join("|")})`));let o=n.match(r);if(o)return{matcher:n.slice(o[0].length),handle:(s,a)=>a({...s,parent:`${s.parent?`${s.parent} $$ `:""}${e}`})}},autocomplete:`${t}:`}}function Q(t,e,r){if(e.startsWith(`${t}[`)){let[n,i]=le(e.slice(t.length),"[","]")??[];if(n&&i){for(let o of r)if(i.startsWith(o))return[n,i.slice(o.length),o];return[n,i,""]}}}function L(t,e,r){if(e.startsWith(t)){let n=Q(t,e,r);if(n){let[i="",o=n[1]]=L("/",n[1],r)??[];return[n[0],o,i]}for(let i of r.filter(o=>o!=="/")){let o=e.indexOf(i,t.length);if(o!==-1){let s=e.indexOf("/",t.length),a=s===-1||o<=s;return[e.slice(t.length,a?o:s),e.slice(o+i.length),a?"":e.slice(s+1,o)]}}}}var wr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$r=new Uint8Array(64),qo=new Uint8Array(128);for(let t=0;t<wr.length;t++){let e=wr.charCodeAt(t);$r[t]=e,qo[e]=t}var xt=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}};function Sr(t){let e=new Int32Array(5),r=1024*16,n=r-36,i=new Uint8Array(r),o=i.subarray(0,n),s=0,a="";for(let l=0;l<t.length;l++){let u=t[l];if(l>0&&(s===r&&(a+=xt.decode(i),s=0),i[s++]=59),u.length!==0){e[0]=0;for(let p=0;p<u.length;p++){let f=u[p];s>n&&(a+=xt.decode(o),i.copyWithin(0,n,s),s-=n),p>0&&(i[s++]=44),s=Ce(i,s,e,f,0),f.length!==1&&(s=Ce(i,s,e,f,1),s=Ce(i,s,e,f,2),s=Ce(i,s,e,f,3),f.length!==4&&(s=Ce(i,s,e,f,4)))}}}return a+xt.decode(i.subarray(0,s))}function Ce(t,e,r,n,i){let o=n[i],s=o-r[i];r[i]=o,s=s<0?-s<<1|1:s<<1;do{let a=s&31;s>>>=5,s>0&&(a|=32),t[e++]=$r[a]}while(s>0);return e}var Ge=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))}},qe=class t{constructor(e,r,n){this.start=e,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){let e=new t(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let r=this;for(;r;)e(r),r=r.next}eachPrevious(e){let r=this;for(;r;)e(r),r=r.previous}edit(e,r,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){let r=e-this.start,n=this.original.slice(0,r),i=this.original.slice(r);this.original=n;let o=new t(e,this.end,i);return o.outro=this.outro,this.outro="",this.end=e,this.edited?(o.edit("",!1),this.content=""):this.content=n,o.next=this.next,o.next&&(o.next.previous=o),o.previous=this,this.next=o,o}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let r=this.content.replace(e,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let r=this.content.replace(e,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}};function Yo(){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 Xo=Yo(),yt=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Sr(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,"+Xo(this.toString())}};function Zo(t){let e=t.split(`
|
|
3
3
|
`),r=e.filter(o=>/^\t+/.test(o)),n=e.filter(o=>/^ {2,}/.test(o));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let i=n.reduce((o,s)=>{let a=/^ +/.exec(s)[0].length;return Math.min(a,o)},1/0);return new Array(i+1).join(" ")}function Jo(t,e){let r=t.split(/[/\\]/),n=e.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let i=r.length;for(;i--;)r[i]=".."}return r.concat(n).join("/")}var Qo=Object.prototype.toString;function es(t){return Qo.call(t)==="[object Object]"}function vr(t){let e=t.split(`
|
|
4
4
|
`),r=[];for(let n=0,i=0;n<e.length;n++)r.push(i),i+=e[n].length+1;return function(i){let o=0,s=r.length;for(;o<s;){let u=o+s>>1;i<r[u]?s=u:o=u+1}let a=o-1,l=i-r[a];return{line:a,column:l}}}var ts=/\w/,wt=class{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,r,n,i){if(r.length){let o=r.length-1,s=r.indexOf(`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.61.
|
|
4
|
+
"version": "0.61.4",
|
|
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/core": "0.61.
|
|
39
|
-
"@unocss/preset-
|
|
40
|
-
"@unocss/preset-
|
|
38
|
+
"@unocss/core": "0.61.4",
|
|
39
|
+
"@unocss/preset-uno": "0.61.4",
|
|
40
|
+
"@unocss/preset-attributify": "0.61.4"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "pnpm run build:node && pnpm run build:cdn && pnpm run build:presets",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(()=>{function
|
|
2
|
-
`)},layer:
|
|
1
|
+
"use strict";(()=>{function b(t=[]){return Array.isArray(t)?t:[t]}var O="default",C="preflights",I="shortcuts",h="imports",Y={[h]:-200,[C]:-100,[I]:-10,[O]:0};function E(t,n){return{name:t,getImportUrl(c){let m=c.map(s=>{let{name:r,weights:a,italic:p}=s,u=r.toLowerCase().replace(/\s/g,"-");if(!a?.length)return`${u}${p?":i":""}`;let d=a.map(l=>l.toString());return!d.some(l=>l.endsWith("i"))&&p&&(d=d.map(l=>l+="i")),`${u}:${d.join(",")}`});return`${n}/css?family=${m.join("|")}&display=swap`}}}var W=E("bunny","https://fonts.bunny.net");function L(t,n){return{name:t,getImportUrl(c){let m=r=>{let a=r.map(u=>u[0]),p=r.map(u=>u[1]);return`${a.join(";")};${p.join(";")}`},s=c.map(r=>{let a=r.name.replace(/\s+/g,"+");return r.weights?.length&&(a+=r.italic?`:ital,wght@${m(r.weights.map(p=>[`0,${p}`,`1,${p}`]))}`:`:wght@${r.weights.join(";")}`),`family=${a}`}).join("&");return`${n}/css2?${s}&display=swap`}}}var x=L("google","https://fonts.googleapis.com");var $=M("fontshare","https://api.fontshare.com");function M(t,n){return{name:t,getImportUrl(c){let m=c.map(s=>{let r=s.name.replace(/\s+/g,"-").toLocaleLowerCase();return s.weights?.length?r+=`@${s.weights.flatMap(a=>s.italic?Number(a)+1:a).sort().join()}`:r+=`@${s.italic?2:1}`,`f[]=${r}`}).join("&");return`${n}/v2/css?${m}&display=swap`}}}var S={name:"none",getPreflight(){return""},getFontName(t){return t.name}};var U={google:x,bunny:W,fontshare:$,none:S};function j(t){return typeof t=="string"?U[t]:t}function B(t,n){if(typeof t!="string")return t.provider=j(t.provider||n),t.weights&&(t.weights=[...new Set(t.weights.sort((s,r)=>s.toString().localeCompare(r.toString(),"en",{numeric:!0})))]),t;let[c,m=""]=t.split(":");return{name:c,weights:[...new Set(m.split(/[,;]\s*/).filter(Boolean).sort((s,r)=>s.localeCompare(r,"en",{numeric:!0})))],provider:j(n)}}function _(t){return(n={})=>{let{provider:c="google",extendTheme:m=!0,inlineImports:s=!0,themeKey:r="fontFamily",customFetch:a=t,timeouts:p={}}=n,u=b(n.processors||[]),d=Object.fromEntries(Object.entries(n.fonts||{}).map(([e,i])=>[e,b(i).map(o=>B(o,c))])),y=Object.values(d).flatMap(e=>e),l={};async function R(e){if(p===!1)return a(e);let{warning:i=1e3,failure:o=2e3}=p,g=!1,f=setTimeout(()=>{console.warn(`[unocss] Fetching web fonts: ${e}`),g=!0},i);return await Promise.race([a(e),new Promise((P,v)=>{setTimeout(()=>v(new Error("[unocss] Fetch web fonts timeout.")),o)})]).then(P=>(g&&console.info("[unocss] Web fonts fetched."),P)).finally(()=>clearTimeout(f))}async function A(e){return s?(l[e]||(l[e]=R(e).catch(i=>{if(console.error(`[unocss] Failed to fetch web fonts: ${e}`),console.error(i),typeof process<"u"&&process.env.CI)throw i})),await l[e]):`@import url('${e}');`}let w=Array.from(new Set(y.map(e=>e.provider)));async function F(e,i){let o=[];for(let f of i){let P=e.filter(v=>v.provider.name===f.name);if(f.getImportUrl){let v=f.getImportUrl(P);v&&o.push(await A(v))}o.push(f.getPreflight?.(P))}return o.filter(Boolean).join(`
|
|
2
|
+
`)}let T={name:"@unocss/preset-web-fonts",preflights:[{async getCSS(){let e;for(let i of u){let o=await i.getCSS?.(y,w,F);if(o){e=o;break}}e||(e=await F(y,w));for(let i of u)e=await i.transformCSS?.(e)||e;return e},layer:s?void 0:h}]};return m&&(T.extendTheme=e=>{e[r]||(e[r]={});let i=Object.fromEntries(Object.entries(d).map(([o,g])=>[o,g.map(f=>f.provider.getFontName?.(f)??`"${f.name}"`)]));for(let o of Object.keys(i))typeof e[r][o]=="string"?e[r][o]=i[o].map(g=>`${g},`).join("")+e[r][o]:e[r][o]=i[o].join(",")}),T}}window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},(()=>{let t=_(n=>fetch(n).then(c=>c.json()));return{presetWebFonts:n=>t(n)}})());})();
|
package/uno.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var Ea=Object.defineProperty;var ja=(e,t)=>{for(var r in t)Ea(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var et=Q;function O(e=[]){return Array.isArray(e)?e:[e]}function be(e){return Array.from(new Set(e))}function Sn(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function V(e){return typeof e=="string"}function xe(e){return V(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function Cn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function za(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?"":za(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function tt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Mr(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return tt(n)&&tt(o)&&Object.keys(o).forEach(s=>{tt(n[s])&&tt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Mr(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Ve(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Ve(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Ve(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Ve(n):n;return r}return e}function Rn(e){return V(e[0])}function Tn(e){return V(e[0])}var Oa=/[\w\u00A0-\uFFFF%-?]/;function En(e=""){return Oa.test(e)}function jn(e){return typeof e=="function"?{match:e}:e}function Pr(e){return e.length===3}function _r(e){return e!=null}function zn(){}var rt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},nt=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};var Ae=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 Ae}var it={};function Va(e=["-",":"]){let t=e.join("|");return it[t]||(it[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),it[t].lastIndex=0,it[t]}function Aa(e,t=["-",":"],r=5){let n=Va(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 k of[...d.matchAll(/\S+/g)]){let z=g+k.index,b=a.get(z)?.items;b?a.delete(z):b=[{offset:z,length:k[0].length,className:k[0]}];for(let $ of b)$.className=$.className==="~"?f:$.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),x.items.push($)}return"$".repeat(u.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let u=0;for(let[f,p]of a)c+=e.slice(u,f),c+=p.items.map(d=>d.className).join(" "),u=f+p.length;c+=e.slice(u)}else{c=e;for(let[u,f]of a)c.overwrite(u,u+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return c.toString()}}}function On(e,t=["-",":"],r=5){let n=Aa(e,t,r);return typeof e=="string"?n.expanded:e}var Vn=new Set;function se(e){Vn.has(e)||(console.warn("[unocss]",e),Vn.add(e))}var st=/[\\:]?[\s'"`;{}]+/g;function Ma(e){return e.split(st)}var at={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ma(e)}};function An(){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 Me="default",ct="preflights",Pa="shortcuts",_a="imports",Mn={[_a]:-200,[ct]:-100,[Pa]:-10,[Me]:0};function _n(e){return O(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Pn="_uno_resolved";function Fa(e){let t=typeof e=="function"?e():e;if(Pn in t)return t;t={...t},Object.defineProperty(t,Pn,{value:!0,enumerable:!1});let r=t.shortcuts?_n(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}function Fn(e){let t=Fa(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(O).flatMap(Fn);return[t,...r]}function Fr(e={},t={}){let r=Object.assign({},t,e),n=Sn((r.presets||[]).flatMap(O).flatMap(Fn),(h,y)=>h.name===y.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Mn,...i.map(h=>h.layers));function c(h){return be(i.flatMap(y=>O(y[h]||[])))}let u=c("extractors"),f=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=at),f&&!u.includes(f)&&u.unshift(f),u.sort((h,y)=>(h.order||0)-(y.order||0));let p=c("rules"),d={},m=p.length,g=p.map((h,y)=>{if(Rn(h)){O(h[2]?.prefix||"").forEach(A=>{d[A+h[0]]=[y,h[1],h[2],h]});return}return[y,...h]}).filter(Boolean).reverse(),x=La(i.map(h=>h.theme)),k=c("extendTheme");for(let h of k)x=h(x)||x;let z={templates:be(i.flatMap(h=>O(h.autocomplete?.templates))),extractors:i.flatMap(h=>O(h.autocomplete?.extractors)).sort((h,y)=>(h.order||0)-(y.order||0)),shorthands:Ua(i.map(h=>h.autocomplete?.shorthands||{}))},b=c("separators");b.length||(b=[":","-"]);let $={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:x,rulesSize:m,rulesDynamic:g,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:z,variants:c("variants").map(jn).sort((h,y)=>(h.order||0)-(y.order||0)),shortcuts:_n(c("shortcuts")).reverse(),extractors:u,safelist:c("safelist"),separators:b,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.($);return $}function La(e){return e.map(t=>t?Ve(t):{}).reduce((t,r)=>Mr(t,r),{})}function Ua(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Ln="0.61.
|
|
1
|
+
"use strict";(()=>{var Ea=Object.defineProperty;var ja=(e,t)=>{for(var r in t)Ea(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var et=Q;function O(e=[]){return Array.isArray(e)?e:[e]}function be(e){return Array.from(new Set(e))}function Sn(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function V(e){return typeof e=="string"}function xe(e){return V(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function Cn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function za(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?"":za(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function tt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Mr(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return tt(n)&&tt(o)&&Object.keys(o).forEach(s=>{tt(n[s])&&tt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Mr(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Ve(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Ve(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Ve(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Ve(n):n;return r}return e}function Rn(e){return V(e[0])}function Tn(e){return V(e[0])}var Oa=/[\w\u00A0-\uFFFF%-?]/;function En(e=""){return Oa.test(e)}function jn(e){return typeof e=="function"?{match:e}:e}function Pr(e){return e.length===3}function _r(e){return e!=null}function zn(){}var rt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},nt=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};var Ae=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 Ae}var it={};function Va(e=["-",":"]){let t=e.join("|");return it[t]||(it[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),it[t].lastIndex=0,it[t]}function Aa(e,t=["-",":"],r=5){let n=Va(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 k of[...d.matchAll(/\S+/g)]){let z=g+k.index,b=a.get(z)?.items;b?a.delete(z):b=[{offset:z,length:k[0].length,className:k[0]}];for(let $ of b)$.className=$.className==="~"?f:$.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),x.items.push($)}return"$".repeat(u.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let u=0;for(let[f,p]of a)c+=e.slice(u,f),c+=p.items.map(d=>d.className).join(" "),u=f+p.length;c+=e.slice(u)}else{c=e;for(let[u,f]of a)c.overwrite(u,u+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return c.toString()}}}function On(e,t=["-",":"],r=5){let n=Aa(e,t,r);return typeof e=="string"?n.expanded:e}var Vn=new Set;function se(e){Vn.has(e)||(console.warn("[unocss]",e),Vn.add(e))}var st=/[\\:]?[\s'"`;{}]+/g;function Ma(e){return e.split(st)}var at={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ma(e)}};function An(){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 Me="default",ct="preflights",Pa="shortcuts",_a="imports",Mn={[_a]:-200,[ct]:-100,[Pa]:-10,[Me]:0};function _n(e){return O(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Pn="_uno_resolved";function Fa(e){let t=typeof e=="function"?e():e;if(Pn in t)return t;t={...t},Object.defineProperty(t,Pn,{value:!0,enumerable:!1});let r=t.shortcuts?_n(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}function Fn(e){let t=Fa(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(O).flatMap(Fn);return[t,...r]}function Fr(e={},t={}){let r=Object.assign({},t,e),n=Sn((r.presets||[]).flatMap(O).flatMap(Fn),(h,y)=>h.name===y.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Mn,...i.map(h=>h.layers));function c(h){return be(i.flatMap(y=>O(y[h]||[])))}let u=c("extractors"),f=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=at),f&&!u.includes(f)&&u.unshift(f),u.sort((h,y)=>(h.order||0)-(y.order||0));let p=c("rules"),d={},m=p.length,g=p.map((h,y)=>{if(Rn(h)){O(h[2]?.prefix||"").forEach(A=>{d[A+h[0]]=[y,h[1],h[2],h]});return}return[y,...h]}).filter(Boolean).reverse(),x=La(i.map(h=>h.theme)),k=c("extendTheme");for(let h of k)x=h(x)||x;let z={templates:be(i.flatMap(h=>O(h.autocomplete?.templates))),extractors:i.flatMap(h=>O(h.autocomplete?.extractors)).sort((h,y)=>(h.order||0)-(y.order||0)),shorthands:Ua(i.map(h=>h.autocomplete?.shorthands||{}))},b=c("separators");b.length||(b=[":","-"]);let $={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:x,rulesSize:m,rulesDynamic:g,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:z,variants:c("variants").map(jn).sort((h,y)=>(h.order||0)-(y.order||0)),shortcuts:_n(c("shortcuts")).reverse(),extractors:u,safelist:c("safelist"),separators:b,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.($);return $}function La(e){return e.map(t=>t?Ve(t):{}).reduce((t,r)=>Mr(t,r),{})}function Ua(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Ln="0.61.4";var ve={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector"},Lr=class{constructor(t={},r={}){this.userConfig=t;this.defaults=r;this.config=Fr(t,r),this.events.emit("config",this.config)}version=Ln;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=An();setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=Fr(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let o={original:t,code:t,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(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:ve,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 u of this.config.preprocess)o=u(t);if(this.isBlocked(o)){this.blocked.add(t),this._cache.set(n,null);return}let i=await this.matchVariants(t,o);if(!i||this.isBlocked(i[1])){this.blocked.add(t),this._cache.set(n,null);return}let s=this.makeContext(t,[r||i[0],i[1],i[2],i[3]]);this.config.details&&(s.variants=[...i[3]]);let a=await this.expandShortcut(s.currentSelector,s),c=a?await this.stringifyShortcuts(s.variantMatch,s,a[0],a[1]):(await this.parseUtil(s.variantMatch,s))?.map(u=>this.stringifyUtil(u,s)).filter(_r);if(c?.length)return this._cache.set(n,c),c;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:c=!1}=r,u=this.config.outputToCssLayers,f=V(t)?await this.applyExtractors(t,n,c?new Ae:new Set):Array.isArray(t)?new Set(t):t;if(s){let y={generator:this,theme:this.config.theme};this.config.safelist.flatMap(R=>typeof R=="function"?R(y):R).forEach(R=>{f.has(R)||f.add(R)})}let p=a?"":`
|
|
2
2
|
`,d=new Set([Me]),m=c?new Map:new Set,g=new Map,x={},k=Array.from(f).map(async y=>{if(m.has(y))return;let R=await this.parseToken(y);if(R!=null){m instanceof Map?m.set(y,{data:R,count:ot(f)?f.getCount(y):-1}):m.add(y);for(let A of R){let F=A[3]||"",H=A[4]?.layer;g.has(F)||g.set(F,[]),g.get(F).push(A),H&&d.add(H)}}});await Promise.all(k),await(async()=>{if(!i)return;let y={generator:this,theme:this.config.theme},R=new Set([]);this.config.preflights.forEach(({layer:A=ct})=>{d.add(A),R.add(A)}),x=Object.fromEntries(await Promise.all(Array.from(R).map(async A=>{let H=(await Promise.all(this.config.preflights.filter(re=>(re.layer||ct)===A).map(async re=>await re.getCSS(y)))).filter(Boolean).join(p);return[A,H]})))})();let z=this.config.sortLayers(Array.from(d).sort((y,R)=>(this.config.layers[y]??0)-(this.config.layers[R]??0)||y.localeCompare(R))),b={},$=(y=Me)=>{if(b[y])return b[y];let R=Array.from(g).sort((F,H)=>(this.parentOrders.get(F[0])??0)-(this.parentOrders.get(H[0])??0)||F[0]?.localeCompare(H[0]||"")||0).map(([F,H])=>{let re=H.length,ge=H.filter(w=>(w[4]?.layer||Me)===y).sort((w,T)=>w[0]-T[0]||(w[4]?.sort||0)-(T[4]?.sort||0)||w[5]?.currentSelector?.localeCompare(T[5]?.currentSelector??"")||w[1]?.localeCompare(T[1]||"")||w[2]?.localeCompare(T[2]||"")||0).map(([,w,T,,P,,N])=>[[[(w&&Da(w,o))??"",P?.sort??0]],T,!!(N??P?.noMerge)]);if(!ge.length)return;let Qe=ge.reverse().map(([w,T,P],N)=>{if(!P&&this.config.mergeSelectors)for(let oe=N+1;oe<re;oe++){let Z=ge[oe];if(Z&&!Z[2]&&(w&&Z[0]||w==null&&Z[0]==null)&&Z[1]===T)return w&&Z[0]&&Z[0].push(...w),null}let ne=w?be(w.sort((oe,Z)=>oe[1]-Z[1]||oe[0]?.localeCompare(Z[0]||"")||0).map(oe=>oe[0]).filter(Boolean)):[];return ne.length?`${ne.join(`,${p}`)}{${T}}`:T}).filter(Boolean).reverse().join(p);if(!F)return Qe;let S=F.split(" $$ ");return`${S.join("{")}{${p}${Qe}${p}${"}".repeat(S.length)}`}).filter(Boolean).join(p);if(i&&(R=[x[y],R].filter(Boolean).join(p)),u&&R){let F=typeof u=="object"?u.cssLayerName?.(y):void 0;F!==null&&(F||(F=y),R=`@layer ${F}{${p}${R}${p}}`)}let A=a?"":`/* layer: ${y} */${p}`;return b[y]=R?A+R:""},h=(y=z,R)=>y.filter(A=>!R?.includes(A)).map(A=>$(A)||"").filter(Boolean).join(p);return{get css(){return h()},layers:z,matched:m,getLayers:h,getLayer:$}}async matchVariants(t,r){let n=new Set,o=[],i=r||t,s=!0,a={rawSelector:t,theme:this.config.theme,generator:this};for(;s;){s=!1;for(let c of this.config.variants){if(!c.multiPass&&n.has(c))continue;let u=await c.match(i,a);if(u){if(V(u)){if(u===i)continue;u={matcher:u}}i=u.matcher??i,o.unshift(u),n.add(c),s=!0;break}}if(!s)break;if(o.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[t,i,o,n]}applyVariants(t,r=t[4],n=t[1]){let i=r.slice().sort((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??Ia)({...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:Ba(n),pseudo:"",entries:t[2]}),{parent:s,parentOrder:a}=i;s!=null&&a!=null&&this.parentOrders.set(s,a);let c={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:s,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let u of this.config.postprocess)u(c);return c}constructCustomCSS(t,r,n){let o=xe(r);if(V(o))return o;let{selector:i,entries:s,parent:a}=this.applyVariants([0,n||t.rawSelector,o,void 0,t.variantHandlers]),c=`${i}{${ye(s)}}`;return a?`${a}{${c}}`:c}async parseUtil(t,r,n=!1,o){let[i,s,a]=V(t)?await this.matchVariants(t):t;this.config.details&&(r.rules=r.rules??[]);let c=this.config.rulesStaticMap[s];if(c&&c[1]&&(n||!c[2]?.internal)){this.config.details&&r.rules.push(c[3]);let f=c[0],p=xe(c[1]),d=c[2];return V(p)?[[f,p,d]]:[[f,i,p,d,a]]}r.variantHandlers=a;let{rulesDynamic:u}=this.config;for(let[f,p,d,m]of u){if(m?.internal&&!n)continue;let g=s;if(m?.prefix){let b=O(m.prefix);if(o){let $=O(o);if(!b.some(h=>$.includes(h)))continue}else{let $=b.find(h=>s.startsWith(h));if($==null)continue;g=s.slice($.length)}}let x=g.match(p);if(!x)continue;let k=await d(x,r);if(!k)continue;if(this.config.details&&r.rules.push([p,d,m]),typeof k!="string")if(Symbol.asyncIterator in k){let b=[];for await(let $ of k)$&&b.push($);k=b}else Symbol.iterator in k&&!Array.isArray(k)&&(k=Array.from(k).filter(_r));let z=Cn(k).filter(b=>b.length);if(z.length)return z.map(b=>{if(V(b))return[f,b,m];let $=a;for(let h of b)h[0]===ve.variants?$=[...O(h[1]),...$]:h[0]===ve.parent?$=[{parent:h[1]},...$]:h[0]===ve.selector&&($=[{selector:h[1]},...$]);return[f,i,b,m,$]})}}stringifyUtil(t,r){if(!t)return;if(Pr(t))return[t[0],void 0,t[1],void 0,t[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:s,sort:a,noMerge:c}=this.applyVariants(t),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,c]}async expandShortcut(t,r,n=5){if(n===0)return;let o=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:zn,i,s;for(let a of this.config.shortcuts){let c=t;if(a[2]?.prefix){let f=O(a[2].prefix).find(p=>t.startsWith(p));if(f==null)continue;c=t.slice(f.length)}if(Tn(a)){if(a[0]===c){i=i||a[2],s=a[1],o(a);break}}else{let u=c.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=>V(a)?On(a.trim()).split(/\s+/g):a).flat()),!s){let[a,c]=V(t)?await this.matchVariants(t):t;if(a!==c){let u=await this.expandShortcut(c,r,n-1);u&&(s=u[0].map(f=>V(f)?a.replace(c,f):f))}}if(s)return[(await Promise.all(s.map(async a=>(V(a)?(await this.expandShortcut(a,r,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(t,r,n,o={layer:this.config.shortcutsLayer}){let i=new nt,s=(await Promise.all(be(n).map(async f=>{let p=V(f)?await this.parseUtil(f,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",xe(f),void 0,[]]];return!p&&this.config.warn&&se(`unmatched utility "${f}" in shortcut "${t[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((f,p)=>f[0]-p[0]),[a,,c]=t,u=[];for(let f of s){if(Pr(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:k}=this.applyVariants(f,[...f[4],...c],a);i.getFallback(k??o.layer,new rt).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 k=(b,$,h)=>{let y=Math.max(...h.map(A=>A[1])),R=h.map(A=>A[0]);return(b?[R.flat(1)]:R).map(A=>{let F=ye(A);if(F)return[m,g,F,x,{...o,noMerge:$,sort:y,layer:p},r,void 0]})};return[[d.filter(([,b])=>b).map(([b,,$])=>[b,$]),!0],[d.filter(([,b])=>!b).map(([b,,$])=>[b,$]),!1]].map(([b,$])=>[...k(!1,$,b.filter(([h])=>h.some(y=>y[0]===ve.shortcutsNoMerge))),...k(!0,$,b.filter(([h])=>h.every(y=>y[0]!==ve.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):V(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):V(o)?o===t:o.test(t)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};function Wn(e,t){return new Lr(e,t)}var Nn=/\s\$\$\s+/g;function Na(e){return Nn.test(e)}function Da(e,t){return Na(e)?e.replace(Nn,t?` ${t} `:" "):t?`${t} ${e}`:e}var Un=/^\[(.+?)(~?=)"(.*)"\]$/;function Ba(e){return Un.test(e)?e.replace(Un,(t,r,n,o)=>`[${et(r)}${n}"${et(o)}"]`):`.${et(e)}`}function Ia(e,t){return t(e)}function Ka(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 Dn(e,t,r,n){for(let o of Array.from(e.matchAll(r)))if(o!=null){let i=o[0],s=`${n}${Ka(i)}`;t.set(s,i),e=e.replace(i,s)}return e}function Bn(e,t){for(let[r,n]of t.entries())e=e.replaceAll(r,n);return e}var Ha=/\/\/#\s*sourceMappingURL=.*\n?/g;function In(e){return e.includes("sourceMappingURL=")?e.replace(Ha,""):e}var Ga=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,qa=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,Ya=/^\[(?:\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function Xa(e){let t=[];for(let o of e.matchAll(qa))o.index!==0&&!/^[\s'"`]/.test(e[o.index-1]??"")||t.push(o[0]);for(let o of e.matchAll(Ga))t.push(o[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return e=Dn(e,r,/-\[[^\]]*\]/g,n),e&&e.split(st).forEach(o=>{o.includes(n)&&(o=Bn(o,r)),En(o)&&!Ya.test(o)&&t.push(o)}),t}var Kn={name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:e}){return Xa(In(e))}};var Hn=[{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("")}}}];var W={l:["-left"],r:["-right"],t:["-top"],b:["-bottom"],s:["-inline-start"],e:["-inline-end"],x:["-left","-right"],y:["-top","-bottom"],"":[""],bs:["-block-start"],be:["-block-end"],is:["-inline-start"],ie:["-inline-end"],block:["-block-start","-block-end"],inline:["-inline-start","-inline-end"]},Ur={...W,s:["-inset-inline-start"],start:["-inset-inline-start"],e:["-inset-inline-end"],end:["-inset-inline-end"],bs:["-inset-block-start"],be:["-inset-block-end"],is:["-inset-inline-start"],ie:["-inset-inline-end"],block:["-inset-block-start","-inset-block-end"],inline:["-inset-inline-start","-inset-inline-end"]},Wr={l:["-top-left","-bottom-left"],r:["-top-right","-bottom-right"],t:["-top-left","-top-right"],b:["-bottom-left","-bottom-right"],tl:["-top-left"],lt:["-top-left"],tr:["-top-right"],rt:["-top-right"],bl:["-bottom-left"],lb:["-bottom-left"],br:["-bottom-right"],rb:["-bottom-right"],"":[""],bs:["-start-start","-start-end"],be:["-end-start","-end-end"],s:["-end-start","-start-start"],is:["-end-start","-start-start"],e:["-start-end","-end-end"],ie:["-start-end","-end-end"],ss:["-start-start"],"bs-is":["-start-start"],"is-bs":["-start-start"],se:["-start-end"],"bs-ie":["-start-end"],"ie-bs":["-start-end"],es:["-end-start"],"be-is":["-end-start"],"is-be":["-end-start"],ee:["-end-end"],"be-ie":["-end-end"],"ie-be":["-end-end"]},qn={x:["-x"],y:["-y"],z:["-z"],"":["-x","-y"]},Yn=["x","y","z"],Gn=["top","top center","top left","top right","bottom","bottom center","bottom left","bottom right","left","left center","left top","left bottom","right","right center","right top","right bottom","center","center top","center bottom","center left","center right","center center"],U=Object.assign({},...Gn.map(e=>({[e.replace(/ /,"-")]:e})),...Gn.map(e=>({[e.replace(/\b(\w)\w+/g,"$1").replace(/ /,"")]:e}))),C=["inherit","initial","revert","revert-layer","unset"],Pe=/^(calc|clamp|min|max)\s*\((.+)\)(.*)/,lt=/^(var)\s*\((.+)\)(.*)/;function we(e,t,r){if(e==="")return;let n=e.length,o=0,i=!1,s=0;for(let a=0;a<n;a++)switch(e[a]){case t:i||(i=!0,s=a),o++;break;case r:if(--o,o<0)return;if(o===0)return[e.slice(s,a+1),e.slice(a+1),e.slice(0,s)];break}}function ae(e,t,r,n){if(e===""||(V(n)&&(n=[n]),n.length===0))return;let o=e.length,i=0;for(let s=0;s<o;s++)switch(e[s]){case t:i++;break;case r:if(--i<0)return;break;default:for(let a of n){let c=a.length;if(c&&a===e.slice(s,s+c)&&i===0)return s===0||s===o-c?void 0:[e.slice(0,s),e.slice(s+c)]}}return[e,""]}function fe(e,t,r){r=r??10;let n=[],o=0;for(;e!=="";){if(++o>r)return;let i=ae(e,"(",")",t);if(!i)return;let[s,a]=i;n.push(s),e=a}if(n.length>0)return n}var Nr=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],Xn=["%alpha","<alpha-value>"],Za=new RegExp(Xn.map(e=>ie(e)).join("|"));function K(e=""){let t=Ja(e);if(t==null||t===!1)return;let{type:r,components:n,alpha:o}=t,i=r.toLowerCase();if(n.length!==0&&!(Nr.includes(i)&&![1,3].includes(n.length)))return{type:i,components:n.map(s=>typeof s=="string"?s.trim():s),alpha:typeof o=="string"?o.trim():o}}function ee(e){let t=e.alpha??1;return typeof t=="string"&&Xn.includes(t)?1:t}function M(e,t){if(typeof e=="string")return e.replace(Za,`${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}`,Nr.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function Ja(e){if(!e)return;let t=Qa(e);if(t!=null||(t=ec(e),t!=null)||(t=tc(e),t!=null)||(t=nc(e),t!=null)||(t=oc(e),t!=null))return t}function Qa(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 ec(e){let t={rebeccapurple:[102,51,153,1]}[e];if(t!=null)return{type:"rgb",components:t.slice(0,3),alpha:t[3]}}function tc(e){let t=e.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!t)return;let[,r,n]=t,o=fe(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 rc=new RegExp(`^(${Nr.join("|")})\\((.+)\\)$`,"i");function nc(e){let t=e.match(rc);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 oc(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=fe(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=fe(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 ut(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}function B(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(s,a)=>a({...s,...t(s)})}},autocomplete:`${e}:`}}function I(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(s,a)=>a({...s,parent:`${s.parent?`${s.parent} $$ `:""}${t}`})}},autocomplete:`${e}:`}}function ce(e,t,r){if(t.startsWith(`${e}[`)){let[n,o]=we(t.slice(e.length),"[","]")??[];if(n&&o){for(let i of r)if(o.startsWith(i))return[n,o.slice(i.length),i];return[n,o,""]}}}function D(e,t,r){if(t.startsWith(e)){let n=ce(e,t,r);if(n){let[o="",i=n[1]]=D("/",n[1],r)??[];return[n[0],i,o]}for(let o of r.filter(i=>i!=="/")){let i=t.indexOf(o,e.length);if(i!==-1){let s=t.indexOf("/",e.length),a=s===-1||i<=s;return[t.slice(e.length,a?i:s),t.slice(i+o.length),a?"":t.slice(s+1,i)]}}}}var Jn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qn=new Uint8Array(64),ic=new Uint8Array(128);for(let e=0;e<Jn.length;e++){let t=Jn.charCodeAt(e);Qn[e]=t,ic[t]=e}var Dr=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}};function eo(e){let t=new Int32Array(5),r=1024*16,n=r-36,o=new Uint8Array(r),i=o.subarray(0,n),s=0,a="";for(let c=0;c<e.length;c++){let u=e[c];if(c>0&&(s===r&&(a+=Dr.decode(o),s=0),o[s++]=59),u.length!==0){t[0]=0;for(let f=0;f<u.length;f++){let p=u[f];s>n&&(a+=Dr.decode(i),o.copyWithin(0,n,s),s-=n),f>0&&(o[s++]=44),s=_e(o,s,t,p,0),p.length!==1&&(s=_e(o,s,t,p,1),s=_e(o,s,t,p,2),s=_e(o,s,t,p,3),p.length!==4&&(s=_e(o,s,t,p,4)))}}}return a+Dr.decode(o.subarray(0,s))}function _e(e,t,r,n,o){let i=n[o],s=i-r[o];r[o]=i,s=s<0?-s<<1|1:s<<1;do{let a=s&31;s>>>=5,s>0&&(a|=32),e[t++]=Qn[a]}while(s>0);return t}var ft=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}},pt=class e{constructor(t,r,n){this.start=t,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){let t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let r=this;for(;r;)t(r),r=r.next}eachPrevious(t){let r=this;for(;r;)t(r),r=r.previous}edit(t,r,n){return this.content=t,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){let r=t-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new e(t,this.end,o);return i.outro=this.outro,this.outro="",this.end=t,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let r=this.content.replace(t,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let r=this.content.replace(t,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}};function sc(){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 ac=sc(),Br=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=eo(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+ac(this.toString())}};function cc(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 lc(e,t){let r=e.split(/[/\\]/),n=t.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let o=r.length;for(;o--;)r[o]=".."}return r.concat(n).join("/")}var uc=Object.prototype.toString;function fc(e){return uc.call(e)==="[object Object]"}function to(e){let t=e.split(`
|
|
4
4
|
`),r=[];for(let n=0,o=0;n<t.length;n++)r.push(o),o+=t[n].length+1;return function(o){let i=0,s=r.length;for(;i<s;){let u=i+s>>1;o<r[u]?s=u:i=u+1}let a=i-1,c=o-r[a];return{line:a,column:c}}}var pc=/\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(`
|