@unocss/runtime 66.3.3 → 66.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributify.global.js +1 -1
- package/core.global.js +1 -1
- package/full.global.js +3 -3
- package/mini.global.js +1 -1
- package/package.json +4 -4
- package/preset-icons.global.js +1 -1
- package/preset-tagify.global.js +1 -1
- package/preset-typography.global.js +1 -1
- package/preset-web-fonts.global.js +6 -33
- package/uno.global.js +1 -1
package/mini.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var Uo=Object.defineProperty;var Fo=(t,e)=>{for(var r in e)Uo(t,r,{get:e[r],enumerable:!0})};var xe="default",Ue="preflights",_o="shortcuts",Io="imports",Qt={[Io]:-200,[Ue]:-100,[_o]:-10,[xe]:0};var Fe=/[\\:]?[\s'"`;{}]+/g;function Wo(t){return t.split(Fe)}var _e={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Wo(t)}};function T(t=[]){return Array.isArray(t)?t:[t]}function Y(t){return Array.from(new Set(t))}function pt(t,e){return t.reduce((r,n)=>(r.findIndex(o=>e(n,o))===-1&&r.push(n),r),[])}function z(t){return typeof t=="string"}var ye=class extends Set{_map=new Map;constructor(e){if(super(),e)for(let r of e)this.add(r)}add(e){return this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.has(e)?(this._map.delete(e),super.delete(e)):!1}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 Ie(t){return t instanceof ye}function _(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function X(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 We=X;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 Bo=/^\[(.+?)~?="(.*)"\]$/;var Do=/[\w\u00A0-\uFFFF%-?]/;function tr(t){return t.match(Bo)}function we(t=""){return Do.test(t)}function rr(t){return typeof t=="function"?{match:t}:t}function dt(t){return t.length===3}function Be(t){return t!=null}function nr(){}var De=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)))}},Ne=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}};function Se(t){return z(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function ir(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>Se(e)):[t]:[Se(t)]}function No(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 ue(t){return t==null?"":No(t).map(([e,r])=>r!=null&&typeof r!="function"?`${e}:${r};`:void 0).filter(Boolean).join("")}function Ke(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ht(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 Ke(n)&&Ke(i)&&Object.keys(i).forEach(s=>{Ke(n[s])&&Ke(i[s])||Array.isArray(n[s])&&Array.isArray(i[s])?o[s]=ht(n[s],i[s],r):Object.assign(o,{[s]:i[s]})}),o}function $e(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?$e(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:$e(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?$e(n):n;return r}return t}function or(t){return z(t[0])}function sr(t){return z(t[0])}var Ge={};function Ko(t=["-",":"]){let e=t.join("|");return Ge[e]||(Ge[e]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[[^\\]]*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Ge[e].lastIndex=0,Ge[e]}function Go(t,e=["-",":"],r=5){let n=Ko(e),i,o=t.toString(),s=new Set,a=new Map;do i=!1,o=o.replace(n,(c,f,p,d,m)=>{if(!e.includes(p))return c;i=!0,s.add(f+p);let h=m+f.length+p.length+1,y={length:c.length,items:[]};a.set(m,y);for(let w of[...d.matchAll(/\S+/g)]){let k=h+w.index,x=a.get(k)?.items;x?a.delete(k):x=[{offset:k,length:w[0].length,className:w[0]}];for(let b of x)b.className=b.className==="~"?f:b.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),y.items.push(b)}return"$".repeat(c.length)}),r-=1;while(i&&r);let l;if(typeof t=="string"){l="";let c=0;for(let[f,p]of a)l+=t.slice(c,f),l+=p.items.map(d=>d.className).join(" "),c=f+p.length;l+=t.slice(c)}else{l=t;for(let[c,f]of a)l.overwrite(c,c+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:i,groupsByOffset:a,get expanded(){return l.toString()}}}function ar(t,e=["-",":"],r=5){let n=Go(t,e,r);return typeof t=="string"?n.expanded:t}var lr=new Set;function cr(t){lr.has(t)||(console.warn("[unocss]",t),lr.add(t))}function pr(t){return T(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var ur="_uno_resolved";async function Ho(t){let e=typeof t=="function"?await t():await t;if(ur in e)return e;e={...e},Object.defineProperty(e,ur,{value:!0,enumerable:!1});let r=e.shortcuts?pr(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=T(e.prefix)),o.layer==null&&e.layer&&(o.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function dr(t){let e=await Ho(t);if(!e.presets)return[e];let r=(await Promise.all((e.presets||[]).flatMap(T).flatMap(dr))).flat();return[e,...r]}function qo(t){if(t.length===0)return{};let e=[],r=[],n=!1,i=[],o=[];for(let a of t){if(a.pipeline===!1){n=!0;break}else a.pipeline?.include&&e.push(a.pipeline.include),a.pipeline?.exclude&&r.push(a.pipeline.exclude);a.filesystem&&i.push(a.filesystem),a.inline&&o.push(a.inline)}let s={pipeline:n?!1:{include:Y(fr(...e)),exclude:Y(fr(...r))}};return i.length&&(s.filesystem=Y(i.flat())),o.length&&(s.inline=Y(o.flat())),s}async function mt(t={},e={}){let r=Object.assign({},e,t),n=pt((await Promise.all((r.presets||[]).flatMap(T).flatMap(dr))).flat(),(g,R)=>g.name===R.name),i=[...n.filter(g=>g.enforce==="pre"),...n.filter(g=>!g.enforce),...n.filter(g=>g.enforce==="post")],o=[...i,r],s=[...o].reverse(),a=Object.assign({},Qt,...o.map(g=>g.layers));function l(g){return Y(o.flatMap(R=>T(R[g]||[])))}let c=l("extractors"),f=s.find(g=>g.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=_e),f&&!c.includes(f)&&c.unshift(f),c.sort((g,R)=>(g.order||0)-(R.order||0));let p=l("rules"),d={},m=p.length,h=p.filter(g=>or(g)?(T(g[2]?.prefix||"").forEach($=>{d[$+g[0]]=g}),!1):!0).reverse(),y={templates:Y(o.flatMap(g=>T(g.autocomplete?.templates))),extractors:o.flatMap(g=>T(g.autocomplete?.extractors)).sort((g,R)=>(g.order||0)-(R.order||0)),shorthands:Xo(o.map(g=>g.autocomplete?.shorthands||{}))},w=l("separators");w.length||(w=[":","-"]);let k=l("content"),x=qo(k),b={mergeSelectors:!0,warn:!0,sortLayers:g=>g,...r,blocklist:l("blocklist"),presets:i,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:Yo(o.map(g=>g.theme)),rules:p,rulesSize:m,rulesDynamic:h,rulesStaticMap:d,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:y,variants:l("variants").map(rr).sort((g,R)=>(g.order||0)-(R.order||0)),shortcuts:pr(l("shortcuts")).reverse(),extractors:c,safelist:l("safelist"),separators:w,details:r.details??r.envMode==="dev",content:x,transformers:pt(l("transformers"),(g,R)=>g.name===R.name)},C=l("extendTheme");for(let g of C)b.theme=g(b.theme,b)||b.theme;for(let g of o)g?.configResolved?.(b);return b}function Yo(t){return t.map(e=>e?$e(e):{}).reduce((e,r)=>ht(e,r),{})}function Xo(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}},{})}function fr(...t){return t.flatMap(Zo)}function Zo(t){return Array.isArray(t)?t:t?[t]:[]}var hr="66.3.3";var re={shortcutsNoMerge:"$$symbol-shortcut-no-merge",noMerge:"$$symbol-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort"},gt=class t{constructor(e={},r={}){this.userConfig=e;this.defaults=r}version=hr;events=er();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;static async create(e={},r={}){let n=new t(e,r);return n.config=await mt(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await mt(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(Ie(s)&&Ie(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:re,variantHandlers:r[2],constructCSS:(...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=this.config.preprocess.reduce((l,c)=>c(l)??l,e);if(this.isBlocked(i)){this.blocked.add(e),this.cache.set(n,null);return}let o=await this.matchVariants(e,i);if(o.every(l=>!l||this.isBlocked(l[1]))){this.blocked.add(e),this.cache.set(n,null);return}let s=async l=>{let c=this.makeContext(e,[r||l[0],l[1],l[2],l[3]]);this.config.details&&(c.variants=[...l[3]]);let f=await this.expandShortcut(c.currentSelector,c);return f?await this.stringifyShortcuts(c.variantMatch,c,f[0],f[1]):(await this.parseUtil(c.variantMatch,c))?.map(d=>this.stringifyUtil(d,c)).filter(Be)},a=(await Promise.all(o.map(l=>s(l)))).flat().filter(l=>!!l);if(a?.length)return this.cache.set(n,a),a;this.cache.set(n,null)}async generate(e,r={}){let{id:n,scope:i,preflights:o=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,c=z(e)?await this.applyExtractors(e,n,l?new ye:new Set):Array.isArray(e)?new Set(e):e;if(s){let $={generator:this,theme:this.config.theme};this.config.safelist.flatMap(S=>typeof S=="function"?S($):S).forEach(S=>{let E=S.trim();E&&!c.has(E)&&c.add(E)})}let f=a?"":`
|
|
1
|
+
"use strict";(()=>{var Uo=Object.defineProperty;var Fo=(t,e)=>{for(var r in e)Uo(t,r,{get:e[r],enumerable:!0})};var xe="default",Ue="preflights",_o="shortcuts",Io="imports",Qt={[Io]:-200,[Ue]:-100,[_o]:-10,[xe]:0};var Fe=/[\\:]?[\s'"`;{}]+/g;function Wo(t){return t.split(Fe)}var _e={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Wo(t)}};function T(t=[]){return Array.isArray(t)?t:[t]}function Y(t){return Array.from(new Set(t))}function pt(t,e){return t.reduce((r,n)=>(r.findIndex(o=>e(n,o))===-1&&r.push(n),r),[])}function z(t){return typeof t=="string"}var ye=class extends Set{_map=new Map;constructor(e){if(super(),e)for(let r of e)this.add(r)}add(e){return this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.has(e)?(this._map.delete(e),super.delete(e)):!1}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 Ie(t){return t instanceof ye}function _(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function X(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 We=X;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 Bo=/^\[(.+?)~?="(.*)"\]$/;var Do=/[\w\u00A0-\uFFFF%-?]/;function tr(t){return t.match(Bo)}function we(t=""){return Do.test(t)}function rr(t){return typeof t=="function"?{match:t}:t}function dt(t){return t.length===3}function Be(t){return t!=null}function nr(){}var De=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)))}},Ne=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}};function Se(t){return z(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function ir(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>Se(e)):[t]:[Se(t)]}function No(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 ue(t){return t==null?"":No(t).map(([e,r])=>r!=null&&typeof r!="function"?`${e}:${r};`:void 0).filter(Boolean).join("")}function Ke(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ht(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 Ke(n)&&Ke(i)&&Object.keys(i).forEach(s=>{Ke(n[s])&&Ke(i[s])||Array.isArray(n[s])&&Array.isArray(i[s])?o[s]=ht(n[s],i[s],r):Object.assign(o,{[s]:i[s]})}),o}function $e(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?$e(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:$e(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?$e(n):n;return r}return t}function or(t){return z(t[0])}function sr(t){return z(t[0])}var Ge={};function Ko(t=["-",":"]){let e=t.join("|");return Ge[e]||(Ge[e]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[[^\\]]*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Ge[e].lastIndex=0,Ge[e]}function Go(t,e=["-",":"],r=5){let n=Ko(e),i,o=t.toString(),s=new Set,a=new Map;do i=!1,o=o.replace(n,(c,f,p,d,m)=>{if(!e.includes(p))return c;i=!0,s.add(f+p);let h=m+f.length+p.length+1,y={length:c.length,items:[]};a.set(m,y);for(let w of[...d.matchAll(/\S+/g)]){let k=h+w.index,x=a.get(k)?.items;x?a.delete(k):x=[{offset:k,length:w[0].length,className:w[0]}];for(let b of x)b.className=b.className==="~"?f:b.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),y.items.push(b)}return"$".repeat(c.length)}),r-=1;while(i&&r);let l;if(typeof t=="string"){l="";let c=0;for(let[f,p]of a)l+=t.slice(c,f),l+=p.items.map(d=>d.className).join(" "),c=f+p.length;l+=t.slice(c)}else{l=t;for(let[c,f]of a)l.overwrite(c,c+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:i,groupsByOffset:a,get expanded(){return l.toString()}}}function ar(t,e=["-",":"],r=5){let n=Go(t,e,r);return typeof t=="string"?n.expanded:t}var lr=new Set;function cr(t){lr.has(t)||(console.warn("[unocss]",t),lr.add(t))}function pr(t){return T(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var ur="_uno_resolved";async function Ho(t){let e=typeof t=="function"?await t():await t;if(ur in e)return e;e={...e},Object.defineProperty(e,ur,{value:!0,enumerable:!1});let r=e.shortcuts?pr(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=T(e.prefix)),o.layer==null&&e.layer&&(o.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function dr(t){let e=await Ho(t);if(!e.presets)return[e];let r=(await Promise.all((e.presets||[]).flatMap(T).flatMap(dr))).flat();return[e,...r]}function qo(t){if(t.length===0)return{};let e=[],r=[],n=!1,i=[],o=[];for(let a of t){if(a.pipeline===!1){n=!0;break}else a.pipeline?.include&&e.push(a.pipeline.include),a.pipeline?.exclude&&r.push(a.pipeline.exclude);a.filesystem&&i.push(a.filesystem),a.inline&&o.push(a.inline)}let s={pipeline:n?!1:{include:Y(fr(...e)),exclude:Y(fr(...r))}};return i.length&&(s.filesystem=Y(i.flat())),o.length&&(s.inline=Y(o.flat())),s}async function mt(t={},e={}){let r=Object.assign({},e,t),n=pt((await Promise.all((r.presets||[]).flatMap(T).flatMap(dr))).flat(),(g,R)=>g.name===R.name),i=[...n.filter(g=>g.enforce==="pre"),...n.filter(g=>!g.enforce),...n.filter(g=>g.enforce==="post")],o=[...i,r],s=[...o].reverse(),a=Object.assign({},Qt,...o.map(g=>g.layers));function l(g){return Y(o.flatMap(R=>T(R[g]||[])))}let c=l("extractors"),f=s.find(g=>g.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=_e),f&&!c.includes(f)&&c.unshift(f),c.sort((g,R)=>(g.order||0)-(R.order||0));let p=l("rules"),d={},m=p.length,h=p.filter(g=>or(g)?(T(g[2]?.prefix||"").forEach($=>{d[$+g[0]]=g}),!1):!0).reverse(),y={templates:Y(o.flatMap(g=>T(g.autocomplete?.templates))),extractors:o.flatMap(g=>T(g.autocomplete?.extractors)).sort((g,R)=>(g.order||0)-(R.order||0)),shorthands:Xo(o.map(g=>g.autocomplete?.shorthands||{}))},w=l("separators");w.length||(w=[":","-"]);let k=l("content"),x=qo(k),b={mergeSelectors:!0,warn:!0,sortLayers:g=>g,...r,blocklist:l("blocklist"),presets:i,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:Yo(o.map(g=>g.theme)),rules:p,rulesSize:m,rulesDynamic:h,rulesStaticMap:d,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:y,variants:l("variants").map(rr).sort((g,R)=>(g.order||0)-(R.order||0)),shortcuts:pr(l("shortcuts")).reverse(),extractors:c,safelist:l("safelist"),separators:w,details:r.details??r.envMode==="dev",content:x,transformers:pt(l("transformers"),(g,R)=>g.name===R.name)},C=l("extendTheme");for(let g of C)b.theme=g(b.theme,b)||b.theme;for(let g of o)g?.configResolved?.(b);return b}function Yo(t){return t.map(e=>e?$e(e):{}).reduce((e,r)=>ht(e,r),{})}function Xo(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}},{})}function fr(...t){return t.flatMap(Zo)}function Zo(t){return Array.isArray(t)?t:t?[t]:[]}var hr="66.4.0";var re={shortcutsNoMerge:"$$symbol-shortcut-no-merge",noMerge:"$$symbol-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort"},gt=class t{constructor(e={},r={}){this.userConfig=e;this.defaults=r}version=hr;events=er();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;static async create(e={},r={}){let n=new t(e,r);return n.config=await mt(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await mt(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(Ie(s)&&Ie(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:re,variantHandlers:r[2],constructCSS:(...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=this.config.preprocess.reduce((l,c)=>c(l)??l,e);if(this.isBlocked(i)){this.blocked.add(e),this.cache.set(n,null);return}let o=await this.matchVariants(e,i);if(o.every(l=>!l||this.isBlocked(l[1]))){this.blocked.add(e),this.cache.set(n,null);return}let s=async l=>{let c=this.makeContext(e,[r||l[0],l[1],l[2],l[3]]);this.config.details&&(c.variants=[...l[3]]);let f=await this.expandShortcut(c.currentSelector,c);return f?await this.stringifyShortcuts(c.variantMatch,c,f[0],f[1]):(await this.parseUtil(c.variantMatch,c))?.map(d=>this.stringifyUtil(d,c)).filter(Be)},a=(await Promise.all(o.map(l=>s(l)))).flat().filter(l=>!!l);if(a?.length)return this.cache.set(n,a),a;this.cache.set(n,null)}async generate(e,r={}){let{id:n,scope:i,preflights:o=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,c=z(e)?await this.applyExtractors(e,n,l?new ye:new Set):Array.isArray(e)?new Set(e):e;if(s){let $={generator:this,theme:this.config.theme};this.config.safelist.flatMap(S=>typeof S=="function"?S($):S).forEach(S=>{let E=S.trim();E&&!c.has(E)&&c.add(E)})}let f=a?"":`
|
|
2
2
|
`,p=new Set([xe]),d=l?new Map:new Set,m=new Map,h={},y=Array.from(c).map(async $=>{if(d.has($))return;let S=await this.parseToken($);if(S!=null){d instanceof Map?d.set($,{data:S,count:Ie(c)?c.getCount($):-1}):d.add($);for(let E of S){let I=E[3]||"",W=E[4]?.layer;m.has(I)||m.set(I,[]),m.get(I).push(E),W&&p.add(W)}}});await Promise.all(y),await(async()=>{if(!o)return;let $={generator:this,theme:this.config.theme},S=new Set([]);this.config.preflights.forEach(({layer:E=Ue})=>{p.add(E),S.add(E)}),h=Object.fromEntries(await Promise.all(Array.from(S).map(async E=>{let W=(await Promise.all(this.config.preflights.filter(H=>(H.layer||Ue)===E).map(async H=>await H.getCSS($)))).filter(Boolean).join(f);return[E,W]})))})();let w=this.config.sortLayers(Array.from(p).sort(($,S)=>(this.config.layers[$]??0)-(this.config.layers[S]??0)||$.localeCompare(S))),k={},x=this.config.outputToCssLayers,b=$=>{let S=$;return typeof x=="object"&&(S=x.cssLayerName?.($)),S===null?null:S??$},C=($=xe)=>{if(k[$])return k[$];let S=Array.from(m).sort((W,H)=>(this.parentOrders.get(W[0])??0)-(this.parentOrders.get(H[0])??0)||W[0]?.localeCompare(H[0]||"")||0).map(([W,H])=>{let v=H.length,j=H.filter(V=>(V[4]?.layer||xe)===$).sort((V,q)=>V[0]-q[0]||(V[4]?.sort||0)-(q[4]?.sort||0)||V[5]?.currentSelector?.localeCompare(q[5]?.currentSelector??"")||V[1]?.localeCompare(q[1]||"")||V[2]?.localeCompare(q[2]||"")||0).map(([,V,q,,Le,,ut])=>[[[(V&&es(V,i))??"",Le?.sort??0]],q,!!(ut??Le?.noMerge)]);if(!j.length)return;let O=j.reverse().map(([V,q,Le],ut)=>{if(!Le&&this.config.mergeSelectors)for(let ie=ut+1;ie<v;ie++){let J=j[ie];if(J&&!J[2]&&(V&&J[0]||V==null&&J[0]==null)&&J[1]===q)return V&&J[0]&&J[0].push(...V),null}let ft=V?Y(V.sort((ie,J)=>ie[1]-J[1]||ie[0]?.localeCompare(J[0]||"")||0).map(ie=>ie[0]).filter(Boolean)):[];return ft.length?`${ft.join(`,${f}`)}{${q}}`:q}).filter(Boolean),M=Array.from(new Set(O)).reverse().join(f);if(!W)return M;let F=W.split(" $$ ");return`${F.join("{")}{${f}${M}${f}${"}".repeat(F.length)}`}).filter(Boolean).join(f);o&&(S=[h[$],S].filter(Boolean).join(f));let E;x&&S&&(E=b($),E!==null&&(S=`@layer ${E}{${f}${S}${f}}`));let I=a?"":`/* layer: ${$}${E&&E!==$?`, alias: ${E}`:""} */${f}`;return k[$]=S?I+S:""},g=($=w,S)=>{let E=$.filter(I=>!S?.includes(I));return[x&&E.length>0?`@layer ${E.map(b).filter(Be).join(", ")};`:void 0,...E.map(I=>C(I)||"")].filter(Boolean).join(f)};return{get css(){return g()},layers:w,matched:d,getLayers:g,getLayer:C,setLayer:async($,S)=>{let E=await S(C($));return k[$]=E,E}}}async matchVariants(e,r){let n={rawSelector:e,theme:this.config.theme,generator:this},i=async o=>{let s=!0,[,,a,l]=o;for(;s;){s=!1;let c=o[1];for(let f of this.config.variants){if(!f.multiPass&&l.has(f))continue;let p=await f.match(c,n);if(p){if(z(p)){if(p===c)continue;p={matcher:p}}if(Array.isArray(p)){if(!p.length)continue;if(p.length===1)p=p[0];else{if(f.multiPass)throw new Error("multiPass can not be used together with array return variants");let d=p.map(m=>{let h=m.matcher??c,y=[m,...a],w=new Set(l);return w.add(f),[o[0],h,y,w]});return(await Promise.all(d.map(m=>i(m)))).flat()}}o[1]=p.matcher??c,a.unshift(p),l.add(f),s=!0;break}}if(!s)break;if(a.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[o]};return await i([e,r||e,[],new Set])}applyVariants(e,r=e[4],n=e[1]){let o=r.slice().sort((c,f)=>(c.order||0)-(f.order||0)).reduceRight((c,f)=>p=>{let d=f.body?.(p.entries)||p.entries,m=Array.isArray(f.parent)?f.parent:[f.parent,void 0],h=f.selector?.(p.selector,d);return(f.handle??rs)({...p,entries:d,selector:h||p.selector,parent:m[0]||p.parent,parentOrder:m[1]||p.parentOrder,layer:f.layer||p.layer,sort:f.sort||p.sort},c)},c=>c)({prefix:"",selector:ts(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 c of this.config.postprocess)c(l);return l}constructCustomCSS(e,r,n){let i=Se(r);if(z(i))return i;let{selector:o,entries:s,parent:a}=this.applyVariants([0,n||e.rawSelector,i,void 0,e.variantHandlers]),l=`${o}{${ue(s)}}`;return a?`${a}{${l}}`:l}async parseUtil(e,r,n=!1,i){let o=z(e)?await this.matchVariants(e):[e],s=async([l,c,f])=>{this.config.details&&(r.rules=r.rules??[]);let p={...r,variantHandlers:f},d=this.config.rulesStaticMap[c];if(d&&d[1]&&(n||!d[2]?.internal))return this.resolveCSSResult(l,d[1],d,p);for(let m of this.config.rulesDynamic){let[h,y,w]=m;if(w?.internal&&!n)continue;let k=c;if(w?.prefix){let g=T(w.prefix);if(i){let R=T(i);if(!g.some($=>R.includes($)))continue}else{let R=g.find($=>c.startsWith($));if(R==null)continue;k=c.slice(R.length)}}let x=k.match(h);if(!x)continue;let b=await y(x,p);if(!b)continue;if(typeof b!="string")if(Symbol.asyncIterator in b){let g=[];for await(let R of b)R&&g.push(R);b=g}else Symbol.iterator in b&&!Array.isArray(b)&&(b=Array.from(b).filter(Be));let C=this.resolveCSSResult(l,b,m,p);if(C)return C}},a=(await Promise.all(o.map(l=>s(l)))).flat().filter(l=>!!l);if(a.length)return a}resolveCSSResult=(e,r,n,i)=>{let o=ir(r).filter(s=>s.length);if(o.length){this.config.details&&i.rules.push(n),i.generator.activatedRules.add(n);let s=i.generator.config.rules.indexOf(n),a=n[2];return o.map(l=>{if(z(l))return[s,l,a];let c=i.variantHandlers,f=a;for(let p of l)p[0]===re.variants?typeof p[1]=="function"?c=p[1](c)||c:c=[...T(p[1]),...c]:p[0]===re.parent?c=[{parent:p[1]},...c]:p[0]===re.selector?c=[{selector:p[1]},...c]:p[0]===re.layer?c=[{layer:p[1]},...c]:p[0]===re.sort?f={...f,sort:p[1]}:p[0]===re.noMerge&&(f={...f,noMerge:p[1]});return[s,e,l,f,c]})}};stringifyUtil(e,r){if(!e)return;if(dt(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),c=ue(i);if(!c)return;let{layer:f,sort:p,...d}=e[3]??{},m={...d,layer:s??f,sort:a??p};return[e[0],n,c,o,m,this.config.details?r:void 0,l]}async expandShortcut(e,r,n=5){if(n===0)return;let i=this.config.details?c=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(c)}:nr,o,s,a,l;for(let c of this.config.shortcuts){let f=e;if(c[2]?.prefix){let d=T(c[2].prefix).find(m=>e.startsWith(m));if(d==null)continue;f=e.slice(d.length)}if(sr(c)){if(c[0]===f){o=o||c[2],s=c[1],i(c);break}}else{let p=f.match(c[0]);if(p&&(s=c[1](p,r)),s){o=o||c[2],i(c);break}}}if(s&&(a=Y(T(s).filter(z).map(c=>ar(c.trim()).split(/\s+/g)).flat()),l=T(s).filter(c=>!z(c)).map(c=>({handles:[],value:c}))),!s){let c=z(e)?await this.matchVariants(e):[e];for(let f of c){let[p,d,m]=f;if(p!==d){let h=await this.expandShortcut(d,r,n-1);h&&(a=h[0].filter(z).map(y=>p.replace(d,y)),l=h[0].filter(y=>!z(y)).map(y=>({handles:[...y.handles,...m],value:y.value})))}}}if(!(!a?.length&&!l?.length))return[[await Promise.all(T(a).map(async c=>(await this.expandShortcut(c,r,n-1))?.[0]||[c])),l].flat(2).filter(c=>!!c),o]}async stringifyShortcuts(e,r,n,i={layer:this.config.shortcutsLayer}){let o=new Ne,s=(await Promise.all(Y(n).map(async f=>{let p=z(f)?await this.parseUtil(f,r,!0,i.prefix):[[Number.POSITIVE_INFINITY,"{inline}",Se(f.value),void 0,f.handles]];return!p&&this.config.warn&&cr(`unmatched utility "${f}" in shortcut "${e[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((f,p)=>f[0]-p[0]),[a,,l]=e,c=[];for(let f of s){if(dt(f)){c.push([f[0],void 0,f[1],void 0,f[2],r,void 0]);continue}let{selector:p,entries:d,parent:m,sort:h,noMerge:y,layer:w}=this.applyVariants(f,[...f[4],...l],a);o.getFallback(w??i.layer,new De).getFallback(p,m,[[],f[0]])[0].push([d,!!(y??f[3]?.noMerge),h??0])}return c.concat(o.flatMap((f,p)=>f.map(([d,m],h,y)=>{let w=(x,b,C)=>{let g=Math.max(...C.map($=>$[1])),R=C.map($=>$[0]);return(x?[R.flat(1)]:R).map($=>{let S=ue($);if(S)return[m,h,S,y,{...i,noMerge:b,sort:g,layer:p},r,void 0]})};return[[d.filter(([,x])=>x).map(([x,,b])=>[x,b]),!0],[d.filter(([,x])=>!x).map(([x,,b])=>[x,b]),!1]].map(([x,b])=>[...w(!1,b,x.filter(([C])=>C.some(g=>g[0]===re.shortcutsNoMerge))),...w(!0,b,x.filter(([C])=>C.every(g=>g[0]!==re.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(e):z(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):z(i)?i===e:i.test(e)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};async function gr(t,e){return await gt.create(t,e)}var br=/\s\$\$\s+/g;function Qo(t){return br.test(t)}function es(t,e){return Qo(t)?t.replace(br,e?` ${e} `:" "):e?`${e} ${t}`:t}var mr=/^\[(.+?)(~?=)"(.*)"\]$/;function ts(t){return mr.test(t)?t.replace(mr,(e,r,n,i)=>`[${We(r)}${n}"${We(i)}"]`):`.${We(t)}`}function rs(t,e){return e(t)}var bt=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;function xr(t={}){let e=t.prefix??"un-",r=t.prefixedOnly??!1,n=t.trueToNonValued??!1,i;return{name:"attributify",match(o,{generator:s}){let a=tr(o);if(!a)return;let l=a[1];if(l.startsWith(e))l=l.slice(e.length);else if(r)return;let c=a[2],[,f="",p=c]=c.match(bt)||[];if(p==="~"||n&&p==="true"||!p)return`${f}${l}`;if(i==null){let d=s?.config?.separators?.join("|");d?i=new RegExp(`^(.*\\](?:${d}))(\\[[^\\]]+?\\])$`):i=!1}if(i){let[,d,m]=c.match(i)||[];if(m)return`${d}${f}${l}-${m}`}if(f&&p.match(/^[\d.]+$/)){let d=f.split(/([^:]*:)/g).filter(Boolean),m=d.pop()+p,h=d.join("");return[{matcher:`${f}${l}-${p}`},{matcher:`${h}${l}-${m}`}]}return`${f}${l}-${p}`}}}var ns=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,is=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF-:%]+)(?:=("[^"]*|'[^']*))?/g,yr=/[\s'"`;>]+/;function wr(t){return{name:"attributify",extract:({content:e,cursor:r})=>{let n=e.matchAll(ns),i,o=0;for(let x of n){let[,b,C]=x,g=x.index+b.length;if(r>g&&r<=g+C.length){o=g,i=C;break}}if(!i)return null;let s=i.matchAll(is),a=0,l,c;for(let x of s){let[b,C,g]=x,R=o+x.index;if(r>R&&r<=R+b.length){a=R,l=C,c=g?.slice(1);break}}if(!l||l==="class"||l==="className"||l===":class")return null;let f=!!t?.prefix&&l.startsWith(t.prefix);if(t?.prefixedOnly&&!f)return null;let p=f?l.slice(t.prefix.length):l;if(c===void 0)return{extracted:p,resolveReplacement(x){let b=f?t.prefix.length:0;return{start:a+b,end:a+l.length,replacement:x}}};let d=a+l.length+2,m=yr.exec(c),h=0,y;for(;m;){let[x]=m;if(r>d+h&&r<=d+h+m.index){y=c.slice(h,h+m.index);break}h+=m.index+x.length,m=yr.exec(c.slice(h))}y===void 0&&(y=c.slice(h));let[,w="",k]=y.match(bt)||[];return{extracted:`${w}${p}-${k}`,transformSuggestions(x){return x.filter(b=>b.startsWith(`${w}${p}-`)).map(b=>w+b.slice(w.length+p.length+1))},resolveReplacement(x){return{start:h+d,end:h+d+y.length,replacement:w+x.slice(w.length+p.length+1)}}}}}}var os=["v-bind:",":"],$r=/[\s'"`;]+/g,xt=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,ss=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF:!%.~<-]+)=?(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})?/g,yt=["placeholder","fill","opacity","stroke-opacity"];function Sr(t){let e=t?.ignoreAttributes??yt,r=t?.nonValuedAttribute??!0,n=t?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:i}){return Array.from(i.matchAll(xt)).flatMap(o=>Array.from((o[1]||"").matchAll(ss))).flatMap(([,o,...s])=>{let a=s.filter(Boolean).join("");if(e.includes(o))return[];for(let l of os)if(o.startsWith(l)){o=o.slice(l.length);break}if(!a){if(we(o)&&r!==!1){let l=[`[${o}=""]`];return n&&l.push(`[${o}="true"]`),l}return[]}return["class","className"].includes(o)?a.split($r).filter(we):xt.test(a)?(xt.lastIndex=0,this.extract({code:a})):t?.prefixedOnly&&t.prefix&&!o.startsWith(t.prefix)?[]:a.split($r).filter(l=>!!l&&l!==":").map(l=>`[${o}~="${l}"]`)})}}}var as=(t={})=>{t.strict=t.strict??!1,t.prefix=t.prefix??"un-",t.prefixedOnly=t.prefixedOnly??!1,t.nonValuedAttribute=t.nonValuedAttribute??!0,t.ignoreAttributes=t.ignoreAttributes??yt;let e=[xr(t)],r=[Sr(t)],n=[wr(t)];return{name:"@unocss/preset-attributify",enforce:"post",variants:e,extractors:r,options:t,autocomplete:{extractors:n},extractorDefault:t.strict?!1:void 0}},vr=as;function ls(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}${ls(o)}`;e.set(s,o),t=t.replace(o,s)}return t}function kr(t,e){for(let[r,n]of e.entries())t=t.replaceAll(r,n);return t}var cs=/\/\/#\s*sourceMappingURL=.*\n?/g;function Rr(t){return t.includes("sourceMappingURL=")?t.replace(cs,""):t}var us=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,fs=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,ps=/^\[(?:\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function ds(t){let e=[];for(let i of t.matchAll(fs))i.index!==0&&!/^[\s'"`]/.test(t[i.index-1]??"")||e.push(i[0]);for(let i of t.matchAll(us))e.push(i[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return t=Cr(t,r,/-\[(?!&.+?;)[^\]]*\]/g,n),t&&t.split(Fe).forEach(i=>{i.includes(n)&&(i=kr(i,r)),we(i)&&!ps.test(i)&&e.push(i)}),e}function Tr(){return{name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:t}){return ds(Rr(t))}}}function Er(t){if(t.preflight)return[{layer:"preflights",getCSS({theme:e,generator:r}){if(e.preflightBase){let n=Object.entries(e.preflightBase);if(t.preflight==="on-demand"){let i=new Set(Array.from(r.activatedRules).map(o=>o[2]?.custom?.preflightKeys).filter(Boolean).flat());n=n.filter(([o])=>i.has(o))}if(n.length>0){let i=ue(n);return t.variablePrefix!=="un-"&&(i=i.replace(/--un-/g,`--${t.variablePrefix}`)),T(e.preflightRoot??["*,::before,::after","::backdrop"]).map(s=>`${s}{${i}}`).join("")}}}}]}function oe(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 fe(t,e,r,n){if(t===""||(z(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 pe(t,e,r,n="(",i=")"){r=r??10;let o=[],s=0;for(;t!=="";){if(++s>r)return;let a=fe(t,n,i,e);if(!a)return;let[l,c]=a;o.push(l),t=c}if(o.length>0)return o}var wt=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"];var jr=["%alpha","<alpha-value>"],hs=new RegExp(jr.map(t=>_(t)).join("|"),"g");function se(t=""){let e=ms(t);if(e==null||e===!1)return;let{type:r,components:n,alpha:i}=e,o=r.toLowerCase();if(n.length!==0&&!(wt.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 ve(t){let e=t.alpha??1;return typeof e=="string"&&jr.includes(e)?1:e}function B(t,e){if(typeof t=="string")return t.replace(hs,`${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}`,wt.includes(i)?`${i}(${r.join(" ")}${n})`:`color(${i} ${r.join(" ")}${n})`)}function ms(t){if(!t)return;let e=gs(t);if(e!=null||(e=bs(t),e!=null)||(e=xs(t),e!=null)||(e=ws(t),e!=null)||(e=$s(t),e!=null))return e}function gs(t){let[,e]=t.match(/^#([\da-f]+)$/i)||[];if(e)switch(e.length){case 3:case 4:{let r=Array.from(e,n=>Number.parseInt(n,16)).map(n=>n<<4|n);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 r=Number.parseInt(e,16);return{type:"rgb",components:e.length===6?[r>>16&255,r>>8&255,r&255]:[r>>24&255,r>>16&255,r>>8&255],alpha:e.length===6?void 0:Math.round((r&255)/255*100)/100}}}}function bs(t){let e={rebeccapurple:[102,51,153,1]}[t];if(e!=null)return{type:"rgb",components:e.slice(0,3),alpha:e[3]}}function xs(t){let e=t.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!e)return;let[,r,n]=e,i=pe(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 ys=new RegExp(`^(${wt.join("|")})\\((.+)\\)$`,"i");function ws(t){let e=t.match(ys);if(!e)return;let[,r,n]=e,i=Ar(`${r} ${n}`);if(i){let{alpha:o,components:[s,...a]}=i;return{type:s,components:a,alpha:o}}}function $s(t){let e=t.match(/^color\((.+)\)$/);if(!e)return;let r=Ar(e[1]);if(r){let{alpha:n,components:[i,...o]}=r;return{type:i,components:o,alpha:n}}}function Ar(t){let e=pe(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=pe(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}}var Pr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mr=new Uint8Array(64),Ss=new Uint8Array(128);for(let t=0;t<Pr.length;t++){let e=Pr.charCodeAt(t);Mr[t]=e,Ss[e]=t}function Ce(t,e,r){let n=e-r;n=n<0?-n<<1|1:n<<1;do{let i=n&31;n>>>=5,n>0&&(i|=32),t.write(Mr[i])}while(n>0);return e}var Or=1024*16,Vr=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}},$t=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Or)}write(e){let{buffer:r}=this;r[this.pos++]=e,this.pos===Or&&(this.out+=Vr.decode(r),this.pos=0)}flush(){let{buffer:e,out:r,pos:n}=this;return n>0?r+Vr.decode(e.subarray(0,n)):r}};function zr(t){let e=new $t,r=0,n=0,i=0,o=0;for(let s=0;s<t.length;s++){let a=t[s];if(s>0&&e.write(59),a.length===0)continue;let l=0;for(let c=0;c<a.length;c++){let f=a[c];c>0&&e.write(44),l=Ce(e,f[0],l),f.length!==1&&(r=Ce(e,f[1],r),n=Ce(e,f[2],n),i=Ce(e,f[3],i),f.length!==4&&(o=Ce(e,f[4],o)))}}return e.flush()}var He=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 vs(){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 Cs=vs(),St=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=zr(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList),typeof e.debugId<"u"&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Cs(this.toString())}};function ks(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 Rs(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 Ts=Object.prototype.toString;function Es(t){return Ts.call(t)==="[object Object]"}function Lr(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 c=o+s>>1;i<r[c]?s=c:o=c+1}let a=o-1,l=i-r[a];return{line:a,column:l}}}var js=/\w/,vt=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": "66.
|
|
4
|
+
"version": "66.4.0",
|
|
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/
|
|
39
|
-
"@unocss/preset-
|
|
40
|
-
"@unocss/
|
|
38
|
+
"@unocss/preset-attributify": "66.4.0",
|
|
39
|
+
"@unocss/preset-uno": "66.4.0",
|
|
40
|
+
"@unocss/core": "66.4.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "pnpm run build:node && pnpm run build:cdn && pnpm run build:presets",
|
package/preset-icons.global.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
`).join(`
|
|
3
3
|
`+i),e.push(r+"m+"+Y.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=kt()+o+" "+e[0]}function kt(){return w.inspectOpts.hideDate?"":new Date().toISOString()+" "}function jt(...e){return process.stderr.write(Z.formatWithOptions(w.inspectOpts,...e)+`
|
|
4
4
|
`)}function Et(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Tt(){return process.env.DEBUG}function Lt(e){e.inspectOpts={};let o=Object.keys(w.inspectOpts);for(let t=0;t<o.length;t++)e.inspectOpts[o[t]]=w.inspectOpts[o[t]]}Y.exports=se()(w);var{formatters:De}=Y.exports;De.o=function(e){return this.inspectOpts.colors=this.useColors,Z.inspect(e,this.inspectOpts).split(`
|
|
5
|
-
`).map(o=>o.trim()).join(" ")};De.O=function(e){return this.inspectOpts.colors=this.useColors,Z.inspect(e,this.inspectOpts)}});var D=T((mo,le)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?le.exports=Re():le.exports=Ue()});async function ue(e,o,t,n){let r;$t(`${o}:${t}`);try{if(typeof e=="function")r=await e(t);else{let i=e[t];r=typeof i=="function"?await i():i}}catch(i){console.warn(`Failed to load custom icon "${t}" in "${o}":`,i);return}if(r){let i=r.indexOf("<svg");i>0&&(r=r.slice(i));let{transform:c}=n?.customizations??{};return r=typeof c=="function"?await c(r,o,t):r,r.startsWith("<svg")?await K(n?.customizations?.trimCustomSvg===!0?je(r):r,o,t,n,void 0):(console.warn(`Custom icon "${t}" in "${o}" is not a valid SVG`),r)}}var Me,$t,Ve=v(()=>{"use strict";Me=G(D(),1);ie();Ee();$t=(0,Me.default)("@iconify-loader:custom")});async function X(e,o,t,n){let r,{customize:i}=n?.customizations??{};for(let c of t)if(r=Ie(e,c),r){Rt(`${o}:${c}`);let u={...B};typeof i=="function"&&(r=Object.assign({},r),u=i(u,r,`${o}:${c}`)??u);let{attributes:{width:d,height:g,...s},body:f}=Oe(r,u),m=n?.scale;return await K(`<svg >${f}</svg>`,o,c,n,()=>({...s}),p=>{let C=(a,l)=>{let y=p[a],b;if(!N(y)){if(y)return;typeof m=="number"?m&&(b=L(l??"1em",m)):b=l}b?p[a]=b:delete p[a]};C("width",d),C("height",g)})}}var Ge,Rt,fe=v(()=>{"use strict";oe();ve();W();ie();Ge=G(D(),1);ee();Rt=(0,Ge.default)("@iconify-loader:icon")});var So,U,me=v(()=>{"use strict";Ve();fe();So=G(D(),1),U=async(e,o,t)=>{let n=t?.customCollections?.[e];if(n)if(typeof n=="function"){let r;try{r=await n(o)}catch(i){console.warn(`Failed to load custom icon "${o}" in "${e}":`,i);return}if(r){if(typeof r=="string")return await ue(()=>r,e,o,t);if("icons"in r){let i=[o,o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o.replace(/([a-z])(\d+)/g,"$1-$2")];return await X(r,e,i,t)}}}else return await ue(n,e,o,t)}});function ke(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function re(e){let o=e.startsWith("<svg>")?e.replace("<svg>","<svg >"):e;return!o.includes(" xmlns:xlink=")&&o.includes(" xlink:")&&(o=o.replace("<svg ",'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')),o.includes(" xmlns=")||(o=o.replace("<svg ",'<svg xmlns="http://www.w3.org/2000/svg" ')),ke(o)}me();var ko=G(D(),1);var qe=new Set;function Be(e){qe.has(e)||(console.warn("[unocss]",e),qe.add(e))}me();fe();var pe=["academicons","akar-icons","ant-design","arcticons","
|
|
5
|
+
`).map(o=>o.trim()).join(" ")};De.O=function(e){return this.inspectOpts.colors=this.useColors,Z.inspect(e,this.inspectOpts)}});var D=T((mo,le)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?le.exports=Re():le.exports=Ue()});async function ue(e,o,t,n){let r;$t(`${o}:${t}`);try{if(typeof e=="function")r=await e(t);else{let i=e[t];r=typeof i=="function"?await i():i}}catch(i){console.warn(`Failed to load custom icon "${t}" in "${o}":`,i);return}if(r){let i=r.indexOf("<svg");i>0&&(r=r.slice(i));let{transform:c}=n?.customizations??{};return r=typeof c=="function"?await c(r,o,t):r,r.startsWith("<svg")?await K(n?.customizations?.trimCustomSvg===!0?je(r):r,o,t,n,void 0):(console.warn(`Custom icon "${t}" in "${o}" is not a valid SVG`),r)}}var Me,$t,Ve=v(()=>{"use strict";Me=G(D(),1);ie();Ee();$t=(0,Me.default)("@iconify-loader:custom")});async function X(e,o,t,n){let r,{customize:i}=n?.customizations??{};for(let c of t)if(r=Ie(e,c),r){Rt(`${o}:${c}`);let u={...B};typeof i=="function"&&(r=Object.assign({},r),u=i(u,r,`${o}:${c}`)??u);let{attributes:{width:d,height:g,...s},body:f}=Oe(r,u),m=n?.scale;return await K(`<svg >${f}</svg>`,o,c,n,()=>({...s}),p=>{let C=(a,l)=>{let y=p[a],b;if(!N(y)){if(y)return;typeof m=="number"?m&&(b=L(l??"1em",m)):b=l}b?p[a]=b:delete p[a]};C("width",d),C("height",g)})}}var Ge,Rt,fe=v(()=>{"use strict";oe();ve();W();ie();Ge=G(D(),1);ee();Rt=(0,Ge.default)("@iconify-loader:icon")});var So,U,me=v(()=>{"use strict";Ve();fe();So=G(D(),1),U=async(e,o,t)=>{let n=t?.customCollections?.[e];if(n)if(typeof n=="function"){let r;try{r=await n(o)}catch(i){console.warn(`Failed to load custom icon "${o}" in "${e}":`,i);return}if(r){if(typeof r=="string")return await ue(()=>r,e,o,t);if("icons"in r){let i=[o,o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o.replace(/([a-z])(\d+)/g,"$1-$2")];return await X(r,e,i,t)}}}else return await ue(n,e,o,t)}});function ke(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function re(e){let o=e.startsWith("<svg>")?e.replace("<svg>","<svg >"):e;return!o.includes(" xmlns:xlink=")&&o.includes(" xlink:")&&(o=o.replace("<svg ",'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')),o.includes(" xmlns=")||(o=o.replace("<svg ",'<svg xmlns="http://www.w3.org/2000/svg" ')),ke(o)}me();var ko=G(D(),1);var qe=new Set;function Be(e){qe.has(e)||(console.warn("[unocss]",e),qe.add(e))}me();fe();var pe=["academicons","akar-icons","ant-design","arcticons","basil","bi","bitcoin-icons","bpmn","brandico","bubbles","bx","bxl","bxs","bytesize","carbon","catppuccin","cbi","charm","ci","cib","cif","cil","circle-flags","circum","clarity","codex","codicon","covid","cryptocurrency-color","cryptocurrency","cuida","dashicons","devicon-line","devicon-original","devicon-plain","devicon","dinkie-icons","duo-icons","ei","el","emblemicons","emojione-monotone","emojione-v1","emojione","entypo-social","entypo","eos-icons","ep","et","eva","f7","fa-brands","fa-regular","fa-solid","fa","fa6-brands","fa6-regular","fa6-solid","fa7-brands","fa7-regular","fa7-solid","fad","famicons","fe","feather","file-icons","flag","flagpack","flat-color-icons","flat-ui","flowbite","fluent-color","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","garden","geo","gg","gis","gravity-ui","gridicons","grommet-icons","guidance","healthicons","heroicons-outline","heroicons-solid","heroicons","hugeicons","humbleicons","ic","icomoon-free","icon-park-outline","icon-park-solid","icon-park-twotone","icon-park","iconamoon","iconoir","icons8","il","ion","iwwa","ix","jam","la","lets-icons","line-md","lineicons","logos","ls","lsicon","lucide-lab","lucide","mage","majesticons","maki","map","marketeq","material-icon-theme","material-symbols-light","material-symbols","mdi-light","mdi","medical-icon","memory","meteocons","meteor-icons","mi","mingcute","mono-icons","mynaui","nimbus","nonicons","noto-v1","noto","nrk","octicon","oi","ooui","openmoji","oui","pajamas","pepicons-pencil","pepicons-pop","pepicons-print","pepicons","ph","picon","pixel","pixelarticons","prime","proicons","ps","qlementine-icons","quill","radix-icons","raphael","ri","rivet-icons","si-glyph","si","sidekickicons","simple-icons","simple-line-icons","skill-icons","solar","stash","streamline-block","streamline-color","streamline-cyber-color","streamline-cyber","streamline-emojis","streamline-flex-color","streamline-flex","streamline-freehand-color","streamline-freehand","streamline-guidance","streamline-kameleon-color","streamline-logos","streamline-pixel","streamline-plump-color","streamline-plump","streamline-sharp-color","streamline-sharp","streamline-stickies-color","streamline-ultimate-color","streamline-ultimate","streamline","subway","svg-spinners","system-uicons","tabler","tdesign","teenyicons","token-branded","token","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","unjs","vaadin","vs","vscode-icons","websymbol","weui","whh","wi","wpf","zmdi","zondicons"];var At=3;function Ke(e){return(o={})=>{let{scale:t=1,mode:n="auto",prefix:r="i-",warn:i=!1,iconifyCollectionsNames:c,collections:u,extraProperties:d={},customizations:g={},autoInstall:s=!1,collectionsNodeResolvePath:f,layer:m="icons",unit:p,processor:C}=o,a=Pt(),l={addXmlNs:!0,scale:t,customCollections:u,autoInstall:s,cwd:f,warn:void 0,customizations:{...g,additionalProps:{...d},trimCustomSvg:!0,async iconCustomizer(b,I,h){await g.iconCustomizer?.(b,I,h),p&&(h.width||(h.width=`${t}${p}`),h.height||(h.height=`${t}${p}`))}}},y;return{name:"@unocss/preset-icons",enforce:"pre",options:o,layers:{icons:-30},api:{encodeSvgForCss:re,parseIconWithLoader:We},rules:[[/^([\w:-]+)(?:\?(mask|bg|auto))?$/,async b=>{let[I,h,_=n]=b;y=y||await e(o);let k={},j=await We(h,y,{...l,usedProps:k},c);if(!j){i&&!a.isESLint&&Be(`failed to load icon "${I}"`);return}let E,M=`url("data:image/svg+xml;utf8,${re(j.svg)}")`;return _==="auto"&&(_=j.svg.includes("currentColor")?"mask":"bg"),_==="mask"?E={"--un-icon":M,"-webkit-mask":"var(--un-icon) no-repeat",mask:"var(--un-icon) no-repeat","-webkit-mask-size":"100% 100%","mask-size":"100% 100%","background-color":"currentColor",color:"inherit",...k}:E={background:`${M} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...k},C?.(E,{...j,icon:j.name,mode:_}),E},{layer:m,prefix:r}]]}}}function He(e,o,t=new Map){function n(r){if(pe.includes(r))return t.has(r)||t.set(r,e(`${o}@iconify-json/${r}/icons.json`)),t.get(r)}return async(r,i,c)=>{let u=await U(r,i,c);if(u)return u;let d=await n(r);if(d){let g=[i,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i.replace(/([a-z])(\d+)/g,"$1-$2")];u=await X(d,r,g,c)}return u}}function Pt(){let e=typeof process<"u"&&process.stdout,o=e&&!!process.env.VSCODE_CWD,t=e&&!!process.env.ESLINT;return{isNode:e,isVSCode:o,isESLint:t}}async function We(e,o,t={},n=[]){let r="",i="",c,u=new Set([...pe,...n,...Object.keys(t.customCollections||{})]);if(e.includes(":")){if([r,i]=e.split(":"),!u.has(r))return;c=await o(r,i,t)}else{let d=e.split(/-/g);for(let g=At;g>=1&&(r=d.slice(0,g).join("-"),!(!!u.has(r)&&(i=d.slice(g).join("-"),c=await o(r,i,t),c)));g--);}if(c)return{collection:r,name:i,svg:c}}window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},(()=>{let e=Ke(async o=>{let t=o?.customFetch??(r=>fetch(r).then(i=>i.json())),n=o?.cdn;return n?He(t,n):U});return{presetIcons:o=>e(o)}})());})();
|
package/preset-tagify.global.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a="__TAGIFY__",m=/<([\w:-]+)/g;function f(t){let{prefix:
|
|
1
|
+
"use strict";(()=>{var a="__TAGIFY__",m=/<([\w:-]+)/g;function f(t){let{prefix:e="",excludedTags:i=["b",/^h\d+$/,"table"]}=t;return{name:"tagify",extract({code:n}){return Array.from(n.matchAll(m)).filter(({1:r})=>{for(let o of i)if(typeof o=="string"){if(r===o)return!1}else if(o.lastIndex=0,o.test(r))return!1;return r.startsWith(e)}).map(([,r])=>`${a}${r}`)}}}function p(t){let{extraProperties:e}=t,i=`${a}${t.prefix??""}`;return{name:"tagify",match(n){if(!n.startsWith(i))return;let r=n.slice(i.length),o={matcher:r,selector:s=>s.slice(a.length+1)};return e&&(typeof e=="function"?o.body=s=>[...s,...Object.entries(e(r)??{})]:o.body=s=>[...s,...Object.entries(e)]),o}}}var y=(t={})=>{let{defaultExtractor:e=!0}=t,i=[p(t)],n=[f(t)];return{name:"@unocss/preset-tagify",variants:i,extractors:n,extractorDefault:e?void 0:!1}},c=y;window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},{presetTagify:t=>c(t)});})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{function T(
|
|
1
|
+
"use strict";(()=>{function T(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function A(t){let o=t.length,n=-1,e,r="",a=t.charCodeAt(0);for(;++n<o;){if(e=t.charCodeAt(n),e===0){r+="\uFFFD";continue}if(e===37){r+="\\%";continue}if(e===44){r+="\\,";continue}if(e>=1&&e<=31||e===127||n===0&&e>=48&&e<=57||n===1&&e>=48&&e<=57&&a===45){r+=`\\${e.toString(16)} `;continue}if(n===0&&o===1&&e===45){r+=`\\${t.charAt(n)}`;continue}if(e>=128||e===45||e===95||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122){r+=t.charAt(n);continue}r+=`\\${t.charAt(n)}`}return r}var d=A;function y(t){return t&&typeof t=="object"&&!Array.isArray(t)}function S(t,o,n=!1){let e=t,r=o;if(Array.isArray(r))return n&&Array.isArray(r)?[...e,...r]:[...r];let a={...e};return y(e)&&y(r)&&Object.keys(r).forEach(s=>{y(e[s])&&y(r[s])||Array.isArray(e[s])&&Array.isArray(r[s])?a[s]=S(e[s],r[s],n):Object.assign(a,{[s]:r[s]})}),a}var v=/^\[(.+?)(~?=)"(.*)"\]$/;function R(t){return v.test(t)?t.replace(v,(o,n,e,r)=>`[${d(n)}${e}"${d(r)}"]`):`.${d(t)}`}var M=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"];var C=["%alpha","<alpha-value>"],te=new RegExp(C.map(t=>T(t)).join("|"),"g");var ne=new RegExp(`^(${M.join("|")})\\((.+)\\)$`,"i");function b(t){let{theme:o,generator:n}=t,r=n.config.presets.some(a=>a.name==="@unocss/preset-wind4")?"font":"fontFamily";return{"h1,h2,h3,h4,h5,h6":{color:"var(--un-prose-headings)","font-weight":"600","line-height":1.25},a:{color:"var(--un-prose-links)","text-decoration":"underline","font-weight":"500"},"a code":{color:"var(--un-prose-links)"},"p,ul,ol,pre":{margin:"1em 0","line-height":1.75},blockquote:{margin:"1em 0","padding-left":"1em","font-style":"italic","border-left":".25em solid var(--un-prose-borders)"},h1:{margin:"1rem 0","font-size":"2.25em"},h2:{margin:"1.75em 0 .5em","font-size":"1.75em"},h3:{margin:"1.5em 0 .5em","font-size":"1.375em"},h4:{margin:"1em 0","font-size":"1.125em"},"img,video":{"max-width":"100%"},"figure,picture":{margin:"1em 0"},figcaption:{color:"var(--un-prose-captions)","font-size":".875em"},code:{color:"var(--un-prose-code)","font-size":".875em","font-weight":600,"font-family":o[r]?.mono},":not(pre) > code::before,:not(pre) > code::after":{content:'"`"'},pre:{padding:"1.25rem 1.5rem","overflow-x":"auto","border-radius":".375rem"},"pre,code":{"white-space":"pre","word-spacing":"normal","word-break":"normal","word-wrap":"normal","-moz-tab-size":4,"-o-tab-size":4,"tab-size":4,"-webkit-hyphens":"none","-moz-hyphens":"none",hyphens:"none",background:"transparent"},"pre code":{"font-weight":"inherit"},"ol,ul":{"padding-left":"1.25em"},ol:{"list-style-type":"decimal"},'ol[type="A"]':{"list-style-type":"upper-alpha"},'ol[type="a"]':{"list-style-type":"lower-alpha"},'ol[type="A" s]':{"list-style-type":"upper-alpha"},'ol[type="a" s]':{"list-style-type":"lower-alpha"},'ol[type="I"]':{"list-style-type":"upper-roman"},'ol[type="i"]':{"list-style-type":"lower-roman"},'ol[type="I" s]':{"list-style-type":"upper-roman"},'ol[type="i" s]':{"list-style-type":"lower-roman"},'ol[type="1"]':{"list-style-type":"decimal"},ul:{"list-style-type":"disc"},"ol > li::marker,ul > li::marker,summary::marker":{color:"var(--un-prose-lists)"},hr:{margin:"2em 0",border:"1px solid var(--un-prose-hr)"},table:{display:"block",margin:"1em 0","border-collapse":"collapse","overflow-x":"auto"},"tr:nth-child(2n)":{background:"var(--un-prose-bg-soft)"},"td,th":{border:"1px solid var(--un-prose-borders)",padding:".625em 1em"},abbr:{cursor:"help"},kbd:{color:"var(--un-prose-code)",border:"1px solid",padding:".25rem .5rem","font-size":".875em","border-radius":".25rem"},details:{margin:"1em 0",padding:"1.25rem 1.5rem",background:"var(--un-prose-bg-soft)"},summary:{cursor:"pointer","font-weight":"600"}}}var P=[["headings","h1","h2","h3","h4","h5","h6","th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["kbd"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"]];function x(t){for(let[o,...n]of P)if(o===t)return n.length>0?n:[o]}function E(t){let o="",{escapedSelector:n,selectorName:e,preflights:r,compatibility:a,important:s}=t,l=a?.noColonNot||a?.noColonWhere;for(let p in r){let u=r[p],f=`:not(:where(.not-${e},.not-${e} *))`,h=p.split(",").map(i=>{let c=i.match(/:[():\-\w]+$/g);if(c){let m=c[0];return i=i.replace(m,""),n.map(g=>l?`${g} ${i}${m}`:`${g} :where(${i})${f}${m}`).join(",")}return null}).filter(i=>i);h.length?o+=h.join(","):o+=n.map(i=>l?p.split(",").map(c=>`${i} ${c}`).join(","):`${i} :where(${p})${f}`).join(","),o+="{";for(let i in u){let c=u[i];o+=`${i}:${c}${s?" !important":""};`}o+="}"}return o}function V(t,o){let{compatibility:n,selectorName:e,important:r=!1}=o,a=typeof o?.cssExtend=="function"?o.cssExtend(t.theme):o?.cssExtend,s=Array.from(o.escapedSelectors);return!s[s.length-1].startsWith(".")&&!n?.noColonIs&&(s=[`:is(${s[s.length-1]},.${o.selectorName})`]),typeof r=="string"&&(s=s.map(l=>n?.noColonIs?`${r} ${l}`:`:is(${r}) ${l}`)),E(a?{escapedSelector:s,selectorName:e,preflights:S(b(t),a),compatibility:n,important:r===!0}:{escapedSelector:s,selectorName:e,preflights:b(t),compatibility:n,important:r===!0})}var U=t=>{t?.className&&console.warn('[unocss:preset-typography] "className" is deprecated. Please use "selectorName" instead.');let o=new Set,n=t?.selectorName||t?.className||"prose",e=new RegExp(`^${n}$`),r=new RegExp(`^${n}-([-\\w]+)$`),a=new RegExp(`^${n}-invert$`),s=t?.compatibility?.noColonNot||t?.compatibility?.noColonWhere;return{name:"@unocss/preset-typography",enforce:"post",layers:{typography:-20},rules:[[e,(l,{rawSelector:p})=>(o.add(R(p)),{color:"var(--un-prose-body)","max-width":"65ch"}),{layer:"typography"}],[r,([,l],{theme:p})=>{let u=p.colors?.[l];if(u==null)return;let f=typeof u=="object"?u:{},h={body:700,headings:900,links:900,lists:400,hr:200,captions:500,code:900,borders:200,"bg-soft":100,"invert-body":200,"invert-headings":100,"invert-links":100,"invert-lists":500,"invert-hr":700,"invert-captions":400,"invert-code":100,"invert-borders":700,"invert-bg-soft":800},i={};for(let c in h){let m=h[c],g=f[m]??u,$=!1;for(let w of C)if(g.includes(w)){$=!0,i[`--un-prose-${c}-opacity`]=1,i[`--un-prose-${c}`]=g.replace(w,`var(--un-prose-${c}-opacity)`);break}$||(i[`--un-prose-${c}`]=g)}return i},{layer:"typography"}],[a,()=>({"--un-prose-body":"var(--un-prose-invert-body)","--un-prose-headings":"var(--un-prose-invert-headings)","--un-prose-links":"var(--un-prose-invert-links)","--un-prose-lists":"var(--un-prose-invert-lists)","--un-prose-hr":"var(--un-prose-invert-hr)","--un-prose-captions":"var(--un-prose-invert-captions)","--un-prose-code":"var(--un-prose-invert-code)","--un-prose-borders":"var(--un-prose-invert-borders)","--un-prose-bg-soft":"var(--un-prose-invert-bg-soft)"}),{layer:"typography"}]],variants:[{name:"typography element modifiers",match:l=>{if(l.startsWith(`${n}-`)){let p=new RegExp(`^${n}-(\\w+)[:-].+$`),u=l.match(p)?.[1];if(u){let f=x(u);if(f?.length)return{matcher:l.slice(n.length+u.length+2),selector:h=>{let i=`:not(:where(.not-${n},.not-${n} *))`;return s?f.map(m=>`${h} ${m}`).join(","):`${h} :is(:where(${f})${i})`}}}}}}],preflights:[{layer:"typography",getCSS:l=>{if(o.size>0)return V(l,{escapedSelectors:o,...t,selectorName:n})}}]}},k=U;window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},{presetTypography:t=>k(t)});})();
|