Socket
Socket
Sign inDemoInstall

twind

Package Overview
Dependencies
Maintainers
2
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twind - npm Package Compare versions

Comparing version 1.0.0-next.33 to 1.0.0-next.34

28

CHANGELOG.md
# twind
## 1.0.0-next.34
### Patch Changes
- add animation helper ([`b56b7282`](https://github.com/tw-in-js/twind/commit/b56b7282cb92cbadd70c8d9dd80be54d665093fe))
```js
import { animation, keyframes } from 'twind'
const fadeIn = animation(
'1s ease-out',
keyframes`
0% {
opacity: 0;
}
100% {
opacity: 1;
}
`,
)
```
* BREAKING: removed support for single line comments (`//`) — CSS comments (`/* ... */`) are supported ([`a3191b5f`](https://github.com/tw-in-js/twind/commit/a3191b5ff0bd2b415fe8589f6a369501f239f7c1))
- adjust typings for `injectGlobal`, `keyframes`, and `tx` to handle `.call` and `.apply` correctly ([`b9da668c`](https://github.com/tw-in-js/twind/commit/b9da668c12aa80daedf3240f4b721d25b41fc0c4))
* support arrays for @font-face, @import, and @apply in object notation ([`a3191b5f`](https://github.com/tw-in-js/twind/commit/a3191b5ff0bd2b415fe8589f6a369501f239f7c1))
## 1.0.0-next.33

@@ -4,0 +32,0 @@

2

package.json
{
"name": "twind",
"version": "1.0.0-next.33",
"version": "1.0.0-next.34",
"description": "The core engine without any presets.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -12,11 +12,11 @@ import * as CSS$1 from 'csstype';

'@import'?: MaybeArray<string | Falsey>;
'@font-face'?: CSSFontFace;
'@font-face'?: MaybeArray<CSSFontFace>;
}
interface CustomProperties {
label?: string;
'@apply'?: string | Falsey;
'@apply'?: MaybeArray<string> | Falsey;
}
declare type CSSProperties = CSS$1.PropertiesFallback<string | Falsey, string | Falsey> & CSS$1.PropertiesHyphenFallback<string | Falsey, string | Falsey> & Partial<CustomProperties>;
declare type CSSFontFace = CSS$1.AtRule.FontFaceFallback & CSS$1.AtRule.FontFaceHyphenFallback;
interface CSSNested extends Record<string, CSSProperties | CSSObject | string | Falsey> {
interface CSSNested extends Record<string, CSSProperties | MaybeArray<CSSObject | string> | Falsey> {
}

@@ -44,3 +44,3 @@ declare type CSSBase = BaseProperties & CSSNested;

interface Twind<Theme extends BaseTheme = BaseTheme, Target = unknown> {
(tokens: string): string;
(tokens: StringLike): string;
readonly target: Target;

@@ -154,3 +154,3 @@ readonly theme: ThemeFunction<ExtractUserTheme<Theme>>;

stringify?: StringifyDeclaration<Theme & BaseTheme>;
ignorelist?: (string | RegExp)[];
ignorelist?: MaybeArray<string | RegExp>;
}

@@ -173,4 +173,4 @@ interface TwindUserConfig<Theme = BaseTheme, Presets extends Preset<any>[] = Preset[]> {

* hash(className, defaultHash) {
* if (/^[\w-]*~\(/.test(className)) {
* // a shortcut like `~(...)` or `Button~(...)`
* if (/^[~@]\(/.test(className)) {
* // a shortcut like `~(...)` or apply like `@(...)`
* return defaultHash(className)

@@ -242,2 +242,10 @@ * }

interface AnimationFunction {
(animation: string | CSSProperties, waypoints: StringLike): StringLike;
}
declare type Animation = AnimationFunction & {
[label: string]: AnimationFunction;
};
declare const animation: Animation;
declare function toColorValue(color: ColorValue, options?: ColorFunctionOptions): string;

@@ -361,2 +369,9 @@

interface InjectGlobalFunction {
(style: CSSBase | string): void;
(strings: TemplateStringsArray, ...interpolations: readonly CSSValue[]): void;
bind(thisArg?: ((tokens: string) => string) | undefined | void): InjectGlobalFunction;
call(thisArg: ((tokens: string) => string) | undefined | void, style: CSSBase | string): void;
apply(thisArg: ((tokens: string) => string) | undefined | void, args: [CSSBase | string]): void;
}
/**

@@ -367,4 +382,3 @@ * Injects styles into the global scope and is useful for applications such as gloabl styles, CSS resets or font faces.

*/
declare function injectGlobal(this: ((tokens: string) => string) | undefined | void, style: CSSNested | string): void;
declare function injectGlobal(this: ((tokens: string) => string) | undefined | void, strings: TemplateStringsArray, ...interpolations: readonly CSSValue[]): void;
declare const injectGlobal: InjectGlobalFunction;

@@ -462,2 +476,6 @@ declare function auto(setup: () => void): () => void;

};
call(thisArg: ((tokens: string) => string) | undefined | void, style: CSSObject | string): StringLike;
call(thisArg: ((tokens: string) => string) | undefined | void, strings: TemplateStringsArray, ...interpolations: readonly CSSValue[]): StringLike;
apply(thisArg: ((tokens: string) => string) | undefined | void, args: [CSSObject | string]): StringLike;
apply(thisArg: ((tokens: string) => string) | undefined | void, args: [CSSObject | string] | [strings: TemplateStringsArray, ...interpolations: readonly CSSValue[]]): StringLike;
}

@@ -635,2 +653,10 @@ declare type Keyframes = KeyframesFunction & {

interface TxFunction {
(...classes: Class[]): string;
(strings: TemplateStringsArray, ...interpolations: readonly Class[]): string;
bind(thisArg?: ((tokens: string) => string) | undefined | void): TxFunction;
call(thisArg: ((tokens: string) => string) | undefined | void, ...classes: Class[]): string;
call(thisArg: ((tokens: string) => string) | undefined | void, strings: TemplateStringsArray, ...interpolations: readonly Class[]): string;
apply(thisArg: ((tokens: string) => string) | undefined | void, classes: Class[] | [strings: TemplateStringsArray, ...interpolations: readonly Class[]]): string;
}
/**

@@ -671,3 +697,3 @@ * Combines {@link tw} and {@link cx}.

*/
declare function tx(this: ((tokens: string) => string) | undefined | void, strings: TemplateStringsArray | Class, ...interpolations: Class[]): string;
declare const tx: TxFunction;

@@ -694,3 +720,3 @@ declare function cssom(element?: CSSStyleSheet | Element | null | false): Sheet<CSSStyleSheet>;

export { BaseProperties, BaseTheme, CSSBase, CSSFontFace, CSSNested, CSSObject, CSSProperties, CSSValue, Class, ClassObject, ColorFromThemeOptions, ColorFromThemeValue, ColorFunction, ColorFunctionOptions, ColorRecord, ColorValue, Context, CustomProperties, DarkModeConfig, DefaultVariants, ExtractResult, ExtractThemes, Falsey, FilterByThemeValue, HashFunction, InlineMinify, InlineOptions, KebabCase, Keyframes, KeyframesFunction, MatchConverter, MatchResult, MaybeArray, MaybeColorValue, MaybeThunk, MorphVariant, Nested, NestedFunction, PartialTheme, Preflight, PreflightThunk, Preset, PresetThunk, PropsOf, Rule, RuleResolver, RuleResult, ScreenValue, Sheet, SheetRule, StrictMorphVariant, StringLike, StringifyDeclaration, Style, StyleConfig, StyleFunction, StyleProps, StyleToken, StyleTokenValue, ThemeConfig, ThemeFunction, ThemeMatchConverter, ThemeMatchResult, ThemeRuleResolver, ThemeSection, ThemeSectionResolver, ThemeSectionResolverContext, ThemeValue, Twind, TwindConfig, TwindPresetConfig, TwindRule, TwindUserConfig, TypedAtRules, Variant, VariantResolver, VariantResult, VariantsProps, When, apply, arbitrary, asArray, auto, colorFromTheme, consume, css, cssom, cx, defineConfig, dom, escape, extract, fromTheme, getSheet, hash, identity, injectGlobal, inline, keyframes, mql, noop, observe, setup, shortcut, stringify, style, toColorValue, tw, twind, tx, virtual };
export { Animation, AnimationFunction, BaseProperties, BaseTheme, CSSBase, CSSFontFace, CSSNested, CSSObject, CSSProperties, CSSValue, Class, ClassObject, ColorFromThemeOptions, ColorFromThemeValue, ColorFunction, ColorFunctionOptions, ColorRecord, ColorValue, Context, CustomProperties, DarkModeConfig, DefaultVariants, ExtractResult, ExtractThemes, Falsey, FilterByThemeValue, HashFunction, InjectGlobalFunction, InlineMinify, InlineOptions, KebabCase, Keyframes, KeyframesFunction, MatchConverter, MatchResult, MaybeArray, MaybeColorValue, MaybeThunk, MorphVariant, Nested, NestedFunction, PartialTheme, Preflight, PreflightThunk, Preset, PresetThunk, PropsOf, Rule, RuleResolver, RuleResult, ScreenValue, Sheet, SheetRule, StrictMorphVariant, StringLike, StringifyDeclaration, Style, StyleConfig, StyleFunction, StyleProps, StyleToken, StyleTokenValue, ThemeConfig, ThemeFunction, ThemeMatchConverter, ThemeMatchResult, ThemeRuleResolver, ThemeSection, ThemeSectionResolver, ThemeSectionResolverContext, ThemeValue, Twind, TwindConfig, TwindPresetConfig, TwindRule, TwindUserConfig, TxFunction, TypedAtRules, Variant, VariantResolver, VariantResult, VariantsProps, When, animation, apply, arbitrary, asArray, auto, colorFromTheme, consume, css, cssom, cx, defineConfig, dom, escape, extract, fromTheme, getSheet, hash, identity, injectGlobal, inline, keyframes, mql, noop, observe, setup, shortcut, stringify, style, toColorValue, tw, twind, tx, virtual };
//# sourceMappingURL=twind.d.ts.map

@@ -1,1 +0,1 @@

const twind=function(a){"use strict";function b(a,b){return Math.round(parseInt(a,16)*b)}function c(a,c={}){if("function"==typeof a)return a(c);const{opacityValue:d="1",opacityVariable:e}=c,f=e?`var(${e})`:d;if("1"==f)return a;if("0"==f)return"#0000";if("#"==a[0]&&(4==a.length||7==a.length)){const g=(a.length-1)/3,h=[17,1,0.062272][g-1];return`rgba(${[b(a.substr(1,g),h),b(a.substr(1+g,g),h),b(a.substr(1+2*g,g),h),f,]})`}return a}function d(a,b){return a!=b&&""+a.split(" ").sort()!=""+b.split(" ").sort()}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{},d=Object.keys(c);"function"==typeof Object.getOwnPropertySymbols&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(a){return Object.getOwnPropertyDescriptor(c,a).enumerable}))),d.forEach(function(b){e(a,b,c[b])})}return a}function g(a,b){if(null==a)return{};var c,d,e=function(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],b.indexOf(c)>=0||(e[c]=a[c]);return e}(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],!(b.indexOf(c)>=0)&&Object.prototype.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}const h="undefined"!=typeof CSS&&CSS.escape||(a=>a.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function i(a){for(var b=9,c=a.length;c--;)b=Math.imul(b^a.charCodeAt(c),1597334677);return"#"+((b^b>>>9)>>>0).toString(36)}function j(a,b="@media "){return b+k(a).map(a=>("string"==typeof a&&(a={min:a}),a.raw||Object.keys(a).map(b=>`(${b}-width:${a[b]})`).join(" and "))).join(",")}function k(a=[]){return Array.isArray(a)?a:null==a?[]:[a]}function l(a){return a}function m(){}function n(a){return[...a.v,(a.i?"!":"")+a.n].join(":")}const o={d:0,b:134217728,c:268435456,s:671088640,u:805306368,o:939524096};function p(a,b){return a& ~o.o|b}function q(a){var b;return(null===(b=a.match(/[-=:;]/g))|| void 0===b?void 0:b.length)||0}function r(a){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(a)?+RegExp.$1/(RegExp.$2?15:1)/10:0,15)<<22|Math.min(q(a),15)<<18}const s=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire",];function t(a){return 1<< ~(/:([a-z-]+)/.test(a)&& ~s.indexOf(RegExp.$1.slice(2,7))|| -18)}function u(a){return"-"==a[0]?0:q(a)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7}$)|([fl].{5}l|g.{8}$|pl))/.test(a)?+!!RegExp.$1||-!!RegExp.$2:0)+1}function v({n:a,i:b,v:c=[]},d,e,f){for(const g of(a&&(a=n({n:a,i:b,v:c})),f=[...k(f)],c)){const h=d.theme("screens",g),i=h&&j(h)||d.v(g);f.push(i),e|=h?67108864|r(i):"dark"==g?1073741824:"@"==i[0]?r(i):t(i)}return{n:a,p:e,r:f,i:b}}const w=new Intl.Collator("en",{numeric:!0});function x(a,b){for(var c=0,d=a.length;c<d;){const e=d+c>>1;0>=y(a[e],b)?c=e+1:d=e}return d}function y(a,b){const c=a.p&o.o;return c==(b.p&o.o)&&(c==o.b||c==o.o)?0:a.p-b.p||a.o-b.o||w.compare(a.n,b.n)}function z(a){if(a.d){const b=[],c=A(a.r.reduce((a,c)=>"@"==c[0]?(b.push(c),a):c?C(a,c):a,"&"),b=>B(b,a.n?"."+h(a.n):""));return c&&b.push(c.replace(/:merge\((.+?)\)/g,"$1")),b.reduceRight((a,b)=>b+"{"+a+"}",a.d)}}function A(a,b){return a.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(a,c,d)=>b(c)+d)}function B(a,b){return a.replace(/&/g,b)}function C(a,b){return A(a,a=>A(b,b=>{const c=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(b);if(c){const d=a.indexOf(c[1]);return~d?a.slice(0,d)+c[0]+a.slice(d+c[1].length):B(a,b)}return B(b,a)}))}function D(a,b=[]){const c={};for(const d in a){const e=a[d],f="DEFAULT"==d?b:[...b,d];"object"==typeof e&&Object.assign(c,D(e,f)),c[f.join("-")]=e,"DEFAULT"==d&&(c[[...b,d].join("-")]=e)}return c}function E(a,b,c,d,e){for(const f of b){let g=c.get(f);g||c.set(f,g=d(f));const h=g(a,e);if(h)return h}}function F(a){return H(a[0],a[1])}function G(a){return Array.isArray(a)?I(a[0],a[1],a[2]):I(a)}function H(a,b){return K(a,"function"==typeof b?b:()=>b)}function I(a,b,c){return K(a,b?"function"==typeof b?b:"string"==typeof b&&/^[\w-]+$/.test(b)?(a,d)=>({[b]:c?c(a,d):J(a.input,a.slice(1).find(Boolean)||a.$$||a.input)}):()=>b:a=>({[a[1]]:J(a.input,a.slice(2).find(Boolean)||a.$$||a.input)}))}function J(a,b){return"-"==a[0]?`calc(${b} * -1)`:b}function K(a,b){return L(a,(a,c,d)=>{const e=c.exec(a);if(e)return e.$$=a.slice(e[0].length),b(e,d)})}function L(a,b){const c=k(a).map(M);return(a,d)=>{for(const e of c){const f=b(a,e,d);if(f)return f}}}function M(a){return"string"==typeof a?new RegExp("^"+a+(a.includes("$")||"-"==a.slice(-1)?"":"$")):a}const N=new Map();function O(a,b){return N.set(a,b),a}function P(a,b,c,d){return O(a,(a,e)=>{const{n:f,p:g,r:h,i:i}=v(a,e,b);return c&&aa(f,b,c,e,g,h,i,d)})}function Q(a,b=","){return a.map(n).join(b)}function R(a,b){if("("!=a[a.length-1]){const c=[];let d=!1,e=!1,f="";for(let g of a)if(!("("==g||/[~@]$/.test(g))){if("!"==g[0]&&(g=g.slice(1),d=!d),g.endsWith(":")){c["dark:"==g?"unshift":"push"](g.slice(0,-1));continue}"-"==g[0]&&(g=g.slice(1),e=!e),g.endsWith("-")&&(g=g.slice(0,-1)),g&&"&"!=g&&(f+=(f&&"-")+g)}f&&(e&&(f="-"+f),b[0].push({n:f,v:c.filter(S),i:d}))}}function S(a,b,c){return c.indexOf(a)==b}function T(a){return a.replace(/\/\*[^]*?\*\/|\/\/[^]*?$|\s\s+|\n/gm," ")}const U=new Map();function V(a){let b=U.get(a);if(!b){a=T(a);const c=[],d=[[]];let e=0,f=0,g=0;const h=(b,f=0)=>{e!=g&&(c.push(a.slice(e,g+f)),b&&R(c,d)),e=g+1};for(;g<a.length;g++){const j=a[g];if(f)"\\"!=a[g-1]&&(f+=+("["==j)||-("]"==j));else if("["==j)f+=1;else if("("==j)h(),c.push(j);else if(":"==j)":"!=a[g+1]&&h(!1,1);else if(/[\s,)]/.test(j)){h(!0);let k=c.lastIndexOf("(");if(")"==j){const l=c[k-1];if(/[~@]$/.test(l)){const m=d.shift();c.length=k,R([...c,"#"],d);const{v:n}=d[0].pop();for(const p of m)p.v.splice(+("dark"==p.v[0])- +("dark"==n[0]),n.length);R([...c,P(l.length>1?l.slice(0,-1)+i(JSON.stringify([l,m])):l+"("+Q(m)+")",o.s,m,/@$/.test(l)),],d)}k=c.lastIndexOf("(",k-1)}c.length=k+1}else/[~@]/.test(j)&&"("==a[g+1]&&d.unshift([])}h(!0),U.set(a,b=d[0])}return b}function W(a,b,c,d,e=[]){return X(a,v(b,c,d,e),c)}function X(a,{n:b,p:c,r:d=[],i:e},f){const g=[];let h="",l=0,m=0;for(let n in a||{}){const q=a[n];if("@"==n[0]){if(!q)continue;if("a"==n[1]){g.push(...aa(b,c,V(q),f,c,d,e,!0));continue}if("l"==n[1]){for(const s of k(q))g.push(...X(s,{n:b,p:p(c,o[n[7]]),r:d,i:e},f));continue}if("i"==n[1]){g.push({p:-1,o:0,r:[],d:k(q).filter(Boolean).map(a=>n+" "+a).join(";")});continue}if("k"==n[1]||"f"==n[1]){g.push({p:o.d,o:0,r:[n],d:X(q,{p:o.d},f).map(z).join("")});continue}}if("object"!=typeof q||Array.isArray(q))"label"==n&&q?b=q+i(JSON.stringify([c,e,a])):(q||0===q)&&(m+=1,l=Math.max(l,u(n=n.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()))),h+=(h?";":"")+k(q).map(a=>f.s(n,Y(""+a,f)+(e?" !important":""))).join(";"));else if("@"==n[0]||n.includes("&")){let t=c;"@"==n[0]&&(t|=r(n=n.replace(/\bscreen\(([^)]+)\)/g,(a,b)=>{const c=f.theme("screens",b);return c?(t|=67108864,j(c,"")):a}))),g.push(...X(q,{n:b,p:t,r:[...d,n],i:e},f))}else g.push(...X(q,{p:c,r:[n]},f))}return g.unshift({n:b&&f.h(b),p:c,o:Math.max(0,15-m)+1.5*Math.min(l||15,15),r:d,d:h}),g.sort(y)}function Y(a,b){return a.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(a,c,d,e,f)=>b.theme(d,f))}function Z(a,b){const c=[];let d;for(const e of a)e.d?(null==d?void 0:d.p)==e.p&&""+d.r==""+e.r?(d.c=[d.c,e.c].filter(Boolean).join(" "),d.d=[d.d,e.d].filter(Boolean).join(";")):c.push(d=f({},e,{n:e.n&&b})):c.push(f({},e,{n:e.n&&b}));return c}function $(a,b,c=o.u,d,e){const f=[];for(const g of a)for(const h of _(g,b,c,d,e))f.splice(x(f,h),0,h);return f}function _(a,b,c,d,e){var g;a=f({},a,{i:a.i||e});const h=function(a,b){const c=N.get(a.n);return c?c(a,b):b.r(a.n)}(a,b);return h?"string"==typeof h?({r:d,p:c}=v(a,b,c,d),Z($(V(h),b,c,d,a.i),a.n)):Array.isArray(h)?h.map(a=>f({o:0},a,{r:[...k(d),...k(a.r)],p:p(c,null!==(g=a.p)&& void 0!==g?g:c)})):W(h,a,b,c,d):[{c:n(a),p:0,o:0,r:[]}]}function aa(a,b,c,d,e,g,h,i){return Z((i?c.flatMap(a=>$([a],d,e,g,h)):$(c,d,e,g,h)).map(a=>a.p&o.o&&(a.n||b==o.b)?f({},a,{p:p(a.p,b),o:0}):a),a)}function ba(a){var{presets:b=[]}=a,c=g(a,["presets"]);let d={preflight:!1!==c.preflight&&[],darkMode:void 0,theme:{},variants:k(c.variants),rules:k(c.rules),ignorelist:k(c.ignorelist),hash:c.hash,stringify:c.stringify||ca};for(const e of k([...b,{darkMode:c.darkMode,preflight:!1!==c.preflight&&k(c.preflight),theme:c.theme},])){const{preflight:h,darkMode:i=d.darkMode,theme:j,variants:l,rules:m,hash:n=d.hash,ignorelist:o,stringify:p=d.stringify}="function"==typeof e?e(d):e;d={preflight:!1!==d.preflight&& !1!==h&&[...d.preflight,...k(h)],darkMode:i,theme:f({},d.theme,j,{extend:f({},d.theme.extend,null==j?void 0:j.extend)}),variants:[...d.variants,...k(l)],rules:[...d.rules,...k(m)],ignorelist:[...d.ignorelist,...k(o)],hash:n,stringify:p}}return d}function ca(a,b){return a+":"+b}function da(a,b){const c=ba(a),d=function({theme:a,darkMode:b,variants:c,rules:d,hash:e,stringify:f,ignorelist:j}){const k=new Map(),m=new Map(),n=new Map(),o=new Map(),p=L(j,(a,b)=>b.test(a));return c.push(["dark","class"==b?".dark &":"string"==typeof b&&"media"!=b?b:"@media (prefers-color-scheme:dark)",]),{theme:(function(a){var{extend:b={}}=a,c=g(a,["extend"]);const d={},e={colors:f("colors"),theme:f,negative(){return{}},breakpoints(a){const b={};for(const c in a)"string"==typeof a[c]&&(b["screen-"+c]=a[c]);return b}};function f(a,e,g){if(a){var i;if(/[.[]/.test(a)){const j=[];a.replace(/\[([^\]]+)\]|([^.[]+)/g,(a,b,c=b)=>j.push(c)),a=j.shift(),g=e,e=j.join("-")}const k=d[a]||Object.assign(Object.assign(d[a]={},h(c,a)),h(b,a));return null==e?k:null!==(i=k[e||"DEFAULT"])&& void 0!==i?i:g}const l={};for(const m in c)l[m]=f(m);return l}function h(a,b){let c=a[b];return("function"==typeof c&&(c=c(e)),c&&/color/i.test(b))?D(c):c}return f})(a),e:h,h:"function"==typeof e?a=>e(a,i):e?i:l,s(a,b){return f(a,b,this)},v(a){return k.has(a)||k.set(a,E(a,c,m,F,this)||"&:"+a),k.get(a)},r(a){return n.has(a)||n.set(a,!p(a,this)&&E(a,d,o,G,this)),n.get(a)}}}(c),e=new Map(),j=[],m=new Set();function n(a){a=f({},a,{n:a.n&&d.h(a.n)});const c=z(a);if(c&&!m.has(c)){m.add(c);const e=x(j,a);b.insert(c,e,a),j.splice(e,0,a)}return a.n}return b.resume(a=>e.set(a,a),(a,c)=>{b.insert(c,j.length,a),j.push(a),m.add(c)}),Object.defineProperties(function(a){if(!e.size)for(let b of k(c.preflight))"function"==typeof b&&(b=b(d)),b&&("string"==typeof b?aa("",o.b,V(b),d,o.b,[],!1,!0):W(b,{},d,o.b)).forEach(n);let f=e.get(a);if(!f){const g=new Set();for(const h of $(V(a),d))g.add(h.c).add(n(h));f=[...g].filter(Boolean).join(" "),e.set(a,f).set(f,f)}return f},Object.getOwnPropertyDescriptors({get target(){return b.target},theme:d.theme,config:c,clear(){b.clear(),m.clear(),e.clear(),j.length=0},destroy(){this.clear(),b.destroy()}}))}function ea(a=la,b=document.documentElement){if(!b)return a;const c=new MutationObserver(f);c.observe(b,{attributeFilter:["class"],subtree:!0,childList:!0}),g(b),f([{target:b,type:""}]);const{destroy:e}=a;function f(a){for(const{type:b,target:d}of a)"a"==b[0]?g(d):d.querySelectorAll("[class]").forEach(g);c.takeRecords()}function g(b){const c=b.getAttribute("class");let e;c&&d(c,e=a(c))&&b.setAttribute("class",e)}return a.destroy=()=>{c.disconnect(),e.call(a)},a}function fa(a){let b=a||document.querySelector("style[data-twind]");return b&&"STYLE"==b.tagName||((b=document.createElement("style")).dataset.twind="",document.head.prepend(b)),b}function ga(a){var b;const c=(null===(b=a)|| void 0===b?void 0:b.cssRules)?a:fa(a).sheet;return{target:c,clear(){for(let a=c.cssRules.length;a--;)c.deleteRule(a)},destroy(){var a;null===(a=c.ownerNode)|| void 0===a||a.remove()},insert(a,b){try{c.insertRule(a,b)}catch(d){c.insertRule(":root{}",b),/:-[mwo]/.test(a)||console.warn(d,a)}},resume:m}}function ha(a){const b=fa(a);return{target:b,clear(){b.innerHTML=""},destroy(){b.remove()},insert(a,c){b.insertBefore(document.createTextNode(a),b.childNodes[c]||null)},resume:m}}function ia(a,b){const c=a?ha():ga();return b||(c.resume=ka),c}function ja(a){var b;return(null===(b=a.ownerNode||a)|| void 0===b?void 0:b.textContent)||(a.cssRules?Array.from(a.cssRules,a=>a.cssText):k(a)).join("")}function ka(a,b){const c=ja(this.target),d=/\/\*!([\da-z]+),([\da-z]+)(?:,(.+?))?\*\//g;if(d.test(c)){for(const e of(d.lastIndex=0,this.clear(),document.querySelectorAll("[class]")))a(e.getAttribute("class"));let f,g=0;for(;(function(a){var d;return f&&b({p:g+=parseInt(f[1],36),o:parseInt(f[2],36)/2,n:null!==(d=f[3])&& void 0!==d?d:void 0},c.slice(f.index+f[0].length,null==a?void 0:a.index)),f=a})(d.exec(c)););}}const la=Object.defineProperties(function(...a){return ma(...a)},Object.getOwnPropertyDescriptors({get target(){return ma.target},theme(...a){return ma.theme(...a)},get config(){return ma.config},clear(){return ma.clear()},destroy(){return ma.destroy()}}));let ma;function na(a,b=la){let c="",e=0;return oa(a,(f,g,h)=>{const i=a.slice(f,g),j=b(i);d(i,j)&&(h=h?"":"\"",c+=a.slice(e,f)+h+j+h,e=g)}),c+a.slice(e,a.length)}function oa(a,b){let c=1,d=0,e="",f="";const g=a=>{5==c&&"class"==f&&b(d,a,e)};for(let h=0;h<a.length;h++){const i=a[h];1==c?"<"==i&&(c="!--"==a.substr(h+1,3)?4:3):4==c?">"==i&&"--"==a.slice(h-2,h)&&(c=1):e?i==e&&"\\"!=a[h-1]&&(g(h),c=2,e=""):"\""==i||"'"==i?(e=i,d+=1):">"==i?(g(h),c=1):c&&("="==i?(f=a.slice(d,h),c=5,d=h+1):"/"==i&&(c<5||">"==a[h+1])?(g(h),c=0):/\s/.test(i)&&(g(h),c=2,d=h+1))}}function pa(a,b,c){return b.reduce((b,d,e)=>b+c(d)+a[e+1],a[0])}function qa(a,b){return Array.isArray(a)?sa(pa(a,b,a=>null!=a&&"boolean"!=typeof a?a:"")):"string"==typeof a?sa(a):[a]}const ra=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function sa(a){a=T(a);const b=[],c=[];let d;for(;d=ra.exec(a);)d[4]&&c.pop(),d[3]?c.push(d[3]):d[4]||b.push(c.reduceRight((a,b)=>({[b]:a}),{[d[1]]:d[2]}));return b}function ta(a,...b){var c;const d=qa(a,b),e=((null===(c=d.find(a=>a.label))|| void 0===c?void 0:c.label)||"css")+i(JSON.stringify(d));return O(e,(a,b)=>Z(d.flatMap(c=>W(c,a,b,o.o)),e))}function ua(a,b){return Array.isArray(a)&&Array.isArray(a.raw)?pa(a,b,a=>va(a).trim()):b.filter(Boolean).reduce((a,b)=>a+va(b),a?va(a):"")}function va(a){let b="",c;if(a&&"object"==typeof a)if(Array.isArray(a))(c=ua(a[0],a.slice(1)))&&(b+=" "+c);else for(const d in a)a[d]&&(b+=" "+d);else null!=a&&"boolean"!=typeof a&&(b+=" "+a);return b}function wa(a,b=la){return b.clear(),{html:na(a,b),css:ja(b.target)}}const xa=ya();function ya(a){return new Proxy(function(b,...c){return za(a,"",b,c)},{get(b,c){return"bind"===c?ya:c in b?b[c]:function(b,...d){return za(a,c,b,d)}}})}function za(a,b,c,d){const e=qa(c,d),f=h(b+i(JSON.stringify([b,e])));return{toString(){return("function"==typeof a?a:la)(ta({[`@keyframes ${f}`]:qa(c,d)})),f}}}const Aa=Ca("@"),Ba=Ca("~");function Ca(a){function b(b,c,d){return Q(V(b+a+"("+ua(c,d)+")"))}return new Proxy(function(a,...c){return b("",a,c)},{get(a,c){return c in a?a[c]:function(a,...d){return b(c,a,d)}}})}function Da(a,b,c){if("["==a[0]&&"]"==a.slice(-1)){if(a=Y(a.slice(1,-1),c),/color|fill|stroke/i.test(b)){if(/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(a))return a}else if(!/image/i.test(b))return a.includes("calc(")&&(a=a.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 ")),a.replace(/(^|[^\\])_+(?![^(]*\))/g,(a,b)=>b+" ".repeat(a.length-1)).replace(/\\_(?![^(]*\))/g,"_");else if(/^[a-z-]+\(/.test(a))return a}}function Ea(a){return a.replace(/-./g,a=>a[1].toUpperCase())}function Fa(a={},b){const{label:c="style",base:d,props:e={},defaults:g,when:j=[]}=a,k=f({},null==b?void 0:b.defaults,g),l=i(JSON.stringify([c,null==b?void 0:b.className,d,e,k,j])),m=n("",d||"",o.c);function n(a,d,e){return P(((b?b.className.replace(/#.+$/,"~"):"")+c+a+l).replace(/[: ,()[\]]/,""),e,d&&V(d))}return Object.defineProperties(function(a){let c;Array.isArray(a)&&(c=!0,a=Object.fromEntries(new URLSearchParams(a[1]).entries()));const d=f({},k,a);let g=c?"":(b?b(d)+" ":"")+m,h;for(const i in e){const l=e[i],o=d[i];if(o===Object(o)){let p="";for(const q in h="",o){const r=l[o[q]];r&&(p+="@"+q+"-"+o[q],h+=(h&&" ")+("_"==q?r:q+":("+r+")"))}h&&(g+=" "+n("--"+i+"-"+p,h,402653184))}else(h=l[o])&&(g+=" "+n("--"+i+"-"+o,h,402653184))}return j.forEach((a,b)=>{let c="";for(const e in a[0]){const f=d[e];if(f!==Object(f)&&""+f==""+a[0][e])c+=(c&&"_")+e+"-"+f;else{c="";break}}c&&(h=a[1])&&(g+=" "+n("-"+b+"--"+c,h,536870912))}),g},Object.getOwnPropertyDescriptors({className:m,defaults:k,selector:"."+h(m)}))}return a.apply=Aa,a.arbitrary=Da,a.asArray=k,a.auto=function(a){if(document.currentScript){const b=()=>c.disconnect(),c=new MutationObserver(c=>{for(const{target:d}of c)if(d===document.body)return a(),b()});return c.observe(document.documentElement,{childList:!0,subtree:!0}),b}return m},a.colorFromTheme=function(a={},b){return(d,e)=>{const{section:f=Ea(d[0]).replace("-","")+"Color"}=a;if(!/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/.test(d.$$))return;const{$1:g,$2:h}=RegExp,i=e.theme(f,g)||Da(g,f,e);if(!i)return;const{opacityVariable:j=`--tw-${d[0].replace(/-$/,"")}-opacity`,opacitySection:k=f.replace("Color","Opacity"),property:l=f,selector:m}=a,n=e.theme(k,h||"DEFAULT")||h&&Da(h,k,e),o=c(i,{opacityVariable:j||void 0,opacityValue:n||void 0});if(b)return d._={value:o,color:a=>c(i,a)},b(d,e);const p={};return j&&o.includes(j)&&(p[j]=n||"1"),p[l]=o,m?{[m]:p}:p}},a.consume=na,a.css=ta,a.cssom=ga,a.cx=function(a,...b){return Q(V(ua(a,b))," ")},a.defineConfig=ba,a.dom=ha,a.escape=h,a.extract=wa,a.fromTheme=function(a,b,c){const d=b?"string"==typeof b?(a,d)=>({[b]:c?c(a,d):a._}):b:({1:a,_:b},c,d)=>({[a||d]:b});return(b,c)=>{var e;const f=Ea(a||b[1]),g=null!==(e=c.theme(f,b.$$))&& void 0!==e?e:Da(b.$$,f,c);if(null!=g)return b._="-"==b.input[0]?`calc(${g} * -1)`:g,d(b,c,f)}},a.getSheet=ia,a.hash=i,a.identity=l,a.injectGlobal=function(a,...b){("function"==typeof this?this:la)(ta({"@layer base":qa(a,b)}))},a.inline=function(a,b={}){const{tw:c=la,minify:d=l}="function"==typeof b?{tw:b}:b,{html:e,css:f}=wa(a,c);return e.replace("</head>",`<style data-twind>${d(f,e)}</style></head>`)},a.keyframes=xa,a.mql=j,a.noop=m,a.observe=ea,a.setup=function(a={},b=ia(),c){var d;const e=!ma;return e||ma.destroy(),ma=ea(da(a,b),c),e&&(document.activeElement||null===(d=document.querySelector("[autofocus]"))|| void 0===d||d.focus()),ma},a.shortcut=Ba,a.stringify=ja,a.style=(a,b)=>"function"==typeof a?Fa(b,a):Fa(a),a.toColorValue=c,a.tw=la,a.twind=da,a.tx=function(a,...b){return("function"==typeof this?this:la)(ua(a,b))},a.virtual=function(a){const b=[],c=[];return{get target(){return a?b.map((a,b)=>{var d;const e=c[b],f=e.p-((null===(d=c[b-1])|| void 0===d?void 0:d.p)||0);return`/*!${f.toString(36)},${(2*e.o).toString(36)}${e.n?","+e.n:""}*/${a}`}):b},clear(){b.length=0},destroy(){this.clear()},insert(a,d,e){b.splice(d,0,a),c.splice(d,0,e)},resume:m}},a}({})//# sourceMappingURL=twind.global.js.map
const twind=function(a){"use strict";function b(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function c(a){for(var c=1;c<arguments.length;c++){var d=null!=arguments[c]?arguments[c]:{},e=Object.keys(d);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(d).filter(function(a){return Object.getOwnPropertyDescriptor(d,a).enumerable}))),e.forEach(function(c){b(a,c,d[c])})}return a}function d(a,b){if(null==a)return{};var c,d,e=function(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],b.indexOf(c)>=0||(e[c]=a[c]);return e}(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],!(b.indexOf(c)>=0)&&Object.prototype.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}const e=new Map();function f(a,b){return e.set(a,b),a}const g="undefined"!=typeof CSS&&CSS.escape||(a=>a.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function h(a){for(var b=9,c=a.length;c--;)b=Math.imul(b^a.charCodeAt(c),1597334677);return"#"+((b^b>>>9)>>>0).toString(36)}function i(a,b="@media "){return b+j(a).map(a=>("string"==typeof a&&(a={min:a}),a.raw||Object.keys(a).map(b=>`(${b}-width:${a[b]})`).join(" and "))).join(",")}function j(a=[]){return Array.isArray(a)?a:null==a?[]:[a]}function k(a){return a}function l(){}function m(a){return[...a.v,(a.i?"!":"")+a.n].join(":")}const n={d:0,b:134217728,c:268435456,s:671088640,u:805306368,o:939524096};function o(a,b){return a& ~n.o|b}function p(a){var b;return(null===(b=a.match(/[-=:;]/g))|| void 0===b?void 0:b.length)||0}function q(a){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(a)?+RegExp.$1/(RegExp.$2?15:1)/10:0,15)<<22|Math.min(p(a),15)<<18}const r=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire",];function s(a){return 1<< ~(/:([a-z-]+)/.test(a)&& ~r.indexOf(RegExp.$1.slice(2,7))|| -18)}function t(a){return"-"==a[0]?0:p(a)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7}$)|([fl].{5}l|g.{8}$|pl))/.test(a)?+!!RegExp.$1||-!!RegExp.$2:0)+1}function u({n:a,i:b,v:c=[]},d,e,f){for(const g of(a&&(a=m({n:a,i:b,v:c})),f=[...j(f)],c)){const h=d.theme("screens",g),k=h&&i(h)||d.v(g);f.push(k),e|=h?67108864|q(k):"dark"==g?1073741824:"@"==k[0]?q(k):s(k)}return{n:a,p:e,r:f,i:b}}function v(a){if(a.d){const b=[],c=w(a.r.reduce((a,c)=>"@"==c[0]?(b.push(c),a):c?y(a,c):a,"&"),b=>x(b,a.n?"."+g(a.n):""));return c&&b.push(c.replace(/:merge\((.+?)\)/g,"$1")),b.reduceRight((a,b)=>b+"{"+a+"}",a.d)}}function w(a,b){return a.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(a,c,d)=>b(c)+d)}function x(a,b){return a.replace(/&/g,b)}function y(a,b){return w(a,a=>w(b,b=>{const c=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(b);if(c){const d=a.indexOf(c[1]);return~d?a.slice(0,d)+c[0]+a.slice(d+c[1].length):x(a,b)}return x(b,a)}))}function z(a,b,c,d){return f(a,(a,e)=>{const{n:f,p:g,r:h,i:i}=u(a,e,b);return c&&M(f,b,c,e,g,h,i,d)})}function A(a,b=","){return a.map(m).join(b)}function B(a,b){if("("!=a[a.length-1]){const c=[];let d=!1,e=!1,f="";for(let g of a)if(!("("==g||/[~@]$/.test(g))){if("!"==g[0]&&(g=g.slice(1),d=!d),g.endsWith(":")){c["dark:"==g?"unshift":"push"](g.slice(0,-1));continue}"-"==g[0]&&(g=g.slice(1),e=!e),g.endsWith("-")&&(g=g.slice(0,-1)),g&&"&"!=g&&(f+=(f&&"-")+g)}f&&(e&&(f="-"+f),b[0].push({n:f,v:c.filter(C),i:d}))}}function C(a,b,c){return c.indexOf(a)==b}function D(a){return a.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ")}const E=new Map();function F(a){let b=E.get(a);if(!b){a=D(a);const c=[],d=[[]];let e=0,f=0,g=0;const i=(b,f=0)=>{e!=g&&(c.push(a.slice(e,g+f)),b&&B(c,d)),e=g+1};for(;g<a.length;g++){const j=a[g];if(f)"\\"!=a[g-1]&&(f+=+("["==j)||-("]"==j));else if("["==j)f+=1;else if("("==j)i(),c.push(j);else if(":"==j)":"!=a[g+1]&&i(!1,1);else if(/[\s,)]/.test(j)){i(!0);let k=c.lastIndexOf("(");if(")"==j){const l=c[k-1];if(/[~@]$/.test(l)){const m=d.shift();c.length=k,B([...c,"#"],d);const{v:o}=d[0].pop();for(const p of m)p.v.splice(+("dark"==p.v[0])- +("dark"==o[0]),o.length);B([...c,z(l.length>1?l.slice(0,-1)+h(JSON.stringify([l,m])):l+"("+A(m)+")",n.s,m,/@$/.test(l)),],d)}k=c.lastIndexOf("(",k-1)}c.length=k+1}else/[~@]/.test(j)&&"("==a[g+1]&&d.unshift([])}i(!0),E.set(a,b=d[0])}return b}const G=new Intl.Collator("en",{numeric:!0});function H(a,b){for(var c=0,d=a.length;c<d;){const e=d+c>>1;0>=I(a[e],b)?c=e+1:d=e}return d}function I(a,b){const c=a.p&n.o;return c==(b.p&n.o)&&(c==n.b||c==n.o)?0:a.p-b.p||a.o-b.o||G.compare(a.n,b.n)}function J(a,b){const d=[];let e;for(const f of a)f.d&&f.n?(null==e?void 0:e.p)==f.p&&""+e.r==""+f.r?(e.c=[e.c,f.c].filter(Boolean).join(" "),e.d=e.d+";"+f.d):d.push(e=c({},f,{n:f.n&&b})):d.push(c({},f,{n:f.n&&b}));return d}function K(a,b,c=n.u,d,e){const f=[];for(const g of a)for(const h of L(g,b,c,d,e))f.splice(H(f,h),0,h);return f}function L(a,b,d,f,g){var h;a=c({},a,{i:a.i||g});const i=function(a,b){const c=e.get(a.n);return c?c(a,b):b.r(a.n)}(a,b);return i?"string"==typeof i?({r:f,p:d}=u(a,b,d,f),J(K(F(i),b,d,f,a.i),a.n)):Array.isArray(i)?i.map(a=>c({o:0},a,{r:[...j(f),...j(a.r)],p:o(d,null!==(h=a.p)&& void 0!==h?h:d)})):N(i,a,b,d,f):[{c:m(a),p:0,o:0,r:[]}]}function M(a,b,d,e,f,g,h,i){return J((i?d.flatMap(a=>K([a],e,f,g,h)):K(d,e,f,g,h)).map(a=>a.p&n.o&&(a.n||b==n.b)?c({},a,{p:o(a.p,b),o:0}):a),a)}function N(a,b,c,d,e=[]){return O(a,u(b,c,d,e),c)}function O(a,{n:b,p:c,r:d=[],i:e},f){const g=[];let k="",l=0,m=0;for(let p in a||{}){const r=a[p];if("@"==p[0]){if(!r)continue;if("a"==p[1]){g.push(...M(b,c,F(""+r),f,c,d,e,!0));continue}if("l"==p[1]){for(const s of j(r))g.push(...O(s,{n:b,p:o(c,n[p[7]]),r:d,i:e},f));continue}if("i"==p[1]){g.push(...j(r).map(a=>({p:-1,o:0,r:[],d:p+" "+a})));continue}if("k"==p[1]){g.push({p:n.d,o:0,r:[p],d:O(r,{p:n.d},f).map(v).join("")});continue}if("f"==p[1]){g.push(...j(r).map(a=>({p:n.d,o:0,r:[p],d:O(a,{p:n.d},f).map(v).join("")})));continue}}if("object"!=typeof r||Array.isArray(r))"label"==p&&r?b=r+h(JSON.stringify([c,e,a])):(r||0===r)&&(m+=1,l=Math.max(l,t(p=p.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()))),k+=(k?";":"")+j(r).map(a=>f.s(p,P(""+a,f)+(e?" !important":""))).join(";"));else if("@"==p[0]||p.includes("&")){let u=c;"@"==p[0]&&(u|=q(p=p.replace(/\bscreen\(([^)]+)\)/g,(a,b)=>{const c=f.theme("screens",b);return c?(u|=67108864,i(c,"")):a}))),g.push(...O(r,{n:b,p:u,r:[...d,p],i:e},f))}else g.push(...O(r,{p:c,r:[p]},f))}return g.unshift({n:b&&f.h(b),p:c,o:Math.max(0,15-m)+1.5*Math.min(l||15,15),r:d,d:k}),g.sort(I)}function P(a,b){return a.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(a,c,d,e,f)=>b.theme(d,f))}function Q(a,b,c){return b.reduce((b,d,e)=>b+c(d)+a[e+1],a[0])}function R(a,b){return Array.isArray(a)?T(Q(a,b,a=>null!=a&&"boolean"!=typeof a?a:"")):"string"==typeof a?T(a):[a]}const S=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function T(a){a=D(a);const b=[{}],c=[b[0]],d=[];let e;for(;e=S.exec(a);)e[4]&&(b.shift(),d.shift()),e[3]?(d.unshift(e[3]),b.unshift({}),c.push(d.reduce((a,b)=>({[b]:a}),b[0]))):e[4]||(b[0][e[1]]&&(b.unshift({}),c.push(d.reduce((a,b)=>({[b]:a}),b[0]))),b[0][e[1]]=e[2]);return c}function U(a,...b){var c;const d=R(a,b),e=((null===(c=d.find(a=>a.label))|| void 0===c?void 0:c.label)||"css")+h(JSON.stringify(d));return f(e,(a,b)=>J(d.flatMap(c=>N(c,a,b,n.o)),e))}const V=new Proxy(function a(a,b){return W("animation",a,b)},{get(a,b){return b in a?a[b]:function(a,c){return W(b,a,c)}}});function W(a,b,d){return{toString(){return U(c({label:a},"object"==typeof b?b:{animation:b},{animationName:""+d}))}}}function X(a,b){return Math.round(parseInt(a,16)*b)}function Y(a,b={}){if("function"==typeof a)return a(b);const{opacityValue:c="1",opacityVariable:d}=b,e=d?`var(${d})`:c;if("1"==e)return a;if("0"==e)return"#0000";if("#"==a[0]&&(4==a.length||7==a.length)){const f=(a.length-1)/3,g=[17,1,0.062272][f-1];return`rgba(${[X(a.substr(1,f),g),X(a.substr(1+f,f),g),X(a.substr(1+2*f,f),g),e,]})`}return a}function Z(a,b){return a!=b&&""+a.split(" ").sort()!=""+b.split(" ").sort()}function $(a,b=[]){const c={};for(const d in a){const e=a[d],f="DEFAULT"==d?b:[...b,d];"object"==typeof e&&Object.assign(c,$(e,f)),c[f.join("-")]=e,"DEFAULT"==d&&(c[[...b,d].join("-")]=e)}return c}function _(a,b,c,d,e){for(const f of b){let g=c.get(f);g||c.set(f,g=d(f));const h=g(a,e);if(h)return h}}function aa(a){return ca(a[0],a[1])}function ba(a){return Array.isArray(a)?da(a[0],a[1],a[2]):da(a)}function ca(a,b){return fa(a,"function"==typeof b?b:()=>b)}function da(a,b,c){return fa(a,b?"function"==typeof b?b:"string"==typeof b&&/^[\w-]+$/.test(b)?(a,d)=>({[b]:c?c(a,d):ea(a.input,a.slice(1).find(Boolean)||a.$$||a.input)}):()=>b:a=>({[a[1]]:ea(a.input,a.slice(2).find(Boolean)||a.$$||a.input)}))}function ea(a,b){return"-"==a[0]?`calc(${b} * -1)`:b}function fa(a,b){return ga(a,(a,c,d)=>{const e=c.exec(a);if(e)return e.$$=a.slice(e[0].length),b(e,d)})}function ga(a,b){const c=j(a).map(ha);return(a,d)=>{for(const e of c){const f=b(a,e,d);if(f)return f}}}function ha(a){return"string"==typeof a?new RegExp("^"+a+(a.includes("$")||"-"==a.slice(-1)?"":"$")):a}function ia(a){var{presets:b=[]}=a,e=d(a,["presets"]);let f={preflight:!1!==e.preflight&&[],darkMode:void 0,theme:{},variants:j(e.variants),rules:j(e.rules),ignorelist:j(e.ignorelist),hash:e.hash,stringify:e.stringify||ja};for(const g of j([...b,{darkMode:e.darkMode,preflight:!1!==e.preflight&&j(e.preflight),theme:e.theme},])){const{preflight:h,darkMode:i=f.darkMode,theme:k,variants:l,rules:m,hash:n=f.hash,ignorelist:o,stringify:p=f.stringify}="function"==typeof g?g(f):g;f={preflight:!1!==f.preflight&& !1!==h&&[...f.preflight,...j(h)],darkMode:i,theme:c({},f.theme,k,{extend:c({},f.theme.extend,null==k?void 0:k.extend)}),variants:[...f.variants,...j(l)],rules:[...f.rules,...j(m)],ignorelist:[...f.ignorelist,...j(o)],hash:n,stringify:p}}return f}function ja(a,b){return a+":"+b}function ka(a,b){const e=ia(a),f=function({theme:a,darkMode:b,variants:c,rules:e,hash:f,stringify:i,ignorelist:j}){const l=new Map(),m=new Map(),n=new Map(),o=new Map(),p=ga(j,(a,b)=>b.test(a));return c.push(["dark","class"==b?".dark &":"string"==typeof b&&"media"!=b?b:"@media (prefers-color-scheme:dark)",]),{theme:(function(a){var{extend:b={}}=a,c=d(a,["extend"]);const e={},f={colors:g("colors"),theme:g,negative(){return{}},breakpoints(a){const b={};for(const c in a)"string"==typeof a[c]&&(b["screen-"+c]=a[c]);return b}};function g(a,d,f){if(a){var i;if(/[.[]/.test(a)){const j=[];a.replace(/\[([^\]]+)\]|([^.[]+)/g,(a,b,c=b)=>j.push(c)),a=j.shift(),f=d,d=j.join("-")}const k=e[a]||Object.assign(Object.assign(e[a]={},h(c,a)),h(b,a));return null==d?k:null!==(i=k[d||"DEFAULT"])&& void 0!==i?i:f}const l={};for(const m in c)l[m]=g(m);return l}function h(a,b){let c=a[b];return("function"==typeof c&&(c=c(f)),c&&/color/i.test(b))?$(c):c}return g})(a),e:g,h:"function"==typeof f?a=>f(a,h):f?h:k,s(a,b){return i(a,b,this)},v(a){return l.has(a)||l.set(a,_(a,c,m,aa,this)||"&:"+a),l.get(a)},r(a){return n.has(a)||n.set(a,!p(a,this)&&_(a,e,o,ba,this)),n.get(a)}}}(e),i=new Map(),l=[],m=new Set();function o(a){a=c({},a,{n:a.n&&f.h(a.n)});const d=v(a);if(d&&!m.has(d)){m.add(d);const e=H(l,a);b.insert(d,e,a),l.splice(e,0,a)}return a.n}return b.resume(a=>i.set(a,a),(a,c)=>{b.insert(c,l.length,a),l.push(a),m.add(c)}),Object.defineProperties(function(a){if(!i.size)for(let b of j(e.preflight))"function"==typeof b&&(b=b(f)),b&&("string"==typeof b?M("",n.b,F(b),f,n.b,[],!1,!0):N(b,{},f,n.b)).forEach(o);a=""+a;let c=i.get(a);if(!c){const d=new Set();for(const g of K(F(a),f))d.add(g.c).add(o(g));c=[...d].filter(Boolean).join(" "),i.set(a,c).set(c,c)}return c},Object.getOwnPropertyDescriptors({get target(){return b.target},theme:f.theme,config:e,clear(){b.clear(),m.clear(),i.clear(),l.length=0},destroy(){this.clear(),b.destroy()}}))}function la(a=sa,b=document.documentElement){if(!b)return a;const c=new MutationObserver(e);c.observe(b,{attributeFilter:["class"],subtree:!0,childList:!0}),f(b),e([{target:b,type:""}]);const{destroy:d}=a;function e(a){for(const{type:b,target:d}of a)"a"==b[0]?f(d):d.querySelectorAll("[class]").forEach(f);c.takeRecords()}function f(b){const c=b.getAttribute("class");let d;c&&Z(c,d=a(c))&&b.setAttribute("class",d)}return a.destroy=()=>{c.disconnect(),d.call(a)},a}function ma(a){let b=a||document.querySelector("style[data-twind]");return b&&"STYLE"==b.tagName||((b=document.createElement("style")).dataset.twind="",document.head.prepend(b)),b}function na(a){var b;const c=(null===(b=a)|| void 0===b?void 0:b.cssRules)?a:ma(a).sheet;return{target:c,clear(){for(let a=c.cssRules.length;a--;)c.deleteRule(a)},destroy(){var a;null===(a=c.ownerNode)|| void 0===a||a.remove()},insert(a,b){try{c.insertRule(a,b)}catch(d){c.insertRule(":root{}",b),/:-[mwo]/.test(a)||console.warn(d,a)}},resume:l}}function oa(a){const b=ma(a);return{target:b,clear(){b.innerHTML=""},destroy(){b.remove()},insert(a,c){b.insertBefore(document.createTextNode(a),b.childNodes[c]||null)},resume:l}}function pa(a,b){const c=a?oa():na();return b||(c.resume=ra),c}function qa(a){var b;return(null===(b=a.ownerNode||a)|| void 0===b?void 0:b.textContent)||(a.cssRules?Array.from(a.cssRules,a=>a.cssText):j(a)).join("")}function ra(a,b){const c=qa(this.target),d=/\/\*!([\da-z]+),([\da-z]+)(?:,(.+?))?\*\//g;if(d.test(c)){for(const e of(d.lastIndex=0,this.clear(),document.querySelectorAll("[class]")))a(e.getAttribute("class"));let f,g=0;for(;(function(a){var d;return f&&b({p:g+=parseInt(f[1],36),o:parseInt(f[2],36)/2,n:null!==(d=f[3])&& void 0!==d?d:void 0},c.slice(f.index+f[0].length,null==a?void 0:a.index)),f=a})(d.exec(c)););}}const sa=Object.defineProperties(function(...a){return ta(...a)},Object.getOwnPropertyDescriptors({get target(){return ta.target},theme(...a){return ta.theme(...a)},get config(){return ta.config},clear(){return ta.clear()},destroy(){return ta.destroy()}}));let ta;function ua(a,b=sa){let c="",d=0;return va(a,(e,f,g)=>{const h=a.slice(e,f),i=b(h);Z(h,i)&&(g=g?"":"\"",c+=a.slice(d,e)+g+i+g,d=f)}),c+a.slice(d,a.length)}function va(a,b){let c=1,d=0,e="",f="";const g=a=>{5==c&&"class"==f&&b(d,a,e)};for(let h=0;h<a.length;h++){const i=a[h];1==c?"<"==i&&(c="!--"==a.substr(h+1,3)?4:3):4==c?">"==i&&"--"==a.slice(h-2,h)&&(c=1):e?i==e&&"\\"!=a[h-1]&&(g(h),c=2,e=""):"\""==i||"'"==i?(e=i,d+=1):">"==i?(g(h),c=1):c&&("="==i?(f=a.slice(d,h),c=5,d=h+1):"/"==i&&(c<5||">"==a[h+1])?(g(h),c=0):/\s/.test(i)&&(g(h),c=2,d=h+1))}}function wa(a,b){return Array.isArray(a)&&Array.isArray(a.raw)?Q(a,b,a=>xa(a).trim()):b.filter(Boolean).reduce((a,b)=>a+xa(b),a?xa(a):"")}function xa(a){let b="",c;if(a&&"object"==typeof a)if(Array.isArray(a))(c=wa(a[0],a.slice(1)))&&(b+=" "+c);else for(const d in a)a[d]&&(b+=" "+d);else null!=a&&"boolean"!=typeof a&&(b+=" "+a);return b}function ya(a,b=sa){return b.clear(),{html:ua(a,b),css:qa(b.target)}}const za=Aa();function Aa(a){return new Proxy(function(b,...c){return Ba(a,"",b,c)},{get(b,c){return"bind"===c?Aa:c in b?b[c]:function(b,...d){return Ba(a,c,b,d)}}})}function Ba(a,b,c,d){return{toString(){const e=R(c,d),f=g(b+h(JSON.stringify([b,e])));return("function"==typeof a?a:sa)(U({[`@keyframes ${f}`]:R(c,d)})),f}}}const Ca=Ea("@"),Da=Ea("~");function Ea(a){function b(b,c,d){return A(F(b+a+"("+wa(c,d)+")"))}return new Proxy(function(a,...c){return b("",a,c)},{get(a,c){return c in a?a[c]:function(a,...d){return b(c,a,d)}}})}function Fa(a,b,c){if("["==a[0]&&"]"==a.slice(-1)){if(a=P(a.slice(1,-1),c),/color|fill|stroke/i.test(b)){if(/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(a))return a}else if(!/image/i.test(b))return a.includes("calc(")&&(a=a.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 ")),a.replace(/(^|[^\\])_+(?![^(]*\))/g,(a,b)=>b+" ".repeat(a.length-1)).replace(/\\_(?![^(]*\))/g,"_");else if(/^[a-z-]+\(/.test(a))return a}}function Ga(a){return a.replace(/-./g,a=>a[1].toUpperCase())}function Ha(a={},b){const{label:d="style",base:e,props:f={},defaults:i,when:j=[]}=a,k=c({},null==b?void 0:b.defaults,i),l=h(JSON.stringify([d,null==b?void 0:b.className,e,f,k,j])),m=o("",e||"",n.c);function o(a,c,e){return z(((b?b.className.replace(/#.+$/,"~"):"")+d+a+l).replace(/[: ,()[\]]/,""),e,c&&F(c))}return Object.defineProperties(function(a){let d;Array.isArray(a)&&(d=!0,a=Object.fromEntries(new URLSearchParams(a[1]).entries()));const e=c({},k,a);let g=d?"":(b?b(e)+" ":"")+m,h;for(const i in f){const l=f[i],n=e[i];if(n===Object(n)){let p="";for(const q in h="",n){const r=l[n[q]];r&&(p+="@"+q+"-"+n[q],h+=(h&&" ")+("_"==q?r:q+":("+r+")"))}h&&(g+=" "+o("--"+i+"-"+p,h,402653184))}else(h=l[n])&&(g+=" "+o("--"+i+"-"+n,h,402653184))}return j.forEach((a,b)=>{let c="";for(const d in a[0]){const f=e[d];if(f!==Object(f)&&""+f==""+a[0][d])c+=(c&&"_")+d+"-"+f;else{c="";break}}c&&(h=a[1])&&(g+=" "+o("-"+b+"--"+c,h,536870912))}),g},Object.getOwnPropertyDescriptors({className:m,defaults:k,selector:"."+g(m)}))}return a.animation=V,a.apply=Ca,a.arbitrary=Fa,a.asArray=j,a.auto=function(a){if(document.currentScript){const b=()=>c.disconnect(),c=new MutationObserver(c=>{for(const{target:d}of c)if(d===document.body)return a(),b()});return c.observe(document.documentElement,{childList:!0,subtree:!0}),b}return l},a.colorFromTheme=function(a={},b){return(c,d)=>{const{section:e=Ga(c[0]).replace("-","")+"Color"}=a;if(!/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/.test(c.$$))return;const{$1:f,$2:g}=RegExp,h=d.theme(e,f)||Fa(f,e,d);if(!h)return;const{opacityVariable:i=`--tw-${c[0].replace(/-$/,"")}-opacity`,opacitySection:j=e.replace("Color","Opacity"),property:k=e,selector:l}=a,m=d.theme(j,g||"DEFAULT")||g&&Fa(g,j,d),n=Y(h,{opacityVariable:i||void 0,opacityValue:m||void 0});if(b)return c._={value:n,color:a=>Y(h,a)},b(c,d);const o={};return i&&n.includes(i)&&(o[i]=m||"1"),o[k]=n,l?{[l]:o}:o}},a.consume=ua,a.css=U,a.cssom=na,a.cx=function(a,...b){return A(F(wa(a,b))," ")},a.defineConfig=ia,a.dom=oa,a.escape=g,a.extract=ya,a.fromTheme=function(a,b,c){const d=b?"string"==typeof b?(a,d)=>({[b]:c?c(a,d):a._}):b:({1:a,_:b},c,d)=>({[a||d]:b});return(b,c)=>{var e;const f=Ga(a||b[1]),g=null!==(e=c.theme(f,b.$$))&& void 0!==e?e:Fa(b.$$,f,c);if(null!=g)return b._="-"==b.input[0]?`calc(${g} * -1)`:g,d(b,c,f)}},a.getSheet=pa,a.hash=h,a.identity=k,a.injectGlobal=function(a,...b){("function"==typeof this?this:sa)(U({"@layer base":R(a,b)}))},a.inline=function(a,b={}){const{tw:c=sa,minify:d=k}="function"==typeof b?{tw:b}:b,{html:e,css:f}=ya(a,c);return e.replace("</head>",`<style data-twind>${d(f,e)}</style></head>`)},a.keyframes=za,a.mql=i,a.noop=l,a.observe=la,a.setup=function(a={},b=pa(),c){var d;const e=!ta;return e||ta.destroy(),ta=la(ka(a,b),c),e&&(document.activeElement||null===(d=document.querySelector("[autofocus]"))|| void 0===d||d.focus()),ta},a.shortcut=Da,a.stringify=qa,a.style=(a,b)=>"function"==typeof a?Ha(b,a):Ha(a),a.toColorValue=Y,a.tw=sa,a.twind=ka,a.tx=function(a,...b){return("function"==typeof this?this:sa)(wa(a,b))},a.virtual=function(a){const b=[],c=[];return{get target(){return a?b.map((a,b)=>{var d;const e=c[b],f=e.p-((null===(d=c[b-1])|| void 0===d?void 0:d.p)||0);return`/*!${f.toString(36)},${(2*e.o).toString(36)}${e.n?","+e.n:""}*/${a}`}):b},clear(){b.length=0},destroy(){this.clear()},insert(a,d,e){b.splice(d,0,a),c.splice(d,0,e)},resume:l}},a}({})//# sourceMappingURL=twind.global.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc