@lizardbyte/shared-web 2025.1012.125516 → 2026.125.235713

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  # shared-web
2
2
 
3
3
  [![GitHub stars](https://img.shields.io/github/stars/lizardbyte/shared-web.svg?logo=github&style=for-the-badge)](https://github.com/LizardByte/shared-web)
4
- [![GitHub Workflow Status (CI)](https://img.shields.io/github/actions/workflow/status/lizardbyte/shared-web/ci.yml.svg?branch=master&label=CI%20build&logo=github&style=for-the-badge)](https://github.com/LizardByte/shared-web/actions/workflows/CI.yml?query=branch%3Amaster)
4
+ [![GitHub Workflow Status (CI)](https://img.shields.io/github/actions/workflow/status/lizardbyte/shared-web/_ci-node.yml.svg?branch=master&label=CI%20build&logo=github&style=for-the-badge)](https://github.com/LizardByte/shared-web/actions/workflows/CI.yml?query=branch%3Amaster)
5
5
  [![Codecov](https://img.shields.io/codecov/c/gh/LizardByte/shared-web?token=gWHqqpMAuO&style=for-the-badge&logo=codecov&label=codecov)](https://codecov.io/gh/LizardByte/shared-web)
6
6
  [![NPM Monthly Downloads](https://img.shields.io/npm/dm/%40lizardbyte%2Fshared-web?style=for-the-badge&logo=npm&label=npm%20downloads/m)](https://www.npmjs.com/package/@lizardbyte/shared-web)
7
7
  [![NPM Version](https://img.shields.io/npm/v/%40lizardbyte%2Fshared-web?style=for-the-badge&logo=npm&label=npm%20version)](https://www.npmjs.com/package/@lizardbyte/shared-web)
@@ -26,7 +26,7 @@ Common web assets for use in LizardByte projects.
26
26
  //npm.pkg.github.com/:_authToken=TOKEN
27
27
  @lizardbyte:registry=https://npm.pkg.github.com
28
28
  ```
29
-
29
+
30
30
  Replace `TOKEN` with a valid GitHub token with read access to the package registry.
31
31
 
32
32
  See
@@ -1 +1 @@
1
- {"version":3,"file":"crowdin-bootstrap-css.css","mappings":"AAAA,uFAEE,8CACA,qDACA,wCAGF,qGAEE,mDACA,mCAGF,8CACE,wCAGF,0DACE,0C","sources":["webpack://@lizardbyte/shared-web/./src/css/crowdin-bootstrap.scss"],"sourcesContent":["#crowdin-language-picker .cr-picker-button,\n#crowdin-language-picker .cr-picker-submenu {\n background-color: var(--navbar-col) !important;\n border: 1px solid var(--navbar-border-col) !important;\n color: var(--navbar-text-col) !important;\n}\n\n#crowdin-language-picker .cr-picker-button:hover,\n#crowdin-language-picker .cr-picker-submenu > a:hover {\n background-color: var(--navbar-text-col) !important;\n color: var(--navbar-col) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a {\n color: var(--navbar-text-col) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a.cr-selected {\n color: var(--navbar-border-col) !important;\n}\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"crowdin-bootstrap-css.css","mappings":"AAAA,uFAEE,8CACA,qDACA,wCAGF,qGAEE,mDACA,mCAGF,8CACE,wCAGF,0DACE,0C","sources":["webpack://@lizardbyte/shared-web/./src/css/crowdin-bootstrap.scss"],"sourcesContent":["#crowdin-language-picker .cr-picker-button,\n#crowdin-language-picker .cr-picker-submenu {\n background-color: var(--navbar-col) !important;\n border: 1px solid var(--navbar-border-col) !important;\n color: var(--navbar-text-col) !important;\n}\n\n#crowdin-language-picker .cr-picker-button:hover,\n#crowdin-language-picker .cr-picker-submenu > a:hover {\n background-color: var(--navbar-text-col) !important;\n color: var(--navbar-col) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a {\n color: var(--navbar-text-col) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a.cr-selected {\n color: var(--navbar-border-col) !important;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"crowdin-clean-jsdoc-css.css","mappings":"AAAA,MACE,iCACA,mCACA,sCACA,wCAGF,mCACE,sBACE,iCACA,mCACA,sCACA,yCAIJ,uFAEI,6FACA,+FACA,4EAGJ,qGAEE,kGACA,uEAGF,8CACE,4EAGF,0DACE,8E","sources":["webpack://@lizardbyte/shared-web/./src/css/crowdin-clean-jsdoc.scss"],"sourcesContent":[":root {\n --crowdin-primary-color: #f7f7f7;\n --crowdin-secondary-color: #565656;\n --crowdin-primary-text-color: #111111;\n --crowdin-secondary-text-color: #c5c5c9;\n}\n\n@media (prefers-color-scheme: dark) {\n body[data-theme=\"dark\"] {\n --crowdin-primary-color: #222222;\n --crowdin-secondary-color: #717171;\n --crowdin-primary-text-color: #ffffff;\n --crowdin-secondary-text-color: #8b949e;\n }\n}\n\n#crowdin-language-picker .cr-picker-button,\n#crowdin-language-picker .cr-picker-submenu {\n background-color: var(--crowdin-primary-color) !important;\n border: 1px solid var(--crowdin-secondary-color) !important;\n color: var(--crowdin-primary-text-color) !important;\n}\n\n#crowdin-language-picker .cr-picker-button:hover,\n#crowdin-language-picker .cr-picker-submenu > a:hover {\n background-color: var(--crowdin-primary-text-color) !important;\n color: var(--crowdin-primary-color) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a {\n color: var(--crowdin-primary-text-color) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a.cr-selected {\n color: var(--crowdin-secondary-text-color) !important;\n}\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"crowdin-clean-jsdoc-css.css","mappings":"AAAA,MACE,iCACA,mCACA,sCACA,wCAGF,mCACE,sBACE,iCACA,mCACA,sCACA,yCAIJ,uFAEI,6FACA,+FACA,4EAGJ,qGAEE,kGACA,uEAGF,8CACE,4EAGF,0DACE,8E","sources":["webpack://@lizardbyte/shared-web/./src/css/crowdin-clean-jsdoc.scss"],"sourcesContent":[":root {\n --crowdin-primary-color: #f7f7f7;\n --crowdin-secondary-color: #565656;\n --crowdin-primary-text-color: #111111;\n --crowdin-secondary-text-color: #c5c5c9;\n}\n\n@media (prefers-color-scheme: dark) {\n body[data-theme=\"dark\"] {\n --crowdin-primary-color: #222222;\n --crowdin-secondary-color: #717171;\n --crowdin-primary-text-color: #ffffff;\n --crowdin-secondary-text-color: #8b949e;\n }\n}\n\n#crowdin-language-picker .cr-picker-button,\n#crowdin-language-picker .cr-picker-submenu {\n background-color: var(--crowdin-primary-color) !important;\n border: 1px solid var(--crowdin-secondary-color) !important;\n color: var(--crowdin-primary-text-color) !important;\n}\n\n#crowdin-language-picker .cr-picker-button:hover,\n#crowdin-language-picker .cr-picker-submenu > a:hover {\n background-color: var(--crowdin-primary-text-color) !important;\n color: var(--crowdin-primary-color) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a {\n color: var(--crowdin-primary-text-color) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a.cr-selected {\n color: var(--crowdin-secondary-text-color) !important;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"crowdin-doxygen-css.css","mappings":"AAAA,uFAEE,yDACA,mEACA,8CAGF,qGAEE,yDACA,8CAGF,8CACE,8CAGF,0DACE,wD","sources":["webpack://@lizardbyte/shared-web/./src/css/crowdin-doxygen.scss"],"sourcesContent":["#crowdin-language-picker .cr-picker-button,\n#crowdin-language-picker .cr-picker-submenu {\n background-color: var(--page-background-color) !important;\n border: 1px solid var(--page-secondary-foreground-color) !important;\n color: var(--page-foreground-color) !important;\n}\n\n#crowdin-language-picker .cr-picker-button:hover,\n#crowdin-language-picker .cr-picker-submenu > a:hover {\n background-color: var(--page-foreground-color) !important;\n color: var(--page-background-color) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a {\n color: var(--page-foreground-color) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a.cr-selected {\n color: var(--page-secondary-foreground-color) !important;\n}\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"crowdin-doxygen-css.css","mappings":"AAAA,uFAEE,yDACA,mEACA,8CAGF,qGAEE,yDACA,8CAGF,8CACE,8CAGF,0DACE,wD","sources":["webpack://@lizardbyte/shared-web/./src/css/crowdin-doxygen.scss"],"sourcesContent":["#crowdin-language-picker .cr-picker-button,\n#crowdin-language-picker .cr-picker-submenu {\n background-color: var(--page-background-color) !important;\n border: 1px solid var(--page-secondary-foreground-color) !important;\n color: var(--page-foreground-color) !important;\n}\n\n#crowdin-language-picker .cr-picker-button:hover,\n#crowdin-language-picker .cr-picker-submenu > a:hover {\n background-color: var(--page-foreground-color) !important;\n color: var(--page-background-color) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a {\n color: var(--page-foreground-color) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a.cr-selected {\n color: var(--page-secondary-foreground-color) !important;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"crowdin-furo-css.css","mappings":"AAAA,uFAEE,yDACA,2DACA,8CAGF,qGAEE,yDACA,8CAGF,8CACE,8CAGF,0DACE,8C","sources":["webpack://@lizardbyte/shared-web/./src/css/crowdin-furo.scss"],"sourcesContent":["#crowdin-language-picker .cr-picker-button,\n#crowdin-language-picker .cr-picker-submenu {\n background-color: var(--color-code-background) !important;\n border: 1px solid var(--color-foreground-border) !important;\n color: var(--color-code-foreground) !important;\n}\n\n#crowdin-language-picker .cr-picker-button:hover,\n#crowdin-language-picker .cr-picker-submenu > a:hover {\n background-color: var(--color-code-foreground) !important;\n color: var(--color-code-background) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a {\n color: var(--color-code-foreground) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a.cr-selected {\n color: var(--color-background-item) !important;\n}\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"crowdin-furo-css.css","mappings":"AAAA,uFAEE,yDACA,2DACA,8CAGF,qGAEE,yDACA,8CAGF,8CACE,8CAGF,0DACE,8C","sources":["webpack://@lizardbyte/shared-web/./src/css/crowdin-furo.scss"],"sourcesContent":["#crowdin-language-picker .cr-picker-button,\n#crowdin-language-picker .cr-picker-submenu {\n background-color: var(--color-code-background) !important;\n border: 1px solid var(--color-foreground-border) !important;\n color: var(--color-code-foreground) !important;\n}\n\n#crowdin-language-picker .cr-picker-button:hover,\n#crowdin-language-picker .cr-picker-submenu > a:hover {\n background-color: var(--color-code-foreground) !important;\n color: var(--color-code-background) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a {\n color: var(--color-code-foreground) !important;\n}\n\n#crowdin-language-picker .cr-picker-submenu > a.cr-selected {\n color: var(--color-background-item) !important;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
package/dist/crowdin.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var e={714:(e,t,o)=>{var n=o(836);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"LizardByte",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;["LizardByte","LizardByte-docs"].includes(e)?["sphinx",null].includes(t)?n("https://proxy-translator.app.crowdin.net/assets/proxy-translator.js",function(){var o={LizardByte:{baseUrl:"https://app.lizardbyte.dev",valuesParams:"U2FsdGVkX193b3LJT2/HWNIVSb3D61klmnbJ+dvGjoY2XSu35S3gL3FRLBfiXVk4nRsFlfzaC0R7JrklvnS7Xqz5im/VrO+sGzo3LbebxNIMp8LZe28udpnJcA2I2u8B",filePath:"/app.lizardbyte.dev.json",distribution:"0913bb75b61f0b26247ffa91bw4"},"LizardByte-docs":{baseUrl:"https://docs.lizardbyte.dev",valuesParams:"U2FsdGVkX19eQczbrFgaLYbrEBP8is5CVpC2YSnXxH/sRjWqaBtQOsLZJbSRMepcn3D2sofzZxALb2pvT3MLmM+WG5EpWSF7CzzYsAOJ+k/FpMUJ1PZ1FQmmlKCIWyD7",filePath:"/docs.lizardbyte.dev.json",distribution:"fb3b3d5c18de9bc717d96b91bw4"}},n={bg:{code:"bg",name:"Bulgarian",twoLettersCode:"bg"},de:{code:"de",name:"German",twoLettersCode:"de"},en:{code:"en",name:"English",twoLettersCode:"en"},"en-GB":{code:"en-GB",name:"English, United Kingdom",twoLettersCode:"en"},"en-US":{code:"en-US",name:"English, United States",twoLettersCode:"en"},"es-ES":{code:"es-ES",name:"Spanish",twoLettersCode:"es"},fr:{code:"fr",name:"French",twoLettersCode:"fr"},it:{code:"it",name:"Italian",twoLettersCode:"it"},ja:{code:"ja",name:"Japanese",twoLettersCode:"ja"},ko:{code:"ko",name:"Korean",twoLettersCode:"ko"},pl:{code:"pl",name:"Polish",twoLettersCode:"pl"},"pt-BR":{code:"pt-BR",name:"Portuguese, Brazilian",twoLettersCode:"pt"},"pt-PT":{code:"pt-PT",name:"Portuguese",twoLettersCode:"pt"},ru:{code:"ru",name:"Russian",twoLettersCode:"ru"},"sv-SE":{code:"sv-SE",name:"Swedish",twoLettersCode:"sv"},tr:{code:"tr",name:"Turkish",twoLettersCode:"tr"},uk:{code:"uk",name:"Ukrainian",twoLettersCode:"uk"},"zh-CN":{code:"zh-CN",name:"Chinese Simplified",twoLettersCode:"zh"},"zh-TW":{code:"zh-TW",name:"Chinese Traditional",twoLettersCode:"zh"}};if(n=Object.fromEntries(Object.entries(n).sort(function(e,t){return e[1].name.localeCompare(t[1].name)})),window.proxyTranslator.init({baseUrl:o[e].baseUrl,appUrl:"https://proxy-translator.app.crowdin.net",valuesParams:o[e].valuesParams,distributionBaseUrl:"https://distributions.crowdin.net",filePath:o[e].filePath,distribution:o[e].distribution,distributionSeparateFiles:void 0,languagesData:n,defaultLanguage:"en",defaultLanguageTitle:"English",languageDetectType:"default",poweredBy:!1,position:"bottom-left",submenuPosition:"top-left"}),null!==t){var r=document.getElementById("crowdin-language-picker"),a=document.getElementsByClassName("cr-picker-button")[0];"sphinx"===t&&(r.classList.remove("cr-position-bottom-left"),r.style.width=a.offsetWidth+10+"px",r.style.position="relative",r.style.left="10px",r.style.bottom="10px",document.getElementsByClassName("sidebar-sticky")[0].appendChild(r))}}):console.error('Invalid UI. Must be "sphinx", or null'):console.error('Invalid project. Must be "LizardByte" or "LizardByte-docs"')}"undefined"!=typeof window&&(window.initCrowdIn=r),e.exports=r},836:e=>{function t(e,t){var o=document.createElement("script");o.src=e,o.async=!0,o.onload=function(){t&&t(null,o)},o.onerror=function(){t&&t(new Error("Failed to load script: ".concat(e)))},document.head.appendChild(o)}"undefined"!=typeof window&&(window.loadScript=t),e.exports=t}},t={};!function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}(714)})();
1
+ (()=>{var e={714(e,t,o){var n=o(836);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"LizardByte",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;["LizardByte","LizardByte-docs"].includes(e)?["sphinx",null].includes(t)?n("https://proxy-translator.app.crowdin.net/assets/proxy-translator.js",function(){var o={LizardByte:{baseUrl:"https://app.lizardbyte.dev",valuesParams:"U2FsdGVkX193b3LJT2/HWNIVSb3D61klmnbJ+dvGjoY2XSu35S3gL3FRLBfiXVk4nRsFlfzaC0R7JrklvnS7Xqz5im/VrO+sGzo3LbebxNIMp8LZe28udpnJcA2I2u8B",filePath:"/app.lizardbyte.dev.json",distribution:"0913bb75b61f0b26247ffa91bw4"},"LizardByte-docs":{baseUrl:"https://docs.lizardbyte.dev",valuesParams:"U2FsdGVkX19eQczbrFgaLYbrEBP8is5CVpC2YSnXxH/sRjWqaBtQOsLZJbSRMepcn3D2sofzZxALb2pvT3MLmM+WG5EpWSF7CzzYsAOJ+k/FpMUJ1PZ1FQmmlKCIWyD7",filePath:"/docs.lizardbyte.dev.json",distribution:"fb3b3d5c18de9bc717d96b91bw4"}},n={bg:{code:"bg",name:"Bulgarian",twoLettersCode:"bg"},de:{code:"de",name:"German",twoLettersCode:"de"},en:{code:"en",name:"English",twoLettersCode:"en"},"en-GB":{code:"en-GB",name:"English, United Kingdom",twoLettersCode:"en"},"en-US":{code:"en-US",name:"English, United States",twoLettersCode:"en"},"es-ES":{code:"es-ES",name:"Spanish",twoLettersCode:"es"},fr:{code:"fr",name:"French",twoLettersCode:"fr"},it:{code:"it",name:"Italian",twoLettersCode:"it"},ja:{code:"ja",name:"Japanese",twoLettersCode:"ja"},ko:{code:"ko",name:"Korean",twoLettersCode:"ko"},pl:{code:"pl",name:"Polish",twoLettersCode:"pl"},"pt-BR":{code:"pt-BR",name:"Portuguese, Brazilian",twoLettersCode:"pt"},"pt-PT":{code:"pt-PT",name:"Portuguese",twoLettersCode:"pt"},ru:{code:"ru",name:"Russian",twoLettersCode:"ru"},"sv-SE":{code:"sv-SE",name:"Swedish",twoLettersCode:"sv"},tr:{code:"tr",name:"Turkish",twoLettersCode:"tr"},uk:{code:"uk",name:"Ukrainian",twoLettersCode:"uk"},"zh-CN":{code:"zh-CN",name:"Chinese Simplified",twoLettersCode:"zh"},"zh-TW":{code:"zh-TW",name:"Chinese Traditional",twoLettersCode:"zh"}};if(n=Object.fromEntries(Object.entries(n).sort(function(e,t){return e[1].name.localeCompare(t[1].name)})),window.proxyTranslator.init({baseUrl:o[e].baseUrl,appUrl:"https://proxy-translator.app.crowdin.net",valuesParams:o[e].valuesParams,distributionBaseUrl:"https://distributions.crowdin.net",filePath:o[e].filePath,distribution:o[e].distribution,distributionSeparateFiles:void 0,languagesData:n,defaultLanguage:"en",defaultLanguageTitle:"English",languageDetectType:"default",poweredBy:!1,position:"bottom-left",submenuPosition:"top-left"}),null!==t){var r=document.getElementById("crowdin-language-picker"),a=document.getElementsByClassName("cr-picker-button")[0];"sphinx"===t&&(r.classList.remove("cr-position-bottom-left"),r.style.width=a.offsetWidth+10+"px",r.style.position="relative",r.style.left="10px",r.style.bottom="10px",document.getElementsByClassName("sidebar-sticky")[0].appendChild(r))}}):console.error('Invalid UI. Must be "sphinx", or null'):console.error('Invalid project. Must be "LizardByte" or "LizardByte-docs"')}"undefined"!=typeof window&&(window.initCrowdIn=r),e.exports=r},836(e){function t(e,t){var o=document.createElement("script");o.src=e,o.async=!0,o.onload=function(){t&&t(null,o)},o.onerror=function(){t&&t(new Error("Failed to load script: ".concat(e)))},document.head.appendChild(o)}"undefined"!=typeof window&&(window.loadScript=t),e.exports=t}},t={};!function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}(714)})();
2
2
  //# sourceMappingURL=crowdin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"crowdin.js","mappings":"2BAAA,IAAMA,EAAaC,EAAQ,KAO3B,SAASC,IAAqD,IAAzCC,EAAOC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,aAAcG,EAAQH,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,KAE/C,CAAC,aAAc,mBAAmBI,SAASL,GAI3C,CAAC,SAAU,MAAMK,SAASD,GAK/BP,EAAW,sEAAuE,WAE9E,IAAMS,EAAkB,CACpB,WAAc,CACVC,QAAS,6BACTC,aAAc,mIACdC,SAAU,2BACVC,aAAc,+BAElB,kBAAmB,CACfH,QAAS,8BACTC,aAAc,mIACdC,SAAU,4BACVC,aAAc,gCAIlBC,EAAgB,CAChB,GAAK,CAAC,KAAO,KAAK,KAAO,YAAY,eAAiB,MACtD,GAAK,CAAC,KAAO,KAAK,KAAO,SAAS,eAAiB,MACnD,GAAK,CAAC,KAAO,KAAK,KAAO,UAAU,eAAiB,MACpD,QAAQ,CAAC,KAAO,QAAQ,KAAO,0BAA0B,eAAiB,MAC1E,QAAQ,CAAC,KAAO,QAAQ,KAAO,yBAAyB,eAAiB,MACzE,QAAQ,CAAC,KAAO,QAAQ,KAAO,UAAU,eAAiB,MAC1D,GAAK,CAAC,KAAO,KAAK,KAAO,SAAS,eAAiB,MACnD,GAAK,CAAC,KAAO,KAAK,KAAO,UAAU,eAAiB,MACpD,GAAK,CAAC,KAAO,KAAK,KAAO,WAAW,eAAiB,MACrD,GAAK,CAAC,KAAO,KAAK,KAAO,SAAS,eAAiB,MACnD,GAAK,CAAC,KAAO,KAAK,KAAO,SAAS,eAAiB,MACnD,QAAQ,CAAC,KAAO,QAAQ,KAAO,wBAAwB,eAAiB,MACxE,QAAQ,CAAC,KAAO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,UCrGjB,SAASF,EAAWoD,EAAKC,GACrB,IAAMC,EAASlB,SAASmB,cAAc,UACtCD,EAAOE,IAAMJ,EACbE,EAAOG,OAAQ,EAEfH,EAAOI,OAAS,WACRL,GAAUA,EAAS,KAAMC,EACjC,EAEAA,EAAOK,QAAU,WACTN,GAAUA,EAAS,IAAIO,MAAM,0BAADC,OAA2BT,IAC/D,EAEAhB,SAAS0B,KAAKf,YAAYO,EAC9B,CAGsB,oBAAX/B,SACPA,OAAOvB,WAAaA,GAGxBkD,EAAOC,QAAUnD,C,GCzBb+D,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqB3D,IAAjB4D,EACH,OAAOA,EAAaf,QAGrB,IAAID,EAASa,EAAyBE,GAAY,CAGjDd,QAAS,CAAC,GAOX,OAHAgB,EAAoBF,GAAUf,EAAQA,EAAOC,QAASa,GAG/Cd,EAAOC,OACf,CCnB0Ba,CAAoB,I","sources":["webpack://@lizardbyte/shared-web/./src/js/crowdin.js","webpack://@lizardbyte/shared-web/./src/js/load-script.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["const loadScript = require('./load-script');\n\n/**\n * Initializes Crowdin translation widget based on project and UI platform.\n * @param {string} project - Project name ('LizardByte' or 'LizardByte-docs').\n * @param {string|null} platform - UI platform ('sphinx', or null).\n */\nfunction initCrowdIn(project = 'LizardByte', platform = null) {\n // Input validation\n if (!['LizardByte', 'LizardByte-docs'].includes(project)) {\n console.error('Invalid project. Must be \"LizardByte\" or \"LizardByte-docs\"');\n return;\n }\n if (!['sphinx', null].includes(platform)) {\n console.error('Invalid UI. Must be \"sphinx\", or null');\n return;\n }\n\n loadScript('https://proxy-translator.app.crowdin.net/assets/proxy-translator.js', function() {\n // Configure base settings based on project\n const projectSettings = {\n 'LizardByte': {\n baseUrl: \"https://app.lizardbyte.dev\",\n valuesParams: \"U2FsdGVkX193b3LJT2/HWNIVSb3D61klmnbJ+dvGjoY2XSu35S3gL3FRLBfiXVk4nRsFlfzaC0R7JrklvnS7Xqz5im/VrO+sGzo3LbebxNIMp8LZe28udpnJcA2I2u8B\",\n filePath: \"/app.lizardbyte.dev.json\",\n distribution: \"0913bb75b61f0b26247ffa91bw4\",\n },\n 'LizardByte-docs': {\n baseUrl: \"https://docs.lizardbyte.dev\",\n valuesParams: \"U2FsdGVkX19eQczbrFgaLYbrEBP8is5CVpC2YSnXxH/sRjWqaBtQOsLZJbSRMepcn3D2sofzZxALb2pvT3MLmM+WG5EpWSF7CzzYsAOJ+k/FpMUJ1PZ1FQmmlKCIWyD7\",\n filePath: \"/docs.lizardbyte.dev.json\",\n distribution: \"fb3b3d5c18de9bc717d96b91bw4\",\n }\n };\n\n let languagesData = {\n \"bg\":{\"code\":\"bg\",\"name\":\"Bulgarian\",\"twoLettersCode\":\"bg\"},\n \"de\":{\"code\":\"de\",\"name\":\"German\",\"twoLettersCode\":\"de\"},\n \"en\":{\"code\":\"en\",\"name\":\"English\",\"twoLettersCode\":\"en\"},\n \"en-GB\":{\"code\":\"en-GB\",\"name\":\"English, United Kingdom\",\"twoLettersCode\":\"en\"},\n \"en-US\":{\"code\":\"en-US\",\"name\":\"English, United States\",\"twoLettersCode\":\"en\"},\n \"es-ES\":{\"code\":\"es-ES\",\"name\":\"Spanish\",\"twoLettersCode\":\"es\"},\n \"fr\":{\"code\":\"fr\",\"name\":\"French\",\"twoLettersCode\":\"fr\"},\n \"it\":{\"code\":\"it\",\"name\":\"Italian\",\"twoLettersCode\":\"it\"},\n \"ja\":{\"code\":\"ja\",\"name\":\"Japanese\",\"twoLettersCode\":\"ja\"},\n \"ko\":{\"code\":\"ko\",\"name\":\"Korean\",\"twoLettersCode\":\"ko\"},\n \"pl\":{\"code\":\"pl\",\"name\":\"Polish\",\"twoLettersCode\":\"pl\"},\n \"pt-BR\":{\"code\":\"pt-BR\",\"name\":\"Portuguese, Brazilian\",\"twoLettersCode\":\"pt\"},\n \"pt-PT\":{\"code\":\"pt-PT\",\"name\":\"Portuguese\",\"twoLettersCode\":\"pt\"},\n \"ru\":{\"code\":\"ru\",\"name\":\"Russian\",\"twoLettersCode\":\"ru\"},\n \"sv-SE\":{\"code\":\"sv-SE\",\"name\":\"Swedish\",\"twoLettersCode\":\"sv\"},\n \"tr\":{\"code\":\"tr\",\"name\":\"Turkish\",\"twoLettersCode\":\"tr\"},\n \"uk\":{\"code\":\"uk\",\"name\":\"Ukrainian\",\"twoLettersCode\":\"uk\"},\n \"zh-CN\":{\"code\":\"zh-CN\",\"name\":\"Chinese Simplified\",\"twoLettersCode\":\"zh\"},\n \"zh-TW\":{\"code\":\"zh-TW\",\"name\":\"Chinese Traditional\",\"twoLettersCode\":\"zh\"},\n };\n // sort languages by name\n languagesData = Object.fromEntries(Object.entries(languagesData).sort((a, b) => a[1].name.localeCompare(b[1].name)));\n\n // Initialize Crowdin translator\n window.proxyTranslator.init({\n baseUrl: projectSettings[project].baseUrl,\n appUrl: \"https://proxy-translator.app.crowdin.net\",\n valuesParams: projectSettings[project].valuesParams,\n distributionBaseUrl: \"https://distributions.crowdin.net\",\n filePath: projectSettings[project].filePath,\n distribution: projectSettings[project].distribution,\n distributionSeparateFiles: undefined,\n languagesData: languagesData,\n defaultLanguage: \"en\",\n defaultLanguageTitle: \"English\",\n languageDetectType: \"default\",\n poweredBy: false,\n position: \"bottom-left\",\n submenuPosition: \"top-left\",\n });\n\n // Apply styling based on UI framework\n if (platform === null) {\n return;\n }\n\n const container = document.getElementById('crowdin-language-picker');\n const button = document.getElementsByClassName('cr-picker-button')[0];\n\n if (platform === 'sphinx') {\n container.classList.remove('cr-position-bottom-left')\n container.style.width = button.offsetWidth + 10 + 'px';\n container.style.position = 'relative';\n container.style.left = '10px';\n container.style.bottom = '10px';\n\n // get rst versions\n const sidebar = document.getElementsByClassName('sidebar-sticky')[0];\n\n // move button to related pages\n sidebar.appendChild(container);\n }\n });\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.initCrowdIn = initCrowdIn;\n}\n\nmodule.exports = initCrowdIn;\n","/**\n * Load a script asynchronously, and add it to the DOM. Optionally, call a callback when the script has loaded.\n * @param {string} url The URL of the script to load.\n * @param {Function} callback An optional callback to call when the script has loaded.\n */\nfunction loadScript(url, callback) {\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n\n script.onload = () => {\n if (callback) callback(null, script);\n };\n\n script.onerror = () => {\n if (callback) callback(new Error(`Failed to load script: ${url}`));\n };\n\n document.head.appendChild(script);\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.loadScript = loadScript;\n}\n\nmodule.exports = loadScript;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(714);\n"],"names":["loadScript","require","initCrowdIn","project","arguments","length","undefined","platform","includes","projectSettings","baseUrl","valuesParams","filePath","distribution","languagesData","Object","fromEntries","entries","sort","a","b","name","localeCompare","window","proxyTranslator","init","appUrl","distributionBaseUrl","distributionSeparateFiles","defaultLanguage","defaultLanguageTitle","languageDetectType","poweredBy","position","submenuPosition","container","document","getElementById","button","getElementsByClassName","classList","remove","style","width","offsetWidth","left","bottom","appendChild","console","error","module","exports","url","callback","script","createElement","src","async","onload","onerror","Error","concat","head","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__"],"sourceRo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,EAAOI,OAAS,WACRL,GAAUA,EAAS,KAAMC,EACjC,EAEAA,EAAOK,QAAU,WACTN,GAAUA,EAAS,IAAIO,MAAM,0BAADC,OAA2BT,IAC/D,EAEAhB,SAAS0B,KAAKf,YAAYO,EAC9B,CAGsB,oBAAX/B,SACPA,OAAOvB,WAAaA,GAGxBkD,EAAOC,QAAUnD,C,GCzBb+D,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqB3D,IAAjB4D,EACH,OAAOA,EAAaf,QAGrB,IAAID,EAASa,EAAyBE,GAAY,CAGjDd,QAAS,CAAC,GAOX,OAHAgB,EAAoBF,GAAUf,EAAQA,EAAOC,QAASa,GAG/Cd,EAAOC,OACf,CCnB0Ba,CAAoB,I","sources":["webpack://@lizardbyte/shared-web/./src/js/crowdin.js","webpack://@lizardbyte/shared-web/./src/js/load-script.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["const loadScript = require('./load-script');\n\n/**\n * Initializes Crowdin translation widget based on project and UI platform.\n * @param {string} project - Project name ('LizardByte' or 'LizardByte-docs').\n * @param {string|null} platform - UI platform ('sphinx', or null).\n */\nfunction initCrowdIn(project = 'LizardByte', platform = null) {\n // Input validation\n if (!['LizardByte', 'LizardByte-docs'].includes(project)) {\n console.error('Invalid project. Must be \"LizardByte\" or \"LizardByte-docs\"');\n return;\n }\n if (!['sphinx', null].includes(platform)) {\n console.error('Invalid UI. Must be \"sphinx\", or null');\n return;\n }\n\n loadScript('https://proxy-translator.app.crowdin.net/assets/proxy-translator.js', function() {\n // Configure base settings based on project\n const projectSettings = {\n 'LizardByte': {\n baseUrl: \"https://app.lizardbyte.dev\",\n valuesParams: \"U2FsdGVkX193b3LJT2/HWNIVSb3D61klmnbJ+dvGjoY2XSu35S3gL3FRLBfiXVk4nRsFlfzaC0R7JrklvnS7Xqz5im/VrO+sGzo3LbebxNIMp8LZe28udpnJcA2I2u8B\",\n filePath: \"/app.lizardbyte.dev.json\",\n distribution: \"0913bb75b61f0b26247ffa91bw4\",\n },\n 'LizardByte-docs': {\n baseUrl: \"https://docs.lizardbyte.dev\",\n valuesParams: \"U2FsdGVkX19eQczbrFgaLYbrEBP8is5CVpC2YSnXxH/sRjWqaBtQOsLZJbSRMepcn3D2sofzZxALb2pvT3MLmM+WG5EpWSF7CzzYsAOJ+k/FpMUJ1PZ1FQmmlKCIWyD7\",\n filePath: \"/docs.lizardbyte.dev.json\",\n distribution: \"fb3b3d5c18de9bc717d96b91bw4\",\n }\n };\n\n let languagesData = {\n \"bg\":{\"code\":\"bg\",\"name\":\"Bulgarian\",\"twoLettersCode\":\"bg\"},\n \"de\":{\"code\":\"de\",\"name\":\"German\",\"twoLettersCode\":\"de\"},\n \"en\":{\"code\":\"en\",\"name\":\"English\",\"twoLettersCode\":\"en\"},\n \"en-GB\":{\"code\":\"en-GB\",\"name\":\"English, United Kingdom\",\"twoLettersCode\":\"en\"},\n \"en-US\":{\"code\":\"en-US\",\"name\":\"English, United States\",\"twoLettersCode\":\"en\"},\n \"es-ES\":{\"code\":\"es-ES\",\"name\":\"Spanish\",\"twoLettersCode\":\"es\"},\n \"fr\":{\"code\":\"fr\",\"name\":\"French\",\"twoLettersCode\":\"fr\"},\n \"it\":{\"code\":\"it\",\"name\":\"Italian\",\"twoLettersCode\":\"it\"},\n \"ja\":{\"code\":\"ja\",\"name\":\"Japanese\",\"twoLettersCode\":\"ja\"},\n \"ko\":{\"code\":\"ko\",\"name\":\"Korean\",\"twoLettersCode\":\"ko\"},\n \"pl\":{\"code\":\"pl\",\"name\":\"Polish\",\"twoLettersCode\":\"pl\"},\n \"pt-BR\":{\"code\":\"pt-BR\",\"name\":\"Portuguese, Brazilian\",\"twoLettersCode\":\"pt\"},\n \"pt-PT\":{\"code\":\"pt-PT\",\"name\":\"Portuguese\",\"twoLettersCode\":\"pt\"},\n \"ru\":{\"code\":\"ru\",\"name\":\"Russian\",\"twoLettersCode\":\"ru\"},\n \"sv-SE\":{\"code\":\"sv-SE\",\"name\":\"Swedish\",\"twoLettersCode\":\"sv\"},\n \"tr\":{\"code\":\"tr\",\"name\":\"Turkish\",\"twoLettersCode\":\"tr\"},\n \"uk\":{\"code\":\"uk\",\"name\":\"Ukrainian\",\"twoLettersCode\":\"uk\"},\n \"zh-CN\":{\"code\":\"zh-CN\",\"name\":\"Chinese Simplified\",\"twoLettersCode\":\"zh\"},\n \"zh-TW\":{\"code\":\"zh-TW\",\"name\":\"Chinese Traditional\",\"twoLettersCode\":\"zh\"},\n };\n // sort languages by name\n languagesData = Object.fromEntries(Object.entries(languagesData).sort((a, b) => a[1].name.localeCompare(b[1].name)));\n\n // Initialize Crowdin translator\n window.proxyTranslator.init({\n baseUrl: projectSettings[project].baseUrl,\n appUrl: \"https://proxy-translator.app.crowdin.net\",\n valuesParams: projectSettings[project].valuesParams,\n distributionBaseUrl: \"https://distributions.crowdin.net\",\n filePath: projectSettings[project].filePath,\n distribution: projectSettings[project].distribution,\n distributionSeparateFiles: undefined,\n languagesData: languagesData,\n defaultLanguage: \"en\",\n defaultLanguageTitle: \"English\",\n languageDetectType: \"default\",\n poweredBy: false,\n position: \"bottom-left\",\n submenuPosition: \"top-left\",\n });\n\n // Apply styling based on UI framework\n if (platform === null) {\n return;\n }\n\n const container = document.getElementById('crowdin-language-picker');\n const button = document.getElementsByClassName('cr-picker-button')[0];\n\n if (platform === 'sphinx') {\n container.classList.remove('cr-position-bottom-left')\n container.style.width = button.offsetWidth + 10 + 'px';\n container.style.position = 'relative';\n container.style.left = '10px';\n container.style.bottom = '10px';\n\n // get rst versions\n const sidebar = document.getElementsByClassName('sidebar-sticky')[0];\n\n // move button to related pages\n sidebar.appendChild(container);\n }\n });\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.initCrowdIn = initCrowdIn;\n}\n\nmodule.exports = initCrowdIn;\n","/**\n * Load a script asynchronously, and add it to the DOM. Optionally, call a callback when the script has loaded.\n * @param {string} url The URL of the script to load.\n * @param {Function} callback An optional callback to call when the script has loaded.\n */\nfunction loadScript(url, callback) {\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n\n script.onload = () => {\n if (callback) callback(null, script);\n };\n\n script.onerror = () => {\n if (callback) callback(new Error(`Failed to load script: ${url}`));\n };\n\n document.head.appendChild(script);\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.loadScript = loadScript;\n}\n\nmodule.exports = loadScript;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(714);\n"],"names":["loadScript","require","initCrowdIn","project","arguments","length","undefined","platform","includes","projectSettings","baseUrl","valuesParams","filePath","distribution","languagesData","Object","fromEntries","entries","sort","a","b","name","localeCompare","window","proxyTranslator","init","appUrl","distributionBaseUrl","distributionSeparateFiles","defaultLanguage","defaultLanguageTitle","languageDetectType","poweredBy","position","submenuPosition","container","document","getElementById","button","getElementsByClassName","classList","remove","style","width","offsetWidth","left","bottom","appendChild","console","error","module","exports","url","callback","script","createElement","src","async","onload","onerror","Error","concat","head","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__"],"ignoreList":[],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (()=>{var e={415:e=>{function r(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e>=1e6?(e/1e6).toFixed(r)+"M":e>=1e3?(e/1e3).toFixed(r)+"k":e.toString()}"undefined"!=typeof window&&(window.formatNumber=r),e.exports=r}},r={};!function t(o){var n=r[o];if(void 0!==n)return n.exports;var i=r[o]={exports:{}};return e[o](i,i.exports,t),i.exports}(415)})();
1
+ (()=>{var e={415(e){function r(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e>=1e6?(e/1e6).toFixed(r)+"M":e>=1e3?(e/1e3).toFixed(r)+"k":e.toString()}"undefined"!=typeof window&&(window.formatNumber=r),e.exports=r}},r={};!function t(o){var n=r[o];if(void 0!==n)return n.exports;var i=r[o]={exports:{}};return e[o](i,i.exports,t),i.exports}(415)})();
2
2
  //# sourceMappingURL=format-number.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"format-number.js","mappings":"qBAMA,SAASA,EAAaC,GAAwB,IAAnBC,EAAaC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,EACvC,OAAIF,GAAO,KACCA,EAAM,KAASK,QAAQJ,GAAiB,IACzCD,GAAO,KACNA,EAAM,KAAMK,QAAQJ,GAAiB,IAEtCD,EAAIM,UAEnB,CAGsB,oBAAXC,SACPA,OAAOR,aAAeA,GAG1BS,EAAOC,QAAUV,C,GCpBbW,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBR,IAAjBS,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAK,EAAoBF,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCnB0BE,CAAoB,I","sources":["webpack://@lizardbyte/shared-web/./src/js/format-number.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Format a number to a human-readable string.\n * @param {number} num The number to format.\n * @param {number} decimalPlaces The number of decimal places to include in the formatted string.\n * @returns {string} The formatted number as a string with suffix (k, M, etc.).\n */\nfunction formatNumber(num, decimalPlaces = 1) {\n if (num >= 1000000) {\n return (num / 1000000).toFixed(decimalPlaces) + 'M';\n } else if (num >= 1000) {\n return (num / 1000).toFixed(decimalPlaces) + 'k';\n } else {\n return num.toString()\n }\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.formatNumber = formatNumber;\n}\n\nmodule.exports = formatNumber;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(415);\n"],"names":["formatNumber","num","decimalPlaces","arguments","length","undefined","toFixed","toString","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"format-number.js","mappings":"oBAMA,SAASA,EAAaC,GAAwB,IAAnBC,EAAaC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,EACvC,OAAIF,GAAO,KACCA,EAAM,KAASK,QAAQJ,GAAiB,IACzCD,GAAO,KACNA,EAAM,KAAMK,QAAQJ,GAAiB,IAEtCD,EAAIM,UAEnB,CAGsB,oBAAXC,SACPA,OAAOR,aAAeA,GAG1BS,EAAOC,QAAUV,C,GCpBbW,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBR,IAAjBS,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAK,EAAoBF,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCnB0BE,CAAoB,I","sources":["webpack://@lizardbyte/shared-web/./src/js/format-number.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Format a number to a human-readable string.\n * @param {number} num The number to format.\n * @param {number} decimalPlaces The number of decimal places to include in the formatted string.\n * @returns {string} The formatted number as a string with suffix (k, M, etc.).\n */\nfunction formatNumber(num, decimalPlaces = 1) {\n if (num >= 1000000) {\n return (num / 1000000).toFixed(decimalPlaces) + 'M';\n } else if (num >= 1000) {\n return (num / 1000).toFixed(decimalPlaces) + 'k';\n } else {\n return num.toString()\n }\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.formatNumber = formatNumber;\n}\n\nmodule.exports = formatNumber;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(415);\n"],"names":["formatNumber","num","decimalPlaces","arguments","length","undefined","toFixed","toString","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__"],"ignoreList":[],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (()=>{var t={83:t=>{function n(t,n){if(0===t.length)return n.length;if(0===n.length)return t.length;var e,r,h=[];for(e=0;e<=n.length;e++)h[e]=[e];for(r=0;r<=t.length;r++)h[0][r]=r;for(e=1;e<=n.length;e++)for(r=1;r<=t.length;r++)n.charAt(e-1)===t.charAt(r-1)?h[e][r]=h[e-1][r-1]:h[e][r]=Math.min(h[e-1][r-1]+1,Math.min(h[e][r-1]+1,h[e-1][r]+1));return 100*(1-h[n.length][t.length]/Math.max(t.length,n.length))}"undefined"!=typeof window&&(window.levenshteinDistance=n),t.exports=n}},n={};!function e(r){var h=n[r];if(void 0!==h)return h.exports;var o=n[r]={exports:{}};return t[r](o,o.exports,e),o.exports}(83)})();
1
+ (()=>{var t={83(t){function n(t,n){if(0===t.length)return n.length;if(0===n.length)return t.length;var e,r,h=[];for(e=0;e<=n.length;e++)h[e]=[e];for(r=0;r<=t.length;r++)h[0][r]=r;for(e=1;e<=n.length;e++)for(r=1;r<=t.length;r++)n.charAt(e-1)===t.charAt(r-1)?h[e][r]=h[e-1][r-1]:h[e][r]=Math.min(h[e-1][r-1]+1,Math.min(h[e][r-1]+1,h[e-1][r]+1));return 100*(1-h[n.length][t.length]/Math.max(t.length,n.length))}"undefined"!=typeof window&&(window.levenshteinDistance=n),t.exports=n}},n={};!function e(r){var h=n[r];if(void 0!==h)return h.exports;var o=n[r]={exports:{}};return t[r](o,o.exports,e),o.exports}(83)})();
2
2
  //# sourceMappingURL=levenshtein-distance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"levenshtein-distance.js","mappings":"oBAMA,SAASA,EAAoBC,EAAGC,GAC5B,GAAiB,IAAbD,EAAEE,OAAc,OAAOD,EAAEC,OAC7B,GAAiB,IAAbD,EAAEC,OAAc,OAAOF,EAAEE,OAE7B,IAGIC,EAMAC,EATAC,EAAS,GAIb,IAAKF,EAAI,EAAGA,GAAKF,EAAEC,OAAQC,IACvBE,EAAOF,GAAK,CAACA,GAKjB,IAAKC,EAAI,EAAGA,GAAKJ,EAAEE,OAAQE,IACvBC,EAAO,GAAGD,GAAKA,EAInB,IAAKD,EAAI,EAAGA,GAAKF,EAAEC,OAAQC,IACvB,IAAKC,EAAI,EAAGA,GAAKJ,EAAEE,OAAQE,IACnBH,EAAEK,OAAOH,EAAI,KAAOH,EAAEM,OAAOF,EAAI,GACjCC,EAAOF,GAAGC,GAAKC,EAAOF,EAAI,GAAGC,EAAI,GAEjCC,EAAOF,GAAGC,GAAKG,KAAKC,IAAIH,EAAOF,EAAI,GAAGC,EAAI,GAAK,EAC3CG,KAAKC,IAAIH,EAAOF,GAAGC,EAAI,GAAK,EACxBC,EAAOF,EAAI,GAAGC,GAAK,IAMvC,OAA2E,KAAnE,EAAKC,EAAOJ,EAAEC,QAAQF,EAAEE,QAAUK,KAAKE,IAAIT,EAAEE,OAAQD,EAAEC,QACnE,CAGsB,oBAAXQ,SACPA,OAAOX,oBAAsBA,GAGjCY,EAAOC,QAAUb,C,GC7Cbc,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAM,EAAoBH,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCnB0BE,CAAoB,G","sources":["webpack://@lizardbyte/shared-web/./src/js/levenshtein-distance.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Calculate the levenshtein distance between two strings.\n * @param {string} a - The first string to compare.\n * @param {string} b - The second string to compare.\n * @returns {number|*} - The percentage of the levenshtein distance.\n */\nfunction levenshteinDistance(a, b) {\n if (a.length === 0) return b.length;\n if (b.length === 0) return a.length;\n\n let matrix = [];\n\n // increment along the first column of each row\n let i;\n for (i = 0; i <= b.length; i++) {\n matrix[i] = [i];\n }\n\n // increment each column in the first row\n let j;\n for (j = 0; j <= a.length; j++) {\n matrix[0][j] = j;\n }\n\n // Fill in the rest of the matrix\n for (i = 1; i <= b.length; i++) {\n for (j = 1; j <= a.length; j++) {\n if (b.charAt(i - 1) === a.charAt(j - 1)) {\n matrix[i][j] = matrix[i - 1][j - 1];\n } else {\n matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution\n Math.min(matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j] + 1)); // deletion\n }\n }\n }\n\n // return the percentage of the levenshtein distance\n return (1 - (matrix[b.length][a.length] / Math.max(a.length, b.length))) * 100\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.levenshteinDistance = levenshteinDistance;\n}\n\nmodule.exports = levenshteinDistance;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(83);\n"],"names":["levenshteinDistance","a","b","length","i","j","matrix","charAt","Math","min","max","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"levenshtein-distance.js","mappings":"mBAMA,SAASA,EAAoBC,EAAGC,GAC5B,GAAiB,IAAbD,EAAEE,OAAc,OAAOD,EAAEC,OAC7B,GAAiB,IAAbD,EAAEC,OAAc,OAAOF,EAAEE,OAE7B,IAGIC,EAMAC,EATAC,EAAS,GAIb,IAAKF,EAAI,EAAGA,GAAKF,EAAEC,OAAQC,IACvBE,EAAOF,GAAK,CAACA,GAKjB,IAAKC,EAAI,EAAGA,GAAKJ,EAAEE,OAAQE,IACvBC,EAAO,GAAGD,GAAKA,EAInB,IAAKD,EAAI,EAAGA,GAAKF,EAAEC,OAAQC,IACvB,IAAKC,EAAI,EAAGA,GAAKJ,EAAEE,OAAQE,IACnBH,EAAEK,OAAOH,EAAI,KAAOH,EAAEM,OAAOF,EAAI,GACjCC,EAAOF,GAAGC,GAAKC,EAAOF,EAAI,GAAGC,EAAI,GAEjCC,EAAOF,GAAGC,GAAKG,KAAKC,IAAIH,EAAOF,EAAI,GAAGC,EAAI,GAAK,EAC3CG,KAAKC,IAAIH,EAAOF,GAAGC,EAAI,GAAK,EACxBC,EAAOF,EAAI,GAAGC,GAAK,IAMvC,OAA2E,KAAnE,EAAKC,EAAOJ,EAAEC,QAAQF,EAAEE,QAAUK,KAAKE,IAAIT,EAAEE,OAAQD,EAAEC,QACnE,CAGsB,oBAAXQ,SACPA,OAAOX,oBAAsBA,GAGjCY,EAAOC,QAAUb,C,GC7Cbc,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAM,EAAoBH,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCnB0BE,CAAoB,G","sources":["webpack://@lizardbyte/shared-web/./src/js/levenshtein-distance.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Calculate the levenshtein distance between two strings.\n * @param {string} a - The first string to compare.\n * @param {string} b - The second string to compare.\n * @returns {number|*} - The percentage of the levenshtein distance.\n */\nfunction levenshteinDistance(a, b) {\n if (a.length === 0) return b.length;\n if (b.length === 0) return a.length;\n\n let matrix = [];\n\n // increment along the first column of each row\n let i;\n for (i = 0; i <= b.length; i++) {\n matrix[i] = [i];\n }\n\n // increment each column in the first row\n let j;\n for (j = 0; j <= a.length; j++) {\n matrix[0][j] = j;\n }\n\n // Fill in the rest of the matrix\n for (i = 1; i <= b.length; i++) {\n for (j = 1; j <= a.length; j++) {\n if (b.charAt(i - 1) === a.charAt(j - 1)) {\n matrix[i][j] = matrix[i - 1][j - 1];\n } else {\n matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution\n Math.min(matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j] + 1)); // deletion\n }\n }\n }\n\n // return the percentage of the levenshtein distance\n return (1 - (matrix[b.length][a.length] / Math.max(a.length, b.length))) * 100\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.levenshteinDistance = levenshteinDistance;\n}\n\nmodule.exports = levenshteinDistance;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(83);\n"],"names":["levenshteinDistance","a","b","length","i","j","matrix","charAt","Math","min","max","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"ignoreList":[],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"lizardbyte-css.css","mappings":"AAAA,KACG,iBAIH,eACI,oCACA,iBACA,oCACA,6BACA,4BAKJ,WACI,kBACA,UAGJ,QACI,gBACA,6BAGJ,cACI,kBAGJ,UACI,kBAGJ,aACI,eAGJ,SACI,mBACA,oCAGJ,cACI,mBACA,oCAGJ,wBACI,kBACA,SACA,WACA,aACA,6BACA,gEACA,UAGJ,2BACI,kBACA,SACA,WACA,aACA,6BACA,gEACA,UAGJ,2CACI,uBAGJ,mBACI,qCACA,sBACA,uBAGJ,YACI,eAGJ,qCACI,YACI,gBAIR,2DACI,YACE,gBAIN,YACI,eACA,iBACA,kBAGJ,qCACI,YACI,eACA,iBACA,mBAIR,2DACI,YACI,eACA,iBACA,mBAIR,SACE,oBACA,mBACA,uBACA,YACA,WACA,iBAGF,WACI,aACA,mBACA,6BAGJ,UACI,aACA,mBACA,6BAGJ,gBACI,YACA,qCAGJ,2DACI,gBACI,sCAIR,qCACI,gBACI,uCAKR,YACI,gBAGJ,gBACI,yBAGJ,sBACI,qBAIJ,aACE,qBACA,kC","sources":["webpack://@lizardbyte/shared-web/./src/css/lizardbyte.scss"],"sourcesContent":["body {\n padding-top: 80px;\n}\n\n/*Apply to elements that serve as anchors*/\n.offset-anchor {\n border-top: 80px solid transparent;\n margin: -80px 0 0;\n -webkit-background-clip: padding-box;\n -moz-background-clip: padding;\n background-clip: padding-box;\n}\n\n/*Because offset-anchor causes sections to overlap the bottom of previous ones,*/\n/*we need to put content higher so links aren't blocked by the transparent border.*/\n.container {\n position: relative;\n z-index: 1;\n}\n\n.navbar {\n min-height: 80px;\n border-bottom: 1px solid white;\n}\n\n.navbar-brand {\n font-size: 1.75rem;\n}\n\n.nav-link {\n font-size: 1.25rem;\n}\n\n.nav-link-sm {\n font-size: 1rem;\n}\n\n.bg-dark {\n --bs-bg-opacity: 1;\n background-color: #151515 !important;\n}\n\n.bg-dark-gray {\n --bs-bg-opacity: 1;\n background-color: #303436 !important;\n}\n\n.carousel-overlay-title {\n position: absolute;\n top: 20vh;\n right: 10vw;\n padding: 1rem;\n text-shadow: 2px 2px 5px black;\n user-select: none;\n z-index: 1;\n}\n\n.carousel-overlay-subtitle {\n position: absolute;\n top: 30vh;\n right: 10vw;\n padding: 1rem;\n text-shadow: 2px 2px 5px black;\n user-select: none;\n z-index: 1;\n}\n\n.carousel-item.active, .carousel-item .view {\n height: 50vh !important;\n}\n\n.carousel-item img {\n object-fit: cover;\n width:100% !important;\n height: 100% !important;\n}\n\n.content h1 {\n font-size: 55px;\n}\n\n@media screen and (max-width: 320px) {\n .content h1 {\n font-size: 30px;\n }\n}\n\n@media screen and (min-width: 321px) and (max-width: 768px) {\n .content h1 {\n font-size: 30px;\n }\n}\n\n.content h5 {\n font-size: 23px;\n margin-left: 80px;\n margin-right: 80px;\n}\n\n@media screen and (max-width: 320px) {\n .content h5 {\n font-size: 18px;\n margin-left: 20px;\n margin-right: 20px\n }\n}\n\n@media screen and (min-width: 321px) and (max-width: 768px) {\n .content h5 {\n font-size: 18px;\n margin-left: 20px;\n margin-right: 20px;\n }\n}\n\n.feature {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 3rem;\n width: 3rem;\n font-size: 1.5rem;\n}\n\n.widgetbot {\n display: flex;\n align-items: center;\n justify-content: space-around;\n}\n\n.feedback {\n display: flex;\n align-items: center;\n justify-content: space-around;\n}\n\niframe.feedback {\n width: 100vw;\n min-height: calc(100vh - 80px - 72px); /* subtract navbar and footer height */\n}\n\n@media screen and (min-width: 321px) and (max-width: 768px) {\n iframe.feedback {\n min-height: calc(100vh - 80px - 93px); /* subtract navbar and footer height */\n }\n}\n\n@media screen and (max-width: 320px) {\n iframe.feedback {\n min-height: calc(100vh - 80px - 114px); /* subtract navbar and footer height */\n }\n}\n\n/*card image hover*/\n.hover-zoom {\n overflow: hidden;\n}\n\n.hover-zoom img {\n transition: all 1.5s ease;\n}\n\n.hover-zoom:hover img {\n transform: scale(1.1);\n}\n\n/*custom text colors*/\n.text-purple {\n --bs-text-opacity: 1;\n color: var(--bs-purple) !important;\n}\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"lizardbyte-css.css","mappings":"AAAA,KACG,iBAIH,eACI,oCACA,iBACA,oCACA,6BACA,4BAKJ,WACI,kBACA,UAGJ,QACI,gBACA,6BAGJ,cACI,kBAGJ,UACI,kBAGJ,aACI,eAGJ,SACI,mBACA,oCAGJ,cACI,mBACA,oCAGJ,wBACI,kBACA,SACA,WACA,aACA,6BACA,gEACA,UAGJ,2BACI,kBACA,SACA,WACA,aACA,6BACA,gEACA,UAGJ,2CACI,uBAGJ,mBACI,qCACA,sBACA,uBAGJ,YACI,eAGJ,qCACI,YACI,gBAIR,2DACI,YACE,gBAIN,YACI,eACA,iBACA,kBAGJ,qCACI,YACI,eACA,iBACA,mBAIR,2DACI,YACI,eACA,iBACA,mBAIR,SACE,oBACA,mBACA,uBACA,YACA,WACA,iBAGF,WACI,aACA,mBACA,6BAGJ,UACI,aACA,mBACA,6BAGJ,gBACI,YACA,qCAGJ,2DACI,gBACI,sCAIR,qCACI,gBACI,uCAKR,YACI,gBAGJ,gBACI,yBAGJ,sBACI,qBAIJ,aACE,qBACA,kC","sources":["webpack://@lizardbyte/shared-web/./src/css/lizardbyte.scss"],"sourcesContent":["body {\n padding-top: 80px;\n}\n\n/*Apply to elements that serve as anchors*/\n.offset-anchor {\n border-top: 80px solid transparent;\n margin: -80px 0 0;\n -webkit-background-clip: padding-box;\n -moz-background-clip: padding;\n background-clip: padding-box;\n}\n\n/*Because offset-anchor causes sections to overlap the bottom of previous ones,*/\n/*we need to put content higher so links aren't blocked by the transparent border.*/\n.container {\n position: relative;\n z-index: 1;\n}\n\n.navbar {\n min-height: 80px;\n border-bottom: 1px solid white;\n}\n\n.navbar-brand {\n font-size: 1.75rem;\n}\n\n.nav-link {\n font-size: 1.25rem;\n}\n\n.nav-link-sm {\n font-size: 1rem;\n}\n\n.bg-dark {\n --bs-bg-opacity: 1;\n background-color: #151515 !important;\n}\n\n.bg-dark-gray {\n --bs-bg-opacity: 1;\n background-color: #303436 !important;\n}\n\n.carousel-overlay-title {\n position: absolute;\n top: 20vh;\n right: 10vw;\n padding: 1rem;\n text-shadow: 2px 2px 5px black;\n user-select: none;\n z-index: 1;\n}\n\n.carousel-overlay-subtitle {\n position: absolute;\n top: 30vh;\n right: 10vw;\n padding: 1rem;\n text-shadow: 2px 2px 5px black;\n user-select: none;\n z-index: 1;\n}\n\n.carousel-item.active, .carousel-item .view {\n height: 50vh !important;\n}\n\n.carousel-item img {\n object-fit: cover;\n width:100% !important;\n height: 100% !important;\n}\n\n.content h1 {\n font-size: 55px;\n}\n\n@media screen and (max-width: 320px) {\n .content h1 {\n font-size: 30px;\n }\n}\n\n@media screen and (min-width: 321px) and (max-width: 768px) {\n .content h1 {\n font-size: 30px;\n }\n}\n\n.content h5 {\n font-size: 23px;\n margin-left: 80px;\n margin-right: 80px;\n}\n\n@media screen and (max-width: 320px) {\n .content h5 {\n font-size: 18px;\n margin-left: 20px;\n margin-right: 20px\n }\n}\n\n@media screen and (min-width: 321px) and (max-width: 768px) {\n .content h5 {\n font-size: 18px;\n margin-left: 20px;\n margin-right: 20px;\n }\n}\n\n.feature {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 3rem;\n width: 3rem;\n font-size: 1.5rem;\n}\n\n.widgetbot {\n display: flex;\n align-items: center;\n justify-content: space-around;\n}\n\n.feedback {\n display: flex;\n align-items: center;\n justify-content: space-around;\n}\n\niframe.feedback {\n width: 100vw;\n min-height: calc(100vh - 80px - 72px); /* subtract navbar and footer height */\n}\n\n@media screen and (min-width: 321px) and (max-width: 768px) {\n iframe.feedback {\n min-height: calc(100vh - 80px - 93px); /* subtract navbar and footer height */\n }\n}\n\n@media screen and (max-width: 320px) {\n iframe.feedback {\n min-height: calc(100vh - 80px - 114px); /* subtract navbar and footer height */\n }\n}\n\n/*card image hover*/\n.hover-zoom {\n overflow: hidden;\n}\n\n.hover-zoom img {\n transition: all 1.5s ease;\n}\n\n.hover-zoom:hover img {\n transform: scale(1.1);\n}\n\n/*custom text colors*/\n.text-purple {\n --bs-text-opacity: 1;\n color: var(--bs-purple) !important;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (()=>{var n={836:n=>{function o(n,o){var r=document.createElement("script");r.src=n,r.async=!0,r.onload=function(){o&&o(null,r)},r.onerror=function(){o&&o(new Error("Failed to load script: ".concat(n)))},document.head.appendChild(r)}"undefined"!=typeof window&&(window.loadScript=o),n.exports=o}},o={};!function r(e){var t=o[e];if(void 0!==t)return t.exports;var c=o[e]={exports:{}};return n[e](c,c.exports,r),c.exports}(836)})();
1
+ (()=>{var n={836(n){function o(n,o){var r=document.createElement("script");r.src=n,r.async=!0,r.onload=function(){o&&o(null,r)},r.onerror=function(){o&&o(new Error("Failed to load script: ".concat(n)))},document.head.appendChild(r)}"undefined"!=typeof window&&(window.loadScript=o),n.exports=o}},o={};!function r(e){var t=o[e];if(void 0!==t)return t.exports;var c=o[e]={exports:{}};return n[e](c,c.exports,r),c.exports}(836)})();
2
2
  //# sourceMappingURL=load-script.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"load-script.js","mappings":"qBAKA,SAASA,EAAWC,EAAKC,GACrB,IAAMC,EAASC,SAASC,cAAc,UACtCF,EAAOG,IAAML,EACbE,EAAOI,OAAQ,EAEfJ,EAAOK,OAAS,WACRN,GAAUA,EAAS,KAAMC,EACjC,EAEAA,EAAOM,QAAU,WACTP,GAAUA,EAAS,IAAIQ,MAAM,0BAADC,OAA2BV,IAC/D,EAEAG,SAASQ,KAAKC,YAAYV,EAC9B,CAGsB,oBAAXW,SACPA,OAAOd,WAAaA,GAGxBe,EAAOC,QAAUhB,C,GCzBbiB,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAM,EAAoBH,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCnB0BE,CAAoB,I","sources":["webpack://@lizardbyte/shared-web/./src/js/load-script.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Load a script asynchronously, and add it to the DOM. Optionally, call a callback when the script has loaded.\n * @param {string} url The URL of the script to load.\n * @param {Function} callback An optional callback to call when the script has loaded.\n */\nfunction loadScript(url, callback) {\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n\n script.onload = () => {\n if (callback) callback(null, script);\n };\n\n script.onerror = () => {\n if (callback) callback(new Error(`Failed to load script: ${url}`));\n };\n\n document.head.appendChild(script);\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.loadScript = loadScript;\n}\n\nmodule.exports = loadScript;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(836);\n"],"names":["loadScript","url","callback","script","document","createElement","src","async","onload","onerror","Error","concat","head","appendChild","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"load-script.js","mappings":"oBAKA,SAASA,EAAWC,EAAKC,GACrB,IAAMC,EAASC,SAASC,cAAc,UACtCF,EAAOG,IAAML,EACbE,EAAOI,OAAQ,EAEfJ,EAAOK,OAAS,WACRN,GAAUA,EAAS,KAAMC,EACjC,EAEAA,EAAOM,QAAU,WACTP,GAAUA,EAAS,IAAIQ,MAAM,0BAADC,OAA2BV,IAC/D,EAEAG,SAASQ,KAAKC,YAAYV,EAC9B,CAGsB,oBAAXW,SACPA,OAAOd,WAAaA,GAGxBe,EAAOC,QAAUhB,C,GCzBbiB,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAM,EAAoBH,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCnB0BE,CAAoB,I","sources":["webpack://@lizardbyte/shared-web/./src/js/load-script.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Load a script asynchronously, and add it to the DOM. Optionally, call a callback when the script has loaded.\n * @param {string} url The URL of the script to load.\n * @param {Function} callback An optional callback to call when the script has loaded.\n */\nfunction loadScript(url, callback) {\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n\n script.onload = () => {\n if (callback) callback(null, script);\n };\n\n script.onerror = () => {\n if (callback) callback(new Error(`Failed to load script: ${url}`));\n };\n\n document.head.appendChild(script);\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.loadScript = loadScript;\n}\n\nmodule.exports = loadScript;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(836);\n"],"names":["loadScript","url","callback","script","document","createElement","src","async","onload","onerror","Error","concat","head","appendChild","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"ignoreList":[],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (()=>{var r={76:r=>{function n(r,n){return function(t,e){return t[r]>e[r]?-1:t[r]<e[r]||t[n]>e[n]?1:t[n]<e[n]?-1:0}}"undefined"!=typeof window&&(window.rankingSorter=n),r.exports=n}},n={};!function t(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,t),i.exports}(76)})();
1
+ (()=>{var r={76(r){function n(r,n){return function(t,e){return t[r]>e[r]?-1:t[r]<e[r]||t[n]>e[n]?1:t[n]<e[n]?-1:0}}"undefined"!=typeof window&&(window.rankingSorter=n),r.exports=n}},n={};!function t(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,t),i.exports}(76)})();
2
2
  //# sourceMappingURL=ranking-sorter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ranking-sorter.js","mappings":"oBAMA,SAASA,EAAcC,EAAUC,GAC7B,OAAO,SAASC,EAAGC,GACf,OAAID,EAAEF,GAAYG,EAAEH,IACR,EACDE,EAAEF,GAAYG,EAAEH,IAInBE,EAAED,GAAaE,EAAEF,GAHd,EAKIC,EAAED,GAAaE,EAAEF,IAChB,EAED,CAGnB,CACJ,CAGsB,oBAAXG,SACPA,OAAOL,cAAgBA,GAG3BM,EAAOC,QAAUP,C,GC7BbQ,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAM,EAAoBH,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCnB0BE,CAAoB,G","sources":["webpack://@lizardbyte/shared-web/./src/js/ranking-sorter.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Sorts an array of objects by two keys in descending order.\n * @param {string} firstKey The primary key to sort by.\n * @param {string} secondKey The secondary key to sort by, in case the first key is equal.\n * @returns {Function} The sorting function that returns a number.\n */\nfunction rankingSorter(firstKey, secondKey) {\n return function(a, b) {\n if (a[firstKey] > b[firstKey]) {\n return -1;\n } else if (a[firstKey] < b[firstKey]) {\n return 1;\n }\n else {\n if (a[secondKey] > b[secondKey]) {\n return 1;\n } else if (a[secondKey] < b[secondKey]) {\n return -1;\n } else {\n return 0;\n }\n }\n }\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.rankingSorter = rankingSorter;\n}\n\nmodule.exports = rankingSorter;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(76);\n"],"names":["rankingSorter","firstKey","secondKey","a","b","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"ranking-sorter.js","mappings":"mBAMA,SAASA,EAAcC,EAAUC,GAC7B,OAAO,SAASC,EAAGC,GACf,OAAID,EAAEF,GAAYG,EAAEH,IACR,EACDE,EAAEF,GAAYG,EAAEH,IAInBE,EAAED,GAAaE,EAAEF,GAHd,EAKIC,EAAED,GAAaE,EAAEF,IAChB,EAED,CAGnB,CACJ,CAGsB,oBAAXG,SACPA,OAAOL,cAAgBA,GAG3BM,EAAOC,QAAUP,C,GC7BbQ,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAM,EAAoBH,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCnB0BE,CAAoB,G","sources":["webpack://@lizardbyte/shared-web/./src/js/ranking-sorter.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Sorts an array of objects by two keys in descending order.\n * @param {string} firstKey The primary key to sort by.\n * @param {string} secondKey The secondary key to sort by, in case the first key is equal.\n * @returns {Function} The sorting function that returns a number.\n */\nfunction rankingSorter(firstKey, secondKey) {\n return function(a, b) {\n if (a[firstKey] > b[firstKey]) {\n return -1;\n } else if (a[firstKey] < b[firstKey]) {\n return 1;\n }\n else {\n if (a[secondKey] > b[secondKey]) {\n return 1;\n } else if (a[secondKey] < b[secondKey]) {\n return -1;\n } else {\n return 0;\n }\n }\n }\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.rankingSorter = rankingSorter;\n}\n\nmodule.exports = rankingSorter;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(76);\n"],"names":["rankingSorter","firstKey","secondKey","a","b","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"ignoreList":[],"sourceRoot":""}
package/dist/sleep.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var e={399:e=>{function r(e){return new Promise(function(r){return setTimeout(r,e)})}"undefined"!=typeof window&&(window.sleep=r),e.exports=r}},r={};!function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,n),i.exports}(399)})();
1
+ (()=>{var e={399(e){function r(e){return new Promise(function(r){return setTimeout(r,e)})}"undefined"!=typeof window&&(window.sleep=r),e.exports=r}},r={};!function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,n),i.exports}(399)})();
2
2
  //# sourceMappingURL=sleep.js.map
package/dist/sleep.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sleep.js","mappings":"qBAKA,SAASA,EAAMC,GACX,OAAO,IAAIC,QAAQ,SAAAC,GAAO,OAAIC,WAAWD,EAASF,EAAG,EACzD,CAGsB,oBAAXI,SACPA,OAAOL,MAAQA,GAGnBM,EAAOC,QAAUP,C,GCbbQ,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAM,EAAoBH,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCnB0BE,CAAoB,I","sources":["webpack://@lizardbyte/shared-web/./src/js/sleep.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Sleep for a given amount of time.\n * @param {number} ms The time to sleep in milliseconds.\n * @returns {Promise<unknown>} A promise that resolves after the given time.\n */\nfunction sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.sleep = sleep;\n}\n\nmodule.exports = sleep;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(399);\n"],"names":["sleep","ms","Promise","resolve","setTimeout","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"sleep.js","mappings":"oBAKA,SAASA,EAAMC,GACX,OAAO,IAAIC,QAAQ,SAAAC,GAAO,OAAIC,WAAWD,EAASF,EAAG,EACzD,CAGsB,oBAAXI,SACPA,OAAOL,MAAQA,GAGnBM,EAAOC,QAAUP,C,GCbbQ,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAM,EAAoBH,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCnB0BE,CAAoB,I","sources":["webpack://@lizardbyte/shared-web/./src/js/sleep.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Sleep for a given amount of time.\n * @param {number} ms The time to sleep in milliseconds.\n * @returns {Promise<unknown>} A promise that resolves after the given time.\n */\nfunction sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.sleep = sleep;\n}\n\nmodule.exports = sleep;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(399);\n"],"names":["sleep","ms","Promise","resolve","setTimeout","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"ignoreList":[],"sourceRoot":""}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/LizardByte/shared-web.git"
6
6
  },
7
- "version": "2025.1012.125516",
7
+ "version": "2026.125.235713",
8
8
  "description": "Shared web assets for LizardByte projects",
9
9
  "license": "AGPL-3.0-only",
10
10
  "funding": "https://app.lizardbyte.dev",
@@ -20,37 +20,37 @@
20
20
  "README.md"
21
21
  ],
22
22
  "dependencies": {
23
- "@fortawesome/fontawesome-free": "7.0.1",
23
+ "@fortawesome/fontawesome-free": "7.1.0",
24
24
  "bootstrap": "5.3.8"
25
25
  },
26
26
  "devDependencies": {
27
- "@babel/core": "7.28.4",
28
- "@babel/preset-env": "7.28.3",
27
+ "@babel/core": "7.28.6",
28
+ "@babel/preset-env": "7.28.6",
29
29
  "@codecov/webpack-plugin": "1.9.1",
30
- "@eslint/js": "9.36.0",
30
+ "@eslint/js": "9.39.2",
31
31
  "@jest/globals": "30.2.0",
32
32
  "babel-loader": "10.0.0",
33
33
  "clean-jsdoc-theme": "4.3.0",
34
- "cross-env": "10.0.0",
34
+ "cross-env": "10.1.0",
35
35
  "css-loader": "7.1.2",
36
- "eslint": "9.36.0",
37
- "eslint-plugin-jest": "29.0.1",
38
- "globals": "16.4.0",
36
+ "eslint": "9.39.2",
37
+ "eslint-plugin-jest": "29.12.1",
38
+ "globals": "17.1.0",
39
39
  "jest": "30.2.0",
40
40
  "jest-environment-jsdom": "30.2.0",
41
41
  "jest-junit": "16.0.0",
42
- "jsdoc": "4.0.4",
43
- "mini-css-extract-plugin": "2.9.4",
42
+ "jsdoc": "4.0.5",
43
+ "mini-css-extract-plugin": "2.10.0",
44
44
  "node-fetch": "3.3.2",
45
45
  "npm-run-all": "4.1.5",
46
46
  "postcss": "8.5.6",
47
47
  "postcss-loader": "8.2.0",
48
- "postcss-preset-env": "10.4.0",
49
- "sass": "1.93.2",
50
- "sass-loader": "16.0.5",
51
- "webpack": "5.101.3",
48
+ "postcss-preset-env": "11.1.2",
49
+ "sass": "1.97.3",
50
+ "sass-loader": "16.0.6",
51
+ "webpack": "5.104.1",
52
52
  "webpack-cli": "6.0.1",
53
- "webpack-dev-server": "5.2.2"
53
+ "webpack-dev-server": "5.2.3"
54
54
  },
55
55
  "jest": {
56
56
  "collectCoverageFrom": [
package/dist/discord.js DELETED
@@ -1,3 +0,0 @@
1
- /*! For license information please see discord.js.LICENSE.txt */
2
- (()=>{var t={300:(t,n,e)=>{var r=e(836),o=e(748).fetchRandomQuote;function i(t,n){var e=t.quote_safe||t.quote;n.notify(e)}function a(){r("https://cdn.jsdelivr.net/npm/@widgetbot/crate@3",function(){var t=new Crate({server:"804382334370578482",channel:"804383092822900797",defer:!1}),n=document.createElement("style");n.innerHTML="\n widgetbot-crate {\n position: fixed !important;\n }\n ",document.head.appendChild(n),o().then(function(n){setTimeout(function(){t&&i(n,t)},42e4)})})}"undefined"!=typeof window&&(window.initDiscord=a),t.exports={initDiscord:a,randomQuote:i}},748:t=>{function n(){var t,r,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.toStringTag||"@@toStringTag";function c(n,o,i,a){var c=o&&o.prototype instanceof f?o:f,p=Object.create(c.prototype);return e(p,"_invoke",function(n,e,o){var i,a,c,f=0,p=o||[],s=!1,d={p:0,n:0,v:t,a:l,f:l.bind(t,4),d:function(n,e){return i=n,a=0,c=t,d.n=e,u}};function l(n,e){for(a=n,c=e,r=0;!s&&f&&!o&&r<p.length;r++){var o,i=p[r],l=d.p,v=i[2];n>3?(o=v===e)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=l&&((o=n<2&&l<i[1])?(a=0,d.v=e,d.n=i[1]):l<v&&(o=n<3||i[0]>e||e>v)&&(i[4]=n,i[5]=e,d.n=v,a=0))}if(o||n>1)return u;throw s=!0,e}return function(o,p,v){if(f>1)throw TypeError("Generator is already running");for(s&&1===p&&l(p,v),a=p,c=v;(r=a<2?t:c)||!s;){i||(a?a<3?(a>1&&(d.n=-1),l(a,c)):d.n=c:d.v=c);try{if(f=2,i){if(a||(o="next"),r=i[o]){if(!(r=r.call(i,c)))throw TypeError("iterator result is not an object");if(!r.done)return r;c=r.value,a<2&&(a=0)}else 1===a&&(r=i.return)&&r.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((r=(s=d.n<0)?c:n.call(e,d))!==u)break}catch(n){i=t,a=1,c=n}finally{f=1}}return{value:r,done:s}}}(n,i,a),!0),p}var u={};function f(){}function p(){}function s(){}r=Object.getPrototypeOf;var d=[][i]?r(r([][i]())):(e(r={},i,function(){return this}),r),l=s.prototype=f.prototype=Object.create(d);function v(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,e(t,a,"GeneratorFunction")),t.prototype=Object.create(l),t}return p.prototype=s,e(l,"constructor",s),e(s,"constructor",p),p.displayName="GeneratorFunction",e(s,a,"GeneratorFunction"),e(l),e(l,a,"Generator"),e(l,i,function(){return this}),e(l,"toString",function(){return"[object Generator]"}),(n=function(){return{w:c,m:v}})()}function e(t,n,r,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}e=function(t,n,r,o){function a(n,r){e(t,n,function(t){return this._invoke(n,r,t)})}n?i?i(t,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):t[n]=r:(a("next",0),a("throw",1),a("return",2))},e(t,n,r,o)}function r(t,n,e,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?n(u):Promise.resolve(u).then(r,o)}var o=null;function i(){var t;return t=n().m(function t(){var e;return n().w(function(t){for(;;)switch(t.n){case 0:if(o){t.n=3;break}return t.n=1,fetch("https://app.lizardbyte.dev/uno/random-quotes/games.json");case 1:return e=t.v,t.n=2,e.json();case 2:o=t.v;case 3:return t.a(2,o[Math.floor(Math.random()*o.length)])}},t)}),i=function(){var n=this,e=arguments;return new Promise(function(o,i){var a=t.apply(n,e);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)})},i.apply(this,arguments)}t.exports={fetchRandomQuote:function(){return i.apply(this,arguments)},resetQuoteCache:function(){o=null}}},836:t=>{function n(t,n){var e=document.createElement("script");e.src=t,e.async=!0,e.onload=function(){n&&n(null,e)},e.onerror=function(){n&&n(new Error("Failed to load script: ".concat(t)))},document.head.appendChild(e)}"undefined"!=typeof window&&(window.loadScript=n),t.exports=n}},n={};!function e(r){var o=n[r];if(void 0!==o)return o.exports;var i=n[r]={exports:{}};return t[r](i,i.exports,e),i.exports}(300)})();
3
- //# sourceMappingURL=discord.js.map
@@ -1 +0,0 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
@@ -1 +0,0 @@
1
- {"version":3,"file":"discord.js","mappings":";2BAIA,IAAMA,EAAaC,EAAQ,KACnBC,EAAqBD,EAAQ,KAA7BC,iBAOR,SAASC,EAAYC,EAAOC,GACxB,IAAIC,EAAYF,EAAkB,YAAKA,EAAa,MACpDC,EAAME,OAAOD,EACjB,CAKA,SAASE,IACLR,EAAW,kDAAmD,WAC1D,IAAIS,EAAY,IAAIC,MAAM,CACtBC,OAAQ,qBACRC,QAAS,qBACTC,OAAO,IAILC,EAAQC,SAASC,cAAc,SACrCF,EAAMG,UAAY,wGAKlBF,SAASG,KAAKC,YAAYL,GAG1BZ,IAAmBkB,KAAK,SAAAhB,GACpBiB,WAAW,WACHZ,GACAN,EAAYC,EAAOK,EAE3B,EAAG,KACP,EACJ,EACJ,CAGsB,oBAAXa,SACPA,OAAOd,YAAcA,GAGzBe,EAAOC,QAAU,CACbhB,YAAAA,EACAL,YAAAA,E,uBCtDJ,IAAAsB,EAAAC,EAAAC,EAAA,mBAAAC,OAAAA,OAAA,GAAAC,EAAAF,EAAAG,UAAA,aAAAC,EAAAJ,EAAAK,aAAA,yBAAAC,EAAAN,EAAAE,EAAAE,EAAAE,GAAA,IAAAC,EAAAL,GAAAA,EAAAM,qBAAAC,EAAAP,EAAAO,EAAAC,EAAAC,OAAAC,OAAAL,EAAAC,WAAA,OAAAK,EAAAH,EAAA,mBAAAV,EAAAE,EAAAE,GAAA,IAAAE,EAAAC,EAAAG,EAAAI,EAAA,EAAAC,EAAAX,GAAA,GAAAY,GAAA,EAAAC,EAAA,CAAAF,EAAA,EAAAb,EAAA,EAAAgB,EA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,IAAAe,EAAAjB,EAAAsD,MAAAzD,EAAAD,GAAA,SAAA2D,EAAAvD,GAAAwC,EAAAvB,EAAAnB,EAAAI,EAAAqD,EAAAC,EAAA,OAAAxD,EAAA,UAAAwD,EAAAxD,GAAAwC,EAAAvB,EAAAnB,EAAAI,EAAAqD,EAAAC,EAAA,QAAAxD,EAAA,CAAAuD,OAAA,MAWCX,EAAAU,MAAA,KAAAD,UAAA,CASD3D,EAAOC,QAAU,CACbtB,iBApBJ,WAI+B,OAAAuE,EAAAU,MAAC,KAADD,UAAA,EAiB3BI,gBANJ,WACId,EAAa,IACjB,E,UCdA,SAASxE,EAAWuF,EAAKC,GACrB,IAAMC,EAAS1E,SAASC,cAAc,UACtCyE,EAAOC,IAAMH,EACbE,EAAOE,OAAQ,EAEfF,EAAOG,OAAS,WACRJ,GAAUA,EAAS,KAAMC,EACjC,EAEAA,EAAOI,QAAU,WACTL,GAAUA,EAAS,IAAIM,MAAM,0BAADC,OAA2BR,IAC/D,EAEAxE,SAASG,KAAKC,YAAYsE,EAC9B,CAGsB,oBAAXnE,SACPA,OAAOtB,WAAaA,GAGxBuB,EAAOC,QAAUxB,C,GCzBbgG,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAa3E,QAGrB,IAAID,EAASyE,EAAyBE,GAAY,CAGjD1E,QAAS,CAAC,GAOX,OAHA6E,EAAoBH,GAAU3E,EAAQA,EAAOC,QAASyE,GAG/C1E,EAAOC,OACf,CCnB0ByE,CAAoB,I","sources":["webpack://@lizardbyte/shared-web/./src/js/discord.js","webpack://@lizardbyte/shared-web/./src/js/random-quote.js","webpack://@lizardbyte/shared-web/./src/js/load-script.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/* global Crate */\n// Crate is not defined... can we use npm version?\n// https://github.com/widgetbot-io/crate/issues/26\n\nconst loadScript = require('./load-script');\nconst { fetchRandomQuote } = require('./random-quote');\n\n/**\n * Notify the user with a random quote.\n * @param {Object} quote - The quote object.\n * @param {Crate} crate - The Crate object.\n */\nfunction randomQuote(quote, crate) {\n let the_quote = quote['quote_safe'] || quote['quote'];\n crate.notify(the_quote);\n}\n\n/**\n * Initialize the Discord widget.\n */\nfunction initDiscord() {\n loadScript('https://cdn.jsdelivr.net/npm/@widgetbot/crate@3', function() {\n let widgetbot = new Crate({\n server: '804382334370578482',\n channel: '804383092822900797',\n defer: false,\n });\n\n // Apply CSS position change directly in JavaScript\n const style = document.createElement('style');\n style.innerHTML = `\n widgetbot-crate {\n position: fixed !important;\n }\n `;\n document.head.appendChild(style);\n\n // get random video game quotes and notify the user on Widgetbot after 7 minutes\n fetchRandomQuote().then(quote => {\n setTimeout(() => {\n if (widgetbot) {\n randomQuote(quote, widgetbot);\n }\n }, 7 * 60 * 1000);\n });\n });\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.initDiscord = initDiscord;\n}\n\nmodule.exports = {\n initDiscord,\n randomQuote,\n};\n","let quoteCache = null;\n\n/**\n * Fetch a random quote from our API.\n * @returns {Promise<*>} A promise that resolves with a random quote\n */\nasync function fetchRandomQuote() {\n if (!quoteCache) {\n const response = await fetch('https://app.lizardbyte.dev/uno/random-quotes/games.json');\n quoteCache = await response.json();\n }\n return quoteCache[Math.floor(Math.random() * quoteCache.length)];\n}\n\n/**\n * Reset the quote cache.\n */\nfunction resetQuoteCache() {\n quoteCache = null;\n}\n\nmodule.exports = {\n fetchRandomQuote,\n resetQuoteCache,\n};\n","/**\n * Load a script asynchronously, and add it to the DOM. Optionally, call a callback when the script has loaded.\n * @param {string} url The URL of the script to load.\n * @param {Function} callback An optional callback to call when the script has loaded.\n */\nfunction loadScript(url, callback) {\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n\n script.onload = () => {\n if (callback) callback(null, script);\n };\n\n script.onerror = () => {\n if (callback) callback(new Error(`Failed to load script: ${url}`));\n };\n\n document.head.appendChild(script);\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.loadScript = loadScript;\n}\n\nmodule.exports = loadScript;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(300);\n"],"names":["loadScript","require","fetchRandomQuote","randomQuote","quote","crate","the_quote","notify","initDiscord","widgetbot","Crate","server","channel","defer","style","document","createElement","innerHTML","head","appendChild","then","setTimeout","window","module","exports","e","t","r","Symbol","n","iterator","o","toStringTag","i","c","prototype","Generator","u","Object","create","_regeneratorDefine2","f","p","y","G","v","a","d","bind","length","l","TypeError","call","done","value","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","__proto__","displayName","_regenerator","w","m","defineProperty","_invoke","enumerable","configurable","writable","asyncGeneratorStep","Promise","resolve","quoteCache","_fetchRandomQuote","_callee","response","_context","fetch","json","Math","floor","random","arguments","apply","_next","_throw","resetQuoteCache","url","callback","script","src","async","onload","onerror","Error","concat","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
@@ -1,3 +0,0 @@
1
- /*! For license information please see random-quote.js.LICENSE.txt */
2
- (()=>{var t={748:t=>{function r(){var t,e,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function a(r,o,i,u){var a=o&&o.prototype instanceof f?o:f,p=Object.create(a.prototype);return n(p,"_invoke",function(r,n,o){var i,u,a,f=0,p=o||[],s=!1,l={p:0,n:0,v:t,a:v,f:v.bind(t,4),d:function(r,n){return i=r,u=0,a=t,l.n=n,c}};function v(r,n){for(u=r,a=n,e=0;!s&&f&&!o&&e<p.length;e++){var o,i=p[e],v=l.p,h=i[2];r>3?(o=h===n)&&(a=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=v&&((o=r<2&&v<i[1])?(u=0,l.v=n,l.n=i[1]):v<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,l.n=h,u=0))}if(o||r>1)return c;throw s=!0,n}return function(o,p,h){if(f>1)throw TypeError("Generator is already running");for(s&&1===p&&v(p,h),u=p,a=h;(e=u<2?t:a)||!s;){i||(u?u<3?(u>1&&(l.n=-1),v(u,a)):l.n=a:l.v=a);try{if(f=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(s=l.n<0)?a:r.call(n,l))!==c)break}catch(r){i=t,u=1,a=r}finally{f=1}}return{value:e,done:s}}}(r,i,u),!0),p}var c={};function f(){}function p(){}function s(){}e=Object.getPrototypeOf;var l=[][i]?e(e([][i]())):(n(e={},i,function(){return this}),e),v=s.prototype=f.prototype=Object.create(l);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,n(t,u,"GeneratorFunction")),t.prototype=Object.create(v),t}return p.prototype=s,n(v,"constructor",s),n(s,"constructor",p),p.displayName="GeneratorFunction",n(s,u,"GeneratorFunction"),n(v),n(v,u,"Generator"),n(v,i,function(){return this}),n(v,"toString",function(){return"[object Generator]"}),(r=function(){return{w:a,m:h}})()}function n(t,r,e,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}n=function(t,r,e,o){function u(r,e){n(t,r,function(t){return this._invoke(r,e,t)})}r?i?i(t,r,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[r]=e:(u("next",0),u("throw",1),u("return",2))},n(t,r,e,o)}function e(t,r,n,e,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?r(c):Promise.resolve(c).then(e,o)}var o=null;function i(){var t;return t=r().m(function t(){var n;return r().w(function(t){for(;;)switch(t.n){case 0:if(o){t.n=3;break}return t.n=1,fetch("https://app.lizardbyte.dev/uno/random-quotes/games.json");case 1:return n=t.v,t.n=2,n.json();case 2:o=t.v;case 3:return t.a(2,o[Math.floor(Math.random()*o.length)])}},t)}),i=function(){var r=this,n=arguments;return new Promise(function(o,i){var u=t.apply(r,n);function a(t){e(u,o,i,a,c,"next",t)}function c(t){e(u,o,i,a,c,"throw",t)}a(void 0)})},i.apply(this,arguments)}t.exports={fetchRandomQuote:function(){return i.apply(this,arguments)},resetQuoteCache:function(){o=null}}}},r={};!function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}(748)})();
3
- //# sourceMappingURL=random-quote.js.map
@@ -1 +0,0 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
@@ -1 +0,0 @@
1
- {"version":3,"file":"random-quote.js","mappings":";kCACA,IAAAA,EAAAC,EAAAC,EAAA,mBAAAC,OAAAA,OAAA,GAAAC,EAAAF,EAAAG,UAAA,aAAAC,EAAAJ,EAAAK,aAAA,yBAAAC,EAAAN,EAAAE,EAAAE,EAAAE,GAAA,IAAAC,EAAAL,GAAAA,EAAAM,qBAAAC,EAAAP,EAAAO,EAAAC,EAAAC,OAAAC,OAAAL,EAAAC,WAAA,OAAAK,EAAAH,EAAA,mBAAAV,EAAAE,EAAAE,GAAA,IAAAE,EAAAC,EAAAG,E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AAA0B,EAAA,GAGpED,EAbA,eAAAhD,EAAA,KAAAD,EAAA0D,UAAA,WAAAb,QAAA,SAAA3C,EAAAI,GAAA,IAAAe,EAAAjB,EAAAuD,MAAA1D,EAAAD,GAAA,SAAA4D,EAAAxD,GAAAwC,EAAAvB,EAAAnB,EAAAI,EAAAsD,EAAAC,EAAA,OAAAzD,EAAA,UAAAyD,EAAAzD,GAAAwC,EAAAvB,EAAAnB,EAAAI,EAAAsD,EAAAC,EAAA,QAAAzD,EAAA,CAAAwD,OAAA,MAWCX,EAAAU,MAAA,KAAAD,UAAA,CASDI,EAAOC,QAAU,CACbC,iBApBJ,WAI+B,OAAAf,EAAAU,MAAC,KAADD,UAAA,EAiB3BO,gBANJ,WACIjB,EAAa,IACjB,E,GClBIkB,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaN,QAGrB,IAAID,EAASI,EAAyBE,GAAY,CAGjDL,QAAS,CAAC,GAOX,OAHAQ,EAAoBH,GAAUN,EAAQA,EAAOC,QAASI,GAG/CL,EAAOC,OACf,CCnB0BI,CAAoB,I","sources":["webpack://@lizardbyte/shared-web/./src/js/random-quote.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["let quoteCache = null;\n\n/**\n * Fetch a random quote from our API.\n * @returns {Promise<*>} A promise that resolves with a random quote\n */\nasync function fetchRandomQuote() {\n if (!quoteCache) {\n const response = await fetch('https://app.lizardbyte.dev/uno/random-quotes/games.json');\n quoteCache = await response.json();\n }\n return quoteCache[Math.floor(Math.random() * quoteCache.length)];\n}\n\n/**\n * Reset the quote cache.\n */\nfunction resetQuoteCache() {\n quoteCache = null;\n}\n\nmodule.exports = {\n fetchRandomQuote,\n resetQuoteCache,\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(748);\n"],"names":["e","t","r","Symbol","n","iterator","o","toStringTag","i","c","prototype","Generator","u","Object","create","_regeneratorDefine2","f","p","y","G","v","a","d","bind","length","l","TypeError","call","done","value","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","__proto__","displayName","_regenerator","w","m","defineProperty","_invoke","enumerable","configurable","writable","asyncGeneratorStep","Promise","resolve","then","quoteCache","_fetchRandomQuote","_callee","response","_context","fetch","json","Math","floor","random","arguments","apply","_next","_throw","module","exports","fetchRandomQuote","resetQuoteCache","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
package/src/js/discord.js DELETED
@@ -1,57 +0,0 @@
1
- /* global Crate */
2
- // Crate is not defined... can we use npm version?
3
- // https://github.com/widgetbot-io/crate/issues/26
4
-
5
- const loadScript = require('./load-script');
6
- const { fetchRandomQuote } = require('./random-quote');
7
-
8
- /**
9
- * Notify the user with a random quote.
10
- * @param {Object} quote - The quote object.
11
- * @param {Crate} crate - The Crate object.
12
- */
13
- function randomQuote(quote, crate) {
14
- let the_quote = quote['quote_safe'] || quote['quote'];
15
- crate.notify(the_quote);
16
- }
17
-
18
- /**
19
- * Initialize the Discord widget.
20
- */
21
- function initDiscord() {
22
- loadScript('https://cdn.jsdelivr.net/npm/@widgetbot/crate@3', function() {
23
- let widgetbot = new Crate({
24
- server: '804382334370578482',
25
- channel: '804383092822900797',
26
- defer: false,
27
- });
28
-
29
- // Apply CSS position change directly in JavaScript
30
- const style = document.createElement('style');
31
- style.innerHTML = `
32
- widgetbot-crate {
33
- position: fixed !important;
34
- }
35
- `;
36
- document.head.appendChild(style);
37
-
38
- // get random video game quotes and notify the user on Widgetbot after 7 minutes
39
- fetchRandomQuote().then(quote => {
40
- setTimeout(() => {
41
- if (widgetbot) {
42
- randomQuote(quote, widgetbot);
43
- }
44
- }, 7 * 60 * 1000);
45
- });
46
- });
47
- }
48
-
49
- // Expose to the global scope
50
- if (typeof window !== 'undefined') {
51
- window.initDiscord = initDiscord;
52
- }
53
-
54
- module.exports = {
55
- initDiscord,
56
- randomQuote,
57
- };
@@ -1,25 +0,0 @@
1
- let quoteCache = null;
2
-
3
- /**
4
- * Fetch a random quote from our API.
5
- * @returns {Promise<*>} A promise that resolves with a random quote
6
- */
7
- async function fetchRandomQuote() {
8
- if (!quoteCache) {
9
- const response = await fetch('https://app.lizardbyte.dev/uno/random-quotes/games.json');
10
- quoteCache = await response.json();
11
- }
12
- return quoteCache[Math.floor(Math.random() * quoteCache.length)];
13
- }
14
-
15
- /**
16
- * Reset the quote cache.
17
- */
18
- function resetQuoteCache() {
19
- quoteCache = null;
20
- }
21
-
22
- module.exports = {
23
- fetchRandomQuote,
24
- resetQuoteCache,
25
- };
@@ -1,56 +0,0 @@
1
- import {
2
- describe,
3
- expect,
4
- it,
5
- jest,
6
- } from '@jest/globals';
7
-
8
- const { initDiscord, randomQuote } = require('../src/js/discord');
9
- const loadScript = require('../src/js/load-script');
10
- const { fetchRandomQuote } = require('../src/js/random-quote');
11
-
12
- jest.mock('../src/js/load-script');
13
- jest.mock('../src/js/random-quote');
14
-
15
- describe('initDiscord', () => {
16
- it('should load the script and get a random quote', () => {
17
- jest.useFakeTimers();
18
- const mockCrate = {
19
- notify: jest.fn()
20
- };
21
- global.Crate = jest.fn(() => mockCrate);
22
-
23
- loadScript.mockImplementation((url, callback) => {
24
- callback();
25
- });
26
-
27
- fetchRandomQuote.mockResolvedValue({
28
- quote: 'Test quote',
29
- quote_safe: 'Test quote safe'
30
- });
31
-
32
- initDiscord();
33
-
34
- expect(global.Crate).toHaveBeenCalledWith({
35
- server: '804382334370578482',
36
- channel: '804383092822900797',
37
- defer: false,
38
- });
39
-
40
- // advance timers
41
- jest.advanceTimersByTime(7 * 60 * 1000);
42
-
43
- expect(fetchRandomQuote).toHaveBeenCalled();
44
- });
45
- });
46
-
47
- describe('randomQuote', () => {
48
- it('should notify the user with the quote', () => {
49
- const mockCrate = {
50
- notify: jest.fn()
51
- };
52
-
53
- randomQuote({quote_safe: 'Test quote'}, mockCrate);
54
- expect(mockCrate.notify).toHaveBeenCalledWith('Test quote');
55
- });
56
- });
@@ -1,77 +0,0 @@
1
- import {
2
- afterEach,
3
- beforeEach,
4
- describe,
5
- expect,
6
- it,
7
- jest,
8
- } from '@jest/globals';
9
-
10
- const { fetchRandomQuote, resetQuoteCache } = require('../src/js/random-quote');
11
-
12
- describe('fetchRandomQuote', () => {
13
- let originalFetch;
14
-
15
- beforeEach(() => {
16
- // Save the original fetch function
17
- originalFetch = globalThis.fetch;
18
- // Clear the quote cache before each test
19
- jest.resetModules();
20
- // Reset the quotesCache
21
- resetQuoteCache();
22
- });
23
-
24
- afterEach(() => {
25
- // Restore the original fetch function
26
- globalThis.fetch = originalFetch;
27
- });
28
-
29
- it('should fetch and return a random quote', async () => {
30
- const mockQuotes = [
31
- { quote: 'Quote 1' },
32
- { quote: 'Quote 2' },
33
- { quote: 'Quote 3' }
34
- ];
35
-
36
- globalThis.fetch = jest.fn(() =>
37
- Promise.resolve({
38
- json: () => Promise.resolve(mockQuotes)
39
- })
40
- );
41
-
42
- const quote = await fetchRandomQuote();
43
- expect(mockQuotes).toContainEqual(quote);
44
- expect(globalThis.fetch).toHaveBeenCalledTimes(1);
45
- });
46
-
47
- it('should return a cached quote if already fetched', async () => {
48
- const mockQuotes = [
49
- { quote: 'Quote 1' },
50
- { quote: 'Quote 2' },
51
- { quote: 'Quote 3' }
52
- ];
53
-
54
- globalThis.fetch = jest.fn(() =>
55
- Promise.resolve({
56
- json: () => Promise.resolve(mockQuotes)
57
- })
58
- );
59
-
60
- // First call to populate the cache
61
- await fetchRandomQuote();
62
- // Second call should use the cache
63
- const quote = await fetchRandomQuote();
64
-
65
- expect(mockQuotes).toContainEqual(quote);
66
- expect(globalThis.fetch).toHaveBeenCalledTimes(1);
67
- });
68
-
69
- it('should handle fetch errors gracefully', async () => {
70
- globalThis.fetch = jest.fn(() =>
71
- Promise.reject(new Error('Failed to fetch'))
72
- );
73
-
74
- await expect(fetchRandomQuote()).rejects.toThrow('Failed to fetch');
75
- expect(globalThis.fetch).toHaveBeenCalledTimes(1);
76
- });
77
- });