[
  {
    "path": ".eslintrc.js",
    "content": "module.exports = {\n  env: {\n    node: true,\n  },\n  parser: '@typescript-eslint/parser',\n  extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],\n  rules: {\n    '@typescript-eslint/ban-ts-comment': 'off',\n    '@typescript-eslint/no-explicit-any': 'off',\n    '@typescript-eslint/no-non-null-assertion': 'off',\n    '@typescript-eslint/no-namespace': 'off',\n    '@typescript-eslint/no-empty-function': 'off',\n    '@typescript-eslint/explicit-function-return-type': 'off',\n    '@typescript-eslint/explicit-module-boundary-types': 'off',\n  },\n};\n"
  },
  {
    "path": ".gitignore",
    "content": "lib\n_ref\n\n### Generated by gibo (https://github.com/simonwhitaker/gibo)\n### https://raw.github.com/github/gitignore/d0b80a469983a7beece8fa1f5c48a8242318b531/Node.gitignore\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n.pnpm-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# Snowpack dependency directory (https://snowpack.dev/)\nweb_modules/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional stylelint cache\n.stylelintcache\n\n# Microbundle cache\n.rpt2_cache/\n.rts2_cache_cjs/\n.rts2_cache_es/\n.rts2_cache_umd/\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variable files\n.env\n.env.development.local\n.env.test.local\n.env.production.local\n.env.local\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n.parcel-cache\n\n# Next.js build output\n.next\nout\n\n# Nuxt.js build / generate output\n.nuxt\ndist\n\n# Gatsby files\n.cache/\n# Comment in the public line in if your project uses Gatsby and not Next.js\n# https://nextjs.org/blog/next-9-1#public-directory-support\n# public\n\n# vuepress build output\n.vuepress/dist\n\n# vuepress v2.x temp and cache directory\n.temp\n.cache\n\n# Docusaurus cache and generated files\n.docusaurus\n\n# Serverless directories\n.serverless/\n\n# FuseBox cache\n.fusebox/\n\n# DynamoDB Local files\n.dynamodb/\n\n# TernJS port file\n.tern-port\n\n# Stores VSCode versions used for testing VSCode extensions\n.vscode-test\n\n# yarn v2\n.yarn/cache\n.yarn/unplugged\n.yarn/build-state.yml\n.yarn/install-state.gz\n.pnp.*\n\n\n"
  },
  {
    "path": ".npmignore",
    "content": "src\nnode_modules\ntsconfig.json\n*.map\n.tags\n.DS_Store\nwebpack.config.js\nesbuild.js\nyarn.lock\nyarn-error.log\n.github\n.eslintrc.js\n.prettierrc\n_ref\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2022 yaegassy\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# coc-tailwindcss3\n\n> fork from [vscode-tailwindcss](https://github.com/tailwindlabs/tailwindcss-intellisense/tree/master/packages/vscode-tailwindcss) and [headwind](https://github.com/heybourn/headwind)\n\nIntelligent Tailwind CSS tooling for [coc.nvim](https://github.com/neoclide/coc.nvim).\n\n<img width=\"744\" alt=\"coc-tailwindcss3-screenshot\" src=\"https://user-images.githubusercontent.com/188642/163154916-1810be1e-fa23-4936-82c1-14f3ca294e63.png\">\n\n## Install\n\n```vim\n:CocInstall @yaegassy/coc-tailwindcss3\n```\n\n> scoped packages\n\n## Configuration options\n\n- `tailwindCSS.enable`: Enable coc-tailwindcss3 extension, default: `true`\n- `tailwindCSS.trace.server`: Trace level of tailwindCSS language server, default: `off`\n- `tailwindCSS.custom.serverPath`: Custom path to server module. If there is no setting, the built-in module will be used, default: `\"\"`\n- `tailwindCSS.emmetCompletions`: Enable class name completions when using Emmet-style syntax, for example `div.bg-red-500.uppercase`, default: `false`\n- `tailwindCSS.includeLanguages`: Enable features in languages that are not supported by default. Add a mapping here between the new language and an already supported language. E.g.: `{\"plaintext\": \"html\"}`, default: `{ \"eelixir\": \"html\", \"elixir\": \"html\", \"eruby\": \"html\", \"html.twig\": \"html\" }`\n- `tailwindCSS.files.exclude`: Configure glob patterns to exclude from all IntelliSense features. Inherits all glob patterns from the `#files.exclude#` setting, default: `[\"**/.git/**\", \"**/node_modules/**\", \"**/.hg/**\", \"**/.svn/**\"]`\n- `tailwindCSS.classAttributes`: The HTML attributes for which to provide class completions, hover previews, linting etc, default: `[\"class\", \"className\", \"ngClass\"]`\n- `tailwindCSS.suggestions`: Enable autocomplete suggestions, default: `true`\n- `tailwindCSS.hovers`: Enable hovers, default: `true`\n- `tailwindCSS.codeActions`: Enable code actions, default: `true`\n- `tailwindCSS.validate`: Enable linting. Rules can be configured individually using the `tailwindcss.lint.*` settings, default: `true`\n- `tailwindCSS.lint.cssConflict`: Class names on the same HTML element which apply the same CSS property or properties, valid option [\"ignore\", \"warning\", \"error\"], default: `warning`\n- `tailwindCSS.lint.invalidApply`: Unsupported use of the [`@apply` directive](https://tailwindcss.com/docs/functions-and-directives/#apply), valid option [\"ignore\", \"warning\", \"error\"], default: `error`\n- `tailwindCSS.lint.invalidScreen`: Unknown screen name used with the [`@screen` directive](https://tailwindcss.com/docs/functions-and-directives/#screen), valid option [\"ignore\", \"warning\", \"error\"], default: `error`\n- `tailwindCSS.lint.invalidVariant`: Unknown variant name used with the [`@variants` directive](https://tailwindcss.com/docs/functions-and-directives/#variants), valid option [\"ignore\", \"warning\", \"error\"], default: `error`\n- `tailwindCSS.lint.invalidConfigPath`: Unknown or invalid path used with the [`theme` helper](https://tailwindcss.com/docs/functions-and-directives/#theme), valid option [\"ignore\", \"warning\", \"error\"], default: `error`\n- `tailwindCSS.lint.invalidTailwindDirective`: Unknown value used with the [`@tailwind` directive](https://tailwindcss.com/docs/functions-and-directives/#tailwind), valid option [\"ignore\", \"warning\", \"error\"], default: `error`\n- `tailwindCSS.lint.recommendedVariantOrder`: Class variants not in the recommended order (applies in [JIT mode](https://tailwindcss.com/docs/just-in-time-mode) only), valid option [\"ignore\", \"warning\", \"error\"], default: `error`\n- `tailwindCSS.lint.suggestCanonicalClasses`: Indicate when utilities may be written in a more optimal form, valid option [\"ignore\", \"warning\", \"error\"], default: `warning`\n- `tailwindCSS.experimental.classRegex`: ...\n- `tailwindCSS.inspectPort`: Enable the Node.js inspector agent for the language server and listen on the specified port, default: `null`\n- `tailwindCSS.headwind.defaultSortOrder`: Sort order: A string array that determines the default sort order.\n  - Check the \"Configuration\" section of [package.json](package.json) for default values.\n- `tailwindCSS.headwind.classRegex`: An object with language IDs as keys and their values determining the regex to search for Tailwind CSS classes.\n  - Check the \"Configuration\" section of [package.json](package.json) for default values.\n- `tailwindCSS.headwind.runOnSave`: A flag that controls whether or not Headwind will sort your Tailwind CSS classes on save, default: `false`\n- `tailwindCSS.headwind.removeDuplicates`: A flag that controls whether or not Headwind will remove duplicate Tailwind CSS classes, default: `true`\n- `tailwindCSS.headwind.prependCustomClasses`: A flag that controls whether or not Headwind will move custom CSS classes before (true) or after (false) the Tailwind CSS classes, default: `false`\n- `tailwindCSS.headwind.customTailwindPrefix`: If the Tailwind Prefix function is used, this can be specified here (e.g. tw-), default: `\"\"`\n\n## Commands\n\n- `tailwindCSS.showOutput`: Tailwind CSS: Show Output\n- `tailwindCSS.headwind.sortTailwindClasses`: Headwind: Sort Tailwind CSS Classes\n\n## Custom Server Path\n\n> tailwindCSS.custom.serverPath: Custom path to server module. If there is no setting, the built-in module will be used, default: \"\"\n\nThis setting allows you to use the tailwind's language server module installed in any location.\n\n### Usage Example 1 (Use extensions installed in VSCode)\n\n**setting**:\n\n```jsonc\n{\n  \"tailwindCSS.custom.serverPath\": \"/path/to/.vscode/extensions/bradlc.vscode-tailwindcss-0.12.3/dist/tailwindServer.js\n}\n```\n\n### Usage Example 2 (npm)\n\n**prepare**:\n\n```bash\nnpm i -g @tailwindcss/language-server\n```\n\nor `insiders` verson\n\n```bash\nnpm i -g @tailwindcss/language-server@insiders\n```\n\n- <https://www.npmjs.com/package/@tailwindcss/language-server/v/insiders?activeTab=versions>\n\n**setting**:\n\n```jsonc\n{\n  \"tailwindCSS.custom.serverPath\": \"/path/to/.nvm/versions/node/v20.15.0/bin/tailwindcss-language-server\"\n}\n```\n\n## Thanks\n\n- <https://github.com/tailwindlabs/tailwindcss-intellisense>\n- <https://github.com/heybourn/headwind>\n- <https://github.com/iamcco/coc-tailwindcss>\n\n## License\n\nMIT\n\n---\n\n> This extension is built with [create-coc-extension](https://github.com/fannheyward/create-coc-extension)\n"
  },
  {
    "path": "esbuild.js",
    "content": "/* eslint-disable @typescript-eslint/no-var-requires */\nasync function start(watch) {\n  await require('esbuild').build({\n    entryPoints: ['src/index.ts'],\n    bundle: true,\n    watch,\n    minify: process.env.NODE_ENV === 'production',\n    sourcemap: process.env.NODE_ENV === 'development',\n    mainFields: ['module', 'main'],\n    external: ['coc.nvim'],\n    platform: 'node',\n    target: 'node14.14',\n    outfile: 'lib/index.js',\n  });\n}\n\nlet watch = false;\nif (process.argv.length > 2 && process.argv[2] === '--watch') {\n  console.log('watching...');\n  watch = {\n    onRebuild(error) {\n      if (error) {\n        console.error('watch build failed:', error);\n      } else {\n        console.log('watch build succeeded');\n      }\n    },\n  };\n}\n\nstart(watch).catch((e) => {\n  console.error(e);\n});\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"@yaegassy/coc-tailwindcss3\",\n  \"version\": \"0.6.14\",\n  \"description\": \"Intelligent Tailwind CSS tooling for coc.nvim\",\n  \"author\": \"yaegassy <yosstools@gmail.com>\",\n  \"license\": \"MIT\",\n  \"main\": \"lib/index.js\",\n  \"keywords\": [\n    \"coc.nvim\",\n    \"tailwind\",\n    \"tailwindcss\",\n    \"css\",\n    \"intellisense\",\n    \"autocomplete\",\n    \"vim\",\n    \"neovim\"\n  ],\n  \"engines\": {\n    \"coc\": \"^0.0.80\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/yaegassy/coc-tailwindcss3\"\n  },\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"scripts\": {\n    \"lint\": \"eslint src --ext ts\",\n    \"clean\": \"rimraf lib\",\n    \"watch\": \"node esbuild.js --watch\",\n    \"build\": \"node esbuild.js\",\n    \"prepare\": \"node esbuild.js\"\n  },\n  \"prettier\": {\n    \"singleQuote\": true,\n    \"printWidth\": 120,\n    \"semi\": true\n  },\n  \"devDependencies\": {\n    \"@types/minimatch\": \"^3.0.5\",\n    \"@types/node\": \"^20.10.6\",\n    \"@types/normalize-path\": \"^3.0.0\",\n    \"@typescript-eslint/eslint-plugin\": \"^6.17.0\",\n    \"@typescript-eslint/parser\": \"^6.17.0\",\n    \"coc.nvim\": \"0.0.83-next.17\",\n    \"esbuild\": \"^0.15.12\",\n    \"eslint\": \"^8.56.0\",\n    \"eslint-config-prettier\": \"^9.1.0\",\n    \"eslint-plugin-prettier\": \"^5.1.2\",\n    \"prettier\": \"^3.1.1\",\n    \"rimraf\": \"^5.0.1\",\n    \"typescript\": \"^5.3.3\"\n  },\n  \"activationEvents\": [\n    \"*\"\n  ],\n  \"contributes\": {\n    \"configuration\": {\n      \"type\": \"object\",\n      \"title\": \"coc-tailwindcss3 configuration\",\n      \"properties\": {\n        \"tailwindCSS.enable\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"description\": \"Enable coc-tailwindcss3 extension\"\n        },\n        \"tailwindCSS.trace.server\": {\n          \"type\": \"string\",\n          \"default\": \"off\",\n          \"enum\": [\n            \"off\",\n            \"messages\",\n            \"verbose\"\n          ],\n          \"description\": \"Trace level of tailwindCSS language server\"\n        },\n        \"tailwindCSS.custom.serverPath\": {\n          \"type\": \"string\",\n          \"default\": \"\",\n          \"description\": \"Custom path to server module. If there is no setting, the built-in module will be used\"\n        },\n        \"tailwindCSS.emmetCompletions\": {\n          \"type\": \"boolean\",\n          \"default\": false,\n          \"description\": \"Enable class name completions when using Emmet-style syntax, for example `div.bg-red-500.uppercase`\"\n        },\n        \"tailwindCSS.includeLanguages\": {\n          \"type\": \"object\",\n          \"additionalProperties\": {\n            \"type\": \"string\"\n          },\n          \"default\": {\n            \"eelixir\": \"html\",\n            \"elixir\": \"html\",\n            \"eruby\": \"html\",\n            \"html.twig\": \"html\"\n          },\n          \"markdownDescription\": \"Enable features in languages that are not supported by default. Add a mapping here between the new language and an already supported language.\\n E.g.: `{\\\"plaintext\\\": \\\"html\\\"}`\"\n        },\n        \"tailwindCSS.files.exclude\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"default\": [\n            \"**/.git/**\",\n            \"**/node_modules/**\",\n            \"**/.hg/**\",\n            \"**/.svn/**\"\n          ],\n          \"markdownDescription\": \"Configure glob patterns to exclude from all IntelliSense features. Inherits all glob patterns from the `#files.exclude#` setting.\"\n        },\n        \"tailwindCSS.classAttributes\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"default\": [\n            \"class\",\n            \"className\",\n            \"ngClass\"\n          ],\n          \"markdownDescription\": \"The HTML attributes for which to provide class completions, hover previews, linting etc.\"\n        },\n        \"tailwindCSS.suggestions\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"markdownDescription\": \"Enable autocomplete suggestions.\",\n          \"scope\": \"language-overridable\"\n        },\n        \"tailwindCSS.hovers\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"markdownDescription\": \"Enable hovers.\",\n          \"scope\": \"language-overridable\"\n        },\n        \"tailwindCSS.codeActions\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"markdownDescription\": \"Enable code actions.\",\n          \"scope\": \"language-overridable\"\n        },\n        \"tailwindCSS.colorDecorators\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"markdownDescription\": \"Controls whether the editor should render inline color decorators for Tailwind CSS classes and helper functions.\",\n          \"scope\": \"language-overridable\"\n        },\n        \"tailwindCSS.validate\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"markdownDescription\": \"Enable linting. Rules can be configured individually using the `tailwindcss.lint.*` settings\",\n          \"scope\": \"language-overridable\"\n        },\n        \"tailwindCSS.lint.cssConflict\": {\n          \"type\": \"string\",\n          \"enum\": [\n            \"ignore\",\n            \"warning\",\n            \"error\"\n          ],\n          \"default\": \"warning\",\n          \"markdownDescription\": \"Class names on the same HTML element which apply the same CSS property or properties\",\n          \"scope\": \"language-overridable\"\n        },\n        \"tailwindCSS.lint.invalidApply\": {\n          \"type\": \"string\",\n          \"enum\": [\n            \"ignore\",\n            \"warning\",\n            \"error\"\n          ],\n          \"default\": \"error\",\n          \"markdownDescription\": \"Unsupported use of the [`@apply` directive](https://tailwindcss.com/docs/functions-and-directives/#apply)\",\n          \"scope\": \"language-overridable\"\n        },\n        \"tailwindCSS.lint.invalidScreen\": {\n          \"type\": \"string\",\n          \"enum\": [\n            \"ignore\",\n            \"warning\",\n            \"error\"\n          ],\n          \"default\": \"error\",\n          \"markdownDescription\": \"Unknown screen name used with the [`@screen` directive](https://tailwindcss.com/docs/functions-and-directives/#screen)\",\n          \"scope\": \"language-overridable\"\n        },\n        \"tailwindCSS.lint.invalidVariant\": {\n          \"type\": \"string\",\n          \"enum\": [\n            \"ignore\",\n            \"warning\",\n            \"error\"\n          ],\n          \"default\": \"error\",\n          \"markdownDescription\": \"Unknown variant name used with the [`@variants` directive](https://tailwindcss.com/docs/functions-and-directives/#variants)\",\n          \"scope\": \"language-overridable\"\n        },\n        \"tailwindCSS.lint.invalidConfigPath\": {\n          \"type\": \"string\",\n          \"enum\": [\n            \"ignore\",\n            \"warning\",\n            \"error\"\n          ],\n          \"default\": \"error\",\n          \"markdownDescription\": \"Unknown or invalid path used with the [`theme` helper](https://tailwindcss.com/docs/functions-and-directives/#theme)\",\n          \"scope\": \"language-overridable\"\n        },\n        \"tailwindCSS.lint.invalidTailwindDirective\": {\n          \"type\": \"string\",\n          \"enum\": [\n            \"ignore\",\n            \"warning\",\n            \"error\"\n          ],\n          \"default\": \"error\",\n          \"markdownDescription\": \"Unknown value used with the [`@tailwind` directive](https://tailwindcss.com/docs/functions-and-directives/#tailwind)\",\n          \"scope\": \"language-overridable\"\n        },\n        \"tailwindCSS.lint.recommendedVariantOrder\": {\n          \"type\": \"string\",\n          \"enum\": [\n            \"ignore\",\n            \"warning\",\n            \"error\"\n          ],\n          \"default\": \"warning\",\n          \"markdownDescription\": \"Class variants not in the recommended order (applies in [JIT mode](https://tailwindcss.com/docs/just-in-time-mode) only)\",\n          \"scope\": \"language-overridable\"\n        },\n        \"tailwindCSS.lint.suggestCanonicalClasses\": {\n          \"type\": \"string\",\n          \"enum\": [\n            \"ignore\",\n            \"warning\",\n            \"error\"\n          ],\n          \"default\": \"warning\",\n          \"markdownDescription\": \"Indicate when utilities may be written in a more optimal form\",\n          \"scope\": \"language-overridable\"\n        },\n        \"tailwindCSS.experimental.classRegex\": {\n          \"type\": \"array\",\n          \"scope\": \"language-overridable\"\n        },\n        \"tailwindCSS.showPixelEquivalents\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"markdownDescription\": \"Show `px` equivalents for `rem` CSS values.\"\n        },\n        \"tailwindCSS.rootFontSize\": {\n          \"type\": \"number\",\n          \"default\": 16,\n          \"markdownDescription\": \"Root font size in pixels. Used to convert `rem` CSS values to their `px` equivalents. See `#tailwindCSS.showPixelEquivalents#`.\"\n        },\n        \"tailwindCSS.inspectPort\": {\n          \"type\": [\n            \"number\",\n            \"null\"\n          ],\n          \"default\": null,\n          \"markdownDescription\": \"Enable the Node.js inspector agent for the language server and listen on the specified port.\"\n        },\n        \"tailwindCSS.headwind.defaultSortOrder\": {\n          \"type\": \"array\",\n          \"default\": [\n            \"container\",\n            \"static\",\n            \"fixed\",\n            \"absolute\",\n            \"relative\",\n            \"sticky\",\n            \"inset-0\",\n            \"inset-x-0\",\n            \"inset-y-0\",\n            \"inset-x-auto\",\n            \"inset-y-auto\",\n            \"inset-auto\",\n            \"top-0\",\n            \"bottom-0\",\n            \"left-0\",\n            \"right-0\",\n            \"top-auto\",\n            \"bottom-auto\",\n            \"left-auto\",\n            \"right-auto\",\n            \"z-0\",\n            \"z-10\",\n            \"z-20\",\n            \"z-30\",\n            \"z-40\",\n            \"z-50\",\n            \"z-auto\",\n            \"flex\",\n            \"inline-flex\",\n            \"flex-row\",\n            \"flex-row-reverse\",\n            \"flex-col\",\n            \"flex-col-reverse\",\n            \"flex-no-wrap\",\n            \"flex-wrap\",\n            \"flex-wrap-reverse\",\n            \"items-stretch\",\n            \"items-start\",\n            \"items-center\",\n            \"items-end\",\n            \"items-baseline\",\n            \"content-start\",\n            \"content-center\",\n            \"content-end\",\n            \"content-between\",\n            \"content-around\",\n            \"self-auto\",\n            \"self-start\",\n            \"self-center\",\n            \"self-end\",\n            \"self-stretch\",\n            \"justify-start\",\n            \"justify-center\",\n            \"justify-end\",\n            \"justify-between\",\n            \"justify-around\",\n            \"flex-1\",\n            \"flex-auto\",\n            \"flex-initial\",\n            \"flex-none\",\n            \"flex-grow\",\n            \"flex-grow-0\",\n            \"flex-shrink\",\n            \"flex-shrink-0\",\n            \"order-first\",\n            \"order-last\",\n            \"order-none\",\n            \"order-1\",\n            \"order-2\",\n            \"order-3\",\n            \"order-4\",\n            \"order-5\",\n            \"order-6\",\n            \"order-7\",\n            \"order-8\",\n            \"order-9\",\n            \"order-10\",\n            \"order-11\",\n            \"order-12\",\n            \"visible\",\n            \"invisible\",\n            \"hidden\",\n            \"block\",\n            \"inline-block\",\n            \"inline\",\n            \"table\",\n            \"table-row\",\n            \"table-cell\",\n            \"clearfix\",\n            \"float-left\",\n            \"float-right\",\n            \"float-none\",\n            \"object-contain\",\n            \"object-cover\",\n            \"object-fill\",\n            \"object-none\",\n            \"object-scale-down\",\n            \"object-bottom\",\n            \"object-center\",\n            \"object-left\",\n            \"object-left-bottom\",\n            \"object-left-top\",\n            \"object-right\",\n            \"object-right-bottom\",\n            \"object-right-top\",\n            \"object-top\",\n            \"w-0\",\n            \"w-1\",\n            \"w-2\",\n            \"w-3\",\n            \"w-4\",\n            \"w-5\",\n            \"w-6\",\n            \"w-8\",\n            \"w-10\",\n            \"w-12\",\n            \"w-16\",\n            \"w-20\",\n            \"w-24\",\n            \"w-32\",\n            \"w-40\",\n            \"w-48\",\n            \"w-56\",\n            \"w-64\",\n            \"w-auto\",\n            \"w-px\",\n            \"w-1/2\",\n            \"w-1/3\",\n            \"w-2/3\",\n            \"w-1/4\",\n            \"w-2/4\",\n            \"w-3/4\",\n            \"w-1/5\",\n            \"w-2/5\",\n            \"w-3/5\",\n            \"w-4/5\",\n            \"w-1/6\",\n            \"w-2/6\",\n            \"w-3/6\",\n            \"w-4/6\",\n            \"w-5/6\",\n            \"w-1/12\",\n            \"w-2/12\",\n            \"w-3/12\",\n            \"w-4/12\",\n            \"w-5/12\",\n            \"w-6/12\",\n            \"w-7/12\",\n            \"w-8/12\",\n            \"w-9/12\",\n            \"w-10/12\",\n            \"w-11/12\",\n            \"w-full\",\n            \"w-screen\",\n            \"h-0\",\n            \"h-1\",\n            \"h-2\",\n            \"h-3\",\n            \"h-4\",\n            \"h-5\",\n            \"h-6\",\n            \"h-8\",\n            \"h-10\",\n            \"h-12\",\n            \"h-16\",\n            \"h-20\",\n            \"h-24\",\n            \"h-32\",\n            \"h-40\",\n            \"h-48\",\n            \"h-56\",\n            \"h-64\",\n            \"h-auto\",\n            \"h-px\",\n            \"h-full\",\n            \"h-screen\",\n            \"max-w-xs\",\n            \"max-w-sm\",\n            \"max-w-md\",\n            \"max-w-lg\",\n            \"max-w-xl\",\n            \"max-w-2xl\",\n            \"max-w-3xl\",\n            \"max-w-4xl\",\n            \"max-w-5xl\",\n            \"max-w-6xl\",\n            \"max-w-full\",\n            \"max-h-full\",\n            \"max-h-screen\",\n            \"min-w-0\",\n            \"min-w-full\",\n            \"min-h-0\",\n            \"min-h-full\",\n            \"min-h-screen\",\n            \"p-0\",\n            \"p-1\",\n            \"p-2\",\n            \"p-3\",\n            \"p-4\",\n            \"p-5\",\n            \"p-6\",\n            \"p-8\",\n            \"p-10\",\n            \"p-12\",\n            \"p-16\",\n            \"p-20\",\n            \"p-24\",\n            \"p-32\",\n            \"p-40\",\n            \"p-48\",\n            \"p-56\",\n            \"p-64\",\n            \"p-px\",\n            \"px-0\",\n            \"px-1\",\n            \"px-2\",\n            \"px-3\",\n            \"px-4\",\n            \"px-5\",\n            \"px-6\",\n            \"px-8\",\n            \"px-10\",\n            \"px-12\",\n            \"px-16\",\n            \"px-20\",\n            \"px-24\",\n            \"px-32\",\n            \"px-40\",\n            \"px-48\",\n            \"px-56\",\n            \"px-64\",\n            \"px-px\",\n            \"py-0\",\n            \"py-1\",\n            \"py-2\",\n            \"py-3\",\n            \"py-4\",\n            \"py-5\",\n            \"py-6\",\n            \"py-8\",\n            \"py-10\",\n            \"py-12\",\n            \"py-16\",\n            \"py-20\",\n            \"py-24\",\n            \"py-32\",\n            \"py-40\",\n            \"py-48\",\n            \"py-56\",\n            \"py-64\",\n            \"py-px\",\n            \"pt-0\",\n            \"pt-1\",\n            \"pt-2\",\n            \"pt-3\",\n            \"pt-4\",\n            \"pt-5\",\n            \"pt-6\",\n            \"pt-8\",\n            \"pt-10\",\n            \"pt-12\",\n            \"pt-16\",\n            \"pt-20\",\n            \"pt-24\",\n            \"pt-32\",\n            \"pt-40\",\n            \"pt-48\",\n            \"pt-56\",\n            \"pt-64\",\n            \"pt-px\",\n            \"pb-0\",\n            \"pb-1\",\n            \"pb-2\",\n            \"pb-3\",\n            \"pb-4\",\n            \"pb-5\",\n            \"pb-6\",\n            \"pb-8\",\n            \"pb-10\",\n            \"pb-12\",\n            \"pb-16\",\n            \"pb-20\",\n            \"pb-24\",\n            \"pb-32\",\n            \"pb-40\",\n            \"pb-48\",\n            \"pb-56\",\n            \"pb-64\",\n            \"pb-px\",\n            \"pl-0\",\n            \"pl-1\",\n            \"pl-2\",\n            \"pl-3\",\n            \"pl-4\",\n            \"pl-5\",\n            \"pl-6\",\n            \"pl-8\",\n            \"pl-10\",\n            \"pl-12\",\n            \"pl-16\",\n            \"pl-20\",\n            \"pl-24\",\n            \"pl-32\",\n            \"pl-40\",\n            \"pl-48\",\n            \"pl-56\",\n            \"pl-64\",\n            \"pl-px\",\n            \"pr-0\",\n            \"pr-1\",\n            \"pr-2\",\n            \"pr-3\",\n            \"pr-4\",\n            \"pr-5\",\n            \"pr-6\",\n            \"pr-8\",\n            \"pr-10\",\n            \"pr-12\",\n            \"pr-16\",\n            \"pr-20\",\n            \"pr-24\",\n            \"pr-32\",\n            \"pr-40\",\n            \"pr-48\",\n            \"pr-56\",\n            \"pr-64\",\n            \"pr-px\",\n            \"m-0\",\n            \"m-1\",\n            \"m-2\",\n            \"m-3\",\n            \"m-4\",\n            \"m-5\",\n            \"m-6\",\n            \"m-8\",\n            \"m-10\",\n            \"m-12\",\n            \"m-16\",\n            \"m-20\",\n            \"m-24\",\n            \"m-32\",\n            \"m-40\",\n            \"m-48\",\n            \"m-56\",\n            \"m-64\",\n            \"m-auto\",\n            \"m-px\",\n            \"mx-0\",\n            \"mx-1\",\n            \"mx-2\",\n            \"mx-3\",\n            \"mx-4\",\n            \"mx-5\",\n            \"mx-6\",\n            \"mx-8\",\n            \"mx-10\",\n            \"mx-12\",\n            \"mx-16\",\n            \"mx-20\",\n            \"mx-24\",\n            \"mx-32\",\n            \"mx-40\",\n            \"mx-48\",\n            \"mx-56\",\n            \"mx-64\",\n            \"mx-auto\",\n            \"mx-px\",\n            \"my-0\",\n            \"my-1\",\n            \"my-2\",\n            \"my-3\",\n            \"my-4\",\n            \"my-5\",\n            \"my-6\",\n            \"my-8\",\n            \"my-10\",\n            \"my-12\",\n            \"my-16\",\n            \"my-20\",\n            \"my-24\",\n            \"my-32\",\n            \"my-40\",\n            \"my-48\",\n            \"my-56\",\n            \"my-64\",\n            \"my-auto\",\n            \"my-px\",\n            \"mt-0\",\n            \"mt-1\",\n            \"mt-2\",\n            \"mt-3\",\n            \"mt-4\",\n            \"mt-5\",\n            \"mt-6\",\n            \"mt-8\",\n            \"mt-10\",\n            \"mt-12\",\n            \"mt-16\",\n            \"mt-20\",\n            \"mt-24\",\n            \"mt-32\",\n            \"mt-40\",\n            \"mt-48\",\n            \"mt-56\",\n            \"mt-64\",\n            \"mt-auto\",\n            \"mt-px\",\n            \"mb-0\",\n            \"mb-1\",\n            \"mb-2\",\n            \"mb-3\",\n            \"mb-4\",\n            \"mb-5\",\n            \"mb-6\",\n            \"mb-8\",\n            \"mb-10\",\n            \"mb-12\",\n            \"mb-16\",\n            \"mb-20\",\n            \"mb-24\",\n            \"mb-32\",\n            \"mb-40\",\n            \"mb-48\",\n            \"mb-56\",\n            \"mb-64\",\n            \"mb-auto\",\n            \"mb-px\",\n            \"ml-0\",\n            \"ml-1\",\n            \"ml-2\",\n            \"ml-3\",\n            \"ml-4\",\n            \"ml-5\",\n            \"ml-6\",\n            \"ml-8\",\n            \"ml-10\",\n            \"ml-12\",\n            \"ml-16\",\n            \"ml-20\",\n            \"ml-24\",\n            \"ml-32\",\n            \"ml-40\",\n            \"ml-48\",\n            \"ml-56\",\n            \"ml-64\",\n            \"ml-auto\",\n            \"ml-px\",\n            \"mr-0\",\n            \"mr-1\",\n            \"mr-2\",\n            \"mr-3\",\n            \"mr-4\",\n            \"mr-5\",\n            \"mr-6\",\n            \"mr-8\",\n            \"mr-10\",\n            \"mr-12\",\n            \"mr-16\",\n            \"mr-20\",\n            \"mr-24\",\n            \"mr-32\",\n            \"mr-40\",\n            \"mr-48\",\n            \"mr-56\",\n            \"mr-64\",\n            \"mr-auto\",\n            \"mr-px\",\n            \"-m-0\",\n            \"-m-1\",\n            \"-m-2\",\n            \"-m-3\",\n            \"-m-4\",\n            \"-m-5\",\n            \"-m-6\",\n            \"-m-8\",\n            \"-m-10\",\n            \"-m-12\",\n            \"-m-16\",\n            \"-m-20\",\n            \"-m-24\",\n            \"-m-32\",\n            \"-m-40\",\n            \"-m-48\",\n            \"-m-56\",\n            \"-m-64\",\n            \"-m-px\",\n            \"-mx-0\",\n            \"-mx-1\",\n            \"-mx-2\",\n            \"-mx-3\",\n            \"-mx-4\",\n            \"-mx-5\",\n            \"-mx-6\",\n            \"-mx-8\",\n            \"-mx-10\",\n            \"-mx-12\",\n            \"-mx-16\",\n            \"-mx-20\",\n            \"-mx-24\",\n            \"-mx-32\",\n            \"-mx-40\",\n            \"-mx-48\",\n            \"-mx-56\",\n            \"-mx-64\",\n            \"-mx-px\",\n            \"-my-0\",\n            \"-my-1\",\n            \"-my-2\",\n            \"-my-3\",\n            \"-my-4\",\n            \"-my-5\",\n            \"-my-6\",\n            \"-my-8\",\n            \"-my-10\",\n            \"-my-12\",\n            \"-my-16\",\n            \"-my-20\",\n            \"-my-24\",\n            \"-my-32\",\n            \"-my-40\",\n            \"-my-48\",\n            \"-my-56\",\n            \"-my-64\",\n            \"-my-px\",\n            \"-mt-0\",\n            \"-mt-1\",\n            \"-mt-2\",\n            \"-mt-3\",\n            \"-mt-4\",\n            \"-mt-5\",\n            \"-mt-6\",\n            \"-mt-8\",\n            \"-mt-10\",\n            \"-mt-12\",\n            \"-mt-16\",\n            \"-mt-20\",\n            \"-mt-24\",\n            \"-mt-32\",\n            \"-mt-40\",\n            \"-mt-48\",\n            \"-mt-56\",\n            \"-mt-64\",\n            \"-mt-px\",\n            \"-mb-0\",\n            \"-mb-1\",\n            \"-mb-2\",\n            \"-mb-3\",\n            \"-mb-4\",\n            \"-mb-5\",\n            \"-mb-6\",\n            \"-mb-8\",\n            \"-mb-10\",\n            \"-mb-12\",\n            \"-mb-16\",\n            \"-mb-20\",\n            \"-mb-24\",\n            \"-mb-32\",\n            \"-mb-40\",\n            \"-mb-48\",\n            \"-mb-56\",\n            \"-mb-64\",\n            \"-mb-px\",\n            \"-ml-0\",\n            \"-ml-1\",\n            \"-ml-2\",\n            \"-ml-3\",\n            \"-ml-4\",\n            \"-ml-5\",\n            \"-ml-6\",\n            \"-ml-8\",\n            \"-ml-10\",\n            \"-ml-12\",\n            \"-ml-16\",\n            \"-ml-20\",\n            \"-ml-24\",\n            \"-ml-32\",\n            \"-ml-40\",\n            \"-ml-48\",\n            \"-ml-56\",\n            \"-ml-64\",\n            \"-ml-px\",\n            \"-mr-0\",\n            \"-mr-1\",\n            \"-mr-2\",\n            \"-mr-3\",\n            \"-mr-4\",\n            \"-mr-5\",\n            \"-mr-6\",\n            \"-mr-8\",\n            \"-mr-10\",\n            \"-mr-12\",\n            \"-mr-16\",\n            \"-mr-20\",\n            \"-mr-24\",\n            \"-mr-32\",\n            \"-mr-40\",\n            \"-mr-48\",\n            \"-mr-56\",\n            \"-mr-64\",\n            \"-mr-px\",\n            \"overflow-auto\",\n            \"overflow-hidden\",\n            \"overflow-visible\",\n            \"overflow-scroll\",\n            \"overflow-x-auto\",\n            \"overflow-x-hidden\",\n            \"overflow-x-visible\",\n            \"overflow-x-scroll\",\n            \"overflow-y-auto\",\n            \"overflow-y-hidden\",\n            \"overflow-y-visible\",\n            \"overflow-y-scroll\",\n            \"scrolling-touch\",\n            \"scrolling-auto\",\n            \"font-sans\",\n            \"font-serif\",\n            \"font-mono\",\n            \"text-xs\",\n            \"text-sm\",\n            \"text-base\",\n            \"text-lg\",\n            \"text-xl\",\n            \"text-2xl\",\n            \"text-3xl\",\n            \"text-4xl\",\n            \"text-5xl\",\n            \"text-6xl\",\n            \"antialiased\",\n            \"subpixel-antialiased\",\n            \"italic\",\n            \"not-italic\",\n            \"font-hairline\",\n            \"font-thin\",\n            \"font-light\",\n            \"font-normal\",\n            \"font-medium\",\n            \"font-semibold\",\n            \"font-bold\",\n            \"font-extrabold\",\n            \"font-black\",\n            \"leading-none\",\n            \"leading-tight\",\n            \"leading-snug\",\n            \"leading-normal\",\n            \"leading-relaxed\",\n            \"leading-loose\",\n            \"tracking-tighter\",\n            \"tracking-tight\",\n            \"tracking-normal\",\n            \"tracking-wide\",\n            \"tracking-wider\",\n            \"tracking-widest\",\n            \"text-left\",\n            \"text-center\",\n            \"text-right\",\n            \"text-justify\",\n            \"text-transparent\",\n            \"text-black\",\n            \"text-white\",\n            \"text-gray-100\",\n            \"text-gray-200\",\n            \"text-gray-300\",\n            \"text-gray-400\",\n            \"text-gray-500\",\n            \"text-gray-600\",\n            \"text-gray-700\",\n            \"text-gray-800\",\n            \"text-gray-900\",\n            \"text-red-100\",\n            \"text-red-200\",\n            \"text-red-300\",\n            \"text-red-400\",\n            \"text-red-500\",\n            \"text-red-600\",\n            \"text-red-700\",\n            \"text-red-800\",\n            \"text-red-900\",\n            \"text-orange-100\",\n            \"text-orange-200\",\n            \"text-orange-300\",\n            \"text-orange-400\",\n            \"text-orange-500\",\n            \"text-orange-600\",\n            \"text-orange-700\",\n            \"text-orange-800\",\n            \"text-orange-900\",\n            \"text-yellow-100\",\n            \"text-yellow-200\",\n            \"text-yellow-300\",\n            \"text-yellow-400\",\n            \"text-yellow-500\",\n            \"text-yellow-600\",\n            \"text-yellow-700\",\n            \"text-yellow-800\",\n            \"text-yellow-900\",\n            \"text-green-100\",\n            \"text-green-200\",\n            \"text-green-300\",\n            \"text-green-400\",\n            \"text-green-500\",\n            \"text-green-600\",\n            \"text-green-700\",\n            \"text-green-800\",\n            \"text-green-900\",\n            \"text-teal-100\",\n            \"text-teal-200\",\n            \"text-teal-300\",\n            \"text-teal-400\",\n            \"text-teal-500\",\n            \"text-teal-600\",\n            \"text-teal-700\",\n            \"text-teal-800\",\n            \"text-teal-900\",\n            \"text-blue-100\",\n            \"text-blue-200\",\n            \"text-blue-300\",\n            \"text-blue-400\",\n            \"text-blue-500\",\n            \"text-blue-600\",\n            \"text-blue-700\",\n            \"text-blue-800\",\n            \"text-blue-900\",\n            \"text-indigo-100\",\n            \"text-indigo-200\",\n            \"text-indigo-300\",\n            \"text-indigo-400\",\n            \"text-indigo-500\",\n            \"text-indigo-600\",\n            \"text-indigo-700\",\n            \"text-indigo-800\",\n            \"text-indigo-900\",\n            \"text-purple-100\",\n            \"text-purple-200\",\n            \"text-purple-300\",\n            \"text-purple-400\",\n            \"text-purple-500\",\n            \"text-purple-600\",\n            \"text-purple-700\",\n            \"text-purple-800\",\n            \"text-purple-900\",\n            \"text-pink-100\",\n            \"text-pink-200\",\n            \"text-pink-300\",\n            \"text-pink-400\",\n            \"text-pink-500\",\n            \"text-pink-600\",\n            \"text-pink-700\",\n            \"text-pink-800\",\n            \"text-pink-900\",\n            \"placeholder-transparent\",\n            \"placeholder-black\",\n            \"placeholder-white\",\n            \"placeholder-gray-100\",\n            \"placeholder-gray-200\",\n            \"placeholder-gray-300\",\n            \"placeholder-gray-400\",\n            \"placeholder-gray-500\",\n            \"placeholder-gray-600\",\n            \"placeholder-gray-700\",\n            \"placeholder-gray-800\",\n            \"placeholder-gray-900\",\n            \"placeholder-red-100\",\n            \"placeholder-red-200\",\n            \"placeholder-red-300\",\n            \"placeholder-red-400\",\n            \"placeholder-red-500\",\n            \"placeholder-red-600\",\n            \"placeholder-red-700\",\n            \"placeholder-red-800\",\n            \"placeholder-red-900\",\n            \"placeholder-orange-100\",\n            \"placeholder-orange-200\",\n            \"placeholder-orange-300\",\n            \"placeholder-orange-400\",\n            \"placeholder-orange-500\",\n            \"placeholder-orange-600\",\n            \"placeholder-orange-700\",\n            \"placeholder-orange-800\",\n            \"placeholder-orange-900\",\n            \"placeholder-yellow-100\",\n            \"placeholder-yellow-200\",\n            \"placeholder-yellow-300\",\n            \"placeholder-yellow-400\",\n            \"placeholder-yellow-500\",\n            \"placeholder-yellow-600\",\n            \"placeholder-yellow-700\",\n            \"placeholder-yellow-800\",\n            \"placeholder-yellow-900\",\n            \"placeholder-green-100\",\n            \"placeholder-green-200\",\n            \"placeholder-green-300\",\n            \"placeholder-green-400\",\n            \"placeholder-green-500\",\n            \"placeholder-green-600\",\n            \"placeholder-green-700\",\n            \"placeholder-green-800\",\n            \"placeholder-green-900\",\n            \"placeholder-teal-100\",\n            \"placeholder-teal-200\",\n            \"placeholder-teal-300\",\n            \"placeholder-teal-400\",\n            \"placeholder-teal-500\",\n            \"placeholder-teal-600\",\n            \"placeholder-teal-700\",\n            \"placeholder-teal-800\",\n            \"placeholder-teal-900\",\n            \"placeholder-blue-100\",\n            \"placeholder-blue-200\",\n            \"placeholder-blue-300\",\n            \"placeholder-blue-400\",\n            \"placeholder-blue-500\",\n            \"placeholder-blue-600\",\n            \"placeholder-blue-700\",\n            \"placeholder-blue-800\",\n            \"placeholder-blue-900\",\n            \"placeholder-indigo-100\",\n            \"placeholder-indigo-200\",\n            \"placeholder-indigo-300\",\n            \"placeholder-indigo-400\",\n            \"placeholder-indigo-500\",\n            \"placeholder-indigo-600\",\n            \"placeholder-indigo-700\",\n            \"placeholder-indigo-800\",\n            \"placeholder-indigo-900\",\n            \"placeholder-purple-100\",\n            \"placeholder-purple-200\",\n            \"placeholder-purple-300\",\n            \"placeholder-purple-400\",\n            \"placeholder-purple-500\",\n            \"placeholder-purple-600\",\n            \"placeholder-purple-700\",\n            \"placeholder-purple-800\",\n            \"placeholder-purple-900\",\n            \"placeholder-pink-100\",\n            \"placeholder-pink-200\",\n            \"placeholder-pink-300\",\n            \"placeholder-pink-400\",\n            \"placeholder-pink-500\",\n            \"placeholder-pink-600\",\n            \"placeholder-pink-700\",\n            \"placeholder-pink-800\",\n            \"placeholder-pink-900\",\n            \"placeholder-left\",\n            \"placeholder-center\",\n            \"placeholder-right\",\n            \"placeholder-justify\",\n            \"underline\",\n            \"line-through\",\n            \"no-underline\",\n            \"uppercase\",\n            \"lowercase\",\n            \"capitalize\",\n            \"normal-case\",\n            \"break-normal\",\n            \"break-words\",\n            \"break-all\",\n            \"truncate\",\n            \"whitespace-normal\",\n            \"whitespace-no-wrap\",\n            \"whitespace-pre\",\n            \"whitespace-pre-line\",\n            \"whitespace-pre-wrap\",\n            \"align-baseline\",\n            \"align-top\",\n            \"align-middle\",\n            \"align-bottom\",\n            \"align-text-top\",\n            \"align-text-bottom\",\n            \"list-none\",\n            \"list-disc\",\n            \"list-decimal\",\n            \"list-inside\",\n            \"list-outside\",\n            \"bg-fixed\",\n            \"bg-local\",\n            \"bg-scroll\",\n            \"bg-transparent\",\n            \"bg-black\",\n            \"bg-white\",\n            \"bg-gray-100\",\n            \"bg-gray-200\",\n            \"bg-gray-300\",\n            \"bg-gray-400\",\n            \"bg-gray-500\",\n            \"bg-gray-600\",\n            \"bg-gray-700\",\n            \"bg-gray-800\",\n            \"bg-gray-900\",\n            \"bg-red-100\",\n            \"bg-red-200\",\n            \"bg-red-300\",\n            \"bg-red-400\",\n            \"bg-red-500\",\n            \"bg-red-600\",\n            \"bg-red-700\",\n            \"bg-red-800\",\n            \"bg-red-900\",\n            \"bg-orange-100\",\n            \"bg-orange-200\",\n            \"bg-orange-300\",\n            \"bg-orange-400\",\n            \"bg-orange-500\",\n            \"bg-orange-600\",\n            \"bg-orange-700\",\n            \"bg-orange-800\",\n            \"bg-orange-900\",\n            \"bg-yellow-100\",\n            \"bg-yellow-200\",\n            \"bg-yellow-300\",\n            \"bg-yellow-400\",\n            \"bg-yellow-500\",\n            \"bg-yellow-600\",\n            \"bg-yellow-700\",\n            \"bg-yellow-800\",\n            \"bg-yellow-900\",\n            \"bg-green-100\",\n            \"bg-green-200\",\n            \"bg-green-300\",\n            \"bg-green-400\",\n            \"bg-green-500\",\n            \"bg-green-600\",\n            \"bg-green-700\",\n            \"bg-green-800\",\n            \"bg-green-900\",\n            \"bg-teal-100\",\n            \"bg-teal-200\",\n            \"bg-teal-300\",\n            \"bg-teal-400\",\n            \"bg-teal-500\",\n            \"bg-teal-600\",\n            \"bg-teal-700\",\n            \"bg-teal-800\",\n            \"bg-teal-900\",\n            \"bg-blue-100\",\n            \"bg-blue-200\",\n            \"bg-blue-300\",\n            \"bg-blue-400\",\n            \"bg-blue-500\",\n            \"bg-blue-600\",\n            \"bg-blue-700\",\n            \"bg-blue-800\",\n            \"bg-blue-900\",\n            \"bg-indigo-100\",\n            \"bg-indigo-200\",\n            \"bg-indigo-300\",\n            \"bg-indigo-400\",\n            \"bg-indigo-500\",\n            \"bg-indigo-600\",\n            \"bg-indigo-700\",\n            \"bg-indigo-800\",\n            \"bg-indigo-900\",\n            \"bg-purple-100\",\n            \"bg-purple-200\",\n            \"bg-purple-300\",\n            \"bg-purple-400\",\n            \"bg-purple-500\",\n            \"bg-purple-600\",\n            \"bg-purple-700\",\n            \"bg-purple-800\",\n            \"bg-purple-900\",\n            \"bg-pink-100\",\n            \"bg-pink-200\",\n            \"bg-pink-300\",\n            \"bg-pink-400\",\n            \"bg-pink-500\",\n            \"bg-pink-600\",\n            \"bg-pink-700\",\n            \"bg-pink-800\",\n            \"bg-pink-900\",\n            \"bg-bottom\",\n            \"bg-center\",\n            \"bg-left\",\n            \"bg-left-bottom\",\n            \"bg-left-top\",\n            \"bg-right\",\n            \"bg-right-bottom\",\n            \"bg-right-top\",\n            \"bg-top\",\n            \"bg-repeat\",\n            \"bg-no-repeat\",\n            \"bg-repeat-x\",\n            \"bg-repeat-y\",\n            \"bg-repeat-round\",\n            \"bg-repeat-space\",\n            \"bg-auto\",\n            \"bg-cover\",\n            \"bg-contain\",\n            \"border\",\n            \"border-0\",\n            \"border-2\",\n            \"border-4\",\n            \"border-8\",\n            \"border-t\",\n            \"border-t-0\",\n            \"border-t-2\",\n            \"border-t-4\",\n            \"border-t-8\",\n            \"border-b\",\n            \"border-b-0\",\n            \"border-b-2\",\n            \"border-b-4\",\n            \"border-b-8\",\n            \"border-l\",\n            \"border-l-0\",\n            \"border-l-2\",\n            \"border-l-4\",\n            \"border-l-8\",\n            \"border-r\",\n            \"border-r-0\",\n            \"border-r-2\",\n            \"border-r-4\",\n            \"border-r-8\",\n            \"border-collapse\",\n            \"border-separate\",\n            \"border-transparent\",\n            \"border-black\",\n            \"border-white\",\n            \"border-gray-100\",\n            \"border-gray-200\",\n            \"border-gray-300\",\n            \"border-gray-400\",\n            \"border-gray-500\",\n            \"border-gray-600\",\n            \"border-gray-700\",\n            \"border-gray-800\",\n            \"border-gray-900\",\n            \"border-red-100\",\n            \"border-red-200\",\n            \"border-red-300\",\n            \"border-red-400\",\n            \"border-red-500\",\n            \"border-red-600\",\n            \"border-red-700\",\n            \"border-red-800\",\n            \"border-red-900\",\n            \"border-orange-100\",\n            \"border-orange-200\",\n            \"border-orange-300\",\n            \"border-orange-400\",\n            \"border-orange-500\",\n            \"border-orange-600\",\n            \"border-orange-700\",\n            \"border-orange-800\",\n            \"border-orange-900\",\n            \"border-yellow-100\",\n            \"border-yellow-200\",\n            \"border-yellow-300\",\n            \"border-yellow-400\",\n            \"border-yellow-500\",\n            \"border-yellow-600\",\n            \"border-yellow-700\",\n            \"border-yellow-800\",\n            \"border-yellow-900\",\n            \"border-green-100\",\n            \"border-green-200\",\n            \"border-green-300\",\n            \"border-green-400\",\n            \"border-green-500\",\n            \"border-green-600\",\n            \"border-green-700\",\n            \"border-green-800\",\n            \"border-green-900\",\n            \"border-teal-100\",\n            \"border-teal-200\",\n            \"border-teal-300\",\n            \"border-teal-400\",\n            \"border-teal-500\",\n            \"border-teal-600\",\n            \"border-teal-700\",\n            \"border-teal-800\",\n            \"border-teal-900\",\n            \"border-blue-100\",\n            \"border-blue-200\",\n            \"border-blue-300\",\n            \"border-blue-400\",\n            \"border-blue-500\",\n            \"border-blue-600\",\n            \"border-blue-700\",\n            \"border-blue-800\",\n            \"border-blue-900\",\n            \"border-indigo-100\",\n            \"border-indigo-200\",\n            \"border-indigo-300\",\n            \"border-indigo-400\",\n            \"border-indigo-500\",\n            \"border-indigo-600\",\n            \"border-indigo-700\",\n            \"border-indigo-800\",\n            \"border-indigo-900\",\n            \"border-purple-100\",\n            \"border-purple-200\",\n            \"border-purple-300\",\n            \"border-purple-400\",\n            \"border-purple-500\",\n            \"border-purple-600\",\n            \"border-purple-700\",\n            \"border-purple-800\",\n            \"border-purple-900\",\n            \"border-pink-100\",\n            \"border-pink-200\",\n            \"border-pink-300\",\n            \"border-pink-400\",\n            \"border-pink-500\",\n            \"border-pink-600\",\n            \"border-pink-700\",\n            \"border-pink-800\",\n            \"border-pink-900\",\n            \"border-solid\",\n            \"border-dashed\",\n            \"border-dotted\",\n            \"border-double\",\n            \"border-none\",\n            \"rounded-none\",\n            \"rounded-sm\",\n            \"rounded\",\n            \"rounded-lg\",\n            \"rounded-full\",\n            \"rounded-t-none\",\n            \"rounded-t-sm\",\n            \"rounded-t\",\n            \"rounded-t-lg\",\n            \"rounded-t-full\",\n            \"rounded-b-none\",\n            \"rounded-b-sm\",\n            \"rounded-b\",\n            \"rounded-b-lg\",\n            \"rounded-b-full\",\n            \"rounded-l-none\",\n            \"rounded-l-sm\",\n            \"rounded-l\",\n            \"rounded-l-lg\",\n            \"rounded-l-full\",\n            \"rounded-r-none\",\n            \"rounded-r-sm\",\n            \"rounded-r\",\n            \"rounded-r-lg\",\n            \"rounded-r-full\",\n            \"rounded-tl-none\",\n            \"rounded-tl-sm\",\n            \"rounded-tl\",\n            \"rounded-tl-lg\",\n            \"rounded-tl-full\",\n            \"rounded-tr-none\",\n            \"rounded-tr-sm\",\n            \"rounded-tr\",\n            \"rounded-tr-lg\",\n            \"rounded-tr-full\",\n            \"rounded-bl-none\",\n            \"rounded-bl-sm\",\n            \"rounded-bl\",\n            \"rounded-bl-lg\",\n            \"rounded-bl-full\",\n            \"rounded-br-none\",\n            \"rounded-br-sm\",\n            \"rounded-br\",\n            \"rounded-br-lg\",\n            \"rounded-br-full\",\n            \"shadow\",\n            \"shadow-md\",\n            \"shadow-lg\",\n            \"shadow-xl\",\n            \"shadow-2xl\",\n            \"shadow-inner\",\n            \"shadow-outline\",\n            \"shadow-none\",\n            \"outline-none\",\n            \"opacity-0\",\n            \"opacity-25\",\n            \"opacity-50\",\n            \"opacity-75\",\n            \"opacity-100\",\n            \"table-auto\",\n            \"table-fixed\",\n            \"appearance-none\",\n            \"cursor-auto\",\n            \"cursor-default\",\n            \"cursor-pointer\",\n            \"cursor-wait\",\n            \"cursor-move\",\n            \"cursor-not-allowed\",\n            \"pointer-events-none\",\n            \"pointer-events-auto\",\n            \"resize-none\",\n            \"resize\",\n            \"resize-x\",\n            \"resize-y\",\n            \"select-none\",\n            \"select-text\",\n            \"select-all\",\n            \"select-auto\",\n            \"sr-only\",\n            \"not-sr-only\",\n            \"fill-current\",\n            \"stroke-current\"\n          ],\n          \"description\": \"Sort order: A string array that determines the default sort order.\",\n          \"scope\": \"window\"\n        },\n        \"tailwindCSS.headwind.classRegex\": {\n          \"type\": \"object\",\n          \"default\": {\n            \"jade\": [\n              {\n                \"regex\": \"\\\\.([\\\\._a-zA-Z0-9\\\\-]+)\",\n                \"separator\": \"\\\\.\",\n                \"replacement\": \".\"\n              },\n              \"\\\\bclass\\\\s*=\\\\s*[\\\\\\\"\\\\']([\\\\._a-zA-Z0-9\\\\s\\\\-\\\\:\\\\/]+)[\\\\\\\"\\\\']\"\n            ],\n            \"html\": \"\\\\bclass\\\\s*=\\\\s*[\\\\\\\"\\\\']([\\\\._a-zA-Z0-9\\\\s\\\\-\\\\:\\\\/]+)[\\\\\\\"\\\\']\",\n            \"css\": \"\\\\B@apply\\\\s+([\\\\._a-zA-Z0-9\\\\s\\\\-\\\\:\\\\/]+);\",\n            \"javascript\": [\n              \"(?:\\\\b(?:class(?:Name)?|tw)\\\\s*=\\\\s*(?:(?:{([\\\\w\\\\d\\\\s!?_\\\\-:/${}()[\\\\]\\\"'`,]+)})|([\\\"'`][\\\\.\\\\w\\\\d\\\\s_\\\\-:/]+[\\\"'`])))\",\n              \"(?:[\\\"'`]([\\\\.\\\\w\\\\d\\\\s_\\\\-:/${}()[\\\\]]+)[\\\"'`])\"\n            ],\n            \"javascriptreact\": [\n              \"(?:\\\\b(?:class(?:Name)?|tw)\\\\s*=\\\\s*(?:(?:{([\\\\w\\\\d\\\\s!?_\\\\-:/${}()[\\\\]\\\"'`,]+)})|([\\\"'`][\\\\w\\\\d\\\\s_\\\\-:/]+[\\\"'`])))\",\n              \"(?:[\\\"'`]([\\\\.\\\\w\\\\d\\\\s_\\\\-:/${}()[\\\\]]+)[\\\"'`])\"\n            ],\n            \"typescript\": [\n              \"(?:\\\\b(?:class(?:Name)?|tw)\\\\s*=\\\\s*(?:(?:{([\\\\w\\\\d\\\\s!?_\\\\-:/${}()[\\\\]\\\"'`,]+)})|([\\\"'`][\\\\w\\\\d\\\\s_\\\\-:/]+[\\\"'`])))\",\n              \"(?:[\\\"'`]([\\\\.\\\\w\\\\d\\\\s_\\\\-:/${}()[\\\\]]+)[\\\"'`])\"\n            ],\n            \"typescriptreact\": [\n              \"(?:\\\\b(?:class(?:Name)?|tw)\\\\s*=\\\\s*(?:(?:{([\\\\w\\\\d\\\\s!?_\\\\-:/${}()[\\\\]\\\"'`,]+)})|([\\\"'`][\\\\w\\\\d\\\\s_\\\\-:/]+[\\\"'`])))\",\n              \"(?:[\\\"'`]([\\\\.\\\\w\\\\d\\\\s_\\\\-:/${}()[\\\\]]+)[\\\"'`])\"\n            ]\n          },\n          \"description\": \"An object with language IDs as keys and their values determining the regex to search for Tailwind CSS classes.\",\n          \"scope\": \"window\"\n        },\n        \"tailwindCSS.headwind.runOnSave\": {\n          \"type\": \"boolean\",\n          \"default\": false,\n          \"description\": \"A flag that controls whether or not Headwind will sort your Tailwind CSS classes on save.\",\n          \"scope\": \"window\"\n        },\n        \"tailwindCSS.headwind.removeDuplicates\": {\n          \"default\": true,\n          \"description\": \"A flag that controls whether or not Headwind will remove duplicate Tailwind CSS classes.\",\n          \"type\": \"boolean\",\n          \"scope\": \"window\"\n        },\n        \"tailwindCSS.headwind.prependCustomClasses\": {\n          \"default\": false,\n          \"description\": \"A flag that controls whether or not Headwind will move custom CSS classes before (true) or after (false) the Tailwind CSS classes.\",\n          \"type\": \"boolean\",\n          \"scope\": \"window\"\n        },\n        \"tailwindCSS.headwind.customTailwindPrefix\": {\n          \"default\": \"\",\n          \"description\": \"If the Tailwind Prefix function is used, this can be specified here (e.g. tw-).\",\n          \"type\": \"string\",\n          \"scope\": \"window\"\n        }\n      }\n    },\n    \"commands\": [\n      {\n        \"command\": \"tailwindCSS.showOutput\",\n        \"title\": \"Tailwind CSS: Show Output\"\n      },\n      {\n        \"command\": \"tailwindCSS.headwind.sortTailwindClasses\",\n        \"title\": \"Headwind: Sort Tailwind CSS Classes\"\n      }\n    ]\n  },\n  \"dependencies\": {\n    \"@tailwindcss/language-server\": \"^0.14.29\",\n    \"minimatch\": \"^5.0.1\",\n    \"normalize-path\": \"^3.0.0\",\n    \"rustywind\": \"^0.7.1\"\n  },\n  \"packageManager\": \"yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447\"\n}\n"
  },
  {
    "path": "src/config.ts",
    "content": "import { workspace } from 'coc.nvim';\n\nexport function getConfigTailwindCssEnable() {\n  return workspace.getConfiguration('tailwindCSS').get<boolean>('enable');\n}\n\nexport function getConfigCustomServerPath() {\n  return workspace.getConfiguration('tailwindCSS').get<string>('custom.serverPath', '');\n}\n\nexport function getConfigExcludePatterns(): string[] {\n  return workspace.getConfiguration('tailwindCSS').get<string[]>('files.exclude', []);\n}\n"
  },
  {
    "path": "src/constants.ts",
    "content": "// PORTING: https://github.com/tailwindlabs/tailwindcss-intellisense/blob/master/packages/tailwindcss-language-server/src/lib/constants.ts\n\nexport const CONFIG_GLOB = '{tailwind,tailwind.config,tailwind.*.config,tailwind.config.*}.{js,cjs,ts,mjs}';\nexport const PACKAGE_LOCK_GLOB = '{package-lock.json,yarn.lock,pnpm-lock.yaml}';\nexport const CSS_GLOB = '*.{css,scss,sass,less,pcss}';\n"
  },
  {
    "path": "src/headwind/headwindFeature.ts",
    "content": "import { commands, ExtensionContext, OutputChannel, Range, workspace } from 'coc.nvim';\nimport { buildMatchers, getTextMatch, sortClassString } from './headwindUtils';\n\nexport type LangConfig =\n  | string\n  | string[]\n  | { regex?: string | string[]; separator?: string; replacement?: string }\n  | undefined;\n\nconst config = workspace.getConfiguration();\nconst langConfig: { [key: string]: LangConfig | LangConfig[] } = config.get('tailwindCSS.headwind.classRegex') || {};\n\nconst sortOrder = config.get('tailwindCSS.headwind.defaultSortOrder');\n\nconst customTailwindPrefixConfig = config.get('tailwindCSS.headwind.customTailwindPrefix');\nconst customTailwindPrefix = typeof customTailwindPrefixConfig === 'string' ? customTailwindPrefixConfig : '';\n\nconst shouldRemoveDuplicatesConfig = config.get('tailwindCSS.headwind.removeDuplicates');\nconst shouldRemoveDuplicates = typeof shouldRemoveDuplicatesConfig === 'boolean' ? shouldRemoveDuplicatesConfig : true;\n\nconst shouldPrependCustomClassesConfig = config.get('tailwindCSS.headwind.prependCustomClasses');\nconst shouldPrependCustomClasses =\n  typeof shouldPrependCustomClassesConfig === 'boolean' ? shouldPrependCustomClassesConfig : false;\n\nlet isActive = false;\n\nexport function activate(context: ExtensionContext, outputChannel: OutputChannel) {\n  if (isActive) {\n    return;\n  }\n  isActive = true;\n  context.subscriptions.push({\n    dispose() {\n      isActive = false;\n    },\n  });\n\n  const disposable = commands.registerCommand('tailwindCSS.headwind.sortTailwindClasses', async () => {\n    const doc = await workspace.document;\n    const editorText = doc.textDocument.getText();\n    const editorLangId = doc.textDocument.languageId;\n\n    outputChannel.appendLine(`\\n${'#'.repeat(10)} headwind exec\\n`);\n    outputChannel.appendLine(`editorLangId: ${editorLangId}`);\n    outputChannel.appendLine(`langConfig: ${JSON.stringify(langConfig[editorLangId], null, 2)}\\n`);\n\n    const matchers = buildMatchers(langConfig[editorLangId] || langConfig['html']);\n\n    for (const matcher of matchers) {\n      getTextMatch(matcher.regex, editorText, (text, startPosition) => {\n        outputChannel.appendLine(`Regex: ${matcher.regex}`);\n        outputChannel.appendLine(`MatchText: ${text}\\n`);\n        const endPosition = startPosition + text.length;\n        const range = Range.create(\n          doc.textDocument.positionAt(startPosition),\n          doc.textDocument.positionAt(endPosition),\n        );\n\n        const options = {\n          shouldRemoveDuplicates,\n          shouldPrependCustomClasses,\n          customTailwindPrefix,\n          separator: matcher.separator,\n          replacement: matcher.replacement,\n        };\n\n        doc.applyEdits([\n          {\n            range,\n            newText: sortClassString(text, Array.isArray(sortOrder) ? sortOrder : [], options),\n          },\n        ]);\n      });\n    }\n  });\n\n  context.subscriptions.push(disposable);\n\n  // if runOnSave is enabled organize tailwind classes before saving\n  if (config.get('tailwindCSS.headwind.runOnSave')) {\n    context.subscriptions.push(\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      workspace.onWillSaveTextDocument((_e) => {\n        commands.executeCommand('tailwindCSS.headwind.sortTailwindClasses');\n      }),\n    );\n  }\n}\n"
  },
  {
    "path": "src/headwind/headwindUtils.ts",
    "content": "import { LangConfig } from './headwindFeature';\n\nexport interface Options {\n  shouldRemoveDuplicates: boolean;\n  shouldPrependCustomClasses: boolean;\n  customTailwindPrefix: string;\n  separator?: RegExp;\n  replacement?: string;\n}\n\n/**\n * Sorts a string of CSS classes according to a predefined order.\n * @param classString The string to sort\n * @param sortOrder The default order to sort the array at\n *\n * @returns The sorted string\n */\nexport const sortClassString = (classString: string, sortOrder: string[], options: Options): string => {\n  let classArray = classString.split(options.separator || /\\s+/g);\n\n  if (options.shouldRemoveDuplicates) {\n    classArray = removeDuplicates(classArray);\n  }\n\n  // prepend custom tailwind prefix to all tailwind sortOrder-classes\n  const sortOrderClone = [...sortOrder];\n  if (options.customTailwindPrefix.length > 0) {\n    for (let i = 0; i < sortOrderClone.length; i++) {\n      sortOrderClone[i] = options.customTailwindPrefix + sortOrderClone[i];\n    }\n  }\n\n  classArray = sortClassArray(classArray, sortOrderClone, options.shouldPrependCustomClasses);\n\n  return classArray.join(options.replacement || ' ').trim();\n};\n\nconst sortClassArray = (classArray: string[], sortOrder: string[], shouldPrependCustomClasses: boolean): string[] => [\n  ...classArray.filter((el) => shouldPrependCustomClasses && sortOrder.indexOf(el) === -1), // append the classes that were not in the sort order if configured this way\n  ...classArray\n    .filter((el) => sortOrder.indexOf(el) !== -1) // take the classes that are in the sort order\n    .sort((a, b) => sortOrder.indexOf(a) - sortOrder.indexOf(b)), // and sort them\n  ...classArray.filter((el) => !shouldPrependCustomClasses && sortOrder.indexOf(el) === -1), // prepend the classes that were not in the sort order if configured this way\n];\n\nconst removeDuplicates = (classArray: string[]): string[] => [...new Set(classArray)];\n\nfunction isArrayOfStrings(value: unknown): value is string[] {\n  return Array.isArray(value) && value.every((item) => typeof item === 'string');\n}\n\nexport type Matcher = {\n  regex: RegExp[];\n  separator?: RegExp;\n  replacement?: string;\n};\n\nfunction buildMatcher(value: LangConfig): Matcher {\n  if (typeof value === 'string') {\n    return {\n      regex: [new RegExp(value, 'gi')],\n    };\n  } else if (isArrayOfStrings(value)) {\n    return {\n      regex: value.map((v) => new RegExp(v, 'gi')),\n    };\n  } else if (value == undefined) {\n    return {\n      regex: [],\n    };\n  } else {\n    return {\n      regex:\n        typeof value.regex === 'string'\n          ? [new RegExp(value.regex, 'gi')]\n          : isArrayOfStrings(value.regex)\n            ? value.regex.map((v) => new RegExp(v, 'gi'))\n            : [],\n      separator: typeof value.separator === 'string' ? new RegExp(value.separator, 'g') : undefined,\n      replacement: value.replacement || value.separator,\n    };\n  }\n}\n\nexport function buildMatchers(value: LangConfig | LangConfig[]): Matcher[] {\n  if (value == undefined) {\n    return [];\n  } else if (Array.isArray(value)) {\n    if (!value.length) {\n      return [];\n    } else if (!isArrayOfStrings(value)) {\n      return value.map((v) => buildMatcher(v));\n    }\n  }\n  return [buildMatcher(value)];\n}\n\nexport function getTextMatch(\n  regexes: RegExp[],\n  text: string,\n  callback: (text: string, startPosition: number) => void,\n  startPosition = 0,\n): void {\n  if (regexes.length >= 1) {\n    let wrapper: RegExpExecArray | null;\n    while ((wrapper = regexes[0].exec(text)) !== null) {\n      const wrapperMatch = wrapper[0];\n      const valueMatchIndex = wrapper.findIndex((match, idx) => idx !== 0 && match);\n      const valueMatch = wrapper[valueMatchIndex];\n\n      const newStartPosition = startPosition + wrapper.index + wrapperMatch.lastIndexOf(valueMatch);\n\n      if (regexes.length === 1) {\n        callback(valueMatch, newStartPosition);\n      } else {\n        getTextMatch(regexes.slice(1), valueMatch, callback, newStartPosition);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/index.ts",
    "content": "import {\n  commands,\n  ExtensionContext,\n  LanguageClient,\n  LanguageClientOptions,\n  OutputChannel,\n  ServerOptions,\n  TextDocument,\n  Thenable,\n  TransportKind,\n  Uri,\n  window,\n  workspace,\n  WorkspaceFolder,\n} from 'coc.nvim';\n\nimport fs from 'fs';\nimport path from 'path';\n\nimport minimatch from 'minimatch';\nimport normalizePath from 'normalize-path';\n\nimport { getConfigCustomServerPath, getConfigExcludePatterns, getConfigTailwindCssEnable } from './config';\nimport { CONFIG_GLOB } from './constants';\nimport { dedupe, equal } from './util/array';\nimport isObject from './util/isObject';\nimport { languages as defaultLanguages } from './util/languages';\n\nimport * as headwindFeature from './headwind/headwindFeature';\n\nexport type ConfigurationScope = Uri | TextDocument | WorkspaceFolder | { uri?: Uri; languageId: string };\n\nconst clients: Map<string, LanguageClient | null> = new Map();\nconst languages: Map<string, string[]> = new Map();\n\nlet _sortedWorkspaceFolders: string[] | undefined;\nfunction sortedWorkspaceFolders(): string[] {\n  if (_sortedWorkspaceFolders === void 0) {\n    _sortedWorkspaceFolders = workspace.workspaceFolders\n      ? workspace.workspaceFolders\n          .map((folder) => {\n            let result = folder.uri.toString();\n            if (result.charAt(result.length - 1) !== '/') {\n              result = result + '/';\n            }\n            return result;\n          })\n          .sort((a, b) => {\n            return a.length - b.length;\n          })\n      : [];\n  }\n  return _sortedWorkspaceFolders;\n}\n\nfunction getOuterMostWorkspaceFolder(folder: WorkspaceFolder): WorkspaceFolder {\n  const sorted = sortedWorkspaceFolders();\n  for (const element of sorted) {\n    let uri = folder.uri.toString();\n    if (uri.charAt(uri.length - 1) !== '/') {\n      uri = uri + '/';\n    }\n    if (uri.startsWith(element)) {\n      const workdir = workspace.getWorkspaceFolder(element);\n      if (workdir) {\n        return workdir;\n      }\n    }\n  }\n  return folder;\n}\n\nfunction getUserLanguages(folder?: WorkspaceFolder): Record<string, string> {\n  const langs = folder ? workspace.getConfiguration('tailwindCSS', folder.uri.toString()).includeLanguages : undefined;\n  return isObject(langs) ? langs : {};\n}\n\nfunction isExcluded(file: string, folder: WorkspaceFolder): boolean {\n  const exclude = getConfigExcludePatterns();\n\n  for (const pattern of exclude) {\n    if (minimatch(file, path.join(Uri.parse(folder!.uri).fsPath, pattern))) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nexport async function activate(context: ExtensionContext) {\n  if (!getConfigTailwindCssEnable()) return;\n\n  let module = getConfigCustomServerPath();\n  if (module && fs.existsSync(module)) {\n    module = module;\n  } else {\n    module = context.asAbsolutePath(\n      path.join('node_modules', '@tailwindcss', 'language-server', 'bin', 'tailwindcss-language-server'),\n    );\n  }\n\n  const outputChannel: OutputChannel = window.createOutputChannel('tailwindcss-language-server');\n  context.subscriptions.push(\n    commands.registerCommand('tailwindCSS.showOutput', () => {\n      if (outputChannel) {\n        outputChannel.show();\n      }\n    }),\n  );\n\n  const configWatcher = workspace.createFileSystemWatcher(`**/${CONFIG_GLOB}`, false, true, true);\n\n  configWatcher.onDidCreate((uri) => {\n    let folder = workspace.getWorkspaceFolder(uri.toString());\n    if (!folder || isExcluded(uri.fsPath, folder)) {\n      return;\n    }\n    folder = getOuterMostWorkspaceFolder(folder);\n    bootWorkspaceClient(folder);\n  });\n\n  context.subscriptions.push(configWatcher);\n\n  // TODO: check if the actual language MAPPING changed\n  // not just the language IDs\n  // e.g. \"plaintext\" already exists but you change it from \"html\" to \"css\"\n  context.subscriptions.push(\n    workspace.onDidChangeConfiguration((event) => {\n      clients.forEach((client, key) => {\n        const folder = workspace.getWorkspaceFolder(Uri.parse(key).toString());\n        if (!folder) return;\n\n        if (event.affectsConfiguration('tailwindCSS.includeLanguages', folder.uri.toString())) {\n          const userLanguages = getUserLanguages(folder);\n          if (userLanguages) {\n            const userLanguageIds = Object.keys(userLanguages);\n            const newLanguages = dedupe([...defaultLanguages, ...userLanguageIds]);\n            if (!equal(newLanguages, languages.get(folder.uri.toString()) as any[])) {\n              languages.set(folder.uri.toString(), newLanguages);\n\n              if (client) {\n                clients.delete(folder.uri.toString());\n                client.stop();\n                bootWorkspaceClient(folder);\n              }\n            }\n          }\n        }\n      });\n    }),\n  );\n\n  function bootWorkspaceClient(folder: WorkspaceFolder) {\n    if (clients.has(folder.uri.toString())) {\n      return;\n    }\n\n    clients.set(folder.uri.toString(), null);\n\n    if (!languages.has(folder.uri.toString())) {\n      languages.set(folder.uri.toString(), dedupe([...defaultLanguages, ...Object.keys(getUserLanguages(folder))]));\n    }\n\n    const configuration = {\n      edidor: workspace.getConfiguration('editor'),\n      tailwindCSS: workspace.getConfiguration('tailwindCSS'),\n    };\n\n    // MEMO: // If defaultValue (null) is omitted, LS will output the following log\n    // ----\n    // Unable to resolve \"undefined\": unknown node or service\n    const inspectPort = configuration.tailwindCSS.get('inspectPort', null);\n\n    // register headwind\n    headwindFeature.activate(context, outputChannel);\n\n    const serverOptions: ServerOptions = {\n      run: {\n        module,\n        transport: TransportKind.ipc,\n        options: { execArgv: inspectPort === null ? [] : [`--inspect=${inspectPort}`] },\n      },\n      debug: {\n        module,\n        transport: TransportKind.ipc,\n        options: {\n          execArgv: ['--nolazy', `--inspect=${6011 + clients.size}`],\n        },\n      },\n    };\n\n    const languageObj = languages.get(folder.uri.toString());\n    if (!languageObj) return;\n\n    const documentSelector = languageObj.map((language) => ({\n      scheme: 'file',\n      language,\n      pattern: normalizePath(`${Uri.parse(folder!.uri).fsPath.replace(/[\\[\\]\\{\\}]/g, '?')}/**/*`),\n    }));\n\n    const clientOptions: LanguageClientOptions = {\n      documentSelector,\n      diagnosticCollectionName: 'tailwindcss-language-server',\n      workspaceFolder: folder,\n      outputChannel: outputChannel,\n      synchronize: {\n        fileEvents: workspace.createFileSystemWatcher(CONFIG_GLOB),\n      },\n      middleware: {\n        workspace: {\n          configuration: (params) => {\n            return params.items.map(({ section, scopeUri }) => {\n              let scope: ConfigurationScope = folder;\n              if (scopeUri) {\n                const doc = workspace.textDocuments.find((doc) => doc.uri.toString() === scopeUri);\n                if (doc) {\n                  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n                  scope = {\n                    languageId: doc.languageId,\n                  };\n                }\n              }\n              return workspace.getConfiguration(section);\n            });\n          },\n        },\n      },\n      initializationOptions: {\n        userLanguages: getUserLanguages(folder),\n      },\n    };\n    const client = new LanguageClient('tailwindCSS', 'Tailwind CSS Language Server', serverOptions, clientOptions);\n\n    // MEMO: Define a dummy onRequest.\n    //\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    client.onRequest('@/tailwindCSS/getDocumentSymbols', async ({ uri }) => {\n      // MEMO: In coc.nvim, vscode.executeDocumentSymbolProvider is not provided by executeCommand.\n      //return commands.executeCommand<SymbolInformation[]>('vscode.executeDocumentSymbolProvider', Uri.parse(uri));\n    });\n\n    client.start();\n    clients.set(folder.uri.toString(), client);\n  }\n\n  async function didOpenTextDocument(document: TextDocument): Promise<void> {\n    const uri = Uri.parse(document.uri);\n    if (uri.scheme !== 'file') return;\n\n    // Stop folder search for unsupported languageId (filetype) [for coc-tailwindcss3]\n    const supportedLanguages: string[] = [];\n    supportedLanguages.push(...defaultLanguages);\n    const includeLanguages = workspace.getConfiguration('tailwindCSS').get<string[]>('includeLanguages');\n    if (includeLanguages) supportedLanguages.push(...Object.keys(includeLanguages));\n    if (!supportedLanguages.includes(document.languageId)) return;\n\n    let folder = workspace.getWorkspaceFolder(document.uri);\n    // Files outside a folder can't be handled. This might depend on the language.\n    // Single file languages like JSON might handle files outside the workspace folders.\n    if (!folder) {\n      return;\n    }\n\n    // If we have nested workspace folders we only start a server on the outer most workspace folder.\n    folder = getOuterMostWorkspaceFolder(folder);\n\n    bootWorkspaceClient(folder);\n  }\n\n  context.subscriptions.push(workspace.onDidOpenTextDocument(didOpenTextDocument));\n  workspace.textDocuments.forEach(didOpenTextDocument);\n  context.subscriptions.push(\n    workspace.onDidChangeWorkspaceFolders((event) => {\n      _sortedWorkspaceFolders = undefined;\n\n      for (const folder of event.removed) {\n        const client = clients.get(folder.uri.toString());\n        if (client) {\n          clients.delete(folder.uri.toString());\n          client.stop();\n        }\n      }\n    }),\n  );\n}\n\nexport async function deactivate(): Promise<void> {\n  const promises: Thenable<void>[] = [];\n  for (const client of clients.values()) {\n    if (client) {\n      promises.push(client.stop());\n    }\n  }\n  return Promise.all(promises).then(() => undefined);\n}\n"
  },
  {
    "path": "src/util/array.ts",
    "content": "// PORTING: https://github.com/tailwindlabs/tailwindcss-intellisense/blob/master/packages/tailwindcss-language-service/src/util/array.ts\n\nexport function dedupe<T>(arr: Array<T>): Array<T> {\n  return arr.filter((value, index, self) => self.indexOf(value) === index);\n}\n\nexport function equal(a: any[], b: any[]): boolean {\n  if (a === b) return true;\n  if (a.length !== b.length) return false;\n\n  const aSorted = a.concat().sort();\n  const bSorted = b.concat().sort();\n\n  for (let i = 0; i < aSorted.length; ++i) {\n    if (aSorted[i] !== bSorted[i]) return false;\n  }\n\n  return true;\n}\n"
  },
  {
    "path": "src/util/isObject.ts",
    "content": "// PORTING: https://github.com/tailwindlabs/tailwindcss-intellisense/blob/master/packages/tailwindcss-language-service/src/util/isObject.ts\nexport default function isObject(variable: any): boolean {\n  return Object.prototype.toString.call(variable) === '[object Object]';\n}\n"
  },
  {
    "path": "src/util/languages.ts",
    "content": "export const htmlLanguages = [\n  'aspnetcorerazor',\n  'astro',\n  'astro-markdown',\n  'blade',\n  'django-html',\n  'edge',\n  'ejs',\n  'erb',\n  'gohtml',\n  'GoHTML',\n  'haml',\n  'handlebars',\n  'hbs',\n  'html',\n  'HTML (Eex)',\n  'HTML (EEx)',\n  'html-eex',\n  'htmldjango',\n  'jade',\n  'leaf',\n  'liquid',\n  'markdown',\n  'mdx',\n  'mustache',\n  'njk',\n  'nunjucks',\n  'phoenix-heex',\n  'php',\n  'razor',\n  'slim',\n  'twig',\n];\n\nexport const cssLanguages = ['css', 'less', 'postcss', 'sass', 'scss', 'stylus', 'sugarss', 'tailwindcss'];\n\nexport const jsLanguages = [\n  'javascript',\n  'javascriptreact',\n  'reason',\n  'rescript',\n  'typescript',\n  'typescriptreact',\n  'glimmer-js',\n  'glimmer-ts',\n];\n\nexport const specialLanguages = ['vue', 'svelte'];\n\n// PORTING: https://github.com/tailwindlabs/tailwindcss-intellisense/blob/master/packages/tailwindcss-language-service/src/util/languages.ts\nexport const languages = [...cssLanguages, ...htmlLanguages, ...jsLanguages, ...specialLanguages];\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"es2017\",\n    \"lib\": [\"es2017\", \"es2018\", \"DOM\"],\n    \"module\": \"commonjs\",\n    \"declaration\": false,\n    \"sourceMap\": true,\n    \"outDir\": \"lib\",\n    \"strict\": true,\n    \"moduleResolution\": \"node\",\n    \"noImplicitAny\": false,\n    \"esModuleInterop\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  }
]