From 32eb91b42bee4b888fbc2b6bbe2dfe2693b4624f Mon Sep 17 00:00:00 2001 From: BraisGabin Date: Mon, 27 Jun 2022 20:48:37 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20detekt/d?= =?UTF-8?q?etekt@5ff82e1131785d1a78bd0c45dddc332619840f46=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 8 ++++---- assets/js/23530380.e6cf335b.js | 1 - assets/js/23530380.f84cb1e9.js | 1 + assets/js/27346d8c.6d9e9078.js | 1 + assets/js/27346d8c.e6f4f43f.js | 1 - assets/js/a5e1ffa9.23eead50.js | 1 + assets/js/a5e1ffa9.f5cc31e9.js | 1 - assets/js/ca539021.154cc3f6.js | 1 + assets/js/ca539021.de7485f7.js | 1 - assets/js/d640b5a6.1adf7cc4.js | 1 + assets/js/d640b5a6.b3c875dc.js | 1 - assets/js/f8409a7e.9e7ef94a.js | 1 - assets/js/f8409a7e.e41ede9c.js | 1 + assets/js/{main.6b5ebd75.js => main.b737d8d2.js} | 4 ++-- ...js.LICENSE.txt => main.b737d8d2.js.LICENSE.txt} | 0 ...e~main.9cbcc618.js => runtime~main.34c0bd89.js} | 2 +- blog/2018/02/11/website-online/index.html | 8 ++++---- .../03/03/build-upon-the-default-config/index.html | 8 ++++---- .../03/configure-detekt-on-root-project/index.html | 8 ++++---- .../06/08/migrating-the-test-pattern/index.html | 8 ++++---- blog/2019/06/29/using-detekt-snapshots/index.html | 8 ++++---- blog/2019/08/04/calling-it-one-zero/index.html | 8 ++++---- blog/2019/08/14/custom-console-reports/index.html | 8 ++++---- .../09/27/additional-diff-config-task/index.html | 8 ++++---- blog/archive/index.html | 8 ++++---- blog/index.html | 8 ++++---- blog/tags/guides/index.html | 8 ++++---- blog/tags/index.html | 8 ++++---- blog/tags/news/index.html | 8 ++++---- docs/gettingstarted/cli/index.html | 10 +++++----- docs/gettingstarted/git-pre-commit-hook/index.html | 8 ++++---- docs/gettingstarted/gradle/index.html | 10 +++++----- docs/gettingstarted/gradletask/index.html | 10 +++++----- docs/gettingstarted/mavenanttask/index.html | 10 +++++----- docs/gettingstarted/type-resolution/index.html | 8 ++++---- docs/intro/index.html | 14 +++++++------- docs/introduction/baseline/index.html | 8 ++++---- docs/introduction/changelog-rc/index.html | 8 ++++---- docs/introduction/changelog/index.html | 8 ++++---- docs/introduction/compatibility/index.html | 8 ++++---- docs/introduction/compose/index.html | 8 ++++---- docs/introduction/configurations/index.html | 8 ++++---- docs/introduction/extensions/index.html | 10 +++++----- docs/introduction/reporting/index.html | 8 ++++---- docs/introduction/snapshots/index.html | 8 ++++---- docs/introduction/suppressing-rules/index.html | 8 ++++---- docs/introduction/suppressors/index.html | 8 ++++---- docs/rules/comments/index.html | 8 ++++---- docs/rules/complexity/index.html | 8 ++++---- docs/rules/coroutines/index.html | 8 ++++---- docs/rules/empty-blocks/index.html | 8 ++++---- docs/rules/exceptions/index.html | 8 ++++---- docs/rules/formatting/index.html | 8 ++++---- docs/rules/naming/index.html | 8 ++++---- docs/rules/performance/index.html | 8 ++++---- docs/rules/potential-bugs/index.html | 8 ++++---- docs/rules/style/index.html | 8 ++++---- index.html | 8 ++++---- search/index.html | 8 ++++---- 59 files changed, 193 insertions(+), 193 deletions(-) delete mode 100644 assets/js/23530380.e6cf335b.js create mode 100644 assets/js/23530380.f84cb1e9.js create mode 100644 assets/js/27346d8c.6d9e9078.js delete mode 100644 assets/js/27346d8c.e6f4f43f.js create mode 100644 assets/js/a5e1ffa9.23eead50.js delete mode 100644 assets/js/a5e1ffa9.f5cc31e9.js create mode 100644 assets/js/ca539021.154cc3f6.js delete mode 100644 assets/js/ca539021.de7485f7.js create mode 100644 assets/js/d640b5a6.1adf7cc4.js delete mode 100644 assets/js/d640b5a6.b3c875dc.js delete mode 100644 assets/js/f8409a7e.9e7ef94a.js create mode 100644 assets/js/f8409a7e.e41ede9c.js rename assets/js/{main.6b5ebd75.js => main.b737d8d2.js} (96%) rename assets/js/{main.6b5ebd75.js.LICENSE.txt => main.b737d8d2.js.LICENSE.txt} (100%) rename assets/js/{runtime~main.9cbcc618.js => runtime~main.34c0bd89.js} (84%) diff --git a/404.html b/404.html index 2c00b1b33..0fdcd0862 100644 --- a/404.html +++ b/404.html @@ -10,13 +10,13 @@ Page Not Found | Detekt - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - + + \ No newline at end of file diff --git a/assets/js/23530380.e6cf335b.js b/assets/js/23530380.e6cf335b.js deleted file mode 100644 index b248c9042..000000000 --- a/assets/js/23530380.e6cf335b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdetekt_website=self.webpackChunkdetekt_website||[]).push([[3480],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return m}});var o=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=o.createContext({}),u=function(e){var t=o.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},p=function(e){var t=u(e.components);return o.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},c=o.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),c=u(n),m=i,k=c["".concat(l,".").concat(m)]||c[m]||d[m]||r;return n?o.createElement(k,a(a({ref:t},p),{},{components:n})):o.createElement(k,a({ref:t},p))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,a=new Array(r);a[0]=c;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:i,a[1]=s;for(var u=2;uCustom RuleSets',id:"custom-rulesets",level:4},{value:'Testing your rules',id:"testing-your-rules",level:5},{value:'Custom Processors',id:"custom-processors",level:4},{value:'Custom Reports',id:"custom-reports",level:4},{value:'Let detekt know about your extensions',id:"let-detekt-know-about-your-extensions",level:4},{value:"Integrate your extension with the detekt CLI",id:"integrate-your-extension-with-the-detekt-cli",level:5},{value:"Integrate your extension with the detekt gradle plugin",id:"integrate-your-extension-with-the-detekt-gradle-plugin",level:5},{value:"Gradle (Kotlin/Groovy DSL)",id:"gradle-kotlingroovy-dsl",level:6},{value:"Pitfalls",id:"pitfalls",level:5},{value:"autoCorrect property",id:"autocorrect-property",level:4}],m={toc:c};function k(e){var t=e.components,n=(0,i.Z)(e,s);return(0,r.kt)("wrapper",(0,o.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The following page describes how to extend detekt and how to customize it to your domain-specific needs.\nThe associated ",(0,r.kt)("strong",{parentName:"p"},"code samples")," to this guide can be found in the package ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/detekt/detekt/tree/main/detekt-sample-extensions"},"detekt/detekt-sample-extensions"),"."),(0,r.kt)("h4",{id:"custom-rulesets"},(0,r.kt)("a",{name:"customrulesets"},"Custom RuleSets")),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"detekt")," uses the ",(0,r.kt)("inlineCode",{parentName:"p"},"ServiceLoader")," pattern to collect all instances of ",(0,r.kt)("inlineCode",{parentName:"p"},"RuleSetProvider")," interfaces.\nSo it is possible to define rules/rule sets and enhance ",(0,r.kt)("em",{parentName:"p"},"detekt")," with your own flavor. "),(0,r.kt)("p",null,"Attention: You need a ",(0,r.kt)("inlineCode",{parentName:"p"},"resources/META-INF/services/io.gitlab.arturbosch.detekt.api.RuleSetProvider")," file which\nhas as content the fully qualified name of your ",(0,r.kt)("inlineCode",{parentName:"p"},"RuleSetProvider")," e.g. ",(0,r.kt)("inlineCode",{parentName:"p"},"io.gitlab.arturbosch.detekt.sample.extensions.SampleProvider"),"."),(0,r.kt)("p",null,"You can use our ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/detekt/detekt-custom-rule-template"},"GitHub template")," to have a basic scaffolding to\ndevelop your own custom rules. Another option is to clone the provided ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/detekt/detekt/tree/main/detekt-sample-extensions"},"detekt/detekt-sample-extensions")," project."),(0,r.kt)("p",null,"Own rules have to extend the abstract ",(0,r.kt)("em",{parentName:"p"},"Rule")," class and override the ",(0,r.kt)("inlineCode",{parentName:"p"},"visitXXX()"),"-functions from the AST.",(0,r.kt)("br",{parentName:"p"}),"\n","A ",(0,r.kt)("inlineCode",{parentName:"p"},"RuleSetProvider")," must be implemented, which declares a ",(0,r.kt)("inlineCode",{parentName:"p"},"RuleSet")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"instance()"),"-function.\nTo leverage the configuration mechanism of detekt you must pass the Config object from your rule set provider to your rule.\nAn ",(0,r.kt)("inlineCode",{parentName:"p"},"Issue")," property defines what ID, severity and message should be printed on the console or on any other output format."),(0,r.kt)("p",null,"Example of a custom rule:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-kotlin"},'class TooManyFunctions(config: Config) : Rule(config) {\n\n override val issue = Issue(javaClass.simpleName,\n Severity.CodeSmell,\n "This rule reports a file with an excessive function count.",\n Debt.TWENTY_MINS)\n\n private val threshold = 10\n private var amount: Int = 0\n\n override fun visitKtFile(file: KtFile) {\n super.visitKtFile(file)\n if (amount > threshold) {\n report(CodeSmell(issue, Entity.from(file), \n "Too many functions can make the maintainability of a file costlier")\n }\n amount = 0\n }\n\n override fun visitNamedFunction(function: KtNamedFunction) {\n super.visitNamedFunction(function)\n amount++\n }\n}\n')),(0,r.kt)("p",null,"Example of a much preciser rule in terms of more specific CodeSmell constructor and Rule attributes:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-kotlin"},'class TooManyFunctions2(config: Config) : Rule(config) {\n\n override val issue = Issue(\n javaClass.simpleName,\n Severity.CodeSmell,\n "This rule reports a file with an excessive function count.",\n Debt.TWENTY_MINS\n )\n\n private val threshold: Int by config(defaultValue = 10)\n private var amount: Int = 0\n\n override fun visitKtFile(file: KtFile) {\n super.visitKtFile(file)\n if (amount > threshold) {\n report(ThresholdedCodeSmell(issue,\n entity = Entity.from(file),\n metric = Metric(type = "SIZE", value = amount, threshold = threshold),\n message = "The file ${file.name} has $amount function declarations. " +\n "Threshold is specified with $threshold.",\n references = emptyList())\n )\n }\n amount = 0\n }\n\n override fun visitNamedFunction(function: KtNamedFunction) {\n super.visitNamedFunction(function)\n amount++\n }\n}\n')),(0,r.kt)("p",null,"If you want your rule to be configurable, write down your properties inside the detekt.yml file.\nPlease note that this will only take effect, if the ",(0,r.kt)("inlineCode",{parentName:"p"},"Config")," object is passed on by the ",(0,r.kt)("inlineCode",{parentName:"p"},"RuleSetProvider"),"\nto the rule itself."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"MyRuleSet:\n TooManyFunctions2:\n active: true\n threshold: 5\n OtherRule:\n active: false\n")),(0,r.kt)("p",null,"By specifying the rule set and rule ids, ",(0,r.kt)("em",{parentName:"p"},"detekt")," will use the sub configuration of ",(0,r.kt)("inlineCode",{parentName:"p"},"TooManyFunctions2"),":"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},'val threshold = valueOrDefault("threshold", THRESHOLD)')),(0,r.kt)("p",null,"Note: As of version 1.2.0 detekt now verifies if all configured properties actually exist in a configuration created by ",(0,r.kt)("inlineCode",{parentName:"p"},"--generate-config"),".\nThis means that by default detekt does not know about your new properties.\nTherefore we need to mention them in the configuration under ",(0,r.kt)("inlineCode",{parentName:"p"},"config>excludes"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"config:\n validation: true\n # 1. exclude rule set 'sample' and all its nested members\n # 2. exclude every property in every rule under the rule set 'sample'\n excludes: \"sample.*,sample>.*>.*\"\n")),(0,r.kt)("h5",{id:"testing-your-rules"},(0,r.kt)("a",{name:"testing"},"Testing your rules")),(0,r.kt)("p",null,"To test your rules, add the dependency on ",(0,r.kt)("inlineCode",{parentName:"p"},"detekt-test")," to your project: ",(0,r.kt)("inlineCode",{parentName:"p"},'testCompile "io.gitlab.arturbosch.detekt:detekt-test:$version"'),"."),(0,r.kt)("p",null,"The easiest way to detect issues with your newly created rule is to use the ",(0,r.kt)("inlineCode",{parentName:"p"},"lint")," extension function:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"Rule.lint(StringContent/Path/KtFile): List"))),(0,r.kt)("p",null,"If you need to reuse the Kotlin file for performance reasons within similar test cases, please use one of these functions:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"compileContentForTest(content: String): KtFile")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"compileForTest(path: Path): KtFile"))),(0,r.kt)("h4",{id:"custom-processors"},(0,r.kt)("a",{name:"customprocessors"},"Custom Processors")),(0,r.kt)("p",null,"Custom processors can be used for example to implement additional project metrics."),(0,r.kt)("p",null,"When for whatever reason you want to count all loop statements inside your code base, you could write something like:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-kotlin"},'class NumberOfLoopsProcessor : FileProcessListener {\n\n override fun onProcess(file: KtFile) {\n val visitor = LoopVisitor()\n file.accept(visitor)\n file.putUserData(numberOfLoopsKey, visitor.numberOfLoops)\n }\n\n companion object {\n val numberOfLoopsKey = Key("number of loops")\n }\n\n class LoopVisitor : DetektVisitor() {\n\n internal var numberOfLoops = 0\n override fun visitLoopExpression(loopExpression: KtLoopExpression) {\n super.visitLoopExpression(loopExpression)\n numberOfLoops++\n }\n }\n}\n')),(0,r.kt)("p",null,"To let detekt know about the new processor, we specify a ",(0,r.kt)("inlineCode",{parentName:"p"},"resources/META-INF/services/io.gitlab.arturbosch.detekt.api.FileProcessListener")," file\nwith the full qualify name of our processor as the content: ",(0,r.kt)("inlineCode",{parentName:"p"},"io.gitlab.arturbosch.detekt.sample.extensions.processors.NumberOfLoopsProcessor"),"."),(0,r.kt)("p",null,"To test the code we use the ",(0,r.kt)("inlineCode",{parentName:"p"},"detekt-test")," module and write a JUnit 5 testcase."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-kotlin"},'class NumberOfLoopsProcessorTest {\n\n @Test\n fun `should expect two loops`() {\n val code = """\n fun main() {\n for (i in 0..10) {\n while (i < 5) {\n println(i)\n }\n }\n }\n """\n\n val ktFile = compileContentForTest(code)\n NumberOfLoopsProcessor().onProcess(ktFile)\n\n assertThat(ktFile.getUserData(NumberOfLoopsProcessor.numberOfLoopsKey)).isEqualTo(2)\n }\n}\n')),(0,r.kt)("h4",{id:"custom-reports"},(0,r.kt)("a",{name:"customreports"},"Custom Reports")),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"detekt")," allows you to extend the console output and to create custom output formats.\nIf you want to customize the output, take a look at the ",(0,r.kt)("inlineCode",{parentName:"p"},"ConsoleReport")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"OutputReport")," classes."),(0,r.kt)("p",null,"All they need are an implementation of the ",(0,r.kt)("inlineCode",{parentName:"p"},"render()"),"-function which takes an object with all findings and returns a string to be printed out."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-kotlin"},"abstract fun render(detektion: Detektion): String?\n")),(0,r.kt)("h4",{id:"let-detekt-know-about-your-extensions"},(0,r.kt)("a",{name:"configureextensions"},"Let detekt know about your extensions")),(0,r.kt)("p",null,"So you have implemented your own rules or other extensions and want to integrate them\ninto your ",(0,r.kt)("inlineCode",{parentName:"p"},"detekt")," run? Great, make sure to have a ",(0,r.kt)("inlineCode",{parentName:"p"},"jar")," with all your needed dependencies\nminus the ones ",(0,r.kt)("inlineCode",{parentName:"p"},"detekt")," brings itself."),(0,r.kt)("p",null,"Take a look at our ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/detekt/detekt/tree/main/detekt-sample-extensions"},"sample project")," on how to achieve this with gradle."),(0,r.kt)("h5",{id:"integrate-your-extension-with-the-detekt-cli"},"Integrate your extension with the detekt CLI"),(0,r.kt)("p",null,"Mention your ",(0,r.kt)("inlineCode",{parentName:"p"},"jar")," with the ",(0,r.kt)("inlineCode",{parentName:"p"},"--plugins")," flag when calling the cli fatjar:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"detekt --input ... --plugins /path/to/my/jar\n")),(0,r.kt)("h5",{id:"integrate-your-extension-with-the-detekt-gradle-plugin"},"Integrate your extension with the detekt gradle plugin"),(0,r.kt)("p",null,"For example ",(0,r.kt)("inlineCode",{parentName:"p"},"detekt")," itself provides a wrapper over ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/pinterest/ktlint"},"ktlint")," as a\ncustom ",(0,r.kt)("inlineCode",{parentName:"p"},"formatting")," rule set.\nTo enable it, we add the published dependency to ",(0,r.kt)("inlineCode",{parentName:"p"},"detekt")," via the ",(0,r.kt)("inlineCode",{parentName:"p"},"detektPlugins")," configuration:"),(0,r.kt)("h6",{id:"gradle-kotlingroovy-dsl"},"Gradle (Kotlin/Groovy DSL)"),(0,r.kt)(a.ZP,{mdxType:"DetektVersionBanner"}),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-kotlin"},'dependencies {\n detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:{{ site.detekt_version }}")\n}\n')),(0,r.kt)("h5",{id:"pitfalls"},"Pitfalls"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"All rules are disabled by default and have to be explicitly enabled in the ",(0,r.kt)("inlineCode",{parentName:"li"},"detekt")," yaml configuration file."),(0,r.kt)("li",{parentName:"ul"},"If you do not pass the ",(0,r.kt)("inlineCode",{parentName:"li"},"Config")," object from the ",(0,r.kt)("inlineCode",{parentName:"li"},"RuleSetProvider")," to the rule, the rule is active, but you will not be able to use\nany configuration options or disable the rule via config file."),(0,r.kt)("li",{parentName:"ul"},"If your extension is part of your project and you integrate it like ",(0,r.kt)("inlineCode",{parentName:"li"},'detektPlugins project(":my-rules")')," make sure that this\nsubproject is build before ",(0,r.kt)("inlineCode",{parentName:"li"},"gradle detekt")," is run.\nIn the ",(0,r.kt)("inlineCode",{parentName:"li"},"kotlin-dsl")," you could add something like ",(0,r.kt)("inlineCode",{parentName:"li"},'tasks.withType { dependsOn(":my-rules:assemble") }')," to explicitly run ",(0,r.kt)("inlineCode",{parentName:"li"},"detekt")," only\nafter your extension sub project is built."),(0,r.kt)("li",{parentName:"ul"},"If you use detekt for your Android project, and if you want to integrate all your custom rules in a new module, please make sure that\nyou created a pure kotlin module which has no Android dependencies. ",(0,r.kt)("inlineCode",{parentName:"li"},'apply plugin: "kotlin"')," is enough to make it work."),(0,r.kt)("li",{parentName:"ul"},"Sometimes when you run detekt task, you may not see the violations detected by your custom rules. In this case open a terminal and run\n",(0,r.kt)("inlineCode",{parentName:"li"},"./gradlew --stop")," to stop gradle daemons and run the task again.")),(0,r.kt)("h4",{id:"autocorrect-property"},"autoCorrect property"),(0,r.kt)("p",null,"In detekt you can write custom rules which can manipulate your code base.\nFor this a cli flag ",(0,r.kt)("inlineCode",{parentName:"p"},"--auto-correct")," and the gradle plugin property ",(0,r.kt)("inlineCode",{parentName:"p"},"autoCorrect")," exists.\nOnly write auto correcting code within the ",(0,r.kt)("inlineCode",{parentName:"p"},"Rule#withAutoCorrect()"),"-function."))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/23530380.f84cb1e9.js b/assets/js/23530380.f84cb1e9.js new file mode 100644 index 000000000..617bee956 --- /dev/null +++ b/assets/js/23530380.f84cb1e9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdetekt_website=self.webpackChunkdetekt_website||[]).push([[3480],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return m}});var o=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=o.createContext({}),u=function(e){var t=o.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},p=function(e){var t=u(e.components);return o.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},c=o.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),c=u(n),m=i,k=c["".concat(l,".").concat(m)]||c[m]||d[m]||r;return n?o.createElement(k,a(a({ref:t},p),{},{components:n})):o.createElement(k,a({ref:t},p))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,a=new Array(r);a[0]=c;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:i,a[1]=s;for(var u=2;uCustom RuleSets',id:"custom-rulesets",level:4},{value:'Testing your rules',id:"testing-your-rules",level:5},{value:'Custom Processors',id:"custom-processors",level:4},{value:'Custom Reports',id:"custom-reports",level:4},{value:'Let detekt know about your extensions',id:"let-detekt-know-about-your-extensions",level:4},{value:"Integrate your extension with the detekt CLI",id:"integrate-your-extension-with-the-detekt-cli",level:5},{value:"Integrate your extension with the detekt gradle plugin",id:"integrate-your-extension-with-the-detekt-gradle-plugin",level:5},{value:"Gradle (Kotlin/Groovy DSL)",id:"gradle-kotlingroovy-dsl",level:6},{value:"Pitfalls",id:"pitfalls",level:5},{value:"autoCorrect property",id:"autocorrect-property",level:4}],c={toc:d};function m(e){var t=e.components,n=(0,i.Z)(e,a);return(0,r.kt)("wrapper",(0,o.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The following page describes how to extend detekt and how to customize it to your domain-specific needs.\nThe associated ",(0,r.kt)("strong",{parentName:"p"},"code samples")," to this guide can be found in the package ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/detekt/detekt/tree/main/detekt-sample-extensions"},"detekt/detekt-sample-extensions"),"."),(0,r.kt)("h4",{id:"custom-rulesets"},(0,r.kt)("a",{name:"customrulesets"},"Custom RuleSets")),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"detekt")," uses the ",(0,r.kt)("inlineCode",{parentName:"p"},"ServiceLoader")," pattern to collect all instances of ",(0,r.kt)("inlineCode",{parentName:"p"},"RuleSetProvider")," interfaces.\nSo it is possible to define rules/rule sets and enhance ",(0,r.kt)("em",{parentName:"p"},"detekt")," with your own flavor. "),(0,r.kt)("p",null,"Attention: You need a ",(0,r.kt)("inlineCode",{parentName:"p"},"resources/META-INF/services/io.gitlab.arturbosch.detekt.api.RuleSetProvider")," file which\nhas as content the fully qualified name of your ",(0,r.kt)("inlineCode",{parentName:"p"},"RuleSetProvider")," e.g. ",(0,r.kt)("inlineCode",{parentName:"p"},"io.gitlab.arturbosch.detekt.sample.extensions.SampleProvider"),"."),(0,r.kt)("p",null,"You can use our ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/detekt/detekt-custom-rule-template"},"GitHub template")," to have a basic scaffolding to\ndevelop your own custom rules. Another option is to clone the provided ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/detekt/detekt/tree/main/detekt-sample-extensions"},"detekt/detekt-sample-extensions")," project."),(0,r.kt)("p",null,"Own rules have to extend the abstract ",(0,r.kt)("em",{parentName:"p"},"Rule")," class and override the ",(0,r.kt)("inlineCode",{parentName:"p"},"visitXXX()"),"-functions from the AST.",(0,r.kt)("br",{parentName:"p"}),"\n","A ",(0,r.kt)("inlineCode",{parentName:"p"},"RuleSetProvider")," must be implemented, which declares a ",(0,r.kt)("inlineCode",{parentName:"p"},"RuleSet")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"instance()"),"-function.\nTo leverage the configuration mechanism of detekt you must pass the Config object from your rule set provider to your rule.\nAn ",(0,r.kt)("inlineCode",{parentName:"p"},"Issue")," property defines what ID, severity and message should be printed on the console or on any other output format."),(0,r.kt)("p",null,"Example of a custom rule:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-kotlin"},'class TooManyFunctions(config: Config) : Rule(config) {\n\n override val issue = Issue(javaClass.simpleName,\n Severity.CodeSmell,\n "This rule reports a file with an excessive function count.",\n Debt.TWENTY_MINS)\n\n private val threshold = 10\n private var amount: Int = 0\n\n override fun visitKtFile(file: KtFile) {\n super.visitKtFile(file)\n if (amount > threshold) {\n report(CodeSmell(issue, Entity.from(file), \n "Too many functions can make the maintainability of a file costlier")\n }\n amount = 0\n }\n\n override fun visitNamedFunction(function: KtNamedFunction) {\n super.visitNamedFunction(function)\n amount++\n }\n}\n')),(0,r.kt)("p",null,"Example of a much preciser rule in terms of more specific CodeSmell constructor and Rule attributes:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-kotlin"},'class TooManyFunctions2(config: Config) : Rule(config) {\n\n override val issue = Issue(\n javaClass.simpleName,\n Severity.CodeSmell,\n "This rule reports a file with an excessive function count.",\n Debt.TWENTY_MINS\n )\n\n private val threshold: Int by config(defaultValue = 10)\n private var amount: Int = 0\n\n override fun visitKtFile(file: KtFile) {\n super.visitKtFile(file)\n if (amount > threshold) {\n report(ThresholdedCodeSmell(issue,\n entity = Entity.from(file),\n metric = Metric(type = "SIZE", value = amount, threshold = threshold),\n message = "The file ${file.name} has $amount function declarations. " +\n "Threshold is specified with $threshold.",\n references = emptyList())\n )\n }\n amount = 0\n }\n\n override fun visitNamedFunction(function: KtNamedFunction) {\n super.visitNamedFunction(function)\n amount++\n }\n}\n')),(0,r.kt)("p",null,"If you want your rule to be configurable, write down your properties inside the detekt.yml file.\nPlease note that this will only take effect, if the ",(0,r.kt)("inlineCode",{parentName:"p"},"Config")," object is passed on by the ",(0,r.kt)("inlineCode",{parentName:"p"},"RuleSetProvider"),"\nto the rule itself."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"MyRuleSet:\n TooManyFunctions2:\n active: true\n threshold: 5\n OtherRule:\n active: false\n")),(0,r.kt)("p",null,"By specifying the rule set and rule ids, ",(0,r.kt)("em",{parentName:"p"},"detekt")," will use the sub configuration of ",(0,r.kt)("inlineCode",{parentName:"p"},"TooManyFunctions2"),":"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},'val threshold = valueOrDefault("threshold", THRESHOLD)')),(0,r.kt)("p",null,"Note: As of version 1.2.0 detekt now verifies if all configured properties actually exist in a configuration created by ",(0,r.kt)("inlineCode",{parentName:"p"},"--generate-config"),".\nThis means that by default detekt does not know about your new properties.\nTherefore we need to mention them in the configuration under ",(0,r.kt)("inlineCode",{parentName:"p"},"config>excludes"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"config:\n validation: true\n # 1. exclude rule set 'sample' and all its nested members\n # 2. exclude every property in every rule under the rule set 'sample'\n excludes: \"sample.*,sample>.*>.*\"\n")),(0,r.kt)("h5",{id:"testing-your-rules"},(0,r.kt)("a",{name:"testing"},"Testing your rules")),(0,r.kt)("p",null,"To test your rules, add the dependency on ",(0,r.kt)("inlineCode",{parentName:"p"},"detekt-test")," to your project: ",(0,r.kt)("inlineCode",{parentName:"p"},'testCompile "io.gitlab.arturbosch.detekt:detekt-test:$version"'),"."),(0,r.kt)("p",null,"The easiest way to detect issues with your newly created rule is to use the ",(0,r.kt)("inlineCode",{parentName:"p"},"lint")," extension function:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"Rule.lint(StringContent/Path/KtFile): List"))),(0,r.kt)("p",null,"If you need to reuse the Kotlin file for performance reasons within similar test cases, please use one of these functions:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"compileContentForTest(content: String): KtFile")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"compileForTest(path: Path): KtFile"))),(0,r.kt)("h4",{id:"custom-processors"},(0,r.kt)("a",{name:"customprocessors"},"Custom Processors")),(0,r.kt)("p",null,"Custom processors can be used for example to implement additional project metrics."),(0,r.kt)("p",null,"When for whatever reason you want to count all loop statements inside your code base, you could write something like:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-kotlin"},'class NumberOfLoopsProcessor : FileProcessListener {\n\n override fun onProcess(file: KtFile) {\n val visitor = LoopVisitor()\n file.accept(visitor)\n file.putUserData(numberOfLoopsKey, visitor.numberOfLoops)\n }\n\n companion object {\n val numberOfLoopsKey = Key("number of loops")\n }\n\n class LoopVisitor : DetektVisitor() {\n\n internal var numberOfLoops = 0\n override fun visitLoopExpression(loopExpression: KtLoopExpression) {\n super.visitLoopExpression(loopExpression)\n numberOfLoops++\n }\n }\n}\n')),(0,r.kt)("p",null,"To let detekt know about the new processor, we specify a ",(0,r.kt)("inlineCode",{parentName:"p"},"resources/META-INF/services/io.gitlab.arturbosch.detekt.api.FileProcessListener")," file\nwith the full qualify name of our processor as the content: ",(0,r.kt)("inlineCode",{parentName:"p"},"io.gitlab.arturbosch.detekt.sample.extensions.processors.NumberOfLoopsProcessor"),"."),(0,r.kt)("p",null,"To test the code we use the ",(0,r.kt)("inlineCode",{parentName:"p"},"detekt-test")," module and write a JUnit 5 testcase."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-kotlin"},'class NumberOfLoopsProcessorTest {\n\n @Test\n fun `should expect two loops`() {\n val code = """\n fun main() {\n for (i in 0..10) {\n while (i < 5) {\n println(i)\n }\n }\n }\n """\n\n val ktFile = compileContentForTest(code)\n NumberOfLoopsProcessor().onProcess(ktFile)\n\n assertThat(ktFile.getUserData(NumberOfLoopsProcessor.numberOfLoopsKey)).isEqualTo(2)\n }\n}\n')),(0,r.kt)("h4",{id:"custom-reports"},(0,r.kt)("a",{name:"customreports"},"Custom Reports")),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"detekt")," allows you to extend the console output and to create custom output formats.\nIf you want to customize the output, take a look at the ",(0,r.kt)("inlineCode",{parentName:"p"},"ConsoleReport")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"OutputReport")," classes."),(0,r.kt)("p",null,"All they need are an implementation of the ",(0,r.kt)("inlineCode",{parentName:"p"},"render()"),"-function which takes an object with all findings and returns a string to be printed out."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-kotlin"},"abstract fun render(detektion: Detektion): String?\n")),(0,r.kt)("h4",{id:"let-detekt-know-about-your-extensions"},(0,r.kt)("a",{name:"configureextensions"},"Let detekt know about your extensions")),(0,r.kt)("p",null,"So you have implemented your own rules or other extensions and want to integrate them\ninto your ",(0,r.kt)("inlineCode",{parentName:"p"},"detekt")," run? Great, make sure to have a ",(0,r.kt)("inlineCode",{parentName:"p"},"jar")," with all your needed dependencies\nminus the ones ",(0,r.kt)("inlineCode",{parentName:"p"},"detekt")," brings itself."),(0,r.kt)("p",null,"Take a look at our ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/detekt/detekt/tree/main/detekt-sample-extensions"},"sample project")," on how to achieve this with gradle."),(0,r.kt)("h5",{id:"integrate-your-extension-with-the-detekt-cli"},"Integrate your extension with the detekt CLI"),(0,r.kt)("p",null,"Mention your ",(0,r.kt)("inlineCode",{parentName:"p"},"jar")," with the ",(0,r.kt)("inlineCode",{parentName:"p"},"--plugins")," flag when calling the cli fatjar:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"detekt --input ... --plugins /path/to/my/jar\n")),(0,r.kt)("h5",{id:"integrate-your-extension-with-the-detekt-gradle-plugin"},"Integrate your extension with the detekt gradle plugin"),(0,r.kt)("p",null,"For example ",(0,r.kt)("inlineCode",{parentName:"p"},"detekt")," itself provides a wrapper over ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/pinterest/ktlint"},"ktlint")," as a\ncustom ",(0,r.kt)("inlineCode",{parentName:"p"},"formatting")," rule set.\nTo enable it, we add the published dependency to ",(0,r.kt)("inlineCode",{parentName:"p"},"detekt")," via the ",(0,r.kt)("inlineCode",{parentName:"p"},"detektPlugins")," configuration:"),(0,r.kt)("h6",{id:"gradle-kotlingroovy-dsl"},"Gradle (Kotlin/Groovy DSL)"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-kotlin"},'dependencies {\n detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.21.0-RC1")\n}\n')),(0,r.kt)("h5",{id:"pitfalls"},"Pitfalls"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"All rules are disabled by default and have to be explicitly enabled in the ",(0,r.kt)("inlineCode",{parentName:"li"},"detekt")," yaml configuration file."),(0,r.kt)("li",{parentName:"ul"},"If you do not pass the ",(0,r.kt)("inlineCode",{parentName:"li"},"Config")," object from the ",(0,r.kt)("inlineCode",{parentName:"li"},"RuleSetProvider")," to the rule, the rule is active, but you will not be able to use\nany configuration options or disable the rule via config file."),(0,r.kt)("li",{parentName:"ul"},"If your extension is part of your project and you integrate it like ",(0,r.kt)("inlineCode",{parentName:"li"},'detektPlugins project(":my-rules")')," make sure that this\nsubproject is build before ",(0,r.kt)("inlineCode",{parentName:"li"},"gradle detekt")," is run.\nIn the ",(0,r.kt)("inlineCode",{parentName:"li"},"kotlin-dsl")," you could add something like ",(0,r.kt)("inlineCode",{parentName:"li"},'tasks.withType { dependsOn(":my-rules:assemble") }')," to explicitly run ",(0,r.kt)("inlineCode",{parentName:"li"},"detekt")," only\nafter your extension sub project is built."),(0,r.kt)("li",{parentName:"ul"},"If you use detekt for your Android project, and if you want to integrate all your custom rules in a new module, please make sure that\nyou created a pure kotlin module which has no Android dependencies. ",(0,r.kt)("inlineCode",{parentName:"li"},'apply plugin: "kotlin"')," is enough to make it work."),(0,r.kt)("li",{parentName:"ul"},"Sometimes when you run detekt task, you may not see the violations detected by your custom rules. In this case open a terminal and run\n",(0,r.kt)("inlineCode",{parentName:"li"},"./gradlew --stop")," to stop gradle daemons and run the task again.")),(0,r.kt)("h4",{id:"autocorrect-property"},"autoCorrect property"),(0,r.kt)("p",null,"In detekt you can write custom rules which can manipulate your code base.\nFor this a cli flag ",(0,r.kt)("inlineCode",{parentName:"p"},"--auto-correct")," and the gradle plugin property ",(0,r.kt)("inlineCode",{parentName:"p"},"autoCorrect")," exists.\nOnly write auto correcting code within the ",(0,r.kt)("inlineCode",{parentName:"p"},"Rule#withAutoCorrect()"),"-function."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/27346d8c.6d9e9078.js b/assets/js/27346d8c.6d9e9078.js new file mode 100644 index 000000000..fbb5620ed --- /dev/null +++ b/assets/js/27346d8c.6d9e9078.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdetekt_website=self.webpackChunkdetekt_website||[]).push([[6640],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return f}});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=u(n),f=a,h=p["".concat(s,".").concat(f)]||p[f]||d[f]||i;return n?r.createElement(h,o(o({ref:t},c),{},{components:n})):r.createElement(h,o({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=p;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:a,o[1]=l;for(var u=2;u=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),d=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=d(e.components);return a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=d(n),f=r,m=p["".concat(s,".").concat(f)]||p[f]||u[f]||i;return n?a.createElement(m,o(o({ref:t},c),{},{components:n})):a.createElement(m,o({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=p;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:r,o[1]=l;for(var d=2;d=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(n),g=a,m=p["".concat(l,".").concat(g)]||p[g]||d[g]||i;return n?r.createElement(m,o(o({ref:t},c),{},{components:n})):r.createElement(m,o({ref:t},c))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=p;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,o[1]=s;for(var u=2;u\n \n \n org.apache.maven.plugins\n maven-antrun-plugin\n 1.8\n \n \n \x3c!-- This can be run separately with mvn antrun:run@detekt --\x3e\n detekt\n verify\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n run\n \n \n \n \n io.gitlab.arturbosch.detekt\n detekt-cli\n 1.21.0-RC1\n \n \n \n \n\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a5e1ffa9.f5cc31e9.js b/assets/js/a5e1ffa9.f5cc31e9.js deleted file mode 100644 index ac8ff6f1c..000000000 --- a/assets/js/a5e1ffa9.f5cc31e9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdetekt_website=self.webpackChunkdetekt_website||[]).push([[9277],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return m}});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(n),m=a,g=p["".concat(l,".").concat(m)]||p[m]||d[m]||i;return n?r.createElement(g,o(o({ref:t},c),{},{components:n})):r.createElement(g,o({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=p;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,o[1]=s;for(var u=2;u\n \n \n org.apache.maven.plugins\n maven-antrun-plugin\n 1.8\n \n \n \x3c!-- This can be run separately with mvn antrun:run@detekt --\x3e\n detekt\n verify\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n run\n \n \n \n \n io.gitlab.arturbosch.detekt\n detekt-cli\n [detekt_version]\n \n \n \n \n\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ca539021.154cc3f6.js b/assets/js/ca539021.154cc3f6.js new file mode 100644 index 000000000..9f3d74f4b --- /dev/null +++ b/assets/js/ca539021.154cc3f6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdetekt_website=self.webpackChunkdetekt_website||[]).push([[4100],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return k}});var a=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),d=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},u=function(e){var t=d(e.components);return a.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=d(n),k=i,g=p["".concat(s,".").concat(k)]||p[k]||c[k]||l;return n?a.createElement(g,r(r({ref:t},u),{},{components:n})):a.createElement(g,r({ref:t},u))}));function k(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var l=n.length,r=new Array(l);r[0]=p;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o.mdxType="string"==typeof e?e:i,r[1]=o;for(var d=2;dAvailable plugin tasks',id:"available-plugin-tasks",level:2},{value:'Configuration',id:"configuration",level:3},{value:"Groovy DSL",id:"groovy-dsl",level:4},{value:"Kotlin DSL",id:"kotlin-dsl",level:4},{value:"Groovy DSL",id:"groovy-dsl-1",level:4},{value:"Kotlin DSL",id:"kotlin-dsl-1",level:4},{value:'Configuration for Android projects',id:"configuration-for-android-projects",level:3},{value:"Groovy DSL",id:"groovy-dsl-2",level:4},{value:"Kotlin DSL",id:"kotlin-dsl-2",level:4},{value:'Options for detekt configuration closure',id:"options-for-detekt-configuration-closure",level:3},{value:"Groovy DSL",id:"groovy-dsl-3",level:4},{value:"Kotlin DSL",id:"kotlin-dsl-3",level:4},{value:"Reports",id:"reports",level:3},{value:"Using Type Resolution",id:"using-type-resolution",level:3},{value:"Groovy DSL",id:"groovy-dsl-4",level:4},{value:"Kotlin DSL",id:"kotlin-dsl-4",level:4},{value:'Leveraging Gradle's SourceTask - Excluding and including source files',id:"leveraging-gradles-sourcetask---excluding-and-including-source-files",level:3},{value:"Groovy DSL",id:"groovy-dsl-5",level:4},{value:"Kotlin DSL",id:"kotlin-dsl-5",level:4},{value:'Defining custom detekt task',id:"defining-custom-detekt-task",level:3},{value:"Groovy DSL",id:"groovy-dsl-6",level:4},{value:"Kotlin DSL",id:"kotlin-dsl-6",level:4},{value:'Disabling detekt from the check task',id:"disabling-detekt-from-the-check-task",level:3},{value:"Groovy DSL",id:"groovy-dsl-7",level:4},{value:"Kotlin DSL",id:"kotlin-dsl-7",level:4},{value:'Integrating detekt inside your IntelliJ IDEA',id:"integrating-detekt-inside-your-intellij-idea",level:2}],p={toc:c};function k(e){var t=e.components,n=(0,i.Z)(e,r);return(0,l.kt)("wrapper",(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Detekt requires ",(0,l.kt)("strong",{parentName:"p"},"Gradle 6.1")," or higher. We, however, recommend using the version of Gradle that is ",(0,l.kt)("a",{parentName:"p",href:"/docs/introduction/compatibility"},"listed in this table"),"."),(0,l.kt)("h2",{id:"available-plugin-tasks"},(0,l.kt)("a",{name:"tasks"},"Available plugin tasks")),(0,l.kt)("p",null,"The detekt Gradle plugin will generate multiple tasks:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"detekt")," - Runs a detekt analysis and complexity report on your source files. Configure the analysis inside the\n",(0,l.kt)("inlineCode",{parentName:"li"},"detekt")," closure. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"By default, the standard rule set without any ignore list is executed on sources files located\nin ",(0,l.kt)("inlineCode",{parentName:"li"},"src/main/java"),", ",(0,l.kt)("inlineCode",{parentName:"li"},"src/test/java"),", ",(0,l.kt)("inlineCode",{parentName:"li"},"src/main/kotlin")," and ",(0,l.kt)("inlineCode",{parentName:"li"},"src/test/kotlin"),"."),(0,l.kt)("li",{parentName:"ul"},"Reports are automatically generated in xml,\nhtml, txt, md, and sarif format and can be found in ",(0,l.kt)("inlineCode",{parentName:"li"},"build/reports/detekt/detekt.[xml|html|txt|md|sarif]")," respectively."),(0,l.kt)("li",{parentName:"ul"},"Please note that the ",(0,l.kt)("inlineCode",{parentName:"li"},"detekt")," task is automatically run when executing ",(0,l.kt)("inlineCode",{parentName:"li"},"gradle check"),"."),(0,l.kt)("li",{parentName:"ul"},"You may specify Gradle task CLI option for auto correction, such as ",(0,l.kt)("inlineCode",{parentName:"li"},"gradle detekt --auto-correct"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"detektGenerateConfig")," - Generates a default detekt configuration file into your project directory."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"detektBaseline")," - Similar to ",(0,l.kt)("inlineCode",{parentName:"li"},"detekt"),", but creates a code smell baseline. Further detekt runs will only feature new smells not in this list.")),(0,l.kt)("p",null,"In addition to these standard tasks, the plugin will also generate a set of experimental tasks that have\n",(0,l.kt)("a",{parentName:"p",href:"/docs/gettingstarted/type-resolution"},"type resolution")," enabled. This happens for both, pure JVM projects and Android projects that have\nthe Android Gradle Plugin applied:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"detektMain")," - Similar to ",(0,l.kt)("inlineCode",{parentName:"li"},"detekt"),", but runs only on the ",(0,l.kt)("inlineCode",{parentName:"li"},"main")," source set\n(Android: all production source sets)"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"detektTest")," - Similar to ",(0,l.kt)("inlineCode",{parentName:"li"},"detekt"),", but runs only on the ",(0,l.kt)("inlineCode",{parentName:"li"},"test")," source set\n(Android: all JVM and Android Test source sets)"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"detektBaselineMain")," - Similar to ",(0,l.kt)("inlineCode",{parentName:"li"},"detektBaseline"),", but creates a baseline only for the ",(0,l.kt)("inlineCode",{parentName:"li"},"main")," source set\n(Android: multiple baselines for all production source sets)"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"detektBaselineTest")," - Similar to ",(0,l.kt)("inlineCode",{parentName:"li"},"detektBaseline"),", but creates a baseline only for the ",(0,l.kt)("inlineCode",{parentName:"li"},"test")," source set\n(Android: multiple baselines for all JVM and Android Test source sets)"),(0,l.kt)("li",{parentName:"ul"},"Android-only: ",(0,l.kt)("inlineCode",{parentName:"li"},"detekt")," - Similar to ",(0,l.kt)("inlineCode",{parentName:"li"},"detekt"),", but runs only on the specific (test) build variant"),(0,l.kt)("li",{parentName:"ul"},"Android-only: ",(0,l.kt)("inlineCode",{parentName:"li"},"detektBaseline")," - Similar to ",(0,l.kt)("inlineCode",{parentName:"li"},"detektBaseline"),", but creates a baseline only for the\nspecific (test) build variant")),(0,l.kt)("p",null,"Baseline files that are generated for these specific source sets / build variants contain the name of the source set /\nthe name of the build variant in their name, unless otherwise configured, such as ",(0,l.kt)("inlineCode",{parentName:"p"},"detekt-main.xml")," or\n",(0,l.kt)("inlineCode",{parentName:"p"},"detekt-productionDebug.xml"),"."),(0,l.kt)("p",null,"If both, a ",(0,l.kt)("inlineCode",{parentName:"p"},"detekt-main.xml")," and a ",(0,l.kt)("inlineCode",{parentName:"p"},"detekt.xml")," baseline file exists in place, the more specific one - ",(0,l.kt)("inlineCode",{parentName:"p"},"detekt-main.xml")," -\ntakes precedence when the ",(0,l.kt)("inlineCode",{parentName:"p"},"detektMain")," task is executed, likewise for Android variant-specific baseline files."),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"NOTE:")," When analyzing Android projects that make use of specific code generators, such as Data Binding, Kotlin synthetic\nview accessors or else, you might see warnings output while Detekt runs. This is due to the inability to gather the\ncomplete compile classpath from the Android Gradle Plugin (",(0,l.kt)("a",{parentName:"p",href:"https://issuetracker.google.com/issues/158777988"},"upstream ticket"),")\nand can safely be ignored."),(0,l.kt)("p",null,"Use the Groovy or Kotlin DSL of Gradle to apply the detekt Gradle Plugin. You can further configure the Plugin\nusing the detekt closure as described ",(0,l.kt)("a",{parentName:"p",href:"#closure"},"here"),"."),(0,l.kt)("h3",{id:"configuration"},(0,l.kt)("a",{name:"gradle"},"Configuration")),(0,l.kt)("p",null,"Using the plugins DSL:"),(0,l.kt)("h4",{id:"groovy-dsl"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'plugins {\n id "io.gitlab.arturbosch.detekt" version "1.21.0-RC1"\n}\n\nrepositories {\n mavenCentral()\n}\n')),(0,l.kt)("h4",{id:"kotlin-dsl"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'plugins {\n id("io.gitlab.arturbosch.detekt").version("1.21.0-RC1")\n}\n\nrepositories {\n mavenCentral()\n}\n')),(0,l.kt)("p",null,"Using legacy plugin application (",(0,l.kt)("inlineCode",{parentName:"p"},"buildscript{}"),"):"),(0,l.kt)("h4",{id:"groovy-dsl-1"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'buildscript {\n repositories {\n gradlePluginPortal()\n }\n dependencies {\n classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.21.0-RC1"\n }\n}\n\napply plugin: "io.gitlab.arturbosch.detekt"\n\nrepositories {\n mavenCentral()\n}\n')),(0,l.kt)("h4",{id:"kotlin-dsl-1"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'buildscript {\n repositories {\n gradlePluginPortal()\n }\n dependencies {\n classpath("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.21.0-RC1")\n }\n}\n\napply(plugin = "io.gitlab.arturbosch.detekt")\n\nrepositories {\n mavenCentral()\n}\n')),(0,l.kt)("h3",{id:"configuration-for-android-projects"},(0,l.kt)("a",{name:"gradleandroid"},"Configuration for Android projects")),(0,l.kt)("p",null,"When using Android make sure to have detekt configured in the app/module level ",(0,l.kt)("inlineCode",{parentName:"p"},"build.gradle")," file."),(0,l.kt)("p",null,"You can configure the plugin in the same way as indicated above."),(0,l.kt)("h4",{id:"groovy-dsl-2"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'buildscript {\n repositories {\n google()\n mavenCentral()\n gradlePluginPortal()\n }\n dependencies {\n classpath "com.android.tools.build:gradle:"\n }\n}\n\nplugins {\n id "com.android.application"\n id "org.jetbrains.kotlin.android" version ""\n id "io.gitlab.arturbosch.detekt" version "1.21.0-RC1"\n}\n\nrepositories {\n mavenCentral()\n}\n')),(0,l.kt)("h4",{id:"kotlin-dsl-2"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'buildscript {\n repositories {\n google()\n mavenCentral()\n gradlePluginPortal()\n }\n dependencies {\n classpath("com.android.tools.build:gradle:")\n }\n}\n\nplugins {\n id("com.android.application")\n kotlin("android") version ""\n id("io.gitlab.arturbosch.detekt") version "1.21.0-RC1"\n}\n\nrepositories {\n mavenCentral()\n}\n')),(0,l.kt)("h3",{id:"options-for-detekt-configuration-closure"},(0,l.kt)("a",{name:"closure"},"Options for detekt configuration closure")),(0,l.kt)("h4",{id:"groovy-dsl-3"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'detekt {\n // Version of Detekt that will be used. When unspecified the latest detekt\n // version found will be used. Override to stay on the same version.\n toolVersion = "1.21.0-RC1"\n \n // The directories where detekt looks for source files. \n // Defaults to `files("src/main/java", "src/test/java", "src/main/kotlin", "src/test/kotlin")`.\n source = files(\n "src/main/kotlin",\n "gensrc/main/kotlin"\n )\n \n // Builds the AST in parallel. Rules are always executed in parallel. \n // Can lead to speedups in larger projects. `false` by default.\n parallel = false\n \n // Define the detekt configuration(s) you want to use. \n // Defaults to the default detekt configuration.\n config = files("path/to/config.yml")\n \n // Applies the config files on top of detekt\'s default config file. `false` by default.\n buildUponDefaultConfig = false\n \n // Turns on all the rules. `false` by default.\n allRules = false\n \n // Specifying a baseline file. All findings stored in this file in subsequent runs of detekt.\n baseline = file("path/to/baseline.xml")\n \n // Disables all default detekt rulesets and will only run detekt with custom rules\n // defined in plugins passed in with `detektPlugins` configuration. `false` by default.\n disableDefaultRuleSets = false\n \n // Adds debug output during task execution. `false` by default.\n debug = false \n \n // If set to `true` the build does not fail when the\n // maxIssues count was reached. Defaults to `false`.\n ignoreFailures = false\n \n // Android: Don\'t create tasks for the specified build types (e.g. "release")\n ignoredBuildTypes = ["release"]\n \n // Android: Don\'t create tasks for the specified build flavor (e.g. "production")\n ignoredFlavors = ["production"]\n \n // Android: Don\'t create tasks for the specified build variants (e.g. "productionRelease")\n ignoredVariants = ["productionRelease"]\n \n // Specify the base path for file paths in the formatted reports. \n // If not set, all file paths reported will be absolute file path.\n basePath = projectDir\n}\n')),(0,l.kt)("h4",{id:"kotlin-dsl-3"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'detekt {\n // Version of Detekt that will be used. When unspecified the latest detekt\n // version found will be used. Override to stay on the same version.\n toolVersion = "1.21.0-RC1"\n \n // The directories where detekt looks for source files. \n // Defaults to `files("src/main/java", "src/test/java", "src/main/kotlin", "src/test/kotlin")`.\n source = files("src/main/java", "src/main/kotlin") \n \n // Builds the AST in parallel. Rules are always executed in parallel. \n // Can lead to speedups in larger projects. `false` by default.\n parallel = false\n \n // Define the detekt configuration(s) you want to use. \n // Defaults to the default detekt configuration.\n config = files("path/to/config.yml")\n \n // Applies the config files on top of detekt\'s default config file. `false` by default.\n buildUponDefaultConfig = false\n \n // Turns on all the rules. `false` by default.\n allRules = false\n \n // Specifying a baseline file. All findings stored in this file in subsequent runs of detekt.\n baseline = file("path/to/baseline.xml")\n \n // Disables all default detekt rulesets and will only run detekt with custom rules\n // defined in plugins passed in with `detektPlugins` configuration. `false` by default.\n disableDefaultRuleSets = false\n \n // Adds debug output during task execution. `false` by default.\n debug = false \n \n // If set to `true` the build does not fail when the\n // maxIssues count was reached. Defaults to `false`.\n ignoreFailures = false\n \n // Android: Don\'t create tasks for the specified build types (e.g. "release")\n ignoredBuildTypes = listOf("release")\n \n // Android: Don\'t create tasks for the specified build flavor (e.g. "production")\n ignoredFlavors = listOf("production")\n \n // Android: Don\'t create tasks for the specified build variants (e.g. "productionRelease")\n ignoredVariants = listOf("productionRelease")\n \n // Specify the base path for file paths in the formatted reports. \n // If not set, all file paths reported will be absolute file path.\n basePath = projectDir\n}\n')),(0,l.kt)("h3",{id:"reports"},"Reports"),(0,l.kt)("p",null,"Report output can be customized for each task. The DSL is the same in both Groovy and Kotlin:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'tasks.named("detekt").configure {\n reports {\n // Enable/Disable XML report (default: true)\n xml.required.set(true)\n xml.outputLocation.set(file("build/reports/detekt.xml"))\n // Enable/Disable HTML report (default: true)\n html.required.set(true)\n html.outputLocation.set(file("build/reports/detekt.html"))\n // Enable/Disable TXT report (default: true)\n txt.required.set(true)\n txt.outputLocation.set(file("build/reports/detekt.txt"))\n // Enable/Disable SARIF report (default: false)\n sarif.required.set(true)\n sarif.outputLocation.set(file("build/reports/detekt.sarif"))\n // Enable/Disable MD report (default: false)\n md.required.set(true)\n md.outputLocation.set(file("build/reports/detekt.md"))\n custom {\n // The simple class name of your custom report.\n reportId = "CustomJsonReport"\n outputLocation.set(file("build/reports/detekt.json"))\n }\n }\n}\n')),(0,l.kt)("h3",{id:"using-type-resolution"},"Using Type Resolution"),(0,l.kt)("p",null,"Type resolution is experimental and works only for ",(0,l.kt)("a",{parentName:"p",href:"#a-nametasksavailable-plugin-tasksa"},"predefined tasks listed above"),"\nor when implementing a custom detekt task with the ",(0,l.kt)("inlineCode",{parentName:"p"},"classpath")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"jvmTarget")," properties present."),(0,l.kt)("p",null,"More information on type resolution are available on the ",(0,l.kt)("a",{parentName:"p",href:"/docs/gettingstarted/type-resolution"},"type resolution")," page."),(0,l.kt)("h4",{id:"groovy-dsl-4"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'tasks.withType(io.gitlab.arturbosch.detekt.Detekt).configureEach {\n jvmTarget = "1.8"\n}\ntasks.withType(io.gitlab.arturbosch.detekt.DetektCreateBaselineTask).configureEach {\n jvmTarget = "1.8"\n}\n')),(0,l.kt)("h4",{id:"kotlin-dsl-4"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'tasks.withType().configureEach {\n this.jvmTarget = "1.8"\n}\ntasks.withType().configureEach {\n this.jvmTarget = "1.8"\n}\n')),(0,l.kt)("h3",{id:"leveraging-gradles-sourcetask---excluding-and-including-source-files"},(0,l.kt)("a",{name:"excluding"},"Leveraging Gradle's SourceTask - Excluding and including source files")),(0,l.kt)("p",null,"A detekt task extends the Gradle ",(0,l.kt)("inlineCode",{parentName:"p"},"SourceTask")," to be only scheduled when watched source files are changed.\nIt also allows to match files that should be excluded from the analysis.\nTo do this introduce a query on detekt tasks and define include and exclude patterns outside the detekt closure:"),(0,l.kt)("h4",{id:"groovy-dsl-5"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'detekt {\n ...\n}\n\ntasks.withType(io.gitlab.arturbosch.detekt.Detekt).configureEach {\n // include("**/special/package/**") // only analyze a sub package inside src/main/kotlin\n exclude("**/special/package/internal/**") // but exclude our legacy internal package\n}\n\ntasks.withType(io.gitlab.arturbosch.detekt.DetektCreateBaselineTask).configureEach {\n // include("**/special/package/**") // only analyze a sub package inside src/main/kotlin\n exclude("**/special/package/internal/**") // but exclude our legacy internal package\n}\n')),(0,l.kt)("h4",{id:"kotlin-dsl-5"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'detekt {\n ...\n}\n\ntasks.withType().configureEach {\n // include("**/special/package/**") // only analyze a sub package inside src/main/kotlin\n exclude("**/special/package/internal/**") // but exclude our legacy internal package\n}\n\ntasks.withType().configureEach {\n // include("**/special/package/**") // only analyze a sub package inside src/main/kotlin\n exclude("**/special/package/internal/**") // but exclude our legacy internal package\n}\n')),(0,l.kt)("h3",{id:"defining-custom-detekt-task"},(0,l.kt)("a",{name:"customdetekttask"},"Defining custom detekt task")),(0,l.kt)("p",null,"Custom tasks for alternative configurations or different source sets can be defined by creating a custom task that\nuses the type ",(0,l.kt)("inlineCode",{parentName:"p"},"Detekt"),"."),(0,l.kt)("h4",{id:"groovy-dsl-6"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'tasks.register(name: myDetekt, type: io.gitlab.arturbosch.detekt.Detekt) {\n description = "Runs a custom detekt build."\n setSource(files("src/main/kotlin", "src/test/kotlin"))\n config.setFrom(files("$rootDir/config.yml"))\n debug = true\n reports {\n xml {\n destination = file("build/reports/mydetekt.xml")\n }\n html.destination = file("build/reports/mydetekt.html")\n }\n include \'**/*.kt\'\n include \'**/*.kts\'\n exclude \'resources/\'\n exclude \'build/\'\n}\n')),(0,l.kt)("h4",{id:"kotlin-dsl-6"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'tasks.register("myDetekt") {\n description = "Runs a custom detekt build."\n setSource(files("src/main/kotlin", "src/test/kotlin"))\n config.setFrom(files("$rootDir/config.yml"))\n debug = true\n reports {\n xml {\n destination = file("build/reports/mydetekt.xml")\n }\n html.destination = file("build/reports/mydetekt.html")\n }\n include("**/*.kt")\n include("**/*.kts")\n exclude("resources/")\n exclude("build/")\n}\n')),(0,l.kt)("h3",{id:"disabling-detekt-from-the-check-task"},(0,l.kt)("a",{name:"check-lifecycle"},"Disabling detekt from the check task")),(0,l.kt)("p",null,"Detekt tasks by default are verification tasks. They get executed whenever the Gradle check task gets executed.\nThis aligns with the behavior of other code analysis plugins for Gradle."),(0,l.kt)("p",null,"If you are adding detekt to an already long running project you may want to increase the code quality incrementally and therefore\nexclude detekt from the check task."),(0,l.kt)("h4",{id:"groovy-dsl-7"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},"check.configure {\n dependsOn = dependsOn.findAll { it.name != 'detekt' }\n}\n")),(0,l.kt)("h4",{id:"kotlin-dsl-7"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'tasks.named("check").configure {\n this.setDependsOn(this.dependsOn.filterNot {\n it is TaskProvider<*> && it.name == "detekt"\n })\n}\n')),(0,l.kt)("p",null,"Instead of disabling detekt for the check task, you may want to increase the build failure threshold in the ",(0,l.kt)("a",{parentName:"p",href:"/docs/introduction/configurations"},"configuration file"),"."),(0,l.kt)("h2",{id:"integrating-detekt-inside-your-intellij-idea"},(0,l.kt)("a",{name:"idea"},"Integrating detekt inside your IntelliJ IDEA")),(0,l.kt)("p",null,"detekt comes with an ",(0,l.kt)("a",{parentName:"p",href:"https://plugins.jetbrains.com/plugin/10761-detekt"},"IntelliJ Plugin")," that you can install directly from the IDE. The plugin offers warning highlight directly inside the IDE as well as support for code formatting."),(0,l.kt)("p",null,"The source code of the plugin is available here: ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/detekt/detekt-intellij-plugin"},"detekt/detekt-intellij-plugin")))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ca539021.de7485f7.js b/assets/js/ca539021.de7485f7.js deleted file mode 100644 index 56a4bb267..000000000 --- a/assets/js/ca539021.de7485f7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdetekt_website=self.webpackChunkdetekt_website||[]).push([[4100],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return k}});var i=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function r(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=i.createContext({}),d=function(e){var t=i.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},u=function(e){var t=d(e.components);return i.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},p=i.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=d(n),k=a,g=p["".concat(s,".").concat(k)]||p[k]||c[k]||l;return n?i.createElement(g,r(r({ref:t},u),{},{components:n})):i.createElement(g,r({ref:t},u))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,r=new Array(l);r[0]=p;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o.mdxType="string"==typeof e?e:a,r[1]=o;for(var d=2;dAvailable plugin tasks',id:"available-plugin-tasks",level:2},{value:'Configuration',id:"configuration",level:3},{value:"Groovy DSL",id:"groovy-dsl",level:4},{value:"Kotlin DSL",id:"kotlin-dsl",level:4},{value:"Groovy DSL",id:"groovy-dsl-1",level:4},{value:"Kotlin DSL",id:"kotlin-dsl-1",level:4},{value:'Configuration for Android projects',id:"configuration-for-android-projects",level:3},{value:"Groovy DSL",id:"groovy-dsl-2",level:4},{value:"Kotlin DSL",id:"kotlin-dsl-2",level:4},{value:'Options for detekt configuration closure',id:"options-for-detekt-configuration-closure",level:3},{value:"Groovy DSL",id:"groovy-dsl-3",level:4},{value:"Kotlin DSL",id:"kotlin-dsl-3",level:4},{value:"Reports",id:"reports",level:3},{value:"Using Type Resolution",id:"using-type-resolution",level:3},{value:"Groovy DSL",id:"groovy-dsl-4",level:4},{value:"Kotlin DSL",id:"kotlin-dsl-4",level:4},{value:'Leveraging Gradle's SourceTask - Excluding and including source files',id:"leveraging-gradles-sourcetask---excluding-and-including-source-files",level:3},{value:"Groovy DSL",id:"groovy-dsl-5",level:4},{value:"Kotlin DSL",id:"kotlin-dsl-5",level:4},{value:'Defining custom detekt task',id:"defining-custom-detekt-task",level:3},{value:"Groovy DSL",id:"groovy-dsl-6",level:4},{value:"Kotlin DSL",id:"kotlin-dsl-6",level:4},{value:'Disabling detekt from the check task',id:"disabling-detekt-from-the-check-task",level:3},{value:"Groovy DSL",id:"groovy-dsl-7",level:4},{value:"Kotlin DSL",id:"kotlin-dsl-7",level:4},{value:'Integrating detekt inside your IntelliJ IDEA',id:"integrating-detekt-inside-your-intellij-idea",level:2}],k={toc:p};function g(e){var t=e.components,n=(0,a.Z)(e,o);return(0,l.kt)("wrapper",(0,i.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Detekt requires ",(0,l.kt)("strong",{parentName:"p"},"Gradle 6.1")," or higher. We, however, recommend using the version of Gradle that is ",(0,l.kt)("a",{parentName:"p",href:"/docs/introduction/compatibility"},"listed in this table"),"."),(0,l.kt)("h2",{id:"available-plugin-tasks"},(0,l.kt)("a",{name:"tasks"},"Available plugin tasks")),(0,l.kt)("p",null,"The detekt Gradle plugin will generate multiple tasks:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"detekt")," - Runs a detekt analysis and complexity report on your source files. Configure the analysis inside the\n",(0,l.kt)("inlineCode",{parentName:"li"},"detekt")," closure. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"By default, the standard rule set without any ignore list is executed on sources files located\nin ",(0,l.kt)("inlineCode",{parentName:"li"},"src/main/java"),", ",(0,l.kt)("inlineCode",{parentName:"li"},"src/test/java"),", ",(0,l.kt)("inlineCode",{parentName:"li"},"src/main/kotlin")," and ",(0,l.kt)("inlineCode",{parentName:"li"},"src/test/kotlin"),"."),(0,l.kt)("li",{parentName:"ul"},"Reports are automatically generated in xml,\nhtml, txt, md, and sarif format and can be found in ",(0,l.kt)("inlineCode",{parentName:"li"},"build/reports/detekt/detekt.[xml|html|txt|md|sarif]")," respectively."),(0,l.kt)("li",{parentName:"ul"},"Please note that the ",(0,l.kt)("inlineCode",{parentName:"li"},"detekt")," task is automatically run when executing ",(0,l.kt)("inlineCode",{parentName:"li"},"gradle check"),"."),(0,l.kt)("li",{parentName:"ul"},"You may specify Gradle task CLI option for auto correction, such as ",(0,l.kt)("inlineCode",{parentName:"li"},"gradle detekt --auto-correct"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"detektGenerateConfig")," - Generates a default detekt configuration file into your project directory."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"detektBaseline")," - Similar to ",(0,l.kt)("inlineCode",{parentName:"li"},"detekt"),", but creates a code smell baseline. Further detekt runs will only feature new smells not in this list.")),(0,l.kt)("p",null,"In addition to these standard tasks, the plugin will also generate a set of experimental tasks that have\n",(0,l.kt)("a",{parentName:"p",href:"/docs/gettingstarted/type-resolution"},"type resolution")," enabled. This happens for both, pure JVM projects and Android projects that have\nthe Android Gradle Plugin applied:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"detektMain")," - Similar to ",(0,l.kt)("inlineCode",{parentName:"li"},"detekt"),", but runs only on the ",(0,l.kt)("inlineCode",{parentName:"li"},"main")," source set\n(Android: all production source sets)"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"detektTest")," - Similar to ",(0,l.kt)("inlineCode",{parentName:"li"},"detekt"),", but runs only on the ",(0,l.kt)("inlineCode",{parentName:"li"},"test")," source set\n(Android: all JVM and Android Test source sets)"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"detektBaselineMain")," - Similar to ",(0,l.kt)("inlineCode",{parentName:"li"},"detektBaseline"),", but creates a baseline only for the ",(0,l.kt)("inlineCode",{parentName:"li"},"main")," source set\n(Android: multiple baselines for all production source sets)"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"detektBaselineTest")," - Similar to ",(0,l.kt)("inlineCode",{parentName:"li"},"detektBaseline"),", but creates a baseline only for the ",(0,l.kt)("inlineCode",{parentName:"li"},"test")," source set\n(Android: multiple baselines for all JVM and Android Test source sets)"),(0,l.kt)("li",{parentName:"ul"},"Android-only: ",(0,l.kt)("inlineCode",{parentName:"li"},"detekt")," - Similar to ",(0,l.kt)("inlineCode",{parentName:"li"},"detekt"),", but runs only on the specific (test) build variant"),(0,l.kt)("li",{parentName:"ul"},"Android-only: ",(0,l.kt)("inlineCode",{parentName:"li"},"detektBaseline")," - Similar to ",(0,l.kt)("inlineCode",{parentName:"li"},"detektBaseline"),", but creates a baseline only for the\nspecific (test) build variant")),(0,l.kt)("p",null,"Baseline files that are generated for these specific source sets / build variants contain the name of the source set /\nthe name of the build variant in their name, unless otherwise configured, such as ",(0,l.kt)("inlineCode",{parentName:"p"},"detekt-main.xml")," or\n",(0,l.kt)("inlineCode",{parentName:"p"},"detekt-productionDebug.xml"),"."),(0,l.kt)("p",null,"If both, a ",(0,l.kt)("inlineCode",{parentName:"p"},"detekt-main.xml")," and a ",(0,l.kt)("inlineCode",{parentName:"p"},"detekt.xml")," baseline file exists in place, the more specific one - ",(0,l.kt)("inlineCode",{parentName:"p"},"detekt-main.xml")," -\ntakes precedence when the ",(0,l.kt)("inlineCode",{parentName:"p"},"detektMain")," task is executed, likewise for Android variant-specific baseline files."),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"NOTE:")," When analyzing Android projects that make use of specific code generators, such as Data Binding, Kotlin synthetic\nview accessors or else, you might see warnings output while Detekt runs. This is due to the inability to gather the\ncomplete compile classpath from the Android Gradle Plugin (",(0,l.kt)("a",{parentName:"p",href:"https://issuetracker.google.com/issues/158777988"},"upstream ticket"),")\nand can safely be ignored."),(0,l.kt)("p",null,"Use the Groovy or Kotlin DSL of Gradle to apply the detekt Gradle Plugin. You can further configure the Plugin\nusing the detekt closure as described ",(0,l.kt)("a",{parentName:"p",href:"#closure"},"here"),"."),(0,l.kt)("h3",{id:"configuration"},(0,l.kt)("a",{name:"gradle"},"Configuration")),(0,l.kt)("p",null,"Using the plugins DSL:"),(0,l.kt)("h4",{id:"groovy-dsl"},"Groovy DSL"),(0,l.kt)(r.ZP,{mdxType:"DetektVersionBanner"}),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'plugins {\n id "io.gitlab.arturbosch.detekt" version "[detekt_version]"\n}\n\nrepositories {\n mavenCentral()\n}\n')),(0,l.kt)("h4",{id:"kotlin-dsl"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'plugins {\n id("io.gitlab.arturbosch.detekt").version("[detekt_version]")\n}\n\nrepositories {\n mavenCentral()\n}\n')),(0,l.kt)("p",null,"Using legacy plugin application (",(0,l.kt)("inlineCode",{parentName:"p"},"buildscript{}"),"):"),(0,l.kt)("h4",{id:"groovy-dsl-1"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'buildscript {\n repositories {\n gradlePluginPortal()\n }\n dependencies {\n classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:[detekt_version]"\n }\n}\n\napply plugin: "io.gitlab.arturbosch.detekt"\n\nrepositories {\n mavenCentral()\n}\n')),(0,l.kt)("h4",{id:"kotlin-dsl-1"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'buildscript {\n repositories {\n gradlePluginPortal()\n }\n dependencies {\n classpath("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:[detekt_version]")\n }\n}\n\napply(plugin = "io.gitlab.arturbosch.detekt")\n\nrepositories {\n mavenCentral()\n}\n')),(0,l.kt)("h3",{id:"configuration-for-android-projects"},(0,l.kt)("a",{name:"gradleandroid"},"Configuration for Android projects")),(0,l.kt)("p",null,"When using Android make sure to have detekt configured in the app/module level ",(0,l.kt)("inlineCode",{parentName:"p"},"build.gradle")," file."),(0,l.kt)("p",null,"You can configure the plugin in the same way as indicated above."),(0,l.kt)("h4",{id:"groovy-dsl-2"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'buildscript {\n repositories {\n google()\n mavenCentral()\n gradlePluginPortal()\n }\n dependencies {\n classpath "com.android.tools.build:gradle:"\n }\n}\n\nplugins {\n id "com.android.application"\n id "org.jetbrains.kotlin.android" version ""\n id "io.gitlab.arturbosch.detekt" version "[detekt_version]"\n}\n\nrepositories {\n mavenCentral()\n}\n')),(0,l.kt)("h4",{id:"kotlin-dsl-2"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'buildscript {\n repositories {\n google()\n mavenCentral()\n gradlePluginPortal()\n }\n dependencies {\n classpath("com.android.tools.build:gradle:")\n }\n}\n\nplugins {\n id("com.android.application")\n kotlin("android") version ""\n id("io.gitlab.arturbosch.detekt") version "[detekt_version]"\n}\n\nrepositories {\n mavenCentral()\n}\n')),(0,l.kt)("h3",{id:"options-for-detekt-configuration-closure"},(0,l.kt)("a",{name:"closure"},"Options for detekt configuration closure")),(0,l.kt)("h4",{id:"groovy-dsl-3"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'detekt {\n // Version of Detekt that will be used. When unspecified the latest detekt\n // version found will be used. Override to stay on the same version.\n toolVersion = "[detekt_version]"\n \n // The directories where detekt looks for source files. \n // Defaults to `files("src/main/java", "src/test/java", "src/main/kotlin", "src/test/kotlin")`.\n source = files(\n "src/main/kotlin",\n "gensrc/main/kotlin"\n )\n \n // Builds the AST in parallel. Rules are always executed in parallel. \n // Can lead to speedups in larger projects. `false` by default.\n parallel = false\n \n // Define the detekt configuration(s) you want to use. \n // Defaults to the default detekt configuration.\n config = files("path/to/config.yml")\n \n // Applies the config files on top of detekt\'s default config file. `false` by default.\n buildUponDefaultConfig = false\n \n // Turns on all the rules. `false` by default.\n allRules = false\n \n // Specifying a baseline file. All findings stored in this file in subsequent runs of detekt.\n baseline = file("path/to/baseline.xml")\n \n // Disables all default detekt rulesets and will only run detekt with custom rules\n // defined in plugins passed in with `detektPlugins` configuration. `false` by default.\n disableDefaultRuleSets = false\n \n // Adds debug output during task execution. `false` by default.\n debug = false \n \n // If set to `true` the build does not fail when the\n // maxIssues count was reached. Defaults to `false`.\n ignoreFailures = false\n \n // Android: Don\'t create tasks for the specified build types (e.g. "release")\n ignoredBuildTypes = ["release"]\n \n // Android: Don\'t create tasks for the specified build flavor (e.g. "production")\n ignoredFlavors = ["production"]\n \n // Android: Don\'t create tasks for the specified build variants (e.g. "productionRelease")\n ignoredVariants = ["productionRelease"]\n \n // Specify the base path for file paths in the formatted reports. \n // If not set, all file paths reported will be absolute file path.\n basePath = projectDir\n}\n')),(0,l.kt)("h4",{id:"kotlin-dsl-3"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'detekt {\n // Version of Detekt that will be used. When unspecified the latest detekt\n // version found will be used. Override to stay on the same version.\n toolVersion = "[detekt_version]"\n \n // The directories where detekt looks for source files. \n // Defaults to `files("src/main/java", "src/test/java", "src/main/kotlin", "src/test/kotlin")`.\n source = files("src/main/java", "src/main/kotlin") \n \n // Builds the AST in parallel. Rules are always executed in parallel. \n // Can lead to speedups in larger projects. `false` by default.\n parallel = false\n \n // Define the detekt configuration(s) you want to use. \n // Defaults to the default detekt configuration.\n config = files("path/to/config.yml")\n \n // Applies the config files on top of detekt\'s default config file. `false` by default.\n buildUponDefaultConfig = false\n \n // Turns on all the rules. `false` by default.\n allRules = false\n \n // Specifying a baseline file. All findings stored in this file in subsequent runs of detekt.\n baseline = file("path/to/baseline.xml")\n \n // Disables all default detekt rulesets and will only run detekt with custom rules\n // defined in plugins passed in with `detektPlugins` configuration. `false` by default.\n disableDefaultRuleSets = false\n \n // Adds debug output during task execution. `false` by default.\n debug = false \n \n // If set to `true` the build does not fail when the\n // maxIssues count was reached. Defaults to `false`.\n ignoreFailures = false\n \n // Android: Don\'t create tasks for the specified build types (e.g. "release")\n ignoredBuildTypes = listOf("release")\n \n // Android: Don\'t create tasks for the specified build flavor (e.g. "production")\n ignoredFlavors = listOf("production")\n \n // Android: Don\'t create tasks for the specified build variants (e.g. "productionRelease")\n ignoredVariants = listOf("productionRelease")\n \n // Specify the base path for file paths in the formatted reports. \n // If not set, all file paths reported will be absolute file path.\n basePath = projectDir\n}\n')),(0,l.kt)("h3",{id:"reports"},"Reports"),(0,l.kt)("p",null,"Report output can be customized for each task. The DSL is the same in both Groovy and Kotlin:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'tasks.named("detekt").configure {\n reports {\n // Enable/Disable XML report (default: true)\n xml.required.set(true)\n xml.outputLocation.set(file("build/reports/detekt.xml"))\n // Enable/Disable HTML report (default: true)\n html.required.set(true)\n html.outputLocation.set(file("build/reports/detekt.html"))\n // Enable/Disable TXT report (default: true)\n txt.required.set(true)\n txt.outputLocation.set(file("build/reports/detekt.txt"))\n // Enable/Disable SARIF report (default: false)\n sarif.required.set(true)\n sarif.outputLocation.set(file("build/reports/detekt.sarif"))\n // Enable/Disable MD report (default: false)\n md.required.set(true)\n md.outputLocation.set(file("build/reports/detekt.md"))\n custom {\n // The simple class name of your custom report.\n reportId = "CustomJsonReport"\n outputLocation.set(file("build/reports/detekt.json"))\n }\n }\n}\n')),(0,l.kt)("h3",{id:"using-type-resolution"},"Using Type Resolution"),(0,l.kt)("p",null,"Type resolution is experimental and works only for ",(0,l.kt)("a",{parentName:"p",href:"#a-nametasksavailable-plugin-tasksa"},"predefined tasks listed above"),"\nor when implementing a custom detekt task with the ",(0,l.kt)("inlineCode",{parentName:"p"},"classpath")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"jvmTarget")," properties present."),(0,l.kt)("p",null,"More information on type resolution are available on the ",(0,l.kt)("a",{parentName:"p",href:"/docs/gettingstarted/type-resolution"},"type resolution")," page."),(0,l.kt)("h4",{id:"groovy-dsl-4"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'tasks.withType(io.gitlab.arturbosch.detekt.Detekt).configureEach {\n jvmTarget = "1.8"\n}\ntasks.withType(io.gitlab.arturbosch.detekt.DetektCreateBaselineTask).configureEach {\n jvmTarget = "1.8"\n}\n')),(0,l.kt)("h4",{id:"kotlin-dsl-4"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'tasks.withType().configureEach {\n this.jvmTarget = "1.8"\n}\ntasks.withType().configureEach {\n this.jvmTarget = "1.8"\n}\n')),(0,l.kt)("h3",{id:"leveraging-gradles-sourcetask---excluding-and-including-source-files"},(0,l.kt)("a",{name:"excluding"},"Leveraging Gradle's SourceTask - Excluding and including source files")),(0,l.kt)("p",null,"A detekt task extends the Gradle ",(0,l.kt)("inlineCode",{parentName:"p"},"SourceTask")," to be only scheduled when watched source files are changed.\nIt also allows to match files that should be excluded from the analysis.\nTo do this introduce a query on detekt tasks and define include and exclude patterns outside the detekt closure:"),(0,l.kt)("h4",{id:"groovy-dsl-5"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'detekt {\n ...\n}\n\ntasks.withType(io.gitlab.arturbosch.detekt.Detekt).configureEach {\n // include("**/special/package/**") // only analyze a sub package inside src/main/kotlin\n exclude("**/special/package/internal/**") // but exclude our legacy internal package\n}\n\ntasks.withType(io.gitlab.arturbosch.detekt.DetektCreateBaselineTask).configureEach {\n // include("**/special/package/**") // only analyze a sub package inside src/main/kotlin\n exclude("**/special/package/internal/**") // but exclude our legacy internal package\n}\n')),(0,l.kt)("h4",{id:"kotlin-dsl-5"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'detekt {\n ...\n}\n\ntasks.withType().configureEach {\n // include("**/special/package/**") // only analyze a sub package inside src/main/kotlin\n exclude("**/special/package/internal/**") // but exclude our legacy internal package\n}\n\ntasks.withType().configureEach {\n // include("**/special/package/**") // only analyze a sub package inside src/main/kotlin\n exclude("**/special/package/internal/**") // but exclude our legacy internal package\n}\n')),(0,l.kt)("h3",{id:"defining-custom-detekt-task"},(0,l.kt)("a",{name:"customdetekttask"},"Defining custom detekt task")),(0,l.kt)("p",null,"Custom tasks for alternative configurations or different source sets can be defined by creating a custom task that\nuses the type ",(0,l.kt)("inlineCode",{parentName:"p"},"Detekt"),"."),(0,l.kt)("h4",{id:"groovy-dsl-6"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'tasks.register(name: myDetekt, type: io.gitlab.arturbosch.detekt.Detekt) {\n description = "Runs a custom detekt build."\n setSource(files("src/main/kotlin", "src/test/kotlin"))\n config.setFrom(files("$rootDir/config.yml"))\n debug = true\n reports {\n xml {\n destination = file("build/reports/mydetekt.xml")\n }\n html.destination = file("build/reports/mydetekt.html")\n }\n include \'**/*.kt\'\n include \'**/*.kts\'\n exclude \'resources/\'\n exclude \'build/\'\n}\n')),(0,l.kt)("h4",{id:"kotlin-dsl-6"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'tasks.register("myDetekt") {\n description = "Runs a custom detekt build."\n setSource(files("src/main/kotlin", "src/test/kotlin"))\n config.setFrom(files("$rootDir/config.yml"))\n debug = true\n reports {\n xml {\n destination = file("build/reports/mydetekt.xml")\n }\n html.destination = file("build/reports/mydetekt.html")\n }\n include("**/*.kt")\n include("**/*.kts")\n exclude("resources/")\n exclude("build/")\n}\n')),(0,l.kt)("h3",{id:"disabling-detekt-from-the-check-task"},(0,l.kt)("a",{name:"check-lifecycle"},"Disabling detekt from the check task")),(0,l.kt)("p",null,"Detekt tasks by default are verification tasks. They get executed whenever the Gradle check task gets executed.\nThis aligns with the behavior of other code analysis plugins for Gradle."),(0,l.kt)("p",null,"If you are adding detekt to an already long running project you may want to increase the code quality incrementally and therefore\nexclude detekt from the check task."),(0,l.kt)("h4",{id:"groovy-dsl-7"},"Groovy DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},"check.configure {\n dependsOn = dependsOn.findAll { it.name != 'detekt' }\n}\n")),(0,l.kt)("h4",{id:"kotlin-dsl-7"},"Kotlin DSL"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-kotlin"},'tasks.named("check").configure {\n this.setDependsOn(this.dependsOn.filterNot {\n it is TaskProvider<*> && it.name == "detekt"\n })\n}\n')),(0,l.kt)("p",null,"Instead of disabling detekt for the check task, you may want to increase the build failure threshold in the ",(0,l.kt)("a",{parentName:"p",href:"/docs/introduction/configurations"},"configuration file"),"."),(0,l.kt)("h2",{id:"integrating-detekt-inside-your-intellij-idea"},(0,l.kt)("a",{name:"idea"},"Integrating detekt inside your IntelliJ IDEA")),(0,l.kt)("p",null,"detekt comes with an ",(0,l.kt)("a",{parentName:"p",href:"https://plugins.jetbrains.com/plugin/10761-detekt"},"IntelliJ Plugin")," that you can install directly from the IDE. The plugin offers warning highlight directly inside the IDE as well as support for code formatting."),(0,l.kt)("p",null,"The source code of the plugin is available here: ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/detekt/detekt-intellij-plugin"},"detekt/detekt-intellij-plugin")))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d640b5a6.1adf7cc4.js b/assets/js/d640b5a6.1adf7cc4.js new file mode 100644 index 000000000..7d89cacd7 --- /dev/null +++ b/assets/js/d640b5a6.1adf7cc4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdetekt_website=self.webpackChunkdetekt_website||[]).push([[3954],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return g}});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),d=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=d(e.components);return r.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=d(n),g=a,k=p["".concat(s,".").concat(g)]||p[g]||u[g]||i;return n?r.createElement(k,o(o({ref:t},c),{},{components:n})):r.createElement(k,o({ref:t},c))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=p;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:a,o[1]=l;for(var d=2;d("detekt") {\n main = "io.gitlab.arturbosch.detekt.cli.Main"\n classpath = detekt\n\n val input = projectDir\n val config = "$projectDir/detekt.yml"\n val exclude = ".*/build/.*,.*/resources/.*"\n val params = listOf("-i", input, "-c", config, "-ex", exclude)\n\n args(params)\n}\n\ndependencies {\n detekt("io.gitlab.arturbosch.detekt:detekt-cli:1.21.0-RC1)\n}\n\n// Remove this block if you don\'t want to run detekt on every build\ntasks.check {\n dependsOn(detektTask)\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d640b5a6.b3c875dc.js b/assets/js/d640b5a6.b3c875dc.js deleted file mode 100644 index 46b788014..000000000 --- a/assets/js/d640b5a6.b3c875dc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdetekt_website=self.webpackChunkdetekt_website||[]).push([[3954],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return k}});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),d=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=d(e.components);return r.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=d(n),k=a,g=p["".concat(l,".").concat(k)]||p[k]||u[k]||i;return n?r.createElement(g,o(o({ref:t},c),{},{components:n})):r.createElement(g,o({ref:t},c))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=p;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,o[1]=s;for(var d=2;d("detekt") {\n main = "io.gitlab.arturbosch.detekt.cli.Main"\n classpath = detekt\n\n val input = projectDir\n val config = "$projectDir/detekt.yml"\n val exclude = ".*/build/.*,.*/resources/.*"\n val params = listOf("-i", input, "-c", config, "-ex", exclude)\n\n args(params)\n}\n\ndependencies {\n detekt("io.gitlab.arturbosch.detekt:detekt-cli:[detekt_version])\n}\n\n// Remove this block if you don\'t want to run detekt on every build\ntasks.check {\n dependsOn(detektTask)\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f8409a7e.9e7ef94a.js b/assets/js/f8409a7e.9e7ef94a.js deleted file mode 100644 index 396ab989f..000000000 --- a/assets/js/f8409a7e.9e7ef94a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdetekt_website=self.webpackChunkdetekt_website||[]).push([[3206],{3905:function(M,e,t){t.d(e,{Zo:function(){return r},kt:function(){return z}});var N=t(7294);function i(M,e,t){return e in M?Object.defineProperty(M,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):M[e]=t,M}function n(M,e){var t=Object.keys(M);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(M);e&&(N=N.filter((function(e){return Object.getOwnPropertyDescriptor(M,e).enumerable}))),t.push.apply(t,N)}return t}function j(M){for(var e=1;e=0||(i[t]=M[t]);return i}(M,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(M);for(N=0;N=0||Object.prototype.propertyIsEnumerable.call(M,t)&&(i[t]=M[t])}return i}var u=N.createContext({}),I=function(M){var e=N.useContext(u),t=e;return M&&(t="function"==typeof M?M(e):j(j({},e),M)),t},r=function(M){var e=I(M.components);return N.createElement(u.Provider,{value:e},M.children)},g={inlineCode:"code",wrapper:function(M){var e=M.children;return N.createElement(N.Fragment,{},e)}},a=N.forwardRef((function(M,e){var t=M.components,i=M.mdxType,n=M.originalType,u=M.parentName,r=D(M,["components","mdxType","originalType","parentName"]),a=I(t),z=i,o=a["".concat(u,".").concat(z)]||a[z]||g[z]||n;return t?N.createElement(o,j(j({ref:e},r),{},{components:t})):N.createElement(o,j({ref:e},r))}));function z(M,e){var t=arguments,i=e&&e.mdxType;if("string"==typeof M||i){var n=t.length,j=new Array(n);j[0]=a;var D={};for(var u in e)hasOwnProperty.call(e,u)&&(D[u]=e[u]);D.originalType=M,D.mdxType="string"==typeof M?M:i,j[1]=D;for(var I=2;I().configureEach {\n reports {\n xml.required.set(true)\n html.required.set(true)\n txt.required.set(true)\n sarif.required.set(true)\n md.required.set(true)\n }\n}\n")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-groovy"},"// Groovy DSL\ntasks.withType(Detekt).configureEach {\n reports {\n xml.required.set(true)\n html.required.set(true)\n txt.required.set(true)\n sarif.required.set(true)\n md.required.set(true)\n }\n}\n")),(0,n.kt)("p",null,"See ",(0,n.kt)("a",{parentName:"p",href:"/docs/introduction/reporting"},"reporting")," docs for more details on configuring reports."),(0,n.kt)("h3",{id:"adding-more-rule-sets"},"Adding more rule sets"),(0,n.kt)("p",null,"detekt itself provides a wrapper over ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/pinterest/ktlint"},"ktlint")," as the ",(0,n.kt)("inlineCode",{parentName:"p"},"formatting")," rule set\nwhich can be easily added to the gradle configuration:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-gradle"},'dependencies {\n detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:[detekt_version]"\n}\n')),(0,n.kt)("p",null,"Likewise custom ",(0,n.kt)("a",{parentName:"p",href:"/docs/introduction/extensions"},"extensions")," can be added to detekt."))}o.isMDXComponent=!0},3486:function(M,e){e.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjI1IiBoZWlnaHQ9IjUzIiB2aWV3Qm94PSIwIDAgMjI1IDUzIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNODguODg4MyA0Mi4yNjY1VjcuOTk0ODdIODEuNjk1NFYyMC4zODlDNzkuOTkxOCAxOC4zNzAzIDc3LjYyNTcgMTYuNjMzMiA3My43OTI2IDE2LjYzMzJDNjcuNzgyOCAxNi42MzMyIDYyLjI0NjEgMjEuMjM0MSA2Mi4yNDYxIDI5LjYzNzdWMjkuNzMxNkM2Mi4yNDYxIDM4LjEzNTIgNjcuODc3NCA0Mi43MzYgNzMuNzkyNiA0Mi43MzZDNzcuNTMxMSA0Mi43MzYgNzkuOTQ0NSA0MC45OTg5IDgxLjY5NTQgMzguNjUxNlY0Mi4yNjY1SDg4Ljg4ODNaTTgxLjc5IDI5LjczMTZDODEuNzkgMzMuOTA5OSA3OC45OTggMzYuNjc5OCA3NS42MzgyIDM2LjY3OThDNzIuMjc4MyAzNi42Nzk4IDY5LjQzOSAzMy45MDk5IDY5LjQzOSAyOS43MzE2VjI5LjYzNzdDNjkuNDM5IDI1LjQxMjQgNzIuMjc4MyAyMi42ODk0IDc1LjYzODIgMjIuNjg5NEM3OC45OTggMjIuNjg5NCA4MS43OSAyNS40NTkzIDgxLjc5IDI5LjYzNzdWMjkuNzMxNloiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTEyMC4zMjUgMzAuMzg4OFYzMC4yOTQ5QzEyMC4zMjUgMjMuMTU4OSAxMTYuNDQ0IDE2LjYzMzIgMTA3Ljk3NCAxNi42MzMyQzEwMC41OTEgMTYuNjMzMiA5NS40MzM0IDIyLjU0ODYgOTUuNDMzNCAyOS43MzE2VjI5LjgyNTRDOTUuNDMzNCAzNy41MjQ4IDEwMS4wNjUgNDIuODI5OSAxMDguNjgzIDQyLjgyOTlDMTEzLjI3NCA0Mi44Mjk5IDExNi42ODEgNDEuMDQ1OSAxMTkuMDQ3IDM4LjEzNTJMMTE0LjkzIDM0LjUyMDJDMTEyLjk0MiAzNi4zNTExIDExMS4xOTIgMzcuMTAyMyAxMDguNzc4IDM3LjEwMjNDMTA1LjU2IDM3LjEwMjMgMTAzLjI4OSAzNS40MTIyIDEwMi41NzkgMzIuMTcyOEgxMjAuMjNDMTIwLjI3NyAzMS41MTU2IDEyMC4zMjUgMzEuMDkzIDEyMC4zMjUgMzAuMzg4OFpNMTEzLjMyMSAyNy43MTI4SDEwMi40ODRDMTAzLjA1MiAyNC40NzM0IDEwNC45OTIgMjIuMzYwOCAxMDcuOTc0IDIyLjM2MDhDMTExLjAwMiAyMi4zNjA4IDExMi44OTUgMjQuNTIwNCAxMTMuMzIxIDI3LjcxMjhaIiBmaWxsPSIjMjIyMjIyIi8+CjxwYXRoIGQ9Ik0xNDEuMjc4IDQxLjIzMzdWMzUuNTA2MUMxNDAuMjM3IDM2LjA2OTUgMTM5LjA1NCAzNi4zOTgxIDEzNy43MjkgMzYuMzk4MUMxMzYuMTIgMzYuMzk4MSAxMzUuNDEgMzUuNiAxMzUuNDEgMzMuOTU2OFYyMy4yMDU5SDE0MS4zNzNWMTcuMTAyN0gxMzUuNDFWMTAuNjcwOUgxMjguMjE3VjE3LjEwMjdIMTI1LjE4OVYyMy4yMDU5SDEyOC4yMTdWMzUuMTMwNUMxMjguMjE3IDQwLjk1MiAxMzEuMTk5IDQyLjY4OTEgMTM1LjU5OSA0Mi42ODkxQzEzOC4wMTMgNDIuNjg5MSAxMzkuNzY0IDQyLjEyNTcgMTQxLjI3OCA0MS4yMzM3WiIgZmlsbD0iIzIyMjIyMiIvPgo8cGF0aCBkPSJNMTcyLjAwOCAzMC4zODg4VjMwLjI5NDlDMTcyLjAwOCAyMy4xNTg5IDE2OC4xMjggMTYuNjMzMiAxNTkuNjU3IDE2LjYzMzJDMTUyLjI3NSAxNi42MzMyIDE0Ny4xMTcgMjIuNTQ4NiAxNDcuMTE3IDI5LjczMTZWMjkuODI1NEMxNDcuMTE3IDM3LjUyNDggMTUyLjc0OCA0Mi44Mjk5IDE2MC4zNjcgNDIuODI5OUMxNjQuOTU4IDQyLjgyOTkgMTY4LjM2NSA0MS4wNDU5IDE3MC43MzEgMzguMTM1MkwxNjYuNjE0IDM0LjUyMDJDMTY0LjYyNiAzNi4zNTExIDE2Mi44NzUgMzcuMTAyMyAxNjAuNDYyIDM3LjEwMjNDMTU3LjI0NCAzNy4xMDIzIDE1NC45NzMgMzUuNDEyMiAxNTQuMjYzIDMyLjE3MjhIMTcxLjkxNEMxNzEuOTYxIDMxLjUxNTYgMTcyLjAwOCAzMS4wOTMgMTcyLjAwOCAzMC4zODg4Wk0xNjUuMDA1IDI3LjcxMjhIMTU0LjE2OEMxNTQuNzM2IDI0LjQ3MzQgMTU2LjY3NiAyMi4zNjA4IDE1OS42NTcgMjIuMzYwOEMxNjIuNjg2IDIyLjM2MDggMTY0LjU3OSAyNC41MjA0IDE2NS4wMDUgMjcuNzEyOFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTIwMy4yNzggNDIuMjY2NUwxOTMuMjkzIDI3LjAwODZMMjAyLjk0NyAxNy4xMDI3SDE5NC4zMzRMMTg1LjkxMSAyNi4yNTc0VjcuOTk0ODdIMTc4LjcxOFY0Mi4yNjY1SDE4NS45MTFWMzQuNjE0MUwxODguNDE5IDMxLjk4NUwxOTUuMDQ0IDQyLjI2NjVIMjAzLjI3OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTIyNC45MDUgNDEuMjMzN1YzNS41MDYxQzIyMy44NjQgMzYuMDY5NSAyMjIuNjgxIDM2LjM5ODEgMjIxLjM1NiAzNi4zOTgxQzIxOS43NDcgMzYuMzk4MSAyMTkuMDM3IDM1LjYgMjE5LjAzNyAzMy45NTY4VjIzLjIwNTlIMjI1VjE3LjEwMjdIMjE5LjAzN1YxMC42NzA5SDIxMS44NDRWMTcuMTAyN0gyMDguODE2VjIzLjIwNTlIMjExLjg0NFYzNS4xMzA1QzIxMS44NDQgNDAuOTUyIDIxNC44MjYgNDIuNjg5MSAyMTkuMjI3IDQyLjY4OTFDMjIxLjY0IDQyLjY4OTEgMjIzLjM5MSA0Mi4xMjU3IDIyNC45MDUgNDEuMjMzN1oiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjE4NjExIDBDMC45Nzg3NTUgMCAwIDAuOTc4NzU1IDAgMi4xODYxMVY0MC43NzFDMCA0MS45NzgzIDAuOTc4NzU1IDQyLjk1NzEgMi4xODYxMSA0Mi45NTcxSDI0LjI1MzRDMjUuNjUyNSA0Mi45NTcxIDI2LjYyNTggNDEuNTQ3MyAyNi4zNzc0IDQwLjE3MDVDMjYuMjEwOSAzOS4yNDgxIDI2LjEyNCAzOC4yOTgxIDI2LjEyNCAzNy4zMjc5QzI2LjEyNCAyOC41NDQzIDMzLjI0NDUgMjEuNDIzOSA0Mi4wMjggMjEuNDIzOUM0Mi44Njg5IDIxLjQyMzkgNDMuNjk0NSAyMS40ODkyIDQ0LjUwMDEgMjEuNjE0OUM0NS44NTc4IDIxLjgyNjggNDcuMjIgMjAuODU4NSA0Ny4yMiAxOS40ODQ0VjIuMTg2MTFDNDcuMjIgMC45Nzg3NTUgNDYuMjQxMiAwIDQ1LjAzMzkgMEgyLjE4NjExWiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyKSIvPgo8cGF0aCBkPSJNNTUuMzM1OCA0OC42MTY2TDU0Ljc2NzMgNDguMDQ4MUw1My4yNDIxIDQ2LjUyMjlMNTIuOTUxNiA0Ni4yMzI0QzUyLjI0MjcgNDUuNTIzNCA1Mi4xODU1IDQ0LjQwNjcgNTIuNjczIDQzLjUzMDZDNTMuNjI5OSA0MS44MTA5IDU0LjE3NjIgMzkuODMzIDU0LjE3NjIgMzcuNzI5M0M1NC4xNzYyIDMyLjkxMDQgNTEuMzE0NyAyOC43NDk5IDQ3LjIwMjkgMjYuODUwMUM0Ni41MTk2IDI2LjUzNDQgNDUuODAyNCAyNi4yODA4IDQ1LjA1NzMgMjYuMDk3NEM0NC4zNjM2IDI1LjkyNjggNDMuNjQ2NyAyNS44MTY0IDQyLjkxMTggMjUuNzcyN0M0Mi42NzQ5IDI1Ljc1ODcgNDIuNDM2OSAyNS43NDk1IDQyLjE5NjYgMjUuNzQ5NUMzOC41MTY2IDI1Ljc0OTUgMzUuMjIwMyAyNy40MTg4IDMzLjAyMTEgMzAuMDM4MUMzMS45Nzg0IDMxLjI4MDIgMzEuMTgzOCAzMi43MzU3IDMwLjcxMTQgMzQuMzI5M0MzMC4zOTE2IDM1LjQwNzkgMzAuMjE3IDM2LjU0ODEgMzAuMjE3IDM3LjcyOTFDMzAuMjE3IDM4LjAyOTMgMzAuMjMxOSAzOC4zMjU5IDMwLjI1MzcgMzguNjIwNUMzMC4zMDgyIDM5LjM1NTkgMzAuNDI2NSA0MC4wNzMzIDMwLjYwODIgNDAuNzY2QzMwLjgwMzggNDEuNTExNyAzMS4wNjg5IDQyLjIyOTYgMzEuMzk3NCA0Mi45MTE2QzMzLjMzMzIgNDYuOTI5NSAzNy40NDY1IDQ5LjcwODkgNDIuMTk2NyA0OS43MDg5QzQzLjk1NyA0OS43MDg5IDQ1LjYyOTEgNDkuMzI1OSA0Ny4xMzU3IDQ4LjY0MDNDNDcuOTg0MSA0OC4yNTQzIDQ5LjAwNDYgNDguMzUzNiA0OS42NjM2IDQ5LjAxMjdMNTAuMDg5NCA0OS40Mzg1TDUxLjYzMDEgNTAuOTc5NEw1Mi4zMDE2IDUxLjY1MDlDNTIuNzIwNSA1Mi4wNjk5IDUzLjI2OTcgNTIuMjc5NCA1My44MTg2IDUyLjI3OTRDNTQuMzY3NyA1Mi4yNzk0IDU0LjkxNjkgNTIuMDY5OSA1NS4zMzU3IDUxLjY1MDlDNTYuMTczOCA1MC44MTI5IDU2LjE3MzggNDkuNDU0NCA1NS4zMzU4IDQ4LjYxNjZaTTQyLjE5NjcgNDUuNDE4QzM5Ljk1MjUgNDUuNDE4IDM3LjkzIDQ0LjQ1MSAzNi41MjMyIDQyLjkxMjJDMzUuOTQ4NSA0Mi4yODM2IDM1LjQ3NzIgNDEuNTU5NCAzNS4xMzUgNDAuNzY2N0MzNC44NDUgNDAuMDk1NCAzNC42NDkzIDM5LjM3NDYgMzQuNTYxNyAzOC42MjExQzM0LjUyNzcgMzguMzI4MyAzNC41MDg0IDM4LjAzMTQgMzQuNTA4NCAzNy43Mjk3QzM0LjUwODQgMzMuNDkwMyAzNy45NTc0IDMwLjA0MTMgNDIuMTk2OCAzMC4wNDEzQzQyLjQzNzkgMzAuMDQxMyA0Mi42NzYyIDMwLjA1MzkgNDIuOTEyIDMwLjA3NTZDNDMuNjYzOCAzMC4xNDU1IDQ0LjM4MzcgMzAuMzI0MiA0NS4wNTc2IDMwLjU5NTZDNDUuODQ1OCAzMC45MTI3IDQ2LjU2ODkgMzEuMzU2NCA0Ny4yMDMxIDMxLjkwMkM0OC44NDM0IDMzLjMxMzEgNDkuODg1MiAzNS40MDE1IDQ5Ljg4NTIgMzcuNzI5N0M0OS44ODUgNDEuOTY4OCA0Ni40MzYxIDQ1LjQxOCA0Mi4xOTY3IDQ1LjQxOFoiIGZpbGw9InVybCgjcGFpbnQxX2xpbmVhcikiLz4KPHBhdGggZD0iTTkuOTkzNiAyNS42OTc5QzkuMzQyMTcgMjUuNjk3OSA4Ljg0NjE4IDI1LjQ5NTggOC41MDU2NiAyNS4wOTE0QzguMTY1MTQgMjQuNjcwOSA3Ljk5NDg3IDI0LjE2OTUgNy45OTQ4NyAyMy41ODczVjIzLjQ5MDNDNy45OTQ4NyAyMi45MDggOC4xNjUxNCAyMi40MTQ3IDguNTA1NjYgMjIuMDEwNEM4Ljg0NjE4IDIxLjU4OTkgOS4zNDIxNyAyMS4zNzk2IDkuOTkzNiAyMS4zNzk2QzEwLjY0NSAyMS4zNzk2IDExLjE0MSAyMS41ODk5IDExLjQ4MTUgMjIuMDEwNEMxMS44MjIxIDIyLjQxNDcgMTEuOTkyMyAyMi45MDggMTEuOTkyMyAyMy40OTAzVjIzLjU4NzNDMTEuOTkyMyAyNC4xNjk1IDExLjgyMjEgMjQuNjcwOSAxMS40ODE1IDI1LjA5MTRDMTEuMTQxIDI1LjQ5NTggMTAuNjQ1IDI1LjY5NzkgOS45OTM2IDI1LjY5NzlaTTguMTcyNTQgMTAuODE1OFY3Ljk5NDg3SDExLjgxNDdWMTAuODE1OEwxMC42NTk4IDE5LjE2MTJIOS4zMjczNkw4LjE3MjU0IDEwLjgxNThaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMjAuMjcyOSAyNS42OTc5QzE5LjYyMTUgMjUuNjk3OSAxOS4xMjU1IDI1LjQ5NTggMTguNzg1IDI1LjA5MTRDMTguNDQ0NCAyNC42NzA5IDE4LjI3NDIgMjQuMTY5NSAxOC4yNzQyIDIzLjU4NzNWMjMuNDkwM0MxOC4yNzQyIDIyLjkwOCAxOC40NDQ0IDIyLjQxNDcgMTguNzg1IDIyLjAxMDRDMTkuMTI1NSAyMS41ODk5IDE5LjYyMTUgMjEuMzc5NiAyMC4yNzI5IDIxLjM3OTZDMjAuOTI0MyAyMS4zNzk2IDIxLjQyMDMgMjEuNTg5OSAyMS43NjA4IDIyLjAxMDRDMjIuMTAxNCAyMi40MTQ3IDIyLjI3MTYgMjIuOTA4IDIyLjI3MTYgMjMuNDkwM1YyMy41ODczQzIyLjI3MTYgMjQuMTY5NSAyMi4xMDE0IDI0LjY3MDkgMjEuNzYwOCAyNS4wOTE0QzIxLjQyMDMgMjUuNDk1OCAyMC45MjQzIDI1LjY5NzkgMjAuMjcyOSAyNS42OTc5Wk0xOC40NTE4IDEwLjgxNThWNy45OTQ4N0gyMi4wOTRWMTAuODE1OEwyMC45MzkxIDE5LjE2MTJIMTkuNjA2N0wxOC40NTE4IDEwLjgxNThaIiBmaWxsPSJ3aGl0ZSIvPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyIiB4MT0iNS4yMjJlLTA3IiB5MT0iNDEuMzM2MSIgeDI9IjUxLjk4MiIgeTI9IjMzLjI5IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiM3OTQyRUUiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY0NjUxIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQxX2xpbmVhciIgeDE9IjUzLjAxMjEiIHkxPSI1MS41NDY1IiB4Mj0iNjAuOTgwMSIgeTI9IjMwLjI0MjMiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iIzc5NDJFRSIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjQ2NTEiLz4KPC9saW5lYXJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4K"},9770:function(M,e,t){e.Z=t.p+"assets/images/detekt_in_action-28584853d114ee77b5b013bb77b2bce7.png"}}]); \ No newline at end of file diff --git a/assets/js/f8409a7e.e41ede9c.js b/assets/js/f8409a7e.e41ede9c.js new file mode 100644 index 000000000..a3548c9f7 --- /dev/null +++ b/assets/js/f8409a7e.e41ede9c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdetekt_website=self.webpackChunkdetekt_website||[]).push([[3206],{3905:function(M,e,t){t.d(e,{Zo:function(){return r},kt:function(){return y}});var N=t(7294);function j(M,e,t){return e in M?Object.defineProperty(M,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):M[e]=t,M}function i(M,e){var t=Object.keys(M);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(M);e&&(N=N.filter((function(e){return Object.getOwnPropertyDescriptor(M,e).enumerable}))),t.push.apply(t,N)}return t}function D(M){for(var e=1;e=0||(j[t]=M[t]);return j}(M,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(M);for(N=0;N=0||Object.prototype.propertyIsEnumerable.call(M,t)&&(j[t]=M[t])}return j}var I=N.createContext({}),u=function(M){var e=N.useContext(I),t=e;return M&&(t="function"==typeof M?M(e):D(D({},e),M)),t},r=function(M){var e=u(M.components);return N.createElement(I.Provider,{value:e},M.children)},g={inlineCode:"code",wrapper:function(M){var e=M.children;return N.createElement(N.Fragment,{},e)}},z=N.forwardRef((function(M,e){var t=M.components,j=M.mdxType,i=M.originalType,I=M.parentName,r=n(M,["components","mdxType","originalType","parentName"]),z=u(t),y=j,a=z["".concat(I,".").concat(y)]||z[y]||g[y]||i;return t?N.createElement(a,D(D({ref:e},r),{},{components:t})):N.createElement(a,D({ref:e},r))}));function y(M,e){var t=arguments,j=e&&e.mdxType;if("string"==typeof M||j){var i=t.length,D=new Array(i);D[0]=z;var n={};for(var I in e)hasOwnProperty.call(e,I)&&(n[I]=e[I]);n.originalType=M,n.mdxType="string"==typeof M?M:j,D[1]=n;for(var u=2;u().configureEach {\n reports {\n xml.required.set(true)\n html.required.set(true)\n txt.required.set(true)\n sarif.required.set(true)\n md.required.set(true)\n }\n}\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-groovy"},"// Groovy DSL\ntasks.withType(Detekt).configureEach {\n reports {\n xml.required.set(true)\n html.required.set(true)\n txt.required.set(true)\n sarif.required.set(true)\n md.required.set(true)\n }\n}\n")),(0,i.kt)("p",null,"See ",(0,i.kt)("a",{parentName:"p",href:"/docs/introduction/reporting"},"reporting")," docs for more details on configuring reports."),(0,i.kt)("h3",{id:"adding-more-rule-sets"},"Adding more rule sets"),(0,i.kt)("p",null,"detekt itself provides a wrapper over ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/pinterest/ktlint"},"ktlint")," as the ",(0,i.kt)("inlineCode",{parentName:"p"},"formatting")," rule set\nwhich can be easily added to the gradle configuration:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-gradle"},'dependencies {\n detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:1.21.0-RC1"\n}\n')),(0,i.kt)("p",null,"Likewise custom ",(0,i.kt)("a",{parentName:"p",href:"/docs/introduction/extensions"},"extensions")," can be added to detekt."))}y.isMDXComponent=!0},3486:function(M,e){e.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjI1IiBoZWlnaHQ9IjUzIiB2aWV3Qm94PSIwIDAgMjI1IDUzIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNODguODg4MyA0Mi4yNjY1VjcuOTk0ODdIODEuNjk1NFYyMC4zODlDNzkuOTkxOCAxOC4zNzAzIDc3LjYyNTcgMTYuNjMzMiA3My43OTI2IDE2LjYzMzJDNjcuNzgyOCAxNi42MzMyIDYyLjI0NjEgMjEuMjM0MSA2Mi4yNDYxIDI5LjYzNzdWMjkuNzMxNkM2Mi4yNDYxIDM4LjEzNTIgNjcuODc3NCA0Mi43MzYgNzMuNzkyNiA0Mi43MzZDNzcuNTMxMSA0Mi43MzYgNzkuOTQ0NSA0MC45OTg5IDgxLjY5NTQgMzguNjUxNlY0Mi4yNjY1SDg4Ljg4ODNaTTgxLjc5IDI5LjczMTZDODEuNzkgMzMuOTA5OSA3OC45OTggMzYuNjc5OCA3NS42MzgyIDM2LjY3OThDNzIuMjc4MyAzNi42Nzk4IDY5LjQzOSAzMy45MDk5IDY5LjQzOSAyOS43MzE2VjI5LjYzNzdDNjkuNDM5IDI1LjQxMjQgNzIuMjc4MyAyMi42ODk0IDc1LjYzODIgMjIuNjg5NEM3OC45OTggMjIuNjg5NCA4MS43OSAyNS40NTkzIDgxLjc5IDI5LjYzNzdWMjkuNzMxNloiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTEyMC4zMjUgMzAuMzg4OFYzMC4yOTQ5QzEyMC4zMjUgMjMuMTU4OSAxMTYuNDQ0IDE2LjYzMzIgMTA3Ljk3NCAxNi42MzMyQzEwMC41OTEgMTYuNjMzMiA5NS40MzM0IDIyLjU0ODYgOTUuNDMzNCAyOS43MzE2VjI5LjgyNTRDOTUuNDMzNCAzNy41MjQ4IDEwMS4wNjUgNDIuODI5OSAxMDguNjgzIDQyLjgyOTlDMTEzLjI3NCA0Mi44Mjk5IDExNi42ODEgNDEuMDQ1OSAxMTkuMDQ3IDM4LjEzNTJMMTE0LjkzIDM0LjUyMDJDMTEyLjk0MiAzNi4zNTExIDExMS4xOTIgMzcuMTAyMyAxMDguNzc4IDM3LjEwMjNDMTA1LjU2IDM3LjEwMjMgMTAzLjI4OSAzNS40MTIyIDEwMi41NzkgMzIuMTcyOEgxMjAuMjNDMTIwLjI3NyAzMS41MTU2IDEyMC4zMjUgMzEuMDkzIDEyMC4zMjUgMzAuMzg4OFpNMTEzLjMyMSAyNy43MTI4SDEwMi40ODRDMTAzLjA1MiAyNC40NzM0IDEwNC45OTIgMjIuMzYwOCAxMDcuOTc0IDIyLjM2MDhDMTExLjAwMiAyMi4zNjA4IDExMi44OTUgMjQuNTIwNCAxMTMuMzIxIDI3LjcxMjhaIiBmaWxsPSIjMjIyMjIyIi8+CjxwYXRoIGQ9Ik0xNDEuMjc4IDQxLjIzMzdWMzUuNTA2MUMxNDAuMjM3IDM2LjA2OTUgMTM5LjA1NCAzNi4zOTgxIDEzNy43MjkgMzYuMzk4MUMxMzYuMTIgMzYuMzk4MSAxMzUuNDEgMzUuNiAxMzUuNDEgMzMuOTU2OFYyMy4yMDU5SDE0MS4zNzNWMTcuMTAyN0gxMzUuNDFWMTAuNjcwOUgxMjguMjE3VjE3LjEwMjdIMTI1LjE4OVYyMy4yMDU5SDEyOC4yMTdWMzUuMTMwNUMxMjguMjE3IDQwLjk1MiAxMzEuMTk5IDQyLjY4OTEgMTM1LjU5OSA0Mi42ODkxQzEzOC4wMTMgNDIuNjg5MSAxMzkuNzY0IDQyLjEyNTcgMTQxLjI3OCA0MS4yMzM3WiIgZmlsbD0iIzIyMjIyMiIvPgo8cGF0aCBkPSJNMTcyLjAwOCAzMC4zODg4VjMwLjI5NDlDMTcyLjAwOCAyMy4xNTg5IDE2OC4xMjggMTYuNjMzMiAxNTkuNjU3IDE2LjYzMzJDMTUyLjI3NSAxNi42MzMyIDE0Ny4xMTcgMjIuNTQ4NiAxNDcuMTE3IDI5LjczMTZWMjkuODI1NEMxNDcuMTE3IDM3LjUyNDggMTUyLjc0OCA0Mi44Mjk5IDE2MC4zNjcgNDIuODI5OUMxNjQuOTU4IDQyLjgyOTkgMTY4LjM2NSA0MS4wNDU5IDE3MC43MzEgMzguMTM1MkwxNjYuNjE0IDM0LjUyMDJDMTY0LjYyNiAzNi4zNTExIDE2Mi44NzUgMzcuMTAyMyAxNjAuNDYyIDM3LjEwMjNDMTU3LjI0NCAzNy4xMDIzIDE1NC45NzMgMzUuNDEyMiAxNTQuMjYzIDMyLjE3MjhIMTcxLjkxNEMxNzEuOTYxIDMxLjUxNTYgMTcyLjAwOCAzMS4wOTMgMTcyLjAwOCAzMC4zODg4Wk0xNjUuMDA1IDI3LjcxMjhIMTU0LjE2OEMxNTQuNzM2IDI0LjQ3MzQgMTU2LjY3NiAyMi4zNjA4IDE1OS42NTcgMjIuMzYwOEMxNjIuNjg2IDIyLjM2MDggMTY0LjU3OSAyNC41MjA0IDE2NS4wMDUgMjcuNzEyOFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTIwMy4yNzggNDIuMjY2NUwxOTMuMjkzIDI3LjAwODZMMjAyLjk0NyAxNy4xMDI3SDE5NC4zMzRMMTg1LjkxMSAyNi4yNTc0VjcuOTk0ODdIMTc4LjcxOFY0Mi4yNjY1SDE4NS45MTFWMzQuNjE0MUwxODguNDE5IDMxLjk4NUwxOTUuMDQ0IDQyLjI2NjVIMjAzLjI3OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTIyNC45MDUgNDEuMjMzN1YzNS41MDYxQzIyMy44NjQgMzYuMDY5NSAyMjIuNjgxIDM2LjM5ODEgMjIxLjM1NiAzNi4zOTgxQzIxOS43NDcgMzYuMzk4MSAyMTkuMDM3IDM1LjYgMjE5LjAzNyAzMy45NTY4VjIzLjIwNTlIMjI1VjE3LjEwMjdIMjE5LjAzN1YxMC42NzA5SDIxMS44NDRWMTcuMTAyN0gyMDguODE2VjIzLjIwNTlIMjExLjg0NFYzNS4xMzA1QzIxMS44NDQgNDAuOTUyIDIxNC44MjYgNDIuNjg5MSAyMTkuMjI3IDQyLjY4OTFDMjIxLjY0IDQyLjY4OTEgMjIzLjM5MSA0Mi4xMjU3IDIyNC45MDUgNDEuMjMzN1oiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjE4NjExIDBDMC45Nzg3NTUgMCAwIDAuOTc4NzU1IDAgMi4xODYxMVY0MC43NzFDMCA0MS45NzgzIDAuOTc4NzU1IDQyLjk1NzEgMi4xODYxMSA0Mi45NTcxSDI0LjI1MzRDMjUuNjUyNSA0Mi45NTcxIDI2LjYyNTggNDEuNTQ3MyAyNi4zNzc0IDQwLjE3MDVDMjYuMjEwOSAzOS4yNDgxIDI2LjEyNCAzOC4yOTgxIDI2LjEyNCAzNy4zMjc5QzI2LjEyNCAyOC41NDQzIDMzLjI0NDUgMjEuNDIzOSA0Mi4wMjggMjEuNDIzOUM0Mi44Njg5IDIxLjQyMzkgNDMuNjk0NSAyMS40ODkyIDQ0LjUwMDEgMjEuNjE0OUM0NS44NTc4IDIxLjgyNjggNDcuMjIgMjAuODU4NSA0Ny4yMiAxOS40ODQ0VjIuMTg2MTFDNDcuMjIgMC45Nzg3NTUgNDYuMjQxMiAwIDQ1LjAzMzkgMEgyLjE4NjExWiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyKSIvPgo8cGF0aCBkPSJNNTUuMzM1OCA0OC42MTY2TDU0Ljc2NzMgNDguMDQ4MUw1My4yNDIxIDQ2LjUyMjlMNTIuOTUxNiA0Ni4yMzI0QzUyLjI0MjcgNDUuNTIzNCA1Mi4xODU1IDQ0LjQwNjcgNTIuNjczIDQzLjUzMDZDNTMuNjI5OSA0MS44MTA5IDU0LjE3NjIgMzkuODMzIDU0LjE3NjIgMzcuNzI5M0M1NC4xNzYyIDMyLjkxMDQgNTEuMzE0NyAyOC43NDk5IDQ3LjIwMjkgMjYuODUwMUM0Ni41MTk2IDI2LjUzNDQgNDUuODAyNCAyNi4yODA4IDQ1LjA1NzMgMjYuMDk3NEM0NC4zNjM2IDI1LjkyNjggNDMuNjQ2NyAyNS44MTY0IDQyLjkxMTggMjUuNzcyN0M0Mi42NzQ5IDI1Ljc1ODcgNDIuNDM2OSAyNS43NDk1IDQyLjE5NjYgMjUuNzQ5NUMzOC41MTY2IDI1Ljc0OTUgMzUuMjIwMyAyNy40MTg4IDMzLjAyMTEgMzAuMDM4MUMzMS45Nzg0IDMxLjI4MDIgMzEuMTgzOCAzMi43MzU3IDMwLjcxMTQgMzQuMzI5M0MzMC4zOTE2IDM1LjQwNzkgMzAuMjE3IDM2LjU0ODEgMzAuMjE3IDM3LjcyOTFDMzAuMjE3IDM4LjAyOTMgMzAuMjMxOSAzOC4zMjU5IDMwLjI1MzcgMzguNjIwNUMzMC4zMDgyIDM5LjM1NTkgMzAuNDI2NSA0MC4wNzMzIDMwLjYwODIgNDAuNzY2QzMwLjgwMzggNDEuNTExNyAzMS4wNjg5IDQyLjIyOTYgMzEuMzk3NCA0Mi45MTE2QzMzLjMzMzIgNDYuOTI5NSAzNy40NDY1IDQ5LjcwODkgNDIuMTk2NyA0OS43MDg5QzQzLjk1NyA0OS43MDg5IDQ1LjYyOTEgNDkuMzI1OSA0Ny4xMzU3IDQ4LjY0MDNDNDcuOTg0MSA0OC4yNTQzIDQ5LjAwNDYgNDguMzUzNiA0OS42NjM2IDQ5LjAxMjdMNTAuMDg5NCA0OS40Mzg1TDUxLjYzMDEgNTAuOTc5NEw1Mi4zMDE2IDUxLjY1MDlDNTIuNzIwNSA1Mi4wNjk5IDUzLjI2OTcgNTIuMjc5NCA1My44MTg2IDUyLjI3OTRDNTQuMzY3NyA1Mi4yNzk0IDU0LjkxNjkgNTIuMDY5OSA1NS4zMzU3IDUxLjY1MDlDNTYuMTczOCA1MC44MTI5IDU2LjE3MzggNDkuNDU0NCA1NS4zMzU4IDQ4LjYxNjZaTTQyLjE5NjcgNDUuNDE4QzM5Ljk1MjUgNDUuNDE4IDM3LjkzIDQ0LjQ1MSAzNi41MjMyIDQyLjkxMjJDMzUuOTQ4NSA0Mi4yODM2IDM1LjQ3NzIgNDEuNTU5NCAzNS4xMzUgNDAuNzY2N0MzNC44NDUgNDAuMDk1NCAzNC42NDkzIDM5LjM3NDYgMzQuNTYxNyAzOC42MjExQzM0LjUyNzcgMzguMzI4MyAzNC41MDg0IDM4LjAzMTQgMzQuNTA4NCAzNy43Mjk3QzM0LjUwODQgMzMuNDkwMyAzNy45NTc0IDMwLjA0MTMgNDIuMTk2OCAzMC4wNDEzQzQyLjQzNzkgMzAuMDQxMyA0Mi42NzYyIDMwLjA1MzkgNDIuOTEyIDMwLjA3NTZDNDMuNjYzOCAzMC4xNDU1IDQ0LjM4MzcgMzAuMzI0MiA0NS4wNTc2IDMwLjU5NTZDNDUuODQ1OCAzMC45MTI3IDQ2LjU2ODkgMzEuMzU2NCA0Ny4yMDMxIDMxLjkwMkM0OC44NDM0IDMzLjMxMzEgNDkuODg1MiAzNS40MDE1IDQ5Ljg4NTIgMzcuNzI5N0M0OS44ODUgNDEuOTY4OCA0Ni40MzYxIDQ1LjQxOCA0Mi4xOTY3IDQ1LjQxOFoiIGZpbGw9InVybCgjcGFpbnQxX2xpbmVhcikiLz4KPHBhdGggZD0iTTkuOTkzNiAyNS42OTc5QzkuMzQyMTcgMjUuNjk3OSA4Ljg0NjE4IDI1LjQ5NTggOC41MDU2NiAyNS4wOTE0QzguMTY1MTQgMjQuNjcwOSA3Ljk5NDg3IDI0LjE2OTUgNy45OTQ4NyAyMy41ODczVjIzLjQ5MDNDNy45OTQ4NyAyMi45MDggOC4xNjUxNCAyMi40MTQ3IDguNTA1NjYgMjIuMDEwNEM4Ljg0NjE4IDIxLjU4OTkgOS4zNDIxNyAyMS4zNzk2IDkuOTkzNiAyMS4zNzk2QzEwLjY0NSAyMS4zNzk2IDExLjE0MSAyMS41ODk5IDExLjQ4MTUgMjIuMDEwNEMxMS44MjIxIDIyLjQxNDcgMTEuOTkyMyAyMi45MDggMTEuOTkyMyAyMy40OTAzVjIzLjU4NzNDMTEuOTkyMyAyNC4xNjk1IDExLjgyMjEgMjQuNjcwOSAxMS40ODE1IDI1LjA5MTRDMTEuMTQxIDI1LjQ5NTggMTAuNjQ1IDI1LjY5NzkgOS45OTM2IDI1LjY5NzlaTTguMTcyNTQgMTAuODE1OFY3Ljk5NDg3SDExLjgxNDdWMTAuODE1OEwxMC42NTk4IDE5LjE2MTJIOS4zMjczNkw4LjE3MjU0IDEwLjgxNThaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMjAuMjcyOSAyNS42OTc5QzE5LjYyMTUgMjUuNjk3OSAxOS4xMjU1IDI1LjQ5NTggMTguNzg1IDI1LjA5MTRDMTguNDQ0NCAyNC42NzA5IDE4LjI3NDIgMjQuMTY5NSAxOC4yNzQyIDIzLjU4NzNWMjMuNDkwM0MxOC4yNzQyIDIyLjkwOCAxOC40NDQ0IDIyLjQxNDcgMTguNzg1IDIyLjAxMDRDMTkuMTI1NSAyMS41ODk5IDE5LjYyMTUgMjEuMzc5NiAyMC4yNzI5IDIxLjM3OTZDMjAuOTI0MyAyMS4zNzk2IDIxLjQyMDMgMjEuNTg5OSAyMS43NjA4IDIyLjAxMDRDMjIuMTAxNCAyMi40MTQ3IDIyLjI3MTYgMjIuOTA4IDIyLjI3MTYgMjMuNDkwM1YyMy41ODczQzIyLjI3MTYgMjQuMTY5NSAyMi4xMDE0IDI0LjY3MDkgMjEuNzYwOCAyNS4wOTE0QzIxLjQyMDMgMjUuNDk1OCAyMC45MjQzIDI1LjY5NzkgMjAuMjcyOSAyNS42OTc5Wk0xOC40NTE4IDEwLjgxNThWNy45OTQ4N0gyMi4wOTRWMTAuODE1OEwyMC45MzkxIDE5LjE2MTJIMTkuNjA2N0wxOC40NTE4IDEwLjgxNThaIiBmaWxsPSJ3aGl0ZSIvPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyIiB4MT0iNS4yMjJlLTA3IiB5MT0iNDEuMzM2MSIgeDI9IjUxLjk4MiIgeTI9IjMzLjI5IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiM3OTQyRUUiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY0NjUxIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQxX2xpbmVhciIgeDE9IjUzLjAxMjEiIHkxPSI1MS41NDY1IiB4Mj0iNjAuOTgwMSIgeTI9IjMwLjI0MjMiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iIzc5NDJFRSIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjQ2NTEiLz4KPC9saW5lYXJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4K"},9770:function(M,e,t){e.Z=t.p+"assets/images/detekt_in_action-28584853d114ee77b5b013bb77b2bce7.png"}}]); \ No newline at end of file diff --git a/assets/js/main.6b5ebd75.js b/assets/js/main.b737d8d2.js similarity index 96% rename from assets/js/main.6b5ebd75.js rename to assets/js/main.b737d8d2.js index 0a91e0f0b..ecae033ed 100644 --- a/assets/js/main.6b5ebd75.js +++ b/assets/js/main.b737d8d2.js @@ -1,2 +1,2 @@ -/*! For license information please see main.6b5ebd75.js.LICENSE.txt */ -(self.webpackChunkdetekt_website=self.webpackChunkdetekt_website||[]).push([[179],{830:function(e,t,n){"use strict";n.d(t,{W:function(){return a}});var r=n(7294);function a(){return r.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},r.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}},723:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(7294),a=n(3117),o=n(8356),i=n.n(o),l=n(6887),u={"01a85c17":[function(){return Promise.all([n.e(532),n.e(4013)]).then(n.bind(n,1223))},"@theme/BlogTagsListPage",1223],"0e58a75f":[function(){return n.e(241).then(n.bind(n,8893))},"@site/docs/rules/naming.md",8893],"1082fd90":[function(){return n.e(673).then(n.bind(n,3369))},"@site/blog/2020-09-27-additional-diff-config-task.md?truncated=true",3369],"11bb9066":[function(){return n.e(8139).then(n.bind(n,431))},"@site/docs/introduction/configurations.md",431],"1381ccb6":[function(){return n.e(3036).then(n.bind(n,4360))},"@site/docs/introduction/changelog 1.x.x.md",4360],"13aa2ba4":[function(){return n.e(5764).then(n.bind(n,7924))},"@site/docs/introduction/baseline.md",7924],17896441:[function(){return Promise.all([n.e(532),n.e(1142),n.e(7918)]).then(n.bind(n,8043))},"@theme/DocItem",8043],"1a4e3797":[function(){return Promise.all([n.e(532),n.e(7920)]).then(n.bind(n,9172))},"@theme/SearchPage",9172],"1be78505":[function(){return Promise.all([n.e(532),n.e(9514)]).then(n.bind(n,7994))},"@theme/DocPage",7994],"20013cb7":[function(){return n.e(1964).then(n.bind(n,1558))},"@site/docs/introduction/snapshots.md",1558],"200fe7cf":[function(){return n.e(948).then(n.bind(n,8851))},"@site/blog/2019-08-04-calling-it-one-zero.md",8851],23530380:[function(){return n.e(3480).then(n.bind(n,2486))},"@site/docs/introduction/extensions.md",2486],"27346d8c":[function(){return n.e(6640).then(n.bind(n,6870))},"@site/docs/gettingstarted/cli.mdx",6870],"313bfdc8":[function(){return n.e(9529).then(n.t.bind(n,3769,19))},"/home/runner/work/detekt/detekt/website/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",3769],"34af2f29":[function(){return n.e(439).then(n.bind(n,5997))},"@site/docs/rules/formatting.md",5997],"3511eed3":[function(){return n.e(4487).then(n.bind(n,2262))},"@site/blog/2019-08-14-custom-console-reports.md?truncated=true",2262],"37ea7a12":[function(){return n.e(2666).then(n.bind(n,1013))},"@site/blog/2019-06-29-using-detekt-snapshots.md",1013],"3885f9ba":[function(){return n.e(4715).then(n.bind(n,8384))},"@site/docs/rules/complexity.md",8384],"394f3ef8":[function(){return n.e(6062).then(n.bind(n,85))},"@site/docs/introduction/changelog.md",85],"3b7b7886":[function(){return n.e(9697).then(n.bind(n,9726))},"@site/blog/2019-06-08-migrating-the-test-pattern.md",9726],"3c945758":[function(){return n.e(7495).then(n.bind(n,4708))},"@site/blog/2019-08-04-calling-it-one-zero.md?truncated=true",4708],"4279727d":[function(){return n.e(2821).then(n.bind(n,3898))},"@site/docs/gettingstarted/git-pre-commit-hook.md",3898],"4465087c":[function(){return n.e(3514).then(n.bind(n,8825))},"@site/docs/rules/coroutines.md",8825],"45e4cbec":[function(){return n.e(9018).then(n.bind(n,6545))},"@site/blog/2020-09-27-additional-diff-config-task.md",6545],"5249f512":[function(){return n.e(5962).then(n.bind(n,9294))},"@site/blog/2019-03-03-configure-detekt-on-root-project.md?truncated=true",9294],"5af69848":[function(){return n.e(1159).then(n.bind(n,4728))},"@site/docs/introduction/compatibility.md",4728],"5e9f5e1a":[function(){return Promise.resolve().then(n.bind(n,6809))},"@generated/docusaurus.config",6809],"613ac473":[function(){return n.e(3003).then(n.bind(n,5397))},"@site/docs/gettingstarted/type-resolution.md",5397],"6875c492":[function(){return Promise.all([n.e(532),n.e(1142),n.e(8610)]).then(n.bind(n,1714))},"@theme/BlogTagsPostsPage",1714],"6cfc4513":[function(){return n.e(496).then(n.t.bind(n,8811,19))},"~blog/default/blog-tags-guides-c2f.json",8811],"6d31d76d":[function(){return n.e(2356).then(n.bind(n,8695))},"@site/docs/rules/exceptions.md",8695],"7039eadf":[function(){return n.e(1961).then(n.bind(n,546))},"@site/docs/introduction/suppressors.md",546],"74ccadee":[function(){return n.e(3563).then(n.bind(n,8549))},"@site/docs/rules/style.md",8549],"7d7fd0cd":[function(){return n.e(5991).then(n.t.bind(n,1632,19))},"~blog/default/blog-tags-news-9e6-list.json",1632],"814f3328":[function(){return n.e(2535).then(n.t.bind(n,5641,19))},"~blog/default/blog-post-list-prop-default.json",5641],"855fb3b0":[function(){return n.e(1826).then(n.bind(n,1930))},"@site/blog/2019-06-08-migrating-the-test-pattern.md?truncated=true",1930],"8d2e55ce":[function(){return n.e(577).then(n.bind(n,6434))},"@site/blog/2019-03-03-configure-detekt-on-root-project.md",6434],"8fa637ad":[function(){return n.e(5822).then(n.bind(n,3259))},"@site/blog/2019-08-14-custom-console-reports.md",3259],"935f2afb":[function(){return n.e(53).then(n.t.bind(n,1109,19))},"~docs/default/version-current-metadata-prop-751.json",1109],"9aa28b63":[function(){return n.e(253).then(n.bind(n,987))},"@site/docs/rules/potential-bugs.md",987],"9e4087bc":[function(){return n.e(3608).then(n.bind(n,3169))},"@theme/BlogArchivePage",3169],a5e1ffa9:[function(){return n.e(9277).then(n.bind(n,5537))},"@site/docs/gettingstarted/mavenanttask.md",5537],a6aa9e1f:[function(){return Promise.all([n.e(532),n.e(1142),n.e(3089)]).then(n.bind(n,46))},"@theme/BlogListPage",46],a7023ddc:[function(){return n.e(1713).then(n.t.bind(n,3457,19))},"~blog/default/blog-tags-tags-4c2.json",3457],a74a2902:[function(){return n.e(5648).then(n.bind(n,2091))},"@site/docs/rules/empty-blocks.md",2091],a8a3190f:[function(){return n.e(6262).then(n.bind(n,5083))},"@site/docs/rules/performance.md",5083],a9cc6c1a:[function(){return n.e(4284).then(n.t.bind(n,5745,19))},"/home/runner/work/detekt/detekt/website/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",5745],aad0aa44:[function(){return n.e(4902).then(n.t.bind(n,4469,19))},"/home/runner/work/detekt/detekt/website/.docusaurus/docusaurus-plugin-content-blog/default/plugin-route-context-module-100.json",4469],aee7a483:[function(){return n.e(1395).then(n.bind(n,2248))},"@site/blog/2018-02-11-website-online.md?truncated=true",2248],b11bad44:[function(){return n.e(6221).then(n.t.bind(n,2030,19))},"~blog/default/blog-tags-news-9e6.json",2030],b2374579:[function(){return n.e(1119).then(n.bind(n,240))},"@site/blog/2019-03-03-build-upon-the-default-config.md?truncated=true",240],b2b675dd:[function(){return n.e(533).then(n.t.bind(n,8017,19))},"~blog/default/blog-c06.json",8017],b2f554cd:[function(){return n.e(1477).then(n.t.bind(n,10,19))},"~blog/default/blog-archive-80c.json",10],b3d3aa70:[function(){return n.e(8971).then(n.bind(n,617))},"@site/blog/2019-06-29-using-detekt-snapshots.md?truncated=true",617],b689ddcd:[function(){return n.e(8943).then(n.t.bind(n,7085,19))},"/home/runner/work/detekt/detekt/website/.docusaurus/docusaurus-theme-search-algolia/default/plugin-route-context-module-100.json",7085],c4f5d8e4:[function(){return Promise.all([n.e(532),n.e(4195)]).then(n.bind(n,9335))},"@site/src/pages/index.js",9335],c7e442c8:[function(){return n.e(1466).then(n.bind(n,8362))},"@site/docs/introduction/reporting.md",8362],ca539021:[function(){return n.e(4100).then(n.bind(n,8488))},"@site/docs/gettingstarted/gradle.mdx",8488],ccc49370:[function(){return Promise.all([n.e(532),n.e(1142),n.e(6103)]).then(n.bind(n,8166))},"@theme/BlogPostPage",8166],cfb1619e:[function(){return n.e(4685).then(n.t.bind(n,6550,19))},"~blog/default/blog-tags-guides-c2f-list.json",6550],d3ffa58f:[function(){return n.e(2199).then(n.bind(n,8170))},"@site/docs/introduction/compose.md",8170],d640b5a6:[function(){return n.e(3954).then(n.bind(n,8442))},"@site/docs/gettingstarted/gradletask.md",8442],dced5fe6:[function(){return n.e(7571).then(n.bind(n,8800))},"@site/docs/introduction/suppressing-rules.md",8800],e174dfcc:[function(){return n.e(6366).then(n.bind(n,7926))},"@site/docs/rules/comments.md",7926],e61da2af:[function(){return n.e(3125).then(n.bind(n,9401))},"@site/blog/2019-03-03-build-upon-the-default-config.md",9401],e9eeb40d:[function(){return n.e(2101).then(n.bind(n,7264))},"@site/blog/2018-02-11-website-online.md",7264],f8409a7e:[function(){return n.e(3206).then(n.bind(n,9568))},"@site/docs/intro.mdx",9568]};function s(e){var t=e.error,n=e.retry,a=e.pastDelay;return t?r.createElement("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"}},r.createElement("p",null,String(t)),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},"Retry"))):a?r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},r.createElement("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb"},r.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"8"},r.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}))))):null}var c=n(9670),d=n(226);function f(e,t){if("*"===e)return i()({loading:s,loader:function(){return n.e(4972).then(n.bind(n,4972))},modules:["@theme/NotFound"],webpack:function(){return[4972]},render:function(e,t){var n=e.default;return r.createElement(d.z,{value:{plugin:{name:"native",id:"default"}}},r.createElement(n,t))}});var o=l[e+"-"+t],f={},p=[],m=[],g=(0,c.Z)(o);return Object.entries(g).forEach((function(e){var t=e[0],n=e[1],r=u[n];r&&(f[t]=r[0],p.push(r[1]),m.push(r[2]))})),i().Map({loading:s,loader:f,modules:p,webpack:function(){return m},render:function(t,n){var i=JSON.parse(JSON.stringify(o));Object.entries(t).forEach((function(t){var n=t[0],r=t[1],a=r.default;if(!a)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((function(e){return"default"!==e})).forEach((function(e){a[e]=r[e]}));var o=i,l=n.split(".");l.slice(0,-1).forEach((function(e){o=o[e]})),o[l[l.length-1]]=a}));var l=i.__comp;delete i.__comp;var u=i.__context;return delete i.__context,r.createElement(d.z,{value:u},r.createElement(l,(0,a.Z)({},i,n)))}})}var p=[{path:"/blog",component:f("/blog","b4a"),exact:!0},{path:"/blog/2018/02/11/website-online",component:f("/blog/2018/02/11/website-online","699"),exact:!0},{path:"/blog/2019/03/03/build-upon-the-default-config",component:f("/blog/2019/03/03/build-upon-the-default-config","9c0"),exact:!0},{path:"/blog/2019/03/03/configure-detekt-on-root-project",component:f("/blog/2019/03/03/configure-detekt-on-root-project","892"),exact:!0},{path:"/blog/2019/06/08/migrating-the-test-pattern",component:f("/blog/2019/06/08/migrating-the-test-pattern","342"),exact:!0},{path:"/blog/2019/06/29/using-detekt-snapshots",component:f("/blog/2019/06/29/using-detekt-snapshots","74e"),exact:!0},{path:"/blog/2019/08/04/calling-it-one-zero",component:f("/blog/2019/08/04/calling-it-one-zero","195"),exact:!0},{path:"/blog/2019/08/14/custom-console-reports",component:f("/blog/2019/08/14/custom-console-reports","5b1"),exact:!0},{path:"/blog/2020/09/27/additional-diff-config-task",component:f("/blog/2020/09/27/additional-diff-config-task","ca5"),exact:!0},{path:"/blog/archive",component:f("/blog/archive","934"),exact:!0},{path:"/blog/tags",component:f("/blog/tags","280"),exact:!0},{path:"/blog/tags/guides",component:f("/blog/tags/guides","0f0"),exact:!0},{path:"/blog/tags/news",component:f("/blog/tags/news","69a"),exact:!0},{path:"/search",component:f("/search","cf4"),exact:!0},{path:"/docs",component:f("/docs","f1d"),routes:[{path:"/docs/gettingstarted/cli",component:f("/docs/gettingstarted/cli","9fe"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/gettingstarted/git-pre-commit-hook",component:f("/docs/gettingstarted/git-pre-commit-hook","ea9"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/gettingstarted/gradle",component:f("/docs/gettingstarted/gradle","92d"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/gettingstarted/gradletask",component:f("/docs/gettingstarted/gradletask","4ca"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/gettingstarted/mavenanttask",component:f("/docs/gettingstarted/mavenanttask","f32"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/gettingstarted/type-resolution",component:f("/docs/gettingstarted/type-resolution","05f"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/intro",component:f("/docs/intro","efa"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/introduction/baseline",component:f("/docs/introduction/baseline","553"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/introduction/changelog",component:f("/docs/introduction/changelog","184"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/introduction/changelog-rc",component:f("/docs/introduction/changelog-rc","215"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/introduction/compatibility",component:f("/docs/introduction/compatibility","864"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/introduction/compose",component:f("/docs/introduction/compose","23c"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/introduction/configurations",component:f("/docs/introduction/configurations","6f6"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/introduction/extensions",component:f("/docs/introduction/extensions","011"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/introduction/reporting",component:f("/docs/introduction/reporting","187"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/introduction/snapshots",component:f("/docs/introduction/snapshots","827"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/introduction/suppressing-rules",component:f("/docs/introduction/suppressing-rules","561"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/introduction/suppressors",component:f("/docs/introduction/suppressors","694"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/rules/comments",component:f("/docs/rules/comments","6b9"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/rules/complexity",component:f("/docs/rules/complexity","474"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/rules/coroutines",component:f("/docs/rules/coroutines","8cc"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/rules/empty-blocks",component:f("/docs/rules/empty-blocks","6c0"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/rules/exceptions",component:f("/docs/rules/exceptions","b24"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/rules/formatting",component:f("/docs/rules/formatting","7a4"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/rules/naming",component:f("/docs/rules/naming","f48"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/rules/performance",component:f("/docs/rules/performance","0a2"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/rules/potential-bugs",component:f("/docs/rules/potential-bugs","2f8"),exact:!0,sidebar:"defaultSidebar"},{path:"/docs/rules/style",component:f("/docs/rules/style","c7d"),exact:!0,sidebar:"defaultSidebar"}]},{path:"/",component:f("/","83a"),exact:!0},{path:"*",component:f("*")}]},8934:function(e,t,n){"use strict";n.d(t,{_:function(){return a},t:function(){return o}});var r=n(7294),a=r.createContext(!1);function o(e){var t=e.children,n=(0,r.useState)(!1),o=n[0],i=n[1];return(0,r.useEffect)((function(){i(!0)}),[]),r.createElement(a.Provider,{value:o},t)}},9383:function(e,t,n){"use strict";var r=n(7294),a=n(3935),o=n(3727),i=n(405),l=n(412),u=[n(2497),n(3310),n(6743),n(8320),n(2295)],s=n(723),c=n(6775),d=n(8790);function f(e){var t=e.children;return r.createElement(r.Fragment,null,t)}var p=n(3117),m=n(5742),g=n(2263),h=n(4996),b=n(4711),v=n(6668),y=n(9727),w=n(833),k=n(3320),E=n(197);function S(){var e=(0,g.Z)().i18n,t=e.defaultLocale,n=e.localeConfigs,a=(0,b.l)();return r.createElement(m.Z,null,Object.entries(n).map((function(e){var t=e[0],n=e[1].htmlLang;return r.createElement("link",{key:t,rel:"alternate",href:a.createUrl({locale:t,fullyQualified:!0}),hrefLang:n})})),r.createElement("link",{rel:"alternate",href:a.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}))}function x(e){var t=e.permalink,n=(0,g.Z)().siteConfig.url,a=function(){var e=(0,g.Z)().siteConfig.url,t=(0,c.TH)().pathname;return e+(0,h.Z)(t)}(),o=t?""+n+t:a;return r.createElement(m.Z,null,r.createElement("meta",{property:"og:url",content:o}),r.createElement("link",{rel:"canonical",href:o}))}function _(){var e=(0,g.Z)().i18n.currentLocale,t=(0,v.L)(),n=t.metadata,a=t.image;return r.createElement(r.Fragment,null,r.createElement(m.Z,null,r.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),r.createElement("body",{className:y.h})),a&&r.createElement(w.d,{image:a}),r.createElement(x,null),r.createElement(S,null),r.createElement(E.Z,{tag:k.HX,locale:e}),r.createElement(m.Z,null,n.map((function(e,t){return r.createElement("meta",(0,p.Z)({key:t},e))}))))}var C=new Map;function T(e){if(C.has(e.pathname))return Object.assign({},e,{pathname:C.get(e.pathname)});if((0,d.f)(s.Z,e.pathname).some((function(e){return!0===e.route.exact})))return C.set(e.pathname,e.pathname),e;var t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return C.set(e.pathname,t),Object.assign({},e,{pathname:t})}var N=n(8934),L=n(8940),P=n(1073);function A(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

\n

We suggest trying baseUrl =

\n\n'}(e)).replace(/0)&&(B.current.unobserve(e),B.current.disconnect(),null!=R&&window.docusaurus.prefetch(R))}))})),B.current.observe(e))},to:R},g&&{isActive:y,activeClassName:v}))}var g=o.forwardRef(m)},5999:function(e,t,n){"use strict";n.d(t,{Z:function(){return u},I:function(){return l}});var r=n(7294);function a(e,t){var n=e.split(/(\{\w+\})/).map((function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e}));return n.some((function(e){return(0,r.isValidElement)(e)}))?n.map((function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e})).filter((function(e){return""!==e})):n.join("")}var o=n(7529);function i(e){var t,n,r=e.id,a=e.message;if(void 0===r&&void 0===a)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=o[null!=r?r:a])?n:a)?t:r}function l(e,t){return a(i({message:e.message,id:e.id}),t)}function u(e){var t=e.children,n=e.id,o=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var l=i({message:t,id:n});return r.createElement(r.Fragment,null,a(l,o))}},9935:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var r="default"},3919:function(e,t,n){"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{Z:function(){return a},b:function(){return r}})},4996:function(e,t,n){"use strict";n.d(t,{C:function(){return o},Z:function(){return i}});var r=n(2263),a=n(3919);function o(){var e=(0,r.Z)().siteConfig,t=e.baseUrl,n=e.url;return{withBaseUrl:function(e,r){return function(e,t,n,r){var o=void 0===r?{}:r,i=o.forcePrependBaseUrl,l=void 0!==i&&i,u=o.absolute,s=void 0!==u&&u;if(!n||n.startsWith("#")||(0,a.b)(n))return n;if(l)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;var c=n.startsWith(t)?n:t+n.replace(/^\//,"");return s?e+c:c}(n,t,e,r)}}}function i(e,t){return void 0===t&&(t={}),(0,o().withBaseUrl)(e,t)}},2263:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7294),a=n(8940);function o(){return(0,r.useContext)(a._)}},2389:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7294),a=n(8934);function o(){return(0,r.useContext)(a._)}},9670:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(e){var t={};return function e(n,r){Object.entries(n).forEach((function(n){var a,o=n[0],i=n[1],l=r?r+"."+o:o;"object"==typeof(a=i)&&a&&Object.keys(a).length>0?e(i,l):t[l]=i}))}(e),t}},226:function(e,t,n){"use strict";n.d(t,{_:function(){return a},z:function(){return o}});var r=n(7294),a=r.createContext(null);function o(e){var t=e.children,n=e.value,o=r.useContext(a),i=(0,r.useMemo)((function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:o,value:n})}),[o,n]);return r.createElement(a.Provider,{value:i},t)}},143:function(e,t,n){"use strict";n.d(t,{Iw:function(){return b},gA:function(){return p},WS:function(){return m},_r:function(){return d},Jo:function(){return v},zh:function(){return f},yW:function(){return h},gB:function(){return g}});var r=n(6775),a=n(2263),o=n(9935);function i(e,t){void 0===t&&(t={});var n=(0,a.Z)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var l=function(e){return e.versions.find((function(e){return e.isLast}))};function u(e,t){var n=l(e);return[].concat(e.versions.filter((function(e){return e!==n})),[n]).find((function(e){return!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})}))}function s(e,t){var n,a,o=u(e,t),i=null==o?void 0:o.docs.find((function(e){return!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:o,activeDoc:i,alternateDocVersions:i?(n=i.id,a={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===n&&(a[e.name]=t)}))})),a):{}}}var c={},d=function(){var e;return null!=(e=i("docusaurus-plugin-content-docs"))?e:c},f=function(e){return function(e,t,n){void 0===t&&(t=o.m),void 0===n&&(n={});var r=i(e),a=null==r?void 0:r[t];if(!a&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return a}("docusaurus-plugin-content-docs",e,{failfast:!0})};function p(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var a=Object.entries(e).sort((function(e,t){return t[1].path.localeCompare(e[1].path)})).find((function(e){var n=e[1];return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map((function(e){return e.path})).join(", "));return o}(d(),(0,r.TH)().pathname,e)}function m(e){void 0===e&&(e={});var t=p(e),n=(0,r.TH)().pathname;if(t)return{activePlugin:t,activeVersion:u(t.pluginData,n)}}function g(e){return f(e).versions}function h(e){var t=f(e);return l(t)}function b(e){return s(f(e),(0,r.TH)().pathname)}function v(e){return function(e,t){var n=l(e);return{latestDocSuggestion:s(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(f(e),(0,r.TH)().pathname)}},8320:function(e,t,n){"use strict";n.r(t);var r=n(4865),a=n.n(r);a().configure({showSpinner:!1});var o={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout((function(){a().start()}),200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){a().done()}};t.default=o},3310:function(e,t,n){"use strict";n.r(t);var r,a,o=n(7410),i=n(6809);r=o.Z,a=i.default.themeConfig.prism.additionalLanguages,globalThis.Prism=r,a.forEach((function(e){n(6794)("./prism-"+e)})),delete globalThis.Prism},8483:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7294),a="iconExternalLink_lCJq";function o(e){var t=e.width,n=void 0===t?13.5:t,o=e.height,i=void 0===o?13.5:o;return r.createElement("svg",{width:n,height:i,"aria-hidden":"true",viewBox:"0 0 24 24",className:a},r.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},3659:function(e,t,n){"use strict";n.d(t,{Z:function(){return Ft}});var r=n(7294),a=n(6010),o=n(4763),i=n(9727),l=n(833),u=n(5281),s=n(5999),c=n(6775),d=n(5936);function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}var p="skipToContent_fXgn";function m(){var e=function(){var e=(0,r.useRef)(null),t=(0,c.k6)().action,n=(0,r.useCallback)((function(e){var t;e.preventDefault();var n=null!=(t=document.querySelector("main:first-of-type"))?t:document.querySelector("."+u.k.wrapper.main);n&&f(n)}),[]);return(0,d.S)((function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,handleSkip:n}}(),t=e.containerRef,n=e.handleSkip;return r.createElement("div",{ref:t,role:"region"},r.createElement("a",{href:"#",className:p,onClick:n},r.createElement(s.Z,{id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"},"Skip to main content")))}var g=n(9689),h=n(6668),b=n(3117),v=n(102),y=["width","height","color","strokeWidth","className"];function w(e){var t=e.width,n=void 0===t?21:t,a=e.height,o=void 0===a?21:a,i=e.color,l=void 0===i?"currentColor":i,u=e.strokeWidth,s=void 0===u?1.2:u,c=(e.className,(0,v.Z)(e,y));return r.createElement("svg",(0,b.Z)({viewBox:"0 0 15 15",width:n,height:o},c),r.createElement("g",{stroke:l,strokeWidth:s},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}var k="announcementBar_mb4j",E="announcementBarPlaceholder_vyr4",S="announcementBarClose_gvF7",x="announcementBarContent_xLdY";function _(){var e=(0,g.nT)(),t=e.isActive,n=e.close,o=(0,h.L)().announcementBar;if(!t)return null;var i=o.content,l=o.backgroundColor,u=o.textColor,c=o.isCloseable;return r.createElement("div",{className:k,style:{backgroundColor:l,color:u},role:"banner"},c&&r.createElement("div",{className:E}),r.createElement("div",{className:x,dangerouslySetInnerHTML:{__html:i}}),c?r.createElement("button",{type:"button",className:(0,a.Z)("clean-btn close",S),onClick:n,"aria-label":(0,s.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},r.createElement(w,{width:14,height:14,strokeWidth:3.1})):null)}var C=n(2961),T=n(2466);var N=n(4700),L=n(3102),P=r.createContext(null);function A(e){var t,n,a,o,i,l,u,s=e.children,c=(t=(0,C.e)(),n=(0,L.HY)(),a=(0,r.useState)(!1),o=a[0],i=a[1],l=null!==n.component,u=(0,N.D9)(l),(0,r.useEffect)((function(){l&&!u&&i(!0)}),[l,u]),(0,r.useEffect)((function(){l?t.shown||i(!0):i(!1)}),[t.shown,l]),(0,r.useMemo)((function(){return[o,i]}),[o]));return r.createElement(P.Provider,{value:c},s)}function O(e){if(e.component){var t=e.component;return r.createElement(t,e.props)}}function I(){var e=(0,r.useContext)(P);if(!e)throw new N.i6("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],a=(0,r.useCallback)((function(){return n(!1)}),[n]),o=(0,L.HY)();return(0,r.useMemo)((function(){return{shown:t,hide:a,content:O(o)}}),[a,o,t])}function R(e){var t=e.header,n=e.primaryMenu,o=e.secondaryMenu,i=I().shown;return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,a.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},o)))}var D=n(2949),M=n(2389);function F(e){return r.createElement("svg",(0,b.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"}))}function B(e){return r.createElement("svg",(0,b.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"}))}var z={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function U(e){var t=e.className,n=e.value,o=e.onChange,i=(0,M.Z)(),l=(0,s.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===n?(0,s.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,s.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,a.Z)(z.toggle,t)},r.createElement("button",{className:(0,a.Z)("clean-btn",z.toggleButton,!i&&z.toggleButtonDisabled),type:"button",onClick:function(){return o("dark"===n?"light":"dark")},disabled:!i,title:l,"aria-label":l},r.createElement(F,{className:(0,a.Z)(z.toggleIcon,z.lightToggleIcon)}),r.createElement(B,{className:(0,a.Z)(z.toggleIcon,z.darkToggleIcon)})))}var j=r.memo(U);function $(e){var t=e.className,n=(0,h.L)().colorMode.disableSwitch,a=(0,D.I)(),o=a.colorMode,i=a.setColorMode;return n?null:r.createElement(j,{className:t,value:o,onChange:i})}var Z=n(1327);function H(){return r.createElement(Z.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function V(){var e=(0,C.e)();return r.createElement("button",{type:"button",className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()}},r.createElement(w,{color:"var(--ifm-color-emphasis-600)"}))}function W(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(H,null),r.createElement($,{className:"margin-right--md"}),r.createElement(V,null))}var G=n(9960),q=n(4996),Y=n(3919),K=n(8022),Q=n(8483),X=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function J(e){var t=e.activeBasePath,n=e.activeBaseRegex,a=e.to,o=e.href,i=e.label,l=e.html,u=e.isDropdownLink,s=e.prependBaseUrlToHref,c=(0,v.Z)(e,X),d=(0,q.Z)(a),f=(0,q.Z)(t),p=(0,q.Z)(o,{forcePrependBaseUrl:!0}),m=i&&o&&!(0,Y.Z)(o),g=l?{dangerouslySetInnerHTML:{__html:l}}:{children:r.createElement(r.Fragment,null,i,m&&r.createElement(Q.Z,u&&{width:12,height:12}))};return o?r.createElement(G.Z,(0,b.Z)({href:s?p:o},c,g)):r.createElement(G.Z,(0,b.Z)({to:d,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?(0,K.F)(n,t.pathname):t.pathname.startsWith(f)}},c,g))}var ee=["className","isDropdownItem"],te=["className","isDropdownItem"],ne=["mobile","position"];function re(e){var t=e.className,n=e.isDropdownItem,o=void 0!==n&&n,i=(0,v.Z)(e,ee),l=r.createElement(J,(0,b.Z)({className:(0,a.Z)(o?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:o},i));return o?r.createElement("li",null,l):l}function ae(e){var t=e.className,n=(e.isDropdownItem,(0,v.Z)(e,te));return r.createElement("li",{className:"menu__list-item"},r.createElement(J,(0,b.Z)({className:(0,a.Z)("menu__link",t)},n)))}function oe(e){var t,n=e.mobile,a=void 0!==n&&n,o=(e.position,(0,v.Z)(e,ne)),i=a?ae:re;return r.createElement(i,(0,b.Z)({},o,{activeClassName:null!=(t=o.activeClassName)?t:a?"menu__link--active":"navbar__link--active"}))}var ie=n(8596),le=n(2263);var ue=n(6043),se=["items","position","className","onClick"],ce=["items","className","position","onClick"],de=["mobile"];function fe(e,t){return e.some((function(e){return function(e,t){return!!(0,ie.Mg)(e.to,t)||!!(0,K.F)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)}))}function pe(e){var t,n=e.items,o=e.position,i=e.className,l=(e.onClick,(0,v.Z)(e,se)),u=(0,r.useRef)(null),s=(0,r.useState)(!1),c=s[0],d=s[1];return(0,r.useEffect)((function(){var e=function(e){u.current&&!u.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[u]),r.createElement("div",{ref:u,className:(0,a.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===o,"dropdown--show":c})},r.createElement(J,(0,b.Z)({"aria-haspopup":"true","aria-expanded":c,role:"button",href:l.to?void 0:"#",className:(0,a.Z)("navbar__link",i)},l,{onClick:l.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),d(!c))}}),null!=(t=l.children)?t:l.label),r.createElement("ul",{className:"dropdown__menu"},n.map((function(e,t){return r.createElement(Ke,(0,b.Z)({isDropdownItem:!0,onKeyDown:function(e){if(t===n.length-1&&"Tab"===e.key){e.preventDefault(),d(!1);var r=u.current.nextElementSibling;if(r)(r instanceof HTMLAnchorElement?r:r.querySelector("a")).focus()}},activeClassName:"dropdown__link--active"},e,{key:t}))}))))}function me(e){var t,n,o=e.items,i=e.className,l=(e.position,e.onClick),u=(0,v.Z)(e,ce),s=(n=(0,le.Z)().siteConfig.baseUrl,(0,c.TH)().pathname.replace(n,"/")),d=fe(o,s),f=(0,ue.u)({initialState:function(){return!d}}),p=f.collapsed,m=f.toggleCollapsed,g=f.setCollapsed;return(0,r.useEffect)((function(){d&&g(!d)}),[s,d,g]),r.createElement("li",{className:(0,a.Z)("menu__list-item",{"menu__list-item--collapsed":p})},r.createElement(J,(0,b.Z)({role:"button",className:(0,a.Z)("menu__link menu__link--sublist menu__link--sublist-caret",i)},u,{onClick:function(e){e.preventDefault(),m()}}),null!=(t=u.children)?t:u.label),r.createElement(ue.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:p},o.map((function(e,t){return r.createElement(Ke,(0,b.Z)({mobile:!0,isDropdownItem:!0,onClick:l,activeClassName:"menu__link--active"},e,{key:t}))}))))}function ge(e){var t=e.mobile,n=void 0!==t&&t,a=(0,v.Z)(e,de),o=n?me:pe;return r.createElement(o,a)}var he=n(4711),be=["width","height"];function ve(e){var t=e.width,n=void 0===t?20:t,a=e.height,o=void 0===a?20:a,i=(0,v.Z)(e,be);return r.createElement("svg",(0,b.Z)({viewBox:"0 0 24 24",width:n,height:o,"aria-hidden":!0},i),r.createElement("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"}))}var ye="iconLanguage_nlXk",we=["mobile","dropdownItemsBefore","dropdownItemsAfter"];var ke=n(3935),Ee=n(5742),Se=n(6177);function xe(){return r.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},r.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}var _e=n(830),Ce=["translations"];function Te(){return Te=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Le="Ctrl";var Pe=r.forwardRef((function(e,t){var n=e.translations,a=void 0===n?{}:n,o=Ne(e,Ce),i=a.buttonText,l=void 0===i?"Search":i,u=a.buttonAriaLabel,s=void 0===u?"Search":u,c=(0,r.useMemo)((function(){return"undefined"!=typeof navigator?/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?"\u2318":Le:null}),[]);return r.createElement("button",Te({type:"button",className:"DocSearch DocSearch-Button","aria-label":s},o,{ref:t}),r.createElement("span",{className:"DocSearch-Button-Container"},r.createElement(_e.W,null),r.createElement("span",{className:"DocSearch-Button-Placeholder"},l)),r.createElement("span",{className:"DocSearch-Button-Keys"},null!==c&&r.createElement(r.Fragment,null,r.createElement("kbd",{className:"DocSearch-Button-Key"},c===Le?r.createElement(xe,null):c),r.createElement("kbd",{className:"DocSearch-Button-Key"},"K"))))})),Ae=n(3320);var Oe=["contextualSearch","externalUrlRegex"],Ie=null;function Re(e){var t=e.hit,n=e.children;return r.createElement(G.Z,{to:t.url},n)}function De(e){var t=e.state,n=e.onClose,a=(0,Se.O)().generateSearchPageLink;return r.createElement(G.Z,{to:a(t.query),onClick:n},r.createElement(s.Z,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits}},"See all {count} results"))}function Me(e){var t,a,o,i,l,u=e.contextualSearch,d=e.externalUrlRegex,f=(0,v.Z)(e,Oe),p=(0,le.Z)().siteMetadata,m=["language:"+(o=(0,Ae._q)()).locale,o.tags.map((function(e){return"docusaurus_tag:"+e}))],g=null!=(t=null==(a=f.searchParameters)?void 0:a.facetFilters)?t:[],h=u?(i=g,[].concat((l=function(e){return"string"==typeof e?[e]:e})(m),l(i))):g,y=Object.assign({},f.searchParameters,{facetFilters:h}),w=(0,q.C)().withBaseUrl,k=(0,c.k6)(),E=(0,r.useRef)(null),S=(0,r.useRef)(null),x=(0,r.useState)(!1),_=x[0],C=x[1],T=(0,r.useState)(void 0),N=T[0],L=T[1],P=(0,r.useCallback)((function(){return Ie?Promise.resolve():Promise.all([n.e(3562).then(n.bind(n,3562)),Promise.all([n.e(532),n.e(6945)]).then(n.bind(n,6945)),Promise.all([n.e(532),n.e(8894)]).then(n.bind(n,8894))]).then((function(e){var t=e[0].DocSearchModal;Ie=t}))}),[]),A=(0,r.useCallback)((function(){P().then((function(){E.current=document.createElement("div"),document.body.insertBefore(E.current,document.body.firstChild),C(!0)}))}),[P,C]),O=(0,r.useCallback)((function(){var e;C(!1),null==(e=E.current)||e.remove()}),[C]),I=(0,r.useCallback)((function(e){P().then((function(){C(!0),L(e.key)}))}),[P,C,L]),R=(0,r.useRef)({navigate:function(e){var t=e.itemUrl;(0,K.F)(d,t)?window.location.href=t:k.push(t)}}).current,D=(0,r.useRef)((function(e){return e.map((function(e){if((0,K.F)(d,e.url))return e;var t=new URL(e.url);return Object.assign({},e,{url:w(""+t.pathname+t.hash)})}))})).current,M=(0,r.useMemo)((function(){return function(e){return r.createElement(De,(0,b.Z)({},e,{onClose:O}))}}),[O]),F=(0,r.useCallback)((function(e){return e.addAlgoliaAgent("docusaurus",p.docusaurusVersion),e}),[p.docusaurusVersion]);!function(e){var t=e.isOpen,n=e.onOpen,a=e.onClose,o=e.onInput,i=e.searchButtonRef;r.useEffect((function(){function e(e){(27===e.keyCode&&t||"k"===e.key&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)&&(e.preventDefault(),t?a():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||n()),i&&i.current===document.activeElement&&o&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&o(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,a,o,i])}({isOpen:_,onOpen:A,onClose:O,onInput:I,searchButtonRef:S});var B=(0,s.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"});return r.createElement(r.Fragment,null,r.createElement(Ee.Z,null,r.createElement("link",{rel:"preconnect",href:"https://"+f.appId+"-dsn.algolia.net",crossOrigin:"anonymous"})),r.createElement(Pe,{onTouchStart:P,onFocus:P,onMouseOver:P,onClick:A,ref:S,translations:{buttonText:B,buttonAriaLabel:B}}),_&&Ie&&E.current&&(0,ke.createPortal)(r.createElement(Ie,(0,b.Z)({onClose:O,initialScrollY:window.scrollY,initialQuery:N,navigator:R,transformItems:D,hitComponent:Re,transformSearchClient:F},f.searchPagePath&&{resultsFooterComponent:M},f,{searchParameters:y})),E.current))}function Fe(){var e=(0,le.Z)().siteConfig;return r.createElement(Me,e.themeConfig.algolia)}var Be="searchBox_ZlJk";function ze(e){var t=e.children,n=e.className;return r.createElement("div",{className:(0,a.Z)(n,Be)},t)}var Ue=n(143),je=n(3651),$e=["docId","label","docsPluginId"];var Ze=["sidebarId","label","docsPluginId"];var He=["label","to","docsPluginId"];var Ve=n(373),We=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"],Ge=function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))};var qe={default:oe,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,a=e.dropdownItemsAfter,o=(0,v.Z)(e,we),i=(0,le.Z)().i18n,l=i.currentLocale,u=i.locales,c=i.localeConfigs,d=(0,he.l)(),f=u.map((function(e){var n="pathname://"+d.createUrl({locale:e,fullyQualified:!1});return{label:c[e].label,to:n,target:"_self",autoAddBaseUrl:!1,className:e===l?t?"menu__link--active":"dropdown__link--active":""}})),p=[].concat(n,f,a),m=t?(0,s.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):c[l].label;return r.createElement(ge,(0,b.Z)({},o,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(ve,{className:ye}),m),items:p}))},search:function(e){var t=e.mobile,n=e.className;return t?null:r.createElement(ze,{className:n},r.createElement(Fe,null))},dropdown:ge,html:function(e){var t=e.value,n=e.className,o=e.mobile,i=void 0!==o&&o,l=e.isDropdownItem,u=void 0!==l&&l,s=u?"li":"div";return r.createElement(s,{className:(0,a.Z)({navbar__item:!i&&!u,"menu__list-item":i},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,a=e.docsPluginId,o=(0,v.Z)(e,$e),i=(0,Ue.Iw)(a).activeDoc,l=(0,je.vY)(t,a);return null===l?null:r.createElement(oe,(0,b.Z)({exact:!0},o,{isActive:function(){return(null==i?void 0:i.path)===l.path||!(null==i||!i.sidebar)&&i.sidebar===l.sidebar},label:null!=n?n:l.id,to:l.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,a=e.docsPluginId,o=(0,v.Z)(e,Ze),i=(0,Ue.Iw)(a).activeDoc,l=(0,je.oz)(t,a).link;if(!l)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return r.createElement(oe,(0,b.Z)({exact:!0},o,{isActive:function(){return(null==i?void 0:i.sidebar)===t},label:null!=n?n:l.label,to:l.path}))},docsVersion:function(e){var t=e.label,n=e.to,a=e.docsPluginId,o=(0,v.Z)(e,He),i=(0,je.lO)(a)[0],l=null!=t?t:i.label,u=null!=n?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(i).path;return r.createElement(oe,(0,b.Z)({},o,{label:l,to:u}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,a=e.dropdownActiveClassDisabled,o=e.dropdownItemsBefore,i=e.dropdownItemsAfter,l=(0,v.Z)(e,We),u=(0,Ue.Iw)(n),c=(0,Ue.gB)(n),d=(0,Ve.J)(n).savePreferredVersionName,f=c.map((function(e){var t,n=null!=(t=u.alternateDocVersions[e.name])?t:Ge(e);return{label:e.label,to:n.path,isActive:function(){return e===u.activeVersion},onClick:function(){return d(e.name)}}})),p=[].concat(o,f,i),m=(0,je.lO)(n)[0],g=t&&p.length>1?(0,s.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):m.label,h=t&&p.length>1?void 0:Ge(m).path;return p.length<=1?r.createElement(oe,(0,b.Z)({},l,{mobile:t,label:g,to:h,isActive:a?function(){return!1}:void 0})):r.createElement(ge,(0,b.Z)({},l,{mobile:t,label:g,to:h,items:p,isActive:a?function(){return!1}:void 0}))}},Ye=["type"];function Ke(e){var t=e.type,n=(0,v.Z)(e,Ye),a=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=qe[a];if(!o)throw new Error('No NavbarItem component found for type "'+t+'".');return r.createElement(o,n)}function Qe(){var e=(0,C.e)(),t=(0,h.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map((function(t,n){return r.createElement(Ke,(0,b.Z)({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))})))}function Xe(e){return r.createElement("button",(0,b.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(s.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"},"\u2190 Back to main menu"))}function Je(){var e=0===(0,h.L)().navbar.items.length,t=I();return r.createElement(r.Fragment,null,!e&&r.createElement(Xe,{onClick:function(){return t.hide()}}),t.content)}function et(){var e,t=(0,C.e)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e]),t.shouldRender?r.createElement(R,{header:r.createElement(W,null),primaryMenu:r.createElement(Qe,null),secondaryMenu:r.createElement(Je,null)}):null}var tt="navbarHideable_m1mJ",nt="navbarHidden_jGov";function rt(e){return r.createElement("div",(0,b.Z)({role:"presentation"},e,{className:(0,a.Z)("navbar-sidebar__backdrop",e.className)}))}function at(e){var t=e.children,n=(0,h.L)().navbar,o=n.hideOnScroll,i=n.style,l=(0,C.e)(),u=function(e){var t=(0,r.useState)(e),n=t[0],a=t[1],o=(0,r.useRef)(!1),i=(0,r.useRef)(0),l=(0,r.useCallback)((function(e){null!==e&&(i.current=e.getBoundingClientRect().height)}),[]);return(0,T.RF)((function(t,n){var r=t.scrollY;if(e)if(r=l?a(!1):r+s0&&r.createElement(Et,{links:n}),logo:a&&r.createElement(Ct,{logo:a}),copyright:t&&r.createElement(Tt,{copyright:t})})}var Pt=r.memo(Lt),At=n(12),Ot="docusaurus.tab.",It=r.createContext(void 0);function Rt(e){var t=e.children,n=function(){var e=(0,r.useState)({}),t=e[0],n=e[1],a=(0,r.useCallback)((function(e,t){(0,At.W)("docusaurus.tab."+e).set(t)}),[]);(0,r.useEffect)((function(){try{var e={};(0,At._)().forEach((function(t){if(t.startsWith(Ot)){var n=t.substring(Ot.length);e[n]=(0,At.W)(t).get()}})),n(e)}catch(t){console.error(t)}}),[]);var o=(0,r.useCallback)((function(e,t){n((function(n){var r;return Object.assign({},n,((r={})[e]=t,r))})),a(e,t)}),[a]);return(0,r.useMemo)((function(){return{tabGroupChoices:t,setTabGroupChoices:o}}),[t,o])}();return r.createElement(It.Provider,{value:n},t)}function Dt(e){var t=e.children;return r.createElement(D.S,null,r.createElement(g.pl,null,r.createElement(Rt,null,r.createElement(T.OC,null,r.createElement(Ve.L5,null,r.createElement(l.VC,null,r.createElement(ot,null,t)))))))}function Mt(e){var t=e.error,n=e.tryAgain;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(s.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("p",null,t.message),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},r.createElement(s.Z,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again when the page crashed"},"Try again"))))))}function Ft(e){var t=e.children,n=e.noFooter,s=e.wrapperClassName,c=e.title,d=e.description;return(0,i.t)(),r.createElement(Dt,null,r.createElement(l.d,{title:c,description:d}),r.createElement(m,null),r.createElement(_,null),r.createElement(pt,null),r.createElement("div",{className:(0,a.Z)(u.k.wrapper.main,s)},r.createElement(o.Z,{fallback:function(e){return r.createElement(Mt,e)}},t)),!n&&r.createElement(Pt,null))}},1327:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(3117),a=n(102),o=n(7294),i=n(9960),l=n(4996),u=n(2263),s=n(6668),c=n(941),d=["imageClassName","titleClassName"];function f(e){var t=(0,u.Z)().siteConfig.title,n=(0,s.L)().navbar,f=n.title,p=n.logo,m=void 0===p?{src:""}:p,g=e.imageClassName,h=e.titleClassName,b=(0,a.Z)(e,d),v=(0,l.Z)(m.href||"/"),y={light:(0,l.Z)(m.src),dark:(0,l.Z)(m.srcDark||m.src)},w=o.createElement(c.Z,{sources:y,height:m.height,width:m.width,alt:m.alt||f||t});return o.createElement(i.Z,(0,r.Z)({to:v},b,m.target&&{target:m.target}),m.src&&(g?o.createElement("div",{className:g},w):w),null!=f&&o.createElement("b",{className:h},f))}},197:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7294),a=n(5742);function o(e){var t=e.locale,n=e.version,o=e.tag,i=t;return r.createElement(a.Z,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),o&&r.createElement("meta",{name:"docusaurus_tag",content:o}),i&&r.createElement("meta",{name:"docsearch:language",content:i}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),o&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:o}))}},941:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(3117),a=n(102),o=n(7294),i=n(6010),l=n(2389),u=n(2949),s={themedImage:"themedImage_ToTc","themedImage--light":"themedImage--light_HNdA","themedImage--dark":"themedImage--dark_i4oU"},c=["sources","className","alt"];function d(e){var t=(0,l.Z)(),n=(0,u.I)().colorMode,d=e.sources,f=e.className,p=e.alt,m=(0,a.Z)(e,c),g=t?"dark"===n?["dark"]:["light"]:["light","dark"];return o.createElement(o.Fragment,null,g.map((function(e){return o.createElement("img",(0,r.Z)({key:e,src:d[e],alt:p,className:(0,i.Z)(s.themedImage,s["themedImage--"+e],f)},m))})))}},6043:function(e,t,n){"use strict";n.d(t,{u:function(){return s},z:function(){return b}});var r=n(3117),a=n(102),o=n(7294),i=n(412),l=["collapsed"],u=["lazy"];function s(e){var t=e.initialState,n=(0,o.useState)(null!=t&&t),r=n[0],a=n[1],i=(0,o.useCallback)((function(){a((function(e){return!e}))}),[]);return{collapsed:r,setCollapsed:a,toggleCollapsed:i}}var c={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function f(e,t){var n=t?c:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function p(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,a=(0,o.useRef)(!1);(0,o.useEffect)((function(){var e,o=t.current;function i(){var e,t,n=o.scrollHeight,a=null!=(e=null==r?void 0:r.duration)?e:function(e){var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+a+"ms "+(null!=(t=null==r?void 0:r.easing)?t:"ease-in-out"),height:n+"px"}}function l(){var e=i();o.style.transition=e.transition,o.style.height=e.height}if(!a.current)return f(o,n),void(a.current=!0);return o.style.willChange="height",e=requestAnimationFrame((function(){n?(l(),requestAnimationFrame((function(){o.style.height=c.height,o.style.overflow=c.overflow}))):(o.style.display="block",requestAnimationFrame((function(){l()})))})),function(){return cancelAnimationFrame(e)}}),[t,n,r])}function m(e){if(!i.Z.canUseDOM)return e?c:d}function g(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,a=e.children,i=e.animation,l=e.onCollapseTransitionEnd,u=e.className,s=e.disableSSRStyle,c=(0,o.useRef)(null);return p({collapsibleRef:c,collapsed:r,animation:i}),o.createElement(n,{ref:c,style:s?void 0:m(r),onTransitionEnd:function(e){"height"===e.propertyName&&(f(c.current,r),null==l||l(r))},className:u},a)}function h(e){var t=e.collapsed,n=(0,a.Z)(e,l),i=(0,o.useState)(!t),u=i[0],s=i[1],c=(0,o.useState)(t),d=c[0],f=c[1];return(0,o.useLayoutEffect)((function(){t||s(!0)}),[t]),(0,o.useLayoutEffect)((function(){u&&f(t)}),[u,t]),u?o.createElement(g,(0,r.Z)({},n,{collapsed:d})):null}function b(e){var t=e.lazy,n=(0,a.Z)(e,u),r=t?h:g;return o.createElement(r,n)}},9689:function(e,t,n){"use strict";n.d(t,{nT:function(){return m},pl:function(){return p}});var r=n(7294),a=n(2389),o=n(12),i=n(4700),l=n(6668),u=(0,o.W)("docusaurus.announcement.dismiss"),s=(0,o.W)("docusaurus.announcement.id"),c=function(){return"true"===u.get()},d=function(e){return u.set(String(e))},f=r.createContext(null);function p(e){var t=e.children,n=function(){var e=(0,l.L)().announcementBar,t=(0,a.Z)(),n=(0,r.useState)((function(){return!!t&&c()})),o=n[0],i=n[1];(0,r.useEffect)((function(){i(c())}),[]);var u=(0,r.useCallback)((function(){d(!0),i(!0)}),[]);return(0,r.useEffect)((function(){if(e){var t=e.id,n=s.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;s.set(t),r&&d(!1),!r&&c()||i(!1)}}),[e]),(0,r.useMemo)((function(){return{isActive:!!e&&!o,close:u}}),[e,o,u])}();return r.createElement(f.Provider,{value:n},t)}function m(){var e=(0,r.useContext)(f);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},2949:function(e,t,n){"use strict";n.d(t,{I:function(){return h},S:function(){return g}});var r=n(7294),a=n(412),o=n(4700),i=n(12),l=n(6668),u=r.createContext(void 0),s="theme",c=(0,i.W)(s),d="light",f="dark",p=function(e){return e===f?f:d};function m(){var e=(0,l.L)().colorMode,t=e.defaultMode,n=e.disableSwitch,o=e.respectPrefersColorScheme,i=(0,r.useState)(function(e){return a.Z.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e)}(t)),u=i[0],m=i[1];(0,r.useEffect)((function(){n&&c.del()}),[n]);var g=(0,r.useCallback)((function(e,n){void 0===n&&(n={});var r=n.persist,a=void 0===r||r;e?(m(e),a&&function(e){c.set(p(e))}(e)):(m(o?window.matchMedia("(prefers-color-scheme: dark)").matches?f:d:t),c.del())}),[o,t]);(0,r.useEffect)((function(){document.documentElement.setAttribute("data-theme",p(u))}),[u]),(0,r.useEffect)((function(){if(!n){var e=function(e){if(e.key===s){var t=c.get();null!==t&&g(p(t))}};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}}}),[n,g]);var h=(0,r.useRef)(!1);return(0,r.useEffect)((function(){if(!n||o){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(){window.matchMedia("print").matches||h.current?h.current=window.matchMedia("print").matches:g(null)};return e.addListener(t),function(){return e.removeListener(t)}}}),[g,n,o]),(0,r.useMemo)((function(){return{colorMode:u,setColorMode:g,get isDarkTheme(){return u===f},setLightTheme:function(){g(d)},setDarkTheme:function(){g(f)}}}),[u,g])}function g(e){var t=e.children,n=m();return r.createElement(u.Provider,{value:n},t)}function h(){var e=(0,r.useContext)(u);if(null==e)throw new o.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},373:function(e,t,n){"use strict";n.d(t,{J:function(){return y},L5:function(){return b},Oh:function(){return w}});var r=n(7294),a=n(143),o=n(9935),i=n(6668),l=n(3651),u=n(4700),s=n(12),c=function(e){return"docs-preferred-version-"+e},d=function(e,t,n){(0,s.W)(c(e),{persistence:t}).set(n)},f=function(e,t){return(0,s.W)(c(e),{persistence:t}).get()},p=function(e,t){(0,s.W)(c(e),{persistence:t}).del()};var m=r.createContext(null);function g(){var e=(0,a._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((function(){return Object.keys(e)}),[e]),o=(0,r.useState)((function(){return function(e){return Object.fromEntries(e.map((function(e){return[e,{preferredVersionName:null}]})))}(n)})),l=o[0],u=o[1];return(0,r.useEffect)((function(){u(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map((function(e){return[e,(t=e,a=f(t,n),r[t].versions.some((function(e){return e.name===a}))?{preferredVersionName:a}:(p(t,n),{preferredVersionName:null}))];var t,a})))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[l,(0,r.useMemo)((function(){return{savePreferredVersion:function(e,n){d(e,t,n),u((function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))}))}}}),[t])]}function h(e){var t=e.children,n=g();return r.createElement(m.Provider,{value:n},t)}function b(e){var t=e.children;return l.cE?r.createElement(h,null,t):t}function v(){var e=(0,r.useContext)(m);if(!e)throw new u.i6("DocsPreferredVersionContextProvider");return e}function y(e){var t;void 0===e&&(e=o.m);var n=(0,a.zh)(e),i=v(),l=i[0],u=i[1],s=l[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find((function(e){return e.name===s})))?t:null,savePreferredVersionName:(0,r.useCallback)((function(t){u.savePreferredVersion(e,t)}),[u,e])}}function w(){var e=(0,a._r)(),t=v()[0];var n=Object.keys(e);return Object.fromEntries(n.map((function(n){return[n,(r=n,o=e[r],i=t[r].preferredVersionName,null!=(a=o.versions.find((function(e){return e.name===i})))?a:null)];var r,a,o,i})))}},1116:function(e,t,n){"use strict";n.d(t,{V:function(){return u},b:function(){return l}});var r=n(7294),a=n(4700),o=Symbol("EmptyContext"),i=r.createContext(o);function l(e){var t=e.children,n=e.name,a=e.items,o=(0,r.useMemo)((function(){return n&&a?{name:n,items:a}:null}),[n,a]);return r.createElement(i.Provider,{value:o},t)}function u(){var e=(0,r.useContext)(i);if(e===o)throw new a.i6("DocsSidebarProvider");return e}},2961:function(e,t,n){"use strict";n.d(t,{M:function(){return f},e:function(){return p}});var r=n(7294),a=n(3102),o=n(7524),i=n(6775),l=n(4700);function u(e){!function(e){var t=(0,i.k6)().block,n=(0,l.ed)(e);(0,r.useEffect)((function(){return t((function(e,t){return n(e,t)}))}),[t,n])}((function(t,n){if("POP"===n)return e(t,n)}))}var s=n(6668),c=r.createContext(void 0);function d(){var e,t=(e=(0,a.HY)(),0===(0,s.L)().navbar.items.length&&!e.component),n=(0,o.i)(),i=!t&&"mobile"===n,l=(0,r.useState)(!1),c=l[0],d=l[1];u((function(){if(c)return d(!1),!1}));var f=(0,r.useCallback)((function(){d((function(e){return!e}))}),[]);return(0,r.useEffect)((function(){"desktop"===n&&d(!1)}),[n]),(0,r.useMemo)((function(){return{disabled:t,shouldRender:i,toggle:f,shown:c}}),[t,i,f,c])}function f(e){var t=e.children,n=d();return r.createElement(c.Provider,{value:n},t)}function p(){var e=r.useContext(c);if(void 0===e)throw new l.i6("NavbarMobileSidebarProvider");return e}},3102:function(e,t,n){"use strict";n.d(t,{HY:function(){return l},Zo:function(){return u},n2:function(){return i}});var r=n(7294),a=n(4700),o=r.createContext(null);function i(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return r.createElement(o.Provider,{value:n},t)}function l(){var e=(0,r.useContext)(o);if(!e)throw new a.i6("NavbarSecondaryMenuContentProvider");return e[0]}function u(e){var t=e.component,n=e.props,i=(0,r.useContext)(o);if(!i)throw new a.i6("NavbarSecondaryMenuContentProvider");var l,u=i[1],s=(l=n,(0,r.useMemo)((function(){return l}),[].concat(Object.keys(l),Object.values(l))));return(0,r.useEffect)((function(){u({component:t,props:s})}),[u,t,s]),(0,r.useEffect)((function(){return function(){return u({component:null,props:null})}}),[u]),null}},9727:function(e,t,n){"use strict";n.d(t,{h:function(){return a},t:function(){return o}});var r=n(7294),a="navigation-with-keyboard";function o(){(0,r.useEffect)((function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},6177:function(e,t,n){"use strict";n.d(t,{O:function(){return l}});var r=n(7294),a=n(6775),o=n(2263),i="q";function l(){var e=(0,a.k6)(),t=(0,o.Z)().siteConfig.baseUrl,n=(0,r.useState)(""),l=n[0],u=n[1];return(0,r.useEffect)((function(){var e,t=null!=(e=new URLSearchParams(window.location.search).get(i))?e:"";u(t)}),[]),{searchQuery:l,setSearchQuery:(0,r.useCallback)((function(t){var n=new URLSearchParams(window.location.search);t?n.set(i,t):n.delete(i),e.replace({search:n.toString()}),u(t)}),[e]),generateSearchPageLink:(0,r.useCallback)((function(e){return t+"search?"+"q="+encodeURIComponent(e)}),[t])}}},7524:function(e,t,n){"use strict";n.d(t,{i:function(){return s}});var r=n(7294),a=n(412),o="desktop",i="mobile",l="ssr";function u(){return a.Z.canUseDOM?window.innerWidth>996?o:i:l}function s(){var e=(0,r.useState)((function(){return u()})),t=e[0],n=e[1];return(0,r.useEffect)((function(){function e(){n(u())}return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),clearTimeout(undefined)}}),[]),t}},5281:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block"},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{}}},3651:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Wl:function(){return m},_F:function(){return h},cE:function(){return p},hI:function(){return k},lO:function(){return v},vY:function(){return w},oz:function(){return y},s1:function(){return b}});var o=n(7294),i=n(6775),l=n(8790),u=n(143),s=n(373),c=n(1116);function d(e){return Array.from(new Set(e))}var f=n(8596),p=!!u._r;function m(e){if(e.href)return e.href;for(var t,n=a(e.items);!(t=n()).done;){var r=t.value;if("link"===r.type)return r.href;if("category"===r.type){var o=m(r);if(o)return o}}}var g=function(e,t){return void 0!==e&&(0,f.Mg)(e,t)};function h(e,t){return"link"===e.type?g(e.href,t):"category"===e.type&&(g(e.href,t)||function(e,t){return e.some((function(e){return h(e,t)}))}(e.items,t))}function b(){var e,t=(0,c.V)(),n=(0,i.TH)().pathname;if(!1===(null==(e=(0,u.gA)())?void 0:e.pluginData.breadcrumbs)||!t)return null;var r=[];return function e(t){for(var o,i=a(t);!(o=i()).done;){var l=o.value;if("category"===l.type&&((0,f.Mg)(l.href,n)||e(l.items))||"link"===l.type&&(0,f.Mg)(l.href,n))return r.push(l),!0}return!1}(t.items),r.reverse()}function v(e){var t=(0,u.Iw)(e).activeVersion,n=(0,s.J)(e).preferredVersion,r=(0,u.yW)(e);return(0,o.useMemo)((function(){return d([t,n,r].filter(Boolean))}),[t,n,r])}function y(e,t){var n=v(t);return(0,o.useMemo)((function(){var t=n.flatMap((function(e){return e.sidebars?Object.entries(e.sidebars):[]})),r=t.find((function(t){return t[0]===e}));if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\n Available sidebar ids are:\n - '+Object.keys(t).join("\n- "));return r[1]}),[e,n])}function w(e,t){var n=v(t);return(0,o.useMemo)((function(){var t=n.flatMap((function(e){return e.docs})),r=t.find((function(t){return t.id===e}));if(!r){if(n.flatMap((function(e){return e.draftIds})).includes(e))return null;throw new Error("DocNavbarItem: couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\nAvailable doc ids are:\n- '+d(t.map((function(e){return e.id}))).join("\n- "))}return r}),[e,n])}function k(e){var t=e.route,n=e.versionMetadata,r=(0,i.TH)(),a=t.routes,o=a.find((function(e){return(0,i.LX)(r.pathname,e)}));if(!o)return null;var u=o.sidebar,s=u?n.docsSidebars[u]:void 0;return{docElement:(0,l.H)(a,{versionMetadata:n}),sidebarName:u,sidebarItems:s}}},2128:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var r=n(2263);function a(e){var t=(0,r.Z)().siteConfig,n=t.title,a=t.titleDelimiter;return null!=e&&e.trim().length?e.trim()+" "+a+" "+n:n}},833:function(e,t,n){"use strict";n.d(t,{FG:function(){return f},d:function(){return c},VC:function(){return p}});var r=n(7294),a=n(6010),o=n(5742),i=n(226);function l(){var e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var u=n(4996),s=n(2128);function c(e){var t=e.title,n=e.description,a=e.keywords,i=e.image,l=e.children,c=(0,s.p)(t),d=(0,u.C)().withBaseUrl,f=i?d(i,{absolute:!0}):void 0;return r.createElement(o.Z,null,t&&r.createElement("title",null,c),t&&r.createElement("meta",{property:"og:title",content:c}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),a&&r.createElement("meta",{name:"keywords",content:Array.isArray(a)?a.join(","):a}),f&&r.createElement("meta",{property:"og:image",content:f}),f&&r.createElement("meta",{name:"twitter:image",content:f}),l)}var d=r.createContext(void 0);function f(e){var t=e.className,n=e.children,i=r.useContext(d),l=(0,a.Z)(i,t);return r.createElement(d.Provider,{value:l},r.createElement(o.Z,null,r.createElement("html",{className:l})),n)}function p(e){var t=e.children,n=l(),o="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),i="plugin-id-"+n.plugin.id;return r.createElement(f,{className:(0,a.Z)(o,i)},t)}},4700:function(e,t,n){"use strict";n.d(t,{i6:function(){return m},ed:function(){return f},D9:function(){return p}});var r=n(8900),a=n(1073);function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var i=n(9817);function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return u=l()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&(0,i.Z)(a,n.prototype),a},u.apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,i.Z)(r,e)},s(e)}var c=n(7294),d=n(412).Z.canUseDOM?c.useLayoutEffect:c.useEffect;function f(e){var t=(0,c.useRef)(e);return d((function(){t.current=e}),[e]),(0,c.useCallback)((function(){return t.current.apply(t,arguments)}),[])}function p(e){var t=(0,c.useRef)();return d((function(){t.current=e})),t.current}var m=function(e){function t(t,n){var a,o,i,l,u;return(u=e.call(this)||this).name="ReactContextError",u.message="Hook "+(null!=(a=null==(o=u.stack)||null==(i=o.split("\n")[1])||null==(l=i.match((0,r.Z)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:l.groups.name)?a:"")+" is called outside the <"+t+">. "+(null!=n?n:""),u}return(0,a.Z)(t,e),t}(s(Error))},8022:function(e,t,n){"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{F:function(){return r}})},8596:function(e,t,n){"use strict";n.d(t,{Mg:function(){return i},Ns:function(){return l}});var r=n(7294),a=n(723),o=n(2263);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function l(){var e=(0,o.Z)().siteConfig.baseUrl;return(0,r.useMemo)((function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap((function(e){var t;return null!=(t=e.routes)?t:[]})))}(e.routes)}({routes:a.Z,baseUrl:e})}),[e])}},2466:function(e,t,n){"use strict";n.d(t,{Ct:function(){return f},OC:function(){return u},RF:function(){return d}});var r=n(7294),a=n(412),o=n(2389),i=n(4700);var l=r.createContext(void 0);function u(e){var t,n=e.children,a=(t=(0,r.useRef)(!0),(0,r.useMemo)((function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}}),[]));return r.createElement(l.Provider,{value:a},n)}function s(){var e=(0,r.useContext)(l);if(null==e)throw new i.i6("ScrollControllerProvider");return e}var c=function(){return a.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function d(e,t){void 0===t&&(t=[]);var n=s().scrollEventsEnabledRef,a=(0,r.useRef)(c()),o=(0,i.ed)(e);(0,r.useEffect)((function(){var e=function(){if(n.current){var e=c();o(e,a.current),a.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}}),[o,n].concat(t))}function f(){var e=(0,r.useRef)(null),t=(0,o.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var a=document.documentElement.scrollTop;(n&&a>e||!n&&a=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!s)for(;d--;d)i.unshift("..");!s||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m},l=n(2177);function u(e){return"/"===e.charAt(0)?e:"/"+e}function s(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function p(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.Z)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=p(e,t,g(),w.location);c.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t
'};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),s=o.querySelector(r.barSelector),c=r.speed,d=r.easing;return o.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),u(s,i(e,c,d)),1===e?(u(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){u(o,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),l=e?"-100":o(n.status||0),s=document.querySelector(r.parent);return u(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),s!=document.body&&c(s,"nprogress-custom-parent"),s.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),u=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function s(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=f(e),r=n+t;s(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);s(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},7410:function(e,t){"use strict";var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);S+=E.value.length,E=E.next){var x=E.value;if(t.length>e.length)return;if(!(x instanceof a)){var _,C=1;if(v){if(!(_=o(k,S,e,b))||_.index>=e.length)break;var T=_.index,N=_.index+_[0].length,L=S;for(L+=E.value.length;T>=L;)L+=(E=E.next).value.length;if(S=L-=E.value.length,E.value instanceof a)continue;for(var P=E;P!==t.tail&&(Ld.reach&&(d.reach=R);var D=E.prev;if(O&&(D=u(t,D,O),S+=O.length),s(t,D,C),E=u(t,D,new a(f,h?r.tokenize(A,h):A,y,A)),I&&u(t,E,I),C>1){var M={cause:f+","+m,reach:R};i(e,t,n,E.prev,S,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function u(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function s(e,t,n){for(var r=t.next,a=0;a"+o.content+""},r}(),r=n;n.default=n,r.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[t]},n.cdata=/^$/i;var a={"included-cdata":{pattern://i,inside:n}};a["language-"+t]={pattern:/[\s\S]+/,inside:r.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:a},r.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(e,t){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:r.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.c=r.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),r.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),r.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},r.languages.c.string],char:r.languages.c.char,comment:r.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:r.languages.c}}}}),r.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete r.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(r),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(r),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},a={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:a,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:a})}(r),r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(r),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(r),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},u=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(r),r.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:r.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},r.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var l=f(/^\{$/,/^\}$/);if(-1===l)continue;for(var u=n;u=0&&p(s,"variable-input")}}}}function c(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function u(t,n,r){var a={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(a.code,a.grammar),e.hooks.run("after-tokenize",a),a.tokens}function s(t){var n={};n["interpolation-punctuation"]=a;var o=e.tokenize(t,n);if(3===o.length){var i=[1,1];i.push.apply(i,u(o[1],e.languages.javascript,"javascript")),o.splice.apply(o,i)}return new e.Token("interpolation",o,r.alias,t)}function c(t,n,r){var a=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),i=0,c={},d=u(a.map((function(e){if("string"==typeof e)return e;for(var n,a=e.content;-1!==t.indexOf(n=l(i++,r)););return c[n]=a,n})).join(""),n,r),f=Object.keys(c);return i=0,function e(t){for(var n=0;n=f.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=f[i],o="string"==typeof r?r:r.content,l=o.indexOf(a);if(-1!==l){++i;var u=o.substring(0,l),d=s(c[a]),p=o.substring(l+a.length),m=[];if(u&&m.push(u),m.push(d),p){var g=[p];e(g),m.push.apply(m,g)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var h=r.content;Array.isArray(h)?e(h):e([h])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(e){return"string"==typeof e?e:Array.isArray(e)?e.map(f).join(""):f(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,a=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(r),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function o(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return a})),RegExp(e,t)}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},l=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===i(a.content[0].content[1])&&n.pop():"/>"===a.content[a.content.length-1].content||n.push({tagName:i(a.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&n.length>0&&0===n[n.length-1].openedBraces){var u=i(a);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(u=i(t[r-1])+u,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",u,null,u)}a.content&&"string"!=typeof a.content&&l(a.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||l(e.tokens)}))}(r),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(r),r.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},r.languages.go=r.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),r.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete r.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,l=i.length;-1!==n.code.indexOf(a=t(r,l));)++l;return i[l]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(l){for(var u=0;u=o.length);u++){var s=l[u];if("string"==typeof s||s.content&&"string"==typeof s.content){var c=o[a],d=n.tokenStack[c],f="string"==typeof s?s:s.content,p=t(r,c),m=f.indexOf(p);if(m>-1){++a;var g=f.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=f.substring(m+p.length),v=[];g&&v.push.apply(v,i([g])),v.push(h),b&&v.push.apply(v,i([b])),"string"==typeof s?l.splice.apply(l,[u,1].concat(v)):s.content=v}}else s.content&&i(s.content)}return l}(n.tokens)}}}})}(r),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(r),r.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},r.languages.webmanifest=r.languages.json,r.languages.less=r.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),r.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),r.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},r.languages.objectivec=r.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete r.languages.objectivec["class-name"],r.languages.objc=r.languages.objectivec,r.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},r.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},r.languages.python["string-interpolation"].inside.interpolation.inside.rest=r.languages.python,r.languages.py=r.languages.python,r.languages.reason=r.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),r.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete r.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(r),r.languages.scss=r.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),r.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),r.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),r.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),r.languages.scss.atrule.inside.rest=r.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(r),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(r),r.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},t.Z=r},485:function(){!function(e){var t={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),t.inside.expression.inside=e.languages.groovy}(Prism)},2503:function(){!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)},2334:function(){!function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(Prism)},6794:function(e,t,n){var r={"./prism-groovy":485,"./prism-java":2503,"./prism-kotlin":2334};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=6794},2703:function(e,t,n){"use strict";var r=n(414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4448:function(e,t,n){"use strict";var r=n(7294),a=n(3840);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n