@modern-js/module-tools-docs 2.7.0 → 2.7.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/doc_build/api/config/build-config.html +363 -0
- package/doc_build/api/config/build-preset.html +72 -0
- package/doc_build/api/config/design-system.html +114 -0
- package/doc_build/api/config/plugins.html +18 -0
- package/doc_build/api/config/testing.html +32 -0
- package/doc_build/api/index.html +12 -0
- package/doc_build/api/plugin-api/plugin-hooks.html +123 -0
- package/doc_build/en/api/config/build-config.html +347 -0
- package/doc_build/en/api/config/build-preset.html +72 -0
- package/doc_build/en/api/config/design-system.html +128 -0
- package/doc_build/en/api/config/plugins.html +18 -0
- package/doc_build/en/api/config/testing.html +32 -0
- package/doc_build/en/api/index.html +12 -0
- package/doc_build/en/api/plugin-api/plugin-hooks.html +123 -0
- package/doc_build/en/guide/advance/asset.html +36 -0
- package/doc_build/en/guide/advance/build-umd.html +43 -0
- package/doc_build/en/guide/advance/copy.html +53 -0
- package/doc_build/en/guide/advance/external-dependency.html +46 -0
- package/doc_build/en/guide/advance/in-depth-about-build.html +123 -0
- package/doc_build/en/guide/advance/in-depth-about-dev-command.html +33 -0
- package/doc_build/en/guide/advance/theme-config.html +40 -0
- package/doc_build/en/guide/basic/before-getting-started.html +98 -0
- package/doc_build/en/guide/basic/command-preview.html +74 -0
- package/doc_build/en/guide/basic/modify-output-product.html +109 -0
- package/doc_build/en/guide/basic/publish-your-project.html +61 -0
- package/doc_build/en/guide/basic/test-your-project.html +42 -0
- package/doc_build/en/guide/basic/use-micro-generator.html +48 -0
- package/doc_build/en/guide/basic/using-storybook.html +77 -0
- package/doc_build/en/guide/best-practices/components.html +122 -0
- package/doc_build/en/guide/intro/getting-started.html +51 -0
- package/doc_build/en/guide/intro/welcome.html +24 -0
- package/doc_build/en/guide/intro/why-module-engineering-solution.html +20 -0
- package/doc_build/en/index.html +12 -0
- package/doc_build/en/plugins/guide/getting-started.html +26 -0
- package/doc_build/en/plugins/guide/plugin-object.html +25 -0
- package/doc_build/en/plugins/guide/setup-function.html +41 -0
- package/doc_build/en/plugins/official-list/overview.html +17 -0
- package/doc_build/en/plugins/official-list/plugin-banner.html +41 -0
- package/doc_build/en/plugins/official-list/plugin-import.html +43 -0
- package/doc_build/guide/advance/asset.html +36 -0
- package/doc_build/guide/advance/build-umd.html +43 -0
- package/doc_build/guide/advance/copy.html +53 -0
- package/doc_build/guide/advance/external-dependency.html +46 -0
- package/doc_build/guide/advance/in-depth-about-build.html +123 -0
- package/doc_build/guide/advance/in-depth-about-dev-command.html +33 -0
- package/doc_build/guide/advance/theme-config.html +39 -0
- package/doc_build/guide/basic/before-getting-started.html +98 -0
- package/doc_build/guide/basic/command-preview.html +74 -0
- package/doc_build/guide/basic/modify-output-product.html +109 -0
- package/doc_build/guide/basic/publish-your-project.html +63 -0
- package/doc_build/guide/basic/test-your-project.html +44 -0
- package/doc_build/guide/basic/use-micro-generator.html +46 -0
- package/doc_build/guide/basic/using-storybook.html +75 -0
- package/doc_build/guide/best-practices/components.html +122 -0
- package/doc_build/guide/intro/getting-started.html +48 -0
- package/doc_build/guide/intro/welcome.html +24 -0
- package/doc_build/guide/intro/why-module-engineering-solution.html +20 -0
- package/doc_build/index.html +12 -0
- package/doc_build/plugins/guide/getting-started.html +26 -0
- package/doc_build/plugins/guide/plugin-object.html +25 -0
- package/doc_build/plugins/guide/setup-function.html +41 -0
- package/doc_build/plugins/official-list/overview.html +17 -0
- package/doc_build/plugins/official-list/plugin-banner.html +41 -0
- package/doc_build/plugins/official-list/plugin-import.html +43 -0
- package/doc_build/static/css/main.0bdbae52.css +1 -0
- package/doc_build/static/js/9061.555c88e4.js +2 -0
- package/doc_build/static/js/9061.555c88e4.js.LICENSE.txt +25 -0
- package/doc_build/static/js/async/1114.d0e9a03f.js +1 -0
- package/doc_build/static/js/async/en_api_config_build-config.4b68a964.js +1 -0
- package/doc_build/static/js/async/en_api_config_build-preset.3c87d23b.js +1 -0
- package/doc_build/static/js/async/en_api_config_design-system.bae5a6a4.js +1 -0
- package/doc_build/static/js/async/en_api_config_plugins.e2525188.js +1 -0
- package/doc_build/static/js/async/en_api_config_testing.bdfe73d2.js +1 -0
- package/doc_build/static/js/async/en_api_index.e8c3584a.js +1 -0
- package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.130c0839.js +1 -0
- package/doc_build/static/js/async/en_guide_advance_asset.29c82557.js +1 -0
- package/doc_build/static/js/async/en_guide_advance_build-umd.5912e38e.js +1 -0
- package/doc_build/static/js/async/en_guide_advance_copy.e73474a0.js +1 -0
- package/doc_build/static/js/async/en_guide_advance_external-dependency.21c368af.js +1 -0
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.90beffab.js +1 -0
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.7be33ae4.js +1 -0
- package/doc_build/static/js/async/en_guide_advance_theme-config.ed245a3c.js +1 -0
- package/doc_build/static/js/async/en_guide_basic_before-getting-started.1da2f70c.js +1 -0
- package/doc_build/static/js/async/en_guide_basic_command-preview.16337618.js +1 -0
- package/doc_build/static/js/async/en_guide_basic_modify-output-product.c1634e05.js +1 -0
- package/doc_build/static/js/async/en_guide_basic_publish-your-project.6ffa1dcb.js +1 -0
- package/doc_build/static/js/async/en_guide_basic_test-your-project.503389bd.js +1 -0
- package/doc_build/static/js/async/en_guide_basic_use-micro-generator.1d9ade59.js +1 -0
- package/doc_build/static/js/async/en_guide_basic_using-storybook.2e1cf2bc.js +1 -0
- package/doc_build/static/js/async/en_guide_best-practices_components.db985beb.js +1 -0
- package/doc_build/static/js/async/en_guide_intro_getting-started.fdf2a5e3.js +1 -0
- package/doc_build/static/js/async/en_guide_intro_welcome.e8402d15.js +1 -0
- package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.5b18a76a.js +1 -0
- package/doc_build/static/js/async/en_index.9d8e7f26.js +1 -0
- package/doc_build/static/js/async/en_plugins_guide_getting-started.5c423f88.js +1 -0
- package/doc_build/static/js/async/en_plugins_guide_plugin-object.2799e64d.js +1 -0
- package/doc_build/static/js/async/en_plugins_guide_setup-function.bf63c2f5.js +1 -0
- package/doc_build/static/js/async/en_plugins_official-list_overview.226be4e5.js +1 -0
- package/doc_build/static/js/async/en_plugins_official-list_plugin-banner.c8fc2ef5.js +1 -0
- package/doc_build/static/js/async/en_plugins_official-list_plugin-import.dc5a5224.js +1 -0
- package/doc_build/static/js/async/zh_api_config_build-config.e0239f0b.js +1 -0
- package/doc_build/static/js/async/zh_api_config_build-preset.af73b578.js +1 -0
- package/doc_build/static/js/async/zh_api_config_design-system.6f3e0d0a.js +1 -0
- package/doc_build/static/js/async/zh_api_config_plugins.bb32094e.js +1 -0
- package/doc_build/static/js/async/zh_api_config_testing.7af33726.js +1 -0
- package/doc_build/static/js/async/zh_api_index.83d48f6f.js +1 -0
- package/doc_build/static/js/async/zh_api_plugin-api_plugin-hooks.54181e2b.js +1 -0
- package/doc_build/static/js/async/zh_guide_advance_asset.0abb6b82.js +1 -0
- package/doc_build/static/js/async/zh_guide_advance_build-umd.cd0724c4.js +1 -0
- package/doc_build/static/js/async/zh_guide_advance_copy.0c87a269.js +1 -0
- package/doc_build/static/js/async/zh_guide_advance_external-dependency.38ab900c.js +1 -0
- package/doc_build/static/js/async/zh_guide_advance_in-depth-about-build.f74fb46b.js +1 -0
- package/doc_build/static/js/async/zh_guide_advance_in-depth-about-dev-command.390bd229.js +1 -0
- package/doc_build/static/js/async/zh_guide_advance_theme-config.9d46a256.js +1 -0
- package/doc_build/static/js/async/zh_guide_basic_before-getting-started.cb228032.js +1 -0
- package/doc_build/static/js/async/zh_guide_basic_command-preview.d01b5121.js +1 -0
- package/doc_build/static/js/async/zh_guide_basic_modify-output-product.511034ae.js +1 -0
- package/doc_build/static/js/async/zh_guide_basic_publish-your-project.f1222d3a.js +1 -0
- package/doc_build/static/js/async/zh_guide_basic_test-your-project.bb4ee150.js +1 -0
- package/doc_build/static/js/async/zh_guide_basic_use-micro-generator.fbbfa670.js +1 -0
- package/doc_build/static/js/async/zh_guide_basic_using-storybook.e684c97c.js +1 -0
- package/doc_build/static/js/async/zh_guide_best-practices_components.63e6ce1f.js +1 -0
- package/doc_build/static/js/async/zh_guide_intro_getting-started.ed054585.js +1 -0
- package/doc_build/static/js/async/zh_guide_intro_welcome.e1854445.js +1 -0
- package/doc_build/static/js/async/zh_guide_intro_why-module-engineering-solution.c5feb99d.js +1 -0
- package/doc_build/static/js/async/zh_index.bdf672c6.js +1 -0
- package/doc_build/static/js/async/zh_plugins_guide_getting-started.d0775941.js +1 -0
- package/doc_build/static/js/async/zh_plugins_guide_plugin-object.acf4be01.js +1 -0
- package/doc_build/static/js/async/zh_plugins_guide_setup-function.d79620be.js +1 -0
- package/doc_build/static/js/async/zh_plugins_official-list_overview.bded70c0.js +1 -0
- package/doc_build/static/js/async/zh_plugins_official-list_plugin-banner.defbf67c.js +1 -0
- package/doc_build/static/js/async/zh_plugins_official-list_plugin-import.d9e7fb77.js +1 -0
- package/doc_build/static/js/lib-lodash.5ea7bf7d.js +1 -0
- package/doc_build/static/js/lib-polyfill.0d49b811.js +1 -0
- package/doc_build/static/js/lib-react.209d3da0.js +2 -0
- package/doc_build/static/js/lib-react.209d3da0.js.LICENSE.txt +29 -0
- package/doc_build/static/js/lib-router.6f1082f5.js +1 -0
- package/doc_build/static/js/main.457dc37f.js +1 -0
- package/doc_build/static/search_index.c9c50254.json +1 -0
- package/docs/en/guide/basic/command-preview.md +1 -1
- package/docs/en/guide/intro/getting-started.md +1 -1
- package/docs/en/plugins/official-list/overview.md +3 -1
- package/docs/en/plugins/official-list/plugin-banner.md +103 -0
- package/docs/en/plugins/official-list/plugin-import.mdx +177 -0
- package/docs/zh/guide/basic/command-preview.md +1 -1
- package/docs/zh/guide/basic/use-micro-generator.md +2 -2
- package/docs/zh/guide/intro/getting-started.md +1 -1
- package/docs/zh/plugins/official-list/overview.md +2 -1
- package/docs/zh/plugins/official-list/plugin-banner.md +103 -0
- package/docs/zh/plugins/official-list/plugin-import.mdx +176 -0
- package/modern.config.ts +3 -3
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_modern_js_module_tools_docs=self.webpackChunk_modern_js_module_tools_docs||[]).push([[1114],{1114:function(e,t,n){n.d(t,{$1:function(){return hn},Af:function(){return fn},EK:function(){return Mt},ds:function(){return gn}});var r=n(2363),o=n(1850);function i(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}const s=e=>parseInt(e.repeat(2/e.length),16);function a(e,t){return void 0!==e?e/255:"number"!=typeof t||t<0||t>1?1:t}function l(e){if(!e)return;if(!(e=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e))(e))throw new Error("Invalid color string, must be a valid hex color");const t=Math.floor((e.length-1)/3),n=((e,t)=>e.match(new RegExp(`.{${t}}`,"g")))(e.slice(1),t),[r,o,i,l]=n.map(s);return{r:r,g:o,b:i,a:a(l,1)}}function c(e,t){if(!e)return e;const{r:n,g:r,b:o,a:i}=l(e);return function(e){if(!e)return;const{r:t,g:n,b:r,a:o}=e,i=Math.round(255*o);return`#${t.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}${i.toString(16).padStart(2,"0")}`}({r:n,g:r,b:o,a:i*t})}function u(e,t){return{prev:t(e.prev,"prev"),next:t(e.next,"next")}}function d(e,t){return{prev:void 0===(null==e?void 0:e.prev)?t:e.prev,next:void 0===(null==e?void 0:e.next)?t:e.next}}function h(e,t,n){return u(d(e,t),n)}function f(e,t){return t(e.prev)||t(e.next)}function p(e){return e.lines.map((e=>e.tokens.map((e=>e.content)).join(""))).join("\n")}function m(e){return e.split(/,(?![^\[]*\])/g)}function g(e){return e.reduce(((e,t)=>Object.assign(e,t)),{})}function v(e){const t=e.match(/(\d+)\[(.+)\]/);if(t){const[,e,n]=t,r=n.split(",").map(b);return{[Number(e)]:r}}return g(E(e).map((e=>({[e]:!0}))))}function b(e){const[t,n]=e.split(":");if(!w(t))throw new j(t);const r=Number(t);if(r<1)throw new k;if(n){if(!w(n))throw new j(n);return{start:r,end:+n}}return{start:r,end:r}}function y(e){if(!e)throw new Error("Focus cannot be empty");try{return function(e){const t={};let n=-1,r=null==e?0:e.length;for(;++n<r;){var o=e[n];t[o[0]]=o[1]}return t}(e.split(/,(?![^\[]*\])/g).map(x).flat())}catch(t){throw t}}function x(e){const t=e.match(/(\d+)\[(.+)\]/);if(t){const[,e,n]=t,r=n.split(",").map(E);return[[Number(e)-1,r.flat().map((e=>e-1))]]}return E(e).map((e=>[e-1,!0]))}function E(e){const[t,n]=e.split(":");if(!w(t))throw new j(t);const r=Number(t);if(r<1)throw new k;if(n){if(!w(n))throw new j(n);const e=[];for(let t=r;t<=+n;t++)e.push(t);return e}return[r]}function w(e){e=e.toString();var t=Math.abs(e),n=parseInt(e,10);return!isNaN(t)&&n===t&&t.toString()===e}class k extends Error{constructor(){super("Invalid line or column number in focus string"),Object.setPrototypeOf(this,new.target.prototype)}}class j extends Error{constructor(e){super(`Invalid number "${e}" in focus string`),this.number=e,Object.setPrototypeOf(this,new.target.prototype)}}var C;!function(e){e[e.CodeForeground=0]="CodeForeground",e[e.CodeBackground=1]="CodeBackground",e[e.EditorForeground=2]="EditorForeground",e[e.EditorBackground=3]="EditorBackground",e[e.FocusBorder=4]="FocusBorder",e[e.ActiveTabBackground=5]="ActiveTabBackground",e[e.ActiveTabForeground=6]="ActiveTabForeground",e[e.InactiveTabBackground=7]="InactiveTabBackground",e[e.InactiveTabForeground=8]="InactiveTabForeground",e[e.EditorGroupBorder=9]="EditorGroupBorder",e[e.EditorGroupHeaderBackground=10]="EditorGroupHeaderBackground",e[e.TabBorder=11]="TabBorder",e[e.ActiveTabBottomBorder=12]="ActiveTabBottomBorder",e[e.LineNumberForeground=13]="LineNumberForeground",e[e.InputForeground=14]="InputForeground",e[e.InputBackground=15]="InputBackground",e[e.InputBorder=16]="InputBorder",e[e.SelectionBackground=17]="SelectionBackground",e[e.IconForeground=18]="IconForeground",e[e.ListActiveSelectionBackground=19]="ListActiveSelectionBackground",e[e.ListActiveSelectionForeground=20]="ListActiveSelectionForeground",e[e.ListHoverBackground=21]="ListHoverBackground",e[e.ListHoverForeground=22]="ListHoverForeground",e[e.SideBarBackground=23]="SideBarBackground",e[e.SideBarForeground=24]="SideBarForeground",e[e.SideBarBorder=25]="SideBarBorder",e[e.LineHighlightBackground=26]="LineHighlightBackground",e[e.RangeHighlightBackground=27]="RangeHighlightBackground",e[e.EditorInfoForeground=28]="EditorInfoForeground"}(C||(C={}));const O="#6FC3DF";function F(e,t){var n,r;const o=e.colors||{};switch(t){case C.CodeForeground:return(null===(n=_(e))||void 0===n?void 0:n.foreground)||F(e,C.EditorForeground);case C.CodeBackground:return(null===(r=_(e))||void 0===r?void 0:r.background)||F(e,C.EditorBackground);case C.EditorBackground:return o["editor.background"]||B(e,{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"});case C.EditorForeground:return o["editor.foreground"]||B(e,{light:"#333333",dark:"#BBBBBB",hc:"#fffffe"});case C.FocusBorder:return o.focusBorder||B(e,{light:"#0090F1",dark:"#007FD4",hc:O});case C.ActiveTabBackground:return o["tab.activeBackground"]||F(e,C.EditorBackground);case C.ActiveTabForeground:return o["tab.activeForeground"]||B(e,{dark:"#ffffff",light:"#333333",hc:"#ffffff"});case C.InactiveTabBackground:return o["tab.inactiveBackground"]||B(e,{dark:"#2D2D2D",light:"#ECECEC",hc:void 0});case C.InactiveTabForeground:return o["tab.inactiveForeground"]||B(e,{dark:c(F(e,C.ActiveTabForeground),.5),light:c(F(e,C.ActiveTabForeground),.7),hc:"#ffffff"});case C.TabBorder:return o["tab.border"]||B(e,{dark:"#252526",light:"#F3F3F3",hc:O});case C.ActiveTabBottomBorder:return o["tab.activeBorder"]||F(e,C.ActiveTabBackground);case C.EditorGroupBorder:return o["editorGroup.border"]||B(e,{dark:"#444444",light:"#E7E7E7",hc:O});case C.EditorGroupHeaderBackground:return o["editorGroupHeader.tabsBackground"]||B(e,{dark:"#252526",light:"#F3F3F3",hc:void 0});case C.LineNumberForeground:return o["editorLineNumber.foreground"]||B(e,{dark:"#858585",light:"#237893",hc:"#fffffe"});case C.InputBackground:return o["input.background"]||B(e,{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"});case C.InputForeground:return o["input.foreground"]||F(e,C.EditorForeground);case C.InputBorder:return o["input.border"]||B(e,{dark:void 0,light:void 0,hc:O});case C.SelectionBackground:return o["editor.selectionBackground"]||B(e,{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"});case C.IconForeground:return o["icon.foreground"]||B(e,{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"});case C.SideBarBackground:return o["sideBar.background"]||B(e,{dark:"#252526",light:"#F3F3F3",hc:"#000000"});case C.SideBarForeground:return o["sideBar.foreground"]||F(e,C.EditorForeground);case C.SideBarBorder:return o["sideBar.border"]||F(e,C.SideBarBackground);case C.ListActiveSelectionBackground:return o["list.activeSelectionBackground"]||B(e,{dark:"#094771",light:"#0060C0",hc:"#000000"});case C.ListActiveSelectionForeground:return o["list.activeSelectionForeground"]||B(e,{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"});case C.ListHoverBackground:return o["list.hoverBackground"]||B(e,{dark:"#2A2D2E",light:"#F0F0F0",hc:void 0});case C.ListHoverForeground:return o["list.hoverForeground"]||void 0;case C.LineHighlightBackground:return o["editor.lineHighlightBackground"]||B(e,{dark:void 0,light:void 0,hc:void 0});case C.RangeHighlightBackground:return o["editor.rangeHighlightBackground"]||B(e,{dark:"#ffffff0b",light:"#fdff0033",hc:void 0});case C.EditorInfoForeground:return o["editor.infoForeground"]||B(e,{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"});default:return"#f00"}}function N(e){const t=S(e);return"dark"===t?"dark":"light"===t?"light":void 0}function B(e,t){return t[S(e)]}function S(e){var t;return e.type?e.type:(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes("light"))?"light":"dark"}function _(e){let t=e.settings?e.settings:e.tokenColors;const n=t?t.find((e=>!e.name&&!e.scope)):void 0;return null==n?void 0:n.settings}const L="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;const I=200;function H(e,t,n,o,i,s){const[a,l]=r.useState(null),c=function(){const[e,t]=r.useState(void 0);return r.useEffect((()=>{function e(){t(window.innerWidth)}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e}(),u=r.useRef(null),{prevLongestLine:d,nextLongestLine:h,element:f}=r.useMemo((()=>{const n=T(e.prev,t.prev),s=T(e.next,t.next),a=(e.prev||e.next).trimEnd().split(P),l=a.length;if(i){const e="focus"===i?function(e,t){const[n,r]=function(e,t){if(e){const t=y(e),n=Object.keys(t).map((e=>parseInt(e,10)));return[Math.min(...n),Math.max(...n)]}return[0,t.length-1]}(e.prev,t);return r-n+1}(t,a):i;let r=a.length;for(;r<e;)a.push(""),r++;for(;r>e;)a.pop(),r--;n&&!a.includes(n)&&(a[a.length-1]=n)}let c=!1;const d=r.createElement("code",{className:"ch-code-scroll-parent"},r.createElement("br",null),a.map(((e,t)=>{const i=c||e!==n?void 0:u;return c=c||null!=i,r.createElement("div",{ref:i,key:t},o?r.createElement("span",{className:"ch-code-line-number"},"_",l):void 0,r.createElement("div",{style:{display:"inline-block",marginLeft:16}},r.createElement("span",null,e)))})),r.createElement("br",null));return{prevLongestLine:n,nextLongestLine:s,element:d}}),[e]),p=[...s,c,d,h,n];return L((()=>{var e;if(u.current){const t=u.current,r=null==t?void 0:t.parentElement,o=r.parentElement,i=null==t?void 0:t.querySelector(":scope > div"),s=null==t?void 0:t.querySelector(":scope > span"),a=s?function(e){const t=getComputedStyle(e);return parseFloat(t.width)}(s):0,c=A(i),f=c/d.length||1,m=h.length*f,g=null!==(e=M(i))&&void 0!==e?e:20,v={containerWidth:A(o.parentElement),containerHeight:M(o.parentElement),contentWidth:A(r.parentElement),contentHeight:M(r.parentElement),lineWidths:[c||m||I,m||c||I],lineWidth:[Math.max(c||m||I,f*n),Math.max(m||c||I,f*n)],lineHeight:g,colWidth:f,lineNumberWidth:a,deps:p};l(v)}}),p),!a||function(e,t){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(a.deps,p)?{element:f,dimensions:null}:{element:f,dimensions:a}}const P=/\r\n|\r|\n/;function T(e,t){const n=e?e.split(P):[""],r=function(e,t){if(e){const t=y(e);return Object.keys(t).map((e=>parseInt(e,10)))}return[...t.keys()]}(t,n);let o="";return n.forEach(((e,t)=>{r.includes(t)&&e.length>o.length&&(o=e)})),o}function A(e){const t=getComputedStyle(e);return parseFloat(t.width)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)}function M(e){if(!e)return null;const t=getComputedStyle(e);return parseFloat(t.height)-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)}function $(){}function z(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var c=t[i];if(c.removed){if(c.value=e.join(r.slice(l,l+c.count)),l+=c.count,i&&t[i-1].added){var u=t[i-1];t[i-1]=t[i],t[i]=u}}else{if(!c.added&&o){var d=n.slice(a,a+c.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(a,a+c.count));a+=c.count,c.added||(l+=c.count)}}var h=t[s-1];return s>1&&"string"==typeof h.value&&(h.added||h.removed)&&e.equals("",h.value)&&(t[s-2].value+=h.value,t.pop()),t}function W(e){return{newPos:e.newPos,components:e.components.slice(0)}}$.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var o=this;function i(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,a=e.length,l=1,c=s+a,u=[{newPos:-1,components:[]}],d=this.extractCommon(u[0],t,e,0);if(u[0].newPos+1>=s&&d+1>=a)return i([{value:this.join(t),count:t.length}]);function h(){for(var n=-1*l;n<=l;n+=2){var r=void 0,c=u[n-1],d=u[n+1],h=(d?d.newPos:0)-n;c&&(u[n-1]=void 0);var f=c&&c.newPos+1<s,p=d&&0<=h&&h<a;if(f||p){if(!f||p&&c.newPos<d.newPos?(r=W(d),o.pushComponent(r.components,void 0,!0)):((r=c).newPos++,o.pushComponent(r.components,!0,void 0)),h=o.extractCommon(r,t,e,n),r.newPos+1>=s&&h+1>=a)return i(z(o,r.components,t,e,o.useLongestToken));u[n]=r}else u[n]=void 0}l++}if(r)!function e(){setTimeout((function(){if(l>c)return r();h()||e()}),0)}();else for(;l<=c;){var f=h();if(f)return f}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,i=n.length,s=e.newPos,a=s-r,l=0;s+1<o&&a+1<i&&this.equals(t[s+1],n[a+1]);)s++,a++,l++;return l&&e.components.push({count:l}),e.newPos=s,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};var R=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,U=/\S/,q=new $;q.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!U.test(e)&&!U.test(t)},q.tokenize=function(e){for(var t=e.split(/(\s+|[()[\]{}'"]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&R.test(t[n])&&R.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var G=new $;function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}G.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t},(new $).tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)},(new $).tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var X=Object.prototype.toString,Z=new $;function K(e,t,n,r,o){var i,s;for(t=t||[],n=n||[],r&&(e=r(o,e)),i=0;i<t.length;i+=1)if(t[i]===e)return n[i];if("[object Array]"===X.call(e)){for(t.push(e),s=new Array(e.length),n.push(s),i=0;i<e.length;i+=1)s[i]=K(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),"object"===D(e)&&null!==e){t.push(e),s={},n.push(s);var a,l=[];for(a in e)e.hasOwnProperty(a)&&l.push(a);for(l.sort(),i=0;i<l.length;i+=1)s[a=l[i]]=K(e[a],t,n,r,a);t.pop(),n.pop()}else s=e;return s}Z.useLongestToken=!0,Z.tokenize=G.tokenize,Z.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=void 0===r?function(e,t){return void 0===t?n:t}:r;return"string"==typeof e?e:JSON.stringify(K(e,null,null,o),o," ")},Z.equals=function(e,t){return $.prototype.equals.call(Z,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};var Y=new $;function V(e,t){let n=0,r=0;const o=function(e){const t=(n=e.prev,r=e.next,G.diff(n,r,o));var n,r,o;let i=[],s=0,a=0;return t.forEach((e=>{if(e.added)for(let t=0;t<e.count;t++)i.push({next:a++});else if(e.removed)for(let t=0;t<e.count;t++)i.push({prev:s++});else for(let t=0;t<e.count;t++)i.push({prev:s++,next:a++})})),i}(e);return{lines:o.map((e=>void 0===e.next?Object.assign(Object.assign({},t.prev[e.prev]),{lineNumber:{prev:e.prev+1},move:"exit",enterIndex:null,exitIndex:r++}):void 0===e.prev?Object.assign(Object.assign({},t.next[e.next]),{lineNumber:{next:e.next+1},move:"enter",enterIndex:n++,exitIndex:null}):Object.assign(Object.assign({},t.prev[e.prev]),{lineNumber:{prev:e.prev+1,next:e.next+1},move:"stay",enterIndex:null,exitIndex:null}))),enterCount:n,exitCount:r}}function J(e,t,n){const{lines:r}=e,o=i(e,["lines"]),s=u(t,((e,t)=>function(e,t){return g(e?m(e).map(v):[...t.keys()].map((e=>({[e+1]:!0}))))}(e,"prev"===t?r.filter((e=>"enter"!==e.move)):r.filter((e=>"exit"!==e.move))))),a=r.map((e=>{const{tokens:t}=e,r=i(e,["tokens"]),o={prev:!!e.lineNumber.prev&&s.prev[e.lineNumber.prev],next:!!e.lineNumber.next&&s.next[e.lineNumber.next]},a={prev:e.lineNumber.prev&&n.prev[e.lineNumber.prev]||[],next:e.lineNumber.next&&n.next[e.lineNumber.next]||[]};return Object.assign({focused:u(o,(e=>!!e)),groups:Q(t,o,a)},r)})),l=u(s,(e=>Object.keys(e).map((e=>Number(e))))),c=u(l,(e=>Math.min(...e))),d=u(l,(e=>Math.max(...e)));return Object.assign({lines:a,firstFocusedLineNumber:c,lastFocusedLineNumber:d},o)}function Q(e,t,n){const r=u(t,(e=>Array.isArray(e)?e:[])),o=u(n,(e=>e.map((({columnNumbers:e})=>e)))),i=function(e,t){const n=[...t.map((e=>e.start-1)),...t.map((e=>e.end))];let r=e;return n.forEach((e=>{const t=[];let n=0;r.forEach((r=>{const o=n,i=n+r.content.length;if(o<e&&e<i){const n=e-o,i=r.content.slice(0,n),s=r.content.slice(n);t.push(Object.assign(Object.assign({},r),{content:i})),t.push(Object.assign(Object.assign({},r),{content:s}))}else t.push(r);n=i})),r=t})),r}(e,[...r.prev,...r.next,...o.prev,...o.next]);let s=0,a=null;const l=[];return i.forEach((e=>{const r=te(s,t.prev),o=te(s,t.next),i=ne(s,n.prev),c=ne(s,n.next);a&&a.focused.prev===r&&a.focused.next===o&&a.annotation.prev===i&&a.annotation.next===c||(a={focused:{prev:r,next:o},tokens:[],annotation:{prev:i,next:c}},l.push(a)),null==a||a.tokens.push(e),s+=e.content.length})),l.map((e=>({focused:e.focused,tokens:e.tokens,element:ee(e)})))}function ee(e){return r.createElement(r.Fragment,null,e.tokens.map((({content:e,props:t},n)=>r.createElement("span",Object.assign({},t,{key:n+1}),e))))}function te(e,t){return Array.isArray(t)?t.some((({start:t,end:n})=>t-1<=e&&e<n)):t}function ne(e,t){return t.find((({columnNumbers:t})=>t.start-1<=e&&e<t.end))}function re(e,t){if(!0===e.fixed)return e.value;{const[n,r]=e.interval,[o,i]=e.extremes;if(t<n)return o;if(t>r)return i;const s=(t-n)/(r-n);return o+(e.ease||ie.linear)(s)*(i-o)}}function oe([e,t],n,r){if(r<=1)return[e,t];const o=t-e,i=o/Math.pow(r,1/8),s=e+(o-i)/(r-1)*n;return[s,s+i]}Y.tokenize=function(e){return e.slice()},Y.join=Y.removeEmpty=function(e){return e};const ie={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}};function se(e,t,n,r){const[o,i]=t;return e.map((e=>{const t=u(e.lineNumber,(e=>e&&e-1)),{enterIndex:s,exitIndex:a}=e,l="exit"===e.move?{fixed:!0,value:t.prev}:"enter"===e.move?{fixed:!0,value:t.next}:{fixed:!1,extremes:[t.prev,t.next],interval:[o,i],ease:ie.easeInOutCubic},c="exit"===e.move?{fixed:!1,extremes:[0,-1],ease:ie.easeInQuad,interval:oe([0,o],a,r)}:"enter"===e.move?{fixed:!1,extremes:[1,0],ease:ie.easeOutQuad,interval:oe([i,1],s,n)}:{fixed:!0,value:0};return Object.assign(Object.assign({},e),{tweenX:c,tweenY:l})}))}function ae(e,t){const n=h(e,[],(e=>e.flatMap((e=>m(e.focus).map((t=>Object.assign(Object.assign({},e),{focus:t}))))))),r=h(n,[],(e=>e.filter(le))),o=h(n,[],(e=>e.filter((e=>!le(e)))));return{inlineAnnotations:u(r,(e=>function(e,t){const n={};return e.forEach((e=>{const r=v(e.focus),o=+Object.keys(r)[0],i=r[o],s=n[o]||[];s.push({columnNumbers:i[0],data:e.data,theme:t,Component:e.Component||ce()}),n[o]=s})),n}(e,t))),multilineAnnotations:u(o,(e=>function(e,t){return e.map((e=>({lineNumbers:b(e.focus),data:e.data,theme:t,Component:e.Component||ue(e,t)})))}(e,t)))}}function le(e){return!!e.focus.match(/(\d+)\[(.+)\]/)}function ce(e,t){return({children:e})=>r.createElement("span",{style:{outline:"red 1px solid"}},e)}function ue(e,t){const n=t.colors["editor.lineHighlightBackground"]||t.colors["editor.selectionHighlightBackground"];return({children:e,style:t})=>r.createElement("div",{style:Object.assign(Object.assign({},t),{background:n,cursor:"pointer"}),onClick:e=>alert("clicked"),className:"ch-code-bg-annotation"},r.createElement("span",{className:"ch-code-bg-annotation-border",style:{background:"#00a2d3",width:"3px",height:"100%",position:"absolute",left:0}}),e)}function de(e,t,n){const r=[...t];r.sort(((e,t)=>e.lineNumbers.start-t.lineNumbers.start));let o=0;const i=[];for(;o<e.length;){const t=r[0];let s=e[o];if(t&&n(s)>t.lineNumbers.start)throw"Code Hike can't handle two annotations for the same line";if(t&&n(s)===t.lineNumbers.start){const a={lines:[],annotation:t};for(;s&&(!n(s)||n(s)<=t.lineNumbers.end);)a.lines.push(s),s=e[++o];i.push(a),r.shift()}else if(t){const r={lines:[]};for(;s&&(!n(s)||n(s)<t.lineNumbers.start);)r.lines.push(s),s=e[++o];i.push(r)}else i.push({lines:e.slice(o)}),o=e.length}return i}function he(e,t){let n=[...e],r=[...e];const o=[...t.prev],i=[...t.next],s=[];let a=1,l=1;for(;n.length>0||r.length>0;){const e=o[0],t=i[0],c=e&&e.columnNumbers.start===a,u=t&&t.columnNumbers.start===l;if(a<l)if(c){const t=e.columnNumbers.end+1;s.push({prev:{annotation:e,groups:fe(n,a,t)}}),a=t,o.shift()}else{const t=Math.min(l,(null==e?void 0:e.columnNumbers.start)||l);s.push({prev:{groups:fe(n,a,t)}}),a=t}else if(a>l)if(u){const e=t.columnNumbers.end+1;s.push({next:{annotation:t,groups:fe(r,l,e)}}),l=e,i.shift()}else{const e=Math.min(a,(null==t?void 0:t.columnNumbers.start)||a);s.push({next:{groups:fe(r,l,e)}}),l=e}else if(a==l)if(c&&u&&e.columnNumbers.end===t.columnNumbers.end){const c=t.columnNumbers.end+1;s.push({prev:{annotation:e,groups:fe(n,a,c)},next:{annotation:t,groups:fe(r,l,c)}}),a=c,l=c,o.shift(),i.shift()}else if(c){const t=e.columnNumbers.end+1;s.push({prev:{annotation:e,groups:fe(n,a,t)}}),a=t,o.shift()}else if(u){const e=t.columnNumbers.end+1;s.push({next:{annotation:t,groups:fe(r,l,e)}}),l=e,i.shift()}else if(e||t){const o=Math.min((null==e?void 0:e.columnNumbers.start)||Number.MAX_VALUE,(null==t?void 0:t.columnNumbers.start)||Number.MAX_VALUE);s.push({prev:{groups:fe(n,a,o)},next:{groups:fe(r,l,o)}}),a=o,l=o}else s.push({prev:{groups:n},next:{groups:r}}),n=[],r=[]}return s}function fe(e,t,n){const r=[];let o=t;for(;o<n&&e.length>0;){const t=e.shift();r.push(t);o+=t.tokens.reduce(((e,t)=>e+t.content.length),0)}return r}function pe(e){const{highlightedLines:t,theme:n,focus:o}=e;return r.useMemo((()=>function({theme:e,focus:t,annotations:n,highlightedLines:r,lang:o}){const s=function(e){return u(e,(e=>e.map((e=>e.tokens.map((e=>e.content)).join(""))).join("\n").trimEnd().concat("\n")))}(r),a=function(e,t){return V(e,t)}(s,r),{inlineAnnotations:l,multilineAnnotations:c}=function(e,t){return ae(e,t)}(n,e),h=function(e,t,n){var{lines:r}=e,o=i(e,["lines"]);const s=function(e,t){return{prev:de(e,t.prev,(e=>e.lineNumber.prev)),next:de(e,t.next,(e=>e.lineNumber.next))}}(function(e,t){return e.map((e=>{var{groups:n}=e,r=i(e,["groups"]);const{lineNumber:o}=r,s={prev:o.prev&&t.prev[o.prev]||[],next:o.next&&t.next[o.next]||[]};return Object.assign(Object.assign({},r),{annotatedGroups:he(n,s)})}))}(r,t),n);return Object.assign(Object.assign({},o),{lineGroups:s,lineCount:{prev:r.filter((e=>null!=e.lineNumber.prev)).length,next:r.filter((e=>null!=e.lineNumber.next)).length}})}(function(e,t,n){return J(e,t,n)}(a,d(t,null),l),l,c);return function(e,t,n){const r=(i=e.enterCount,s=e.exitCount,i<=0&&s<=0?[0,1]:i<=0&&s>=1?[.33,1]:i>=1&&s<=0?[0,.67]:[.25,.75]),o=u(e.lineGroups,(t=>t.map((t=>Object.assign(Object.assign({},t),{lines:se(t.lines,r,e.enterCount,e.exitCount)})))));var i,s;return Object.assign(Object.assign({},e),{groups:o,verticalInterval:r,code:t,lang:n})}(h,s,o)}(e)),[t.prev,t.next,o.prev,o.next,n])}function me({dimensions:e,codeStep:t,children:n,minZoom:o=0,maxZoom:s=1.2,center:a=!1,progress:l}){const{prev:c,next:d}=function(e){var{codeStep:t}=e,n=i(e,["codeStep"]);const{lineHeight:r,lineWidth:o}=n.dimensions;return u({prev:{extremes:[t.firstFocusedLineNumber.prev-1,t.lastFocusedLineNumber.prev-1],originalContentHeight:t.lineCount.prev*r,lineWidth:o[0]},next:{extremes:[t.firstFocusedLineNumber.next-1,t.lastFocusedLineNumber.next-1],originalContentHeight:t.lineCount.next*r,lineWidth:o[1]}},(({extremes:e,originalContentHeight:t,lineWidth:r})=>function({dimensions:e,lineWidth:t,minZoom:n,maxZoom:r,extremes:o,originalContentHeight:i,horizontalCenter:s}){const{lineHeight:a}=e,l=null==e?void 0:e.contentHeight,c=null==e?void 0:e.contentWidth,u=(o[1]-o[0]+3)*a,d=(null==e?void 0:e.lineNumberWidth)||16,h=16,f=Math.max(Math.min((c-d-h)/t,l/u,r),n),p=i*f,m=(o[0]-1)*a*f,g=(o[1]+2)*a*f,v=(g+m)/2,b=g-m,y=l>p?(l-p)/2:(E=l/2-v,w=Math.max(l-p,-m),k=0,E<=w?w:E>=k?k:E),x=s?Math.max(c/2-t*f/2,0):0;var E,w,k;return{zoom:f,dx:x,dy:y,focusHeight:b,focusWidth:t*f}}(Object.assign({extremes:e,originalContentHeight:t,lineWidth:r},n))))}({codeStep:t,dimensions:e,minZoom:o,maxZoom:s,horizontalCenter:a}),h=be(c.zoom,d.zoom,l),f=be(c.dx,d.dx,l),p=be(c.dy,d.dy,l,t.verticalInterval),m=be(c.focusHeight,d.focusHeight,l),g=be(c.focusWidth,d.focusWidth,l),v=((null==e?void 0:e.lineNumberWidth)||0)*h||16,b=Math.max(g+v,e.contentWidth),y=v/h;return r.createElement(ge,{width:e.containerWidth,height:e.containerHeight,lang:t.lang},r.createElement(ve,{dx:f,dy:p,scale:h,height:Math.max(m,e.contentHeight),width:b},n(g,y)))}function ge({width:e,height:t,children:n,lang:o}){return r.createElement("code",{style:{width:e,height:t,position:"relative",overflow:"auto"},className:"ch-code-scroll-parent",children:n,"data-ch-lang":o})}function ve({dx:e,dy:t,scale:n,height:o,width:i,children:s}){return r.createElement("div",{style:{position:"absolute",top:0,left:0,transformOrigin:"top left",width:i,height:o,overflow:"hidden"},className:"ch-code-scroll-content"},r.createElement("div",{style:{position:"absolute",top:0,left:0,transform:`translateX(${e}px) translateY(${t}px) scale(${n})`,transformOrigin:"left top",width:i/n,height:(o-2*t)/n},children:s}))}function be(e,t,n,r=[0,1]){return re({fixed:!1,interval:r,extremes:[e,t],ease:ie.easeInOutCubic},n)}function ye(e){return r.createElement(me,Object.assign({},e),((t,n)=>r.createElement(xe,{codeStep:e.codeStep,focusWidth:t,lineHeight:e.dimensions.lineHeight,progress:e.progress,theme:e.theme,startX:n,lineNumberWidth:e.dimensions.lineNumberWidth})))}function xe({codeStep:e,progress:t,focusWidth:n,lineHeight:o,startX:i,theme:s,lineNumberWidth:a}){const l=t<.5?e.groups.prev:e.groups.next;return r.createElement(r.Fragment,null,l.map(((e,l)=>{if(!e.annotation)return r.createElement(Ee,{lines:e.lines,t:t,focusWidth:n,lineHeight:o,startX:i,key:l,theme:s,lineNumberWidth:a});const c=re(e.lines[0].tweenY,t),u=e.annotation.lineNumbers.end-e.annotation.lineNumbers.start+1,d=e.annotation.Component;return r.createElement(d,{style:{position:"absolute",height:u*o,width:"100%",transform:`translateY(${c*o}px)`},key:l,data:e.annotation.data,theme:e.annotation.theme,isInline:!1},r.createElement(Ee,{lines:e.lines,t:t,focusWidth:n,lineHeight:o,startY:c,startX:i,theme:s,lineNumberWidth:a}))})))}function Ee({lines:e,focusWidth:t,lineHeight:n,t:o,startX:i,startY:s=0,theme:a,lineNumberWidth:l}){return r.createElement(r.Fragment,null,e.map(((e,c)=>{const{tweenX:u,tweenY:d,focused:h}=e,f=re(u,o),p=re(d,o),m=Ce(h,o,f);return r.createElement(r.Fragment,{key:c},l?r.createElement("span",{className:"ch-code-line-number",style:{position:"absolute",top:0,left:0,transform:`translate(${f*t}px, ${(p-s)*n}px)`,width:l,opacity:m,color:F(a,C.LineNumberForeground)}},o<.5?e.lineNumber.prev:e.lineNumber.next):void 0,r.createElement(je,{dx:i+f*t,dy:(p-s)*n,width:t,opacity:m},r.createElement(we,{line:e,progress:o,dx:f})))})))}function we({line:e,progress:t,dx:n}){return r.createElement("div",{style:{display:"inline-block",width:"100%"}},e.annotatedGroups.map(((e,o)=>r.createElement(ke,{annotatedGroup:e,progress:t,dx:n,key:o}))),r.createElement("br",null))}function ke({annotatedGroup:e,progress:t,dx:n}){var o,i,s;const a=t<.5?e.prev:e.next,l=(null==a?void 0:a.groups)||[],c=null===(o=null==a?void 0:a.annotation)||void 0===o?void 0:o.Component,u=l.map(((e,o)=>{const i=Ce(e.focused,t,n);return r.createElement("span",{style:{opacity:i},key:o+1},e.element)}));return c?r.createElement(c,{children:u,data:null===(i=null==a?void 0:a.annotation)||void 0===i?void 0:i.data,theme:null===(s=null==a?void 0:a.annotation)||void 0===s?void 0:s.theme,isInline:!0}):r.createElement(r.Fragment,null,u)}function je({children:e,dx:t,dy:n,opacity:o,width:i}){return r.createElement("div",{style:{position:"absolute",top:0,left:0,transform:`translate(${t}px, ${n}px)`,width:i,display:o<=0?"none":void 0}},e)}function Ce(e,t,n){return re({fixed:!1,extremes:[e.prev?.99:.33,e.next?.99:.33],interval:[0,1]},t)-1*Math.abs(n)}function Oe({content:e,style:t,className:n}){const[o,i]=r.useState(!1);return r.createElement("svg",{style:t,onClick:()=>{!function(e){if(!navigator.clipboard)return void function(e){var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}catch(n){}document.body.removeChild(t)}(e);navigator.clipboard.writeText(e)}(e),i(!0),setTimeout((()=>{i(!1)}),1200)},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:n},r.createElement("title",null,"Copy"),o?r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}):r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.6px",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"}))}function Fe(e){var{tween:t,progress:n,config:o}=e,s=i(e,["tween","progress","config"]);const a=function({tween:e,theme:t}){return pe({highlightedLines:u(e,(e=>e.code.lines)),theme:t,focus:u(e,(e=>e.focus)),annotations:u(e,(e=>e.annotations)),lang:f(e,(e=>{var t;return null===(t=null==e?void 0:e.code)||void 0===t?void 0:t.lang}))})}({tween:t,theme:o.theme}),{element:l,dimensions:c}=H(a.code,u(t,(e=>e.focus)),o.minColumns||10,o.lineNumbers||!1,o.rows,[o.parentHeight]);return!c||o.debug?r.createElement(Ne,{element:l,htmlProps:s,debug:o.debug}):r.createElement(Be,{dimensions:c,stepInfo:a,config:o,progress:n,htmlProps:s})}function Ne({element:e,htmlProps:t,debug:n}){return r.createElement(Se,{htmlProps:t,style:{opacity:n?.9:0,overflow:"auto"}},e)}function Be({config:{minZoom:e=1,maxZoom:t=1,horizontalCenter:n=!1,theme:o},dimensions:i,stepInfo:s,progress:a,htmlProps:l,config:c}){var u;const{bg:d,fg:h}=function(e){return{fg:F(e,C.CodeForeground),bg:F(e,C.CodeBackground)}}(o);return r.createElement(Se,{htmlProps:l,style:{opacity:1,backgroundColor:d,color:h,colorScheme:N(o),"--ch-selection-background":F(o,C.SelectionBackground)}},r.createElement(ye,{codeStep:s,progress:a,dimensions:i,minZoom:e,maxZoom:t,center:n,theme:o}),c.showCopyButton?r.createElement(Oe,{className:"ch-code-button",content:null===(u=null==s?void 0:s.code)||void 0===u?void 0:u.prev}):void 0)}function Se({htmlProps:e,style:t,children:n}){return r.createElement("div",Object.assign({className:"ch-code-wrapper"},e,{style:Object.assign(Object.assign({margin:0,padding:0,position:"relative",whiteSpace:"pre",boxSizing:"content-box"},t),null==e?void 0:e.style),children:n}))}function _e(){return"undefined"!=typeof window?performance.now():0}function Le(e,t){var n=t.stiffness,r=t.damping,o=t.mass,i=t.decimals,s=t.teleport;return{X:e,k:null!=n?n:170,c:null!=r?r:26,m:null!=o?o:1,teleport:null!=s&&s,decimals:null!=i?i:2}}function Ie(e,t){var n=t.from,r=t.initialSpeed;return{x0:null!=n?n:e,v0:null!=r?r:0,t0:_e(),raf:null}}var He=Math.sqrt,Pe=Math.exp,Te=Math.sin,Ae=Math.cos;function Me(e){var t=e.x0,n=e.v0,r=e.t0,o=e.t,i=e.k,s=e.c,a=e.m,l=e.X,c=t-l,u=(o-r)/1e3,d=s*s-4*i*a;if(d>0){var h=(-s+He(d))/(2*a),f=(-s-He(d))/(2*a),p=(c*h-n)/(h-f),m=(n-c*f)/(h-f);return{x:l+p*Pe(f*u)+m*Pe(h*u),v:p*f*Pe(f*u)+m*h*Pe(h*u)}}if(d<0){var g=-s/(2*a),v=He(-d)/(2*a),b=c,y=(n-g*c)/v;return{x:l+Pe(g*u)*(b*Ae(v*u)+y*Te(v*u)),v:Pe(g*u)*((y*v+b*g)*Ae(v*u)-(b*v-y*g)*Te(v*u))}}var x=-s/(2*a),E=c,w=n-x*c;return{x:l+(E+w*u)*Pe(x*u),v:(w+E*x+w*x*u)*Pe(x*u)}}var $e=[],ze=null;function We(e){var t=$e.push(e);return 1===t&&(ze=requestAnimationFrame(Ue)),[ze,t-1]}function Re(e){var t=e[0],n=e[1];t===ze&&delete $e[n]}function Ue(){var e=_e(),t=$e;$e=[],(0,o.unstable_batchedUpdates)((function(){return t.forEach((function(t){return t&&t(e)}))}))}var qe="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function Ge(e,t){void 0===t&&(t={});var n=r.useState()[1],o=Le(e,t),i=function(e,t){var n=r.useRef(null);return null==n.current&&(n.current={config:Le(e,t),state:Ie(e,t)}),n.current}(e,t),s=i.state,a=i.config,l=_e(),c=s.x0,u=s.v0,d=s.t0,h=a.k,f=a.c,p=a.m,m=a.X,g=o.teleport?{x:m,v:0}:Me({x0:c,v0:u,t0:d,t:l,k:h,c:f,m:p,X:m}),v=g.x,b=g.v,y=function(e,t,n,r){var o=r.decimals,i=r.X,s=r.k,a=r.c,l=r.m;if(De(e,o)!==De(i,o))return!0;return De(Me({x0:e,v0:t,t0:n,t:n+.016,k:s,c:a,m:l,X:i}).x,o)!==De(i,o)}(v,b,l,o);return qe((function(){Object.assign(a,o)}),[o.X,o.k,o.c,o.m,o.teleport]),qe((function(){s.x0=v,s.v0=b,s.t0=l}),[v,b,l]),qe((function(){y&&null==s.raf?s.raf=We((function e(t){var r=s.x0,o=s.v0,i=s.t0,l=a.k,c=a.c,u=a.m,d=a.X,h=a.decimals;De(Me({x0:r,v0:o,t0:i,t:t,k:l,c:c,m:u,X:d}).x,h)!==De(r,h)?(s.raf=null,n(t)):s.raf=We(e)})):y||null==s.raf||(Re(s.raf),s.raf=null)})),qe((function(){return function(){null!=s.raf&&Re(s.raf)}}),[]),[De(v,o.decimals),y]}function De(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}const Xe={stiffness:120,damping:24,mass:.2,decimals:3};function Ze(e){var{step:t,config:n}=e,o=i(e,["step","config"]);const{tween:s,t:a}=function(e,t=Xe){const[{target:n,steps:o,index:i},s]=r.useState({target:2,steps:[e,e,e],index:0});r.useEffect((()=>{o[o.length-1]!=e&&s((t=>function(e,t,n){const{steps:r,target:o,index:i}=e,s=r.slice();return n-i<1?(s[2]=t,Object.assign(Object.assign({},e),{steps:s})):(s[0]=r[1],s[1]=r[2],s[2]=t,Object.assign(Object.assign({},e),{steps:s,target:o+1,index:i+1}))}(t,e,a)))}),[e]);const[a]=Ge(n,t),l=a-i;return l<=1?{tween:{prev:o[0],next:o[1]},t:l}:{tween:{prev:o[1],next:o[2]},t:l-1}}(t,n.spring);return r.createElement(Fe,Object.assign({tween:s,progress:a,config:n},o))}const Ke=(0,r.createContext)({});function Ye({classes:e,children:t}){const n=Je((0,r.useContext)(Ke),e);return r.createElement(Ke.Provider,{value:n,children:t})}function Ve(e,t){const n=Je((0,r.useContext)(Ke),t);return(0,r.useCallback)(function(e,t){return function(...n){const r=n.map((t=>e+(e&&t?"-":"")+t)),o=r.slice();return r.forEach((e=>{e in t&&o.push(t[e])})),o.join(" ")}}(e,n),[e,n])}function Je(e,t){return(0,r.useMemo)((()=>Object.assign(Object.assign({},e),t)),[e,t])}const Qe=r.forwardRef((function(e,t){var{title:n,children:o,titleBar:s,classes:a,theme:l,zoom:c=1,overflow:u}=e,d=i(e,["title","children","titleBar","classes","theme","zoom","overflow"]);const h=Ve("ch-frame",a),f=s||r.createElement(et,{title:n}),p={"--ch-frame-zoom":c,overflow:u};return r.createElement(Ye,{classes:a},r.createElement("div",Object.assign({},d,{ref:t}),r.createElement("div",{className:h("")},r.createElement("div",{className:h("title-bar"),style:{background:F(l,C.EditorGroupHeaderBackground)}},f),r.createElement("div",{className:h("content")},r.createElement("div",{className:h("zoom"),style:p},o)))))}));function et({title:e}){const t=Ve("ch-frame");return r.createElement(r.Fragment,null,r.createElement("div",{className:t("left-bar")},r.createElement(tt,null)),r.createElement("div",{className:t("middle-bar")},e),r.createElement("div",{className:t("right-bar")}))}function tt(){const e=Ve("ch-frame");return r.createElement("div",{className:e("buttons")},r.createElement("div",{className:e("button","button-left")}),r.createElement("div",{className:e("button-space")}),r.createElement("div",{className:e("button","button-middle")}),r.createElement("div",{className:e("button-space")}),r.createElement("div",{className:e("button","button-right")}))}r.forwardRef((function(e,t){var{title:n,children:o,titleBar:s,classes:a,overflow:l}=e,c=i(e,["title","children","titleBar","classes","overflow"]);const u=Ve("ch",a),d=s||r.createElement(et,{title:n});return r.createElement(Ye,{classes:a},r.createElement("div",Object.assign({},c,{ref:t}),r.createElement("div",{className:u("simple-frame")},r.createElement("div",{className:u("frame-title-bar")},d),o)))}));const nt=r.forwardRef((function(e,t){var n,{northPanel:o,southPanel:s,terminalPanel:a,style:l,height:c,northButton:u,southButton:d,theme:h,className:f,onTabClick:p}=e,m=i(e,["northPanel","southPanel","terminalPanel","style","height","northButton","southButton","theme","className","onTabClick"]);return r.createElement("div",Object.assign({ref:t},m,{className:"ch-editor-frame",style:Object.assign({background:F(h,C.EditorBackground)},l)}),r.createElement("div",{className:"ch-frame-title-bar",style:{color:F(h,C.IconForeground),background:F(h,C.EditorGroupHeaderBackground)}},r.createElement(rt,{tabs:o.tabs,showFrameButtons:!0,button:u,panel:"north",theme:h,onTabClick:p})),r.createElement("div",{"data-ch-panel":"north",style:o.style,children:o.children}),s&&r.createElement(r.Fragment,null,r.createElement("div",{className:"ch-frame-title-bar",style:{transform:null===(n=s.style)||void 0===n?void 0:n.transform,color:F(h,C.IconForeground),background:F(h,C.EditorGroupHeaderBackground)}},r.createElement(rt,{tabs:s.tabs,showFrameButtons:!1,button:d,topBorder:!0,panel:"south",theme:h,onTabClick:p})),r.createElement("div",{"data-ch-panel":"south",children:s.children,style:s.style})))}));function rt({tabs:e,button:t,showFrameButtons:n,topBorder:o,panel:i,theme:s,onTabClick:a}){const l=Ve("ch-editor-tab");return r.createElement(r.Fragment,null,o&&r.createElement("div",{style:{position:"absolute",height:"1px",background:F(s,C.EditorGroupBorder),width:"100%",top:0,zIndex:1}}),n?r.createElement(tt,null):r.createElement("div",null),e.map((({title:e,active:t,style:n})=>r.createElement("div",{key:e,title:e,"data-ch-tab":i,className:l("",t?"active":"inactive"),style:Object.assign(Object.assign({},n),{background:F(s,t?C.ActiveTabBackground:C.InactiveTabBackground),color:F(s,t?C.ActiveTabForeground:C.InactiveTabForeground),borderRightColor:F(s,C.TabBorder),borderBottomColor:F(s,t?C.ActiveTabBottomBorder:C.InactiveTabBackground)}),onClick:a&&(()=>a(e))},r.createElement(ot,{title:e})))),r.createElement("div",{style:{flex:1,minWidth:"0.8em"}}),t)}function ot({title:e}){if(!e)return r.createElement("div",null);const t=e.lastIndexOf("/")+1,n=e.substring(t),o=e.substring(0,t);return r.createElement("div",null,r.createElement("span",{style:{opacity:.5}},o),n)}const it=r.createElement("span",{className:"ch-terminal-prompt"},"$");function st({text:e,progress:t=1,style:n}){const o=function(e,t){if(!e)return[];const n=Math.round(e.length*t),{commands:r}=function(e){const[,...t]=e.split(/^\$\s*/gm),n=t.map((e=>{const[t,...n]=e.split(/\r?\n/);return{run:t,output:n.length>0?n.join("\n"):null}})),r=n[n.length-1],o=n.length>0&&null!=r.output;return{title:o?r.run.split(/(\s+)/)[0]:"bash",isRunning:o,commands:n}}(e.slice(0,n));return r}(e,t);return r.createElement("pre",{style:n,className:"ch-terminal-content"},o.map((({run:e,output:t},n)=>r.createElement(r.Fragment,{key:n},r.createElement("div",null,it," ",r.createElement("span",null,e)),t&&r.createElement("div",{className:"ch-terminal-output"},t)))))}function at({prev:e="",prevKey:t,next:n="",nextKey:o,progress:i}){return r.createElement("div",{className:"ch-terminal"},r.createElement("div",{style:{position:"relative",transform:`translateY(-${100*i}%)`}},r.createElement(st,{text:e,progress:1,key:t}),r.createElement(st,{style:{position:"absolute"},text:n,progress:i,key:o})))}function lt({steps:e,progress:t}){const n=e.map((e=>e.text)),o=t%1,i=(s=Math.floor(t),a=0,l=e.length-1,Math.min(Math.max(s,a),l));var s,a,l;const c=i+1;return r.createElement(at,{prev:n[i],prevKey:i,next:n[c]||"",nextKey:c,progress:o})}function ct({prev:e,next:t,t:n,backward:o}){const i=function({prev:e,next:t,t:n,backward:r}){return e||t?!e&&t?ut*Math.min(4*n,1):e&&!t?ut*Math.max(1-4*n,0):ut:0}({prev:e,next:t,t:n,backward:o});return i?r.createElement("div",{className:"ch-editor-terminal",style:{height:i}},r.createElement("div",{className:"ch-editor-terminal-tab"},r.createElement("span",null,"Terminal")),r.createElement("div",{className:"ch-editor-terminal-content"},r.createElement(lt,{steps:[{text:e||""},{text:t||""}],progress:n}),")")):null}const ut=150;function dt(e){return Array.isArray(e.rows)?Object.assign(Object.assign({},e),{rows:e.rows[0]}):e}function ht(e){return Array.isArray(e.rows)?Object.assign(Object.assign({},e),{rows:e.rows[1]}):e}function ft(e,t,n,o,i,s){const{prevSnapshot:a,nextSnapshot:l}=function(e,t,n){const[{prevSnapshot:o,nextSnapshot:i},s]=r.useState({prevSnapshot:null,nextSnapshot:null});return Et((()=>{(o||i)&&s({prevSnapshot:null,nextSnapshot:null})}),[t,n]),Et((()=>{if(o){if(!i){const t=e.current;s((e=>Object.assign(Object.assign({},e),{nextSnapshot:Object.assign(Object.assign({},wt(t,n)),kt(t,n))})))}}else{const n=e.current;s((e=>Object.assign(Object.assign({},e),{prevSnapshot:Object.assign(Object.assign({},wt(n,t)),kt(n,t))})))}})),{prevSnapshot:o,nextSnapshot:i}}(e,t,n);if(!a)return function(e,t,n){const o=e.northPanel,i=e.southPanel,{prevNorthFile:s,prevSouthFile:a,nextNorthFile:l,nextSouthFile:c}=vt(e,t,!0);return{northContent:gt(s),northPanel:{tabs:o.tabs.map((e=>({title:e,active:e===o.active,style:{}}))),style:{flexGrow:1,overflow:"hidden"},children:r.createElement(mt,{codeConfig:dt(n),prevFile:s,nextFile:s,t:0,parentHeight:"0"})},southContent:gt(a),southPanel:i&&{tabs:i.tabs.map((e=>({title:e,active:e===i.active,style:{}}))),style:{flexGrow:1,overflow:"hidden"},children:r.createElement(mt,{codeConfig:ht(n),prevFile:a,nextFile:a,t:0,parentHeight:"0"})}}}(t,n,s);if(!l)return pt(t,n,s);if(1===o)return pt(t,n,s);const c=t.southPanel||n.southPanel,{prevNorthFile:u,prevSouthFile:d,nextNorthFile:h,nextSouthFile:f}=vt(t,n,0==o||i),{northStyle:p,southStyle:m}=function(e,t,n){if(null===e.southHeight&&null===t.southHeight)return{northStyle:{minHeight:e.northHeight}};if(null!==e.southHeight&&null===t.southHeight&&t.northKey!==e.southKey)return{northStyle:{minHeight:bt(e.northHeight,t.northHeight,n)},southStyle:{minHeight:e.southHeight}};if(null!==e.southHeight&&null===t.southHeight&&e.southKey===t.northKey)return{northStyle:{minHeight:e.northHeight},southStyle:{position:"relative",minHeight:bt(e.southHeight,t.northHeight,n),transform:`translateY(${bt(0,-(e.northHeight+e.titleBarHeight),n)}px)`}};if(null===e.southHeight&&null!==t.southHeight&&e.northKey!==t.southKey)return{northStyle:{minHeight:bt(e.northHeight,t.northHeight,n)},southStyle:{position:"relative",minHeight:t.southHeight}};if(null===e.southHeight&&null!==t.southHeight&&e.northKey===t.southKey)return{northStyle:{minHeight:t.northHeight},southStyle:{position:"relative",minHeight:bt(e.northHeight,t.southHeight,n),transform:`translateY(${bt(-(t.northHeight+t.titleBarHeight),0,n)}px)`}};return{northStyle:{minHeight:bt(e.northHeight,t.northHeight,n)},southStyle:{minHeight:bt(e.southHeight,t.southHeight,n)}}}(a,l,o),{northTabs:g,southTabs:v}=function(e,t,n,r,o){if(!e.southTabs&&xt(r,e.northTabs))return{northTabs:yt(t.northTabs,t.southTabs,e.southTabs,e.northTabs,n,o),southTabs:yt(t.southTabs,t.northTabs,e.northTabs,e.southTabs,r,o)};if(!t.southTabs&&xt(r,t.northTabs))return{northTabs:yt(t.southTabs,t.northTabs,e.northTabs,e.southTabs,n,o),southTabs:yt(t.northTabs,t.southTabs,e.southTabs,e.northTabs,r,o)};return{northTabs:yt(t.northTabs,t.southTabs,e.northTabs,e.southTabs,n,o),southTabs:yt(t.southTabs,t.northTabs,e.southTabs,e.northTabs,r,o)}}(a,l,u.name,null==d?void 0:d.name,o);return{northContent:gt(h),northPanel:{tabs:g,style:p,children:r.createElement(mt,{codeConfig:dt(s),prevFile:u,nextFile:h,t:o,parentHeight:p.height||p.minHeight})},southContent:gt(f),southPanel:c&&{tabs:v,style:m,children:r.createElement(mt,{codeConfig:ht(s),prevFile:d,nextFile:f,t:o,parentHeight:(null==m?void 0:m.height)||(null==m?void 0:m.minHeight)})}}}function pt(e,t,n){var o;const i=t.northPanel,s=t.southPanel;let{prevNorthFile:a,prevSouthFile:l,nextNorthFile:c,nextSouthFile:u}=vt(e,t,!1);return!s&&i.active===(null===(o=null==e?void 0:e.southPanel)||void 0===o?void 0:o.active)&&(c=u),{northContent:gt(c),northPanel:{tabs:i.tabs.map((e=>({title:e,active:e===i.active,style:{}}))),style:{flexGrow:1,overflow:"hidden"},children:r.createElement(mt,{codeConfig:dt(n),prevFile:c,nextFile:c,t:1,parentHeight:"1"})},southContent:gt(u),southPanel:s&&{tabs:s.tabs.map((e=>({title:e,active:e===s.active,style:{}}))),style:{flexGrow:1,overflow:"hidden"},children:r.createElement(mt,{codeConfig:ht(n),prevFile:u,nextFile:u,t:1,parentHeight:"1"})}}}function mt({prevFile:e,nextFile:t,t:n,codeConfig:o,parentHeight:i}){var s;const a=Object.assign(Object.assign({},null==o?void 0:o.htmlProps),{style:Object.assign({height:"100%"},null===(s=null==o?void 0:o.htmlProps)||void 0===s?void 0:s.style)});return r.createElement(Fe,Object.assign({progress:n,tween:{prev:e,next:t},config:Object.assign(Object.assign({},o),{parentHeight:i})},a))}function gt(e){return e?p(e.code):""}function vt(e,t,n){var r,o;const i=e.northPanel.active,s=t.northPanel.active,a=null===(r=e.southPanel)||void 0===r?void 0:r.active,l=null===(o=t.southPanel)||void 0===o?void 0:o.active,c=e.files.find((e=>e.name===i)),u=t.files.find((e=>e.name===s)),d=a?e.files.find((e=>e.name===a)):null,h=l?t.files.find((e=>e.name===l)):null;if(!a&&i===l)return{prevNorthFile:u,nextNorthFile:u,prevSouthFile:c,nextSouthFile:h};if(!l&&s===a)return{prevNorthFile:c,nextNorthFile:c,prevSouthFile:d,nextSouthFile:u};return{prevNorthFile:i===s||n?c:u,nextNorthFile:i===s?u:n?c:u,prevSouthFile:a===l?d:n?d||h:h||d,nextSouthFile:a===l?h:n?d||h:h||d}}function bt(e,t,n){return e+(t-e)*n}function yt(e,t,n,r,o,i){const s=e?Object.keys(e).filter((e=>xt(e,n)||!n)).map((t=>{const r=n&&n[t],s=e[t],a=r?r.left+(s.left-r.left)*i:s.left,l=r?r.width+(s.width-r.width)*i:s.width;return{active:t===o,title:t,style:{position:"absolute",transform:`translateX(${a}px)`,width:l}}})):[],a=e?Object.keys(e).filter((e=>n&&!xt(e,n))).map((t=>{const n=e[t];return{active:t===o,title:t,style:{position:"absolute",transform:`translateX(${n.left}px)`,opacity:i,width:n.width}}})):[];!e||Object.keys(e).filter((e=>xt(e,r))).map((t=>{const n=r[t],i=e[t].left-n.left;return{active:t===o,title:t,style:{position:"absolute",transform:`translateX(${i}px)`}}}));return[...a,...s,...n?Object.keys(n).filter((t=>!xt(t,e))).map((e=>{const t=n[e];return{active:e===o,title:e,style:{position:"absolute",opacity:1-i,transform:`translateX(${t.left}px)`,width:t.width}}})):[]]}function xt(e,t){return t&&e&&e in t}const Et="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function wt(e,t){var n;const r=e.querySelector("[data-ch-panel='north']"),o=e.querySelector("[data-ch-panel='south']");return{titleBarHeight:e.querySelector(".ch-frame-title-bar").getBoundingClientRect().height,northHeight:r.getBoundingClientRect().height,northKey:t.northPanel.active,southHeight:(null==o?void 0:o.getBoundingClientRect().height)||null,southKey:null===(n=t.southPanel)||void 0===n?void 0:n.active}}function kt(e,t){var n;const r=Array.from(e.querySelectorAll("[data-ch-tab='north']")),o=Array.from(e.querySelectorAll("[data-ch-tab='south']"));return{northTabs:jt(r,t.northPanel.active),southTabs:jt(o,null===(n=t.southPanel)||void 0===n?void 0:n.active)}}function jt(e,t){if(!e[0])return null;const n=e[0].parentElement.getBoundingClientRect().left,r={};return e.forEach((e=>{const o=e.getAttribute("title"),i=e.getBoundingClientRect();r[o]={left:i.left-n,width:i.width,active:o===t}})),r}function Ct({files:e,theme:t,startingFileName:n}){const[o,i]=r.useState((()=>e.find((e=>e.name===n))));return r.createElement("div",{className:"ch-code-browser",style:{color:F(t,C.EditorForeground)}},r.createElement(Ot,{files:e,theme:t,activeFile:o,setActiveFile:i}),r.createElement(Bt,{file:o,theme:t}))}function Ot({theme:e,files:t,activeFile:n,setActiveFile:o}){const i=r.useMemo((()=>function(e){let t=[];for(const n of e){const e=n.name.split("/");let r=t;for(let t=0;t<e.length;t++){const o=e[t],i=t===e.length-1,s=r.findIndex((e=>e.name===o));if(-1===s){const e={name:o,children:[],codeFile:void 0};i&&(e.codeFile=n),r.push(e),r=e.children}else r=r[s].children}}return t=St(t),t}(t)),[t]);return r.createElement("div",{className:"ch-code-browser-sidebar",style:{borderColor:F(e,C.SideBarBorder),background:F(e,C.SideBarBackground),color:F(e,C.SideBarForeground),"--ch-list-selection-background":F(e,C.ListActiveSelectionBackground),"--ch-list-selection-foreground":F(e,C.ListActiveSelectionForeground),"--ch-hover-background":F(e,C.ListHoverBackground),"--ch-hover-foreground":F(e,C.ListHoverForeground)}},r.createElement(Ft,{tree:i,activeFile:n,setActiveFile:o}))}function Ft({tree:e,activeFile:t,setActiveFile:n,level:o=0}){return r.createElement(r.Fragment,null,e.map((e=>r.createElement(Nt,{key:e.name,node:e,activeFile:t,setActiveFile:n,level:o}))))}function Nt({node:e,activeFile:t,setActiveFile:n,level:o}){const i=e.children&&e.children.length>0,s=e.codeFile===t;return i?r.createElement("div",null,r.createElement("div",{className:"ch-code-browser-sidebar-folder"},r.createElement("div",{style:{paddingLeft:1.5*o+"ch"}},e.name)),r.createElement(Ft,{tree:e.children,activeFile:t,setActiveFile:n,level:o+1})):r.createElement("div",null,r.createElement("div",{className:"ch-code-browser-sidebar-file",onClick:()=>n(e.codeFile),style:s?{color:"var(--ch-list-selection-foreground)",background:"var(--ch-list-selection-background)"}:{}},r.createElement("div",{style:{paddingLeft:1.5*o+"ch"}},e.name)))}function Bt({file:e,theme:t}){return r.createElement("div",{className:"ch-code-browser-content",style:{background:F(t,C.CodeBackground),color:F(t,C.CodeForeground),"--ch-selection-background":F(t,C.SelectionBackground),colorScheme:N(t)}},r.createElement(Oe,{className:"ch-code-browser-button",content:p(e.code)}),e.code.lines.map(((e,t)=>r.createElement("div",{key:t},0===e.tokens.length?r.createElement("br",null):e.tokens.map(((e,t)=>r.createElement("span",Object.assign({key:t},e.props),e.content)))))))}function St(e){for(const t of e)t.children=St(t.children);return e.sort(((e,t)=>{const n=e.children&&e.children.length>0,r=t.children&&t.children.length>0;return n&&r||!n&&!r?e.name.localeCompare(t.name):n?-1:1}))}function _t({style:e,step:t,theme:n,className:o}){const[i,s]=r.useState(!1),[a,l]=r.useState(!0),c=r.useRef(null),u=t.files;return r.useEffect((()=>{c.current&&!c.current.showModal&&l(!1)}),[]),a?r.createElement(r.Fragment,null,r.createElement(Lt,{className:o,style:e,onClick:()=>{c.current.showModal(),document.body.classList.add("ch-no-scroll"),s(!0)}}),r.createElement("dialog",{ref:c,className:"ch-expand-dialog",onClose:()=>{s(!1)},onClick:e=>{e.currentTarget===e.target&&(c.current.close(),document.body.classList.remove("ch-no-scroll"))}},r.createElement(It,{onClick:()=>{c.current.close(),document.body.classList.remove("ch-no-scroll")}}),i?r.createElement("div",{className:"ch-expand-dialog-content",style:{borderColor:F(n,C.SideBarBorder)}},r.createElement(Ct,{files:u,theme:n,startingFileName:t.northPanel.active})):void 0)):null}function Lt({onClick:e,style:t,className:n}){return r.createElement("svg",{style:t,onClick:e,className:n,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"button"},r.createElement("title",null,"Expand"),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"}))}function It({onClick:e}){return r.createElement("svg",{onClick:e,className:"ch-expand-close",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"button"},r.createElement("title",null,"Close"),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}))}const Ht={files:[{code:{lines:[],lang:"js"},focus:"",name:""}],northPanel:{active:"",tabs:[""],heightRatio:1}};function Pt(e){var{prev:t=Ht,next:n,t:o,backward:s,codeConfig:a,frameProps:l={}}=e,c=i(e,["prev","next","t","backward","codeConfig","frameProps"]);const u=r.createRef(),{showCopyButton:d,showExpandButton:h}=a,f=i(a,["showCopyButton","showExpandButton"]),{northPanel:p,southPanel:m,northContent:g,southContent:v}=ft(u,t,n||t,o,s,f),[b,y]=r.useState(void 0);L((()=>{var e;const t=null===(e=u.current)||void 0===e?void 0:e.getBoundingClientRect().height;y(t)}),[]);const x=Object.assign(Object.assign(Object.assign({},l),c),{style:Object.assign(Object.assign({},null==l?void 0:l.style),null==c?void 0:c.style)});b&&(x.style.height=b,x.style.maxHeight=b);const E=r.createElement(r.Fragment,null,d?r.createElement(Oe,{className:"ch-editor-button",content:g}):void 0,h?r.createElement(_t,{className:"ch-editor-button",step:n||t,theme:a.theme}):void 0),w=d?r.createElement(Oe,{className:"ch-editor-button",content:v}):void 0,k=r.createElement(ct,{prev:t.terminal,next:(n||t).terminal,t:o,backward:s});return r.createElement(nt,Object.assign({ref:u},x,{northPanel:p,southPanel:m,terminalPanel:k,theme:a.theme,northButton:E,southButton:w}))}const Tt={stiffness:120,damping:24,mass:.2,decimals:3};function At(e){var{northPanel:t,southPanel:n,files:o,terminal:s,springConfig:a}=e,l=i(e,["northPanel","southPanel","files","terminal","springConfig"]);const c=r.useMemo((()=>({northPanel:t,southPanel:n,files:o,terminal:s})),[t,n,o,s]),{prev:u,next:d,t:h}=function(e,t=Tt){const[{target:n,steps:o,index:i},s]=r.useState({target:2,steps:[e,e,e],index:0});r.useEffect((()=>{o[o.length-1]!=e&&s((t=>function(e,t,n){const{steps:r,target:o,index:i}=e,s=r.slice();return n-i<1?(s[2]=t,Object.assign(Object.assign({},e),{steps:s})):(s[0]=r[1],s[1]=r[2],s[2]=t,Object.assign(Object.assign({},e),{steps:s,target:o+1,index:i+1}))}(t,e,a)))}),[e]);const[a]=Ge(n,t),l=a-i;return l<=1?{prev:o[0],next:o[1],t:l}:{prev:o[1],next:o[2],t:l-1}}(c,a);return r.createElement(Pt,Object.assign({t:h,backward:!1,prev:u,next:d},l))}function Mt(e){const[t,n]=r.useState(e);return r.createElement($t,Object.assign({},t,{onTabClick:function(e){const r=zt(t,e,null);n(Object.assign(Object.assign({},t),r))}}))}function $t(e){var{onTabClick:t}=e,n=i(e,["onTabClick"]);const o=function(e){var t,n,r,o,s,a,l,c,u;const{lineNumbers:d,showCopyButton:h,showExpandButton:f,minZoom:p,maxZoom:m}=e,g=i(e,["lineNumbers","showCopyButton","showExpandButton","minZoom","maxZoom"]),v=Object.assign(Object.assign({},e.codeConfig),{maxZoom:null==m?null===(t=e.codeConfig)||void 0===t?void 0:t.maxZoom:m,minZoom:null==p?null===(n=e.codeConfig)||void 0===n?void 0:n.minZoom:p,horizontalCenter:null!==(o=null===(r=e.codeConfig)||void 0===r?void 0:r.horizontalCenter)&&void 0!==o?o:e.horizontalCenter,lineNumbers:null==d?null===(s=e.codeConfig)||void 0===s?void 0:s.lineNumbers:d,showCopyButton:null==h?null===(a=e.codeConfig)||void 0===a?void 0:a.showCopyButton:h,showExpandButton:null==f?null===(l=e.codeConfig)||void 0===l?void 0:l.showExpandButton:f,rows:e.rows,debug:null!==(c=e.debug)&&void 0!==c?c:null===(u=e.codeConfig)||void 0===u?void 0:u.debug});return Object.assign(Object.assign({},g),{codeConfig:v})}(n),{className:s,style:a,codeConfig:l}=o,c=i(o,["className","style","codeConfig"]);if(n.southPanel||1!==n.files.length||n.files[0].name){const e=Object.assign(Object.assign({},null==c?void 0:c.frameProps),{onTabClick:t});return r.createElement("div",{className:`ch-codegroup not-prose ${s||""}`,style:a},r.createElement(At,Object.assign({},c,{frameProps:e,codeConfig:l})))}return r.createElement("div",{className:`ch-codeblock not-prose ${s||""}`,style:a},r.createElement(Ze,{className:"ch-code",config:l,step:c.files[0]}))}function zt(e,t,n){const r=t||e.northPanel.active,o=e.files.map((e=>e.name===r?Object.assign(Object.assign({},e),{focus:null===n?e.focus:n}):e));let i=Object.assign({},e.northPanel),s=e.southPanel&&Object.assign({},e.southPanel);return e.northPanel.tabs.includes(r)?i.active=r:s&&(s.active=r),{files:o,northPanel:i,southPanel:s}}r.createContext({props:null,setFocus:()=>{}});r.createContext({activatedId:void 0,activate:()=>{},reset:()=>{}});function Wt(){const e=Ve("ch-browser");return r.createElement("svg",{fill:"currentColor",preserveAspectRatio:"xMidYMid meet",height:"1em",viewBox:"13 10 14 23",className:e("button","back-button")},r.createElement("g",null,r.createElement("path",{d:"m26.5 12.1q0 0.3-0.2 0.6l-8.8 8.7 8.8 8.8q0.2 0.2 0.2 0.5t-0.2 0.5l-1.1 1.1q-0.3 0.3-0.6 0.3t-0.5-0.3l-10.4-10.4q-0.2-0.2-0.2-0.5t0.2-0.5l10.4-10.4q0.3-0.2 0.5-0.2t0.6 0.2l1.1 1.1q0.2 0.2 0.2 0.5z"})))}function Rt(){const e=Ve("ch-browser");return r.createElement("svg",{fill:"currentColor",preserveAspectRatio:"xMidYMid meet",height:"1em",viewBox:"13 10 14 23",className:e("button","forward-button")},r.createElement("g",null,r.createElement("path",{d:"m26.3 21.4q0 0.3-0.2 0.5l-10.4 10.4q-0.3 0.3-0.6 0.3t-0.5-0.3l-1.1-1.1q-0.2-0.2-0.2-0.5t0.2-0.5l8.8-8.8-8.8-8.7q-0.2-0.3-0.2-0.6t0.2-0.5l1.1-1.1q0.3-0.2 0.5-0.2t0.6 0.2l10.4 10.4q0.2 0.2 0.2 0.5z"})))}function Ut({href:e,style:t}){const n=Ve("ch-browser");return r.createElement("a",{className:n("button","open-button"),title:"Open in new tab",href:e,style:t,target:"_blank",rel:"noopener noreferrer"},r.createElement("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"3 3 18 18",height:"1em",width:"1em",className:n("open-icon"),xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})))}function qt({url:e,linkUrl:t,theme:n}){const o=F(n,C.InputBorder);return r.createElement(r.Fragment,null,r.createElement(tt,null),r.createElement(Wt,null),r.createElement(Rt,null),r.createElement("input",{value:e||"",readOnly:!0,style:{background:F(n,C.InputBackground),color:F(n,C.InputForeground),border:o?`1px solid ${o}`:void 0}}),r.createElement(Ut,{href:t,style:{color:F(n,C.EditorForeground)}}))}function Gt(e){return r.useMemo((()=>e?e.map((e=>{const{displayUrl:t,loadUrl:n}=function(e,t,n){const r="undefined"!=typeof window?window.origin:"",o=e&&!0===n?r+e:e;return{displayUrl:o,loadUrl:t||o}}(e.url,e.loadUrl,e.prependOrigin);return{zoom:e.zoom||1,displayUrl:t,loadUrl:n,children:e.children}})):[{zoom:1}]),[e])}const Dt=r.forwardRef((function(e,t){var{progress:n=0,backward:o=!1,steps:s,transition:a="none",classes:l,theme:c}=e,u=i(e,["progress","backward","steps","transition","classes","theme"]);const d=Ve("ch-mini-browser",l),h=Gt(s),f=Math.round(n),{zoom:p,displayUrl:m,loadUrl:g,children:v}=h[f];return r.createElement(Qe,Object.assign({},u,{zoom:p,className:`${d("")} ${u.className||""}`,style:Object.assign(Object.assign({},Xt({progress:n,transition:a})),u.style),classes:l,titleBar:r.createElement(qt,{url:m,linkUrl:g,theme:c}),theme:c}),v||r.createElement("iframe",{ref:t,src:g}))}));function Xt({progress:e,transition:t}){if("slide"===t){const t=50,n=e-Math.floor(e),r=n<=.5?-t*n:t-t*n,o=2*Math.abs(n-.5);return{transform:`translateX(${r}px)`,opacity:o*o}}return{}}function Zt(e){var{url:t,loadUrl:n,prependOrigin:o,children:s,zoom:a}=e,l=i(e,["url","loadUrl","prependOrigin","children","zoom"]);const[c,u]=function({url:e,loadUrl:t,prependOrigin:n,children:o,zoom:i}){const[s,a]=r.useState({target:0,steps:[{url:e,loadUrl:t,prependOrigin:n,children:o,zoom:i}]});r.useEffect((()=>{const r=s.steps[s.steps.length-1];r.url===e&&r.loadUrl===t&&r.prependOrigin===n&&r.children===o||a((r=>({target:r.target+1,steps:[...r.steps,{url:e,loadUrl:t,prependOrigin:n,children:o,zoom:i}]})))}),[e,t,n,o,i]);const[l]=Ge(s.target,{stiffness:100,decimals:3});return[s.steps,l]}({url:t,loadUrl:n,prependOrigin:o,children:s,zoom:a});return r.createElement(Dt,Object.assign({},l,{steps:c,progress:u}))}var Kt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Yt={};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.getMainFile=function(e){return"vue-cli"===e?"src/main.js":"angular-cli"===e?"src/main.ts":"create-react-app-typescript"===e?"src/index.tsx":"parcel"===e?"index.html":"gatsby"===e?"src/pages/index.js":"nuxt"===e||"next"===e||"apollo"===e||"reason"===e||"sapper"===e?"package.json":"nest"===e?"src/main.ts":"static"===e?"index.html":"src/index.js"};var Vt="sandbox.config.json";var Jt=Yt.getTemplate=function(e,t){var n=t[Vt]||t["/"+Vt];if(n)try{var r=JSON.parse(n.content);if(r.template)return r.template}catch(f){}var o=e.dependencies,i=void 0===o?{}:o,s=e.devDependencies,a=void 0===s?{}:s,l=Object.keys(i).concat(Object.keys(a)),c=["nuxt","nuxt-edge"];if(l.some((function(e){return c.indexOf(e)>-1})))return"nuxt";if(l.indexOf("next")>-1)return"next";var u=["apollo-server","apollo-server-express","apollo-server-hapi","apollo-server-koa","apollo-server-lambda","apollo-server-micro"];if(l.some((function(e){return u.indexOf(e)>-1})))return"apollo";if(l.indexOf("ember-cli")>-1)return"ember";if(l.indexOf("sapper")>-1)return"sapper";var d=Object.keys(t);if(d.some((function(e){return e.endsWith(".vue")})))return"vue-cli";if(d.some((function(e){return e.endsWith(".re")})))return"reason";if(l.indexOf("gatsby")>-1)return"gatsby";if(l.indexOf("parcel-bundler")>-1)return"parcel";if(l.indexOf("react-scripts")>-1)return"create-react-app";if(l.indexOf("react-scripts-ts")>-1)return"create-react-app-typescript";if(l.indexOf("@angular/core")>-1)return"angular-cli";if(l.indexOf("preact-cli")>-1)return"preact-cli";if(l.indexOf("svelte")>-1)return"svelte";if(l.indexOf("vue")>-1)return"vue-cli";var h=["@dojo/core","@dojo/framework"];return l.some((function(e){return h.indexOf(e)>-1}))?"@dojo/cli-create-app":l.indexOf("cx")>-1?"cxjs":l.indexOf("@nestjs/core")>-1||l.indexOf("@nestjs/common")>-1?"nest":void 0},Qt={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Array]",s="[object Boolean]",a="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",h="[object Object]",f="[object Promise]",p="[object RegExp]",m="[object Set]",g="[object String]",v="[object Symbol]",b="[object WeakMap]",y="[object ArrayBuffer]",x="[object DataView]",E=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,k={};k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k[o]=k[i]=k[y]=k[s]=k[x]=k[a]=k[l]=k[c]=k[u]=k[d]=k[h]=k[p]=k[m]=k[g]=k[b]=!1;var j="object"==typeof Kt&&Kt&&Kt.Object===Object&&Kt,C="object"==typeof self&&self&&self.Object===Object&&self,O=j||C||Function("return this")(),F=t&&!t.nodeType&&t,N=F&&e&&!e.nodeType&&e,B=N&&N.exports===F,S=B&&j.process,_=function(){try{return S&&S.binding&&S.binding("util")}catch(e){}}(),L=_&&_.isTypedArray;function I(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function H(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function P(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var T,A,M,$=Array.prototype,z=Function.prototype,W=Object.prototype,R=O["__core-js_shared__"],U=z.toString,q=W.hasOwnProperty,G=(T=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+T:"",D=W.toString,X=RegExp("^"+U.call(q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=B?O.Buffer:void 0,K=O.Symbol,Y=O.Uint8Array,V=W.propertyIsEnumerable,J=$.splice,Q=K?K.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=Z?Z.isBuffer:void 0,ne=(A=Object.keys,M=Object,function(e){return A(M(e))}),re=_e(O,"DataView"),oe=_e(O,"Map"),ie=_e(O,"Promise"),se=_e(O,"Set"),ae=_e(O,"WeakMap"),le=_e(Object,"create"),ce=Pe(re),ue=Pe(oe),de=Pe(ie),he=Pe(se),fe=Pe(ae),pe=K?K.prototype:void 0,me=pe?pe.valueOf:void 0;function ge(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new be;++t<n;)this.add(e[t])}function xe(e){var t=this.__data__=new ve(e);this.size=t.size}function Ee(e,t){var n=Me(e),r=!n&&Ae(e),o=!n&&!r&&$e(e),i=!n&&!r&&!o&&qe(e),s=n||r||o||i,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=a.length;for(var c in e)!t&&!q.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||He(c,l))||a.push(c);return a}function we(e,t){for(var n=e.length;n--;)if(Te(e[n][0],t))return n;return-1}function ke(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Q&&Q in Object(e)?function(e){var t=q.call(e,Q),n=e[Q];try{e[Q]=void 0;var r=!0}catch(i){}var o=D.call(e);r&&(t?e[Q]=n:delete e[Q]);return o}(e):function(e){return D.call(e)}(e)}function je(e){return Ue(e)&&ke(e)==o}function Ce(e,t,n,r,c){return e===t||(null==e||null==t||!Ue(e)&&!Ue(t)?e!=e&&t!=t:function(e,t,n,r,c,f){var b=Me(e),E=Me(t),w=b?i:Ie(e),k=E?i:Ie(t),j=(w=w==o?h:w)==h,C=(k=k==o?h:k)==h,O=w==k;if(O&&$e(e)){if(!$e(t))return!1;b=!0,j=!1}if(O&&!j)return f||(f=new xe),b||qe(e)?Ne(e,t,n,r,c,f):function(e,t,n,r,o,i,c){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!i(new Y(e),new Y(t)));case s:case a:case d:return Te(+e,+t);case l:return e.name==t.name&&e.message==t.message;case p:case g:return e==t+"";case u:var h=H;case m:var f=1&r;if(h||(h=P),e.size!=t.size&&!f)return!1;var b=c.get(e);if(b)return b==t;r|=2,c.set(e,t);var E=Ne(h(e),h(t),r,o,i,c);return c.delete(e),E;case v:if(me)return me.call(e)==me.call(t)}return!1}(e,t,w,n,r,c,f);if(!(1&n)){var F=j&&q.call(e,"__wrapped__"),N=C&&q.call(t,"__wrapped__");if(F||N){var B=F?e.value():e,S=N?t.value():t;return f||(f=new xe),c(B,S,n,r,f)}}if(!O)return!1;return f||(f=new xe),function(e,t,n,r,o,i){var s=1&n,a=Be(e),l=a.length,c=Be(t).length;if(l!=c&&!s)return!1;var u=l;for(;u--;){var d=a[u];if(!(s?d in t:q.call(t,d)))return!1}var h=i.get(e);if(h&&i.get(t))return h==t;var f=!0;i.set(e,t),i.set(t,e);var p=s;for(;++u<l;){var m=e[d=a[u]],g=t[d];if(r)var v=s?r(g,m,d,t,e,i):r(m,g,d,e,t,i);if(!(void 0===v?m===g||o(m,g,n,r,i):v)){f=!1;break}p||(p="constructor"==d)}if(f&&!p){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(f=!1)}return i.delete(e),i.delete(t),f}(e,t,n,r,c,f)}(e,t,n,r,Ce,c))}function Oe(e){return!(!Re(e)||function(e){return!!G&&G in e}(e))&&(ze(e)?X:E).test(Pe(e))}function Fe(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||W,t!==r)return ne(e);var t,n,r,o=[];for(var i in Object(e))q.call(e,i)&&"constructor"!=i&&o.push(i);return o}function Ne(e,t,n,r,o,i){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=i.get(e);if(c&&i.get(t))return c==t;var u=-1,d=!0,h=2&n?new ye:void 0;for(i.set(e,t),i.set(t,e);++u<a;){var f=e[u],p=t[u];if(r)var m=s?r(p,f,u,t,e,i):r(f,p,u,e,t,i);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!I(t,(function(e,t){if(s=t,!h.has(s)&&(f===e||o(f,e,n,r,i)))return h.push(t);var s}))){d=!1;break}}else if(f!==p&&!o(f,p,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d}function Be(e){return function(e,t,n){var r=t(e);return Me(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ge,Le)}function Se(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function _e(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Oe(n)?n:void 0}ge.prototype.clear=function(){this.__data__=le?le(null):{},this.size=0},ge.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ge.prototype.get=function(e){var t=this.__data__;if(le){var r=t[e];return r===n?void 0:r}return q.call(t,e)?t[e]:void 0},ge.prototype.has=function(e){var t=this.__data__;return le?void 0!==t[e]:q.call(t,e)},ge.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=le&&void 0===t?n:t,this},ve.prototype.clear=function(){this.__data__=[],this.size=0},ve.prototype.delete=function(e){var t=this.__data__,n=we(t,e);return!(n<0)&&(n==t.length-1?t.pop():J.call(t,n,1),--this.size,!0)},ve.prototype.get=function(e){var t=this.__data__,n=we(t,e);return n<0?void 0:t[n][1]},ve.prototype.has=function(e){return we(this.__data__,e)>-1},ve.prototype.set=function(e,t){var n=this.__data__,r=we(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},be.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(oe||ve),string:new ge}},be.prototype.delete=function(e){var t=Se(this,e).delete(e);return this.size-=t?1:0,t},be.prototype.get=function(e){return Se(this,e).get(e)},be.prototype.has=function(e){return Se(this,e).has(e)},be.prototype.set=function(e,t){var n=Se(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ye.prototype.add=ye.prototype.push=function(e){return this.__data__.set(e,n),this},ye.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.clear=function(){this.__data__=new ve,this.size=0},xe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},xe.prototype.get=function(e){return this.__data__.get(e)},xe.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var r=n.__data__;if(!oe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new be(r)}return n.set(e,t),this.size=n.size,this};var Le=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}(ee(e),(function(t){return V.call(e,t)})))}:function(){return[]},Ie=ke;function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||w.test(e))&&e>-1&&e%1==0&&e<t}function Pe(e){if(null!=e){try{return U.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Te(e,t){return e===t||e!=e&&t!=t}(re&&Ie(new re(new ArrayBuffer(1)))!=x||oe&&Ie(new oe)!=u||ie&&Ie(ie.resolve())!=f||se&&Ie(new se)!=m||ae&&Ie(new ae)!=b)&&(Ie=function(e){var t=ke(e),n=t==h?e.constructor:void 0,r=n?Pe(n):"";if(r)switch(r){case ce:return x;case ue:return u;case de:return f;case he:return m;case fe:return b}return t});var Ae=je(function(){return arguments}())?je:function(e){return Ue(e)&&q.call(e,"callee")&&!V.call(e,"callee")},Me=Array.isArray;var $e=te||function(){return!1};function ze(e){if(!Re(e))return!1;var t=ke(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function We(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Re(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ue(e){return null!=e&&"object"==typeof e}var qe=L?function(e){return function(t){return e(t)}}(L):function(e){return Ue(e)&&We(e.length)&&!!k[ke(e)]};function Ge(e){return null!=(t=e)&&We(t.length)&&!ze(t)?Ee(e):Fe(e);var t}e.exports=function(e,t){return Ce(e,t)}}(Qt,Qt.exports);var en=Qt.exports,tn=()=>Math.floor(1e6*Math.random()+1e6*Math.random());function nn(e={},t={},n="/index.js"){return JSON.stringify({name:"sandpack-project",main:n,dependencies:e,devDependencies:t},null,2)}function rn(e){if("SyntaxError"===e.title){const{title:t,path:n,message:r,line:o,column:i}=e;return{title:t,path:n,message:r,line:o,column:i}}const t=function(e){if(!e)return;return e.find((e=>!!e._originalFileName))}(e.payload.frames);if(!t)return{message:e.message};const n=function(e){const t=e._originalScriptCode[e._originalScriptCode.length-1].lineNumber.toString().length,n=2+t+3+e._originalColumnNumber;return e._originalScriptCode.reduce(((e,r)=>{const o=r.highlight?">":" ",i=r.lineNumber.toString().length===t?`${r.lineNumber}`:` ${r.lineNumber}`,s=r.highlight?"\n"+" ".repeat(n)+"^":"";return e+"\n"+o+" "+i+" | "+r.content+s}),"")}(t),r=(o=t)?` (${o._originalLineNumber}:${o._originalColumnNumber})`:"";var o;const i=function(e,t,n,r){return`${e}: ${t}${n}\n${r}`}(t._originalFileName,e.message,r,n);return{message:i,title:e.title,path:t._originalFileName,line:t._originalLineNumber,column:t._originalColumnNumber}}var on,sn,an=`https://${"0.19.0".replace(/\./g,"-")}-sandpack.codesandbox.io/`;function ln(e){var{className:t,files:n,presetConfig:o,show:s,children:a,codeConfig:l,style:c,frameless:u}=e,d=i(e,["className","files","presetConfig","show","children","codeConfig","style","frameless"]);const h=o?r.createElement(cn,{files:n,presetConfig:o}):a;return r.createElement("div",{className:"ch-preview"+(t?" "+t:""),style:c},u?h:r.createElement(Zt,Object.assign({loadUrl:s,theme:l.theme},d,{children:h})))}function cn({files:e,presetConfig:t}){const n=r.useRef(null),o=r.useRef(null);return r.useEffect((()=>{o.current=new class{constructor(e,t,n={}){var r;if(this.getTranspilerContext=()=>new Promise((e=>{const t=this.listen((n=>{"transpiler-context"===n.type&&(e(n.data),t())}));this.dispatch({type:"get-transpiler-context"})})),this.options=n,this.sandboxInfo=t,this.bundlerURL=n.bundlerURL||an,this.bundlerState=void 0,this.errors=[],this.status="initializing","string"==typeof e){this.selector=e;const t=document.querySelector(e);if(!t)throw new Error(`No element found for selector '${e}'`);this.element=t,this.iframe=document.createElement("iframe"),this.initializeElement()}else this.element=e,this.iframe=e;this.iframe.getAttribute("sandbox")||this.iframe.setAttribute("sandbox","allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts");const o=n.startRoute?new URL(n.startRoute,this.bundlerURL).toString():this.bundlerURL;null==(r=this.iframe.contentWindow)||r.location.replace(o),this.iframeProtocol=new class{constructor(e,t){this.globalListeners={},this.globalListenersCount=0,this.channelListeners={},this.channelListenersCount=0,this.channelId=Math.floor(1e6*Math.random()),this.frameWindow=e.contentWindow,this.origin=t,this.globalListeners=[],this.channelListeners=[],this.eventListener=this.eventListener.bind(this),"undefined"!=typeof window&&window.addEventListener("message",this.eventListener)}cleanup(){window.removeEventListener("message",this.eventListener),this.globalListeners={},this.channelListeners={},this.globalListenersCount=0,this.channelListenersCount=0}register(){this.frameWindow&&this.frameWindow.postMessage({type:"register-frame",origin:document.location.origin,id:this.channelId},this.origin)}dispatch(e){this.frameWindow&&this.frameWindow.postMessage({$id:this.channelId,codesandbox:!0,...e},this.origin)}globalListen(e){if("function"!=typeof e)return()=>{};const t=this.globalListenersCount;return this.globalListeners[t]=e,this.globalListenersCount++,()=>{delete this.globalListeners[t]}}channelListen(e){if("function"!=typeof e)return()=>{};const t=this.channelListenersCount;return this.channelListeners[t]=e,this.channelListenersCount++,()=>{delete this.channelListeners[t]}}eventListener(e){if(e.source!==this.frameWindow)return;const t=e.data;t.codesandbox&&(Object.values(this.globalListeners).forEach((e=>e(t))),t.$id===this.channelId&&Object.values(this.channelListeners).forEach((e=>e(t))))}}(this.iframe,this.bundlerURL),this.unsubscribeGlobalListener=this.iframeProtocol.globalListen((e=>{"initialized"===e.type&&this.iframe.contentWindow&&(this.iframeProtocol.register(),this.options.fileResolver&&(this.fileResolverProtocol=new class{constructor(e,t,n){this.type=e,this.handleMessage=t,this.target=n,this.outgoingMessages=new Set,this._messageListener=async e=>{var t;const{data:n}=e;if(n.$type!==this.getTypeId())return;if(this.outgoingMessages.has(n.$id))return;let r={$originId:this.internalId,$type:this.getTypeId(),$id:n.$id};try{const e=await this.handleMessage(n.$data);r.$data=e}catch(o){o.message||console.error(o),r.$error={message:null!=(t=o.message)?t:"Unknown error"}}e.source?e.source.postMessage(r,"*"):this._postMessage(r)},this.createConnection(),this.internalId=tn(),this.isWorker="Worker"===(e=>{try{return e.constructor.name}catch(t){return""}})(n)}getTypeId(){return`p-${this.type}`}createConnection(){self.addEventListener("message",this._messageListener)}dispose(){self.removeEventListener("message",this._messageListener)}sendMessage(e){return new Promise((t=>{const n=tn(),r={$originId:this.internalId,$type:this.getTypeId(),$data:e,$id:n};this.outgoingMessages.add(n);const o=e=>{const{data:r}=e;r.$type===this.getTypeId()&&r.$id===n&&r.$originId!==this.internalId&&(t(r.$data),self.removeEventListener("message",o))};self.addEventListener("message",o),this._postMessage(r)}))}_postMessage(e){this.isWorker||"undefined"!=typeof DedicatedWorkerGlobalScope&&this.target instanceof DedicatedWorkerGlobalScope?this.target.postMessage(e):this.target.postMessage(e,"*")}}("file-resolver",(async e=>"isFile"===e.m?this.options.fileResolver.isFile(e.p):this.options.fileResolver.readFile(e.p)),this.iframe.contentWindow)),this.updatePreview(this.sandboxInfo,!0))})),this.unsubscribeChannelListener=this.iframeProtocol.channelListen((e=>{switch(e.type){case"start":this.errors=[];break;case"status":this.status=e.status;break;case"action":"show-error"===e.action&&(this.errors=[...this.errors,rn(e)]);break;case"state":this.bundlerState=e.state}}))}cleanup(){this.unsubscribeChannelListener(),this.unsubscribeGlobalListener(),this.iframeProtocol.cleanup()}updateOptions(e){en(this.options,e)||(this.options=e,this.updatePreview())}updatePreview(e=this.sandboxInfo,t){var n,r,o,i;this.sandboxInfo={...this.sandboxInfo,...e};const s=this.getFiles(),a=Object.keys(s).reduce(((e,t)=>({...e,[t]:{code:s[t].code,path:t}})),{});let l=JSON.parse(nn(this.sandboxInfo.dependencies,this.sandboxInfo.devDependencies,this.sandboxInfo.entry));try{l=JSON.parse(s["/package.json"].code)}catch(u){console.error("Could not parse package.json file: "+u.message)}const c=Object.keys(s).reduce(((e,t)=>({...e,[t]:{content:s[t].code,path:t}})),{});this.dispatch({type:"compile",codesandbox:!0,version:3,isInitializationCompile:t,modules:a,reactDevTools:this.options.reactDevTools,externalResources:this.options.externalResources||[],hasFileResolver:Boolean(this.options.fileResolver),disableDependencyPreprocessing:this.sandboxInfo.disableDependencyPreprocessing,template:this.sandboxInfo.template||Jt(l,c),showOpenInCodeSandbox:null==(n=this.options.showOpenInCodeSandbox)||n,showErrorScreen:null==(r=this.options.showErrorScreen)||r,showLoadingScreen:null==(o=this.options.showLoadingScreen)||o,skipEval:this.options.skipEval||!1,clearConsoleDisabled:!this.options.clearConsoleOnFirstCompile,logLevel:null!=(i=this.options.logLevel)?i:on.Info})}dispatch(e){this.iframeProtocol.dispatch(e)}listen(e){return this.iframeProtocol.channelListen(e)}getCodeSandboxURL(){const e=this.getFiles(),t=Object.keys(e).reduce(((t,n)=>({...t,[n.replace("/","")]:{content:e[n].code,isBinary:!1}})),{});return fetch("https://codesandbox.io/api/v1/sandboxes/define?json=1",{method:"POST",body:JSON.stringify({files:t}),headers:{Accept:"application/json","Content-Type":"application/json"}}).then((e=>e.json())).then((e=>({sandboxId:e.sandbox_id,editorUrl:`https://codesandbox.io/s/${e.sandbox_id}`,embedUrl:`https://codesandbox.io/embed/${e.sandbox_id}`})))}getFiles(){const{sandboxInfo:e}=this;return void 0===e.files["/package.json"]?function(e,t,n,r){const o={...e};if(!o["/package.json"]){if(!t)throw new Error("No dependencies specified, please specify either a package.json or dependencies.");if(!r)throw new Error("Missing 'entry' parameter. Either specify an entry point, or pass in a package.json with the 'main' field set.");o["/package.json"]={code:nn(t,n,r)}}return o}(e.files,e.dependencies,e.devDependencies,e.entry):this.sandboxInfo.files}initializeElement(){if(this.iframe.style.border="0",this.iframe.style.width=this.options.width||"100%",this.iframe.style.height=this.options.height||"100%",this.iframe.style.overflow="hidden",!this.element.parentNode)throw new Error("Given element does not have a parent.");this.element.parentNode.replaceChild(this.iframe,this.element)}}(n.current,Object.assign(Object.assign({},t),{files:un(t.files,e)}),{showOpenInCodeSandbox:!1})}),[]),r.useEffect((()=>{o.current&&o.current.updatePreview(Object.assign(Object.assign({},t),{files:un(t.files,e)}))}),[e]),r.createElement("iframe",{ref:n})}function un(e,t){const n=Object.assign({},e);return t.forEach((e=>{n["/"+e.name]={code:e.code.lines.map((e=>e.tokens.map((e=>e.content)).join(""))).join("\n")}})),n}function dn(e,t){const n=r.Children.toArray(e);return{stepsChildren:t?n.slice(0,n.length/2):n,previewChildren:t?n.slice(n.length/2):void 0}}function hn(e){var t,{children:n,editorSteps:o,codeConfig:s,start:a=0,presetConfig:l,className:c,style:u,hasPreviewSteps:d}=e,h=i(e,["children","editorSteps","codeConfig","start","presetConfig","className","style","hasPreviewSteps"]);const{stepsChildren:f,previewChildren:p}=dn(n,d),m=l||d,[g,v]=r.useState({stepIndex:a,step:o[a]}),b=g.step;const y=f[0];return r.createElement("section",{className:`ch-spotlight ${m?"ch-spotlight-with-preview":""} ${c||""}`,style:u},r.createElement("div",{className:"ch-spotlight-tabs"},(null===(t=null==y?void 0:y.props)||void 0===t?void 0:t.children)?r.createElement("div",null,f[0]):null,f.map(((e,t)=>0===t?null:r.createElement("div",{key:t,onClick:()=>v({stepIndex:t,step:o[t]}),className:"ch-spotlight-tab","data-selected":t===g.stepIndex?"true":void 0},e)))),r.createElement("div",{className:"ch-spotlight-sticker"},r.createElement($t,Object.assign({},h,b,{codeConfig:s,onTabClick:function(e){const t=zt(g.step,e,null);v(Object.assign(Object.assign({},g),{step:t}))}})),l?r.createElement(ln,{className:"ch-spotlight-preview",files:b.files,presetConfig:l,codeConfig:s}):d?r.createElement(ln,Object.assign({className:"ch-spotlight-preview"},p[g.stepIndex].props)):null))}(sn=on||(on={}))[sn.None=0]="None",sn[sn.Error=10]="Error",sn[sn.Warning=20]="Warning",sn[sn.Info=30]="Info",sn[sn.Debug=40]="Debug";"undefined"!=typeof window?r.useLayoutEffect:r.useEffect;r.createContext(void 0),"undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function fn(){const e=r.useContext(mn);return e?r.createElement(pn,Object.assign({},e)):null}function pn({editorStep:e,setFocus:t}){const n=i(e,["preset","presetConfig"]);return r.createElement($t,Object.assign({},n,{onTabClick:e=>{t({fileName:e,focus:null,id:""})}}))}const mn=r.createContext(null);const gn={box:function({children:e,data:t,theme:n}){var o,i;const s="string"==typeof t?t:(null===(i=null===(o=n.tokenColors.find((e=>{var t;return null===(t=e.scope)||void 0===t?void 0:t.includes("string")})))||void 0===o?void 0:o.settings)||void 0===i?void 0:i.foreground)||"yellow";return r.createElement("span",{className:"ch-code-box-annotation",style:{outline:`2px solid ${s}`}},e)},bg:vn,label:function({children:e,data:t,style:n,theme:o}){const i=o.colors["editor.lineHighlightBackground"]||o.colors["editor.selectionHighlightBackground"],[s,a]=r.useState(!1);return r.createElement("div",{style:Object.assign(Object.assign({},n),{background:s?i:void 0}),onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1)},e,r.createElement("div",{style:{position:"absolute",right:0,paddingRight:16,display:s?"block":"none",opacity:.7}},(null==t?void 0:t.children)||t))},link:function({children:e,isInline:t,style:n,data:o}){const i=(null==o?void 0:o.url)||o,s=null==o?void 0:o.title;return r.createElement("a",{href:i,title:s,className:t?"ch-code-inline-link":"ch-code-link",style:n},e)},mark:function(e){return e.isInline?r.createElement(bn,Object.assign({},e)):r.createElement(vn,Object.assign({},e))},withClass:function({children:e,data:t,style:n,theme:o}){const i=t;return r.createElement("span",{style:n,className:i},e)}};function vn({children:e,data:t,style:n,theme:o}){const i="ch-code-multiline-mark "+(null!=t?t:""),s=F(o,C.RangeHighlightBackground),a=F(o,C.EditorInfoForeground);return r.createElement("div",{style:Object.assign(Object.assign({},n),{background:s}),className:i},r.createElement("span",{className:"ch-code-multiline-mark-border",style:{background:a}}),e)}function bn({children:e,data:t,theme:n}){const o=function(e){var t,n,o;const i=r.Children.toArray(e)[0],s=r.Children.toArray((null===(t=null==i?void 0:i.props)||void 0===t?void 0:t.children)||[])[0],a=r.Children.toArray((null===(n=null==s?void 0:s.props)||void 0===n?void 0:n.children)||[])[0],{color:l}=(null===(o=null==a?void 0:a.props)||void 0===o?void 0:o.style)||{};if(l)return c(l,.2);return}(e)||c(F(n,C.CodeForeground),.2),i="ch-code-inline-mark "+(null!=t?t:"");return r.createElement("span",{className:i,style:{background:o}},e)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_modern_js_module_tools_docs=self.webpackChunk_modern_js_module_tools_docs||[]).push([[5654],{5069:function(e,o,t){t.r(o),t.d(o,{CH:function(){return s},chCodeConfig:function(){return c},frontmatter:function(){return l},title:function(){return p},toc:function(){return i}});var n=t(9980),r=t(1114);const s={annotations:r.ds,Code:r.EK},c={staticMediaQuery:"not screen, (max-width: 768px)",theme:{name:"nord",type:"dark",semanticHighlighting:!0,colors:{focusBorder:"#3b4252",foreground:"#d8dee9","activityBar.background":"#2e3440","activityBar.dropBackground":"#3b4252","activityBar.foreground":"#d8dee9","activityBar.activeBorder":"#88c0d0","activityBar.activeBackground":"#3b4252","activityBarBadge.background":"#88c0d0","activityBarBadge.foreground":"#2e3440","badge.foreground":"#2e3440","badge.background":"#88c0d0","button.background":"#88c0d0ee","button.foreground":"#2e3440","button.hoverBackground":"#88c0d0","button.secondaryBackground":"#434c5e","button.secondaryForeground":"#d8dee9","button.secondaryHoverBackground":"#4c566a","charts.red":"#bf616a","charts.blue":"#81a1c1","charts.yellow":"#ebcb8b","charts.orange":"#d08770","charts.green":"#a3be8c","charts.purple":"#b48ead","charts.foreground":"#d8dee9","charts.lines":"#88c0d0","debugConsole.infoForeground":"#88c0d0","debugConsole.warningForeground":"#ebcb8b","debugConsole.errorForeground":"#bf616a","debugConsole.sourceForeground":"#616e88","debugConsoleInputIcon.foreground":"#81a1c1","debugExceptionWidget.background":"#4c566a","debugExceptionWidget.border":"#2e3440","debugToolBar.background":"#3b4252",descriptionForeground:"#d8dee9e6","diffEditor.insertedTextBackground":"#81a1c133","diffEditor.removedTextBackground":"#bf616a4d","dropdown.background":"#3b4252","dropdown.border":"#3b4252","dropdown.foreground":"#d8dee9","editorActiveLineNumber.foreground":"#d8dee9cc","editorCursor.foreground":"#d8dee9","editorHint.border":"#ebcb8b00","editorHint.foreground":"#ebcb8b","editorIndentGuide.background":"#434c5eb3","editorIndentGuide.activeBackground":"#4c566a","editorInlayHint.background":"#434c5e","editorInlayHint.foreground":"#d8dee9","editorLineNumber.foreground":"#4c566a","editorLineNumber.activeForeground":"#d8dee9","editorWhitespace.foreground":"#4c566ab3","editorWidget.background":"#2e3440","editorWidget.border":"#3b4252","editor.background":"#2e3440","editor.foreground":"#d8dee9","editor.hoverHighlightBackground":"#3b4252","editor.findMatchBackground":"#88c0d066","editor.findMatchHighlightBackground":"#88c0d033","editor.findRangeHighlightBackground":"#88c0d033","editor.lineHighlightBackground":"#3b4252","editor.lineHighlightBorder":"#3b4252","editor.inactiveSelectionBackground":"#434c5ecc","editor.inlineValuesBackground":"#4c566a","editor.inlineValuesForeground":"#eceff4","editor.selectionBackground":"#434c5ecc","editor.selectionHighlightBackground":"#434c5ecc","editor.rangeHighlightBackground":"#434c5e52","editor.wordHighlightBackground":"#81a1c166","editor.wordHighlightStrongBackground":"#81a1c199","editor.stackFrameHighlightBackground":"#5e81ac","editor.focusedStackFrameHighlightBackground":"#5e81ac","editorError.foreground":"#bf616a","editorError.border":"#bf616a00","editorWarning.foreground":"#ebcb8b","editorWarning.border":"#ebcb8b00","editorBracketMatch.background":"#2e344000","editorBracketMatch.border":"#88c0d0","editorBracketHighlight.foreground1":"#8fbcbb","editorBracketHighlight.foreground2":"#88c0d0","editorBracketHighlight.foreground3":"#81a1c1","editorBracketHighlight.foreground4":"#5e81ac","editorBracketHighlight.foreground5":"#8fbcbb","editorBracketHighlight.foreground6":"#88c0d0","editorBracketHighlight.unexpectedBracket.foreground":"#bf616a","editorCodeLens.foreground":"#4c566a","editorGroup.background":"#2e3440","editorGroup.border":"#3b425201","editorGroup.dropBackground":"#3b425299","editorGroupHeader.border":"#3b425200","editorGroupHeader.noTabsBackground":"#2e3440","editorGroupHeader.tabsBackground":"#2e3440","editorGroupHeader.tabsBorder":"#3b425200","editorGutter.background":"#2e3440","editorGutter.modifiedBackground":"#ebcb8b","editorGutter.addedBackground":"#a3be8c","editorGutter.deletedBackground":"#bf616a","editorHoverWidget.background":"#3b4252","editorHoverWidget.border":"#3b4252","editorLink.activeForeground":"#88c0d0","editorMarkerNavigation.background":"#5e81acc0","editorMarkerNavigationError.background":"#bf616ac0","editorMarkerNavigationWarning.background":"#ebcb8bc0","editorOverviewRuler.border":"#3b4252","editorOverviewRuler.currentContentForeground":"#3b4252","editorOverviewRuler.incomingContentForeground":"#3b4252","editorOverviewRuler.findMatchForeground":"#88c0d066","editorOverviewRuler.rangeHighlightForeground":"#88c0d066","editorOverviewRuler.selectionHighlightForeground":"#88c0d066","editorOverviewRuler.wordHighlightForeground":"#88c0d066","editorOverviewRuler.wordHighlightStrongForeground":"#88c0d066","editorOverviewRuler.modifiedForeground":"#ebcb8b","editorOverviewRuler.addedForeground":"#a3be8c","editorOverviewRuler.deletedForeground":"#bf616a","editorOverviewRuler.errorForeground":"#bf616a","editorOverviewRuler.warningForeground":"#ebcb8b","editorOverviewRuler.infoForeground":"#81a1c1","editorRuler.foreground":"#434c5e","editorSuggestWidget.background":"#2e3440","editorSuggestWidget.border":"#3b4252","editorSuggestWidget.foreground":"#d8dee9","editorSuggestWidget.focusHighlightForeground":"#88c0d0","editorSuggestWidget.highlightForeground":"#88c0d0","editorSuggestWidget.selectedBackground":"#434c5e","editorSuggestWidget.selectedForeground":"#d8dee9","extensionButton.prominentForeground":"#d8dee9","extensionButton.prominentBackground":"#434c5e","extensionButton.prominentHoverBackground":"#4c566a",errorForeground:"#bf616a","gitDecoration.modifiedResourceForeground":"#ebcb8b","gitDecoration.deletedResourceForeground":"#bf616a","gitDecoration.untrackedResourceForeground":"#a3be8c","gitDecoration.ignoredResourceForeground":"#d8dee966","gitDecoration.conflictingResourceForeground":"#5e81ac","gitDecoration.submoduleResourceForeground":"#8fbcbb","gitDecoration.stageDeletedResourceForeground":"#bf616a","gitDecoration.stageModifiedResourceForeground":"#ebcb8b","input.background":"#3b4252","input.foreground":"#d8dee9","input.placeholderForeground":"#d8dee999","input.border":"#3b4252","inputOption.activeBackground":"#5e81ac","inputOption.activeBorder":"#5e81ac","inputOption.activeForeground":"#eceff4","inputValidation.errorBackground":"#bf616a","inputValidation.errorBorder":"#bf616a","inputValidation.infoBackground":"#81a1c1","inputValidation.infoBorder":"#81a1c1","inputValidation.warningBackground":"#d08770","inputValidation.warningBorder":"#d08770","keybindingLabel.background":"#4c566a","keybindingLabel.border":"#4c566a","keybindingLabel.bottomBorder":"#4c566a","keybindingLabel.foreground":"#d8dee9","list.activeSelectionBackground":"#88c0d0","list.activeSelectionForeground":"#2e3440","list.inactiveSelectionBackground":"#434c5e","list.inactiveSelectionForeground":"#d8dee9","list.inactiveFocusBackground":"#434c5ecc","list.hoverForeground":"#eceff4","list.focusForeground":"#d8dee9","list.focusBackground":"#88c0d099","list.focusHighlightForeground":"#eceff4","list.hoverBackground":"#3b4252","list.dropBackground":"#88c0d099","list.highlightForeground":"#88c0d0","list.errorForeground":"#bf616a","list.warningForeground":"#ebcb8b","merge.currentHeaderBackground":"#81a1c166","merge.currentContentBackground":"#81a1c14d","merge.incomingHeaderBackground":"#8fbcbb66","merge.incomingContentBackground":"#8fbcbb4d","merge.border":"#3b425200","minimap.background":"#2e3440","minimap.errorHighlight":"#bf616acc","minimap.findMatchHighlight":"#88c0d0","minimap.selectionHighlight":"#88c0d0cc","minimap.warningHighlight":"#ebcb8bcc","minimapGutter.addedBackground":"#a3be8c","minimapGutter.deletedBackground":"#bf616a","minimapGutter.modifiedBackground":"#ebcb8b","minimapSlider.activeBackground":"#434c5eaa","minimapSlider.background":"#434c5e99","minimapSlider.hoverBackground":"#434c5eaa","notification.background":"#3b4252","notification.buttonBackground":"#434c5e","notification.buttonForeground":"#d8dee9","notification.buttonHoverBackground":"#4c566a","notification.errorBackground":"#bf616a","notification.errorForeground":"#2e3440","notification.foreground":"#d8dee9","notification.infoBackground":"#88c0d0","notification.infoForeground":"#2e3440","notification.warningBackground":"#ebcb8b","notification.warningForeground":"#2e3440","notificationCenter.border":"#3b425200","notificationCenterHeader.background":"#2e3440","notificationCenterHeader.foreground":"#88c0d0","notificationLink.foreground":"#88c0d0","notifications.background":"#3b4252","notifications.border":"#2e3440","notifications.foreground":"#d8dee9","notificationToast.border":"#3b425200","panel.background":"#2e3440","panel.border":"#3b4252","panelTitle.activeBorder":"#88c0d000","panelTitle.activeForeground":"#88c0d0","panelTitle.inactiveForeground":"#d8dee9","peekView.border":"#4c566a","peekViewEditor.background":"#2e3440","peekViewEditorGutter.background":"#2e3440","peekViewEditor.matchHighlightBackground":"#88c0d04d","peekViewResult.background":"#2e3440","peekViewResult.fileForeground":"#88c0d0","peekViewResult.lineForeground":"#d8dee966","peekViewResult.matchHighlightBackground":"#88c0d0cc","peekViewResult.selectionBackground":"#434c5e","peekViewResult.selectionForeground":"#d8dee9","peekViewTitle.background":"#3b4252","peekViewTitleDescription.foreground":"#d8dee9","peekViewTitleLabel.foreground":"#88c0d0","pickerGroup.border":"#3b4252","pickerGroup.foreground":"#88c0d0","progressBar.background":"#88c0d0","quickInputList.focusBackground":"#88c0d0","quickInputList.focusForeground":"#2e3440","sash.hoverBorder":"#88c0d0","scrollbar.shadow":"#00000066","scrollbarSlider.activeBackground":"#434c5eaa","scrollbarSlider.background":"#434c5e99","scrollbarSlider.hoverBackground":"#434c5eaa","selection.background":"#88c0d099","sideBar.background":"#2e3440","sideBar.foreground":"#d8dee9","sideBar.border":"#3b4252","sideBarSectionHeader.background":"#3b4252","sideBarSectionHeader.foreground":"#d8dee9","sideBarTitle.foreground":"#d8dee9","statusBar.background":"#3b4252","statusBar.debuggingBackground":"#5e81ac","statusBar.debuggingForeground":"#d8dee9","statusBar.noFolderForeground":"#d8dee9","statusBar.noFolderBackground":"#3b4252","statusBar.foreground":"#d8dee9","statusBarItem.activeBackground":"#4c566a","statusBarItem.hoverBackground":"#434c5e","statusBarItem.prominentBackground":"#3b4252","statusBarItem.prominentHoverBackground":"#434c5e","statusBarItem.errorBackground":"#3b4252","statusBarItem.errorForeground":"#bf616a","statusBarItem.warningBackground":"#ebcb8b","statusBarItem.warningForeground":"#2e3440","statusBar.border":"#3b425200","tab.activeBackground":"#3b4252","tab.activeForeground":"#d8dee9","tab.border":"#3b425200","tab.activeBorder":"#88c0d000","tab.unfocusedActiveBorder":"#88c0d000","tab.inactiveBackground":"#2e3440","tab.inactiveForeground":"#d8dee966","tab.unfocusedActiveForeground":"#d8dee999","tab.unfocusedInactiveForeground":"#d8dee966","tab.hoverBackground":"#3b4252cc","tab.unfocusedHoverBackground":"#3b4252b3","tab.hoverBorder":"#88c0d000","tab.unfocusedHoverBorder":"#88c0d000","tab.activeBorderTop":"#88c0d000","tab.unfocusedActiveBorderTop":"#88c0d000","tab.lastPinnedBorder":"#4c566a","terminal.background":"#2e3440","terminal.foreground":"#d8dee9","terminal.ansiBlack":"#3b4252","terminal.ansiRed":"#bf616a","terminal.ansiGreen":"#a3be8c","terminal.ansiYellow":"#ebcb8b","terminal.ansiBlue":"#81a1c1","terminal.ansiMagenta":"#b48ead","terminal.ansiCyan":"#88c0d0","terminal.ansiWhite":"#e5e9f0","terminal.ansiBrightBlack":"#4c566a","terminal.ansiBrightRed":"#bf616a","terminal.ansiBrightGreen":"#a3be8c","terminal.ansiBrightYellow":"#ebcb8b","terminal.ansiBrightBlue":"#81a1c1","terminal.ansiBrightMagenta":"#b48ead","terminal.ansiBrightCyan":"#8fbcbb","terminal.ansiBrightWhite":"#eceff4","terminal.tab.activeBorder":"#88c0d0","textBlockQuote.background":"#3b4252","textBlockQuote.border":"#81a1c1","textCodeBlock.background":"#4c566a","textLink.activeForeground":"#88c0d0","textLink.foreground":"#88c0d0","textPreformat.foreground":"#8fbcbb","textSeparator.foreground":"#eceff4","titleBar.activeBackground":"#2e3440","titleBar.activeForeground":"#d8dee9","titleBar.border":"#2e344000","titleBar.inactiveBackground":"#2e3440","titleBar.inactiveForeground":"#d8dee966","tree.indentGuidesStroke":"#616e88","walkThrough.embeddedEditorBackground":"#2e3440","welcomePage.buttonBackground":"#434c5e","welcomePage.buttonHoverBackground":"#4c566a","widget.shadow":"#00000066"},tokenColors:[{settings:{foreground:"#d8dee9ff",background:"#2e3440ff"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{name:"Comment",scope:"comment",settings:{foreground:"#616E88"}},{name:"Constant Character",scope:"constant.character",settings:{foreground:"#EBCB8B"}},{name:"Constant Character Escape",scope:"constant.character.escape",settings:{foreground:"#EBCB8B"}},{name:"Constant Language",scope:"constant.language",settings:{foreground:"#81A1C1"}},{name:"Constant Numeric",scope:"constant.numeric",settings:{foreground:"#B48EAD"}},{name:"Constant Regexp",scope:"constant.regexp",settings:{foreground:"#EBCB8B"}},{name:"Entity Name Class/Type",scope:["entity.name.class","entity.name.type.class"],settings:{foreground:"#8FBCBB"}},{name:"Entity Name Function",scope:"entity.name.function",settings:{foreground:"#88C0D0"}},{name:"Entity Name Tag",scope:"entity.name.tag",settings:{foreground:"#81A1C1"}},{name:"Entity Other Attribute Name",scope:"entity.other.attribute-name",settings:{foreground:"#8FBCBB"}},{name:"Entity Other Inherited Class",scope:"entity.other.inherited-class",settings:{fontStyle:"bold",foreground:"#8FBCBB"}},{name:"Invalid Deprecated",scope:"invalid.deprecated",settings:{foreground:"#D8DEE9",background:"#EBCB8B"}},{name:"Invalid Illegal",scope:"invalid.illegal",settings:{foreground:"#D8DEE9",background:"#BF616A"}},{name:"Keyword",scope:"keyword",settings:{foreground:"#81A1C1"}},{name:"Keyword Operator",scope:"keyword.operator",settings:{foreground:"#81A1C1"}},{name:"Keyword Other New",scope:"keyword.other.new",settings:{foreground:"#81A1C1"}},{name:"Markup Bold",scope:"markup.bold",settings:{fontStyle:"bold"}},{name:"Markup Changed",scope:"markup.changed",settings:{foreground:"#EBCB8B"}},{name:"Markup Deleted",scope:"markup.deleted",settings:{foreground:"#BF616A"}},{name:"Markup Inserted",scope:"markup.inserted",settings:{foreground:"#A3BE8C"}},{name:"Meta Preprocessor",scope:"meta.preprocessor",settings:{foreground:"#5E81AC"}},{name:"Punctuation",scope:"punctuation",settings:{foreground:"#ECEFF4"}},{name:"Punctuation Definition Parameters",scope:["punctuation.definition.method-parameters","punctuation.definition.function-parameters","punctuation.definition.parameters"],settings:{foreground:"#ECEFF4"}},{name:"Punctuation Definition Tag",scope:"punctuation.definition.tag",settings:{foreground:"#81A1C1"}},{name:"Punctuation Definition Comment",scope:["punctuation.definition.comment","punctuation.end.definition.comment","punctuation.start.definition.comment"],settings:{foreground:"#616E88"}},{name:"Punctuation Section",scope:"punctuation.section",settings:{foreground:"#ECEFF4"}},{name:"Punctuation Section Embedded",scope:["punctuation.section.embedded.begin","punctuation.section.embedded.end"],settings:{foreground:"#81A1C1"}},{name:"Punctuation Terminator",scope:"punctuation.terminator",settings:{foreground:"#81A1C1"}},{name:"Punctuation Variable",scope:"punctuation.definition.variable",settings:{foreground:"#81A1C1"}},{name:"Storage",scope:"storage",settings:{foreground:"#81A1C1"}},{name:"String",scope:"string",settings:{foreground:"#A3BE8C"}},{name:"String Regexp",scope:"string.regexp",settings:{foreground:"#EBCB8B"}},{name:"Support Class",scope:"support.class",settings:{foreground:"#8FBCBB"}},{name:"Support Constant",scope:"support.constant",settings:{foreground:"#81A1C1"}},{name:"Support Function",scope:"support.function",settings:{foreground:"#88C0D0"}},{name:"Support Function Construct",scope:"support.function.construct",settings:{foreground:"#81A1C1"}},{name:"Support Type",scope:"support.type",settings:{foreground:"#8FBCBB"}},{name:"Support Type Exception",scope:"support.type.exception",settings:{foreground:"#8FBCBB"}},{name:"Token Debug",scope:"token.debug-token",settings:{foreground:"#b48ead"}},{name:"Token Error",scope:"token.error-token",settings:{foreground:"#bf616a"}},{name:"Token Info",scope:"token.info-token",settings:{foreground:"#88c0d0"}},{name:"Token Warning",scope:"token.warn-token",settings:{foreground:"#ebcb8b"}},{name:"Variable",scope:"variable.other",settings:{foreground:"#D8DEE9"}},{name:"Variable Language",scope:"variable.language",settings:{foreground:"#81A1C1"}},{name:"Variable Parameter",scope:"variable.parameter",settings:{foreground:"#D8DEE9"}},{name:"[C/CPP] Punctuation Separator Pointer-Access",scope:"punctuation.separator.pointer-access.c",settings:{foreground:"#81A1C1"}},{name:"[C/CPP] Meta Preprocessor Include",scope:["source.c meta.preprocessor.include","source.c string.quoted.other.lt-gt.include"],settings:{foreground:"#8FBCBB"}},{name:"[C/CPP] Conditional Directive",scope:["source.cpp keyword.control.directive.conditional","source.cpp punctuation.definition.directive","source.c keyword.control.directive.conditional","source.c punctuation.definition.directive"],settings:{foreground:"#5E81AC",fontStyle:"bold"}},{name:"[CSS] Constant Other Color RGB Value",scope:"source.css constant.other.color.rgb-value",settings:{foreground:"#B48EAD"}},{name:"[CSS](Function) Meta Property-Value",scope:"source.css meta.property-value",settings:{foreground:"#88C0D0"}},{name:"[CSS] Media Queries",scope:["source.css keyword.control.at-rule.media","source.css keyword.control.at-rule.media punctuation.definition.keyword"],settings:{foreground:"#D08770"}},{name:"[CSS] Punctuation Definition Keyword",scope:"source.css punctuation.definition.keyword",settings:{foreground:"#81A1C1"}},{name:"[CSS] Support Type Property Name",scope:"source.css support.type.property-name",settings:{foreground:"#D8DEE9"}},{name:"[diff] Meta Range Context",scope:"source.diff meta.diff.range.context",settings:{foreground:"#8FBCBB"}},{name:"[diff] Meta Header From-File",scope:"source.diff meta.diff.header.from-file",settings:{foreground:"#8FBCBB"}},{name:"[diff] Punctuation Definition From-File",scope:"source.diff punctuation.definition.from-file",settings:{foreground:"#8FBCBB"}},{name:"[diff] Punctuation Definition Range",scope:"source.diff punctuation.definition.range",settings:{foreground:"#8FBCBB"}},{name:"[diff] Punctuation Definition Separator",scope:"source.diff punctuation.definition.separator",settings:{foreground:"#81A1C1"}},{name:"[Elixir](JakeBecker.elixir-ls) module names",scope:"entity.name.type.module.elixir",settings:{foreground:"#8FBCBB"}},{name:"[Elixir](JakeBecker.elixir-ls) module attributes",scope:"variable.other.readwrite.module.elixir",settings:{foreground:"#D8DEE9",fontStyle:"bold"}},{name:"[Elixir](JakeBecker.elixir-ls) atoms",scope:"constant.other.symbol.elixir",settings:{foreground:"#D8DEE9",fontStyle:"bold"}},{name:"[Elixir](JakeBecker.elixir-ls) modules",scope:"variable.other.constant.elixir",settings:{foreground:"#8FBCBB"}},{name:"[Go] String Format Placeholder",scope:"source.go constant.other.placeholder.go",settings:{foreground:"#EBCB8B"}},{name:"[Java](JavaDoc) Comment Block Documentation HTML Entities",scope:"source.java comment.block.documentation.javadoc punctuation.definition.entity.html",settings:{foreground:"#81A1C1"}},{name:"[Java](JavaDoc) Constant Other",scope:"source.java constant.other",settings:{foreground:"#D8DEE9"}},{name:"[Java](JavaDoc) Keyword Other Documentation",scope:"source.java keyword.other.documentation",settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Keyword Other Documentation Author",scope:"source.java keyword.other.documentation.author.javadoc",settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Keyword Other Documentation Directive/Custom",scope:["source.java keyword.other.documentation.directive","source.java keyword.other.documentation.custom"],settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Keyword Other Documentation See",scope:"source.java keyword.other.documentation.see.javadoc",settings:{foreground:"#8FBCBB"}},{name:"[Java] Meta Method-Call",scope:"source.java meta.method-call meta.method",settings:{foreground:"#88C0D0"}},{name:"[Java](JavaDoc) Meta Tag Template Link",scope:["source.java meta.tag.template.link.javadoc","source.java string.other.link.title.javadoc"],settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Meta Tag Template Value",scope:"source.java meta.tag.template.value.javadoc",settings:{foreground:"#88C0D0"}},{name:"[Java](JavaDoc) Punctuation Definition Keyword",scope:"source.java punctuation.definition.keyword.javadoc",settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Punctuation Definition Tag",scope:["source.java punctuation.definition.tag.begin.javadoc","source.java punctuation.definition.tag.end.javadoc"],settings:{foreground:"#616E88"}},{name:"[Java] Storage Modifier Import",scope:"source.java storage.modifier.import",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Modifier Package",scope:"source.java storage.modifier.package",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Type",scope:"source.java storage.type",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Type Annotation",scope:"source.java storage.type.annotation",settings:{foreground:"#D08770"}},{name:"[Java] Storage Type Generic",scope:"source.java storage.type.generic",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Type Primitive",scope:"source.java storage.type.primitive",settings:{foreground:"#81A1C1"}},{name:"[JavaScript] Decorator",scope:["source.js punctuation.decorator","source.js meta.decorator variable.other.readwrite","source.js meta.decorator entity.name.function"],settings:{foreground:"#D08770"}},{name:"[JavaScript] Meta Object-Literal Key",scope:"source.js meta.object-literal.key",settings:{foreground:"#88C0D0"}},{name:"[JavaScript](JSDoc) Storage Type Class",scope:"source.js storage.type.class.jsdoc",settings:{foreground:"#8FBCBB"}},{name:"[JavaScript] String Template Literals Punctuation",scope:["source.js string.quoted.template punctuation.quasi.element.begin","source.js string.quoted.template punctuation.quasi.element.end","source.js string.template punctuation.definition.template-expression"],settings:{foreground:"#81A1C1"}},{name:"[JavaScript] Interpolated String Template Punctuation Functions",scope:"source.js string.quoted.template meta.method-call.with-arguments",settings:{foreground:"#ECEFF4"}},{name:"[JavaScript] String Template Literal Variable",scope:["source.js string.template meta.template.expression support.variable.property","source.js string.template meta.template.expression variable.other.object"],settings:{foreground:"#D8DEE9"}},{name:"[JavaScript] Support Type Primitive",scope:"source.js support.type.primitive",settings:{foreground:"#81A1C1"}},{name:"[JavaScript] Variable Other Object",scope:"source.js variable.other.object",settings:{foreground:"#D8DEE9"}},{name:"[JavaScript] Variable Other Read-Write Alias",scope:"source.js variable.other.readwrite.alias",settings:{foreground:"#8FBCBB"}},{name:"[JavaScript] Parentheses in Template Strings",scope:["source.js meta.embedded.line meta.brace.square","source.js meta.embedded.line meta.brace.round","source.js string.quoted.template meta.brace.square","source.js string.quoted.template meta.brace.round"],settings:{foreground:"#ECEFF4"}},{name:"[HTML] Constant Character Entity",scope:"text.html.basic constant.character.entity.html",settings:{foreground:"#EBCB8B"}},{name:"[HTML] Constant Other Inline-Data",scope:"text.html.basic constant.other.inline-data",settings:{foreground:"#D08770",fontStyle:"italic"}},{name:"[HTML] Meta Tag SGML Doctype",scope:"text.html.basic meta.tag.sgml.doctype",settings:{foreground:"#5E81AC"}},{name:"[HTML] Punctuation Definition Entity",scope:"text.html.basic punctuation.definition.entity",settings:{foreground:"#81A1C1"}},{name:"[INI] Entity Name Section Group-Title",scope:"source.properties entity.name.section.group-title.ini",settings:{foreground:"#88C0D0"}},{name:"[INI] Punctuation Separator Key-Value",scope:"source.properties punctuation.separator.key-value.ini",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Markup Fenced Code Block",scope:["text.html.markdown markup.fenced_code.block","text.html.markdown markup.fenced_code.block punctuation.definition"],settings:{foreground:"#8FBCBB"}},{name:"[Markdown] Markup Heading",scope:"markup.heading",settings:{foreground:"#88C0D0"}},{name:"[Markdown] Markup Inline",scope:["text.html.markdown markup.inline.raw","text.html.markdown markup.inline.raw punctuation.definition.raw"],settings:{foreground:"#8FBCBB"}},{name:"[Markdown] Markup Italic",scope:"text.html.markdown markup.italic",settings:{fontStyle:"italic"}},{name:"[Markdown] Markup Link",scope:"text.html.markdown markup.underline.link",settings:{fontStyle:"underline"}},{name:"[Markdown] Markup List Numbered/Unnumbered",scope:"text.html.markdown beginning.punctuation.definition.list",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Markup Quote Punctuation Definition",scope:"text.html.markdown beginning.punctuation.definition.quote",settings:{foreground:"#8FBCBB"}},{name:"[Markdown] Markup Quote Punctuation Definition",scope:"text.html.markdown markup.quote",settings:{foreground:"#616E88"}},{name:"[Markdown] Markup Math Constant",scope:"text.html.markdown constant.character.math.tex",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Markup Math Definition Marker",scope:["text.html.markdown punctuation.definition.math.begin","text.html.markdown punctuation.definition.math.end"],settings:{foreground:"#5E81AC"}},{name:"[Markdown] Markup Math Function Definition Marker",scope:"text.html.markdown punctuation.definition.function.math.tex",settings:{foreground:"#88C0D0"}},{name:"[Markdown] Markup Math Operator",scope:"text.html.markdown punctuation.math.operator.latex",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Punctuation Definition Heading",scope:"text.html.markdown punctuation.definition.heading",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Punctuation Definition Constant/String",scope:["text.html.markdown punctuation.definition.constant","text.html.markdown punctuation.definition.string"],settings:{foreground:"#81A1C1"}},{name:"[Markdown] String Other Link Description/Title",scope:["text.html.markdown constant.other.reference.link","text.html.markdown string.other.link.description","text.html.markdown string.other.link.title"],settings:{foreground:"#88C0D0"}},{name:"[Perl] Perl Sigils",scope:"source.perl punctuation.definition.variable",settings:{foreground:"#D8DEE9"}},{name:"[PHP] Meta Function-Call Object",scope:["source.php meta.function-call","source.php meta.function-call.object"],settings:{foreground:"#88C0D0"}},{name:"[Python] Decorator",scope:["source.python entity.name.function.decorator","source.python meta.function.decorator support.type"],settings:{foreground:"#D08770"}},{name:"[Python] Function Call",scope:"source.python meta.function-call.generic",settings:{foreground:"#88C0D0"}},{name:"[Python] Support Type",scope:"source.python support.type",settings:{foreground:"#88C0D0"}},{name:"[Python] Function Parameter",scope:["source.python variable.parameter.function.language"],settings:{foreground:"#D8DEE9"}},{name:"[Python] Function Parameter Special",scope:["source.python meta.function.parameters variable.parameter.function.language.special.self"],settings:{foreground:"#81A1C1"}},{name:"[Rust] Entity types",scope:"source.rust entity.name.type",settings:{foreground:"#8FBCBB"}},{name:"[Rust] Macro",scope:"source.rust meta.macro entity.name.function",settings:{fontStyle:"bold",foreground:"#88C0D0"}},{name:"[Rust] Attributes",scope:["source.rust meta.attribute","source.rust meta.attribute punctuation","source.rust meta.attribute keyword.operator"],settings:{foreground:"#5E81AC"}},{name:"[Rust] Traits",scope:"source.rust entity.name.type.trait",settings:{fontStyle:"bold"}},{name:"[Rust] Interpolation Bracket Curly",scope:"source.rust punctuation.definition.interpolation",settings:{foreground:"#EBCB8B"}},{name:"[SCSS] Punctuation Definition Interpolation Bracket Curly",scope:["source.css.scss punctuation.definition.interpolation.begin.bracket.curly","source.css.scss punctuation.definition.interpolation.end.bracket.curly"],settings:{foreground:"#81A1C1"}},{name:"[SCSS] Variable Interpolation",scope:"source.css.scss variable.interpolation",settings:{foreground:"#D8DEE9",fontStyle:"italic"}},{name:"[TypeScript] Decorators",scope:["source.ts punctuation.decorator","source.ts meta.decorator variable.other.readwrite","source.ts meta.decorator entity.name.function","source.tsx punctuation.decorator","source.tsx meta.decorator variable.other.readwrite","source.tsx meta.decorator entity.name.function"],settings:{foreground:"#D08770"}},{name:"[TypeScript] Object-literal keys",scope:["source.ts meta.object-literal.key","source.tsx meta.object-literal.key"],settings:{foreground:"#D8DEE9"}},{name:"[TypeScript] Object-literal functions",scope:["source.ts meta.object-literal.key entity.name.function","source.tsx meta.object-literal.key entity.name.function"],settings:{foreground:"#88C0D0"}},{name:"[TypeScript] Type/Class",scope:["source.ts support.class","source.ts support.type","source.ts entity.name.type","source.ts entity.name.class","source.tsx support.class","source.tsx support.type","source.tsx entity.name.type","source.tsx entity.name.class"],settings:{foreground:"#8FBCBB"}},{name:"[TypeScript] Static Class Support",scope:["source.ts support.constant.math","source.ts support.constant.dom","source.ts support.constant.json","source.tsx support.constant.math","source.tsx support.constant.dom","source.tsx support.constant.json"],settings:{foreground:"#8FBCBB"}},{name:"[TypeScript] Variables",scope:["source.ts support.variable","source.tsx support.variable"],settings:{foreground:"#D8DEE9"}},{name:"[TypeScript] Parentheses in Template Strings",scope:["source.ts meta.embedded.line meta.brace.square","source.ts meta.embedded.line meta.brace.round","source.tsx meta.embedded.line meta.brace.square","source.tsx meta.embedded.line meta.brace.round"],settings:{foreground:"#ECEFF4"}},{name:"[XML] Entity Name Tag Namespace",scope:"text.xml entity.name.tag.namespace",settings:{foreground:"#8FBCBB"}},{name:"[XML] Keyword Other Doctype",scope:"text.xml keyword.other.doctype",settings:{foreground:"#5E81AC"}},{name:"[XML] Meta Tag Preprocessor",scope:"text.xml meta.tag.preprocessor entity.name.tag",settings:{foreground:"#5E81AC"}},{name:"[XML] Entity Name Tag Namespace",scope:["text.xml string.unquoted.cdata","text.xml string.unquoted.cdata punctuation.definition.string"],settings:{foreground:"#D08770",fontStyle:"italic"}},{name:"[YAML] Entity Name Tag",scope:"source.yaml entity.name.tag",settings:{foreground:"#8FBCBB"}}]},autoImport:!0,showCopyButton:!0,skipLanguages:[],filepath:"/Users/bytedance/github/targeral/modern-js/packages/toolkit/module-doc/docs/en/api/config/build-config.md"},l={sidebar_position:1},i=[{id:"alias",text:"alias",depth:2},{id:"asset",text:"asset",depth:2},{id:"path",text:"path",depth:3},{id:"limit",text:"limit",depth:3},{id:"publicpath",text:"publicPath",depth:3},{id:"svgr",text:"svgr",depth:3},{id:"include",text:"include",depth:4},{id:"exclude",text:"exclude",depth:4},{id:"autoexternal",text:"autoExternal",depth:2},{id:"dependencies",text:"dependencies",depth:3},{id:"peerdependencies",text:"peerDependencies",depth:3},{id:"buildtype",text:"buildType",depth:2},{id:"copy",text:"copy",depth:2},{id:"define",text:"define",depth:2},{id:"dts",text:"dts",depth:2},{id:"tsconfigpath",text:"tsconfigPath",depth:3},{id:"distpath",text:"distPath",depth:3},{id:"only",text:"only",depth:3},{id:"externals",text:"externals",depth:2},{id:"format",text:"format",depth:2},{id:"input",text:"input",depth:2},{id:"jsx",text:"jsx",depth:2},{id:"metafile",text:"metafile",depth:2},{id:"minify",text:"minify",depth:2},{id:"outdir",text:"outDir",depth:2},{id:"platform",text:"platform",depth:2},{id:"sideeffects",text:"sideEffects",depth:2},{id:"sourcedir",text:"sourceDir",depth:2},{id:"sourcemap",text:"sourceMap",depth:2},{id:"splitting",text:"splitting",depth:2},{id:"style",text:"style",depth:2},{id:"less",text:"less",depth:3},{id:"lessoptions",text:"lessOptions",depth:4},{id:"additionaldata",text:"additionalData",depth:4},{id:"implementation",text:"implementation",depth:4},{id:"sass",text:"sass",depth:3},{id:"sassoptions",text:"sassOptions",depth:4},{id:"additionaldata-1",text:"additionalData",depth:4},{id:"implementation-1",text:"implementation",depth:4},{id:"postcss",text:"postcss",depth:3},{id:"inject",text:"inject",depth:3},{id:"automodules",text:"autoModules",depth:3},{id:"modules",text:"modules",depth:3},{id:"tailwindcss",text:"tailwindcss",depth:3},{id:"target",text:"target",depth:2},{id:"umdglobals",text:"umdGlobals",depth:2},{id:"umdmodulename",text:"umdModuleName",depth:2}],p="BuildConfig";function a(e){const o=Object.assign({h1:"h1",a:"a",p:"p",h2:"h2",ul:"ul",li:"li",code:"code",div:"div",h3:"h3",h4:"h4"},e.components);return s||d("CH",!1),s.Code||d("CH.Code",!0),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(o.h1,{id:"buildconfig",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#buildconfig",children:"#"}),"BuildConfig"]}),"\n",(0,n.jsx)(o.p,{children:"This section describes all the configuration of Module Tools for building"}),"\n",(0,n.jsxs)(o.h2,{id:"alias",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#alias",children:"#"}),"alias"]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"Record<string, string> | Function"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"{'@': 'src',}"})]}),"\n"]}),"\n",(0,n.jsxs)(o.div,{className:"modern-directive tip",children:[(0,n.jsx)(o.p,{className:"modern-directive-title",children:"TIP"}),(0,n.jsx)(o.div,{className:"modern-directive-content",children:(0,n.jsxs)(o.p,{children:["\nFor TypeScript projects, you only need to configure ",(0,n.jsx)(o.a,{href:"https://www.typescriptlang.org/tsconfig#paths",target:"_blank",rel:"nofollow",children:"compilerOptions.paths"})," in ",(0,n.jsx)(o.code,{children:"tsconfig.json"}),", Module Tools will automatically recognize the alias in ",(0,n.jsx)(o.code,{children:"tsconfig.json"}),", so there is no need to configure the ",(0,n.jsx)(o.code,{children:"alias"}),"field additionally."]})})]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"alias",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"@common",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:". /src/common",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.p,{children:["After the above configuration is done, if ",(0,n.jsx)(o.code,{children:"@common/Foo.tsx"})," is referenced in the code, it will map to the ",(0,n.jsx)(o.code,{children:"<root>/src/common/Foo.tsx"})," path."]}),"\n",(0,n.jsxs)(o.p,{children:["When the value of ",(0,n.jsx)(o.code,{children:"alias"})," is defined as a function, you can accept the pre-defined alias object and modify it."]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"alias",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"alias",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=>",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"alias",props:{style:{color:"#D8DEE9"}}},{content:"[",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"@common",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"] ",props:{style:{color:"#D8DEE9FF"}}},{content:"=",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:". /src/common",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsx)(o.p,{children:"It is also possible to return a new object as the final result in the function, which will override the pre-defined alias object."}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"alias",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"alias",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=>",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"return",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"@common",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:". /src/common",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.h2,{id:"asset",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#asset",children:"#"}),"asset"]}),"\n",(0,n.jsxs)(o.h3,{id:"path",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#path",children:"#"}),"path"]}),"\n",(0,n.jsxs)(o.p,{children:["Static resource output path, will be based on ",(0,n.jsx)(o.a,{href:"/module-tools/en/api/config/build-config.html#outDir",children:"outDir"})]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"string"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"assets"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h3,{id:"limit",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#limit",children:"#"}),"limit"]}),"\n",(0,n.jsx)(o.p,{children:"Threshold for automatically inlining static resources when building, resources less than 10 KB will be automatically inlined into the bundle product"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"number"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"10 * 1024"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h3,{id:"publicpath",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#publicpath",children:"#"}),"publicPath"]}),"\n",(0,n.jsx)(o.p,{children:"The CDN prefix given to unlinked resources when packaging"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"string"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"undefined"})]}),"\n"]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"asset",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"publicPath",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"https://xxx/",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.p,{children:["At this point, all static resources will be prefixed with ",(0,n.jsx)(o.code,{children:"https://xxx/"})]}),"\n",(0,n.jsxs)(o.h3,{id:"svgr",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#svgr",children:"#"}),"svgr"]}),"\n",(0,n.jsxs)(o.p,{children:["Packaged to handle svg as a React component, options reference ",(0,n.jsx)(o.a,{href:"https://react-svgr.com/docs/options/",target:"_blank",rel:"nofollow",children:"svgr"}),", plus support for two configuration items ",(0,n.jsx)(o.code,{children:"include"})," and ",(0,n.jsx)(o.code,{children:"exclude"})," to match the svg file to be handled"]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"boolean | Object"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"false"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h4,{id:"include",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#include",children:"#"}),"include"]}),"\n",(0,n.jsx)(o.p,{children:"Set the matching svg file"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"string | RegExp | (string | RegExp)[]"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"/\\.svg$/"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h4,{id:"exclude",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#exclude",children:"#"}),"exclude"]}),"\n",(0,n.jsx)(o.p,{children:"Set unmatched svg files"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"string | RegExp | (string | RegExp)[]"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"undefined"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"autoexternal",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#autoexternal",children:"#"}),"autoExternal"]}),"\n",(0,n.jsx)(o.p,{children:"Automatically externalize project dependencies and peerDependencies and not package them into the final bundle"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"boolean | Object"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"true"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h3,{id:"dependencies",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#dependencies",children:"#"}),"dependencies"]}),"\n",(0,n.jsx)(o.p,{children:"Whether or not the dep dependencies of the external project are needed"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"true"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h3,{id:"peerdependencies",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#peerdependencies",children:"#"}),"peerDependencies"]}),"\n",(0,n.jsx)(o.p,{children:"Whether to require peerDep dependencies for external projects"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"true"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"buildtype",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#buildtype",children:"#"}),"buildType"]}),"\n",(0,n.jsxs)(o.p,{children:["The build type, ",(0,n.jsx)(o.code,{children:"bundle"})," will package your code, ",(0,n.jsx)(o.code,{children:"bundleless"})," will only do the code conversion"]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"'bundle' | 'bundleless'"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"bundle"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"copy",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#copy",children:"#"}),"copy"]}),"\n",(0,n.jsx)(o.p,{children:"Copies the specified file or directory into the build output directory"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"Array"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"[]"})]}),"\n"]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"copy",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" [",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"from",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:". /src/assets",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"to",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"''",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}},{content:"]",props:{style:{color:"#D8DEE9FF"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.p,{children:["Reference for array settings: ",(0,n.jsx)(o.a,{href:"https://github.com/webpack-contrib/copy-webpack-plugin#patterns",target:"_blank",rel:"nofollow",children:"copy-webpack-plugin patterns"})]}),"\n",(0,n.jsxs)(o.h2,{id:"define",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#define",children:"#"}),"define"]}),"\n",(0,n.jsx)(o.p,{children:"Define global variables that will be injected into the code"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"Record<string, string>"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"{}"})]}),"\n"]}),"\n",(0,n.jsxs)(o.p,{children:["Since the ",(0,n.jsx)(o.code,{children:"define"})," function is implemented by global text replacement, you need to ensure that the global variable values are strings. A safer approach is to convert the value of each global variable to a string, using ",(0,n.jsx)(o.code,{children:"JSON.stringify"}),", as follows."]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"define",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"VERSION",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"JSON",props:{style:{color:"#81A1C1"}}},{content:".",props:{style:{color:"#ECEFF4"}}},{content:"stringify",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"1.0",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:")",props:{style:{color:"#D8DEE9FF"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.div,{className:"modern-directive tip",children:[(0,n.jsx)(o.p,{className:"modern-directive-title",children:"TIP"}),(0,n.jsxs)(o.div,{className:"modern-directive-content",children:[(0,n.jsx)(o.p,{children:"\nTo prevent excessive global replacement substitution, it is recommended that the following two principles be followed when using"}),(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:"Use upper case for global constants"}),"\n",(0,n.jsx)(o.li,{children:"Customize the prefix and suffix of global constants to ensure uniqueness"}),"\n"]})]})]}),"\n",(0,n.jsxs)(o.h2,{id:"dts",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#dts",children:"#"}),"dts"]}),"\n",(0,n.jsx)(o.p,{children:"The dts file generates the relevant configuration, by default it generates"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"false | Object"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"{}"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h3,{id:"tsconfigpath",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#tsconfigpath",children:"#"}),"tsconfigPath"]}),"\n",(0,n.jsx)(o.p,{children:"Path to the tsconfig file"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"string"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:". /tsconfig.json"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h3,{id:"distpath",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#distpath",children:"#"}),"distPath"]}),"\n",(0,n.jsxs)(o.p,{children:["The output path of the dts file, based on ",(0,n.jsx)(o.a,{href:"/module-tools/en/api/config/build-config.html#outDir",children:"outDir"})]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"string"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:". /types"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h3,{id:"only",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#only",children:"#"}),"only"]}),"\n",(0,n.jsx)(o.p,{children:"Generate only dts files, not js files"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"false"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"externals",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#externals",children:"#"}),"externals"]}),"\n",(0,n.jsx)(o.p,{children:"Configure external dependencies that will not be packaged into the final bundle"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"(string | RegExp)[]"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"[]"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"format",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#format",children:"#"}),"format"]}),"\n",(0,n.jsxs)(o.p,{children:["The format of the js product output, where ",(0,n.jsx)(o.code,{children:"iife"})," and ",(0,n.jsx)(o.code,{children:"umd"})," can only take effect when ",(0,n.jsx)(o.code,{children:"buildType"})," is ",(0,n.jsx)(o.code,{children:"bundle"})]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"'esm' | 'cjs' | 'iife' | 'umd'"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"cjs"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"input",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#input",children:"#"}),"input"]}),"\n",(0,n.jsx)(o.p,{children:"Specify the entry file for the build, in the form of an array that can specify the directory"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"string[] | Record<string, string>"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"['src/index.ts']"})," in ",(0,n.jsx)(o.code,{children:"bundle"})," mode, ",(0,n.jsx)(o.code,{children:"['src']"})," in ",(0,n.jsx)(o.code,{children:"bundleless"})," mode"]}),"\n"]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"input",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" [",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"src/index.ts",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"src/index2.ts",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"]",props:{style:{color:"#D8DEE9FF"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.h2,{id:"jsx",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#jsx",children:"#"}),"jsx"]}),"\n",(0,n.jsx)(o.p,{children:"Specify the compilation method of jsx, default support React17, automatically inject jsx runtime code"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"automatic | classic"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"automatic"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"metafile",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#metafile",children:"#"}),"metafile"]}),"\n",(0,n.jsxs)(o.p,{children:["esbuild to produce some metadata about the build in JSON format, which can be visualized by tools such as ",(0,n.jsx)(o.a,{href:"https://bundle-buddy.com/esbuild",target:"_blank",rel:"nofollow",children:"bundle-buddy"})]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"false"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"minify",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#minify",children:"#"}),"minify"]}),"\n",(0,n.jsxs)(o.p,{children:["Use esbuild or terser to compress code, also pass ",(0,n.jsx)(o.a,{href:"https://github.com/terser/terser#minify-options",target:"_blank",rel:"nofollow",children:"terserOptions"})]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"'terser' | 'esbuild' | false | Object"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"false"})]}),"\n"]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"minify",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"compress",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"drop_console",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"true",props:{style:{color:"#81A1C1"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.h2,{id:"outdir",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#outdir",children:"#"}),"outDir"]}),"\n",(0,n.jsx)(o.p,{children:"Specifies the output directory of the build"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"string"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"dist"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"platform",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#platform",children:"#"}),"platform"]}),"\n",(0,n.jsxs)(o.p,{children:["Generates code for the node environment by default, you can also specify ",(0,n.jsx)(o.code,{children:"browser"})," which will generate code for the browser environment"]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"'browser' | 'node'"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"node"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"sideeffects",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#sideeffects",children:"#"}),"sideEffects"]}),"\n",(0,n.jsx)(o.p,{children:"Module sideEffects"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["Type: ",(0,n.jsx)(o.code,{children:"RegExg[] | (filePath: string, isExternal: boolean) => boolean | boolean"})]}),"\n",(0,n.jsxs)(o.li,{children:["Default value: ",(0,n.jsx)(o.code,{children:"undefined"})]}),"\n"]}),"\n",(0,n.jsx)(o.p,{children:"Normally, we configure the module's side effects via the sideEffects field in package.json, but in some cases, such as when we reference a three-party package style file"}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"other-package/dist/index.css",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsx)(o.p,{children:"But the package.json of this three-party package does not have the style file configured in the sideEffects"}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["other-package/package.json"],active:"other-package/package.json",heightRatio:1},files:[{name:"other-package/package.json",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"sideEffects",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"[",props:{style:{color:"#ECEFF4"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"dist/index.js",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"]",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}}]}],lang:"json"},annotations:[]}]}),"\n",(0,n.jsx)(o.p,{children:"This is the time to use this configuration item, which supports regular and functional forms"}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"defineConfig",props:{style:{color:"#8FBCBB"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"from",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"@modern-js/module-tools",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"defineConfig",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"sideEffects",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" [",props:{style:{color:"#D8DEE9FF"}}},{content:"/",props:{style:{color:"#ECEFF4"}}},{content:"\\.css",props:{style:{color:"#EBCB8B"}}},{content:"$",props:{style:{color:"#81A1C1"}}},{content:"/",props:{style:{color:"#ECEFF4"}}},{content:"]",props:{style:{color:"#D8DEE9FF"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#ECEFF4"}}},{content:"// or",props:{style:{color:"#616E88"}}}]},{tokens:[{content:" ",props:{style:{color:"#ECEFF4"}}},{content:"// sideEffects: (filePath, isExternal) => /\\.css$/.test(filePath),",props:{style:{color:"#616E88"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:")",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.div,{className:"modern-directive tip",children:[(0,n.jsx)(o.p,{className:"modern-directive-title",children:"TIP"}),(0,n.jsx)(o.div,{className:"modern-directive-content",children:(0,n.jsx)(o.p,{children:"\nAfter adding this configuration, the sideEffects field in package.json will no longer be read when packaging"})})]}),"\n",(0,n.jsxs)(o.h2,{id:"sourcedir",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#sourcedir",children:"#"}),"sourceDir"]}),"\n",(0,n.jsxs)(o.p,{children:["Specify the source directory of the build, default is ",(0,n.jsx)(o.code,{children:"src"}),", which is used to generate the corresponding product directory based on the source directory structure when building ",(0,n.jsx)(o.code,{children:"bundleless"}),"."]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"string"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"src"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"sourcemap",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#sourcemap",children:"#"}),"sourceMap"]}),"\n",(0,n.jsx)(o.p,{children:"Whether to generate sourceMap or not"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"boolean | 'inline' | 'external'"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"false"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"splitting",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#splitting",children:"#"}),"splitting"]}),"\n",(0,n.jsx)(o.p,{children:"Whether to enable code splitting"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"false"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"style",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#style",children:"#"}),"style"]}),"\n",(0,n.jsx)(o.p,{children:"Configure style-related configuration"}),"\n",(0,n.jsxs)(o.h3,{id:"less",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#less",children:"#"}),"less"]}),"\n",(0,n.jsx)(o.p,{children:"less-related configuration"}),"\n",(0,n.jsxs)(o.h4,{id:"lessoptions",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#lessoptions",children:"#"}),"lessOptions"]}),"\n",(0,n.jsxs)(o.p,{children:["Refer to ",(0,n.jsx)(o.a,{href:"https://less.bootcss.com/usage/#less-options",target:"_blank",rel:"nofollow",children:"less"})," for detailed configuration"]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"Object"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"{ javascriptEnabled: true }"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h4,{id:"additionaldata",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#additionaldata",children:"#"}),"additionalData"]}),"\n",(0,n.jsxs)(o.p,{children:["Add ",(0,n.jsx)(o.code,{children:"Less"})," code to the beginning of the entry file."]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"string"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"undefined"})]}),"\n"]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"style",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"less",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"additionalData",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"`",props:{style:{color:"#ECEFF4"}}},{content:"@base-color: #c6538c;",props:{style:{color:"#A3BE8C"}}},{content:"`",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.h4,{id:"implementation",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#implementation",children:"#"}),"implementation"]}),"\n",(0,n.jsxs)(o.p,{children:["Configure the implementation library used by ",(0,n.jsx)(o.code,{children:"Less"}),", if not specified, the built-in version used is ",(0,n.jsx)(o.code,{children:"4.1.3"})]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"string | Object"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"undefined"})]}),"\n"]}),"\n",(0,n.jsxs)(o.p,{children:["Specify the implementation library for ",(0,n.jsx)(o.code,{children:"Less"})," when the ",(0,n.jsx)(o.code,{children:"Object"})," type is specified"]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"style",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"less",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"implementation",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"require",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"less",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:")",props:{style:{color:"#D8DEE9FF"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.p,{children:["For the ",(0,n.jsx)(o.code,{children:"string"})," type, specify the path to the implementation library for ",(0,n.jsx)(o.code,{children:"Less"})]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"style",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"less",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"implementation",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"require",props:{style:{color:"#D8DEE9"}}},{content:".",props:{style:{color:"#ECEFF4"}}},{content:"resolve",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"less",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:")",props:{style:{color:"#D8DEE9FF"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.h3,{id:"sass",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#sass",children:"#"}),"sass"]}),"\n",(0,n.jsx)(o.p,{children:"sass-related configuration"}),"\n",(0,n.jsxs)(o.h4,{id:"sassoptions",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#sassoptions",children:"#"}),"sassOptions"]}),"\n",(0,n.jsxs)(o.p,{children:["Refer to ",(0,n.jsx)(o.a,{href:"https://github.com/sass/node-sass#options",target:"_blank",rel:"nofollow",children:"node-sass"})," for detailed configuration"]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"Object"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"{}"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h4,{id:"additionaldata-1",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#additionaldata-1",children:"#"}),"additionalData"]}),"\n",(0,n.jsxs)(o.p,{children:["Add ",(0,n.jsx)(o.code,{children:"Sass"})," code to the beginning of the entry file."]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"string | Function"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"undefined"})]}),"\n"]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"style",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"sass",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"additionalData",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"`",props:{style:{color:"#ECEFF4"}}},{content:"$base-color: #c6538c;",props:{style:{color:"#A3BE8C"}}}]},{tokens:[{content:" $border-dark: rgba($base-color, 0.88);",props:{style:{color:"#A3BE8C"}}},{content:"`",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.h4,{id:"implementation-1",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#implementation-1",children:"#"}),"implementation"]}),"\n",(0,n.jsxs)(o.p,{children:["Configure the implementation library used by ",(0,n.jsx)(o.code,{children:"Sass"}),", the built-in version used is ",(0,n.jsx)(o.code,{children:"1.5.4"})," if not specified"]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"string | Object"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"undefined"})]}),"\n"]}),"\n",(0,n.jsxs)(o.p,{children:["Specify the implementation library for ",(0,n.jsx)(o.code,{children:"Sass"})," when the ",(0,n.jsx)(o.code,{children:"Object"})," type is specified"]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"style",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"sass",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"implementation",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"require",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"sass",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:")",props:{style:{color:"#D8DEE9FF"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.p,{children:["For the ",(0,n.jsx)(o.code,{children:"string"})," type, specify the path to the ",(0,n.jsx)(o.code,{children:"Sass"})," implementation library"]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"style",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"sass",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"implementation",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"require",props:{style:{color:"#D8DEE9"}}},{content:".",props:{style:{color:"#ECEFF4"}}},{content:"resolve",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"sass",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:")",props:{style:{color:"#D8DEE9FF"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.h3,{id:"postcss",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#postcss",children:"#"}),"postcss"]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:"plugins"}),"\n",(0,n.jsx)(o.li,{children:"processOptions"}),"\n"]}),"\n",(0,n.jsxs)(o.p,{children:["See ",(0,n.jsx)(o.a,{href:"https://github.com/postcss/postcss#options",target:"_blank",rel:"nofollow",children:"postcss"})," for detailed configuration"]}),"\n",(0,n.jsxs)(o.h3,{id:"inject",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#inject",children:"#"}),"inject"]}),"\n",(0,n.jsx)(o.p,{children:"Configure whether to insert style into js in packaged mode"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"false"})]}),"\n"]}),"\n",(0,n.jsxs)(o.p,{children:["After opening inject, you will see an extra piece of style code in the js file. For example, if you write ",(0,n.jsx)(o.code,{children:"import '. /index.scss'"}),"\uff0cyou will see the following code."]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["dist/index.js"],active:"dist/index.js",heightRatio:1},files:[{name:"dist/index.js",focus:"",code:{lines:[{tokens:[{content:"// node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js",props:{style:{color:"#616E88"}}}]},{tokens:[{content:"function",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"styleInject",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#ECEFF4"}}},{content:"css",props:{style:{color:"#D8DEE9"}}},{content:",",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"ref",props:{style:{color:"#D8DEE9"}}},{content:")",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#ECEFF4"}}},{content:"// ...",props:{style:{color:"#616E88"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"var",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"style_inject_es_default",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"styleInject",props:{style:{color:"#D8DEE9"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[]},{tokens:[{content:"// src/index.scss",props:{style:{color:"#616E88"}}}]},{tokens:[{content:"var",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"css_248z",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:".body {",props:{style:{color:"#A3BE8C"}}},{content:"\\n",props:{style:{color:"#EBCB8B"}}},{content:" color: black;",props:{style:{color:"#A3BE8C"}}},{content:"\\n",props:{style:{color:"#EBCB8B"}}},{content:"}",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:"style_inject_es_default",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#D8DEE9FF"}}},{content:"css_248z",props:{style:{color:"#D8DEE9"}}},{content:")",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.div,{className:"modern-directive tip",children:[(0,n.jsx)(o.p,{className:"modern-directive-title",children:"Note"}),(0,n.jsxs)(o.div,{className:"modern-directive-content",children:[(0,n.jsxs)(o.p,{children:["With ",(0,n.jsx)(o.code,{children:"inject"})," turned on, you need to pay attention to the following points."]}),(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:[(0,n.jsx)(o.code,{children:"@import"})," in the css file will not be processed. So if you have ",(0,n.jsx)(o.code,{children:"@import"})," in your css file, then you need to bring in the css file manually in js (less,scss files don't need it because they will be preprocessed)."]}),"\n",(0,n.jsxs)(o.li,{children:["The impact of ",(0,n.jsx)(o.code,{children:"sideEffects"})," needs to be considered, by default our builder will consider it as a side effect, if the ",(0,n.jsx)(o.code,{children:"sideEffects"})," field set in your project or in the package.json of the three-way package and it does not contain this css file, then you will get a warning"]}),"\n"]}),(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'[LIBUILD:ESBUILD_WARN] Ignoring this import because "src/index.scss" was marked as having no side effects by plugin "libuild:adapter"',props:{}}]}],lang:"text"},annotations:[]}]}),(0,n.jsxs)(o.p,{children:["This can be fixed by configuring ",(0,n.jsx)(o.a,{href:"#sideeffects",children:"sideEffects"})," in this case."]})]})]}),"\n",(0,n.jsxs)(o.h3,{id:"automodules",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#automodules",children:"#"}),"autoModules"]}),"\n",(0,n.jsx)(o.p,{children:"Enable CSS Modules automatically based on the filename."}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"boolean | RegExp"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"true"})]}),"\n"]}),"\n",(0,n.jsxs)(o.p,{children:[(0,n.jsx)(o.code,{children:"true"})," : Enables CSS Modules for style files ending with ",(0,n.jsx)(o.code,{children:".module.css"})," ",(0,n.jsx)(o.code,{children:".module.less"})," ",(0,n.jsx)(o.code,{children:".module.scss"})," ",(0,n.jsx)(o.code,{children:".module.sass"})," filenames"]}),"\n",(0,n.jsxs)(o.p,{children:[(0,n.jsx)(o.code,{children:"false"})," : Disable CSS Modules."]}),"\n",(0,n.jsxs)(o.p,{children:[(0,n.jsx)(o.code,{children:"RegExp"})," : Enables CSS Modules for all files that match the regular condition."]}),"\n",(0,n.jsxs)(o.h3,{id:"modules",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#modules",children:"#"}),"modules"]}),"\n",(0,n.jsx)(o.p,{children:"CSS Modules configuration"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"Object"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"{}"})]}),"\n"]}),"\n",(0,n.jsxs)(o.p,{children:["A common configuration is ",(0,n.jsx)(o.code,{children:"localsConvention"}),", which changes the class name generation rules for css modules"]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"style",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"modules",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"localsConvention",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"camelCaseOnly",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsx)(o.p,{children:"For the following styles"}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:".",props:{style:{color:"#ECEFF4"}}},{content:"box-title",props:{style:{color:"#8FBCBB"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"color",props:{style:{color:"#D8DEE9"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"red;",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}}]}],lang:"css"},annotations:[]}]}),"\n",(0,n.jsxs)(o.p,{children:["You can use ",(0,n.jsx)(o.code,{children:"styles.boxTitle"})," to access"]}),"\n",(0,n.jsxs)(o.p,{children:["For detailed configuration see ",(0,n.jsx)(o.a,{href:"https://github.com/madyankin/postcss-modules#usage",target:"_blank",rel:"nofollow",children:"postcss-modules"})]}),"\n",(0,n.jsxs)(o.h3,{id:"tailwindcss",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#tailwindcss",children:"#"}),"tailwindcss"]}),"\n",(0,n.jsx)(o.p,{children:"tailwindcss related configuration"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"Object | Function"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"see configuration details below"})]}),"\n"]}),"\n","\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"const",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"tailwind",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"content",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" [",props:{style:{color:"#D8DEE9FF"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"./config/html/**/*.html",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"./config/html/**/*.ejs",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"./config/html/**/*.hbs",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"./src/**/*.js",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"./src/**/*.jsx",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"./src/**/*.ts",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"./src/**/*.tsx",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"./storybook/**/*",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ]",props:{style:{color:"#D8DEE9FF"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.p,{children:["When the value is of type ",(0,n.jsx)(o.code,{children:"Object"}),", it is merged with the default configuration via ",(0,n.jsx)(o.code,{children:"Object.assign"}),"."]}),"\n",(0,n.jsxs)(o.p,{children:["When the value is of type ",(0,n.jsx)(o.code,{children:"Function"}),", the object returned by the function is merged with the default configuration via ",(0,n.jsx)(o.code,{children:"Object.assign"}),"."]}),"\n",(0,n.jsxs)(o.p,{children:["The ",(0,n.jsx)(o.code,{children:"theme"})," property is not allowed, otherwise the build will fail, using ",(0,n.jsx)(o.a,{href:"/module-tools/en/api/config/design-system.html",children:(0,n.jsx)(o.code,{children:"designSystem"})})," as the ",(0,n.jsx)(o.code,{children:"Tailwind CSS Theme"})," configuration."]}),"\n",(0,n.jsxs)(o.p,{children:["The rest of the usage is the same as Tailwind CSS: ",(0,n.jsx)(o.a,{href:"https://tailwindcss.com/docs/configuration",target:"_blank",rel:"nofollow",children:"Quick Portal"}),"."]}),"\n",(0,n.jsxs)(o.h2,{id:"target",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#target",children:"#"}),"target"]}),"\n",(0,n.jsx)(o.p,{children:"Specify the target environment for the build"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"'es5' | 'es6' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'esnext'"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"'es6'"})]}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"umdglobals",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#umdglobals",children:"#"}),"umdGlobals"]}),"\n",(0,n.jsx)(o.p,{children:"Specify global variables for external import of umd products"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"Record<string, string>"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"{}"})]}),"\n"]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"umdGlobals",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"react",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"React",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"react-dom",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"ReactDOM",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.p,{children:["At this point, ",(0,n.jsx)(o.code,{children:"react"})," and ",(0,n.jsx)(o.code,{children:"react-dom"})," will be seen as global variables imported externally and will not be packed into the umd product, but will be accessible by way of ",(0,n.jsx)(o.code,{children:"global.React"})," and ",(0,n.jsx)(o.code,{children:"global.ReactDOM"})]}),"\n",(0,n.jsxs)(o.h2,{id:"umdmodulename",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#umdmodulename",children:"#"}),"umdModuleName"]}),"\n",(0,n.jsx)(o.p,{children:"Specifies the module name of the umd product"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["type: ",(0,n.jsx)(o.code,{children:"string"})," | ",(0,n.jsx)(o.code,{children:"Function"})]}),"\n",(0,n.jsxs)(o.li,{children:["default: ",(0,n.jsx)(o.code,{children:"name => name"})]}),"\n"]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"format",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"umd",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"umdModuleName",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"myLib",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]}),"\n",(0,n.jsxs)(o.p,{children:["At this point the umd product will go to mount on ",(0,n.jsx)(o.code,{children:"global.myLib"})]}),"\n",(0,n.jsxs)(o.div,{className:"modern-directive tip",children:[(0,n.jsx)(o.p,{className:"modern-directive-title",children:"TIP"}),(0,n.jsx)(o.div,{className:"modern-directive-content",children:(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:"The module name of the umd product must not conflict with the global variable name."}),"\n",(0,n.jsxs)(o.li,{children:["Module names will be converted to camelCase, e.g. ",(0,n.jsx)(o.code,{children:"my-lib"})," will be converted to ",(0,n.jsx)(o.code,{children:"myLib"}),", refer to ",(0,n.jsx)(o.a,{href:"https://github.com/babel/babel/blob/main/packages/babel-types/src/converters/toIdentifier.ts",target:"_blank",rel:"nofollow",children:"toIdentifier"}),"."]}),"\n"]})})]}),"\n",(0,n.jsx)(o.p,{children:"Also the function form can take one parameter, which is the output path of the current package file"}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:["modern.config.ts"],active:"modern.config.ts",heightRatio:1},files:[{name:"modern.config.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"format",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"umd",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"umdModuleName",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"path",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=>",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"if",props:{style:{color:"#81A1C1"}}},{content:" (",props:{style:{color:"#D8DEE9FF"}}},{content:"path",props:{style:{color:"#D8DEE9"}}},{content:".",props:{style:{color:"#ECEFF4"}}},{content:"includes",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"index",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:")) ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"return",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"myLib",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"else",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"return",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"myLib2",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"js"},annotations:[]}]})]})}function d(e,o){throw new Error("Expected "+(o?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}o.default=function(e={}){const{wrapper:o}=e.components||{};return o?(0,n.jsx)(o,Object.assign({},e,{children:(0,n.jsx)(a,e)})):a(e)}}}]);
|