Socket
Socket
Sign inDemoInstall

tailwind-merge

Package Overview
Dependencies
Maintainers
1
Versions
276
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tailwind-merge - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

2

dist/lib/class-utils.d.ts
import { ClassGroupId, Config, ClassValidator } from './types';
export interface ClassPartObject {
nextPart: Record<string, ClassPartObject>;
nextPart: Map<string, ClassPartObject>;
validators: ClassValidatorObject[];

@@ -5,0 +5,0 @@ classGroupId?: ClassGroupId;

@@ -6,3 +6,3 @@ import { Config } from './types';

getConflictingClassGroupIds: (classGroupId: string) => readonly string[];
cache: import("./lru-cache").LruCache<string>;
cache: import("./lru-cache").LruCache<string, string>;
};

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

export interface LruCache<T> {
get(key: string): T | undefined;
set(key: string, value: T): void;
export interface LruCache<Key, Value> {
get(key: Key): Value | undefined;
set(key: Key, value: Value): void;
}
export declare function getLruCache<T>(cacheSize: number): LruCache<T>;
export declare function getLruCache<Key, Value>(maxCacheSize: number): LruCache<Key, Value>;

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

"use strict";function r(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}Object.defineProperty(exports,"__esModule",{value:!0});var e=r(require("hashlru"));function o(){return o=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r},o.apply(this,arguments)}function t(r,e){(null==e||e>r.length)&&(e=r.length);for(var o=0,t=new Array(e);o<e;o++)t[o]=r[o];return t}function n(r){var e=function(r){var e=r.theme,o=r.prefix,t={nextPart:{},validators:[]};return function(r,e){return e?r.map((function(r){return[r[0],r[1].map((function(r){return"string"==typeof r?e+r:"object"==typeof r?Object.fromEntries(Object.entries(r).map((function(r){return[e+r[0],r[1]]}))):r}))]})):r}(Object.entries(r.classGroups),o).forEach((function(r){l(r[1],t,r[0],e)})),t}(r);return{getClassGroupId:function(r){var o=r.split("-");return""===o[0]&&1!==o.length&&o.shift(),i(o,e)||function(r){if(a.test(r)){var e=a.exec(r)[1],o=null==e?void 0:e.substring(0,e.indexOf(":"));if(o)return"arbitrary.."+o}}(r)},getConflictingClassGroupIds:function(e){return r.conflictingClassGroups[e]||[]}}}function i(r,e){var o;if(0===r.length)return e.classGroupId;var t=e.nextPart[r[0]],n=t?i(r.slice(1),t):void 0;if(n)return n;if(0!==e.validators.length){var a=r.join("-");return null==(o=e.validators.find((function(r){return(0,r.validator)(a)})))?void 0:o.classGroupId}}var a=/^\[(.+)\]$/;function l(r,e,o,t){r.forEach((function(r){if("string"!=typeof r){if("function"==typeof r)return r.isThemeGetter?void l(r(t),e,o,t):void e.validators.push({validator:r,classGroupId:o});Object.entries(r).forEach((function(r){l(r[1],s(e,r[0]),o,t)}))}else(""===r?e:s(e,r)).classGroupId=o}))}function s(r,e){var o=r;return e.split("-").forEach((function(r){void 0===o.nextPart[r]&&(o.nextPart[r]={nextPart:{},validators:[]}),o=o.nextPart[r]})),o}function c(r){return o({cache:(t=r.cacheSize,t>=1?e.default(t):{get:function(){},set:function(){}})},n(r));var t}var d=/\s+/;function u(r,e){var o=e.getClassGroupId,n=e.getConflictingClassGroupIds,i=new Set;return r.trim().split(d).map((function(r){var e=function(r){for(var e,o=[],n=0,i=0,a=function(r,e){var o="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(o)return(o=o.call(r)).next.bind(o);if(Array.isArray(r)||(o=function(r,e){if(r){if("string"==typeof r)return t(r,e);var o=Object.prototype.toString.call(r).slice(8,-1);return"Object"===o&&r.constructor&&(o=r.constructor.name),"Map"===o||"Set"===o?Array.from(r):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(r,e):void 0}}(r))){o&&(r=o);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.matchAll(/[:[\]]/g));!(e=a()).done;){var l=e.value;if(":"===l[0]){if(0===n){var s=l.index+1;o.push(r.substring(i,s)),i=s}}else"["===l[0]?n++:"]"===l[0]&&n--}var c=0===o.length?r:r.substring(i),d=c.startsWith("!");return{modifiers:o,hasImportantModifier:d,baseClassName:d?c.substring(1):c}}(r),n=e.modifiers,i=e.hasImportantModifier,a=o(e.baseClassName);if(!a)return{isTailwindClass:!1,originalClassName:r};var l=function(r){if(r.length<=1)return r;var e=[],o=[];return r.forEach((function(r){"["===r[0]?(e.push.apply(e,o.sort().concat([r])),o=[]):o.push(r)})),e.push.apply(e,o.sort()),e}(n).join("");return{isTailwindClass:!0,modifierId:i?l+"!":l,classGroupId:a,originalClassName:r}})).reverse().filter((function(r){if(!r.isTailwindClass)return!0;var e=r.modifierId,o=r.classGroupId,t=""+e+o;return!i.has(t)&&(i.add(t),n(o).forEach((function(r){return i.add(""+e+r)})),!0)})).reverse().map((function(r){return r.originalClassName})).join(" ")}function p(){for(var r=arguments.length,e=new Array(r),o=0;o<r;o++)e[o]=arguments[o];var t,n,i,a=l;function l(r){var o=e[0],l=e.slice(1).reduce((function(r,e){return e(r)}),o());return t=c(l),n=t.cache.get,i=t.cache.set,a=s,s(r)}function s(r){var e=n(r);if(e)return e;var o=u(r,t);return i(r,o),o}return function(){for(var r,e="",o=0;o<arguments.length;o+=1)(r=arguments[o])&&(e&&(e+=" "),e+=r);return a(e)}}function b(r){var e=function(e){return e[r]||[]};return e.isThemeGetter=!0,e}var f=/^\[(.+)\]$/,g=/^\d+\/\d+$/,m=new Set(["px","full","screen"]),v=/^(\d+)?(xs|sm|md|lg|xl)$/,h=/\d+(%|px|em|rem|vh|vw|pt|pc|in|cm|mm|cap|ch|ex|lh|rlh|vi|vb|vmin|vmax)/,y=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function x(r){return!Number.isNaN(Number(r))||m.has(r)||g.test(r)||w(r)}function w(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&(o.startsWith("length:")||h.test(o))}function k(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&o.startsWith("size:")}function z(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&o.startsWith("position:")}function j(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&(o.startsWith("url(")||o.startsWith("url:"))}function C(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&(!Number.isNaN(Number(o))||o.startsWith("number:"))}function A(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return Number.isInteger(Number(o||r))}function I(r){return f.test(r)}function S(){return!0}function G(r){return v.test(r)}function N(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&y.test(o)}var O={__proto__:null,isLength:x,isArbitraryLength:w,isArbitrarySize:k,isArbitraryPosition:z,isArbitraryUrl:j,isArbitraryWeight:C,isInteger:A,isArbitraryValue:I,isAny:S,isTshirtSize:G,isArbitraryShadow:N};function P(){var r=b("colors"),e=b("spacing"),o=b("blur"),t=b("brightness"),n=b("borderColor"),i=b("borderRadius"),a=b("borderSpacing"),l=b("borderWidth"),s=b("contrast"),c=b("grayscale"),d=b("hueRotate"),u=b("invert"),p=b("gap"),f=b("gradientColorStops"),g=b("inset"),m=b("margin"),v=b("opacity"),h=b("padding"),y=b("saturate"),O=b("scale"),P=b("sepia"),T=b("skew"),W=b("space"),E=b("translate"),M=function(){return["auto",e]},_=function(){return["",x]},$=function(){return["auto",A]},R=function(){return["","0",I]};return{cacheSize:500,theme:{colors:[S],spacing:[x],blur:["none","",G,w],brightness:[A],borderColor:[r],borderRadius:["none","","full",G,w],borderSpacing:[e],borderWidth:_(),contrast:[A],grayscale:R(),hueRotate:[A],invert:R(),gap:[e],gradientColorStops:[r],inset:M(),margin:M(),opacity:[A],padding:[e],saturate:[A],scale:[A],sepia:R(),skew:[A,I],space:[e],translate:[e]},classGroups:{aspect:[{aspect:["auto","square","video",I]}],container:["container"],columns:[{columns:[G]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[I])}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible"],z:[{z:[x]}],basis:[{basis:[e]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",I]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",A]}],"grid-cols":[{"grid-cols":[S]}],"col-start-end":[{col:["auto",{span:[A]}]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[S]}],"row-start-end":[{row:["auto",{span:[A]}]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",I]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",I]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["start","end","center","between","around","evenly"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["start","end","center","between","around","evenly"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(["start","end","center","between","around","evenly"],["stretch"])}],"place-items":[{"place-items":["start","end","center","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[h]}],px:[{px:[h]}],py:[{py:[h]}],pt:[{pt:[h]}],pr:[{pr:[h]}],pb:[{pb:[h]}],pl:[{pl:[h]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[W]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[W]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max",e]}],"min-w":[{"min-w":["min","max","fit",x]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[G]},G,w]}],h:[{h:M()}],"min-h":[{"min-h":["min","max","fit",x]}],"max-h":[{"max-h":[e,"min","max","fit"]}],"font-size":[{text:["base",G,w]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",C]}],"font-family":[{font:[S]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",w]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",x]}],"list-style-type":[{list:["none","disc","decimal",I]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(["solid","dashed","dotted","double","none"],["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",x]}],"underline-offset":[{"underline-offset":["auto",x]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:[e]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",w]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap"]}],break:[{break:["normal","words","all"]}],content:[{content:["none",I]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[z])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",k]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},j]}],"bg-color":[{bg:[r]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[].concat(["solid","dashed","dotted","double","none"],["hidden"])}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:[""].concat(["solid","dashed","dotted","double","none"],["hidden"])}],"outline-offset":[{"outline-offset":[x]}],"outline-w":[{outline:[x]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[x]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",G,N]}],"shadow-color":[{shadow:[S]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[t]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",G,I]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[y]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[t]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",I]}],duration:[{duration:[A]}],ease:[{ease:["linear","in","out","in-out",I]}],delay:[{delay:[A]}],animate:[{animate:["none","spin","ping","pulse","bounce",I]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[A,I]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",I]}],accent:[{accent:["auto",r]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",I]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":[e]}],"scroll-mx":[{"scroll-mx":[e]}],"scroll-my":[{"scroll-my":[e]}],"scroll-mt":[{"scroll-mt":[e]}],"scroll-mr":[{"scroll-mr":[e]}],"scroll-mb":[{"scroll-mb":[e]}],"scroll-ml":[{"scroll-ml":[e]}],"scroll-p":[{"scroll-p":[e]}],"scroll-px":[{"scroll-px":[e]}],"scroll-py":[{"scroll-py":[e]}],"scroll-pt":[{"scroll-pt":[e]}],"scroll-pr":[{"scroll-pr":[e]}],"scroll-pb":[{"scroll-pb":[e]}],"scroll-pl":[{"scroll-pl":[e]}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",I]}],fill:[{fill:[r]}],"stroke-w":[{stroke:[x]}],stroke:[{stroke:[r]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],"col-start-end":["col-start","col-end"],"row-start-end":["row-start","row-end"],gap:["gap-x","gap-y"],p:["px","py","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-t","rounded-r","rounded-b","rounded-l","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]}}}var T=p(P);function W(r,e){for(var o in e)_(r,o,e[o]);return r}var E=Object.prototype.hasOwnProperty,M=new Set(["string","number","boolean"]);function _(r,e,o){if(E.call(r,e)&&!M.has(typeof o)&&null!==o){if(Array.isArray(o)&&Array.isArray(r[e]))r[e]=r[e].concat(o);else if("object"==typeof o&&"object"==typeof r[e]){if(null===r[e])return void(r[e]=o);for(var t in o)_(r[e],t,o[t])}}else r[e]=o}exports.createTailwindMerge=p,exports.extendTailwindMerge=function(r){for(var e=arguments.length,o=new Array(e>1?e-1:0),t=1;t<e;t++)o[t-1]=arguments[t];return p.apply(void 0,"function"==typeof r?[P,r].concat(o):[function(){return W(P(),r)}].concat(o))},exports.fromTheme=b,exports.getDefaultConfig=P,exports.mergeConfigs=W,exports.twMerge=T,exports.validators=O;
"use strict";function r(){return r=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}return r},r.apply(this,arguments)}function e(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,o=new Array(e);t<e;t++)o[t]=r[t];return o}function t(r){if(r<1)return{get:function(){},set:function(){}};var e=0,t=new Map,o=new Map;function n(n,i){t.set(n,i),++e>r&&(e=0,o=t,t=new Map)}return{get:function(r){var e=t.get(r);return void 0!==e?e:void 0!==(e=o.get(r))?(n(r,e),e):void 0},set:function(r,e){t.has(r)?t.set(r,e):n(r,e)}}}function o(r){var e=function(r){var e=r.theme,t=r.prefix,o={nextPart:new Map,validators:[]};return function(r,e){return e?r.map((function(r){return[r[0],r[1].map((function(r){return"string"==typeof r?e+r:"object"==typeof r?Object.fromEntries(Object.entries(r).map((function(r){return[e+r[0],r[1]]}))):r}))]})):r}(Object.entries(r.classGroups),t).forEach((function(r){a(r[1],o,r[0],e)})),o}(r);return{getClassGroupId:function(r){var t=r.split("-");return""===t[0]&&1!==t.length&&t.shift(),n(t,e)||function(r){if(i.test(r)){var e=i.exec(r)[1],t=null==e?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}}(r)},getConflictingClassGroupIds:function(e){return r.conflictingClassGroups[e]||[]}}}function n(r,e){var t;if(0===r.length)return e.classGroupId;var o=e.nextPart.get(r[0]),i=o?n(r.slice(1),o):void 0;if(i)return i;if(0!==e.validators.length){var a=r.join("-");return null==(t=e.validators.find((function(r){return(0,r.validator)(a)})))?void 0:t.classGroupId}}Object.defineProperty(exports,"__esModule",{value:!0});var i=/^\[(.+)\]$/;function a(r,e,t,o){r.forEach((function(r){if("string"!=typeof r){if("function"==typeof r)return r.isThemeGetter?void a(r(o),e,t,o):void e.validators.push({validator:r,classGroupId:t});Object.entries(r).forEach((function(r){a(r[1],l(e,r[0]),t,o)}))}else(""===r?e:l(e,r)).classGroupId=t}))}function l(r,e){var t=r;return e.split("-").forEach((function(r){t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)})),t}function s(e){return r({cache:t(e.cacheSize)},o(e))}var c=/\s+/;function d(r,t){var o=t.getClassGroupId,n=t.getConflictingClassGroupIds,i=new Set;return r.trim().split(c).map((function(r){var t=function(r){for(var t,o=[],n=0,i=0,a=function(r,t){var o="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(o)return(o=o.call(r)).next.bind(o);if(Array.isArray(r)||(o=function(r,t){if(r){if("string"==typeof r)return e(r,t);var o=Object.prototype.toString.call(r).slice(8,-1);return"Object"===o&&r.constructor&&(o=r.constructor.name),"Map"===o||"Set"===o?Array.from(r):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?e(r,t):void 0}}(r))){o&&(r=o);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.matchAll(/[:[\]]/g));!(t=a()).done;){var l=t.value;if(":"===l[0]){if(0===n){var s=l.index+1;o.push(r.substring(i,s)),i=s}}else"["===l[0]?n++:"]"===l[0]&&n--}var c=0===o.length?r:r.substring(i),d=c.startsWith("!");return{modifiers:o,hasImportantModifier:d,baseClassName:d?c.substring(1):c}}(r),n=t.modifiers,i=t.hasImportantModifier,a=o(t.baseClassName);if(!a)return{isTailwindClass:!1,originalClassName:r};var l=function(r){if(r.length<=1)return r;var e=[],t=[];return r.forEach((function(r){"["===r[0]?(e.push.apply(e,t.sort().concat([r])),t=[]):t.push(r)})),e.push.apply(e,t.sort()),e}(n).join("");return{isTailwindClass:!0,modifierId:i?l+"!":l,classGroupId:a,originalClassName:r}})).reverse().filter((function(r){if(!r.isTailwindClass)return!0;var e=r.modifierId,t=r.classGroupId,o=e+t;return!i.has(o)&&(i.add(o),n(t).forEach((function(r){return i.add(e+r)})),!0)})).reverse().map((function(r){return r.originalClassName})).join(" ")}function u(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];var o,n,i,a=l;function l(r){var t=e[0],l=e.slice(1).reduce((function(r,e){return e(r)}),t());return o=s(l),n=o.cache.get,i=o.cache.set,a=c,c(r)}function c(r){var e=n(r);if(e)return e;var t=d(r,o);return i(r,t),t}return function(){for(var r,e="",t=0;t<arguments.length;t+=1)(r=arguments[t])&&(e&&(e+=" "),e+=r);return a(e)}}function p(r){var e=function(e){return e[r]||[]};return e.isThemeGetter=!0,e}var b=/^\[(.+)\]$/,f=/^\d+\/\d+$/,g=new Set(["px","full","screen"]),m=/^(\d+)?(xs|sm|md|lg|xl)$/,v=/\d+(%|px|em|rem|vh|vw|pt|pc|in|cm|mm|cap|ch|ex|lh|rlh|vi|vb|vmin|vmax)/,h=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function y(r){return!Number.isNaN(Number(r))||g.has(r)||f.test(r)||x(r)}function x(r){var e,t=null==(e=b.exec(r))?void 0:e[1];return!!t&&(t.startsWith("length:")||v.test(t))}function w(r){var e,t=null==(e=b.exec(r))?void 0:e[1];return!!t&&t.startsWith("size:")}function k(r){var e,t=null==(e=b.exec(r))?void 0:e[1];return!!t&&t.startsWith("position:")}function z(r){var e,t=null==(e=b.exec(r))?void 0:e[1];return!!t&&(t.startsWith("url(")||t.startsWith("url:"))}function j(r){var e,t=null==(e=b.exec(r))?void 0:e[1];return!!t&&(!Number.isNaN(Number(t))||t.startsWith("number:"))}function C(r){var e,t=null==(e=b.exec(r))?void 0:e[1];return Number.isInteger(Number(t||r))}function A(r){return b.test(r)}function I(){return!0}function S(r){return m.test(r)}function G(r){var e,t=null==(e=b.exec(r))?void 0:e[1];return!!t&&h.test(t)}var N={__proto__:null,isLength:y,isArbitraryLength:x,isArbitrarySize:w,isArbitraryPosition:k,isArbitraryUrl:z,isArbitraryWeight:j,isInteger:C,isArbitraryValue:A,isAny:I,isTshirtSize:S,isArbitraryShadow:G};function O(){var r=p("colors"),e=p("spacing"),t=p("blur"),o=p("brightness"),n=p("borderColor"),i=p("borderRadius"),a=p("borderSpacing"),l=p("borderWidth"),s=p("contrast"),c=p("grayscale"),d=p("hueRotate"),u=p("invert"),b=p("gap"),f=p("gradientColorStops"),g=p("inset"),m=p("margin"),v=p("opacity"),h=p("padding"),N=p("saturate"),O=p("scale"),M=p("sepia"),P=p("skew"),T=p("space"),W=p("translate"),E=function(){return["auto",e]},_=function(){return["",y]},$=function(){return["auto",C]},R=function(){return["","0",A]};return{cacheSize:500,theme:{colors:[I],spacing:[y],blur:["none","",S,x],brightness:[C],borderColor:[r],borderRadius:["none","","full",S,x],borderSpacing:[e],borderWidth:_(),contrast:[C],grayscale:R(),hueRotate:[C],invert:R(),gap:[e],gradientColorStops:[r],inset:E(),margin:E(),opacity:[C],padding:[e],saturate:[C],scale:[C],sepia:R(),skew:[C,A],space:[e],translate:[e]},classGroups:{aspect:[{aspect:["auto","square","video",A]}],container:["container"],columns:[{columns:[S]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[A])}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible"],z:[{z:[y]}],basis:[{basis:[e]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",A]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",C]}],"grid-cols":[{"grid-cols":[I]}],"col-start-end":[{col:["auto",{span:[C]}]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[I]}],"row-start-end":[{row:["auto",{span:[C]}]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",A]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",A]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["start","end","center","between","around","evenly"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["start","end","center","between","around","evenly"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(["start","end","center","between","around","evenly"],["stretch"])}],"place-items":[{"place-items":["start","end","center","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[h]}],px:[{px:[h]}],py:[{py:[h]}],pt:[{pt:[h]}],pr:[{pr:[h]}],pb:[{pb:[h]}],pl:[{pl:[h]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",e]}],"min-w":[{"min-w":["min","max","fit",y]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[S]},S,x]}],h:[{h:E()}],"min-h":[{"min-h":["min","max","fit",y]}],"max-h":[{"max-h":[e,"min","max","fit"]}],"font-size":[{text:["base",S,x]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",j]}],"font-family":[{font:[I]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",x]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",y]}],"list-style-type":[{list:["none","disc","decimal",A]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(["solid","dashed","dotted","double","none"],["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",y]}],"underline-offset":[{"underline-offset":["auto",y]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:[e]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",x]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap"]}],break:[{break:["normal","words","all"]}],content:[{content:["none",A]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[k])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",w]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},z]}],"bg-color":[{bg:[r]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[].concat(["solid","dashed","dotted","double","none"],["hidden"])}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:[""].concat(["solid","dashed","dotted","double","none"],["hidden"])}],"outline-offset":[{"outline-offset":[y]}],"outline-w":[{outline:[y]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[y]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",S,G]}],"shadow-color":[{shadow:[I]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",S,A]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[N]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",A]}],duration:[{duration:[C]}],ease:[{ease:["linear","in","out","in-out",A]}],delay:[{delay:[C]}],animate:[{animate:["none","spin","ping","pulse","bounce",A]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[C,A]}],"translate-x":[{"translate-x":[W]}],"translate-y":[{"translate-y":[W]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",A]}],accent:[{accent:["auto",r]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",A]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":[e]}],"scroll-mx":[{"scroll-mx":[e]}],"scroll-my":[{"scroll-my":[e]}],"scroll-mt":[{"scroll-mt":[e]}],"scroll-mr":[{"scroll-mr":[e]}],"scroll-mb":[{"scroll-mb":[e]}],"scroll-ml":[{"scroll-ml":[e]}],"scroll-p":[{"scroll-p":[e]}],"scroll-px":[{"scroll-px":[e]}],"scroll-py":[{"scroll-py":[e]}],"scroll-pt":[{"scroll-pt":[e]}],"scroll-pr":[{"scroll-pr":[e]}],"scroll-pb":[{"scroll-pb":[e]}],"scroll-pl":[{"scroll-pl":[e]}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",A]}],fill:[{fill:[r]}],"stroke-w":[{stroke:[y]}],stroke:[{stroke:[r]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],"col-start-end":["col-start","col-end"],"row-start-end":["row-start","row-end"],gap:["gap-x","gap-y"],p:["px","py","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-t","rounded-r","rounded-b","rounded-l","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]}}}var M=u(O);function P(r,e){for(var t in e)E(r,t,e[t]);return r}var T=Object.prototype.hasOwnProperty,W=new Set(["string","number","boolean"]);function E(r,e,t){if(T.call(r,e)&&!W.has(typeof t)&&null!==t){if(Array.isArray(t)&&Array.isArray(r[e]))r[e]=r[e].concat(t);else if("object"==typeof t&&"object"==typeof r[e]){if(null===r[e])return void(r[e]=t);for(var o in t)E(r[e],o,t[o])}}else r[e]=t}exports.createTailwindMerge=u,exports.extendTailwindMerge=function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),o=1;o<e;o++)t[o-1]=arguments[o];return u.apply(void 0,"function"==typeof r?[O,r].concat(t):[function(){return P(O(),r)}].concat(t))},exports.fromTheme=p,exports.getDefaultConfig=O,exports.mergeConfigs=P,exports.twMerge=M,exports.validators=N;
//# sourceMappingURL=tailwind-merge.cjs.production.min.js.map
{
"name": "tailwind-merge",
"version": "1.3.0",
"version": "1.4.0",
"description": "Merge Tailwind CSS classes without style conflicts",

@@ -44,24 +44,21 @@ "keywords": [

"size": "size-limit",
"preversion": "git checkout main && git pull",
"preversion": "if [ -n \"$DANYS_MACHINES\" ]; then git checkout main && git pull; fi",
"version": "zx scripts/update-readme.js",
"postversion": "git push --follow-tags && open https://github.com/dcastil/tailwind-merge/releases"
"postversion": "if [ -n \"$DANYS_MACHINES\" ]; then git push --follow-tags && open https://github.com/dcastil/tailwind-merge/releases; fi"
},
"dependencies": {
"hashlru": "^2.3.0"
},
"devDependencies": {
"@size-limit/preset-small-lib": "^7.0.8",
"@types/jest": "^27.4.1",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"dts-cli": "^1.5.1",
"eslint": "^8.14.0",
"@types/jest": "^28.1.4",
"@typescript-eslint/eslint-plugin": "^5.30.5",
"@typescript-eslint/parser": "^5.30.5",
"dts-cli": "^1.5.2",
"eslint": "^8.19.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.1.4",
"fp-ts": "^2.12.0",
"prettier": "^2.6.2",
"eslint-plugin-jest": "^26.5.3",
"fp-ts": "^2.12.1",
"prettier": "^2.7.1",
"size-limit": "^7.0.8",
"ts-jest": "^27.1.4",
"typescript": "^4.6.3",
"zx": "^6.1.0"
"ts-jest": "^28.0.5",
"typescript": "^4.7.4",
"zx": "^7.0.7"
},

@@ -68,0 +65,0 @@ "size-limit": [

<div align="center">
<br />
<a href="https://github.com/dcastil/tailwind-merge">
<!-- AUTOGENERATED VERSION START --><img src="https://github.com/dcastil/tailwind-merge/raw/v1.3.0/assets/logo.svg" alt="tailwind-merge" width="221px" /><!-- AUTOGENERATED END -->
<!-- AUTOGENERATED VERSION START --><img src="https://github.com/dcastil/tailwind-merge/raw/v1.4.0/assets/logo.svg" alt="tailwind-merge" width="221px" /><!-- AUTOGENERATED END -->
</a>

@@ -273,2 +273,3 @@ </div>

- `borderRadius`
- `borderSpacing`
- `borderWidth`

@@ -623,2 +624,4 @@ - `contrast`

- A non-production-ready version of every commit pushed to the main branch is released under the `dev` tag for testing purposes. It has the format `0.0.0-dev.<git SHA>`.
- A changelog is documented in [GitHub Releases](https://github.com/dcastil/tailwind-merge/releases).

@@ -628,2 +631,2 @@

Please see <!-- AUTOGENERATED VERSION START -->[CONTRIBUTING](https://github.com/dcastil/tailwind-merge/tree/v1.3.0/.github/CONTRIBUTING.md)<!-- AUTOGENERATED END --> for details.
Please see <!-- AUTOGENERATED VERSION START -->[CONTRIBUTING](https://github.com/dcastil/tailwind-merge/tree/v1.4.0/.github/CONTRIBUTING.md)<!-- AUTOGENERATED END --> for details.
import { ClassGroupId, Config, ClassGroup, ClassValidator, ThemeObject, ThemeGetter } from './types'
export interface ClassPartObject {
nextPart: Record<string, ClassPartObject>
nextPart: Map<string, ClassPartObject>
validators: ClassValidatorObject[]

@@ -49,3 +49,3 @@ classGroupId?: ClassGroupId

const currentClassPart = classParts[0]!
const nextClassPartObject = classPartObject.nextPart[currentClassPart]
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart)
const classGroupFromNextClassPart = nextClassPartObject

@@ -91,3 +91,3 @@ ? getGroupRecursive(classParts.slice(1), nextClassPartObject)

const classMap: ClassPartObject = {
nextPart: {},
nextPart: new Map<string, ClassPartObject>(),
validators: [],

@@ -156,10 +156,10 @@ }

path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
if (currentClassPartObject.nextPart[pathPart] === undefined) {
currentClassPartObject.nextPart[pathPart] = {
nextPart: {},
if (!currentClassPartObject.nextPart.has(pathPart)) {
currentClassPartObject.nextPart.set(pathPart, {
nextPart: new Map(),
validators: [],
}
})
}
currentClassPartObject = currentClassPartObject.nextPart[pathPart]!
currentClassPartObject = currentClassPartObject.nextPart.get(pathPart)!
})

@@ -166,0 +166,0 @@

@@ -9,5 +9,5 @@ import { getLruCache } from './lru-cache'

return {
cache: getLruCache<string>(config.cacheSize),
cache: getLruCache<string, string>(config.cacheSize),
...createClassUtils(config),
}
}

@@ -534,3 +534,3 @@ import { fromTheme } from './from-theme'

*/
w: [{ w: ['auto', 'min', 'max', spacing] }],
w: [{ w: ['auto', 'min', 'max', 'fit', spacing] }],
/**

@@ -537,0 +537,0 @@ * Min-Width

@@ -1,19 +0,52 @@

import HLRU from 'hashlru'
// Export is needed because TypeScript complains about an error otherwise:
// Error: …/tailwind-merge/src/config-utils.ts(8,17): semantic error TS4058: Return type of exported function has or is using name 'LruCache' from external module "…/tailwind-merge/src/lru-cache" but cannot be named.
export interface LruCache<T> {
get(key: string): T | undefined
set(key: string, value: T): void
export interface LruCache<Key, Value> {
get(key: Key): Value | undefined
set(key: Key, value: Value): void
}
export function getLruCache<T>(cacheSize: number): LruCache<T> {
if (cacheSize >= 1) {
return HLRU(cacheSize)
// LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance
export function getLruCache<Key, Value>(maxCacheSize: number): LruCache<Key, Value> {
if (maxCacheSize < 1) {
return {
get: () => undefined,
set: () => {},
}
}
let cacheSize = 0
let cache = new Map<Key, Value>()
let previousCache = new Map<Key, Value>()
function update(key: Key, value: Value) {
cache.set(key, value)
cacheSize++
if (cacheSize > maxCacheSize) {
cacheSize = 0
previousCache = cache
cache = new Map()
}
}
return {
get: () => undefined,
set: () => {},
get(key) {
let value = cache.get(key)
if (value !== undefined) {
return value
}
if ((value = previousCache.get(key)) !== undefined) {
update(key, value)
return value
}
},
set(key, value) {
if (cache.has(key)) {
cache.set(key, value)
} else {
update(key, value)
}
},
}
}

@@ -57,3 +57,3 @@ import { ConfigUtils } from './config-utils'

const classId = `${modifierId}${classGroupId}`
const classId = modifierId + classGroupId

@@ -67,3 +67,3 @@ if (classGroupsInConflict.has(classId)) {

getConflictingClassGroupIds(classGroupId).forEach((group) =>
classGroupsInConflict.add(`${modifierId}${group}`)
classGroupsInConflict.add(modifierId + group)
)

@@ -116,3 +116,3 @@

* - Predefined modifiers are sorted alphabetically
* - When an arbitrary variant appears, it's important to preserve which modifiers are before and after it
* - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
*/

@@ -119,0 +119,0 @@ function sortModifiers(modifiers: string[]) {

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 not supported yet

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 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 not supported yet

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 not supported yet

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 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