zois-core 1.1.6 → 1.1.7
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/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import a from"./styles.css";import{findModByName as l,registerMod as u}from"./modsApi";import{initVirtualDOM as g,useToastsStore as d,useDialogStore as f}from"./popups";import{version as v}from"../package.json";let m;function C(e){if(!window.ZOISCORE){const t=document.createElement("style");t.innerHTML=a,document.head.append(t),window.ZOISCORE=Object.freeze({loaded:!0,useToastsStore:d,useDialogStore:f}),g()}m={...e},u()}function c(e){return new Promise(t=>setTimeout(t,e))}async function p(e,t=()=>!1){for(;!e();){if(t())return!1;await c(10)}return!0}function h(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}function x(e,t){const r=e.split("."),o=t.split(".");for(let n=0;n<Math.max(r.length,o.length);n++){const i=parseInt(r[n]||"0",10),s=parseInt(o[n]||"0",10);if(i>s)return!0;if(i<s)return!1}return!1}function
|
|
1
|
+
import a from"./styles.css";import{findModByName as l,registerMod as u}from"./modsApi";import{initVirtualDOM as g,useToastsStore as d,useDialogStore as f}from"./popups";import{version as v}from"../package.json";let m;function C(e){if(!window.ZOISCORE){const t=document.createElement("style");t.innerHTML=a,document.head.append(t),window.ZOISCORE=Object.freeze({loaded:!0,useToastsStore:d,useDialogStore:f}),g()}m={...e},u()}function c(e){return new Promise(t=>setTimeout(t,e))}async function p(e,t=()=>!1){for(;!e();){if(t())return!1;await c(10)}return!0}function h(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}function x(e,t){const r=e.split("."),o=t.split(".");for(let n=0;n<Math.max(r.length,o.length);n++){const i=parseInt(r[n]||"0",10),s=parseInt(o[n]||"0",10);if(i>s)return!0;if(i<s)return!1}return!1}function w(e,t){return!e&&!t||!e&&t==="Default"||!t&&e==="Default"||e==="Default"&&Array.isArray(t)&&t.filter(r=>r==="Default").length===t.length||t==="Default"&&Array.isArray(e)&&e.filter(r=>r==="Default").length===e.length?!0:JSON.stringify(e)===JSON.stringify(t)}function D(e){return typeof e=="string"?Math.round(new TextEncoder().encode(e).byteLength/100)/10:Math.round(new TextEncoder().encode(JSON.stringify(e)).byteLength/100)/10}function T(e){if(e)return ChatRoomCharacter.find(t=>t.MemberNumber==e||t.Name.toLowerCase()===e||t.Nickname?.toLowerCase()===e)}function N(e){return CharacterNickname(e)}function S(){if(!l("Themed"))return null;const e=JSON.parse(LZString.decompressFromBase64(Player.ExtensionSettings.Themed??""));return!e?.GlobalModule?.themedEnabled||!e?.GlobalModule?.doVanillaGuiOverhaul?null:e.ColorsModule}function O(e){const t=document.createElement("style");t.innerHTML=e,document.head.append(t)}function P(e){p(()=>typeof window.Player?.MemberNumber=="number").then(()=>setTimeout(e,h(3e3,6e3)))}export{m as MOD_DATA,w as colorsEqual,N as getNickname,T as getPlayer,h as getRandomNumber,D as getSizeInKbytes,S as getThemedColorsModule,O as injectStyles,x as isVersionNewer,C as registerCore,c as sleep,v as version,p as waitFor,P as waitForStart};
|