helix-twcss 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -2935,7 +2935,7 @@ video {
2935
2935
  }
2936
2936
  return oldReadFileSync(filename, ...args)
2937
2937
  }
2938
- `)(require,__dirname);var Dle=['"',"'","`"," ",".","(","[","!","/"],_le=Object.keys(Ple.default),CH=process.argv.length<=2?(0,yn.createConnection)(process.stdin,process.stdout):(0,yn.createConnection)();console.log=CH.console.log.bind(CH.console);console.error=CH.console.error.bind(CH.console);process.on("unhandledRejection",e=>{CH.console.error(zS("Unhandled exception",e))});function Ele(e,t){return JSON.stringify([e,...t].map(r=>[r,_c.statSync(r).mtimeMs]))}function o9(...e){for(let t=0;t<e.length;t++){let r=e[t];if(t===e.length-1)return r();try{return r()}catch{}}}function yle(...e){for(let t=0;t<e.length;t++){let r=e[t];try{return r()}catch{}}}function Cle(e){if(typeof e.mode<"u")return e.mode;if(Array.isArray(e.presets))for(let t=e.presets.length-1;t>=0;t--){let r=Cle(e.presets[t]);if(typeof r<"u")return r}}function xle(e){if(delete e.mode,Array.isArray(e.presets))for(let t of e.presets)xle(t)}var Hb=new Map;async function lb(e){if(Hb.has(e))return Hb.get(e);let[t,r]=await Promise.all([CH.workspace.getConfiguration({section:"editor",scopeUri:e}),CH.workspace.getConfiguration({section:"tailwindCSS",scopeUri:e})]);t=Bp(t)?t:{},r=Bp(r)?r:{};let n=(0,$le.default)({editor:{tabSize:2},tailwindCSS:{emmetCompletions:!1,classAttributes:["class","className","ngClass"],codeActions:!0,hovers:!0,suggestions:!0,validate:!0,colorDecorators:!0,rootFontSize:16,lint:{cssConflict:"warning",invalidApply:"error",invalidScreen:"error",invalidVariant:"error",invalidConfigPath:"error",invalidTailwindDirective:"error",recommendedVariantOrder:"warning"},showPixelEquivalents:!0,includeLanguages:{},files:{exclude:["**/.git/**","**/node_modules/**","**/.hg/**","**/.svn/**"]},experimental:{classRegex:[],configFile:null}}},{editor:t,tailwindCSS:r},{arrayMerge:(s,i,o)=>i});return Hb.set(e,n),n}function l9(){Object.keys(require.cache).forEach(e=>{e.endsWith(".node")||delete require.cache[e]}),Object.keys(H9.default._pathCache).forEach(e=>{delete H9.default._pathCache[e]})}function set(e){let t={log:console.log,warn:console.warn,error:console.error};for(let r in t)console[r]=()=>{};try{return e()}finally{for(let r in t)console[r]=t[r]}}function BE(e,t){try{return e()}catch{return t}}function aet(e,t){let r=Wr.relative(e,t);return!!r&&!r.startsWith("..")&&!Wr.isAbsolute(r)}function u9(e,t){for(let r of t)if(e===r||aet(e,r))return!0;return!1}function ob(e,t){let r,n=Wr.dirname(e),s=[e,n];if(n===t)return s;for(;n=Wr.dirname(r=n),r!==n;)if(s.push(n),n===t)break;return s}async function oet(e,t,r,n,s,i,o,a,c,u){let H=!1,l=t.folder,f=[],d=t.documentSelector,h=n.capabilities.textDocument?.completion?.completionList?.itemDefaults??[];n.clientInfo?.name?.includes("Visual Studio Code")&&!h.includes("data")&&h.push("data");let m={enabled:!1,completionItemData:{_projectKey:e},editor:{connection:r,folder:l,userLanguages:n.initializationOptions?.userLanguages?n.initializationOptions.userLanguages:{},capabilities:{configuration:!0,diagnosticRelatedInformation:!0,itemDefaults:h},getConfiguration:lb,getDocumentSymbols:T=>r.sendRequest("@/tailwindCSS/getDocumentSymbols",{uri:T}),async readDirectory(T,A){try{A=Wr.resolve(Wr.dirname(Bg(T.uri)),A);let D=await _c.promises.readdir(A,{withFileTypes:!0});return(await Promise.all(D.map(async S=>{let k=S.isDirectory();return await zu(m,T,Wr.join(A,S.name,k?"/":""))?null:[S.name,{isDirectory:k}]}))).filter(S=>S!==null)}catch{return[]}}}};if(t.configPath){let T=[];try{T=jg(t.configPath)}catch{}c([...ob(t.configPath,t.folder),...T.flatMap(A=>ob(A,t.folder))])}function g(...T){console.log(`[${Wr.relative(t.folder,t.configPath)}] ${T.join(" ")}`)}function L(T){let A=!1,D=!1;for(let C of T){let S=(0,na.default)(C.file),k=u9(S,[t.configPath]),w=u9(S,m.dependencies??[]),N=(0,cu.default)(S,`**/${i1}`,{dot:!0});if(!(!k&&!w&&!N)){if(!H){!t.isUserConfigured&&t.configPath&&(k||w)&&(d=[...d.filter(({priority:F})=>F!==1),...c9(t.configPath,u,t.folder)],o());continue}if(C.type===yn.FileChangeType.Created){g("File created:",C.file),A=!0;break}else if(C.type===yn.FileChangeType.Changed)if(g("File changed:",C.file),!m.enabled||N){A=!0;break}else D=!0;else if(C.type===yn.FileChangeType.Deleted)if(g("File deleted:",C.file),!m.enabled||k||N){A=!0;break}else D=!0}}A?I():D&&v()}function _(){Object.keys(m).forEach(T=>{T!=="editor"&&T!=="dependencies"&&delete m[T]}),m.enabled=!1,a(),i(),r.sendNotification("@/tailwindCSS/projectReset")}async function I(){if(H)try{await $(),r.sendNotification("@/tailwindCSS/projectInitialized")}catch(T){_(),YS(r,T)}}async function v(){if(H)try{await b()}catch(T){_(),YS(r,T)}}async function $(){g("Initializing..."),l9();let T=t.configPath;if(!T)throw new ny("No config file found.");c(ob(T,t.folder));let A=mc.default.sync(W=>{let X=Wr.join(W,".pnp.js");if(mc.default.sync.exists(X)||(X=Wr.join(W,".pnp.cjs"),mc.default.sync.exists(X)))return X;if(W===Wr.normalize(l))return mc.default.stop},{cwd:l});if(A){let W=require(A);W.setup(),E4(W)}let D=jg(T),C=Ele(T,D),S=Wr.dirname(T),k,w,N,F,U,j,G,z,J,V,ne={future:[],experimental:[]},te;try{let W=Ln(S,"tailwindcss"),X=Ln(S,"tailwindcss/package.json"),q=Wr.dirname(X),ie=Ln(q,"postcss"),Ae=Ln(q,"postcss/package.json"),Le=Wr.dirname(Ae),$e=Ln(q,"postcss-selector-parser");if(j=require(Ae).version,U=require(X).version,G=Object.keys(iL).map(Ee=>{try{return require(Ln(S,`${Ee}/package.json`)).version}catch{return""}}).join(","),m.enabled&&j===m.modules.postcss.version&&U===m.modules.tailwindcss.version&&G===m.pluginVersions&&T===m.configPath&&C===m.configId)return;g(`Loaded Tailwind CSS config file: ${T}`),w=require(ie),N=require($e),g(`Loaded postcss v${j}: ${Le}`),k=require(W),g(`Loaded tailwindcss v${U}: ${q}`);try{J=require(Ln(q,"./resolveConfig.js"))}catch{try{let xe=require(Ln(q,"./lib/util/resolveConfig.js")),Oe=require(Ln(q,"./stubs/defaultConfig.stub.js"));J=Ke=>xe([Ke,Oe])}catch{try{let Oe=require(Ln(q,"./lib/util/mergeConfigWithDefaults.js")),Ke=require(Ln(q,"./defaultConfig.js"));J=le=>Oe.default(le,Ke())}catch{throw Error("Failed to load resolveConfig function.")}}}try{V=require(Ln(q,"./loadConfig.js"))}catch{}if(tn(U,"1.4.0")&&WX(U,"1.99.0")){let Ee=Ln(q,"browserslist");z=require(Ee)(void 0,{path:l})}tn(U,"1.99.0")?te=yle(()=>require(Ln(q,"./lib/lib/substituteClassApplyAtRules"))):tn(U,"1.7.0")&&(te=require(Ln(q,"./lib/flagged/applyComplexClasses")));try{ne=require(Ln(q,"./lib/featureFlags.js")).default}catch{}let Me=new Set,Je=w.root(),et={opts:{},messages:[]},ye=()=>{};try{let Ee=o9(()=>{let xe=require(Ln(S,"tailwindcss/lib/lib/setupContextUtils")).createContext;return UE.default.strictEqual(typeof xe,"function"),Oe=>xe(Oe.config)},()=>{let xe=require(Ln(S,"tailwindcss/lib/jit/lib/setupContextUtils")).createContext;return UE.default.strictEqual(typeof xe,"function"),Oe=>xe(Oe.config)},()=>{let xe=require(Ln(S,"tailwindcss/lib/jit/lib/setupTrackingContext")).default;return UE.default.strictEqual(typeof xe,"function"),Oe=>xe(Oe.configPath,Me,ye)(et,Je)},()=>{let xe=require(Ln(S,"tailwindcss/lib/jit/lib/setupContext")).default;return UE.default.strictEqual(typeof xe,"function"),Oe=>xe(Oe.configPath,Me)(et,Je)});F={generateRules:{module:o9(()=>require(Ln(S,"tailwindcss/lib/lib/generateRules")).generateRules,()=>require(Ln(S,"tailwindcss/lib/jit/lib/generateRules")).generateRules)},createContext:{module:Ee},expandApplyAtRules:{module:o9(()=>require(Ln(S,"tailwindcss/lib/lib/expandApplyAtRules")).default,()=>require(Ln(S,"tailwindcss/lib/jit/lib/expandApplyAtRules")).default)},evaluateTailwindFunctions:{module:yle(()=>require(Ln(S,"tailwindcss/lib/lib/evaluateTailwindFunctions")).default)}}}catch{try{let xe=require(Ln(S,"tailwindcss/jit/lib/setupContext"));F={generateRules:{module:require(Ln(S,"tailwindcss/jit/lib/generateRules")).generateRules},createContext:{module:Oe=>xe(Oe.configPath,Me)(et,Je)},expandApplyAtRules:{module:require(Ln(S,"tailwindcss/jit/lib/expandApplyAtRules"))}}}catch{}}}catch{k=bHe(),J=qD(),V=THe(),w=ta(),U=ap().version,j=PHe().version,N=TL(),F={generateRules:{module:Q1().generateRules},createContext:{module:X=>eE().createContext(X.config)},expandApplyAtRules:{module:G3().default}},g("Failed to load workspace modules."),g(`Using bundled version of \`tailwindcss\`: v${U}`),g(`Using bundled version of \`postcss\`: v${j}`)}m.configPath=T,m.modules={tailwindcss:{version:U,module:k},postcss:{version:j,module:w},postcssSelectorParser:{module:N},resolveConfig:{module:J},loadConfig:{module:V},jit:F},m.browserslist=z,m.featureFlags=ne,m.version=U,m.pluginVersions=G;try{m.corePlugins=Object.keys(require(Ln(Wr.dirname(m.configPath),"tailwindcss/lib/plugins/index.js")))}catch{}if(te&&!te.default.__patched){let W=te.default;te.default=(X,...q)=>{if(m.jit)return m.modules.jit.expandApplyAtRules.module(m.jitContext);let ie=Wu(X);ie.separator=typeof m.separator>"u"?":":m.separator;let Ae=W(ie,...q);return async Le=>(Le.walkRules($e=>{let Me=$e.selector.replace(/__TWSEP__(.*?)__TWSEP__/g,"$1");Me!==$e.selector&&($e.before(w.comment({text:"__ORIGINAL_SELECTOR__:"+$e.selector})),$e.selector=Me)}),await Ae(Le),Le.walkComments($e=>{$e.text.startsWith("__ORIGINAL_SELECTOR__:")&&($e.next().selector=$e.text.replace(/^__ORIGINAL_SELECTOR__:/,""),$e.remove())}),Le)},te.default.__patched=!0}await v()}async function b(){g("Building..."),l9();let{tailwindcss:T,postcss:A,resolveConfig:D,loadConfig:C}=m.modules,S=tn(T.version,"0.99.0")?["separator"]:["options","separator"],k=[],w,N=tn(T.version,"2.99.0"),F;if(C.module){F=new Gd(_c.realpathSync(m.configPath));try{w=await C.module(m.configPath),w=w.default??w,m.jit=!0}finally{F.unhook()}}else{F=new Gd(_c.realpathSync(m.configPath),G=>{w=Wu(G);let z=(0,DH.default)(G,S);typeof z!="string"&&(z=":"),Ba(G,S,`__TWSEP__${z}__TWSEP__`),G[N?"content":"purge"]=[];let J=Cle(G);if(xle(G),N||m.modules.jit&&J==="jit"){if(m.jit=!0,G.variants=[],Array.isArray(G.presets))for(let ne of G.presets)k.push(ne.variants),ne.variants=[]}else m.jit=!1;if(m.corePlugins){let ne={};for(let te of m.corePlugins)ne[te]=!0;G.corePlugins=ne}return Array.isArray(G.plugins)&&(G.plugins=G.plugins.map(ne=>{if(ne.__isOptionsFunction&&(ne=ne()),typeof ne=="function"){let te=(...W)=>(W[0].matchUtilities||(W[0].matchUtilities=()=>{}),ne(...W));return te.__intellisense_cache_bust=Math.random(),te}return ne.handler?{...ne,handler:(...te)=>(te[0].matchUtilities||(te[0].matchUtilities=()=>{}),ne.handler(...te)),__intellisense_cache_bust:Math.random()}:ne})),G});try{require(m.configPath)}catch(G){throw F.unhook(),G}}if(!w)throw new ny(`Failed to load config file: ${m.configPath}`);t.isUserConfigured||(d=[...d.filter(({priority:G})=>G!==1),...c9(m.configPath,T.version,t.folder,w)]);try{if(m.config=D.module(w),m.separator=(0,DH.default)(m.config,S),typeof m.separator!="string"&&(m.separator=":"),m.blocklist=Array.isArray(m.config.blocklist)?m.config.blocklist:[],delete m.config.blocklist,m.jit){if(m.jitContext=m.modules.jit.createContext.module(m),m.jitContext.tailwindConfig.separator=m.config.separator,m.jitContext.getClassList){let G=m.jitContext.getClassList({includeMetadata:!0}).filter(z=>z!=="*");m.classListContainsMetadata=G.some(z=>Array.isArray(z)),m.classList=G.map(z=>Array.isArray(z)?[z[0],{color:Jl(m,z[0]),...z[1]??{}}]:[z,{color:Jl(m,z)}])}}else delete m.jitContext,delete m.classList}catch(G){throw F?.unhook(),G}let U;if(m.classList)F?.unhook();else try{U=await A.module([T.module(m.configPath)]).process([tn(T.version,"0.99.0")?"base":"preflight","components","utilities"].map(G=>`/*__tw_intellisense_layer_${G}__*/
2938
+ `)(require,__dirname);var Dle=['"',"'","`"," ",".","(","[","!","/"],_le=Object.keys(Ple.default),CH=process.argv.length<=2?(0,yn.createConnection)(process.stdin,process.stdout):(0,yn.createConnection)();console.log=CH.console.log.bind(CH.console);console.error=CH.console.error.bind(CH.console);process.on("unhandledRejection",e=>{CH.console.error(zS("Unhandled exception",e))});function Ele(e,t){return JSON.stringify([e,...t].map(r=>[r,_c.statSync(r).mtimeMs]))}function o9(...e){for(let t=0;t<e.length;t++){let r=e[t];if(t===e.length-1)return r();try{return r()}catch{}}}function yle(...e){for(let t=0;t<e.length;t++){let r=e[t];try{return r()}catch{}}}function Cle(e){if(typeof e.mode<"u")return e.mode;if(Array.isArray(e.presets))for(let t=e.presets.length-1;t>=0;t--){let r=Cle(e.presets[t]);if(typeof r<"u")return r}}function xle(e){if(delete e.mode,Array.isArray(e.presets))for(let t of e.presets)xle(t)}var Hb=new Map;async function lb(e){if(Hb.has(e))return Hb.get(e);let[t,r]=await Promise.all([CH.workspace.getConfiguration({section:"editor",scopeUri:e}),CH.workspace.getConfiguration({section:"tailwindCSS",scopeUri:e})]);t=Bp(t)?t:{},r=Bp(r)?r:{};let n=(0,$le.default)({editor:{tabSize:2},tailwindCSS:{emmetCompletions:!1,classAttributes:["class","className","ngClass","\\w.*_CLASS","\\w.*_class"],codeActions:!0,hovers:!0,suggestions:!0,validate:!0,colorDecorators:!0,rootFontSize:16,lint:{cssConflict:"warning",invalidApply:"error",invalidScreen:"error",invalidVariant:"error",invalidConfigPath:"error",invalidTailwindDirective:"error",recommendedVariantOrder:"warning"},showPixelEquivalents:!0,includeLanguages:{},files:{exclude:["**/.git/**","**/node_modules/**","**/.hg/**","**/.svn/**"]},experimental:{classRegex:[],configFile:null}}},{editor:t,tailwindCSS:r},{arrayMerge:(s,i,o)=>i});return Hb.set(e,n),n}function l9(){Object.keys(require.cache).forEach(e=>{e.endsWith(".node")||delete require.cache[e]}),Object.keys(H9.default._pathCache).forEach(e=>{delete H9.default._pathCache[e]})}function set(e){let t={log:console.log,warn:console.warn,error:console.error};for(let r in t)console[r]=()=>{};try{return e()}finally{for(let r in t)console[r]=t[r]}}function BE(e,t){try{return e()}catch{return t}}function aet(e,t){let r=Wr.relative(e,t);return!!r&&!r.startsWith("..")&&!Wr.isAbsolute(r)}function u9(e,t){for(let r of t)if(e===r||aet(e,r))return!0;return!1}function ob(e,t){let r,n=Wr.dirname(e),s=[e,n];if(n===t)return s;for(;n=Wr.dirname(r=n),r!==n;)if(s.push(n),n===t)break;return s}async function oet(e,t,r,n,s,i,o,a,c,u){let H=!1,l=t.folder,f=[],d=t.documentSelector,h=n.capabilities.textDocument?.completion?.completionList?.itemDefaults??[];n.clientInfo?.name?.includes("Visual Studio Code")&&!h.includes("data")&&h.push("data");let m={enabled:!1,completionItemData:{_projectKey:e},editor:{connection:r,folder:l,userLanguages:n.initializationOptions?.userLanguages?n.initializationOptions.userLanguages:{},capabilities:{configuration:!0,diagnosticRelatedInformation:!0,itemDefaults:h},getConfiguration:lb,getDocumentSymbols:T=>r.sendRequest("@/tailwindCSS/getDocumentSymbols",{uri:T}),async readDirectory(T,A){try{A=Wr.resolve(Wr.dirname(Bg(T.uri)),A);let D=await _c.promises.readdir(A,{withFileTypes:!0});return(await Promise.all(D.map(async S=>{let k=S.isDirectory();return await zu(m,T,Wr.join(A,S.name,k?"/":""))?null:[S.name,{isDirectory:k}]}))).filter(S=>S!==null)}catch{return[]}}}};if(t.configPath){let T=[];try{T=jg(t.configPath)}catch{}c([...ob(t.configPath,t.folder),...T.flatMap(A=>ob(A,t.folder))])}function g(...T){console.log(`[${Wr.relative(t.folder,t.configPath)}] ${T.join(" ")}`)}function L(T){let A=!1,D=!1;for(let C of T){let S=(0,na.default)(C.file),k=u9(S,[t.configPath]),w=u9(S,m.dependencies??[]),N=(0,cu.default)(S,`**/${i1}`,{dot:!0});if(!(!k&&!w&&!N)){if(!H){!t.isUserConfigured&&t.configPath&&(k||w)&&(d=[...d.filter(({priority:F})=>F!==1),...c9(t.configPath,u,t.folder)],o());continue}if(C.type===yn.FileChangeType.Created){g("File created:",C.file),A=!0;break}else if(C.type===yn.FileChangeType.Changed)if(g("File changed:",C.file),!m.enabled||N){A=!0;break}else D=!0;else if(C.type===yn.FileChangeType.Deleted)if(g("File deleted:",C.file),!m.enabled||k||N){A=!0;break}else D=!0}}A?I():D&&v()}function _(){Object.keys(m).forEach(T=>{T!=="editor"&&T!=="dependencies"&&delete m[T]}),m.enabled=!1,a(),i(),r.sendNotification("@/tailwindCSS/projectReset")}async function I(){if(H)try{await $(),r.sendNotification("@/tailwindCSS/projectInitialized")}catch(T){_(),YS(r,T)}}async function v(){if(H)try{await b()}catch(T){_(),YS(r,T)}}async function $(){g("Initializing..."),l9();let T=t.configPath;if(!T)throw new ny("No config file found.");c(ob(T,t.folder));let A=mc.default.sync(W=>{let X=Wr.join(W,".pnp.js");if(mc.default.sync.exists(X)||(X=Wr.join(W,".pnp.cjs"),mc.default.sync.exists(X)))return X;if(W===Wr.normalize(l))return mc.default.stop},{cwd:l});if(A){let W=require(A);W.setup(),E4(W)}let D=jg(T),C=Ele(T,D),S=Wr.dirname(T),k,w,N,F,U,j,G,z,J,V,ne={future:[],experimental:[]},te;try{let W=Ln(S,"tailwindcss"),X=Ln(S,"tailwindcss/package.json"),q=Wr.dirname(X),ie=Ln(q,"postcss"),Ae=Ln(q,"postcss/package.json"),Le=Wr.dirname(Ae),$e=Ln(q,"postcss-selector-parser");if(j=require(Ae).version,U=require(X).version,G=Object.keys(iL).map(Ee=>{try{return require(Ln(S,`${Ee}/package.json`)).version}catch{return""}}).join(","),m.enabled&&j===m.modules.postcss.version&&U===m.modules.tailwindcss.version&&G===m.pluginVersions&&T===m.configPath&&C===m.configId)return;g(`Loaded Tailwind CSS config file: ${T}`),w=require(ie),N=require($e),g(`Loaded postcss v${j}: ${Le}`),k=require(W),g(`Loaded tailwindcss v${U}: ${q}`);try{J=require(Ln(q,"./resolveConfig.js"))}catch{try{let xe=require(Ln(q,"./lib/util/resolveConfig.js")),Oe=require(Ln(q,"./stubs/defaultConfig.stub.js"));J=Ke=>xe([Ke,Oe])}catch{try{let Oe=require(Ln(q,"./lib/util/mergeConfigWithDefaults.js")),Ke=require(Ln(q,"./defaultConfig.js"));J=le=>Oe.default(le,Ke())}catch{throw Error("Failed to load resolveConfig function.")}}}try{V=require(Ln(q,"./loadConfig.js"))}catch{}if(tn(U,"1.4.0")&&WX(U,"1.99.0")){let Ee=Ln(q,"browserslist");z=require(Ee)(void 0,{path:l})}tn(U,"1.99.0")?te=yle(()=>require(Ln(q,"./lib/lib/substituteClassApplyAtRules"))):tn(U,"1.7.0")&&(te=require(Ln(q,"./lib/flagged/applyComplexClasses")));try{ne=require(Ln(q,"./lib/featureFlags.js")).default}catch{}let Me=new Set,Je=w.root(),et={opts:{},messages:[]},ye=()=>{};try{let Ee=o9(()=>{let xe=require(Ln(S,"tailwindcss/lib/lib/setupContextUtils")).createContext;return UE.default.strictEqual(typeof xe,"function"),Oe=>xe(Oe.config)},()=>{let xe=require(Ln(S,"tailwindcss/lib/jit/lib/setupContextUtils")).createContext;return UE.default.strictEqual(typeof xe,"function"),Oe=>xe(Oe.config)},()=>{let xe=require(Ln(S,"tailwindcss/lib/jit/lib/setupTrackingContext")).default;return UE.default.strictEqual(typeof xe,"function"),Oe=>xe(Oe.configPath,Me,ye)(et,Je)},()=>{let xe=require(Ln(S,"tailwindcss/lib/jit/lib/setupContext")).default;return UE.default.strictEqual(typeof xe,"function"),Oe=>xe(Oe.configPath,Me)(et,Je)});F={generateRules:{module:o9(()=>require(Ln(S,"tailwindcss/lib/lib/generateRules")).generateRules,()=>require(Ln(S,"tailwindcss/lib/jit/lib/generateRules")).generateRules)},createContext:{module:Ee},expandApplyAtRules:{module:o9(()=>require(Ln(S,"tailwindcss/lib/lib/expandApplyAtRules")).default,()=>require(Ln(S,"tailwindcss/lib/jit/lib/expandApplyAtRules")).default)},evaluateTailwindFunctions:{module:yle(()=>require(Ln(S,"tailwindcss/lib/lib/evaluateTailwindFunctions")).default)}}}catch{try{let xe=require(Ln(S,"tailwindcss/jit/lib/setupContext"));F={generateRules:{module:require(Ln(S,"tailwindcss/jit/lib/generateRules")).generateRules},createContext:{module:Oe=>xe(Oe.configPath,Me)(et,Je)},expandApplyAtRules:{module:require(Ln(S,"tailwindcss/jit/lib/expandApplyAtRules"))}}}catch{}}}catch{k=bHe(),J=qD(),V=THe(),w=ta(),U=ap().version,j=PHe().version,N=TL(),F={generateRules:{module:Q1().generateRules},createContext:{module:X=>eE().createContext(X.config)},expandApplyAtRules:{module:G3().default}},g("Failed to load workspace modules."),g(`Using bundled version of \`tailwindcss\`: v${U}`),g(`Using bundled version of \`postcss\`: v${j}`)}m.configPath=T,m.modules={tailwindcss:{version:U,module:k},postcss:{version:j,module:w},postcssSelectorParser:{module:N},resolveConfig:{module:J},loadConfig:{module:V},jit:F},m.browserslist=z,m.featureFlags=ne,m.version=U,m.pluginVersions=G;try{m.corePlugins=Object.keys(require(Ln(Wr.dirname(m.configPath),"tailwindcss/lib/plugins/index.js")))}catch{}if(te&&!te.default.__patched){let W=te.default;te.default=(X,...q)=>{if(m.jit)return m.modules.jit.expandApplyAtRules.module(m.jitContext);let ie=Wu(X);ie.separator=typeof m.separator>"u"?":":m.separator;let Ae=W(ie,...q);return async Le=>(Le.walkRules($e=>{let Me=$e.selector.replace(/__TWSEP__(.*?)__TWSEP__/g,"$1");Me!==$e.selector&&($e.before(w.comment({text:"__ORIGINAL_SELECTOR__:"+$e.selector})),$e.selector=Me)}),await Ae(Le),Le.walkComments($e=>{$e.text.startsWith("__ORIGINAL_SELECTOR__:")&&($e.next().selector=$e.text.replace(/^__ORIGINAL_SELECTOR__:/,""),$e.remove())}),Le)},te.default.__patched=!0}await v()}async function b(){g("Building..."),l9();let{tailwindcss:T,postcss:A,resolveConfig:D,loadConfig:C}=m.modules,S=tn(T.version,"0.99.0")?["separator"]:["options","separator"],k=[],w,N=tn(T.version,"2.99.0"),F;if(C.module){F=new Gd(_c.realpathSync(m.configPath));try{w=await C.module(m.configPath),w=w.default??w,m.jit=!0}finally{F.unhook()}}else{F=new Gd(_c.realpathSync(m.configPath),G=>{w=Wu(G);let z=(0,DH.default)(G,S);typeof z!="string"&&(z=":"),Ba(G,S,`__TWSEP__${z}__TWSEP__`),G[N?"content":"purge"]=[];let J=Cle(G);if(xle(G),N||m.modules.jit&&J==="jit"){if(m.jit=!0,G.variants=[],Array.isArray(G.presets))for(let ne of G.presets)k.push(ne.variants),ne.variants=[]}else m.jit=!1;if(m.corePlugins){let ne={};for(let te of m.corePlugins)ne[te]=!0;G.corePlugins=ne}return Array.isArray(G.plugins)&&(G.plugins=G.plugins.map(ne=>{if(ne.__isOptionsFunction&&(ne=ne()),typeof ne=="function"){let te=(...W)=>(W[0].matchUtilities||(W[0].matchUtilities=()=>{}),ne(...W));return te.__intellisense_cache_bust=Math.random(),te}return ne.handler?{...ne,handler:(...te)=>(te[0].matchUtilities||(te[0].matchUtilities=()=>{}),ne.handler(...te)),__intellisense_cache_bust:Math.random()}:ne})),G});try{require(m.configPath)}catch(G){throw F.unhook(),G}}if(!w)throw new ny(`Failed to load config file: ${m.configPath}`);t.isUserConfigured||(d=[...d.filter(({priority:G})=>G!==1),...c9(m.configPath,T.version,t.folder,w)]);try{if(m.config=D.module(w),m.separator=(0,DH.default)(m.config,S),typeof m.separator!="string"&&(m.separator=":"),m.blocklist=Array.isArray(m.config.blocklist)?m.config.blocklist:[],delete m.config.blocklist,m.jit){if(m.jitContext=m.modules.jit.createContext.module(m),m.jitContext.tailwindConfig.separator=m.config.separator,m.jitContext.getClassList){let G=m.jitContext.getClassList({includeMetadata:!0}).filter(z=>z!=="*");m.classListContainsMetadata=G.some(z=>Array.isArray(z)),m.classList=G.map(z=>Array.isArray(z)?[z[0],{color:Jl(m,z[0]),...z[1]??{}}]:[z,{color:Jl(m,z)}])}}else delete m.jitContext,delete m.classList}catch(G){throw F?.unhook(),G}let U;if(m.classList)F?.unhook();else try{U=await A.module([T.module(m.configPath)]).process([tn(T.version,"0.99.0")?"base":"preflight","components","utilities"].map(G=>`/*__tw_intellisense_layer_${G}__*/
2939
2939
  @tailwind ${G};`).join(`
2940
2940
  `),{from:void 0})}catch(G){throw G}finally{F?.unhook()}m.dependencies=jg(m.configPath),c((m.dependencies??[]).flatMap(G=>ob(G,t.folder))),m.configId=Ele(m.configPath,m.dependencies),m.plugins=await det(w),U&&(m.classNames=await hK(U.root)),m.variants=pet(m);let j=(0,DH.default)(m.config,"theme.screens",(0,DH.default)(m.config,"screens",{}));m.screens=Bp(j)?Object.keys(j):[],m.enabled=!0,a(),i()}return{projectConfig:t,enabled(){return H},enable(){H=!0},state:m,documentSelector(){return d},tryInit:I,async dispose(){m={enabled:!1};for(let T of f)(await T).dispose()},async onUpdateSettings(T){m.enabled&&a(),T.editor.colorDecorators?i():r.sendNotification("@/tailwindCSS/clearColors")},onFileEvents:L,async onHover(T){return BE(async()=>{if(!m.enabled)return null;let A=s.getDocument(T.textDocument.uri);return!A||!(await m.editor.getConfiguration(A.uri)).tailwindCSS.hovers||await zu(m,A)?null:jJ(m,A,T.position)},null)},async onCompletion(T){return BE(async()=>{if(!m.enabled)return null;let A=s.getDocument(T.textDocument.uri);return!A||!(await m.editor.getConfiguration(A.uri)).tailwindCSS.suggestions||await zu(m,A)?null:zJ(m,A,T.position,T.context)},null)},onCompletionResolve(T){return BE(()=>m.enabled?YJ(m,T):null,null)},async onCodeAction(T){return BE(async()=>{if(!m.enabled)return null;let A=s.getDocument(T.textDocument.uri);return!A||!(await m.editor.getConfiguration(A.uri)).tailwindCSS.codeActions?null:bz(m,T,A)},null)},onDocumentLinks(T){if(!m.enabled)return null;let A=s.getDocument(T.textDocument.uri);return A?Tz(m,A,D=>uh.URI.file(Wr.resolve(Wr.dirname(uh.URI.parse(A.uri).fsPath),D)).toString()):null},provideDiagnostics:(0,Tle.debounce)(T=>{m.enabled&&Iw(m,T)},n.initializationOptions?.testMode?0:500),provideDiagnosticsForce:T=>{m.enabled&&Iw(m,T)},async onDocumentColor(T){return BE(async()=>{if(!m.enabled)return[];let A=s.getDocument(T.textDocument.uri);return A?await zu(m,A)?null:Sz(m,A):[]},null)},async onColorPresentation(T){let A=s.getDocument(T.textDocument.uri);if(!A)return[];let D=A.getText(T.range),C=D.match(new RegExp(`-\\[(${_le.join("|")}|(?:(?:#|rgba?\\(|hsla?\\())[^\\]]+)\\]$`,"i"));if(C===null)return[];let S=C[1],k=_le.includes(S),w={mode:"rgb",r:T.color.red,g:T.color.green,b:T.color.blue,alpha:T.color.alpha},N=ch.formatHex8(w);if(!k&&(S.length===4||S.length===5)){let[,...U]=N.match(/^#([a-f\d])\1([a-f\d])\2([a-f\d])\3(?:([a-f\d])\4)?$/i)??[];U.length&&(N=`#${U.filter(Boolean).join("")}`)}N.length===5?N=N.replace(/f$/,""):N.length===9&&(N=N.replace(/ff$/,""));let F=D.substr(0,C.index);return[N,ch.formatRgb(w).replace(/ /g,""),ch.formatHsl(w).replace(/ /g,"").replace(/\d+\.\d+(%?)/g,(U,j)=>`${Math.round(parseFloat(U))}${j}`)].map(U=>({label:`${F}-[${U}]`}))},sortClassLists(T){return m.jit?T.map(A=>{let D="",C=A.split(/(\s+)/),S=C.filter((N,F)=>F%2===0),k=C.filter((N,F)=>F%2!==0);S[S.length-1]===""&&S.pop(),S=(m.jitContext.getClassOrder?m.jitContext.getClassOrder(S):Het(m,S)).sort(([,N],[,F])=>N===F?0:N===null?-1:F===null?1:mf(N-F)).map(([N])=>N);for(let N=0;N<S.length;N++)D+=`${S[N]}${k[N]??""}`;return D}):T}}}function Lle(e,t){let r=e.config.prefix;return typeof r=="function"?r(t):r+t}function Het(e,t){let r=new Set([Lle(e,"group"),Lle(e,"peer")]),n=[];for(let s of t){let i=e.modules.jit.generateRules.module(new Set([s]),e.jitContext).sort(([o],[a])=>mf(a-o))[0]?.[0]??null;i===null&&r.has(s)&&(i=e.jitContext.layerOrder.components),n.push([s,i])}return n}function Bp(e){return Object.prototype.toString.call(e)==="[object Object]"}function uet(e,t,r={}){let n=t.config,s=t.modules.postcss.module,i=t.browserslist,o=i&&i.includes("ie 11")?"ie11":"relaxed",a=typeof e=="function"?e:e.handler;try{a({addUtilities:()=>{},addComponents:()=>{},addBase:()=>{},matchUtilities:()=>{},addVariant:()=>{},e:c=>c,prefix:c=>c,theme:(c,u)=>(0,DH.default)(n,`theme.${c}`,u),variants:()=>[],config:(c,u)=>(0,DH.default)(n,c,u),corePlugins:c=>Array.isArray(n.corePlugins)?n.corePlugins.includes(c):(0,DH.default)(n,`corePlugins.${c}`,!0),target:c=>{if(typeof n.target=="string")return n.target==="browserslist"?o:n.target;let[u,H]=(0,DH.default)(n,"target"),l=(0,DH.default)(H,c,u);return l==="browserslist"?o:l},postcss:s,...r})}catch{}}function cet(e){return e.type==="atrule"}function pet(e){if(e.jitContext?.getVariants)return e.jitContext.getVariants();if(e.jit){let i=[];return Array.from(e.jitContext.variantMap).forEach(([o,a])=>{i.push({name:o,values:[],isArbitrary:!1,hasDash:!0,selectors:()=>{function c(g){let L=e.modules.postcssSelectorParser.module.className();return L.value=g,(0,DH.default)(L,"raws.value",L.value)}let u=(Array.isArray(a[0])?a:[a]).map(([g,L])=>L),H="__variant_placeholder__",l=e.modules.postcss.module.root({nodes:[e.modules.postcss.module.rule({selector:`.${c(H)}`,nodes:[]})]}),f=e.modules.postcssSelectorParser.module(g=>g.first.filter(({type:L})=>L==="class").pop().value);function d(g){return f.transformSync(g)}function h(g){return l.each(L=>{L.type==="rule"&&(L.selectors=L.selectors.map(_=>g({get className(){return d(_)},selector:_})))}),l}let m=[];for(let g of u){let L,_=l.clone(),I=set(()=>g({container:_,separator:e.separator,modifySelectors:h,format:v=>{L=v.replace(/:merge\(([^)]+)\)/g,"$1")},wrap:v=>{cet(v)&&(L=`@${v.name} ${v.params}`)}}));if(L||(L=I),L){m.push(L);continue}_.walkDecls(v=>{v.remove()}),L=_.toString().replace(`.${c(`${o}:${H}`)}`,"&").replace(/(?<!\\)[{}]/g,"").replace(/\s*\n\s*/g," ").trim(),L.includes(H)||m.push(L)}return m}})}),i}let t=e.config,r=e.modules.tailwindcss.version,n=["responsive","hover"];return tn(r,"0.3.0")&&n.push("focus","group-hover"),tn(r,"0.5.0")&&n.push("active"),tn(r,"0.7.0")&&n.push("focus-within"),tn(r,"1.0.0-beta.1")&&n.push("default"),tn(r,"1.1.0")&&n.push("first","last","odd","even","disabled","visited"),tn(r,"1.3.0")&&n.push("group-focus"),tn(r,"1.5.0")&&n.push("focus-visible","checked"),tn(r,"1.6.0")&&n.push("motion-safe","motion-reduce"),tn(r,"2.0.0-alpha.1")&&n.push("dark"),(Array.isArray(t.plugins)?t.plugins:[]).forEach(i=>{uet(i,e,{addVariant:o=>{n.push(o)}})}),n.map(i=>({name:i,values:[],isArbitrary:!1,hasDash:!0,selectors:()=>[]}))}async function det(e){let t=e.plugins;return Array.isArray(t)?Promise.all(t.map(async r=>{let n=r.config;Bp(n)||(n={});let s={theme:Bp(n.theme)?Object.keys(n.theme):[],variants:Bp(n.variants)?Object.keys(n.variants):[]},i=r.handler||r,o=typeof i.name=="string"&&i.name!=="handler"&&i.name!==""?i.name:null;try{i()}catch(a){let c=Sle.default.parse(a);if(c.length===0)return{name:o};let u=c[0].fileName,H=Wr.dirname(u);if(!vle.default.sync({cwd:H}))return{name:o};let f;try{f=require(f)}catch{return{name:o}}if(f.name&&Wr.resolve(H,f.main||"index.js")===u)return{name:f.name,homepage:f.homepage,contributes:s}}return{name:o}})):[]}async function gle(e){let r=rs(await _c.promises.readFile(e,"utf8"),"css").match(/@config\s*(?<config>'[^']+'|"[^"]+")/);return r?(0,na.default)(Wr.resolve(Wr.dirname(e),r.groups.config.slice(1,-1))):null}function wle(e,t){try{let r=mc.default.sync(n=>{let s=Wr.join(n,"package.json");if(mc.default.sync.exists(s))return s;if(n===Wr.normalize(t))return mc.default.stop},{cwd:e});return r?Wr.dirname(r):t}catch{return t}}function c9(e,t,r,n){let s=n??require(e),i=s.content?.files??s.content,o=Array.isArray(i)?i:[],a=tn(t,"3.2.0")?s.future?.relativeContentPathsByDefault||s.content?.relative:!1,c;return a?c=Wr.dirname(e):c=wle(Wr.dirname(e),r),o.filter(u=>typeof u=="string").map(u=>u.startsWith("!")?`!${Wr.resolve(c,u.slice(1))}`:Wr.resolve(c,u)).map(u=>({pattern:(0,na.default)(u),priority:1}))}var p9=class{constructor(t){this.connection=t;this.lspHandlersAdded=!1;this.disposables=[];this.watchPatterns=()=>{};this.watched=[];this.documentService=new d9(this.connection),this.workspaces=new Map,this.projects=new Map,this.projectCounter=0}async init(){this.initPromise||(this.initPromise=this._init()),await this.initPromise}async _init(){l9();let t;if(this.initializeParams.rootUri?t=uh.URI.parse(this.initializeParams.rootUri).fsPath:this.initializeParams.rootPath&&(t=Hz(this.initializeParams.rootPath)),!t){console.error("No workspace folders found, not initializing.");return}t=(0,na.default)(t);let r=[],n=await lb(),s=n.tailwindCSS.files.exclude,i=n.tailwindCSS.experimental.configFile,o=new Map,a=new Map,c=this.initializeParams.initializationOptions?.workspaceFile?Wr.dirname(this.initializeParams.initializationOptions.workspaceFile):t;if(i){if(typeof i!="string"&&(!Bp(i)||!Object.entries(i).every(([l,f])=>typeof l!="string"?!1:Array.isArray(f)?f.every(d=>typeof d=="string"):typeof f=="string"))){console.error("Invalid `experimental.configFile` configuration, not initializing.");return}let H=typeof i=="string"?{[i]:Wr.resolve(t,"**")}:i;r=Object.entries(H).map(([l,f])=>({folder:t,configPath:(0,na.default)(Wr.resolve(c,l)),documentSelector:[].concat(f).map(d=>({priority:0,pattern:(0,na.default)(Wr.resolve(c,d))})),isUserConfigured:!0}))}else{let H={},l=await(0,Ale.default)([`**/${n1}`,`**/${bf}`],{cwd:t,ignore:(await lb()).tailwindCSS.files.exclude,onlyFiles:!0,absolute:!0,suppressErrors:!0,dot:!0,concurrency:Math.max(ble.cpus().length,1)});for(let h of l){let m=(0,na.default)(h),g=(0,cu.default)(m,`**/${bf}`,{dot:!0}),L=g?await gle(h):h;if(!L)continue;let _=ap().version,I=!0;try{let b=require(Ln(Wr.dirname(L),"tailwindcss/package.json")).version;typeof b=="string"&&(_=b,I=!1)}catch{}if(g&&(!tn(_,"3.2.0")||I)||(L.endsWith(".ts")||L.endsWith(".mjs"))&&!tn(_,"3.3.0"))continue;a.set(L,_);let v=[];try{v=c9(L,_,t)}catch{}let $=[{pattern:(0,na.default)(h),priority:0},...g?[{pattern:(0,na.default)(L),priority:0}]:[],...v,{pattern:(0,na.default)(Wr.join(Wr.dirname(h),"**")),priority:g?2:3},...g?[{pattern:(0,na.default)(Wr.join(Wr.dirname(L),"**")),priority:3}]:[],{pattern:(0,na.default)(Wr.join(wle(Wr.dirname(L),t),"**")),priority:4}];H[L]=[...H[L]??[],...$],g&&o.set(m,L)}let f=Object.keys(H),d=f.length;d>0&&(d===1&&H[f[0]].push({pattern:(0,na.default)(Wr.join(t,"**")),priority:5}),r=Object.entries(H).map(([h,m])=>({folder:t,configPath:h,isUserConfigured:!1,documentSelector:m.sort((g,L)=>g.priority-L.priority).filter(({pattern:g},L,_)=>_.findIndex(({pattern:I})=>I===g)===L)})))}console.log(`[Global] Creating projects: ${JSON.stringify(r)}`);let u=async H=>{let l=!1;e:for(let f of H){let d=(0,na.default)(f.file);for(let L of s)if((0,cu.default)(d,L,{dot:!0}))continue e;if((0,cu.default)(d,`**/${i1}`,{dot:!0}))for(let[,L]of this.projects){let _=ap().version;try{let I=require(Ln(Wr.dirname(L.projectConfig.configPath),"tailwindcss/package.json")).version;typeof I=="string"&&(_=I)}catch{}if(a.get(L.projectConfig.configPath)!==_){l=!0;break e}}if((0,cu.default)(d,`**/${bf}`,{dot:!0})&&f.type!==yn.FileChangeType.Deleted){let L=await gle(f.file);if(o.has(d)&&o.get(d)!==L){l=!0;break}else if(!o.has(d)&&L){l=!0;break}}if((0,cu.default)(d,`**/${n1}`,{dot:!0})&&f.type===yn.FileChangeType.Created){l=!0;break}for(let[,L]of this.projects)if(f.type===yn.FileChangeType.Deleted&&u9(d,[L.projectConfig.configPath])){l=!0;break e}}if(l){this.restart();return}for(let[,f]of this.projects)f.onFileEvents(H)};if(this.initializeParams.capabilities.workspace?.didChangeWatchedFiles?.dynamicRegistration){this.disposables.push(this.connection.onDidChangeWatchedFiles(async({changes:l})=>{let f=l.map(({uri:d,type:h})=>({file:uh.URI.parse(d).fsPath,type:h})).filter((d,h,m)=>m.findIndex(g=>g.file===d.file&&g.type===d.type)===h);await u(f)}));let H=await this.connection.client.register(yn.DidChangeWatchedFilesNotification.type,{watchers:[{globPattern:`**/${n1}`},{globPattern:`**/${i1}`},{globPattern:`**/${bf}`}]});this.disposables.push(H),this.watchPatterns=l=>{let f=this.filterNewWatchPatterns(l);f.length&&(console.log(`[Global] Adding watch patterns: ${f.join(", ")}`),this.connection.client.register(yn.DidChangeWatchedFilesNotification.type,{watchers:f.map(d=>({globPattern:d}))}).then(d=>{this.disposables.push(d)}))}}else if(cb.getBinding()){let H={create:yn.FileChangeType.Created,update:yn.FileChangeType.Changed,delete:yn.FileChangeType.Deleted},l=await cb.subscribe(t,(f,d)=>{u(d.map(h=>({file:h.path,type:H[h.type]})))},{ignore:s.map(f=>Wr.resolve(t,f.replace(/^[*/]+/,"").replace(/[*/]+$/,"")))});this.disposables.push({dispose(){l.unsubscribe()}})}else{let H=mle().watch,l=H([`**/${n1}`,`**/${i1}`,`**/${bf}`],{cwd:t,ignorePermissionErrors:!0,ignoreInitial:!0,ignored:s,awaitWriteFinish:{stabilityThreshold:100,pollInterval:20}});await new Promise(f=>{l.on("ready",()=>f())}),l.on("add",f=>u([{file:Wr.resolve(t,f),type:yn.FileChangeType.Created}])).on("change",f=>u([{file:Wr.resolve(t,f),type:yn.FileChangeType.Changed}])).on("unlink",f=>u([{file:Wr.resolve(t,f),type:yn.FileChangeType.Deleted}])),this.disposables.push({dispose(){l.close()}}),this.watchPatterns=f=>{let d=this.filterNewWatchPatterns(f);d.length&&(console.log(`[Global] Adding watch patterns: ${d.join(", ")}`),l.add(d))}}await Promise.all(r.map(H=>this.addProject(H,this.initializeParams,this.watchPatterns,a.get(H.configPath))));for(let H of this.documentService.getAllDocuments()){let l=this.getProject(H);l&&!l.enabled()&&(l.enable(),await l.tryInit())}this.setupLSPHandlers(),this.disposables.push(this.connection.onDidChangeConfiguration(async({settings:H})=>{let l=n.tailwindCSS.files.exclude;if(Hb.clear(),n=await lb(),!UH(l,n.tailwindCSS.files.exclude)){this.restart();return}for(let[,f]of this.projects)f.onUpdateSettings(H)})),this.disposables.push(this.connection.onShutdown(()=>{this.dispose()})),this.disposables.push(this.documentService.onDidChangeContent(H=>{this.getProject(H.document)?.provideDiagnostics(H.document)})),this.disposables.push(this.documentService.onDidOpen(H=>{let l=this.getProject(H.document);l&&!l.enabled()&&(l.enable(),l.tryInit())}))}filterNewWatchPatterns(t){let r=t.filter(n=>!this.watched.includes(n));return this.watched.push(...r),r}async addProject(t,r,n,s){let i=String(this.projectCounter++),o=await oet(i,t,this.connection,r,this.documentService,()=>this.updateCapabilities(),()=>{for(let a of this.documentService.getAllDocuments()){let c=this.getProject(a);if(c&&!c.enabled()){c.enable(),c.tryInit();break}}},()=>this.refreshDiagnostics(),a=>n(a),s);this.projects.set(i,o)}refreshDiagnostics(){for(let t of this.documentService.getAllDocuments()){let r=this.getProject(t);r?r.provideDiagnosticsForce(t):this.connection.sendDiagnostics({uri:t.uri,diagnostics:[]})}}setupLSPHandlers(){this.lspHandlersAdded||(this.lspHandlersAdded=!0,this.connection.onHover(this.onHover.bind(this)),this.connection.onCompletion(this.onCompletion.bind(this)),this.connection.onCompletionResolve(this.onCompletionResolve.bind(this)),this.connection.onDocumentColor(this.onDocumentColor.bind(this)),this.connection.onColorPresentation(this.onColorPresentation.bind(this)),this.connection.onCodeAction(this.onCodeAction.bind(this)),this.connection.onDocumentLinks(this.onDocumentLinks.bind(this)),this.connection.onRequest(this.onRequest.bind(this)))}onRequest(t,r){if(t==="@/tailwindCSS/sortSelection"){let n=this.getProject({uri:r.uri});if(!n)return{error:"no-project"};try{return{classLists:n.sortClassLists(r.classLists)}}catch{return{error:"unknown"}}}if(t==="@/tailwindCSS/getProject"){let n=this.getProject({uri:r.uri});return!n||!n.enabled()||!n.state?.enabled?null:{version:n.state.version}}}updateCapabilities(){if(!kle(this.initializeParams))return;this.registrations&&this.registrations.then(n=>n.dispose());let t=Array.from(this.projects.values()),r=yn.BulkRegistration.create();r.add(yn.HoverRequest.type,{documentSelector:null}),r.add(yn.DocumentColorRequest.type,{documentSelector:null}),r.add(yn.CodeActionRequest.type,{documentSelector:null}),r.add(yn.DocumentLinkRequest.type,{documentSelector:null}),r.add(yn.CompletionRequest.type,{documentSelector:null,resolveProvider:!0,triggerCharacters:[...Dle,...t.map(n=>n.state.separator).filter(n=>typeof n=="string").map(n=>n.slice(-1))].filter(Boolean)}),this.registrations=this.connection.client.register(r)}getProject(t){let r,n,s=1/0;for(let[,i]of this.projects)if(i.projectConfig.configPath){let o=i.documentSelector().concat().sort((a,c)=>a.pattern.startsWith("!")&&!c.pattern.startsWith("!")?-1:!a.pattern.startsWith("!")&&c.pattern.startsWith("!")?1:0);for(let a of o){let c=uh.URI.parse(t.uri).fsPath,u=a.pattern.replace(/[\[\]{}]/g,H=>`\\${H}`);if(u.startsWith("!")&&(0,cu.default)(c,u.slice(1),{dot:!0}))break;(0,cu.default)(c,u,{dot:!0})&&a.priority<s&&(n=i,s=a.priority)}}else r||(r=i);return n||r}async onDocumentColor(t){return await this.init(),this.getProject(t.textDocument)?.onDocumentColor(t)??[]}async onColorPresentation(t){return await this.init(),this.getProject(t.textDocument)?.onColorPresentation(t)??[]}async onHover(t){return await this.init(),this.getProject(t.textDocument)?.onHover(t)??null}async onCompletion(t){return await this.init(),this.getProject(t.textDocument)?.onCompletion(t)??null}async onCompletionResolve(t){return await this.init(),this.projects.get(t.data?._projectKey)?.onCompletionResolve(t)??null}async onCodeAction(t){return await this.init(),this.getProject(t.textDocument)?.onCodeAction(t)??null}async onDocumentLinks(t){return await this.init(),this.getProject(t.textDocument)?.onDocumentLinks(t)??null}listen(){this.connection.listen()}dispose(){CH.sendNotification("@/tailwindCSS/projectsDestroyed");for(let[,t]of this.projects)t.dispose();this.projects=new Map,this.refreshDiagnostics(),this.registrations&&(this.registrations.then(t=>t.dispose()),this.registrations=void 0),this.disposables.forEach(t=>t.dispose()),this.disposables.length=0,this.watched.length=0}restart(){console.log(`----------
2941
2941
  RESTARTING
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "helix-twcss",
3
3
  "description": "Tailwind CSS Language Server",
4
4
  "license": "MIT",
5
- "version": "0.0.16",
5
+ "version": "0.0.17",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/tailwindlabs/tailwindcss-intellisense.git",
@@ -85,4 +85,4 @@
85
85
  "singleQuote": true,
86
86
  "printWidth": 100
87
87
  }
88
- }
88
+ }