Greasy Fork is available in English.

🐭️ MouseHunt Improved

Improve your MouseHunt experience. Please only use this when the extension is not available.

질문, 리뷰하거나, 이 스크립트를 신고하세요.
// ==UserScript==
// @name        🐭️ MouseHunt Improved
// @description Improve your MouseHunt experience. Please only use this when the extension is not available.
// @version     0.69.1
// @license     MIT
// @author      bradp
// @namespace   bradp
// @match       https://www.mousehuntgame.com/*
// @icon        https://i.mouse.rip/mh-improved/icon-64.png
// @run-at      document-end
// @grant       none
// ==/UserScript==
const mhImprovedVersion = '0.69.1';
const mhImprovedPlatform = 'userscript';
var mhui = (() => {
var __create = Object.create;
var __defProp = Object.defineProperty, __defProps = Object.defineProperties, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropDescs = Object.getOwnPropertyDescriptors, __getOwnPropNames = Object.getOwnPropertyNames, __getOwnPropSymbols = Object.getOwnPropertySymbols, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value, __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
__hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b))
__propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);
return a;
}, __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __esm = (fn, res) => function() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __commonJS = (cb, mod) => function() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: !0 });
}, __copyProps = (to, from, except, desc) => {
if (from && typeof from == "object" || typeof from == "function")
for (let key of __getOwnPropNames(from))
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
));
var __async = (__this, __arguments, generator) => new Promise((resolve, reject2) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject2(e);
}
}, rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject2(e);
}
}, step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
function isBuiltin(wat, className) {
return objectToString.call(wat) === `[object ${className}]`;
}
function isPlainObject(wat) {
return isBuiltin(wat, "Object");
}
function isThenable(wat) {
return !!(wat && wat.then && typeof wat.then == "function");
}
var objectToString, init_is = __esm({
"node_modules/@sentry/utils/build/esm/is.js"() {
objectToString = Object.prototype.toString;
}
});
var SDK_VERSION, init_version = __esm({
"node_modules/@sentry/utils/build/esm/version.js"() {
SDK_VERSION = "8.33.1";
}
});
function getGlobalSingleton(name, creator, obj) {
let gbl = obj || GLOBAL_OBJ, __SENTRY__ = gbl.__SENTRY__ = gbl.__SENTRY__ || {}, versionedCarrier = __SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {};
return versionedCarrier[name] || (versionedCarrier[name] = creator());
}
var GLOBAL_OBJ, init_worldwide = __esm({
"node_modules/@sentry/utils/build/esm/worldwide.js"() {
init_version();
GLOBAL_OBJ = globalThis;
}
});
var DEBUG_BUILD, init_debug_build = __esm({
"node_modules/@sentry/utils/build/esm/debug-build.js"() {
DEBUG_BUILD = typeof __SENTRY_DEBUG__ == "undefined" || __SENTRY_DEBUG__;
}
});
function consoleSandbox(callback) {
if (!("console" in GLOBAL_OBJ))
return callback();
let console2 = GLOBAL_OBJ.console, wrappedFuncs = {}, wrappedLevels = Object.keys(originalConsoleMethods);
wrappedLevels.forEach((level) => {
let originalConsoleMethod = originalConsoleMethods[level];
wrappedFuncs[level] = console2[level], console2[level] = originalConsoleMethod;
});
try {
return callback();
} finally {
wrappedLevels.forEach((level) => {
console2[level] = wrappedFuncs[level];
});
}
}
function makeLogger() {
let enabled = !1, logger2 = {
enable: () => {
enabled = !0;
},
disable: () => {
enabled = !1;
},
isEnabled: () => enabled
};
return DEBUG_BUILD ? CONSOLE_LEVELS.forEach((name) => {
logger2[name] = (...args) => {
enabled && consoleSandbox(() => {
GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);
});
};
}) : CONSOLE_LEVELS.forEach((name) => {
logger2[name] = () => {
};
}), logger2;
}
var PREFIX, CONSOLE_LEVELS, originalConsoleMethods, logger, init_logger = __esm({
"node_modules/@sentry/utils/build/esm/logger.js"() {
init_debug_build();
init_worldwide();
PREFIX = "Sentry Logger ", CONSOLE_LEVELS = [
"debug",
"info",
"warn",
"error",
"log",
"assert",
"trace"
], originalConsoleMethods = {};
logger = getGlobalSingleton("logger", makeLogger);
}
});
function addNonEnumerableProperty(obj, name, value) {
try {
Object.defineProperty(obj, name, {
// enumerable: false, // the default, so we can save on bundle size by not explicitly setting it
value,
writable: !0,
configurable: !0
});
} catch (o_O) {
DEBUG_BUILD && logger.log(`Failed to add non-enumerable property "${name}" to object`, obj);
}
}
var init_object = __esm({
"node_modules/@sentry/utils/build/esm/object.js"() {
init_debug_build();
init_logger();
}
});
function dateTimestampInSeconds() {
return Date.now() / ONE_SECOND_IN_MS;
}
function createUnixTimestampInSecondsFunc() {
let { performance } = GLOBAL_OBJ;
if (!performance || !performance.now)
return dateTimestampInSeconds;
let approxStartingTimeOrigin = Date.now() - performance.now(), timeOrigin = performance.timeOrigin == null ? approxStartingTimeOrigin : performance.timeOrigin;
return () => (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;
}
var ONE_SECOND_IN_MS, timestampInSeconds, _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, init_time = __esm({
"node_modules/@sentry/utils/build/esm/time.js"() {
init_worldwide();
ONE_SECOND_IN_MS = 1e3;
timestampInSeconds = createUnixTimestampInSecondsFunc(), browserPerformanceTimeOrigin = (() => {
let { performance } = GLOBAL_OBJ;
if (!performance || !performance.now) {
_browserPerformanceTimeOriginMode = "none";
return;
}
let threshold = 3600 * 1e3, performanceNow = performance.now(), dateNow = Date.now(), timeOriginDelta = performance.timeOrigin ? Math.abs(performance.timeOrigin + performanceNow - dateNow) : threshold, timeOriginIsReliable = timeOriginDelta < threshold, navigationStart = performance.timing && performance.timing.navigationStart, navigationStartDelta = typeof navigationStart == "number" ? Math.abs(navigationStart + performanceNow - dateNow) : threshold, navigationStartIsReliable = navigationStartDelta < threshold;
return timeOriginIsReliable || navigationStartIsReliable ? timeOriginDelta <= navigationStartDelta ? (_browserPerformanceTimeOriginMode = "timeOrigin", performance.timeOrigin) : (_browserPerformanceTimeOriginMode = "navigationStart", navigationStart) : (_browserPerformanceTimeOriginMode = "dateNow", dateNow);
})();
}
});
function uuid4() {
let gbl = GLOBAL_OBJ, crypto2 = gbl.crypto || gbl.msCrypto, getRandomByte = () => Math.random() * 16;
try {
if (crypto2 && crypto2.randomUUID)
return crypto2.randomUUID().replace(/-/g, "");
crypto2 && crypto2.getRandomValues && (getRandomByte = () => {
let typedArray = new Uint8Array(1);
return crypto2.getRandomValues(typedArray), typedArray[0];
});
} catch (_) {
}
return ("10000000100040008000" + 1e11).replace(
/[018]/g,
(c) => (
// eslint-disable-next-line no-bitwise
(c ^ (getRandomByte() & 15) >> c / 4).toString(16)
)
);
}
var init_misc = __esm({
"node_modules/@sentry/utils/build/esm/misc.js"() {
init_worldwide();
}
});
function generatePropagationContext() {
return {
traceId: uuid4(),
spanId: uuid4().substring(16)
};
}
var init_propagationContext = __esm({
"node_modules/@sentry/utils/build/esm/propagationContext.js"() {
init_misc();
}
});
var init_esm = __esm({
"node_modules/@sentry/utils/build/esm/index.js"() {
init_worldwide();
init_is();
init_logger();
init_misc();
init_object();
init_time();
init_propagationContext();
init_version();
}
});
function getMainCarrier() {
return getSentryCarrier(GLOBAL_OBJ), GLOBAL_OBJ;
}
function getSentryCarrier(carrier) {
let __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {};
return __SENTRY__.version = __SENTRY__.version || SDK_VERSION, __SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {};
}
var init_carrier = __esm({
"node_modules/@sentry/core/build/esm/carrier.js"() {
init_esm();
}
});
function updateSession(session, context = {}) {
if (context.user && (!session.ipAddress && context.user.ip_address && (session.ipAddress = context.user.ip_address), !session.did && !context.did && (session.did = context.user.id || context.user.email || context.user.username)), session.timestamp = context.timestamp || timestampInSeconds(), context.abnormal_mechanism && (session.abnormal_mechanism = context.abnormal_mechanism), context.ignoreDuration && (session.ignoreDuration = context.ignoreDuration), context.sid && (session.sid = context.sid.length === 32 ? context.sid : uuid4()), context.init !== void 0 && (session.init = context.init), !session.did && context.did && (session.did = `${context.did}`), typeof context.started == "number" && (session.started = context.started), session.ignoreDuration)
session.duration = void 0;
else if (typeof context.duration == "number")
session.duration = context.duration;
else {
let duration = session.timestamp - session.started;
session.duration = duration >= 0 ? duration : 0;
}
context.release && (session.release = context.release), context.environment && (session.environment = context.environment), !session.ipAddress && context.ipAddress && (session.ipAddress = context.ipAddress), !session.userAgent && context.userAgent && (session.userAgent = context.userAgent), typeof context.errors == "number" && (session.errors = context.errors), context.status && (session.status = context.status);
}
var init_session = __esm({
"node_modules/@sentry/core/build/esm/session.js"() {
init_esm();
}
});
function _setSpanForScope(scope, span) {
span ? addNonEnumerableProperty(scope, SCOPE_SPAN_FIELD, span) : delete scope[SCOPE_SPAN_FIELD];
}
function _getSpanForScope(scope) {
return scope[SCOPE_SPAN_FIELD];
}
var SCOPE_SPAN_FIELD, init_spanOnScope = __esm({
"node_modules/@sentry/core/build/esm/utils/spanOnScope.js"() {
init_esm();
SCOPE_SPAN_FIELD = "_sentrySpan";
}
});
var DEFAULT_MAX_BREADCRUMBS, ScopeClass, Scope, init_scope = __esm({
"node_modules/@sentry/core/build/esm/scope.js"() {
init_esm();
init_session();
init_spanOnScope();
DEFAULT_MAX_BREADCRUMBS = 100, ScopeClass = class _ScopeClass {
/** Flag if notifying is happening. */
/** Callback for client to receive scope changes. */
/** Callback list that will be called during event processing. */
/** Array of breadcrumbs. */
/** User */
/** Tags */
/** Extra */
/** Contexts */
/** Attachments */
/** Propagation Context for distributed tracing */
/**
* A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
* sent to Sentry
*/
/** Fingerprint */
/** Severity */
/**
* Transaction Name
*
* IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects.
* It's purpose is to assign a transaction to the scope that's added to non-transaction events.
*/
/** Session */
/** Request Mode Session Status */
/** The client on this scope */
/** Contains the last event id of a captured event.  */
// NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.
constructor() {
this._notifyingListeners = !1, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = generatePropagationContext();
}
/**
* @inheritDoc
*/
clone() {
let newScope = new _ScopeClass();
return newScope._breadcrumbs = [...this._breadcrumbs], newScope._tags = __spreadValues({}, this._tags), newScope._extra = __spreadValues({}, this._extra), newScope._contexts = __spreadValues({}, this._contexts), newScope._user = this._user, newScope._level = this._level, newScope._session = this._session, newScope._transactionName = this._transactionName, newScope._fingerprint = this._fingerprint, newScope._eventProcessors = [...this._eventProcessors], newScope._requestSession = this._requestSession, newScope._attachments = [...this._attachments], newScope._sdkProcessingMetadata = __spreadValues({}, this._sdkProcessingMetadata), newScope._propagationContext = __spreadValues({}, this._propagationContext), newScope._client = this._client, newScope._lastEventId = this._lastEventId, _setSpanForScope(newScope, _getSpanForScope(this)), newScope;
}
/**
* @inheritDoc
*/
setClient(client) {
this._client = client;
}
/**
* @inheritDoc
*/
setLastEventId(lastEventId2) {
this._lastEventId = lastEventId2;
}
/**
* @inheritDoc
*/
getClient() {
return this._client;
}
/**
* @inheritDoc
*/
lastEventId() {
return this._lastEventId;
}
/**
* @inheritDoc
*/
addScopeListener(callback) {
this._scopeListeners.push(callback);
}
/**
* @inheritDoc
*/
addEventProcessor(callback) {
return this._eventProcessors.push(callback), this;
}
/**
* @inheritDoc
*/
setUser(user2) {
return this._user = user2 || {
email: void 0,
id: void 0,
ip_address: void 0,
username: void 0
}, this._session && updateSession(this._session, { user: user2 }), this._notifyScopeListeners(), this;
}
/**
* @inheritDoc
*/
getUser() {
return this._user;
}
/**
* @inheritDoc
*/
getRequestSession() {
return this._requestSession;
}
/**
* @inheritDoc
*/
setRequestSession(requestSession) {
return this._requestSession = requestSession, this;
}
/**
* @inheritDoc
*/
setTags(tags) {
return this._tags = __spreadValues(__spreadValues({}, this._tags), tags), this._notifyScopeListeners(), this;
}
/**
* @inheritDoc
*/
setTag(key, value) {
return this._tags = __spreadProps(__spreadValues({}, this._tags), { [key]: value }), this._notifyScopeListeners(), this;
}
/**
* @inheritDoc
*/
setExtras(extras) {
return this._extra = __spreadValues(__spreadValues({}, this._extra), extras), this._notifyScopeListeners(), this;
}
/**
* @inheritDoc
*/
setExtra(key, extra) {
return this._extra = __spreadProps(__spreadValues({}, this._extra), { [key]: extra }), this._notifyScopeListeners(), this;
}
/**
* @inheritDoc
*/
setFingerprint(fingerprint) {
return this._fingerprint = fingerprint, this._notifyScopeListeners(), this;
}
/**
* @inheritDoc
*/
setLevel(level) {
return this._level = level, this._notifyScopeListeners(), this;
}
/**
* @inheritDoc
*/
setTransactionName(name) {
return this._transactionName = name, this._notifyScopeListeners(), this;
}
/**
* @inheritDoc
*/
setContext(key, context) {
return context === null ? delete this._contexts[key] : this._contexts[key] = context, this._notifyScopeListeners(), this;
}
/**
* @inheritDoc
*/
setSession(session) {
return session ? this._session = session : delete this._session, this._notifyScopeListeners(), this;
}
/**
* @inheritDoc
*/
getSession() {
return this._session;
}
/**
* @inheritDoc
*/
update(captureContext) {
if (!captureContext)
return this;
let scopeToMerge = typeof captureContext == "function" ? captureContext(this) : captureContext, [scopeInstance, requestSession] = scopeToMerge instanceof Scope ? [scopeToMerge.getScopeData(), scopeToMerge.getRequestSession()] : isPlainObject(scopeToMerge) ? [captureContext, captureContext.requestSession] : [], { tags, extra, user: user2, contexts, level, fingerprint = [], propagationContext } = scopeInstance || {};
return this._tags = __spreadValues(__spreadValues({}, this._tags), tags), this._extra = __spreadValues(__spreadValues({}, this._extra), extra), this._contexts = __spreadValues(__spreadValues({}, this._contexts), contexts), user2 && Object.keys(user2).length && (this._user = user2), level && (this._level = level), fingerprint.length && (this._fingerprint = fingerprint), propagationContext && (this._propagationContext = propagationContext), requestSession && (this._requestSession = requestSession), this;
}
/**
* @inheritDoc
*/
clear() {
return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._session = void 0, _setSpanForScope(this, void 0), this._attachments = [], this._propagationContext = generatePropagationContext(), this._notifyScopeListeners(), this;
}
/**
* @inheritDoc
*/
addBreadcrumb(breadcrumb, maxBreadcrumbs) {
let maxCrumbs = typeof maxBreadcrumbs == "number" ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;
if (maxCrumbs <= 0)
return this;
let mergedBreadcrumb = __spreadValues({
timestamp: dateTimestampInSeconds()
}, breadcrumb), breadcrumbs = this._breadcrumbs;
return breadcrumbs.push(mergedBreadcrumb), this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs, this._notifyScopeListeners(), this;
}
/**
* @inheritDoc
*/
getLastBreadcrumb() {
return this._breadcrumbs[this._breadcrumbs.length - 1];
}
/**
* @inheritDoc
*/
clearBreadcrumbs() {
return this._breadcrumbs = [], this._notifyScopeListeners(), this;
}
/**
* @inheritDoc
*/
addAttachment(attachment) {
return this._attachments.push(attachment), this;
}
/**
* @inheritDoc
*/
clearAttachments() {
return this._attachments = [], this;
}
/** @inheritDoc */
getScopeData() {
return {
breadcrumbs: this._breadcrumbs,
attachments: this._attachments,
contexts: this._contexts,
tags: this._tags,
extra: this._extra,
user: this._user,
level: this._level,
fingerprint: this._fingerprint || [],
eventProcessors: this._eventProcessors,
propagationContext: this._propagationContext,
sdkProcessingMetadata: this._sdkProcessingMetadata,
transactionName: this._transactionName,
span: _getSpanForScope(this)
};
}
/**
* @inheritDoc
*/
setSDKProcessingMetadata(newData) {
return this._sdkProcessingMetadata = __spreadValues(__spreadValues({}, this._sdkProcessingMetadata), newData), this;
}
/**
* @inheritDoc
*/
setPropagationContext(context) {
return this._propagationContext = context, this;
}
/**
* @inheritDoc
*/
getPropagationContext() {
return this._propagationContext;
}
/**
* @inheritDoc
*/
captureException(exception, hint) {
let eventId = hint && hint.event_id ? hint.event_id : uuid4();
if (!this._client)
return logger.warn("No client configured on scope - will not capture exception!"), eventId;
let syntheticException = new Error("Sentry syntheticException");
return this._client.captureException(
exception,
__spreadProps(__spreadValues({
originalException: exception,
syntheticException
}, hint), {
event_id: eventId
}),
this
), eventId;
}
/**
* @inheritDoc
*/
captureMessage(message, level, hint) {
let eventId = hint && hint.event_id ? hint.event_id : uuid4();
if (!this._client)
return logger.warn("No client configured on scope - will not capture message!"), eventId;
let syntheticException = new Error(message);
return this._client.captureMessage(
message,
level,
__spreadProps(__spreadValues({
originalException: message,
syntheticException
}, hint), {
event_id: eventId
}),
this
), eventId;
}
/**
* @inheritDoc
*/
captureEvent(event, hint) {
let eventId = hint && hint.event_id ? hint.event_id : uuid4();
return this._client ? (this._client.captureEvent(event, __spreadProps(__spreadValues({}, hint), { event_id: eventId }), this), eventId) : (logger.warn("No client configured on scope - will not capture event!"), eventId);
}
/**
* This will be called on every set call.
*/
_notifyScopeListeners() {
this._notifyingListeners || (this._notifyingListeners = !0, this._scopeListeners.forEach((callback) => {
callback(this);
}), this._notifyingListeners = !1);
}
}, Scope = ScopeClass;
}
});
function getDefaultCurrentScope() {
return getGlobalSingleton("defaultCurrentScope", () => new Scope());
}
function getDefaultIsolationScope() {
return getGlobalSingleton("defaultIsolationScope", () => new Scope());
}
var init_defaultScopes = __esm({
"node_modules/@sentry/core/build/esm/defaultScopes.js"() {
init_esm();
init_scope();
}
});
function getAsyncContextStack() {
let registry = getMainCarrier(), sentry = getSentryCarrier(registry);
return sentry.stack = sentry.stack || new AsyncContextStack(getDefaultCurrentScope(), getDefaultIsolationScope());
}
function withScope(callback) {
return getAsyncContextStack().withScope(callback);
}
function withSetScope(scope, callback) {
let stack = getAsyncContextStack();
return stack.withScope(() => (stack.getStackTop().scope = scope, callback(scope)));
}
function withIsolationScope(callback) {
return getAsyncContextStack().withScope(() => callback(getAsyncContextStack().getIsolationScope()));
}
function getStackAsyncContextStrategy() {
return {
withIsolationScope,
withScope,
withSetScope,
withSetIsolationScope: (_isolationScope, callback) => withIsolationScope(callback),
getCurrentScope: () => getAsyncContextStack().getScope(),
getIsolationScope: () => getAsyncContextStack().getIsolationScope()
};
}
var AsyncContextStack, init_stackStrategy = __esm({
"node_modules/@sentry/core/build/esm/asyncContext/stackStrategy.js"() {
init_esm();
init_defaultScopes();
init_scope();
init_carrier();
AsyncContextStack = class {
constructor(scope, isolationScope) {
let assignedScope;
scope ? assignedScope = scope : assignedScope = new Scope();
let assignedIsolationScope;
isolationScope ? assignedIsolationScope = isolationScope : assignedIsolationScope = new Scope(), this._stack = [{ scope: assignedScope }], this._isolationScope = assignedIsolationScope;
}
/**
* Fork a scope for the stack.
*/
withScope(callback) {
let scope = this._pushScope(), maybePromiseResult;
try {
maybePromiseResult = callback(scope);
} catch (e) {
throw this._popScope(), e;
}
return isThenable(maybePromiseResult) ? maybePromiseResult.then(
(res) => (this._popScope(), res),
(e) => {
throw this._popScope(), e;
}
) : (this._popScope(), maybePromiseResult);
}
/**
* Get the client of the stack.
*/
getClient() {
return this.getStackTop().client;
}
/**
* Returns the scope of the top stack.
*/
getScope() {
return this.getStackTop().scope;
}
/**
* Get the isolation scope for the stack.
*/
getIsolationScope() {
return this._isolationScope;
}
/**
* Returns the topmost scope layer in the order domain > local > process.
*/
getStackTop() {
return this._stack[this._stack.length - 1];
}
/**
* Push a scope to the stack.
*/
_pushScope() {
let scope = this.getScope().clone();
return this._stack.push({
client: this.getClient(),
scope
}), scope;
}
/**
* Pop a scope from the stack.
*/
_popScope() {
return this._stack.length <= 1 ? !1 : !!this._stack.pop();
}
};
}
});
function getAsyncContextStrategy(carrier) {
let sentry = getSentryCarrier(carrier);
return sentry.acs ? sentry.acs : getStackAsyncContextStrategy();
}
var init_asyncContext = __esm({
"node_modules/@sentry/core/build/esm/asyncContext/index.js"() {
init_carrier();
init_stackStrategy();
}
});
function getCurrentScope() {
let carrier = getMainCarrier();
return getAsyncContextStrategy(carrier).getCurrentScope();
}
var init_currentScopes = __esm({
"node_modules/@sentry/core/build/esm/currentScopes.js"() {
init_asyncContext();
init_carrier();
}
});
function parseEventHintOrCaptureContext(hint) {
if (hint)
return hintIsScopeOrFunction(hint) ? { captureContext: hint } : hintIsScopeContext(hint) ? {
captureContext: hint
} : hint;
}
function hintIsScopeOrFunction(hint) {
return hint instanceof Scope || typeof hint == "function";
}
function hintIsScopeContext(hint) {
return Object.keys(hint).some((key) => captureContextKeys.includes(key));
}
var captureContextKeys, init_prepareEvent = __esm({
"node_modules/@sentry/core/build/esm/utils/prepareEvent.js"() {
init_scope();
captureContextKeys = [
"user",
"level",
"extra",
"contexts",
"tags",
"fingerprint",
"requestSession",
"propagationContext"
];
}
});
function captureException(exception, hint) {
return getCurrentScope().captureException(exception, parseEventHintOrCaptureContext(hint));
}
var init_exports = __esm({
"node_modules/@sentry/core/build/esm/exports.js"() {
init_currentScopes();
init_prepareEvent();
}
});
var init_esm2 = __esm({
"node_modules/@sentry/core/build/esm/index.js"() {
init_exports();
}
});
var init_esm3 = __esm({
"node_modules/@sentry/browser/build/npm/esm/index.js"() {
init_esm2();
}
});
var inSafeMode, isSafeMode, getSettingDirect, saveSettingDirect, getGroupAndKey, getSetting, deleteSetting, getSettings, saveSetting, init_settings = __esm({
"src/utils/settings.js"() {
inSafeMode = null, isSafeMode = () => (inSafeMode === null && (inSafeMode = window.location.search.includes("safe-mode")), inSafeMode), getSettingDirect = (key = null, defaultValue = null, identifier = "mousehunt-improved-settings") => {
if (isSafeMode())
return defaultValue;
let settings2 = JSON.parse(localStorage.getItem(identifier)) || {};
if (!key)
return settings2;
if (!key.includes("."))
return settings2[key] === void 0 ? defaultValue : settings2[key];
let groupAndKey = getGroupAndKey(key);
if (!groupAndKey.group)
return settings2[groupAndKey.key] === void 0 ? defaultValue : settings2[groupAndKey.key];
let groupSettings = settings2[groupAndKey.group] || {};
return groupSettings[groupAndKey.key] === void 0 ? defaultValue : groupSettings[groupAndKey.key];
}, saveSettingDirect = (key, value, identifier = "mousehunt-improved-settings") => {
if (isSafeMode())
return;
let settings2 = getSettingDirect(null, {}, identifier), groupAndKey = getGroupAndKey(key);
groupAndKey.group ? (settings2[groupAndKey.group] || (settings2[groupAndKey.group] = {}), settings2[groupAndKey.group][groupAndKey.key] = value) : settings2[key] = value, localStorage.setItem(identifier, JSON.stringify(settings2));
}, getGroupAndKey = (key) => {
let split = key.split(".");
return split.length === 1 ? {
group: null,
key: split[0]
} : split[0] === "location-huds-enabled" ? {
group: "location-huds-enabled",
key: split[1]
} : {
group: `${split[0]}-settings`,
key: split[1]
};
}, getSetting = (key, defaultValue = !1) => getSettingDirect(key, defaultValue, "mousehunt-improved-settings"), deleteSetting = (key) => {
let settings2 = getSettings(), groupAndKey = getGroupAndKey(key);
groupAndKey.group ? settings2[groupAndKey.group] ? delete settings2[groupAndKey.group][groupAndKey.key] : delete settings2[groupAndKey.key] : delete settings2[key], localStorage.setItem("mousehunt-improved-settings", JSON.stringify(settings2));
}, getSettings = () => {
if (isSafeMode())
return {};
let settings2 = localStorage.getItem("mousehunt-improved-settings");
if (!settings2)
return {};
try {
return JSON.parse(settings2);
} catch (error) {
return console.error("Error parsing settings:", error), {};
}
}, saveSetting = (key, value) => (saveSettingDirect(key, value, "mousehunt-improved-settings"), value);
}
});
var makeElement, makeButton, makeMhButton, makeLink, makeFavoriteButton, createPopup, makeTooltip, makePage, makeMathButton, makeMathButtons, toEscapedJSON, makeProgressLogLink, waitForElement, init_elements = __esm({
"src/utils/elements.js"() {
init_settings();
makeElement = (tag, classes = "", text = "", appendTo = null) => {
let element2 = document.createElement(tag);
return Array.isArray(classes) && (classes = classes.join(" ")), classes && classes.length && (element2.className = classes), element2.innerHTML = text, appendTo ? (appendTo.append(element2), appendTo) : element2;
}, makeButton = (text, href, tiny = !0, extraClasses = [], encodeAsSpace = !1) => (href = href.replaceAll(/\s/g, "_"), href = encodeAsSpace ? href.replaceAll("_", "%20") : href.replaceAll(/\s/g, "_"), href = href.replaceAll("$", "_"), `<a href="${href}" class="mousehuntActionButton ${tiny ? "tiny" : ""} ${extraClasses.join(" ")}"><span>${text}</span></a>`), makeMhButton = (opts) => {
let {
text = "",
size = "small",
className = "",
callback = () => {
},
appendTo = null
} = opts, button = makeElement("a", ["mousehuntActionButton", size, className]);
return makeElement("span", "", text, button), button.title = opts.title || text, button.addEventListener("click", () => {
callback(button);
}), appendTo && appendTo.append(button), button;
}, makeLink = (text, href, encodeAsSpace = !1) => (encodeAsSpace && (href = href.replaceAll("_", "%20")), `<a href="${href}" target="_mouse" class="mousehuntActionButton tiny"><span>${text}</span></a>`), makeFavoriteButton = (options2) => __async(void 0, null, function* () {
let {
id = null,
target = null,
size = "small",
state = !1,
isSetting = !0,
defaultState = !1,
onChange = null,
onActivate = null,
onDeactivate = null
} = options2, existing = document.querySelector(`#${id}`);
existing && existing.remove();
let star = document.createElement("a");
star.classList.add("custom-favorite-button"), size === "small" && star.classList.add("custom-favorite-button-small"), star.id = id, star.setAttribute("data-item-id", id), star.setAttribute("href", "#"), star.style.display = "inline-block";
let currentSetting = !1;
return currentSetting = isSetting ? getSetting(id, defaultState) : state, currentSetting ? star.classList.add("active") : star.classList.add("inactive"), star.addEventListener("click", (e) => __async(void 0, null, function* () {
star.classList.add("busy"), e.preventDefault(), e.stopPropagation();
let currentStar = e.target, currentState = !currentStar.classList.contains("active");
onChange !== null ? yield onChange(currentState) : isSetting && saveSetting(id, currentState), currentStar.classList.remove("inactive"), currentStar.classList.remove("active"), currentState ? (currentStar.classList.add("active"), onActivate !== null && (yield onActivate(currentState))) : (currentStar.classList.add("inactive"), onDeactivate !== null && (yield onDeactivate(currentState))), setTimeout(() => {
currentStar.classList.remove("busy");
}, 300);
})), target && target.append(star), star;
}), createPopup = (options2) => {
if (typeof jsDialog == "undefined" || !jsDialog)
return !1;
let settings2 = Object.assign({}, {
title: "",
content: "",
hasCloseButton: !0,
template: "default",
show: !0,
className: ""
}, options2), popup = new jsDialog();
return popup.setIsModal(!settings2.hasCloseButton), popup.setTemplate(settings2.template), popup.addToken("{*title*}", settings2.title), popup.addToken("{*content*}", settings2.content), popup.setAttributes({
className: settings2.className
}), settings2.show && popup.show(), popup;
}, makeTooltip = (options2) => {
if (!options2.appendTo)
return !1;
let { appendTo, className = "", text = "" } = options2, tooltip = makeElement("div", ["PreferencesPage__blackTooltip", "mh-improved-tooltip", className]);
return makeElement("span", "PreferencesPage__blackTooltipText", text, tooltip), appendTo.append(tooltip), tooltip;
}, makePage = (content) => {
var _a, _b;
let setContent = () => {
let pageContainer = document.querySelector(".mousehuntHud-page-tabContentContainer");
pageContainer && (typeof content == "function" ? (pageContainer.innerHTML = "", content(pageContainer)) : typeof content == "object" && content instanceof HTMLElement ? (pageContainer.innerHTML = "", pageContainer.append(content)) : pageContainer.innerHTML = content);
};
(_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.setPage && hg.utils.PageUtil.setPage("PrivacyPolicy", {}, setContent, setContent);
}, makeMathButton = (amount, opts) => {
let {
appendTo = null,
input = null,
maxQty = 0,
classNames = []
} = opts, button = makeElement("a", ["mousehuntActionButton", "mh-improved-math-button", ...classNames]), plusText = amount > 0 ? `+${amount}` : amount, minusText = amount > 0 ? `-${amount}` : amount, buttonText = makeElement("span", "", plusText), updateButtonText = (e) => {
let currentText = buttonText.innerText;
e.shiftKey && currentText !== minusText ? buttonText.innerText = minusText : !e.shiftKey && currentText !== plusText && (buttonText.innerText = plusText);
};
return buttonText.addEventListener("mouseover", updateButtonText), window.addEventListener("keydown", updateButtonText), window.addEventListener("keyup", updateButtonText), button.append(buttonText), button.addEventListener("click", (e) => {
e.preventDefault();
let current = Number.parseInt(input.value, 10);
Number.isNaN(current) && (current = 0);
let tempAmount = e.shiftKey ? -amount : amount;
current + tempAmount >= maxQty ? input.value = maxQty : current + tempAmount <= 0 ? input.value = 0 : input.value = current + tempAmount;
let event = new Event("keyup");
input.dispatchEvent(event);
}), appendTo && appendTo.append(button), button;
}, makeMathButtons = (amounts, opts) => {
let returnVal = [];
return amounts.forEach((amount) => {
returnVal.push(makeMathButton(amount, opts));
}), returnVal;
}, toEscapedJSON = (obj) => JSON.stringify(obj).replaceAll('"', "&quot;"), makeProgressLogLink = (opts = {}) => {
let progress = {
time: opts.time || "1 day, 12 hours",
catches: opts.catches || [],
baits: opts.baits || [],
loots: opts.loots || []
}, catches = {}, baits = {}, loots = {};
return progress.catches.forEach((mouse) => {
catches[`${mouse.environment}_${mouse.id}`] = mouse.caught;
}), progress.baits.forEach((bait) => {
baits[`${bait.id}_bu`] = bait.used || bait.catches + bait.fta + bait.ftc, baits[`${bait.id}_c`] = bait.catches, baits[`${bait.id}_m`] = bait.ftc, baits[`${bait.id}_af`] = bait.fta, baits[`${bait.id}_bs`] = bait.stale, baits[`${bait.id}_bl`] = bait.stolen;
}), progress.loots.forEach((loot) => {
loots[loot.id] = loot.quantity;
}), `<a href="#" onclick="app.views.HeadsUpDisplayView.hud.showLogSummary('${progress.time}', ${toEscapedJSON(catches)}, ${toEscapedJSON(baits)}, ${toEscapedJSON(loots)}); return false;" class="mh-ui-progress-log-link mousehuntActionButton small lightBlue"><span>${opts.text || "View Progress Log"}</span></a>`;
}, waitForElement = (_0, ..._1) => __async(void 0, [_0, ..._1], function* (selector, { single = !0, maxAttempts = 10, delay = 300 } = {}) {
for (let attempts = 0; attempts < maxAttempts; attempts++) {
let element2 = single ? document.querySelector(selector) : document.querySelectorAll(selector);
if (element2 && (single ? element2 : element2.length > 0))
return element2;
yield new Promise((resolve) => setTimeout(resolve, delay));
}
return !1;
});
}
});
var addEvent, doEvent2, doInternalEvent, eventsAdded, onEvent, onSettingsChange, init_event_registry = __esm({
"src/utils/event-registry.js"() {
addEvent = (eventName, eventCallback, args) => {
let {
eventScope = null,
removeAfterFire = !1,
weight = 0,
id = null
} = args || {};
eventRegistry && eventRegistry.addEventListener(eventName, eventCallback, eventScope, removeAfterFire, weight, id);
}, doEvent2 = (eventName, params) => {
window.eventRegistry && eventRegistry.doEvent(eventName, params);
}, doInternalEvent = (eventName, params) => {
document.dispatchEvent(new CustomEvent(eventName, { detail: params }));
}, eventsAdded = {}, onEvent = (event, callback, remove = !1) => {
if (!window.eventRegistry)
return;
let id = `${event}-${remove.toString()}-${callback.toString()}`;
eventsAdded[id] || (eventsAdded[id] = !0, eventRegistry.addEventListener(event, callback, null, remove));
}, onSettingsChange = (key, callback) => {
onEvent("mh-improved-settings-changed", (args) => {
args.key === key && (typeof callback == "function" ? callback(args) : typeof callback == "object" && (args.value ? callback.enable(args) : callback.disable(args)));
});
};
}
});
var activeBlueprint, addedEvent, toggleBlueprint, init_blueprint = __esm({
"src/utils/blueprint.js"() {
init_elements();
init_event_registry();
activeBlueprint = null, addedEvent = !1, toggleBlueprint = (id, content) => {
let container = document.querySelector("#mousehuntContainer");
if (!container)
return;
let blueprint = document.querySelector(".trapSelectorView__blueprint");
if (!blueprint)
return;
let browserStateParent = document.querySelector(".trapSelectorView__browserStateParent");
if (!browserStateParent)
return;
let existing = document.querySelector(`#mh-improved-blueprint--${id}`);
existing && existing.remove();
let wrapper = makeElement("div", [
"trapSelectorView__browserState",
"trapSelectorView__browserContainer",
"mh-improved-blueprint",
`mh-improved-blueprint--${id}`
]);
wrapper.id = `mh-improved-blueprint--${id}`;
let inner = makeElement("div", "trapSelectorView__outerBlock");
if (inner.append(content), wrapper.append(inner), browserStateParent.append(wrapper), activeBlueprint === id)
activeBlueprint = null, container.classList.remove("showBlueprint"), blueprint.classList.remove("trapSelectorView__blueprint--active", "mh-improved-blueprint--active"), browserStateParent.classList.remove(`trapSelectorView__browserStateParent--${id}`);
else {
let close2 = document.querySelector(".campPage-trap-blueprint-closeButton");
close2 && close2.click(), activeBlueprint = id, container.classList.add("showBlueprint"), blueprint.classList.add("trapSelectorView__blueprint--active", "mh-improved-blueprint--active"), browserStateParent.classList.add(`trapSelectorView__browserStateParent--${id}`);
}
addedEvent || (onEvent("camp_page_toggle_blueprint", () => {
activeBlueprint = null;
}), addedEvent = !0);
};
}
});
var database, databaseDelete, dbGet, dbSet, dbDelete, dbGetAll, dbDeleteAll, init_db = __esm({
"src/utils/db.js"() {
database = (databaseName) => __async(void 0, null, function* () {
return new Promise((resolve, reject2) => {
let request = indexedDB.open(`mh-improved-${databaseName}`, 7);
request.onerror = (event) => reject2(event.target.error), request.onsuccess = (event) => resolve(event.target.result), request.onupgradeneeded = (event) => {
let db = event.target.result;
db.objectStoreNames.contains(databaseName) || db.createObjectStore(databaseName, { keyPath: "id" });
};
});
}), databaseDelete = (databaseName) => __async(void 0, null, function* () {
return databaseName = `mh-improved-${databaseName}`, new Promise((resolve, reject2) => {
let request = indexedDB.deleteDatabase(databaseName);
request.onerror = (event) => reject2(event.target.error), request.onsuccess = (event) => resolve(event.target.result);
});
}), dbGet = (databaseName, id) => __async(void 0, null, function* () {
let db = yield database(databaseName), transaction = db.transaction(databaseName, "readonly");
transaction.onerror = (event) => {
throw new Error(event.target.error);
};
let request = transaction.objectStore(databaseName).get(id);
return new Promise((resolve, reject2) => {
request.onsuccess = (event) => {
db.close(), resolve(event.target.result);
}, request.onerror = (event) => reject2(event.target.error);
});
}), dbSet = (databaseName, data) => __async(void 0, null, function* () {
let db = yield database(databaseName), transaction = db.transaction(databaseName, "readwrite"), objectStore = transaction.objectStore(databaseName);
data = {
data,
id: data.id || Date.now()
};
let request = objectStore.put(data);
return new Promise((resolve, reject2) => {
request.onsuccess = (event) => resolve(event.target.result), request.onerror = (event) => reject2(event.target.error), transaction.oncomplete = () => db.close();
});
}), dbDelete = (databaseName, id) => __async(void 0, null, function* () {
let db = yield database(databaseName), transaction = db.transaction(databaseName, "readwrite"), request = transaction.objectStore(databaseName).delete(id);
return new Promise((resolve, reject2) => {
request.onsuccess = (event) => resolve(event.target.result), request.onerror = (event) => reject2(event.target.error), transaction.oncomplete = () => db.close();
});
}), dbGetAll = (databaseName) => __async(void 0, null, function* () {
let db = yield database(databaseName), transaction = db.transaction(databaseName, "readonly"), request = transaction.objectStore(databaseName).getAll();
return new Promise((resolve, reject2) => {
request.onsuccess = (event) => resolve(event.target.result), request.onerror = (event) => reject2(event.target.error), transaction.oncomplete = () => db.close();
});
}), dbDeleteAll = (databaseName) => __async(void 0, null, function* () {
let db = yield database(databaseName), transaction = db.transaction(databaseName, "readwrite"), request = transaction.objectStore(databaseName).clear();
return new Promise((resolve, reject2) => {
request.onsuccess = (event) => resolve(event.target.result), request.onerror = (event) => reject2(event.target.error), transaction.oncomplete = () => db.close();
});
});
}
});
var setGlobal, getGlobal, init_global = __esm({
"src/utils/global.js"() {
setGlobal = (key, value) => {
app.mhui || (app.mhui = {}), app.mhui[key] = value;
}, getGlobal = (key) => app != null && app.mhui && app.mhui[key] ? app.mhui[key] : window != null && window.mhui && window.mhui[key] ? window.mhui[key] : !1;
}
});
var shouldLogDebug, debug, debuglog, init_debug = __esm({
"src/utils/debug.js"() {
init_global();
init_settings();
shouldLogDebug = (context) => getSetting("debug", !1) ? getSetting("debug.all", !1) || getSetting(`debug.${context}`, !1) || getGlobal("mh-improved-updating") || getGlobal("mh-improved-debug") : !1, debug = (message, ...args) => {
shouldLogDebug("module") && console.log(
`%cMH Improved%c: ${message}`,
"color: #90588c; font-weight: 900",
"color: inherit; font-weight: inherit",
...args
);
}, debuglog = (module, message, ...args) => {
shouldLogDebug(module) && console.log(
`%cMH Improved %c${module}%c ${message}`,
"color: #90588c; font-weight: 900",
"color: #90588c; font-weight: 400",
"color: inherit; font-weight: inherit",
...args
);
};
}
});
var validDataFiles, isValidDataFile, getCacheExpiration, setCacheExpiration, isCacheExpired, fetchData, getData, clearCaches, updateCaches, getHeaders, sessionSet, sessionGet, sessionDelete, sessionsDelete, cacheSet, cacheSetAsync, cacheGetHelper, cacheGet, dataCacheGet, cacheDelete, dataSet, dataGet, init_data = __esm({
"src/utils/data.js"() {
init_db();
init_debug();
init_settings();
validDataFiles = /* @__PURE__ */ new Set([
"community-map-data",
"effs",
"environments-events",
"environments",
"item-thumbnails",
"items-tradable",
"m400-locations",
"marketplace-hidden-items",
"mice-groups",
"mice-regions",
"mice-thumbnails",
"minlucks",
"relic-hunter-hints",
"scoreboards",
"scrolls-to-maps",
"ultimate-checkmark",
"upscaled-images",
"wisdom",
"items"
]), isValidDataFile = (file) => validDataFiles.has(file), getCacheExpiration = (key = null) => __async(void 0, null, function* () {
return yield cacheGet(`expiration-${key}`, 0);
}), setCacheExpiration = (key) => __async(void 0, null, function* () {
debuglog("utils-data", `Setting cache expiration for ${key}`), cacheSet(`expiration-${key}`, Date.now() + (Math.floor(Math.random() * 7) + 7) * 24 * 60 * 60 * 1e3);
}), isCacheExpired = (key) => __async(void 0, null, function* () {
let expiration = yield getCacheExpiration(key);
return expiration ? expiration < Date.now() : !0;
}), fetchData = (key, retries = 0) => __async(void 0, null, function* () {
try {
return yield (yield fetch(`https://api.mouse.rip/${key}`, {
method: "GET",
headers: getHeaders()
})).json();
} catch (error) {
return console.error(`Error fetching data for ${key}:`, error), retries >= 3 ? !1 : (yield new Promise((resolve) => setTimeout(resolve, 500 * retries)), fetchData(key, retries + 1));
}
}), getData = (key, force = !1) => __async(void 0, null, function* () {
if (!isValidDataFile(key))
return debuglog("utils-data", `Cannot get data for ${key}, invalid key`), !1;
if (!(yield isCacheExpired(key)) && !force) {
let cachedData = yield dataCacheGet(key, !1);
if (cachedData)
return cachedData;
}
debuglog("utils-data", `Fetching data for ${key}\u2026`);
let data = yield fetchData(key);
return debuglog("utils-data", `Fetched data for ${key}`, data), data && (cacheSet(key, data), setCacheExpiration(key)), data;
}), clearCaches = () => __async(void 0, null, function* () {
for (let key of Object.keys(localStorage))
key.startsWith("mh-improved-cache") && localStorage.removeItem(key);
for (let key of Object.keys(sessionStorage))
key.startsWith("mh-improved") && sessionStorage.removeItem(key);
yield dbDelete("cache", "expirations"), yield updateCaches();
}), updateCaches = () => __async(void 0, null, function* () {
for (let file of validDataFiles)
yield getData(file, !0);
}), getHeaders = () => ({
"Content-Type": "application/json",
"X-MH-Improved": "true",
"X-MH-Improved-Version": mhImprovedVersion || "unknown",
"X-MH-Improved-Platform": mhImprovedPlatform || "unknown"
}), sessionSet = (key, value, retry = !1) => {
if (getSetting("debug.no-cache"))
return;
key = `mh-improved-${key}`;
let stringified = JSON.stringify(value);
try {
sessionStorage.setItem(key, stringified);
} catch (error) {
error.name === "QuotaExceededError" && !retry && (clearCaches(), sessionSet(key, value, !0));
}
}, sessionGet = (key, defaultValue = !1) => {
if (getSetting("debug.no-cache"))
return defaultValue;
key = `mh-improved-${key}`;
let value = sessionStorage.getItem(key);
return value ? JSON.parse(value) : defaultValue;
}, sessionDelete = (key) => {
key = `mh-improved-${key}`, sessionStorage.removeItem(key);
}, sessionsDelete = (prefix) => {
for (let key of Object.keys(sessionStorage))
key.startsWith(prefix) && sessionStorage.removeItem(key);
}, cacheSet = (key, value) => {
dbSet("cache", { id: key, value });
}, cacheSetAsync = (key, value) => __async(void 0, null, function* () {
yield dbSet("cache", { id: key, value });
}), cacheGetHelper = (key, defaultValue = !1) => __async(void 0, null, function* () {
var _a;
let cached = yield dbGet("cache", key);
return (_a = cached == null ? void 0 : cached.data) != null && _a.value ? cached.data.value : defaultValue;
}), cacheGet = (key, defaultValue = !1) => __async(void 0, null, function* () {
return yield cacheGetHelper(key, defaultValue, "cache");
}), dataCacheGet = (key, defaultValue = !1) => __async(void 0, null, function* () {
return yield cacheGetHelper(key, defaultValue, "data");
}), cacheDelete = (key) => {
dbDelete("cache", key);
}, dataSet = (key, value) => {
dbSet("data", { id: key, value });
}, dataGet = (key, defaultValue = !1) => __async(void 0, null, function* () {
var _a;
let cached = yield dbGet("data", key);
return (_a = cached == null ? void 0 : cached.data) != null && _a.value ? cached.data.value : defaultValue;
});
}
});
var makeElementDraggable, init_draggable = __esm({
"src/utils/draggable.js"() {
makeElementDraggable = (dragTarget, dragHandle, defaultX = null, defaultY = null, storageKey = null, savePosition = !0) => {
let modal = document.querySelector(dragTarget);
if (!modal)
return;
let handle = document.querySelector(dragHandle);
if (!handle)
return;
let keepWithinLimits = (type2, value) => type2 === "top" ? value < -20 ? -20 : value : value < handle.offsetWidth * -1 + 20 ? handle.offsetWidth * -1 + 20 : value > document.body.clientWidth - 20 ? document.body.clientWidth - 20 : value, onMouseDown = (e) => {
e.preventDefault(), setTimeout(() => {
x1 = e.clientX, y1 = e.clientY, modal.classList.add("mh-is-dragging"), document.onmousemove = onDrag, document.onmouseup = finishDrag;
}, 50);
}, finishDrag = () => {
document.onmouseup = null, document.onmousemove = null, modal.classList.remove("mh-is-dragging"), storageKey && localStorage.setItem(storageKey, JSON.stringify({ x: modal.offsetLeft, y: modal.offsetTop }));
}, onDrag = (e) => {
e.preventDefault(), x2 = x1 - e.clientX, y2 = y1 - e.clientY, x1 = e.clientX, y1 = e.clientY;
let newLeft = keepWithinLimits("left", modal.offsetLeft - x2), newTop = keepWithinLimits("top", modal.offsetTop - y2);
modal.style.left = `${newLeft}px`, modal.style.top = `${newTop}px`;
}, startX = defaultX || 0, startY2 = defaultY || 0;
if (storageKey || (storageKey = `mh-draggable-${dragTarget}-${dragHandle}`), savePosition) {
let storedPosition = localStorage.getItem(storageKey);
if (storedPosition) {
let position = JSON.parse(storedPosition);
startX = keepWithinLimits("left", position.x), startY2 = keepWithinLimits("top", position.y);
}
}
modal.style.left = `${startX}px`, modal.style.top = `${startY2}px`;
let x1 = 0, y1 = 0, x2 = 0, y2 = 0;
handle.onmousedown = onMouseDown;
};
}
});
var getCurrentPage, setPage, setTab, getCurrentTab, getCurrentSubtab, getCurrentDialog, isCurrentPage, init_page = __esm({
"src/utils/page.js"() {
getCurrentPage = () => {
var _a, _b, _c, _d;
if (!((_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.getCurrentPage))
return null;
let page = hg.utils.PageUtil.getCurrentPage();
if (!page) {
let query = ((_d = (_c = hg == null ? void 0 : hg.utils) == null ? void 0 : _c.PageUtil) == null ? void 0 : _d.getQueryParams()) || {};
return query != null && query.switch_to && query.switch_to === "mobile" ? "camp" : null;
}
return page.toLowerCase();
}, setPage = (page, ...args) => {
var _a, _b, _c;
if (page.toLowerCase() === "wiki") {
doEvent("mh-improved-open-wiki");
return;
}
page = page.charAt(0).toUpperCase() + page.slice(1), (_c = (_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) == null ? void 0 : _b.setPage) == null || _c.call(_b, page, ...args);
}, setTab = (tab, ...args) => {
var _a, _b, _c;
(_c = (_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) == null ? void 0 : _b.setPageTab) == null || _c.call(_b, tab, ...args);
}, getCurrentTab = () => {
var _a, _b;
if (!((_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.getCurrentPageTab))
return getCurrentPage();
let tab = hg.utils.PageUtil.getCurrentPageTab() || "";
return tab.length <= 0 ? getCurrentPage() : tab ? tab == null ? void 0 : tab.toLowerCase() : getCurrentPage();
}, getCurrentSubtab = () => {
let subtab = hg.utils.PageUtil.getCurrentPageSubTab();
return !subtab || subtab.length <= 0 ? getCurrentTab() : subtab ? subtab == null ? void 0 : subtab.toLowerCase() : getCurrentTab();
}, getCurrentDialog = () => {
let overlay = document.querySelector("#overlayPopup");
if (!overlay || !overlay.classList || overlay.classList.length <= 0)
return "";
let replaceMap = {
jsDialogFixed: "",
default: "",
wide: "",
ajax: "",
overlay: "",
treasureMapPopup: "map",
itemViewPopup: "item",
mouseViewPopup: "mouse",
largerImage: "image",
convertibleOpenViewPopup: "convertible",
adventureBookPopup: "adventureBook",
marketplaceViewPopup: "marketplace",
giftSelectorViewPopup: "gifts",
supportPageContactUsForm: "support",
MHCheckout: "premiumShop"
};
return overlayType = overlay.classList.value.split(" ").map((cls) => replaceMap[cls] || cls).join(" ").trim(), overlayType === "Popup" ? "" : overlayType;
}, isCurrentPage = (targetPage = null, targetTab = null, targetSubtab = null, forceCurrentPage = null, forceCurrentTab = null, forceCurrentSubtab = null) => {
if (!targetPage)
return !1;
let currentPage = forceCurrentPage || getCurrentPage();
if (!targetTab)
return currentPage === targetPage;
let currentTab = forceCurrentTab || getCurrentTab();
if (!targetSubtab)
return currentPage === targetPage && currentTab === targetTab;
let currentSubtab = forceCurrentSubtab || getCurrentSubtab();
return currentSubtab === currentTab ? currentPage === targetPage && currentTab === targetTab : currentPage === targetPage && currentTab === targetTab && currentSubtab === targetSubtab;
};
}
});
var getCurrentLocation2, getCurrentLocationName, init_location_current = __esm({
"src/utils/location-current.js"() {
getCurrentLocation2 = () => ((user == null ? void 0 : user.environment_type) || "").toLowerCase(), getCurrentLocationName = () => (user == null ? void 0 : user.environment_name) || getCurrentLocation2();
}
});
var showHornMessage, init_horn = __esm({
"src/utils/horn.js"() {
init_elements();
showHornMessage = (options2) => {
let huntersHornView = document.querySelector(".huntersHornView__messageContainer");
if (!huntersHornView)
return;
let settings2 = {
title: options2.title || "Hunters Horn",
text: options2.text || "This is a message from the Hunters Horn",
button: options2.button || "OK",
action: options2.action || (() => {
}),
dismiss: options2.dismiss || null,
type: options2.type || (options2.color ? "bait_disarmed" : "recent_linked_turn"),
color: options2.color || !1,
classname: options2.classname || "",
image: options2.image || null,
imageLink: options2.imageLink || null,
imageCallback: options2.imageCallback || null
};
settings2.type === "info" ? type = "bait_disarmed" : settings2.type === "error" ? (settings2.type = "bait_disarmed", settings2.color = "red") : settings2.type === "warning" ? (settings2.type = "bait_disarmed", settings2.color = "yellow") : settings2.type === "success" && (type = "bait_disarmed", settings2.color = "green");
let backdrop = document.querySelector(".huntersHornView__backdrop");
backdrop && backdrop.classList.add("huntersHornView__backdrop--active");
let gameInfo = document.querySelector(".mousehuntHud-gameInfo");
gameInfo && gameInfo.classList.add("blur");
let fragment = document.createDocumentFragment(), messageWrapper = makeElement("div", ["huntersHornView__message huntersHornView__message--active", settings2.classname]), message = makeElement("div", [
"huntersHornMessageView",
"huntersHornMessageView--shadow",
`huntersHornMessageView--${settings2.type}`,
settings2.color ? `huntersHornMessageView--color-${settings2.color}` : ""
]);
makeElement("div", "huntersHornMessageView__title", settings2.title, message);
let content = makeElement("div", "huntersHornMessageView__content");
if (settings2.image)
if (settings2.type === "recent_turn" || settings2.type === "recent_linked_turn") {
let imgWrapper = makeElement("div", "huntersHornMessageView__friend"), img = makeElement("a", "huntersHornMessageView__friendProfilePic");
settings2.imageLink ? img.href = settings2.imageLink : settings2.imageCallback ? img.addEventListener("click", settings2.imageCallback) : img.href = "#", img.style.backgroundImage = `url(${settings2.image})`, imgWrapper.append(img), content.append(imgWrapper);
} else
content.classList.add("huntersHornMessageView__content--image"), content.setAttribute("style", `--bg-image: url(${settings2.image})`);
makeElement("div", "huntersHornMessageView__text", settings2.text, content);
let buttonSpacer = makeElement("div", "huntersHornMessageView__buttonSpacer"), button = makeElement("button", "huntersHornMessageView__action"), buttonLabel = makeElement("div", "huntersHornMessageView__actionLabel");
if (makeElement("span", "huntersHornMessageView__actionText", settings2.button, buttonLabel), button.append(buttonLabel), button.addEventListener("click", () => {
settings2.action && settings2.action(), messageWrapper.innerHTML = "", backdrop.classList.remove("huntersHornView__backdrop--active"), gameInfo.classList.remove("blur");
}), buttonSpacer.append(button), content.append(buttonSpacer), message.append(content), settings2.dismiss) {
let countdown = makeElement("button", ["huntersHornMessageView__countdown"]);
makeElement("div", "huntersHornMessageView__countdownButtonImage", "", countdown);
let svgMarkup = `<svg class="huntersHornMessageView__countdownSVG">
<circle r="46%" cx="50%" cy="50%" class="huntersHornMessageView__countdownCircleTrack"></circle>
<circle r="46%" cx="50%" cy="50%" class="huntersHornMessageView__countdownCircle" style="animation-duration: ${settings2.dismiss}ms;"></circle>
</svg>`;
countdown.innerHTML += svgMarkup, countdown.addEventListener("click", () => {
countdown.classList.add("huntersHornMessageView__countdown--complete"), messageWrapper.innerHTML = "", backdrop.classList.remove("huntersHornView__backdrop--active"), gameInfo.classList.remove("blur");
}), message.append(countdown);
}
messageWrapper.append(message);
let existingMessages = huntersHornView.querySelector(".huntersHornView__message");
existingMessages && existingMessages.remove(), fragment.append(messageWrapper), huntersHornView.append(fragment), settings2.dismiss && setTimeout(() => {
let countdown = messageWrapper.querySelector(".huntersHornMessageView__countdown");
countdown && countdown.classList.add("huntersHornMessageView__countdown--complete"), messageWrapper.innerHTML = "", backdrop.classList.remove("huntersHornView__backdrop--active"), gameInfo.classList.remove("blur");
}, settings2.dismiss);
};
}
});
var requestCallbacks, onRequestHolder, onRequest, runCallbacks, overlayMutationObserver, overlayCallbacks, onOverlayChange, getDialogMapping, onDialogShow, dialogHideCallbacks, lastDialog, onDialogHide, pageChangeCallbacks, pageChangeObserver, onPageChange, onTravel, onTravelCallback, callbacks, hasAddedNavigationListener, onNavigation, addNavigationListeners, onActivation, onDeactivation, onTurn, onTrapChange, init_events = __esm({
"src/utils/events.js"() {
init_page();
init_location_current();
init_event_registry();
init_horn();
requestCallbacks = {}, onRequestHolder = !1, onRequest = (url = null, callback = null, skipSuccess = !1, ignore = [], priority = !1) => {
if (!onRequestHolder) {
let req = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function() {
this.addEventListener("load", function() {
if (this.responseText) {
let response = {};
try {
response = JSON.parse(this.responseText);
} catch (e) {
return;
}
Object.keys(requestCallbacks).forEach((key) => {
(key === "*" || this.responseURL.includes(key)) && requestCallbacks[key].forEach((item) => {
item.callback && typeof item.callback == "function" && (item.skipSuccess || response != null && response.success) && item.callback(response, this._data);
});
});
}
}), Reflect.apply(req, this, arguments);
};
let send = XMLHttpRequest.prototype.send;
XMLHttpRequest.prototype.send = function(data) {
let params = new URLSearchParams(data);
return this._data = Object.fromEntries(params), Reflect.apply(send, this, arguments);
}, onRequestHolder = !0;
}
url = url === "*" ? "*" : `managers/ajax/${url}`, !ignore.includes(url) && callback && (requestCallbacks[url] || (requestCallbacks[url] = []), priority ? requestCallbacks[url].unshift({
callback,
skipSuccess
}) : requestCallbacks[url].push({
callback,
skipSuccess
}));
}, runCallbacks = (settings2, parentNode, callbacks3) => (Object.keys(settings2).forEach((key) => {
parentNode && parentNode.classList && parentNode.classList.contains(settings2[key].selector) ? (settings2[key].isVisible = !0, callbacks3[key] && callbacks3[key].show && callbacks3[key].show()) : settings2[key].isVisible && (settings2[key].isVisible = !1, callbacks3[key] && callbacks3[key].hide && callbacks3[key].hide());
}), settings2), overlayMutationObserver = null, overlayCallbacks = [], onOverlayChange = (callbacks3) => {
let overlayData = {
item: { isVisible: !1, selector: "itemViewPopup" },
mouse: { isVisible: !1, selector: "mouseViewPopup" },
marketplace: { isVisible: !1, selector: "marketplaceViewPopup" }
};
if (overlayCallbacks.push(callbacks3), overlayMutationObserver)
return;
overlayMutationObserver = !0;
let observer = new MutationObserver(() => {
overlayCallbacks.forEach((callback) => {
callback.change && callback.change();
let overlayType2 = document.querySelector("#overlayPopup");
if (overlayType2 && overlayType2.classList.length <= 0)
return;
let overlayBg = document.querySelector("#overlayBg");
overlayBg && overlayBg.classList.length > 0 ? callback.show && callback.show() : callback.hide && callback.hide(), overlayData = runCallbacks(overlayData, overlayType2, callback);
});
}), observeTarget = document.querySelector("#overlayPopup");
observeTarget && observer.observe(observeTarget, {
attributes: !0,
attributeFilter: ["class"]
});
}, getDialogMapping = () => ({
treasureMapPopup: "map",
itemViewPopup: "item",
mouseViewPopup: "mouse",
largerImage: "image",
convertibleOpenViewPopup: "convertible",
adventureBookPopup: "adventureBook",
marketplaceViewPopup: "marketplace",
giftSelectorViewPopup: "gifts",
supportPageContactUsForm: "support",
MHCheckout: "premiumShop"
}), onDialogShow = (overlay = null, callback = null, once = !1) => {
let identifier = callback.toString().replaceAll(/[^\w-]/gi, "");
eventRegistry.addEventListener("js_dialog_show", () => {
if (!activejsDialog)
return;
let tokens = activejsDialog.getAllTokens();
if (!tokens || !tokens["{*content*}"] || !tokens["{*content*}"].value || tokens["{*content*}"].value === "" || tokens["{*content*}"].value.includes('data-item-type=""') || // Item view.
tokens["{*content*}"].value.includes('data-mouse-id=""'))
return;
let dialogType = activejsDialog.getAttributes().className.replace("jsDialogFixed", "").replace("wide", "").replace("default", "").replaceAll("  ", " ").replaceAll(" ", ".").trim();
if (dialogType.endsWith(".") && (dialogType = dialogType.slice(0, -1)), window.mhutils = window.mhutils ? __spreadProps(__spreadValues({}, window.mhutils), { lastDialog: { overlay: dialogType } }) : { lastDialog: { overlay: dialogType } }, lastDialog = dialogType, (!overlay || overlay === "all") && typeof callback == "function")
return callback();
let dialogMapping = getDialogMapping();
if (typeof callback == "function" && (overlay === dialogType || overlay === dialogMapping[dialogType]))
return callback();
}, null, once, 0, identifier);
}, dialogHideCallbacks = [], lastDialog = null, onDialogHide = (callback, overlay = null) => {
let dialogMapping = getDialogMapping();
overlay in dialogMapping && !dialogHideCallbacks.some((item) => item.callback === callback) ? dialogHideCallbacks.push({
overlay: dialogMapping[overlay],
callback
}) : dialogHideCallbacks.some((item) => item.callback === callback) || dialogHideCallbacks.push({
overlay: "all",
callback
}), eventRegistry.addEventListener("js_dialog_hide", () => {
lastDialog && dialogHideCallbacks.forEach((item) => {
(lastDialog === item.overlay || item.overlay === "all") && item.callback();
});
});
}, pageChangeCallbacks = [], pageChangeObserver = null, onPageChange = (callbacks3) => {
let tabData = {
travel: { isVisible: !1, selector: "PageTravel" }
};
if (pageChangeCallbacks.push(callbacks3), pageChangeObserver)
return;
pageChangeObserver = !0;
let observer = new MutationObserver(() => {
pageChangeCallbacks.forEach((callback) => {
callback.change && callback.change();
let mhContainer = document.querySelector("#mousehuntContainer");
mhContainer && mhContainer.classList.length > 0 && (tabData = runCallbacks(tabData, mhContainer, callback));
});
}), observeTarget = document.querySelector("#mousehuntContainer");
observeTarget && observer.observe(observeTarget, {
attributes: !0,
attributeFilter: ["class"]
});
}, onTravel = (location, options2) => {
eventRegistry.addEventListener("travel_complete", () => onTravelCallback(location, options2));
}, onTravelCallback = (location, options2) => {
location && location !== getCurrentLocation2() || (options2 != null && options2.shouldAddReminder && showHornMessage({
title: options2.title || "",
text: options2.text || "",
button: options2.button || "Dismiss",
action: options2.action || null
}), options2.callback && options2.callback());
}, callbacks = [], hasAddedNavigationListener = !1, onNavigation = (callback, options2 = {}) => {
let defaults = {
page: !1,
tab: !1,
subtab: !1,
onLoad: !0,
anyTab: !1,
anySubtab: !1
}, { page, tab, subtab, onLoad, anyTab, anySubtab } = Object.assign(defaults, options2), bypassMatch = !page;
onLoad && (bypassMatch || isCurrentPage(
page,
anyTab ? getCurrentTab() : tab,
anySubtab ? getCurrentSubtab() : subtab
)) && callback(), callbacks.push({ callback, page, tab, subtab, bypassMatch }), hasAddedNavigationListener || (addNavigationListeners(), hasAddedNavigationListener = !0);
}, addNavigationListeners = () => {
eventRegistry.addEventListener("set_page", (e) => {
var _a;
let tabs = ((_a = e == null ? void 0 : e.data) == null ? void 0 : _a.tabs) || {}, currentTab = Object.keys(tabs).find((key) => tabs[key].is_active_tab), forceCurrentTab = currentTab == null ? void 0 : currentTab.type;
callbacks.forEach(({ callback, page, tab, subtab, bypassMatch }) => {
if (bypassMatch) {
callback();
return;
}
if (!subtab) {
isCurrentPage(page, tab, !1, getCurrentPage(), forceCurrentTab) && callback();
return;
}
if (currentTab != null && currentTab.subtabs && (currentTab == null ? void 0 : currentTab.subtabs.length) > 0) {
let forceSubtab = currentTab.subtabs.find((searchTab) => searchTab.is_active_subtab).subtab_type;
isCurrentPage(page, tab, subtab, getCurrentPage(), forceCurrentTab, forceSubtab) && callback();
}
});
}), eventRegistry.addEventListener("set_tab", (e) => {
callbacks.forEach(({ callback, page, tab, subtab, bypassMatch }) => {
if (bypassMatch) {
callback();
return;
}
isCurrentPage(page, tab, subtab, getCurrentPage(), e.page_arguments.tab, e.page_arguments.sub_tab) && callback();
});
});
}, onActivation = (module, callback) => {
onEvent("mh-improved-settings-changed", ({ key, value }) => {
key === module && value && callback();
});
}, onDeactivation = (module, callback) => {
onEvent("mh-improved-settings-changed", ({ key, value }) => {
key === module && !value && callback();
});
}, onTurn = (callback, delay = null) => {
onRequest("turns/activeturn.php", () => {
delay = delay || Math.floor(Math.random() * 1e3) + 1e3, setTimeout(callback, delay);
}, !0);
}, onTrapChange = (callback, opts) => {
let options2 = Object.assign({
runOnLoad: !0,
runOnGetTrapComponents: !0
}, opts);
options2 != null && options2.runOnLoad && callback(), onRequest("users/changetrap.php", callback), options2 != null && options2.runOnGetTrapComponents && onRequest("users/gettrapcomponents.php", callback);
};
}
});
var flags, settings, getFlag, getFlags, init_flags = __esm({
"src/utils/flags.js"() {
init_settings();
flags = null, settings = {}, getFlag = (flag) => {
if (flag in settings)
return settings[flag];
let value = getSetting(`experiments.${flag}`, getFlags().includes(flag));
return settings[flag] = value, value;
}, getFlags = () => (flags || (flags = getSetting("override-flags", "").toLowerCase().replaceAll(" ", "").split(",")), flags);
}
});
var require_humanize_duration = __commonJS({
"node_modules/humanize-duration/humanize-duration.js"(exports, module) {
(function() {
var assign = Object.assign || /** @param {...any} destination */
function(destination) {
for (var source, i = 1; i < arguments.length; i++) {
source = arguments[i];
for (var prop in source)
has(source, prop) && (destination[prop] = source[prop]);
}
return destination;
}, isArray = Array.isArray || function(arg) {
return Object.prototype.toString.call(arg) === "[object Array]";
}, GREEK = language(
function(c) {
return c === 1 ? "\u03C7\u03C1\u03CC\u03BD\u03BF\u03C2" : "\u03C7\u03C1\u03CC\u03BD\u03B9\u03B1";
},
function(c) {
return c === 1 ? "\u03BC\u03AE\u03BD\u03B1\u03C2" : "\u03BC\u03AE\u03BD\u03B5\u03C2";
},
function(c) {
return c === 1 ? "\u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1" : "\u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B5\u03C2";
},
function(c) {
return c === 1 ? "\u03BC\u03AD\u03C1\u03B1" : "\u03BC\u03AD\u03C1\u03B5\u03C2";
},
function(c) {
return c === 1 ? "\u03CE\u03C1\u03B1" : "\u03CE\u03C1\u03B5\u03C2";
},
function(c) {
return c === 1 ? "\u03BB\u03B5\u03C0\u03C4\u03CC" : "\u03BB\u03B5\u03C0\u03C4\u03AC";
},
function(c) {
return c === 1 ? "\u03B4\u03B5\u03C5\u03C4\u03B5\u03C1\u03CC\u03BB\u03B5\u03C0\u03C4\u03BF" : "\u03B4\u03B5\u03C5\u03C4\u03B5\u03C1\u03CC\u03BB\u03B5\u03C0\u03C4\u03B1";
},
function(c) {
return (c === 1 ? "\u03C7\u03B9\u03BB\u03B9\u03BF\u03C3\u03C4\u03CC" : "\u03C7\u03B9\u03BB\u03B9\u03BF\u03C3\u03C4\u03AC") + " \u03C4\u03BF\u03C5 \u03B4\u03B5\u03C5\u03C4\u03B5\u03C1\u03BF\u03BB\u03AD\u03C0\u03C4\u03BF\u03C5";
},
","
), LANGUAGES = {
af: language(
"jaar",
function(c) {
return "maand" + (c === 1 ? "" : "e");
},
function(c) {
return c === 1 ? "week" : "weke";
},
function(c) {
return c === 1 ? "dag" : "dae";
},
function(c) {
return c === 1 ? "uur" : "ure";
},
function(c) {
return c === 1 ? "minuut" : "minute";
},
function(c) {
return "sekonde" + (c === 1 ? "" : "s");
},
function(c) {
return "millisekonde" + (c === 1 ? "" : "s");
},
","
),
am: language("\u12D3\u1218\u1275", "\u12C8\u122D", "\u1233\u121D\u1295\u1275", "\u1240\u1295", "\u1230\u12D3\u1275", "\u12F0\u1242\u1243", "\u1230\u12A8\u1295\u12F5", "\u121A\u120A\u1230\u12A8\u1295\u12F5"),
ar: assign(
language(
function(c) {
return ["\u0633\u0646\u0629", "\u0633\u0646\u062A\u0627\u0646", "\u0633\u0646\u0648\u0627\u062A"][getArabicForm(c)];
},
function(c) {
return ["\u0634\u0647\u0631", "\u0634\u0647\u0631\u0627\u0646", "\u0623\u0634\u0647\u0631"][getArabicForm(c)];
},
function(c) {
return ["\u0623\u0633\u0628\u0648\u0639", "\u0623\u0633\u0628\u0648\u0639\u064A\u0646", "\u0623\u0633\u0627\u0628\u064A\u0639"][getArabicForm(c)];
},
function(c) {
return ["\u064A\u0648\u0645", "\u064A\u0648\u0645\u064A\u0646", "\u0623\u064A\u0627\u0645"][getArabicForm(c)];
},
function(c) {
return ["\u0633\u0627\u0639\u0629", "\u0633\u0627\u0639\u062A\u064A\u0646", "\u0633\u0627\u0639\u0627\u062A"][getArabicForm(c)];
},
function(c) {
return ["\u062F\u0642\u064A\u0642\u0629", "\u062F\u0642\u064A\u0642\u062A\u0627\u0646", "\u062F\u0642\u0627\u0626\u0642"][getArabicForm(c)];
},
function(c) {
return ["\u062B\u0627\u0646\u064A\u0629", "\u062B\u0627\u0646\u064A\u062A\u0627\u0646", "\u062B\u0648\u0627\u0646\u064A"][getArabicForm(c)];
},
function(c) {
return ["\u062C\u0632\u0621 \u0645\u0646 \u0627\u0644\u062B\u0627\u0646\u064A\u0629", "\u062C\u0632\u0622\u0646 \u0645\u0646 \u0627\u0644\u062B\u0627\u0646\u064A\u0629", "\u0623\u062C\u0632\u0627\u0621 \u0645\u0646 \u0627\u0644\u062B\u0627\u0646\u064A\u0629"][getArabicForm(c)];
},
","
),
{
delimiter: " \uFEED ",
_hideCountIf2: !0,
_digitReplacements: ["\u06F0", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
),
bg: language(
function(c) {
return ["\u0433\u043E\u0434\u0438\u043D\u0438", "\u0433\u043E\u0434\u0438\u043D\u0430", "\u0433\u043E\u0434\u0438\u043D\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0435\u0441\u0435\u0446\u0430", "\u043C\u0435\u0441\u0435\u0446", "\u043C\u0435\u0441\u0435\u0446\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u0441\u0435\u0434\u043C\u0438\u0446\u0438", "\u0441\u0435\u0434\u043C\u0438\u0446\u0430", "\u0441\u0435\u0434\u043C\u0438\u0446\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u0434\u043D\u0438", "\u0434\u0435\u043D", "\u0434\u043D\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u0447\u0430\u0441\u0430", "\u0447\u0430\u0441", "\u0447\u0430\u0441\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0438\u043D\u0443\u0442\u0438", "\u043C\u0438\u043D\u0443\u0442\u0430", "\u043C\u0438\u043D\u0443\u0442\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u0441\u0435\u043A\u0443\u043D\u0434\u0438", "\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u0441\u0435\u043A\u0443\u043D\u0434\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0438", "\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0438"][getSlavicForm(c)];
},
","
),
bn: language(
"\u09AC\u099B\u09B0",
"\u09AE\u09BE\u09B8",
"\u09B8\u09AA\u09CD\u09A4\u09BE\u09B9",
"\u09A6\u09BF\u09A8",
"\u0998\u09A8\u09CD\u099F\u09BE",
"\u09AE\u09BF\u09A8\u09BF\u099F",
"\u09B8\u09C7\u0995\u09C7\u09A8\u09CD\u09A1",
"\u09AE\u09BF\u09B2\u09BF\u09B8\u09C7\u0995\u09C7\u09A8\u09CD\u09A1"
),
ca: language(
function(c) {
return "any" + (c === 1 ? "" : "s");
},
function(c) {
return "mes" + (c === 1 ? "" : "os");
},
function(c) {
return "setman" + (c === 1 ? "a" : "es");
},
function(c) {
return "di" + (c === 1 ? "a" : "es");
},
function(c) {
return "hor" + (c === 1 ? "a" : "es");
},
function(c) {
return "minut" + (c === 1 ? "" : "s");
},
function(c) {
return "segon" + (c === 1 ? "" : "s");
},
function(c) {
return "milisegon" + (c === 1 ? "" : "s");
},
","
),
ckb: language(
"\u0633\u0627\u06B5",
"\u0645\u0627\u0646\u06AF",
"\u0647\u06D5\u0641\u062A\u06D5",
"\u0695\u06C6\u0698",
"\u06A9\u0627\u0698\u06CE\u0631",
"\u062E\u0648\u0644\u06D5\u06A9",
"\u0686\u0631\u06A9\u06D5",
"\u0645\u06CC\u0644\u06CC \u0686\u0631\u06A9\u06D5",
"."
),
cs: language(
function(c) {
return ["rok", "roku", "roky", "let"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["m\u011Bs\xEDc", "m\u011Bs\xEDce", "m\u011Bs\xEDce", "m\u011Bs\xEDc\u016F"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["t\xFDden", "t\xFDdne", "t\xFDdny", "t\xFDdn\u016F"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["den", "dne", "dny", "dn\xED"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["hodina", "hodiny", "hodiny", "hodin"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["minuta", "minuty", "minuty", "minut"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["sekunda", "sekundy", "sekundy", "sekund"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["milisekunda", "milisekundy", "milisekundy", "milisekund"][getCzechOrSlovakForm(c)];
},
","
),
cy: language(
"flwyddyn",
"mis",
"wythnos",
"diwrnod",
"awr",
"munud",
"eiliad",
"milieiliad"
),
da: language(
"\xE5r",
function(c) {
return "m\xE5ned" + (c === 1 ? "" : "er");
},
function(c) {
return "uge" + (c === 1 ? "" : "r");
},
function(c) {
return "dag" + (c === 1 ? "" : "e");
},
function(c) {
return "time" + (c === 1 ? "" : "r");
},
function(c) {
return "minut" + (c === 1 ? "" : "ter");
},
function(c) {
return "sekund" + (c === 1 ? "" : "er");
},
function(c) {
return "millisekund" + (c === 1 ? "" : "er");
},
","
),
de: language(
function(c) {
return "Jahr" + (c === 1 ? "" : "e");
},
function(c) {
return "Monat" + (c === 1 ? "" : "e");
},
function(c) {
return "Woche" + (c === 1 ? "" : "n");
},
function(c) {
return "Tag" + (c === 1 ? "" : "e");
},
function(c) {
return "Stunde" + (c === 1 ? "" : "n");
},
function(c) {
return "Minute" + (c === 1 ? "" : "n");
},
function(c) {
return "Sekunde" + (c === 1 ? "" : "n");
},
function(c) {
return "Millisekunde" + (c === 1 ? "" : "n");
},
","
),
el: GREEK,
en: language(
function(c) {
return "year" + (c === 1 ? "" : "s");
},
function(c) {
return "month" + (c === 1 ? "" : "s");
},
function(c) {
return "week" + (c === 1 ? "" : "s");
},
function(c) {
return "day" + (c === 1 ? "" : "s");
},
function(c) {
return "hour" + (c === 1 ? "" : "s");
},
function(c) {
return "minute" + (c === 1 ? "" : "s");
},
function(c) {
return "second" + (c === 1 ? "" : "s");
},
function(c) {
return "millisecond" + (c === 1 ? "" : "s");
}
),
eo: language(
function(c) {
return "jaro" + (c === 1 ? "" : "j");
},
function(c) {
return "monato" + (c === 1 ? "" : "j");
},
function(c) {
return "semajno" + (c === 1 ? "" : "j");
},
function(c) {
return "tago" + (c === 1 ? "" : "j");
},
function(c) {
return "horo" + (c === 1 ? "" : "j");
},
function(c) {
return "minuto" + (c === 1 ? "" : "j");
},
function(c) {
return "sekundo" + (c === 1 ? "" : "j");
},
function(c) {
return "milisekundo" + (c === 1 ? "" : "j");
},
","
),
es: language(
function(c) {
return "a\xF1o" + (c === 1 ? "" : "s");
},
function(c) {
return "mes" + (c === 1 ? "" : "es");
},
function(c) {
return "semana" + (c === 1 ? "" : "s");
},
function(c) {
return "d\xEDa" + (c === 1 ? "" : "s");
},
function(c) {
return "hora" + (c === 1 ? "" : "s");
},
function(c) {
return "minuto" + (c === 1 ? "" : "s");
},
function(c) {
return "segundo" + (c === 1 ? "" : "s");
},
function(c) {
return "milisegundo" + (c === 1 ? "" : "s");
},
","
),
et: language(
function(c) {
return "aasta" + (c === 1 ? "" : "t");
},
function(c) {
return "kuu" + (c === 1 ? "" : "d");
},
function(c) {
return "n\xE4dal" + (c === 1 ? "" : "at");
},
function(c) {
return "p\xE4ev" + (c === 1 ? "" : "a");
},
function(c) {
return "tund" + (c === 1 ? "" : "i");
},
function(c) {
return "minut" + (c === 1 ? "" : "it");
},
function(c) {
return "sekund" + (c === 1 ? "" : "it");
},
function(c) {
return "millisekund" + (c === 1 ? "" : "it");
},
","
),
eu: language(
"urte",
"hilabete",
"aste",
"egun",
"ordu",
"minutu",
"segundo",
"milisegundo",
","
),
fa: language(
"\u0633\u0627\u0644",
"\u0645\u0627\u0647",
"\u0647\u0641\u062A\u0647",
"\u0631\u0648\u0632",
"\u0633\u0627\u0639\u062A",
"\u062F\u0642\u06CC\u0642\u0647",
"\u062B\u0627\u0646\u06CC\u0647",
"\u0645\u06CC\u0644\u06CC \u062B\u0627\u0646\u06CC\u0647"
),
fi: language(
function(c) {
return c === 1 ? "vuosi" : "vuotta";
},
function(c) {
return c === 1 ? "kuukausi" : "kuukautta";
},
function(c) {
return "viikko" + (c === 1 ? "" : "a");
},
function(c) {
return "p\xE4iv\xE4" + (c === 1 ? "" : "\xE4");
},
function(c) {
return "tunti" + (c === 1 ? "" : "a");
},
function(c) {
return "minuutti" + (c === 1 ? "" : "a");
},
function(c) {
return "sekunti" + (c === 1 ? "" : "a");
},
function(c) {
return "millisekunti" + (c === 1 ? "" : "a");
},
","
),
fo: language(
"\xE1r",
function(c) {
return c === 1 ? "m\xE1na\xF0ur" : "m\xE1na\xF0ir";
},
function(c) {
return c === 1 ? "vika" : "vikur";
},
function(c) {
return c === 1 ? "dagur" : "dagar";
},
function(c) {
return c === 1 ? "t\xEDmi" : "t\xEDmar";
},
function(c) {
return c === 1 ? "minuttur" : "minuttir";
},
"sekund",
"millisekund",
","
),
fr: language(
function(c) {
return "an" + (c >= 2 ? "s" : "");
},
"mois",
function(c) {
return "semaine" + (c >= 2 ? "s" : "");
},
function(c) {
return "jour" + (c >= 2 ? "s" : "");
},
function(c) {
return "heure" + (c >= 2 ? "s" : "");
},
function(c) {
return "minute" + (c >= 2 ? "s" : "");
},
function(c) {
return "seconde" + (c >= 2 ? "s" : "");
},
function(c) {
return "milliseconde" + (c >= 2 ? "s" : "");
},
","
),
gr: GREEK,
he: language(
function(c) {
return c === 1 ? "\u05E9\u05E0\u05D4" : "\u05E9\u05E0\u05D9\u05DD";
},
function(c) {
return c === 1 ? "\u05D7\u05D5\u05D3\u05E9" : "\u05D7\u05D5\u05D3\u05E9\u05D9\u05DD";
},
function(c) {
return c === 1 ? "\u05E9\u05D1\u05D5\u05E2" : "\u05E9\u05D1\u05D5\u05E2\u05D5\u05EA";
},
function(c) {
return c === 1 ? "\u05D9\u05D5\u05DD" : "\u05D9\u05DE\u05D9\u05DD";
},
function(c) {
return c === 1 ? "\u05E9\u05E2\u05D4" : "\u05E9\u05E2\u05D5\u05EA";
},
function(c) {
return c === 1 ? "\u05D3\u05E7\u05D4" : "\u05D3\u05E7\u05D5\u05EA";
},
function(c) {
return c === 1 ? "\u05E9\u05E0\u05D9\u05D4" : "\u05E9\u05E0\u05D9\u05D5\u05EA";
},
function(c) {
return c === 1 ? "\u05DE\u05D9\u05DC\u05D9\u05E9\u05E0\u05D9\u05D9\u05D4" : "\u05DE\u05D9\u05DC\u05D9\u05E9\u05E0\u05D9\u05D5\u05EA";
}
),
hr: language(
function(c) {
return c % 10 === 2 || c % 10 === 3 || c % 10 === 4 ? "godine" : "godina";
},
function(c) {
return c === 1 ? "mjesec" : c === 2 || c === 3 || c === 4 ? "mjeseca" : "mjeseci";
},
function(c) {
return c % 10 === 1 && c !== 11 ? "tjedan" : "tjedna";
},
function(c) {
return c === 1 ? "dan" : "dana";
},
function(c) {
return c === 1 ? "sat" : c === 2 || c === 3 || c === 4 ? "sata" : "sati";
},
function(c) {
var mod10 = c % 10;
return (mod10 === 2 || mod10 === 3 || mod10 === 4) && (c < 10 || c > 14) ? "minute" : "minuta";
},
function(c) {
var mod10 = c % 10;
return mod10 === 5 || Math.floor(c) === c && c >= 10 && c <= 19 ? "sekundi" : mod10 === 1 ? "sekunda" : mod10 === 2 || mod10 === 3 || mod10 === 4 ? "sekunde" : "sekundi";
},
function(c) {
return c === 1 ? "milisekunda" : c % 10 === 2 || c % 10 === 3 || c % 10 === 4 ? "milisekunde" : "milisekundi";
},
","
),
hi: language(
"\u0938\u093E\u0932",
function(c) {
return c === 1 ? "\u092E\u0939\u0940\u0928\u093E" : "\u092E\u0939\u0940\u0928\u0947";
},
function(c) {
return c === 1 ? "\u0939\u095E\u094D\u0924\u093E" : "\u0939\u092B\u094D\u0924\u0947";
},
"\u0926\u093F\u0928",
function(c) {
return c === 1 ? "\u0918\u0902\u091F\u093E" : "\u0918\u0902\u091F\u0947";
},
"\u092E\u093F\u0928\u091F",
"\u0938\u0947\u0915\u0902\u0921",
"\u092E\u093F\u0932\u0940\u0938\u0947\u0915\u0902\u0921"
),
hu: language(
"\xE9v",
"h\xF3nap",
"h\xE9t",
"nap",
"\xF3ra",
"perc",
"m\xE1sodperc",
"ezredm\xE1sodperc",
","
),
id: language(
"tahun",
"bulan",
"minggu",
"hari",
"jam",
"menit",
"detik",
"milidetik"
),
is: language(
"\xE1r",
function(c) {
return "m\xE1nu\xF0" + (c === 1 ? "ur" : "ir");
},
function(c) {
return "vik" + (c === 1 ? "a" : "ur");
},
function(c) {
return "dag" + (c === 1 ? "ur" : "ar");
},
function(c) {
return "klukkut\xEDm" + (c === 1 ? "i" : "ar");
},
function(c) {
return "m\xEDn\xFAt" + (c === 1 ? "a" : "ur");
},
function(c) {
return "sek\xFAnd" + (c === 1 ? "a" : "ur");
},
function(c) {
return "millisek\xFAnd" + (c === 1 ? "a" : "ur");
}
),
it: language(
function(c) {
return "ann" + (c === 1 ? "o" : "i");
},
function(c) {
return "mes" + (c === 1 ? "e" : "i");
},
function(c) {
return "settiman" + (c === 1 ? "a" : "e");
},
function(c) {
return "giorn" + (c === 1 ? "o" : "i");
},
function(c) {
return "or" + (c === 1 ? "a" : "e");
},
function(c) {
return "minut" + (c === 1 ? "o" : "i");
},
function(c) {
return "second" + (c === 1 ? "o" : "i");
},
function(c) {
return "millisecond" + (c === 1 ? "o" : "i");
},
","
),
ja: language("\u5E74", "\u30F6\u6708", "\u9031", "\u65E5", "\u6642\u9593", "\u5206", "\u79D2", "\u30DF\u30EA\u79D2"),
km: language(
"\u1786\u17D2\u1793\u17B6\u17C6",
"\u1781\u17C2",
"\u179F\u1794\u17D2\u178F\u17B6\u17A0\u17CD",
"\u1790\u17D2\u1784\u17C3",
"\u1798\u17C9\u17C4\u1784",
"\u1793\u17B6\u1791\u17B8",
"\u179C\u17B7\u1793\u17B6\u1791\u17B8",
"\u1798\u17B7\u179B\u17D2\u179B\u17B8\u179C\u17B7\u1793\u17B6\u1791\u17B8"
),
kn: language(
function(c) {
return c === 1 ? "\u0CB5\u0CB0\u0CCD\u0CB7" : "\u0CB5\u0CB0\u0CCD\u0CB7\u0C97\u0CB3\u0CC1";
},
function(c) {
return c === 1 ? "\u0CA4\u0CBF\u0C82\u0C97\u0CB3\u0CC1" : "\u0CA4\u0CBF\u0C82\u0C97\u0CB3\u0CC1\u0C97\u0CB3\u0CC1";
},
function(c) {
return c === 1 ? "\u0CB5\u0CBE\u0CB0" : "\u0CB5\u0CBE\u0CB0\u0C97\u0CB3\u0CC1";
},
function(c) {
return c === 1 ? "\u0CA6\u0CBF\u0CA8" : "\u0CA6\u0CBF\u0CA8\u0C97\u0CB3\u0CC1";
},
function(c) {
return c === 1 ? "\u0C97\u0C82\u0C9F\u0CC6" : "\u0C97\u0C82\u0C9F\u0CC6\u0C97\u0CB3\u0CC1";
},
function(c) {
return c === 1 ? "\u0CA8\u0CBF\u0CAE\u0CBF\u0CB7" : "\u0CA8\u0CBF\u0CAE\u0CBF\u0CB7\u0C97\u0CB3\u0CC1";
},
function(c) {
return c === 1 ? "\u0CB8\u0CC6\u0C95\u0CC6\u0C82\u0CA1\u0CCD" : "\u0CB8\u0CC6\u0C95\u0CC6\u0C82\u0CA1\u0CC1\u0C97\u0CB3\u0CC1";
},
function(c) {
return c === 1 ? "\u0CAE\u0CBF\u0CB2\u0CBF\u0CB8\u0CC6\u0C95\u0CC6\u0C82\u0CA1\u0CCD" : "\u0CAE\u0CBF\u0CB2\u0CBF\u0CB8\u0CC6\u0C95\u0CC6\u0C82\u0CA1\u0CC1\u0C97\u0CB3\u0CC1";
}
),
ko: language("\uB144", "\uAC1C\uC6D4", "\uC8FC\uC77C", "\uC77C", "\uC2DC\uAC04", "\uBD84", "\uCD08", "\uBC00\uB9AC \uCD08"),
ku: language(
"sal",
"meh",
"hefte",
"roj",
"seet",
"deqe",
"saniye",
"m\xEEl\xEE\xE7irk",
","
),
lo: language(
"\u0E9B\u0EB5",
"\u0EC0\u0E94\u0EB7\u0EAD\u0E99",
"\u0EAD\u0EB2\u0E97\u0EB4\u0E94",
"\u0EA1\u0EB7\u0EC9",
"\u0E8A\u0EBB\u0EC8\u0EA7\u0EC2\u0EA1\u0E87",
"\u0E99\u0EB2\u0E97\u0EB5",
"\u0EA7\u0EB4\u0E99\u0EB2\u0E97\u0EB5",
"\u0EA1\u0EB4\u0E99\u0EA5\u0EB4\u0EA7\u0EB4\u0E99\u0EB2\u0E97\u0EB5",
","
),
lt: language(
function(c) {
return c % 10 === 0 || c % 100 >= 10 && c % 100 <= 20 ? "met\u0173" : "metai";
},
function(c) {
return ["m\u0117nuo", "m\u0117nesiai", "m\u0117nesi\u0173"][getLithuanianForm(c)];
},
function(c) {
return ["savait\u0117", "savait\u0117s", "savai\u010Di\u0173"][getLithuanianForm(c)];
},
function(c) {
return ["diena", "dienos", "dien\u0173"][getLithuanianForm(c)];
},
function(c) {
return ["valanda", "valandos", "valand\u0173"][getLithuanianForm(c)];
},
function(c) {
return ["minut\u0117", "minut\u0117s", "minu\u010Di\u0173"][getLithuanianForm(c)];
},
function(c) {
return ["sekund\u0117", "sekund\u0117s", "sekund\u017Ei\u0173"][getLithuanianForm(c)];
},
function(c) {
return ["milisekund\u0117", "milisekund\u0117s", "milisekund\u017Ei\u0173"][getLithuanianForm(c)];
},
","
),
lv: language(
function(c) {
return getLatvianForm(c) ? "gads" : "gadi";
},
function(c) {
return getLatvianForm(c) ? "m\u0113nesis" : "m\u0113ne\u0161i";
},
function(c) {
return getLatvianForm(c) ? "ned\u0113\u013Ca" : "ned\u0113\u013Cas";
},
function(c) {
return getLatvianForm(c) ? "diena" : "dienas";
},
function(c) {
return getLatvianForm(c) ? "stunda" : "stundas";
},
function(c) {
return getLatvianForm(c) ? "min\u016Bte" : "min\u016Btes";
},
function(c) {
return getLatvianForm(c) ? "sekunde" : "sekundes";
},
function(c) {
return getLatvianForm(c) ? "milisekunde" : "milisekundes";
},
","
),
mk: language(
function(c) {
return c === 1 ? "\u0433\u043E\u0434\u0438\u043D\u0430" : "\u0433\u043E\u0434\u0438\u043D\u0438";
},
function(c) {
return c === 1 ? "\u043C\u0435\u0441\u0435\u0446" : "\u043C\u0435\u0441\u0435\u0446\u0438";
},
function(c) {
return c === 1 ? "\u043D\u0435\u0434\u0435\u043B\u0430" : "\u043D\u0435\u0434\u0435\u043B\u0438";
},
function(c) {
return c === 1 ? "\u0434\u0435\u043D" : "\u0434\u0435\u043D\u0430";
},
function(c) {
return c === 1 ? "\u0447\u0430\u0441" : "\u0447\u0430\u0441\u0430";
},
function(c) {
return c === 1 ? "\u043C\u0438\u043D\u0443\u0442\u0430" : "\u043C\u0438\u043D\u0443\u0442\u0438";
},
function(c) {
return c === 1 ? "\u0441\u0435\u043A\u0443\u043D\u0434\u0430" : "\u0441\u0435\u043A\u0443\u043D\u0434\u0438";
},
function(c) {
return c === 1 ? "\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0430" : "\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0438";
},
","
),
mn: language(
"\u0436\u0438\u043B",
"\u0441\u0430\u0440",
"\u0434\u043E\u043B\u043E\u043E \u0445\u043E\u043D\u043E\u0433",
"\u04E9\u0434\u04E9\u0440",
"\u0446\u0430\u0433",
"\u043C\u0438\u043D\u0443\u0442",
"\u0441\u0435\u043A\u0443\u043D\u0434",
"\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434"
),
mr: language(
function(c) {
return c === 1 ? "\u0935\u0930\u094D\u0937" : "\u0935\u0930\u094D\u0937\u0947";
},
function(c) {
return c === 1 ? "\u092E\u0939\u093F\u0928\u093E" : "\u092E\u0939\u093F\u0928\u0947";
},
function(c) {
return c === 1 ? "\u0906\u0920\u0935\u0921\u093E" : "\u0906\u0920\u0935\u0921\u0947";
},
"\u0926\u093F\u0935\u0938",
"\u0924\u093E\u0938",
function(c) {
return c === 1 ? "\u092E\u093F\u0928\u093F\u091F" : "\u092E\u093F\u0928\u093F\u091F\u0947";
},
"\u0938\u0947\u0915\u0902\u0926",
"\u092E\u093F\u0932\u093F\u0938\u0947\u0915\u0902\u0926"
),
ms: language(
"tahun",
"bulan",
"minggu",
"hari",
"jam",
"minit",
"saat",
"milisaat"
),
nl: language(
"jaar",
function(c) {
return c === 1 ? "maand" : "maanden";
},
function(c) {
return c === 1 ? "week" : "weken";
},
function(c) {
return c === 1 ? "dag" : "dagen";
},
"uur",
function(c) {
return c === 1 ? "minuut" : "minuten";
},
function(c) {
return c === 1 ? "seconde" : "seconden";
},
function(c) {
return c === 1 ? "milliseconde" : "milliseconden";
},
","
),
no: language(
"\xE5r",
function(c) {
return "m\xE5ned" + (c === 1 ? "" : "er");
},
function(c) {
return "uke" + (c === 1 ? "" : "r");
},
function(c) {
return "dag" + (c === 1 ? "" : "er");
},
function(c) {
return "time" + (c === 1 ? "" : "r");
},
function(c) {
return "minutt" + (c === 1 ? "" : "er");
},
function(c) {
return "sekund" + (c === 1 ? "" : "er");
},
function(c) {
return "millisekund" + (c === 1 ? "" : "er");
},
","
),
pl: language(
function(c) {
return ["rok", "roku", "lata", "lat"][getPolishForm(c)];
},
function(c) {
return ["miesi\u0105c", "miesi\u0105ca", "miesi\u0105ce", "miesi\u0119cy"][getPolishForm(c)];
},
function(c) {
return ["tydzie\u0144", "tygodnia", "tygodnie", "tygodni"][getPolishForm(c)];
},
function(c) {
return ["dzie\u0144", "dnia", "dni", "dni"][getPolishForm(c)];
},
function(c) {
return ["godzina", "godziny", "godziny", "godzin"][getPolishForm(c)];
},
function(c) {
return ["minuta", "minuty", "minuty", "minut"][getPolishForm(c)];
},
function(c) {
return ["sekunda", "sekundy", "sekundy", "sekund"][getPolishForm(c)];
},
function(c) {
return ["milisekunda", "milisekundy", "milisekundy", "milisekund"][getPolishForm(c)];
},
","
),
pt: language(
function(c) {
return "ano" + (c === 1 ? "" : "s");
},
function(c) {
return c === 1 ? "m\xEAs" : "meses";
},
function(c) {
return "semana" + (c === 1 ? "" : "s");
},
function(c) {
return "dia" + (c === 1 ? "" : "s");
},
function(c) {
return "hora" + (c === 1 ? "" : "s");
},
function(c) {
return "minuto" + (c === 1 ? "" : "s");
},
function(c) {
return "segundo" + (c === 1 ? "" : "s");
},
function(c) {
return "milissegundo" + (c === 1 ? "" : "s");
},
","
),
ro: language(
function(c) {
return c === 1 ? "an" : "ani";
},
function(c) {
return c === 1 ? "lun\u0103" : "luni";
},
function(c) {
return c === 1 ? "s\u0103pt\u0103m\xE2n\u0103" : "s\u0103pt\u0103m\xE2ni";
},
function(c) {
return c === 1 ? "zi" : "zile";
},
function(c) {
return c === 1 ? "or\u0103" : "ore";
},
function(c) {
return c === 1 ? "minut" : "minute";
},
function(c) {
return c === 1 ? "secund\u0103" : "secunde";
},
function(c) {
return c === 1 ? "milisecund\u0103" : "milisecunde";
},
","
),
ru: language(
function(c) {
return ["\u043B\u0435\u0442", "\u0433\u043E\u0434", "\u0433\u043E\u0434\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0435\u0441\u044F\u0446\u0435\u0432", "\u043C\u0435\u0441\u044F\u0446", "\u043C\u0435\u0441\u044F\u0446\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u043D\u0435\u0434\u0435\u043B\u044C", "\u043D\u0435\u0434\u0435\u043B\u044F", "\u043D\u0435\u0434\u0435\u043B\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u0434\u043D\u0435\u0439", "\u0434\u0435\u043D\u044C", "\u0434\u043D\u044F"][getSlavicForm(c)];
},
function(c) {
return ["\u0447\u0430\u0441\u043E\u0432", "\u0447\u0430\u0441", "\u0447\u0430\u0441\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0438\u043D\u0443\u0442", "\u043C\u0438\u043D\u0443\u0442\u0430", "\u043C\u0438\u043D\u0443\u0442\u044B"][getSlavicForm(c)];
},
function(c) {
return ["\u0441\u0435\u043A\u0443\u043D\u0434", "\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u0441\u0435\u043A\u0443\u043D\u0434\u044B"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434", "\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u044B"][getSlavicForm(c)];
},
","
),
sq: language(
function(c) {
return c === 1 ? "vit" : "vjet";
},
"muaj",
"jav\xEB",
"dit\xEB",
"or\xEB",
function(c) {
return "minut" + (c === 1 ? "\xEB" : "a");
},
function(c) {
return "sekond" + (c === 1 ? "\xEB" : "a");
},
function(c) {
return "milisekond" + (c === 1 ? "\xEB" : "a");
},
","
),
sr: language(
function(c) {
return ["\u0433\u043E\u0434\u0438\u043D\u0438", "\u0433\u043E\u0434\u0438\u043D\u0430", "\u0433\u043E\u0434\u0438\u043D\u0435"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0435\u0441\u0435\u0446\u0438", "\u043C\u0435\u0441\u0435\u0446", "\u043C\u0435\u0441\u0435\u0446\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u043D\u0435\u0434\u0435\u0459\u0438", "\u043D\u0435\u0434\u0435\u0459\u0430", "\u043D\u0435\u0434\u0435\u0459\u0435"][getSlavicForm(c)];
},
function(c) {
return ["\u0434\u0430\u043D\u0438", "\u0434\u0430\u043D", "\u0434\u0430\u043D\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u0441\u0430\u0442\u0438", "\u0441\u0430\u0442", "\u0441\u0430\u0442\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0438\u043D\u0443\u0442\u0430", "\u043C\u0438\u043D\u0443\u0442", "\u043C\u0438\u043D\u0443\u0442\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u0441\u0435\u043A\u0443\u043D\u0434\u0438", "\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u0441\u0435\u043A\u0443\u043D\u0434\u0435"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0438", "\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0435"][getSlavicForm(c)];
},
","
),
ta: language(
function(c) {
return c === 1 ? "\u0BB5\u0BB0\u0BC1\u0B9F\u0BAE\u0BCD" : "\u0B86\u0BA3\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD";
},
function(c) {
return c === 1 ? "\u0BAE\u0BBE\u0BA4\u0BAE\u0BCD" : "\u0BAE\u0BBE\u0BA4\u0B99\u0BCD\u0B95\u0BB3\u0BCD";
},
function(c) {
return c === 1 ? "\u0BB5\u0BBE\u0BB0\u0BAE\u0BCD" : "\u0BB5\u0BBE\u0BB0\u0B99\u0BCD\u0B95\u0BB3\u0BCD";
},
function(c) {
return c === 1 ? "\u0BA8\u0BBE\u0BB3\u0BCD" : "\u0BA8\u0BBE\u0B9F\u0BCD\u0B95\u0BB3\u0BCD";
},
function(c) {
return c === 1 ? "\u0BAE\u0BA3\u0BBF" : "\u0BAE\u0BA3\u0BBF\u0BA8\u0BC7\u0BB0\u0BAE\u0BCD";
},
function(c) {
return "\u0BA8\u0BBF\u0BAE\u0BBF\u0B9F" + (c === 1 ? "\u0BAE\u0BCD" : "\u0B99\u0BCD\u0B95\u0BB3\u0BCD");
},
function(c) {
return "\u0BB5\u0BBF\u0BA9\u0BBE\u0B9F\u0BBF" + (c === 1 ? "" : "\u0B95\u0BB3\u0BCD");
},
function(c) {
return "\u0BAE\u0BBF\u0BB2\u0BCD\u0BB2\u0BBF \u0BB5\u0BBF\u0BA8\u0BBE\u0B9F\u0BBF" + (c === 1 ? "" : "\u0B95\u0BB3\u0BCD");
}
),
te: language(
function(c) {
return "\u0C38\u0C02\u0C35\u0C24\u0C4D\u0C38" + (c === 1 ? "\u0C30\u0C02" : "\u0C30\u0C3E\u0C32");
},
function(c) {
return "\u0C28\u0C46\u0C32" + (c === 1 ? "" : "\u0C32");
},
function(c) {
return c === 1 ? "\u0C35\u0C3E\u0C30\u0C02" : "\u0C35\u0C3E\u0C30\u0C3E\u0C32\u0C41";
},
function(c) {
return "\u0C30\u0C4B\u0C1C\u0C41" + (c === 1 ? "" : "\u0C32\u0C41");
},
function(c) {
return "\u0C17\u0C02\u0C1F" + (c === 1 ? "" : "\u0C32\u0C41");
},
function(c) {
return c === 1 ? "\u0C28\u0C3F\u0C2E\u0C3F\u0C37\u0C02" : "\u0C28\u0C3F\u0C2E\u0C3F\u0C37\u0C3E\u0C32\u0C41";
},
function(c) {
return c === 1 ? "\u0C38\u0C46\u0C15\u0C28\u0C41" : "\u0C38\u0C46\u0C15\u0C28\u0C4D\u0C32\u0C41";
},
function(c) {
return c === 1 ? "\u0C2E\u0C3F\u0C32\u0C4D\u0C32\u0C40\u0C38\u0C46\u0C15\u0C28\u0C4D" : "\u0C2E\u0C3F\u0C32\u0C4D\u0C32\u0C40\u0C38\u0C46\u0C15\u0C28\u0C4D\u0C32\u0C41";
}
),
uk: language(
function(c) {
return ["\u0440\u043E\u043A\u0456\u0432", "\u0440\u0456\u043A", "\u0440\u043E\u043A\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0456\u0441\u044F\u0446\u0456\u0432", "\u043C\u0456\u0441\u044F\u0446\u044C", "\u043C\u0456\u0441\u044F\u0446\u0456"][getSlavicForm(c)];
},
function(c) {
return ["\u0442\u0438\u0436\u043D\u0456\u0432", "\u0442\u0438\u0436\u0434\u0435\u043D\u044C", "\u0442\u0438\u0436\u043D\u0456"][getSlavicForm(c)];
},
function(c) {
return ["\u0434\u043D\u0456\u0432", "\u0434\u0435\u043D\u044C", "\u0434\u043D\u0456"][getSlavicForm(c)];
},
function(c) {
return ["\u0433\u043E\u0434\u0438\u043D", "\u0433\u043E\u0434\u0438\u043D\u0430", "\u0433\u043E\u0434\u0438\u043D\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u0445\u0432\u0438\u043B\u0438\u043D", "\u0445\u0432\u0438\u043B\u0438\u043D\u0430", "\u0445\u0432\u0438\u043B\u0438\u043D\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u0441\u0435\u043A\u0443\u043D\u0434", "\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u0441\u0435\u043A\u0443\u043D\u0434\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0456\u043B\u0456\u0441\u0435\u043A\u0443\u043D\u0434", "\u043C\u0456\u043B\u0456\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u043C\u0456\u043B\u0456\u0441\u0435\u043A\u0443\u043D\u0434\u0438"][getSlavicForm(c)];
},
","
),
ur: language(
"\u0633\u0627\u0644",
function(c) {
return c === 1 ? "\u0645\u06C1\u06CC\u0646\u06C1" : "\u0645\u06C1\u06CC\u0646\u06D2";
},
function(c) {
return c === 1 ? "\u06C1\u0641\u062A\u06C1" : "\u06C1\u0641\u062A\u06D2";
},
"\u062F\u0646",
function(c) {
return c === 1 ? "\u06AF\u06BE\u0646\u0679\u06C1" : "\u06AF\u06BE\u0646\u0679\u06D2";
},
"\u0645\u0646\u0679",
"\u0633\u06CC\u06A9\u0646\u0688",
"\u0645\u0644\u06CC \u0633\u06CC\u06A9\u0646\u0688"
),
sk: language(
function(c) {
return ["rok", "roky", "roky", "rokov"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["mesiac", "mesiace", "mesiace", "mesiacov"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["t\xFD\u017Ede\u0148", "t\xFD\u017Edne", "t\xFD\u017Edne", "t\xFD\u017Ed\u0148ov"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["de\u0148", "dni", "dni", "dn\xED"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["hodina", "hodiny", "hodiny", "hod\xEDn"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["min\xFAta", "min\xFAty", "min\xFAty", "min\xFAt"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["sekunda", "sekundy", "sekundy", "sek\xFAnd"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["milisekunda", "milisekundy", "milisekundy", "milisek\xFAnd"][getCzechOrSlovakForm(c)];
},
","
),
sl: language(
function(c) {
return c % 10 === 1 ? "leto" : c % 100 === 2 ? "leti" : c % 100 === 3 || c % 100 === 4 || Math.floor(c) !== c && c % 100 <= 5 ? "leta" : "let";
},
function(c) {
return c % 10 === 1 ? "mesec" : c % 100 === 2 || Math.floor(c) !== c && c % 100 <= 5 ? "meseca" : c % 10 === 3 || c % 10 === 4 ? "mesece" : "mesecev";
},
function(c) {
return c % 10 === 1 ? "teden" : c % 10 === 2 || Math.floor(c) !== c && c % 100 <= 4 ? "tedna" : c % 10 === 3 || c % 10 === 4 ? "tedne" : "tednov";
},
function(c) {
return c % 100 === 1 ? "dan" : "dni";
},
function(c) {
return c % 10 === 1 ? "ura" : c % 100 === 2 ? "uri" : c % 10 === 3 || c % 10 === 4 || Math.floor(c) !== c ? "ure" : "ur";
},
function(c) {
return c % 10 === 1 ? "minuta" : c % 10 === 2 ? "minuti" : c % 10 === 3 || c % 10 === 4 || Math.floor(c) !== c && c % 100 <= 4 ? "minute" : "minut";
},
function(c) {
return c % 10 === 1 ? "sekunda" : c % 100 === 2 ? "sekundi" : c % 100 === 3 || c % 100 === 4 || Math.floor(c) !== c ? "sekunde" : "sekund";
},
function(c) {
return c % 10 === 1 ? "milisekunda" : c % 100 === 2 ? "milisekundi" : c % 100 === 3 || c % 100 === 4 || Math.floor(c) !== c ? "milisekunde" : "milisekund";
},
","
),
sv: language(
"\xE5r",
function(c) {
return "m\xE5nad" + (c === 1 ? "" : "er");
},
function(c) {
return "veck" + (c === 1 ? "a" : "or");
},
function(c) {
return "dag" + (c === 1 ? "" : "ar");
},
function(c) {
return "timm" + (c === 1 ? "e" : "ar");
},
function(c) {
return "minut" + (c === 1 ? "" : "er");
},
function(c) {
return "sekund" + (c === 1 ? "" : "er");
},
function(c) {
return "millisekund" + (c === 1 ? "" : "er");
},
","
),
sw: assign(
language(
function(c) {
return c === 1 ? "mwaka" : "miaka";
},
function(c) {
return c === 1 ? "mwezi" : "miezi";
},
"wiki",
function(c) {
return c === 1 ? "siku" : "masiku";
},
function(c) {
return c === 1 ? "saa" : "masaa";
},
"dakika",
"sekunde",
"milisekunde"
),
{ _numberFirst: !0 }
),
tr: language(
"y\u0131l",
"ay",
"hafta",
"g\xFCn",
"saat",
"dakika",
"saniye",
"milisaniye",
","
),
th: language(
"\u0E1B\u0E35",
"\u0E40\u0E14\u0E37\u0E2D\u0E19",
"\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C",
"\u0E27\u0E31\u0E19",
"\u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07",
"\u0E19\u0E32\u0E17\u0E35",
"\u0E27\u0E34\u0E19\u0E32\u0E17\u0E35",
"\u0E21\u0E34\u0E25\u0E25\u0E34\u0E27\u0E34\u0E19\u0E32\u0E17\u0E35"
),
uz: language(
"yil",
"oy",
"hafta",
"kun",
"soat",
"minut",
"sekund",
"millisekund"
),
uz_CYR: language(
"\u0439\u0438\u043B",
"\u043E\u0439",
"\u04B3\u0430\u0444\u0442\u0430",
"\u043A\u0443\u043D",
"\u0441\u043E\u0430\u0442",
"\u043C\u0438\u043D\u0443\u0442",
"\u0441\u0435\u043A\u0443\u043D\u0434",
"\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434"
),
vi: language(
"n\u0103m",
"th\xE1ng",
"tu\u1EA7n",
"ng\xE0y",
"gi\u1EDD",
"ph\xFAt",
"gi\xE2y",
"mili gi\xE2y",
","
),
zh_CN: language("\u5E74", "\u4E2A\u6708", "\u5468", "\u5929", "\u5C0F\u65F6", "\u5206\u949F", "\u79D2", "\u6BEB\u79D2"),
zh_TW: language("\u5E74", "\u500B\u6708", "\u5468", "\u5929", "\u5C0F\u6642", "\u5206\u9418", "\u79D2", "\u6BEB\u79D2")
};
function language(y, mo, w, d, h, m, s, ms, decimal) {
var result = { y, mo, w, d, h, m, s, ms };
return typeof decimal != "undefined" && (result.decimal = decimal), result;
}
function getArabicForm(c) {
return c === 2 ? 1 : c > 2 && c < 11 ? 2 : 0;
}
function getPolishForm(c) {
return c === 1 ? 0 : Math.floor(c) !== c ? 1 : c % 10 >= 2 && c % 10 <= 4 && !(c % 100 > 10 && c % 100 < 20) ? 2 : 3;
}
function getSlavicForm(c) {
return Math.floor(c) !== c ? 2 : c % 100 >= 5 && c % 100 <= 20 || c % 10 >= 5 && c % 10 <= 9 || c % 10 === 0 ? 0 : c % 10 === 1 ? 1 : c > 1 ? 2 : 0;
}
function getCzechOrSlovakForm(c) {
return c === 1 ? 0 : Math.floor(c) !== c ? 1 : c % 10 >= 2 && c % 10 <= 4 && c % 100 < 10 ? 2 : 3;
}
function getLithuanianForm(c) {
return c === 1 || c % 10 === 1 && c % 100 > 20 ? 0 : Math.floor(c) !== c || c % 10 >= 2 && c % 100 > 20 || c % 10 >= 2 && c % 100 < 10 ? 1 : 2;
}
function getLatvianForm(c) {
return c % 10 === 1 && c % 100 !== 11;
}
function has(obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
}
function getLanguage(options2) {
var possibleLanguages = [options2.language];
if (has(options2, "fallbacks"))
if (isArray(options2.fallbacks) && options2.fallbacks.length)
possibleLanguages = possibleLanguages.concat(options2.fallbacks);
else
throw new Error("fallbacks must be an array with at least one element");
for (var i = 0; i < possibleLanguages.length; i++) {
var languageToTry = possibleLanguages[i];
if (has(options2.languages, languageToTry))
return options2.languages[languageToTry];
if (has(LANGUAGES, languageToTry))
return LANGUAGES[languageToTry];
}
throw new Error("No language found.");
}
function renderPiece(piece, language2, options2) {
var unitName = piece.unitName, unitCount = piece.unitCount, spacer = options2.spacer, maxDecimalPoints = options2.maxDecimalPoints, decimal;
has(options2, "decimal") ? decimal = options2.decimal : has(language2, "decimal") ? decimal = language2.decimal : decimal = ".";
var digitReplacements;
"digitReplacements" in options2 ? digitReplacements = options2.digitReplacements : "_digitReplacements" in language2 && (digitReplacements = language2._digitReplacements);
var formattedCount, normalizedUnitCount = maxDecimalPoints === void 0 ? unitCount : Math.floor(unitCount * Math.pow(10, maxDecimalPoints)) / Math.pow(10, maxDecimalPoints), countStr = normalizedUnitCount.toString();
if (language2._hideCountIf2 && unitCount === 2)
formattedCount = "", spacer = "";
else if (digitReplacements) {
formattedCount = "";
for (var i = 0; i < countStr.length; i++) {
var char = countStr[i];
char === "." ? formattedCount += decimal : formattedCount += digitReplacements[char];
}
} else
formattedCount = countStr.replace(".", decimal);
var languageWord = language2[unitName], word;
return typeof languageWord == "function" ? word = languageWord(unitCount) : word = languageWord, language2._numberFirst ? word + spacer + formattedCount : formattedCount + spacer + word;
}
function getPieces(ms, options2) {
var unitName, i, unitCount, msRemaining, units = options2.units, unitMeasures = options2.unitMeasures, largest = "largest" in options2 ? options2.largest : 1 / 0;
if (!units.length) return [];
var unitCounts = {};
for (msRemaining = ms, i = 0; i < units.length; i++) {
unitName = units[i];
var unitMs = unitMeasures[unitName], isLast = i === units.length - 1;
unitCount = isLast ? msRemaining / unitMs : Math.floor(msRemaining / unitMs), unitCounts[unitName] = unitCount, msRemaining -= unitCount * unitMs;
}
if (options2.round) {
var unitsRemainingBeforeRound = largest;
for (i = 0; i < units.length; i++)
if (unitName = units[i], unitCount = unitCounts[unitName], unitCount !== 0 && (unitsRemainingBeforeRound--, unitsRemainingBeforeRound === 0)) {
for (var j = i + 1; j < units.length; j++) {
var smallerUnitName = units[j], smallerUnitCount = unitCounts[smallerUnitName];
unitCounts[unitName] += smallerUnitCount * unitMeasures[smallerUnitName] / unitMeasures[unitName], unitCounts[smallerUnitName] = 0;
}
break;
}
for (i = units.length - 1; i >= 0; i--)
if (unitName = units[i], unitCount = unitCounts[unitName], unitCount !== 0) {
var rounded = Math.round(unitCount);
if (unitCounts[unitName] = rounded, i === 0) break;
var previousUnitName = units[i - 1], previousUnitMs = unitMeasures[previousUnitName], amountOfPreviousUnit = Math.floor(
rounded * unitMeasures[unitName] / previousUnitMs
);
if (amountOfPreviousUnit)
unitCounts[previousUnitName] += amountOfPreviousUnit, unitCounts[unitName] = 0;
else
break;
}
}
var result = [];
for (i = 0; i < units.length && result.length < largest; i++)
unitName = units[i], unitCount = unitCounts[unitName], unitCount && result.push({ unitName, unitCount });
return result;
}
function formatPieces(pieces, options2) {
var language2 = getLanguage(options2);
if (!pieces.length) {
var units = options2.units, smallestUnitName = units[units.length - 1];
return renderPiece(
{ unitName: smallestUnitName, unitCount: 0 },
language2,
options2
);
}
var conjunction = options2.conjunction, serialComma = options2.serialComma, delimiter;
has(options2, "delimiter") ? delimiter = options2.delimiter : has(language2, "delimiter") ? delimiter = language2.delimiter : delimiter = ", ";
for (var renderedPieces = [], i = 0; i < pieces.length; i++)
renderedPieces.push(renderPiece(pieces[i], language2, options2));
return !conjunction || pieces.length === 1 ? renderedPieces.join(delimiter) : pieces.length === 2 ? renderedPieces.join(conjunction) : renderedPieces.slice(0, -1).join(delimiter) + (serialComma ? "," : "") + conjunction + renderedPieces.slice(-1);
}
function humanizer2(passedOptions) {
var result = function(ms, humanizerOptions) {
ms = Math.abs(ms);
var options2 = assign({}, result, humanizerOptions || {}), pieces = getPieces(ms, options2);
return formatPieces(pieces, options2);
};
return assign(
result,
{
language: "en",
spacer: " ",
conjunction: "",
serialComma: !0,
units: ["y", "mo", "w", "d", "h", "m", "s"],
languages: {},
round: !1,
unitMeasures: {
y: 315576e5,
mo: 26298e5,
w: 6048e5,
d: 864e5,
h: 36e5,
m: 6e4,
s: 1e3,
ms: 1
}
},
passedOptions
);
}
var humanizeDuration2 = assign(humanizer2({}), {
getSupportedLanguages: function() {
var result = [];
for (var language2 in LANGUAGES)
has(LANGUAGES, language2) && language2 !== "gr" && result.push(language2);
return result;
},
humanizer: humanizer2
});
typeof define == "function" && define.amd ? define(function() {
return humanizeDuration2;
}) : typeof module != "undefined" && module.exports ? module.exports = humanizeDuration2 : this.humanizeDuration = humanizeDuration2;
})();
}
});
var import_humanize_duration, humanizer, plainHumanizer, init_humanizer = __esm({
"src/utils/humanizer.js"() {
import_humanize_duration = __toESM(require_humanize_duration()), humanizer = (time, options2) => import_humanize_duration.default.humanizer(__spreadValues({
language: "shortEn",
languages: {
shortEn: {
y: () => "y",
mo: () => "mo",
w: () => "w",
d: () => "d",
h: () => "h",
m: () => "m",
s: () => "s",
ms: () => "ms"
}
}
}, options2))(time), plainHumanizer = (time, options2) => import_humanize_duration.default.humanizer(options2)(time);
}
});
var replaceJournalEntry, makeJournalEntry, getLatestJournalEntryId, addJournalEntry, callbacks2, hasAddedJournalEventListener, addJournalEventListener, onJournalEntry, init_journal = __esm({
"src/utils/journal.js"() {
init_db();
init_location_current();
replaceJournalEntry = (entry, opts = {}) => {
let {
classes = ["short"],
image = !1,
text = "Hello, world!",
time = !1,
location = !1,
callback = () => {
}
} = opts, date = !1;
time && location ? date = `${time} - ${location}` : time ? date = time : location && (date = location), entry.outerHTML = `<div class="entry ${classes.join(" ")}" data-entry-id="journal-entry-${opts.id}">
${image ? `<div class="journalimage"><img src="${image}" border="0"></div>` : ""}
<div class="journalbody">
${date ? `<div class="journaldate">${date}</div>` : ""}
<div class="journaltext">${text}</div>
</div>
</div>`, callback(entry);
}, makeJournalEntry = (opts = {}) => {
if (document.querySelector(`.journalEntries .entry[data-entry-id="journal-entry-${opts.id}"]`))
return;
let entry = document.querySelector(`.journalEntries .entry${opts.before ? `[data-entry-id="${opts.before}"]` : ""}`);
if (!entry)
return;
let newEntry = entry.cloneNode(!0);
newEntry.classList.remove("animated", "newEntry"), entry.before(newEntry), replaceJournalEntry(newEntry, opts);
}, getLatestJournalEntryId = () => {
let entry = [...document.querySelectorAll(".journalEntries .entry")].find((search) => search.getAttribute("data-entry-id"));
return entry ? entry.getAttribute("data-entry-id") : 0;
}, addJournalEntry = (..._0) => __async(void 0, [..._0], function* (opts = {}) {
var _a;
let previousEntryData = yield dbGet("data", `journal-entry-${opts.id}`), previousEntryId = previousEntryData ? (_a = previousEntryData.data) == null ? void 0 : _a.previous : null;
if (!previousEntryId) {
let data = {
id: `journal-entry-${opts.id}`,
previous: getLatestJournalEntryId()
};
if (!opts.noDate) {
if (!opts.time) {
let now = /* @__PURE__ */ new Date();
opts.time = `${now.getHours()}:${now.getMinutes()} ${now.getHours() >= 12 ? "pm" : "am"}`;
}
opts.location || (opts.location = getCurrentLocationName());
}
makeJournalEntry(opts), yield dbSet("data", data);
}
document.addEventListener("journal-entry", (e) => {
if (e.detail && e.detail.getAttribute("data-entry-id") === previousEntryId) {
if (document.querySelector(`.journalEntries .entry[data-entry-id="journal-entry-${opts.id}"]`))
return;
makeJournalEntry(__spreadProps(__spreadValues(__spreadValues({}, opts), previousEntryData.data), {
id: `journal-entry-${opts.id}`,
before: previousEntryId
}));
}
});
}), callbacks2 = [], hasAddedJournalEventListener = !1, addJournalEventListener = () => {
document.addEventListener("journal-entry", (e) => {
for (let { callback } of callbacks2)
callback(e.detail);
});
}, onJournalEntry = (callback, weight = 0) => {
hasAddedJournalEventListener || (addJournalEventListener(), hasAddedJournalEventListener = !0), callbacks2.push({ callback, weight }), callbacks2.sort((a, b) => a.weight - b.weight);
};
}
});
var addItemToGameInfoBar, getCleanSubmenuLabel, addSubmenuItem, removeSubmenuItem, addSubmenuDivider, addIconToMenu, removeIconFromMenu, replaceIconInMenu, getExtensionLink, getExtensionLinkText, init_links = __esm({
"src/utils/links.js"() {
init_elements();
addItemToGameInfoBar = (options2) => {
var _a;
let settings2 = Object.assign({}, {
label: "",
href: "",
class: "",
callback: null,
external: !1,
title: ""
}, options2), safeLabel = settings2.label.replaceAll(/[^\da-z]/gi, "_").toLowerCase();
if (document.querySelector(`#mh-custom-topmenu-${safeLabel}`))
return;
let menu = document.querySelector(".mousehuntHud-gameInfo");
if (!menu)
return;
let item = makeElement("a", ["mousehuntHud-gameInfo-item", "mousehuntHud-custom-menu-item"]);
if (item.id = `mh-custom-topmenu-${safeLabel}`, item.title = settings2.title || settings2.label, item.href = settings2.href || "#", makeElement("div", "name", (_a = settings2.label) != null ? _a : "", item), settings2.class && item.classList.add(settings2.class), settings2.callback && item.addEventListener("click", settings2.callback), settings2.external) {
let externalLinkIconWrapper = makeElement("div", "mousehuntHud-menu");
makeElement("div", "external_icon", "", externalLinkIconWrapper), item.append(externalLinkIconWrapper);
}
menu.insertBefore(item, menu.firstChild);
}, getCleanSubmenuLabel = (label) => label.toLowerCase().replaceAll(/[^\da-z]/g, "-"), addSubmenuItem = (options2) => {
let settings2 = Object.assign({}, {
id: null,
menu: "kingdom",
label: "",
icon: "https://www.mousehuntgame.com/images/ui/hud/menu/special.png",
href: "",
class: "",
callback: null,
external: !1
}, options2), menuTarget = document.querySelector(`.mousehuntHud-menu .${settings2.menu}`);
if (!menuTarget)
return;
menuTarget.classList.contains("hasChildren") || menuTarget.classList.add("hasChildren");
let hasSubmenu = !0, submenu = menuTarget.querySelector("ul");
submenu || (hasSubmenu = !1, submenu = document.createElement("ul"));
let item = makeElement("li", "custom-submenu-item"), label = settings2.label.length > 0 ? settings2.label : settings2.id, cleanLabel = getCleanSubmenuLabel(label), exists = document.querySelector(`#custom-submenu-item-${cleanLabel}`);
if (exists && exists.remove(), item.id = settings2.id ? `custom-submenu-item-${settings2.id}` : `custom-submenu-item-${cleanLabel}`, settings2.class) {
let classes = settings2.class.split(" ");
item.classList.add(...classes);
}
let link = document.createElement("a");
link.href = settings2.href || "#", settings2.callback && link.addEventListener("click", (e) => {
e.preventDefault(), settings2.callback();
});
let icon = makeElement("div", "icon");
icon.style = `background-image: url(${settings2.icon});`, link.append(icon), makeElement("div", "name", settings2.label, link), settings2.external && (makeElement("div", "external_icon", "", link), link.target = "_blank", link.rel = "noopener noreferrer"), item.append(link), submenu.append(item), hasSubmenu || menuTarget.append(submenu);
}, removeSubmenuItem = (id) => {
let item = document.querySelector(`#custom-submenu-item-${getCleanSubmenuLabel(id)}`);
item && item.remove();
}, addSubmenuDivider = (menu, className = "") => {
addSubmenuItem({
menu,
id: `mh-improved-submenu-divider-${className}`,
label: "",
icon: "",
href: "",
class: `mh-improved-submenu-divider ${className}`
});
}, addIconToMenu = (opts) => {
let menu = document.querySelector(".mousehuntHeaderView-gameTabs .mousehuntHeaderView-dropdownContainer");
if (!menu)
return;
let settings2 = Object.assign({}, {
id: "",
classname: "",
href: !1,
title: "",
text: "",
action: null,
position: "prepend"
}, opts);
settings2.classname || (settings2.classname = settings2.id);
let icon = makeElement("a", ["menuItem", settings2.classname], settings2.text);
if (icon.id = settings2.id, settings2.href && (icon.href = settings2.href, icon.title = settings2.title), settings2.action && icon.addEventListener("click", (e) => {
settings2.action(e, icon);
}), settings2.id) {
let exists = document.querySelector(`#${settings2.id}`);
if (exists) {
exists.replaceWith(icon);
return;
}
}
settings2.position === "prepend" ? menu.prepend(icon) : settings2.position === "append" && menu.append(icon);
}, removeIconFromMenu = (id) => {
let icon = document.querySelector(`#${id}`);
icon && icon.remove();
}, replaceIconInMenu = (id, opts) => {
removeIconFromMenu(id), addIconToMenu(opts);
}, getExtensionLink = () => mhImprovedPlatform === "chrome" ? "https://chromewebstore.google.com/detail/mousehunt-improved/fgjkidgknmkhnbeobehlfabjbignhkhm" : mhImprovedPlatform === "firefox" ? "https://addons.mozilla.org/en-US/firefox/addon/mousehunt-improved/" : mhImprovedPlatform === "userscript" ? "https://greasyfork.org/en/scripts/465139-mousehunt-improved" : github, getExtensionLinkText = () => mhImprovedPlatform === "chrome" ? "View on Chrome Web Store" : mhImprovedPlatform === "firefox" ? "View on Firefox Add-ons" : mhImprovedPlatform === "userscript" ? "View on Greasy Fork" : "View on GitHub";
}
});
function isAppleOS(_window = null) {
if (!_window) {
if (typeof window == "undefined")
return !1;
_window = window;
}
let { platform } = _window.navigator;
return platform.includes("Mac") || ["iPad", "iPhone"].includes(platform);
}
function isVersionHigher(version1, version2) {
let version1Parts = version1.split(".").map(Number), version2Parts = version2.split(".").map(Number);
for (let [i, version1Part] of version1Parts.entries()) {
if (version1Part > version2Parts[i])
return !0;
if (version1Part < version2Parts[i])
return !1;
}
return !1;
}
var isApp, isUnsupportedFile, isiFrame, isLegacyHUD, isLoggedIn, isDarkMode, isMHCT, isOverlayVisible, bodyClasses, addBodyClass, removeBodyClass, removeBodyClassByPrefix, getTradableItems, requests, lastRequest, doRequest, sleep, hasMiniCRE, uppercaseFirstLetter, setMultipleTimeout, refreshPage, debounce, init_utils = __esm({
"src/utils/utils.js"() {
init_data();
init_events();
init_debug();
init_page();
init_flags();
isApp = () => typeof app != "undefined" && typeof user != "undefined" && typeof hg != "undefined" && typeof eventRegistry != "undefined", isUnsupportedFile = (path = !1) => (path = path || window.location.pathname, path === "puzzleimage.php" ? !0 : path.match(/\.(jpeg|jpg|gif|png|svg|json|css|js)$/i)), isiFrame = () => window.self !== window.top, isLegacyHUD = () => {
var _a, _b, _c;
return getFlag("legacy-hud") || ((_c = (_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) == null ? void 0 : _b.isLegacy) == null ? void 0 : _c.call(_b));
}, isLoggedIn = () => user && user.user_id && getCurrentPage() !== "login", isDarkMode = () => !!getComputedStyle(document.documentElement).getPropertyValue("--mhdm-white"), isMHCT = () => !!document.querySelector("#mhhh_version"), isOverlayVisible = () => typeof activejsDialog != "undefined" && (activejsDialog == null ? void 0 : activejsDialog.isVisible()), bodyClasses = { added: [], removed: [] }, addBodyClass = (className, force = !1) => {
if (bodyClasses.removed.includes(className) || bodyClasses.added.includes(className)) {
force && (bodyClasses.added.push(className), document.body.classList.add(className));
return;
}
bodyClasses.added.push(className);
let addClass2 = () => {
document.body.classList.add(className);
};
addClass2(), onNavigation(addClass2), onTravel(null, {
/**
* Callback to add the class after travel.
*/
callback: () => {
setTimeout(addClass2, 500);
}
});
}, removeBodyClass = (className) => {
bodyClasses.added = bodyClasses.added.filter((c) => c !== className), bodyClasses.removed.push(className), document.body.classList.remove(className);
}, removeBodyClassByPrefix = (prefix) => {
bodyClasses.added = bodyClasses.added.filter((c) => !c.startsWith(prefix)), bodyClasses.removed.push(prefix), document.body.className = document.body.className.split(" ").filter((c) => !c.startsWith(prefix)).join(" ");
}, getTradableItems = (valueKey = "all") => __async(void 0, null, function* () {
let tradableItems = yield getData("items-tradable");
return tradableItems.sort((a, b) => a.name.localeCompare(b.name)), valueKey === "all" ? tradableItems : tradableItems.map((item) => ({
name: item.name,
value: item[valueKey]
}));
}), requests = {}, lastRequest = 0, doRequest = (_0, ..._1) => __async(void 0, [_0, ..._1], function* (url, formData = {}, skipChecks = !1, skipOpts = {}) {
var _a;
if (!isLoggedIn() || typeof lastReadJournalEntryId == "undefined" || typeof user == "undefined" || !lastReadJournalEntryId || !user || !(user != null && user.unique_hash))
return;
let now = Date.now();
now - lastRequest < 100 && (yield sleep(100 - (now - lastRequest)), lastRequest = Date.now());
let requestKey = Object.keys(formData).length ? `${url}-${JSON.stringify(formData)}` : url, timeRequested = Date.now();
if (debuglog("utils-data", `Making request: ${requestKey} at ${timeRequested}`), requests[requestKey] && !skipChecks) {
if (debuglog("utils-data", `Request already in progress: ${requestKey}`), requests[requestKey].in_progress)
return new Promise((resolve) => {
let timeout = setTimeout(() => __async(void 0, null, function* () {
debuglog("utils-data", `Request timed out: ${requestKey}, starting new request`), clearInterval(interval);
let newRequest = yield doRequest(url, formData, !0);
resolve(newRequest);
}), 2500), interval = setInterval(() => {
debuglog("utils-data", `Checking if request is complete: ${requestKey}`), requests[requestKey].in_progress || (debuglog("utils-data", `Returning saved response: ${requestKey}`), clearInterval(interval), clearTimeout(timeout), resolve(requests[requestKey].response));
}, 100);
});
if (requests[requestKey].time_requested > timeRequested - 350)
return debuglog("utils-data", `Request already completed: ${requestKey}`), requests[requestKey].response;
}
debuglog("utils-data", `Starting request: ${requestKey}`), requests[requestKey] = {
in_progress: !0,
time_requested: timeRequested
};
let form = new FormData();
!skipOpts.skipSn && !skipOpts.skipAll && form.append("sn", "Hitgrab"), !skipOpts.skipHgIsAjax && !skipOpts.skipAll && form.append("hg_is_ajax", 1), !skipOpts.skipLastReadJournalEntryId && !skipOpts.skipAll && form.append("last_read_journal_entry_id", lastReadJournalEntryId != null ? lastReadJournalEntryId : 0), !skipOpts.skipUh && !skipOpts.skipAll && form.append("uh", (_a = user == null ? void 0 : user.unique_hash) != null ? _a : ""), Object.keys(formData).forEach((key) => form.append(key, formData[key]));
let requestBody = new URLSearchParams(form).toString(), response, attempts = 0;
for (; !response && attempts < 3; )
try {
response = yield fetch(callbackurl ? `${callbackurl}${url}` : `https://www.mousehuntgame.com/${url}`, {
method: "POST",
body: requestBody,
headers: {
"Content-Type": "application/x-www-form-urlencoded"
}
});
} catch (error) {
attempts++, console.error(`Attempt ${attempts} failed. Retrying...`, error);
}
attempts >= 3 && console.error("Failed to fetch after maximum attempts");
let data;
try {
data = yield skipOpts.skipJson ? response.text() : response.json();
} catch (error) {
return console.error(`Error parsing response for ${url}:`, error, url, formData, response), !1;
}
return requests[requestKey] = {
time_requested: timeRequested,
response: data
}, data;
}), sleep = (ms, elapsed = 0) => __async(void 0, null, function* () {
return new Promise((resolve) => setTimeout(resolve, ms - elapsed));
});
hasMiniCRE = () => {
if (sessionGet("has-mini-cre"))
return !0;
if (getCurrentPage() !== "camp")
return;
let cre = document.querySelector(".min-luck-button");
return sessionSet("has-mini-cre", !!cre), !!cre;
}, uppercaseFirstLetter = (string) => string.charAt(0).toUpperCase() + string.slice(1), setMultipleTimeout = (fn, ms) => {
(Array.isArray(ms) ? ms : [ms]).forEach((time) => setTimeout(fn, time));
}, refreshPage = (delay = 0) => {
setTimeout(() => {
window.location.reload();
}, delay);
}, debounce = (func, delay = 100) => {
let timeout;
return (...args) => {
clearTimeout(timeout), timeout = setTimeout(() => func(...args), delay);
};
};
}
});
var getRelicHunterLocation, travelTo, init_location = __esm({
"src/utils/location.js"() {
init_utils();
init_data();
init_elements();
getRelicHunterLocation = () => {
let cacheKey = "mh-improved-relic-hunter-location", cached = sessionGet(cacheKey);
return cached && (cached = JSON.parse(cached)), cached && cached.expiry > Date.now() ? cached.data : fetch("https://api.mouse.rip/relic-hunter", { headers: getHeaders() }).then((response) => response.json()).then((data) => {
let expiry = Date.now() + 3e5;
return sessionSet(cacheKey, JSON.stringify({ expiry, data })), data;
}).catch((error) => {
console.error(error);
});
}, travelTo = (location) => __async(void 0, null, function* () {
var _a, _b;
if (!((_b = (_a = app == null ? void 0 : app.pages) == null ? void 0 : _a.TravelPage) != null && _b.travel))
return;
let header = document.querySelector(".mousehuntHeaderView");
if (!header)
return;
let existing = header.querySelector(".mh-improved-travel-message");
existing && existing.remove();
let travelMessage = makeElement("div", ["mh-improved-travel-message", "travelPage-map-message"], "Traveling...");
if (header.append(travelMessage), app.pages.TravelPage.travel(location), yield sleep(1e3), getCurrentLocation() === location) {
travelMessage.remove();
return;
}
let travelRequest = yield doRequest("managers/ajax/users/changeenvironment.php", {
destination: location
});
travelRequest != null && travelRequest.success ? location.reload() : (travelMessage.textContent = "Failed to travel. Please try again.", travelMessage.classList.add("error"));
});
}
});
var mapper, mapData2, mapModel, getMapData, setMapData, getLastMaptain, setLastMaptain, cacheFinishedMap, showTravelConfirmation, showTravelConfirmationForMice, showTravelConfirmationNoDetails, addMHCTData, getCachedValue, setCachedValue, getArEl, getHighestArText, getArForMouse, getArText, getHighestArForMouse, getLocationForMouse, init_maps = __esm({
"src/utils/maps.js"() {
init_data();
init_db();
init_location_current();
init_global();
init_elements();
mapper = (key = !1) => {
if (key) {
let mapperData = getGlobal("mapper");
return !mapperData || !mapperData[key] ? !1 : mapperData[key];
}
return getGlobal("mapper");
}, mapData2 = () => {
let m = mapper();
return m ? m.mapData : {};
}, mapModel = () => {
let m = mapper();
return m ? m.mapModel : {};
}, getMapData = (mapId = !1, strict = !1) => __async(void 0, null, function* () {
if (mapId !== !1) {
let sessionMap = yield cacheGet(`map-${mapId}`);
if (sessionMap)
return sessionMap;
}
if (strict)
return !1;
let localStorageMap = yield cacheGet("map-last");
return localStorageMap || !1;
}), setMapData = (mapId, theMapData) => {
cacheSet(`map-${mapId}`, theMapData), cacheSet("map-last", theMapData);
}, getLastMaptain = () => __async(void 0, null, function* () {
return (yield cacheGet("map-last-maptain")) || "";
}), setLastMaptain = (id) => {
cacheSet("map-last-maptain", id);
}, cacheFinishedMap = () => __async(void 0, null, function* () {
let completedMap = user.quests.QuestRelicHunter.maps.find((map) => map.is_complete);
if (!(completedMap != null && completedMap.map_id))
return;
let data = yield getMapData(completedMap.map_id);
if (!data)
return;
let maptain = data.hunters.find((hunter) => hunter.captain);
setLastMaptain(maptain.user_id || "");
}), showTravelConfirmation = (environment, theMapModel) => {
if (!(environment != null && environment.id) || !(environment != null && environment.type))
return;
let environmentData = theMapModel.getEnvironmentById(environment.id), environmentGoals = theMapModel.getGoalsByEnvironment(environment.id), noun = environmentData.num_missing_goals === 1 ? "mouse" : "mice";
showTravelConfirmationForMice({
title: `Travel to ${environmentData.name}?`,
description: `This area has ${environmentData.num_missing_goals} missing ${noun}.`,
environment: environment.type,
templateData: {
environment: environmentData,
goals: environmentGoals
}
});
}, showTravelConfirmationForMice = ({ title, description, environment, templateData }) => {
let dialog = new hg.views.TreasureMapDialogView();
dialog.setTitle(title), dialog.setDescription(description), dialog.setContent(hg.utils.TemplateUtil.renderFromFile("TreasureMapDialogView", "travel", templateData)), dialog.setCssClass("confirm"), dialog.setContinueAction("Travel", () => {
app.pages.TravelPage.travel(environment), setTimeout(() => {
jsDialog().hide();
}, 250);
}), hg.controllers.TreasureMapController.showDialog(dialog);
}, showTravelConfirmationNoDetails = (environment) => __async(void 0, null, function* () {
let templateData = {
environment: {
name: environment.name || environment.id || "",
id: environment.id,
type: environment.id,
thumb: environment.image || environment.thumb,
header: environment.header || environment.image || environment.thumb,
goals: environment.goals || [],
num_completed_goals: 0,
num_total_goals: 0,
hunters: [],
is_current_environment: getCurrentLocation2() === environment.id,
can_travel: !0,
num_missing_goals: 0
},
goals: []
};
showTravelConfirmationForMice({
title: `Travel to ${environment.name}?`,
description: "",
environment: environment.type,
templateData
});
}), addMHCTData = (mouse, appendTo, type2 = "mouse") => __async(void 0, null, function* () {
if (appendTo.querySelector(`#mhct-${mouse.unique_id}-${type2}`))
return;
let mhctJson = yield getArForMouse(mouse.unique_id, type2), mhctDiv = makeElement("div", "mhct-data");
mhctDiv.id = `mhct-${mouse.unique_id}-${type2}`;
let header = makeElement("div", "mhct-title");
makeElement("span", "mhct-title-text", type2 === "item" ? "Drop Rates" : "Attraction Rates", header);
let mhctLink = makeElement("a", "mhct-link", "View on MHCT \u2192");
if (mhctLink.target = "_mhct", !mouse.name) {
let nameEl = document.querySelector(".treasureMapView-highlight-name");
mouse.name = nameEl ? nameEl.innerText : mouse.unique_id;
}
if (mhctLink.href = `https://api.mouse.rip/mhct-redirect${type2 === "item" ? "-item" : ""}/${mouse.unique_id}`, header.append(mhctLink), mhctDiv.append(header), !mhctJson.slice)
return;
let environments5 = yield getData("environments");
if (mhctJson.slice(0, 5).forEach((mhct) => {
let mhctRow = makeElement("div", "mhct-row"), location = makeElement("div", "mhct-location");
makeElement("span", "mhct-location-text", mhct.location, location), mhct.stage && makeElement("span", "mhct-stage", mhct.stage, location);
let environment = environments5.find((env) => env.name === mhct.location);
environment || mhctRow.classList.add("mhct-row-no-env"), mhctRow.append(location), makeElement("div", "mhct-bait", mhct.cheese, mhctRow);
let mhctRate = (Math.round((type2 === "item" ? mhct.drop_pct : mhct.rate / 100) * 100) / 100).toFixed(1);
makeElement("div", "mhct-rate", `${mhctRate}%`, mhctRow), mhctRow.addEventListener("click", () => {
var _a, _b;
if (environment && environment.id === getCurrentLocation2() && ((_b = (_a = app == null ? void 0 : app.pages) == null ? void 0 : _a.CampPage) != null && _b.showTrapSelector)) {
app.pages.CampPage.showTrapSelector("bait"), jsDialog().hide();
return;
}
let travelEnvironment = mapper("mapData").environments.find((env) => env.type === environment.id);
showTravelConfirmation(travelEnvironment, mapModel());
}), mhctDiv.append(mhctRow);
}), mhctJson.length === 0) {
let mhctRow = makeElement("div", "mhct-row");
makeElement("div", "mhct-no-data", "No data available", mhctRow), mhctDiv.append(mhctRow);
}
appendTo.append(mhctDiv);
}), getCachedValue = (key) => __async(void 0, null, function* () {
var _a;
let value = yield dbGet("cache", key);
return (_a = value == null ? void 0 : value.data) != null && _a.value ? value.data.value : null;
}), setCachedValue = (key, value) => __async(void 0, null, function* () {
yield dbSet("cache", { id: key, value });
}), getArEl = (id, type2 = "mouse") => __async(void 0, null, function* () {
let ar = yield getArText(id, type2), arType = "location";
if (!ar) {
if (ar = yield getHighestArText(id, type2), !ar || ar.length === 0)
return makeElement("div", ["mh-ui-ar", "mh-ui-no-ar"], "?");
arType = "highest";
}
let arDifficulty = "easy";
ar >= 99 ? arDifficulty = "guaranteed" : ar >= 59 ? arDifficulty = "super-easy" : ar >= 49 ? arDifficulty = "easy" : ar >= 39 ? arDifficulty = "medium" : ar >= 27 ? arDifficulty = "hard" : ar >= 14 ? arDifficulty = "kinda-hard" : ar >= 5 ? arDifficulty = "super-hard" : ar >= 2 ? arDifficulty = "extreme" : arDifficulty = "impossible", ar.toString().slice(-3) === ".00" && (ar = ar.toString().slice(0, -3));
let arEl = makeElement("div", ["mh-ui-ar", `mh-ui-ar-${arType}`, `mh-ui-ar-${arDifficulty}`], `${ar}%`);
return arEl.title = `Attraction rate: ${ar}%`, arEl.setAttribute("data-ar", ar), arEl;
}), getHighestArText = (id, type2 = "mouse") => __async(void 0, null, function* () {
let highest = yield getHighestArForMouse(id, type2);
return highest != null ? highest : !1;
}), getArForMouse = (id, type2 = "mouse") => __async(void 0, null, function* () {
let mhctJson = [], cacheKey = `${type2}-${id}`, cachedAr = yield getCachedValue(cacheKey);
if (cachedAr)
return cachedAr;
let isItem = type2 === "item", mhctPath = isItem ? "mhct-item" : "mhct", mhctData = [], data = mapData2() || {}, mapType = (data == null ? void 0 : data.map_type) || "", url = `https://api.mouse.rip/${mhctPath}/${id}`;
if (mapType.toLowerCase().includes("halloween") && (url = `https://api.mouse.rip/${mhctPath}/${id}-hlw_22`), !isItem && (id === "m400" || id == 547))
return [];
try {
mhctData = yield fetch(url, { headers: getHeaders() });
} catch (error) {
console.error("Error fetching MHCT data:", error), yield new Promise((resolve) => setTimeout(resolve, 500));
try {
mhctData = yield fetch(url, { headers: getHeaders() });
} catch (errorRetry) {
return console.error("Error fetching MHCT data:", errorRetry), [];
}
}
if (!mhctData.ok)
return [];
if (mhctJson = yield mhctData.json(), !mhctJson || mhctJson.length === 0)
return [];
if (isItem)
for (let rate of mhctJson)
rate.rate = Number.parseInt(rate.drop_pct * 100), delete rate.drop_ct;
return mhctJson.error ? [] : (mhctJson = mhctJson.filter((rate) => rate.rate === 0 ? !1 : (rate.rate === 9999 && (rate.rate = 1e4), !0)), yield setCachedValue(cacheKey, mhctJson), mhctJson);
}), getArText = (id, type2 = "mouse") => __async(void 0, null, function* () {
let rates = yield getArForMouse(id, type2);
if (!rates || rates.length === 0)
return !1;
let rate = rates[0];
return rate ? (rate.rate / 100).toFixed(2) : !1;
}), getHighestArForMouse = (id, type2 = "mouse") => __async(void 0, null, function* () {
let rates = yield getArForMouse(id, type2);
if (!rates || rates.length === 0 || Object.keys(rates).length === 0 && rates.constructor === Object || !rates.sort)
return 0;
rates.sort((a, b) => b.rate - a.rate);
let rate = rates[0];
return rate ? rate.rate / 100 : 0;
}), getLocationForMouse = (mouse, type2 = "mouse") => __async(void 0, null, function* () {
let environments5 = yield getData("environments"), rates = yield getArForMouse(mouse, type2);
if (!rates || rates.length === 0)
return !1;
let rate = rates[0];
if (!rate)
return !1;
let originalName = rate.location, twistedMap = {
"Twisted Garden": "Living Garden",
"Sand Crypts": "Sand Dunes",
"Cursed City": "Lost City"
};
twistedMap[rate.location] && (rate.location = twistedMap[rate.location]);
let environment = environments5.find((env) => env.name === rate.location);
return environment ? (environment.name = originalName, environment) : !1;
});
}
});
var page_error_default, init_page_error = __esm({
"src/utils/styles/page-error.css"() {
page_error_default = `body.PageError .pageFrameView,body.PageLockError .pageFrameView{grid-template-rows:[page-start] auto [page-end];grid-template-columns:[first] auto [content-start] 400px [content-end] auto [last]}body.PageError .pageFrameView-column.right,body.PageLockError .pageFrameView-column.right{background:#bad4ed url(https://www.mousehuntgame.com/images/ui/backgrounds/app_frame_right.gif) repeat-y 0% 0%!important;border:none}body.PageError .pageFrameView-column.left,body.PageLockError .pageFrameView-column.left{background:#bad4ed url(https://www.mousehuntgame.com/images/ui/backgrounds/app_frame_left.gif) repeat-y 100% 0%!important;border:none}body.PageError,body.PageLockError{background:url(https://www.mousehuntgame.com/images/map/login-page/standard/1.jpg) no-repeat top center;background-position:center center;background-size:cover;transition:5s ease-in-out}body.PageError .pageFrameView-content,body.PageLockError .pageFrameView-content{min-height:calc(80vh - 110px);background:transparent}body.PageError .pageFrameView-footer,body.PageLockError .pageFrameView-footer{display:flex;flex-flow:row wrap;row-gap:20px;align-items:center;justify-content:center;background-color:#ffffffb3;transition:.3s}body.PageError .pageFrameView-footer-linksContainer,body.PageLockError .pageFrameView-footer-linksContainer{flex:0 0 100%}body.PageError .pageFrameView-footer a img,body.PageLockError .pageFrameView-footer a img{opacity:.4;transition:.3s;transform:scale(.8)}body.PageError .pageFrameView-footer-links.terms,body.PageLockError .pageFrameView-footer-links.terms{text-align:center}body.PageError .pageFrameView-footer a:hover img,body.PageLockError .pageFrameView-footer a:hover img{opacity:1;transform:scale(1)}body.PageError .maintenanceMessage:hover:after,body.PageLockError .maintenanceMessage:hover:after{transform:rotate(-3deg) scale(1.2)}body.PageError .pageFrameView-contentContainer,body.PageLockError .pageFrameView-contentContainer{background:none}body.PageError .container,body.PageLockError .container{background-color:transparent;box-shadow:none}@media screen and (min-width: 501px){body.PageError .pageFrameView,body.PageLockError .pageFrameView{grid-template-columns:[first] auto [content-start] 500px [content-end] auto [last]}}@media only screen and (min-width: 801px){body.PageError .pageFrameView,body.PageLockError .pageFrameView{grid-template-columns:[first] auto [content-start] 800px [content-end] auto [last]}}@media only screen and (max-width: 810px){body.PageError.noSidebar .pageFrameView,body.PageLockError.noSidebar .pageFrameView{background:none!important}}div[style*="margin:12px 0px 12px 0px; padding:12px; border:1px solid #ccc;"]{margin:10px!important;margin-top:20vh!important;background-color:#ffffffd9;border:2px solid #000!important}div[style*="float:left"]{width:230px;height:230px;background-image:url(https://i.mouse.rip/error-mouse.png);transition:.3s ease-in-out}div[style*="float:left"] img{display:none}.PageError div[style*="float:left"]{background:none}.PageError div[style*="float:left"] img{display:block;mix-blend-mode:darken}div[style*="margin:24px 0px 0px 230px;"]{display:flex;flex-direction:column;justify-content:space-evenly;float:none;height:190px}.PageLockError div[style*="float:left"]:hover{transform:translate(10px)}.PageLockError div[style*="float:left"]:active{transform:translate(20px)}
`;
}
});
var errors_default, init_errors = __esm({
"src/utils/styles/errors.css"() {
errors_default = `.mousehunt-improved-error{position:fixed;bottom:50px;left:5%;z-index:20;display:flex;flex-direction:column;align-items:stretch;max-width:375px;padding:10px 20px;background-color:#ffbfbf;border:1px solid #4e2727;border-radius:6px;box-shadow:0 0 10px 1px #bc7b7b}.mousehunt-improved-error h1{margin:0 0 .75em;font-size:1.3em;font-weight:900;color:#9f2223}.mousehunt-improved-error p{margin:.5em 0;font-size:1em;line-height:1.5}textarea.mousehunt-improved-error-message{min-height:50px;font-size:11px;background-color:#ffbfbf;border-color:#dc7878}.mousehunt-improved-error-close{position:absolute;top:5px;right:5px;color:#fff;background-color:#9f2223;border:1px solid #4e2727;border-radius:1px}.mousehunt-improved-error-close:hover,.mousehunt-improved-error-close:focus{background-color:#e03a3a}
`;
}
});
var page_maintenance_default, init_page_maintenance = __esm({
"src/utils/styles/page-maintenance.css"() {
page_maintenance_default = `body.PageMaintenance .pageFrameView{grid-template-rows:[page-start] auto [page-end];grid-template-columns:[first] auto [content-start] 400px [content-end] auto [last]}body.PageMaintenance .pageFrameView-column.right{background:#bad4ed url(https://www.mousehuntgame.com/images/ui/backgrounds/app_frame_right.gif) repeat-y 0% 0%!important;border:none}body.PageMaintenance .pageFrameView-column.left{background:#bad4ed url(https://www.mousehuntgame.com/images/ui/backgrounds/app_frame_left.gif) repeat-y 100% 0%!important;border:none}body.PageMaintenance{background:url(https://www.mousehuntgame.com/images/map/login-page/standard/1.jpg) no-repeat top center}body.PageMaintenance .pageFrameView-content{min-height:calc(100vh - 110px);background:transparent}body.PageMaintenance .pageFrameView-footer{display:flex;flex-flow:row wrap;row-gap:20px;align-items:center;justify-content:center;background-color:#ffffffb3;transition:.3s}body.PageMaintenance .pageFrameView-footer-linksContainer{flex:0 0 100%}body.PageMaintenance .pageFrameView-footer a img{opacity:.4;transition:.3s;transform:scale(.8)}body.PageMaintenance .pageFrameView-footer-links.terms{text-align:center}body.PageMaintenance .pageFrameView-footer a:hover img{opacity:1;transform:scale(1)}body.PageMaintenance .maintenanceBody{position:relative;min-height:unset;background:transparent;transition:background-size .3s;animation:mh-improved-hue-rotate 20s 20s linear infinite}body.PageMaintenance .maintenanceMessage{background-color:transparent}body.PageMaintenance .maintenanceMessage:after{position:absolute;top:0;left:0;width:150px;height:150px;content:"";background:url(https://i.mouse.rip/maintenance-mousey.png) no-repeat center / contain;transition:.3s;transform-origin:center}body.PageMaintenance .maintenanceMessage:hover:after{transform:rotate(-3deg) scale(1.2)}body.PageMaintenance .maintenanceHeader{background-image:url(https://i.mouse.rip/maintenance.png)}@keyframes mh-improved-hue-rotate{0%{filter:hue-rotate(0deg)}50%{filter:hue-rotate(360deg)}to{filter:hue-rotate(0deg)}}body.PageMaintenance .maintenanceDebugInfo{position:absolute;right:10px;bottom:10px}body.PageMaintenance .pageFrameView-contentContainer{background:none}body.PageMaintenance .container{background-color:transparent;box-shadow:none}body.PageMaintenance .maintenanceContainer{background-color:#ffffffd9;border:1px solid #000;border-radius:5px;box-shadow:0 1px 3px #383838}@media screen and (min-width: 501px){body.PageMaintenance .pageFrameView{grid-template-columns:[first] auto [content-start] 500px [content-end] auto [last]}body.PageMaintenance .maintenanceMessage:after{width:175px;height:175px}}@media only screen and (min-width: 801px){body.PageMaintenance .pageFrameView{grid-template-columns:[first] auto [content-start] 800px [content-end] auto [last]}body.PageMaintenance .maintenanceMessage:after{top:-80px;left:-10px;width:300px;height:300px}}@media only screen and (max-width: 810px){body.PageMaintenance.noSidebar .pageFrameView{background:none!important}}
`;
}
});
var showErrorMessage, showSuccessMessage, showLoadingError, maybeDoMaintenance, showLoadingPopupError, showLoadingPopup, init_messages = __esm({
"src/utils/messages.js"() {
init_debug();
init_elements();
init_page_error();
init_errors();
init_page_maintenance();
showErrorMessage = (options2) => {
let {
message,
append,
before = !1,
after = !1,
classname = [],
type: type2 = "error"
} = options2, typeClass = `mh-ui-${type2}-message`, existing = document.querySelector(`.${typeClass}`);
existing && existing.remove();
let error = makeElement("div", [`mh-ui-${type2}-message`, "mh-ui-fade", classname], message);
append && (before ? append.before(error) : after ? append.after(error) : append.append(error)), setTimeout(() => {
error.classList.add("mh-ui-fade-in");
}, 10), setTimeout(() => {
error.classList.remove("mh-ui-fade-in"), error.classList.add("mh-ui-fade-out");
}, 2e3), setTimeout(() => {
error.remove();
}, 2500);
}, showSuccessMessage = (opts) => {
opts.type = "success", showErrorMessage(opts);
};
hadAddedErrorStyles = !1;
showLoadingError = (e) => {
debug("Error loading MouseHunt Improved:", e);
let errorElement = makeElement("div", "mousehunt-improved-error");
if (makeElement("h1", "mousehunt-improved-error-title", "Error loading MouseHunt Improved", errorElement), e && e.message && e.stack) {
let errorText = makeElement("textarea", "mousehunt-improved-error-message");
errorText.value = `${e.message}
${e.stack}`, errorElement.append(errorText);
}
makeElement("p", "mousehunt-improved-error-message", 'There was an error loading MouseHunt Improved. Try refreshing the page. If the error persists, please add an issue to the <a href="https://github.com/MHCommunity/mousehunt-improved">GitHub repo</a>.', errorElement);
let closeButton = makeElement("button", "mousehunt-improved-error-close", "Close");
if (closeButton.addEventListener("click", () => {
errorElement.remove();
}), errorElement.append(closeButton), document.body.append(errorElement), hadAddedErrorStyles)
return;
let errorStylesEl = makeElement("style", "mh-improved-error-styles", errors_default);
document.head.append(errorStylesEl), hadAddedErrorStyles = !0;
}, maybeDoMaintenance = () => {
let maintenance = document.querySelector("body.PageMaintenance");
if (maintenance) {
let maintenanceStylesEl = makeElement("style", "mh-improved-maintenance-styles", page_maintenance_default);
document.head.append(maintenanceStylesEl);
}
let errorLockPage = document.querySelector("body.PageLockError"), errorPage = document.querySelector("body.PageError");
if (errorLockPage || errorPage) {
let errorPageStylesEl = makeElement("style", "mh-improved-error-page-styles", page_error_default);
document.head.append(errorPageStylesEl);
}
if (!(maintenance || errorLockPage || errorPage))
return;
let backgrounds = [
"https://www.mousehuntgame.com/images/map/login-page/standard/2.jpg",
"https://www.mousehuntgame.com/images/map/login-page/standard/3.jpg",
"https://www.mousehuntgame.com/images/map/login-page/standard/4.jpg",
"https://www.mousehuntgame.com/images/map/login-page/standard/5.jpg",
"https://www.mousehuntgame.com/images/map/login-page/promo/bountiful_beanstalk.jpg",
"https://www.mousehuntgame.com/images/map/login-page/promo/school_of_sorcery.jpg",
"https://www.mousehuntgame.com/images/map/login-page/promo/draconic_depths.jpg"
], background = backgrounds[Math.floor(Math.random() * backgrounds.length)];
document.body.style.backgroundImage = `url(${background})`;
}, showLoadingPopupError = (options2) => {
let popup = new jsDialog();
popup.setTemplate("error"), popup.setAttributes({ className: "error" }), popup.addToken("{*title*}", options2.title), popup.addToken("{*content*}", options2.content || ""), popup.show();
}, showLoadingPopup = (title) => {
let popup = new jsDialog();
popup.setTemplate("loading"), popup.setAttributes({ className: "loading mh-improved-loading" }), popup.show();
let element2 = document.querySelector("#overlayPopup .jsDialog .title");
if (!element2)
return {
popup,
title: null,
text: null,
/**
* Set the text of the loading popup.
*/
setText: () => {
},
/**
* Set the title of the loading popup.
*/
setTitle: () => {
},
/**
* Show the loading popup.
*/
show: () => {
},
/**
* Hide the loading popup.
*/
hide: () => {
}
};
element2.textContent = title;
let loadingText = makeElement("div", "loading-text", "", element2);
return {
popup,
title: element2,
text: loadingText,
/**
* Set the text of the loading popup.
*
* @param {string} newText The new text to set.
*/
setText: (newText) => {
loadingText.textContent = newText;
},
/**
* Set the title of the loading popup.
*
* @param {string} newTitle The new title to set.
*/
setTitle: (newTitle) => {
element2.textContent = newTitle;
},
/**
* Show the loading popup.
*/
show: () => {
popup.show();
},
/**
* Hide the loading popup.
*/
hide: () => {
popup.hide();
}
};
};
}
});
var hasSeenOnboardingStep, saveOnboardingStep, hasAddedOnboardingStep, addOnboardingMessage, init_onboarding = __esm({
"src/utils/onboarding.js"() {
init_page();
init_settings();
init_elements();
hasSeenOnboardingStep = (step) => getSetting(`onboarding.${step}`, !1), saveOnboardingStep = (step) => {
saveSetting(`onboarding.${step}`, !0);
}, hasAddedOnboardingStep = !1, addOnboardingMessage = (options2) => __async(void 0, null, function* () {
let {
step,
page,
tab,
highlightSelector,
content,
direction,
highlightPadding = 3,
classname,
button,
onShowCallback = () => {
},
onCloseCallback = () => {
},
showOverlay = !0,
delay = 100
} = options2;
hasAddedOnboardingStep || hasSeenOnboardingStep(step) || page && page !== getCurrentPage() || tab && tab !== getCurrentTab() || (hasAddedOnboardingStep = !0, yield waitForElement(highlightSelector), hg.views.MessengerView.addMessage({
content: {
body: hg.views.OnboardingTutorialView().wrapInfoArrow(content, button || "OK")
},
highlight_dom: highlightSelector,
highlight_padding: highlightPadding,
css_class: `larryCircle mh-improved-onboarding${classname ? ` ${classname}` : ""}`,
show_overlay: showOverlay,
on_show_callback() {
hg.views.OnboardingTutorialView().showBouncyArrow(highlightSelector, direction), onShowCallback();
},
on_close_callback() {
hg.views.OnboardingTutorialView().hideBouncyArrow(), hasAddedOnboardingStep = !1, saveOnboardingStep(step), onCloseCallback();
}
}), setTimeout(() => {
hg.views.MessengerView.go();
}, delay));
});
}
});
var saveSettingDirectAndToggleClass, addSettingsTab, addSettingsTabOnce, addSetting, makeToggle, makeSettingToggle, makeSettingRowSelect, makeSettingInput, makeSettingTextArea, makeSettingMultiToggle, makeSettingBlank, addSettingOnce, fadeInTimeout, fadeOutTimeout, removeTimeout, addSettingRefreshReminder, addSettingForModule, doAddSettingPreview, addSettingPreview, init_settings_markup = __esm({
"src/utils/settings-markup.js"() {
init_elements();
init_event_registry();
init_page();
init_settings();
init_events();
init_utils();
init_messages();
saveSettingDirectAndToggleClass = (node, key, value, identifier = "mh-utils-settings") => {
node.parentNode.parentNode.classList.add("busy"), saveSettingDirect(key, value, identifier), doEvent2("mh-improved-settings-changed", {
key,
value,
tab: identifier,
type: "toggle"
}), doEvent2(`mh-improved-settings-changed-${key}`, value), node.parentNode.parentNode.classList.remove("busy"), node.parentNode.parentNode.classList.add("completed"), setTimeout(() => {
node.parentNode.parentNode.classList.remove("completed");
}, 1e3);
}, addSettingsTab = (identifier = "userscript-settings", name = "Userscript Settings") => (addSettingsTabOnce(identifier, name), onNavigation(() => addSettingsTabOnce(identifier, name), {
page: "preferences"
}), identifier), addSettingsTabOnce = (identifier = "userscript-settings", name = "Userscript Settings") => {
if (getCurrentPage() !== "preferences" || document.querySelector(`#${identifier}`))
return;
let tabsContainer = document.querySelector(".mousehuntHud-page-tabHeader-container");
if (!tabsContainer)
return;
let tabsContentContainer = document.querySelector(".mousehuntHud-page-tabContentContainer");
if (!tabsContentContainer)
return;
identifier = identifier.replaceAll(/[^\w-]/gi, "");
let settingsTab = document.createElement("a");
settingsTab.id = identifier, settingsTab.href = "#", settingsTab.classList.add("mousehuntHud-page-tabHeader", identifier), settingsTab.setAttribute("data-tab", identifier), settingsTab.setAttribute("onclick", "hg.utils.PageUtil.onclickPageTabHandler(this); return false;");
let settingsTabText = document.createElement("span");
settingsTabText.innerText = name, settingsTab.append(settingsTabText), tabsContainer.append(settingsTab);
let settingsTabContent = document.createElement("div");
if (settingsTabContent.classList.add("mousehuntHud-page-tabContent", "game_settings", identifier), settingsTabContent.setAttribute("data-tab", identifier), tabsContentContainer.append(settingsTabContent), identifier === getCurrentTab()) {
let tab = document.querySelector(`#${identifier}`);
tab && tab.click();
}
}, addSetting = (options2) => (onNavigation(() => addSettingOnce(options2), {
page: "preferences"
}), addSettingOnce(options2)), makeToggle = (toggleKey, toggleDefaultValue, toggleTab, settingRow = !1) => {
let settingRowInputCheckbox = makeElement("div", "mousehuntSettingSlider"), currentSetting = getSettingDirect(toggleKey, null, toggleTab);
return (currentSetting || currentSetting === null && toggleDefaultValue) && (settingRowInputCheckbox.classList.add("active"), settingRow && settingRow.classList.add("active")), settingRowInputCheckbox.onclick = (event) => {
let isSettingActive = event.target.classList.contains("active");
event.target.classList.toggle("active"), settingRow && settingRow.classList.toggle("active"), saveSettingDirectAndToggleClass(event.target, toggleKey, !isSettingActive, toggleTab);
}, settingRowInputCheckbox;
}, makeSettingToggle = ({ key, defaultValue, tab, settings: settings2 }) => {
let settingRowInput = makeElement("div", "settingRow-action-inputContainer"), settingRowInputCheckbox = makeToggle(key, defaultValue, tab, settings2);
return settingRowInput.append(settingRowInputCheckbox), settingRowInput;
}, makeSettingRowSelect = ({ key, tab, defaultValue, settingSettings }) => {
let settingRowInputWrapper = makeElement("div", "settingRow-action-inputContainer"), settingRowInput = makeElement("div", "settingRow-action-inputContainer"), settingRowInputDropdown = document.createElement("div");
settingRowInputDropdown.classList.add("inputBoxContainer"), settingSettings.type === "multi-select" && (settingRowInputDropdown.classList.add("multiSelect"), settingRowInput.classList.add("multiSelect", "select"));
let amount = 1;
settingSettings.type === "multi-select" && settingSettings.number && (amount = settingSettings.number);
let makeOption = (option, foundSelected, currentSetting, dValue, i) => {
if (option.seperator)
return {
settingRowInputDropdownSelectOption: makeElement("hr"),
foundSelected
};
let settingRowInputDropdownSelectOption = document.createElement("option");
return settingRowInputDropdownSelectOption.value = option.value, settingRowInputDropdownSelectOption.textContent = option.name, settingRowInputDropdownSelectOption.disabled = option.disabled || !1, (currentSetting && currentSetting === option.value || !foundSelected && dValue && dValue[i] && dValue[i].value === option.value) && (settingRowInputDropdownSelectOption.selected = !0, foundSelected = !0), {
settingRowInputDropdownSelectOption,
foundSelected
};
};
for (let i = 0; i < amount; i++) {
let settingRowInputDropdownSelect = document.createElement("select");
settingRowInputDropdownSelect.classList.add("inputBox"), settingSettings.type === "multi-select" && settingRowInputDropdownSelect.classList.add("multiSelect");
let currentSetting = getSetting(`${key}-${i}`, null, tab), foundSelected = !1;
settingSettings.options.forEach((option) => {
if (option.value === "group") {
let settingRowInputDropdownSelectOptgroup = document.createElement("optgroup");
settingRowInputDropdownSelectOptgroup.label = option.name, option.options.forEach((optgroupOption) => {
let result = makeOption(optgroupOption, foundSelected, currentSetting, defaultValue, i);
foundSelected = result.foundSelected, settingRowInputDropdownSelectOptgroup.append(result.settingRowInputDropdownSelectOption);
}), settingRowInputDropdownSelect.append(settingRowInputDropdownSelectOptgroup);
} else {
let result = makeOption(option, foundSelected, currentSetting, defaultValue, i);
foundSelected = result.foundSelected, settingRowInputDropdownSelect.append(result.settingRowInputDropdownSelectOption);
}
}), settingRowInputDropdown.append(settingRowInputDropdownSelect);
let timeout = null;
settingRowInputDropdownSelect.onchange = (event) => {
let parent = settingRowInputDropdownSelect.parentNode.parentNode.parentNode;
parent.classList.add("inputDropdownWrapper"), parent.classList.add("busy"), saveSettingDirect(`${key}-${i}`, event.target.value, tab), doEvent2("mh-improved-settings-changed", {
key: `${key}-${i}`,
value: event.target.value,
tab,
type: "multi-select"
}), parent.classList.remove("busy"), parent.classList.add("completed"), clearTimeout(timeout), timeout = setTimeout(() => {
parent.classList.remove("completed");
}, 1e3);
}, settingRowInput.append(settingRowInputDropdown), settingRowInputWrapper.append(settingRowInput);
}
return settingRowInputWrapper;
}, makeSettingInput = ({ key, tab, defaultValue }) => {
let settingRowInput = makeElement("div", ["settingRow-action-inputContainer", "inputText"]), settingRowInputText = makeElement("input", "inputBox");
settingRowInputText.value = getSettingDirect(key, defaultValue, tab);
let inputSaveButton = makeElement("button", ["mousehuntActionButton", "tiny", "inputSaveButton"]);
makeElement("span", "", "Save", inputSaveButton);
let timeout = null;
return inputSaveButton.addEventListener("click", (event) => {
let parent = event.target.parentNode.parentNode.parentNode;
parent.classList.add("inputDropdownWrapper"), parent.classList.add("inputTextWrapper"), parent.classList.add("busy"), parent.classList.remove("completed"), saveSettingDirect(key, settingRowInputText.value, tab), doEvent2("mh-improved-settings-changed", {
key,
value: settingRowInputText.value,
tab,
type: "input"
}), parent.classList.remove("busy"), parent.classList.add("completed"), clearTimeout(timeout), timeout = setTimeout(() => {
parent.classList.remove("completed");
}, 1e3);
}), settingRowInput.classList.add("inputText"), settingRowInput.append(settingRowInputText), settingRowInput.append(inputSaveButton), settingRowInput;
}, makeSettingTextArea = ({ key, tab, defaultValue }) => {
let settingRowInput = makeElement("div", ["settingRow-action-inputContainer", "textarea"]), settingRowInputText = makeElement("textarea", "inputBox");
settingRowInputText.value = getSetting(key, defaultValue);
let inputSaveButton = makeElement("button", ["mousehuntActionButton", "tiny", "inputSaveButton"]);
makeElement("span", "", "Save", inputSaveButton);
let timeout = null;
return inputSaveButton.addEventListener("click", (event) => {
let parent = event.target.parentNode.parentNode.parentNode;
parent.classList.add("inputDropdownWrapper"), parent.classList.add("inputTextWrapper"), parent.classList.remove("completed"), parent.classList.add("busy"), saveSettingDirect(key, settingRowInputText.value, tab), doEvent2("mh-improved-settings-changed", {
key,
value: settingRowInputText.value,
tab,
type: "textarea"
}), parent.classList.remove("busy"), parent.classList.add("completed"), clearTimeout(timeout), timeout = setTimeout(() => {
parent.classList.remove("completed");
}, 1e3), addSettingRefreshReminder(key);
}), settingRowInput.append(settingRowInputText), settingRowInput.append(inputSaveButton), settingRowInput;
}, makeSettingMultiToggle = ({ key, tab, settingSettings }) => {
let multiToggleWrapper = makeElement("div", "multi-toggle"), multiToggleRow = makeElement("div", ["PagePreferences__settingsList", "multi-toggle-row"]);
return settingSettings.options.forEach((option) => {
let optionSettingRow = makeElement("div", "PagePreferences__settingsList"), optionSettingRowLabel = makeElement("div", "PagePreferences__settingLabel");
makeElement("div", "PagePreferences__settingName", option.name, optionSettingRowLabel), optionSettingRow.append(optionSettingRowLabel);
let optionSettingRowAction = makeElement("div", "PagePreferences__settingAction"), optionSettingRowInput = makeElement("div", "settingRow-action-inputContainer"), settingRowInputCheckbox = makeToggle(`${key}-${option.id}`, option.value, tab);
optionSettingRowInput.append(settingRowInputCheckbox), optionSettingRowAction.append(optionSettingRowInput), optionSettingRow.append(optionSettingRowAction), multiToggleRow.append(optionSettingRow);
}), multiToggleWrapper.append(multiToggleRow), multiToggleWrapper;
}, makeSettingBlank = ({ section, key }) => {
let action = makeElement("div", ["blank", "blankSetting"], "");
return action.id = `${section.id}-${key}-blank`, action;
}, addSettingOnce = (options2) => {
let name = options2.name, key = options2.id, defaultValue = options2.default || null, description = options2.description || "", tab = "mousehunt-improved-settings", settingSettings = options2.subSettings || null, moduleType = options2.moduleType || null, container = document.querySelector(`.mousehuntHud-page-tabContent.${tab}`), originalContainer = container;
if (!container)
return !1;
let section = {
id: options2.module.id,
name: options2.module.name || "",
description: options2.module.description || "",
subSetting: options2.module.subSetting || !1
}, leftSide = container.querySelector(".PagePreferences__settingsLeft");
leftSide || (leftSide = makeElement("div", "PagePreferences__settingsLeft"), container.append(leftSide), container.classList.add("two-column"));
let rightSide = container.querySelector(".PagePreferences__settingsRight");
if (rightSide || (rightSide = makeElement("div", "PagePreferences__settingsRight"), container.append(rightSide), container.classList.add("two-column")), moduleType && getSetting("experiments.new-settings-styles-columns", !1))
switch (moduleType) {
case "better":
case "design":
case "element-hiding":
case "advanced":
case "beta":
container = leftSide;
break;
case "feature":
case "location-hud":
container = rightSide;
break;
default:
container = originalContainer;
break;
}
section.id = `${tab}-${section.id.replaceAll(/[^\w-]/gi, "")}`;
let sectionExists = document.querySelector(`#${section.id}-wrapper`);
if (!sectionExists) {
let title = makeElement("div", "PagePreferences__section");
title.id = section.id;
let titleSection = makeElement("div", "PagePreferences__title");
if (makeElement("h3", "PagePreferences__titleText", section.name, titleSection), title.append(titleSection), container.append(title), section.description) {
let settingSubHeader = makeElement("h4", ["settings-subheader", "mh-utils-settings-subheader"], section.description);
title.after(settingSubHeader);
}
let sectionWrapper = makeElement("div", "PagePreferences__sectionWrapper");
sectionWrapper.id = `${section.id}-wrapper`, container.append(sectionWrapper), title.append(sectionWrapper), sectionExists = document.querySelector(`#${section.id}-wrapper`);
}
let keySafe = key.replaceAll(".", "-"), settingExists = document.querySelector(`#${section.id}-${keySafe}`);
if (settingExists)
return settingExists;
let settings2 = makeElement("div", ["PagePreferences__settingsList"]);
settings2.id = `${section.id}-${keySafe}`, section.subSetting ? settings2.classList.add("PagePreferences__subSetting") : settings2.classList.add(`PagePreferences__settingsList-${keySafe}`, `PagePreferences__settingsList-${section.id}`), settingSettings && settingSettings.type && settings2.classList.add(`PagePreferences__settingsList-${settingSettings.type}`);
let settingRow = makeElement("div", "PagePreferences__setting"), settingRowLabel = makeElement("div", "PagePreferences__settingLabel"), settingName = makeElement("div", "PagePreferences__settingName"), settingNameText = makeElement("a", "PagePreferences__settingNameText", name);
settingNameText.href = `#${section.id}-${keySafe}`, settingNameText.setAttribute("data-setting", key), settingNameText.setAttribute("data-tab", tab), settingNameText.setAttribute("data-default", JSON.stringify(defaultValue)), settingName.append(settingNameText), section.subSetting || settingNameText.addEventListener("click", (event) => {
event.preventDefault(), navigator.clipboard.writeText(`${window.location.href}#${section.id}-${keySafe}`), showSuccessMessage({
message: "Copied link to clipboard",
append: settingNameText,
after: !0,
classname: "setting-link-copied"
});
});
let defaultSettingText = makeElement("div", "PagePreferences__settingDefault");
settingSettings && (settingSettings.type === "select" || settingSettings.type === "multi-select") ? defaultSettingText.textContent = defaultValue.map((item) => item.name).join(", ") : defaultSettingText.textContent = defaultValue ? "Enabled" : "Disabled", defaultSettingText.textContent = `Default setting: ${defaultSettingText.textContent}`;
let settingDescription = makeElement("div", "PagePreferences__settingDescription");
settingDescription.innerHTML = description, description.trim() === "" && settingDescription.classList.add("empty-description"), settingRowLabel.append(settingName), settingRowLabel.append(defaultSettingText), settingRowLabel.append(settingDescription);
let settingRowAction = makeElement("div", "PagePreferences__settingAction");
return settingSettings ? settingSettings.type === "select" || settingSettings.type === "multi-select" ? settingRowAction.append(makeSettingRowSelect({ key, tab, defaultValue, settingSettings })) : settingSettings.type === "input" ? settingRowAction.append(makeSettingInput({ key, tab, defaultValue })) : settingSettings.type === "textarea" ? settingRowAction.append(makeSettingTextArea({ key, tab, defaultValue })) : settingSettings.type === "multi-toggle" ? settingRowAction.append(makeSettingMultiToggle({ key, tab, settingSettings })) : settingSettings.type === "blank" ? settingRowAction.append(makeSettingBlank({ section, key })) : settingRowAction.append(makeSettingToggle({ key, defaultValue, tab, settings: settings2 })) : settingRowAction.append(makeSettingToggle({ key, defaultValue, tab, settings: settings2 })), settingRow.append(settingRowLabel), settingRow.append(settingRowAction), settings2.append(settingRow), sectionExists.append(settings2), doEvent2("mh-improved-setting-added-to-page", {
name,
key,
defaultValue,
description,
section,
tab,
settings: settings2
}), settings2;
}, fadeInTimeout = null, fadeOutTimeout = null, removeTimeout = null, addSettingRefreshReminder = () => {
let refreshMessage = document.querySelector("#mh-utils-settings-refresh-message");
if (!refreshMessage) {
let newMessageEl = makeElement("div", ["mh-utils-settings-refresh-message", "mh-ui-fade"], "Refresh the page to apply your changes.");
newMessageEl.id = "mh-utils-settings-refresh-message", newMessageEl.addEventListener("click", () => {
window.location.reload();
}), document.querySelector("body").append(newMessageEl), refreshMessage = document.querySelector("#mh-utils-settings-refresh-message");
}
clearTimeout(fadeInTimeout), clearTimeout(fadeOutTimeout), clearTimeout(removeTimeout), fadeInTimeout = setTimeout(() => {
refreshMessage.classList.add("mh-ui-fade-in");
}, 250), fadeOutTimeout = setTimeout(() => {
refreshMessage.classList.remove("mh-ui-fade-in"), refreshMessage.classList.add("mh-ui-fade-out");
}, 3e3), removeTimeout = setTimeout(() => {
refreshMessage.remove();
}, 5e3);
};
onEvent("mh-improved-settings-changed", addSettingRefreshReminder);
addSettingForModule = (module) => __async(void 0, null, function* () {
for (let submodule of module.modules) {
let moduleSettingRow = null;
if (!submodule.alwaysLoad && !submodule.beta && (moduleSettingRow = yield addSetting({
moduleType: module.id,
name: submodule.name,
id: submodule.id,
group: submodule.group,
default: submodule.default,
description: submodule.description,
module
})), submodule.settings) {
let subSettingsGroup = yield submodule.settings(module);
if (!subSettingsGroup)
continue;
for (let subSettings of subSettingsGroup) {
let subSettingRow = yield addSetting({
moduleType: module.id,
name: subSettings.title,
id: subSettings.id,
group: submodule.group || !1,
default: subSettings.default,
description: subSettings.description,
module: __spreadProps(__spreadValues({}, module), {
subSetting: !0
}),
subSettings: subSettings.settings
});
moduleSettingRow && subSettingRow && moduleSettingRow.append(subSettingRow);
}
}
doEvent2("mh-improved-settings-added", { module });
}
}), doAddSettingPreview = ({ id, selector, inputSelector, items: items6 = [], preview = !0, previewCallback = () => {
}, itemPreviewCallback = null }) => {
let previewLink = document.querySelector(selector);
!previewLink || previewLink.getAttribute("data-mh-improved-settings-preview") || (previewLink.setAttribute("data-mh-improved-settings-preview", !0), previewLink.addEventListener("click", (e) => {
e.stopPropagation(), e.preventDefault();
let hasItemPreview = !!itemPreviewCallback, content = items6.map((gradient) => `
<div class="gradient ${id}${gradient != null && gradient.id ? ` ${gradient.id}` : ""}${hasItemPreview ? " custom-preview" : ""}"${gradient.css ? ` style="background: ${gradient.css}"` : ""}>
<div class="name">${gradient.name}</div>
${hasItemPreview ? itemPreviewCallback(gradient) : ""}
<div class="controls">
${preview ? `<div class="mousehuntActionButton lightBlue mh-improved-custom-bg-action-button" data-gradient="${gradient.id}" data-action="preview"><span>Preview</span></div>` : ""}
<div class="mousehuntActionButton mh-improved-custom-bg-action-button ${preview ? "normal" : "small"}" data-gradient="${gradient.id}" data-action="use"><span>Select</span></div>
</div>
</div>
`).join(""), popup = createPopup({
title: "",
className: `mh-improved-custom-background-gradient-preview-popup mh-improved-custom-preview-popup-${id}`,
content: `<div class="mh-improved-custom-background-gradient-preview">${content}</div>`,
show: !1
});
popup.show(), document.querySelector(".mh-improved-custom-background-gradient-preview").addEventListener("click", (evt) => {
let action = evt.target.closest(".mh-improved-custom-bg-action-button");
if (!action)
return;
evt.preventDefault();
let gradient = action.getAttribute("data-gradient"), actionType = action.getAttribute("data-action");
if (actionType === "preview")
previewCallback(gradient);
else if (actionType === "use") {
let input = document.querySelector(inputSelector);
input && (input.value = gradient, input.dispatchEvent(new Event("change"))), popup.hide();
}
});
}, {}, !0));
}, addSettingPreview = (options2) => {
setMultipleTimeout(() => doAddSettingPreview(options2), [10, 250, 500, 1e3, 2e3, 5e3]);
};
}
});
var addStylesDirect, addStyles, addModuleStyles, removeStyles, addHudStyles, removeHudStyles, extensionBaseUrl, getExtensionBaseUrl, addExternalStyles, init_styles = __esm({
"src/utils/styles.js"() {
init_settings();
init_event_registry();
addStylesDirect = (styles8, identifier = "mh-utils-custom-styles", once = !1) => {
identifier = `mh-utils-${identifier}`;
let existingStyles = document.querySelector(`#${identifier}`);
if (existingStyles)
return once || (existingStyles.innerHTML += styles8), existingStyles;
let style = document.createElement("style");
return style.id = identifier, style.innerHTML = styles8, document.head.append(style), style;
}, addStyles = (styles8, module = !1, identifier = "mh-improved-styles") => {
if (!module)
throw new Error("Module ID is required for adding module styles.", module);
let key = `${identifier}-${module}`, stylesEl = addModuleStyles(styles8, key, !0);
return onEvent(`mh-improved-settings-changed-${module}`, (enabled) => {
enabled ? stylesEl = addModuleStyles(styles8, key, !0) : stylesEl && (stylesEl.remove(), stylesEl = null);
}), stylesEl;
}, addModuleStyles = (styles8, identifier = "mh-improved-styles", replace2 = !1) => {
let existingStyles = document.querySelector(`#${identifier}`);
if (styles8 = Array.isArray(styles8) ? styles8.join(`
`) : styles8, existingStyles)
return existingStyles.innerHTML = replace2 ? styles8 : existingStyles.innerHTML + styles8, existingStyles;
let style = document.createElement("style");
return style.id = identifier, style.innerHTML = styles8, document.head.append(style), style;
}, removeStyles = (module = !1, identifier = "mh-improved-styles") => {
if (!module)
throw new Error("Module ID is required for adding module styles.", module);
let key = `${identifier}-${module}`, stylesEl = document.querySelector(`#${key}`);
stylesEl && stylesEl.remove();
}, addHudStyles = (styles8) => __async(void 0, null, function* () {
removeHudStyles(), addStyles(styles8, "mh-improved-styles-location-hud");
}), removeHudStyles = () => {
document.querySelectorAll(".mh-improved-styles-location-hud").forEach((style) => {
style.remove();
});
}, getExtensionBaseUrl = () => {
if (!extensionBaseUrl) {
let baseScript = document.querySelector("#mousehunt-improved-script");
baseScript && baseScript.getAttribute("data-baseurl") && (extensionBaseUrl = baseScript.getAttribute("data-baseurl"));
}
return extensionBaseUrl;
}, addExternalStyles = (filename) => __async(void 0, null, function* () {
let identifier = filename.split(".").shift(), existingStyles = document.querySelector(`#${identifier}-external`);
if (existingStyles)
return existingStyles;
let style = document.createElement("link");
return style.rel = "stylesheet", style.id = `${identifier}-external`, style.href = getSetting("debug.disable-cache") ? `https://api.mouse.rip/${filename}` : `https://static.mouse.rip/${filename}`, mhImprovedPlatform !== "userscript" && (style.href = `${getExtensionBaseUrl()}static/${filename}`), document.head.append(style), style;
});
}
});
var replaceInTemplate, _templateRenderFromFile, hasExtendedRenderFromFile, onRenderCallbacks, onRender, extenderRenderFromFile, init_templates = __esm({
"src/utils/templates.js"() {
replaceInTemplate = (templateId, replacements2) => {
let templateContent = hg.utils.TemplateUtil.getTemplate(templateId);
replacements2.forEach(([find, replace2]) => {
templateContent = templateContent.replace(find, replace2);
}), hg.utils.TemplateUtil.addTemplate(templateId, templateContent);
}, hasExtendedRenderFromFile = !1, onRenderCallbacks = {}, onRender = ({ group, layout = "layout", callback, before = !1, after = !1 }) => {
hasExtendedRenderFromFile || (extenderRenderFromFile(), hasExtendedRenderFromFile = !0), onRenderCallbacks[group] || (onRenderCallbacks[group] = {}), onRenderCallbacks[group][layout] || (onRenderCallbacks[group][layout] = {
before: [],
after: []
}), before && onRenderCallbacks[group][layout].before.push(callback), after && onRenderCallbacks[group][layout].after.push(callback);
}, extenderRenderFromFile = () => {
_templateRenderFromFile || (_templateRenderFromFile = hg.utils.TemplateUtil.renderFromFile, hg.utils.TemplateUtil.renderFromFile = (group, type2, data) => {
onRenderCallbacks[group] && onRenderCallbacks[group][type2] && onRenderCallbacks[group][type2].before && onRenderCallbacks[group][type2].before.forEach((callback) => {
callback(data);
});
let results = _templateRenderFromFile(group, type2, data);
return onRenderCallbacks[group] && onRenderCallbacks[group][type2] && onRenderCallbacks[group][type2].after && onRenderCallbacks[group][type2].after.forEach((callback) => {
results = callback(data, results);
}), results;
});
};
}
});
var getUserItems, getUserSetupDetails, normalizeTitle, isUserTitleAtLeast, getAnonymousUserHash, getUserTitle, getUserTitleShield, getUserData, init_user = __esm({
"src/utils/user.js"() {
init_page();
getUserItems = (items6, forceUpdate = !1) => __async(void 0, null, function* () {
return new Promise((resolve, reject2) => {
try {
hg.utils.UserInventory.getItems(items6, (resp) => {
resolve(resp);
}, (err) => {
console.error("Error getting user items:", items6, err), reject2(err);
}, forceUpdate);
} catch (error) {
console.error("Error getting user items:", items6, error), reject2(error);
}
});
}), getUserSetupDetails = () => {
let userObj = user, setup = {
type: userObj.trap_power_type_name,
stats: {
power: userObj.trap_power,
powerBonus: userObj.trap_power_bonus,
luck: userObj.trap_luck,
attractionBonus: userObj.trap_attraction_bonus,
cheeseEffect: userObj.trap_cheese_effect
},
bait: {
id: Number.parseInt(userObj.bait_item_id, 10),
name: userObj.bait_name,
quantity: Number.parseInt(userObj.bait_quantity, 10),
power: 0,
powerBonus: 0,
luck: 0,
attractionBonus: 0
},
base: {
id: Number.parseInt(userObj.base_item_id, 10),
name: userObj.base_name,
power: 0,
powerBonus: 0,
luck: 0,
attractionBonus: 0
},
charm: {
id: Number.parseInt(userObj.trinket_item_id, 10),
name: userObj.trinket_name,
quantity: Number.parseInt(userObj.trinket_quantity, 10),
power: 0,
powerBonus: 0,
luck: 0,
attractionBonus: 0
},
weapon: {
id: Number.parseInt(userObj.weapon_item_id, 10),
name: userObj.weapon_name,
power: 0,
powerBonus: 0,
luck: 0,
attractionBonus: 0
},
aura: {
lgs: { active: !1, power: 0, powerBonus: 0, luck: 0 },
lightning: { active: !1, power: 0, powerBonus: 0, luck: 0 },
chrome: { active: !1, power: 0, powerBonus: 0, luck: 0 },
slayer: { active: !1, power: 0, powerBonus: 0, luck: 0 },
festive: { active: !1, power: 0, powerBonus: 0, luck: 0 },
luckycodex: { active: !1, power: 0, powerBonus: 0, luck: 0 },
riftstalker: { active: !1, power: 0, powerBonus: 0, luck: 0 }
},
location: {
name: userObj.environment_name,
id: userObj.environment_id,
slug: userObj.environment_type
}
};
if (getCurrentPage() !== "camp")
return setup;
let calculations = document.querySelectorAll(".campPage-trap-trapStat");
return calculations && calculations.forEach((calculation) => {
if (calculation.classList.length <= 1)
return;
let type2 = calculation.classList[1], math = calculation.querySelectorAll(".math .campPage-trap-trapStat-mathRow");
math && math.forEach((row) => {
var _a, _b;
if (row.classList.contains("label"))
return;
let value = ((_a = row.querySelector(".campPage-trap-trapStat-mathRow-value")) == null ? void 0 : _a.innerText) || "0", name = (_b = row.querySelector(".campPage-trap-trapStat-mathRow-name")) == null ? void 0 : _b.innerText;
if (!name)
return;
let tempType = type2, isBonus = !1;
if (value.includes("%") && (tempType = type2 + "Bonus", isBonus = !0), tempType = tempType.replace("_bonusBonus", "Bonus"), value = value.replace("%", ""), value = value.replace(",", ""), value = Number.parseInt(value * 100) / 100, tempType === "attractionBonus" && (value = value / 100), setup.weapon.name === name)
setup.weapon[tempType] = value;
else if (setup.base.name === name)
setup.base[tempType] = value;
else if (setup.charm.name === name)
setup.charm[tempType] = value;
else if (setup.bait.name === name)
setup.bait[tempType] = value;
else if (name === "Your trap has no cheese effect bonus.")
setup.cheeseEffect = "No Effect";
else {
let auraType = name.replace(" Aura", "");
if (!auraType)
return;
auraType = auraType.toLowerCase(), auraType = auraType.replaceAll(" ", "_"), auraType = auraType.replaceAll(/\W/gi, ""), auraType = auraType.replace("golden_luck_boost", "lgs"), auraType = auraType.replace("2023_lucky_codex", "luckycodex"), auraType = auraType.replace("_set_bonus_2_pieces", ""), auraType = auraType.replace("_set_bonus_3_pieces", ""), setup.aura[auraType] ? (setup.aura[auraType].active = !0, setup.aura[auraType].type = auraType) : setup.aura[auraType] = {
active: !0,
type: auraType,
power: 0,
powerBonus: 0,
luck: 0
}, value = Number.parseInt(value), isBonus && (value = value / 100), setup.aura[auraType][tempType] = value;
}
});
}), setup;
}, normalizeTitle = (title = "") => title.toLowerCase().replaceAll(" ", "").replaceAll("/", "_").replaceAll("journeyman_journeywoman", "journeyman").replaceAll("journeywoman", "journeyman").replaceAll("lord_lady", "lord").replaceAll("lady", "lord").replaceAll("baron_baroness", "baron").replaceAll("baroness", "baron").replaceAll("count_countess", "count").replaceAll("countess", "count").replaceAll("grand_duke_grand_duchess", "grand_duke").replaceAll("grand_duchess", "grand_duke").replaceAll("archduke_archduchess", "archduke").replaceAll("archduchess", "archduke").replaceAll("duke_duchess", "duke").replaceAll("duke_dutchess", "duke").replaceAll("duchess", "duke").replaceAll("grand_duke", "grandduke").replaceAll("/", "").replaceAll(" ", "").toLowerCase(), isUserTitleAtLeast = (title) => {
let titles = [
"novice",
"recruit",
"apprentice",
"initiate",
"journeyman",
"master",
"grandmaster",
"legendary",
"hero",
"knight",
"lord",
"baron",
"count",
"duke",
"grandduke",
"archduke",
"viceroy",
"elder",
"sage",
"fabled"
], titleIndex = titles.indexOf(normalizeTitle(user.title_name)), checkIndex = titles.indexOf(normalizeTitle(title));
return titleIndex >= checkIndex;
}, getAnonymousUserHash = () => __async(void 0, null, function* () {
if (!(user != null && user.user_id))
return "";
try {
let msgUint8 = new TextEncoder().encode(user.user_id.toString().trim()), hashBuffer = yield crypto.subtle.digest("SHA-256", msgUint8);
return [...new Uint8Array(hashBuffer)].map((b) => b.toString(16).padStart(2, "0")).join("");
} catch (error) {
throw console.error("Error getting user hash:", error), error;
}
}), getUserTitle = () => {
let title = user.title_name || "novice";
return title.includes("/") && (title = title.split("/")[0]), title.toLowerCase().replaceAll("lady", "lord").replace("wo", "").replace("ess", "").replace("duch", "duke").trim();
}, getUserTitleShield = (titleId = null) => {
titleId || (titleId = getUserTitle());
let shields = {
recruit: "https://www.mousehuntgame.com/images/titles/3f1e44bbaa7138da4c326819e9f3f0a8.png",
apprentice: "https://www.mousehuntgame.com/images/titles/6f4673dd2d9d1e98b4569667d702a775.png",
initiate: "https://www.mousehuntgame.com/images/titles/e96387f7261b95c0eeab9291e4e594e1.png",
journeyman: "https://www.mousehuntgame.com/images/titles/ad6875955f541159133c6d3798519f81.png",
master: "https://www.mousehuntgame.com/images/titles/35ee6056a09037fb13a9195881875045.png",
grandmaster: "https://www.mousehuntgame.com/images/titles/0da3761747914f497c16dc2051ba132d.png",
legendary: "https://www.mousehuntgame.com/images/titles/fca35751046f4bcc972716ca484b6d61.png",
hero: "https://www.mousehuntgame.com/images/titles/0567284d6e12aaaed35ca5912007e070.png",
knight: "https://www.mousehuntgame.com/images/titles/398dca9a8c7703de969769491622ca32.png",
lord: "https://www.mousehuntgame.com/images/titles/9a6acd429a9a3a4849ed13901288b0b8.png",
baron: "https://www.mousehuntgame.com/images/titles/ea9c0ec2e6d3d81c14e61f5ce924d0e1.png",
count: "https://www.mousehuntgame.com/images/titles/dd11711a25b80db90e0306193f2e8d78.png",
duke: "https://www.mousehuntgame.com/images/titles/eb46ac1e8197b13299ab860f07d963db.png",
grand_duke: "https://www.mousehuntgame.com/images/titles/87937fa96bbb3b2dd3225df883002642.png",
archduke: "https://www.mousehuntgame.com/images/titles/043efe31de4f0f2e0ddca590fe829032.png",
viceroy: "https://www.mousehuntgame.com/images/titles/e2e79f6f9201a4d4e7a89684fbb5356f.png",
elder: "https://www.mousehuntgame.com/images/titles/0f3cf224bf98457f6b5bad91ab1c7bd2.png",
sage: "https://www.mousehuntgame.com/images/titles/cb49e43c5e4460da7c09fe28ca4f44ce.png",
fabled: "https://www.mousehuntgame.com/images/titles/5daba92a8d609834aa8b789f37544e08.png"
};
return titleId in shields ? shields[titleId] : !1;
}, getUserData = (..._0) => __async(void 0, [..._0], function* (fields = [], userId = "me") {
let queryParams = fields.join(",");
return (yield fetch(`https://www.mousehuntgame.com/api/get/user/${userId}/${queryParams}`)).json();
});
}
});
var getIdSelector, getQuantity, addQuantityToDisplay, addQuantityToTrapBrowserItem, addToTrapBrowserForSlugs, addQtyToTrapBrowser, onChangeTrap, allItems, maybeClearCache, addEvents, options, hasAddedEvents, addTrapQuantity, init_trap_quantity = __esm({
"src/utils/shared/trap-quantity.js"() {
init_utils2();
getIdSelector = (itemId, bases) => (Array.isArray(bases) && (bases = bases.join("-")), `mh-improved-${itemId}-${bases}-counter`), getQuantity = (itemId) => __async(void 0, null, function* () {
return yield dataGet(`${itemId}-quantity`, 0);
}), addQuantityToDisplay = () => __async(void 0, null, function* () {
if (getCurrentPage() === "camp")
for (let opts of options) {
let bases = opts.baseIds, itemId = opts.itemId, selector = getIdSelector(itemId, bases), existingCounter = document.querySelector(`.${selector}`);
existingCounter && existingCounter.remove(), bases = bases.map((base) => Number.parseInt(base, 10));
let userBase = Number.parseInt(user.base_item_id, 10);
if (!bases.includes(userBase))
continue;
let amount = yield getQuantity(itemId), counter = document.querySelector(`.${selector}-text`);
if (counter) {
counter.textContent = amount;
continue;
}
let trapContainer = document.querySelector('.trapSelectorView__armedItem[data-item-classification="base"] .trapSelectorView__armedItemImage');
if (!trapContainer)
continue;
let newCounter = makeElement("div", ["trapSelectorView__armedItemQuantity", selector, "mh-improved-trap-quantity"]);
makeElement("span", `${selector}-text`, amount.toLocaleString(), newCounter), trapContainer.append(newCounter);
}
}), addQuantityToTrapBrowserItem = (el, itemId, base) => __async(void 0, null, function* () {
if (!el || !itemId || !base)
return;
let selector = getIdSelector(itemId, base), exists = document.querySelector(`.campPage-trap-itemBrowser-favorite-item-quantity .quantity-${itemId}-wrapper .${selector}-blueprint`);
if (exists) {
let qty2 = yield getQuantity(itemId);
exists.textContent = qty2.toLocaleString();
return;
}
let qty = yield getQuantity(itemId), counter = makeElement("div", ["campPage-trap-itemBrowser-favorite-item-quantity", `quantity-${itemId}-wrapper`]);
makeElement("span", ["campPage-trap-itemBrowser-favorite-item-image-quantity", "base-quantity", `${selector}-blueprint`], qty.toLocaleString(), counter), el.append(counter);
}), addToTrapBrowserForSlugs = () => __async(void 0, null, function* () {
options.forEach((opts) => __async(void 0, null, function* () {
for (let base of opts.baseSlugs) {
let el = document.querySelector(`.campPage-trap-itemBrowser-item-image[data-item-type="${base}"]`);
el && (yield addQuantityToTrapBrowserItem(el, opts.itemId, base));
}
for (let base of opts.baseIds) {
let favoriteEl = document.querySelector(`.campPage-trap-itemBrowser-favorite-item-image[data-item-id="${base}"]`);
favoriteEl && (yield addQuantityToTrapBrowserItem(favoriteEl, opts.itemId, base));
}
}));
}), addQtyToTrapBrowser = (tab) => __async(void 0, null, function* () {
tab === "item_browser" && (yield addToTrapBrowserForSlugs());
}), onChangeTrap = () => __async(void 0, null, function* () {
if (document.querySelector('.trapSelectorView__blueprint.trapSelectorView__blueprint--active .trapSelectorView__browserStateParent--items[data-blueprint-type="base"]'))
for (let opts of options)
yield addQtyToTrapBrowser("item_browser", opts);
}), allItems = [], maybeClearCache = () => __async(void 0, null, function* () {
var _a;
sleep(250);
let currentBase = Number.parseInt(user.base_item_id, 10);
for (let opts of options)
opts.baseIds.includes(currentBase) && allItems.push(opts.itemId);
if (allItems = [...new Set(allItems)], !allItems.length)
return;
let details = yield getUserItems(allItems, !0);
for (let itemId in details) {
let qty = Number.parseInt((_a = details[itemId]) == null ? void 0 : _a.quantity) || 0;
dataSet(`${details[itemId].type}-quantity`, qty);
}
}), addEvents = () => {
setTimeout(() => __async(void 0, null, function* () {
yield maybeClearCache(), addQuantityToDisplay();
}), 250), onNavigation(addQuantityToDisplay, { page: "camp" }), onRequest("users/changetrap.php", () => __async(void 0, null, function* () {
yield maybeClearCache(), yield onChangeTrap(), addQuantityToDisplay();
})), onEvent("camp_page_toggle_blueprint", (tab) => __async(void 0, null, function* () {
yield addQtyToTrapBrowser(tab);
})), onTurn(() => __async(void 0, null, function* () {
yield maybeClearCache(), setTimeout(addQuantityToDisplay, 250);
}), 250);
}, options = [], hasAddedEvents = !1, addTrapQuantity = (opts) => __async(void 0, null, function* () {
!opts.itemId || !opts.baseIds || (options.push(opts), hasAddedEvents || (hasAddedEvents = !0, addEvents()));
});
}
});
var useConvertible, addOpenAllButOneButton, hasInitialized, openAllButOneSetting, openAllSetting, initOpenButtons, init_open_all = __esm({
"src/utils/shared/open-all.js"() {
init_utils2();
useConvertible = (element2, allButOne = !1) => __async(void 0, null, function* () {
if (element2.getAttribute("data-item-action") !== "all-but-one" && element2.getAttribute("data-item-action") !== "all")
return;
let itemType = element2.getAttribute("data-item-type");
hg.views.ItemView.show(itemType);
let quantityEl = yield waitForElement(".itemView-action-convertForm"), maxQuantity = 1;
quantityEl && quantityEl.innerText.includes("/") && (maxQuantity = Number.parseInt(quantityEl.innerText.split("/")[1].replaceAll(",", "").trim(), 10));
let quantity = maxQuantity > 200 ? 200 : maxQuantity;
allButOne && (quantity = maxQuantity - 1);
let quantityInput = document.querySelector(".itemView-action-convert-quantity");
if (quantityInput) {
quantityInput.value = quantity;
let useButton = document.querySelector(".itemView-action-convert-actionButton");
useButton && useButton.click();
}
}), addOpenAllButOneButton = () => {
let convertibles = document.querySelectorAll('.inventoryPage-tagContent-tagGroup[data-tag="convertibles"] .inventoryPage-item.convertible[data-item-classification="convertible"]'), chests = document.querySelectorAll('.inventoryPage-tagContent-tagGroup[data-tag="treasure_chests"] .inventoryPage-item.convertible[data-item-classification="convertible"]');
[...convertibles, ...chests].forEach((item) => {
if (!item)
return;
let button = item.querySelector('.inventoryPage-item-button[data-item-action="single"]');
if (!button)
return;
let itemType = item.getAttribute("data-item-type");
if (!itemType || (/* @__PURE__ */ new Set([
"kilohertz_processor_convertible",
"dragon_skull_convertible",
"cursed_skull_convertible"
])).has(itemType))
return;
let quantity = item.querySelector(".quantity");
if (quantity) {
if (openAllButOneSetting && quantity.textContent !== "1" && !item.querySelector('.inventoryPage-item-button[data-item-action="all-but-one"]')) {
let newButton = button.cloneNode(!0);
newButton.classList.add("open-all-but-one"), newButton.textContent = "All But One", newButton.value = "All But One", newButton.setAttribute("data-item-action", "all-but-one"), newButton.addEventListener("click", (event) => {
useConvertible(event.target, !0);
}), button.after(newButton);
}
if (openAllSetting && !item.querySelector('.inventoryPage-item-button[data-item-action="all"]')) {
let newAllButton = button.cloneNode(!0);
newAllButton.classList.add("open-all"), newAllButton.textContent = "All", newAllButton.value = "All", newAllButton.setAttribute("data-item-action", "all"), newAllButton.addEventListener("click", (event) => {
useConvertible(event.target);
}), button.after(newAllButton);
}
}
});
}, hasInitialized = !1, openAllButOneSetting = !0, openAllSetting = !0, initOpenButtons = () => {
openAllButOneSetting = getSetting("open-all-but-one", !0), openAllSetting = getSetting("open-all", !0), (openAllButOneSetting || openAllSetting) && (hasInitialized || (hasInitialized = !0, onNavigation(addOpenAllButOneButton, {
page: "inventory",
tab: "special",
anySubTab: !0
})));
};
}
});
var getFieryWarpathWave, getFieryWarpathStreak, getFieryWarpathRemainingInWave, getFieryWarpathPercent, init_fiery_warpath = __esm({
"src/utils/shared/fiery-warpath.js"() {
getFieryWarpathWave = () => {
let wave = 0, waveEl = document.querySelector(".warpathHUD.showPortal");
return waveEl && (wave = [...waveEl.classList].find((className) => className.startsWith("wave")).replace("wave", "").replace("_", "")), wave;
}, getFieryWarpathStreak = () => {
let streak = 0, streakEl = document.querySelector(".warpathHUD-streakBoundingBox");
return streakEl && (streak = Number.parseInt(streakEl.innerText.replaceAll(`
`, " ").replace(" 0", "").trim()) || 0), streak;
}, getFieryWarpathRemainingInWave = (wave) => {
wave || (wave = getFieryWarpathWave());
let remaining2 = 0, remainingEl = document.querySelectorAll(`.warpathHUD-wave.wave_${wave} .warpathHUD-wave-mouse-population`);
return remainingEl.length && (remaining2 = [...remainingEl].reduce((sum, el) => (el.innerText && (sum += Number.parseInt(el.innerText)), sum), 0)), remaining2;
}, getFieryWarpathPercent = () => {
let percent = 0, percentEl = document.querySelector(".warpathHUD-moraleBar span");
if (percentEl) {
let style = percentEl.getAttribute("style");
style && (percent = Number.parseInt(style.replace("width:", "").replace("%;", "")));
}
return percent;
};
}
});
var utils_exports = {};
__export(utils_exports, {
addBodyClass: () => addBodyClass,
addEvent: () => addEvent,
addExternalStyles: () => addExternalStyles,
addHudStyles: () => addHudStyles,
addIconToMenu: () => addIconToMenu,
addItemToGameInfoBar: () => addItemToGameInfoBar,
addJournalEntry: () => addJournalEntry,
addMHCTData: () => addMHCTData,
addModuleStyles: () => addModuleStyles,
addOnboardingMessage: () => addOnboardingMessage,
addSetting: () => addSetting,
addSettingForModule: () => addSettingForModule,
addSettingPreview: () => addSettingPreview,
addSettingsTab: () => addSettingsTab,
addStyles: () => addStyles,
addStylesDirect: () => addStylesDirect,
addSubmenuDivider: () => addSubmenuDivider,
addSubmenuItem: () => addSubmenuItem,
addTrapQuantity: () => addTrapQuantity,
cacheDelete: () => cacheDelete,
cacheFinishedMap: () => cacheFinishedMap,
cacheGet: () => cacheGet,
cacheSet: () => cacheSet,
cacheSetAsync: () => cacheSetAsync,
clearCaches: () => clearCaches,
createPopup: () => createPopup,
dataGet: () => dataGet,
dataSet: () => dataSet,
database: () => database,
databaseDelete: () => databaseDelete,
dbDelete: () => dbDelete,
dbDeleteAll: () => dbDeleteAll,
dbGet: () => dbGet,
dbGetAll: () => dbGetAll,
dbSet: () => dbSet,
debounce: () => debounce,
debug: () => debug,
debuglog: () => debuglog,
deleteSetting: () => deleteSetting,
doEvent: () => doEvent2,
doInternalEvent: () => doInternalEvent,
doRequest: () => doRequest,
getAnonymousUserHash: () => getAnonymousUserHash,
getArEl: () => getArEl,
getArForMouse: () => getArForMouse,
getCurrentDialog: () => getCurrentDialog,
getCurrentLocation: () => getCurrentLocation2,
getCurrentLocationName: () => getCurrentLocationName,
getCurrentPage: () => getCurrentPage,
getCurrentSubtab: () => getCurrentSubtab,
getCurrentTab: () => getCurrentTab,
getData: () => getData,
getExtensionLink: () => getExtensionLink,
getExtensionLinkText: () => getExtensionLinkText,
getFieryWarpathPercent: () => getFieryWarpathPercent,
getFieryWarpathRemainingInWave: () => getFieryWarpathRemainingInWave,
getFieryWarpathStreak: () => getFieryWarpathStreak,
getFieryWarpathWave: () => getFieryWarpathWave,
getFlag: () => getFlag,
getFlags: () => getFlags,
getGlobal: () => getGlobal,
getHeaders: () => getHeaders,
getHighestArForMouse: () => getHighestArForMouse,
getLastMaptain: () => getLastMaptain,
getLocationForMouse: () => getLocationForMouse,
getMapData: () => getMapData,
getRelicHunterLocation: () => getRelicHunterLocation,
getSetting: () => getSetting,
getSettingDirect: () => getSettingDirect,
getSettings: () => getSettings,
getTradableItems: () => getTradableItems,
getUserData: () => getUserData,
getUserItems: () => getUserItems,
getUserSetupDetails: () => getUserSetupDetails,
getUserTitle: () => getUserTitle,
getUserTitleShield: () => getUserTitleShield,
hasMiniCRE: () => hasMiniCRE,
hasSeenOnboardingStep: () => hasSeenOnboardingStep,
humanizer: () => humanizer,
initOpenButtons: () => initOpenButtons,
isApp: () => isApp,
isAppleOS: () => isAppleOS,
isCurrentPage: () => isCurrentPage,
isDarkMode: () => isDarkMode,
isLegacyHUD: () => isLegacyHUD,
isLoggedIn: () => isLoggedIn,
isMHCT: () => isMHCT,
isOverlayVisible: () => isOverlayVisible,
isUnsupportedFile: () => isUnsupportedFile,
isUserTitleAtLeast: () => isUserTitleAtLeast,
isVersionHigher: () => isVersionHigher,
isiFrame: () => isiFrame,
makeButton: () => makeButton,
makeElement: () => makeElement,
makeElementDraggable: () => makeElementDraggable,
makeFavoriteButton: () => makeFavoriteButton,
makeJournalEntry: () => makeJournalEntry,
makeLink: () => makeLink,
makeMathButton: () => makeMathButton,
makeMathButtons: () => makeMathButtons,
makeMhButton: () => makeMhButton,
makePage: () => makePage,
makeProgressLogLink: () => makeProgressLogLink,
makeTooltip: () => makeTooltip,
mapData: () => mapData2,
mapModel: () => mapModel,
mapper: () => mapper,
maybeDoMaintenance: () => maybeDoMaintenance,
onActivation: () => onActivation,
onDeactivation: () => onDeactivation,
onDialogHide: () => onDialogHide,
onDialogShow: () => onDialogShow,
onEvent: () => onEvent,
onJournalEntry: () => onJournalEntry,
onNavigation: () => onNavigation,
onOverlayChange: () => onOverlayChange,
onPageChange: () => onPageChange,
onRender: () => onRender,
onRequest: () => onRequest,
onSettingsChange: () => onSettingsChange,
onTrapChange: () => onTrapChange,
onTravel: () => onTravel,
onTurn: () => onTurn,
plainHumanizer: () => plainHumanizer,
refreshPage: () => refreshPage,
removeBodyClass: () => removeBodyClass,
removeBodyClassByPrefix: () => removeBodyClassByPrefix,
removeHudStyles: () => removeHudStyles,
removeIconFromMenu: () => removeIconFromMenu,
removeStyles: () => removeStyles,
removeSubmenuItem: () => removeSubmenuItem,
replaceIconInMenu: () => replaceIconInMenu,
replaceInTemplate: () => replaceInTemplate,
replaceJournalEntry: () => replaceJournalEntry,
saveOnboardingStep: () => saveOnboardingStep,
saveSetting: () => saveSetting,
saveSettingDirect: () => saveSettingDirect,
sessionDelete: () => sessionDelete,
sessionGet: () => sessionGet,
sessionSet: () => sessionSet,
sessionsDelete: () => sessionsDelete,
setGlobal: () => setGlobal,
setLastMaptain: () => setLastMaptain,
setMapData: () => setMapData,
setMultipleTimeout: () => setMultipleTimeout,
setPage: () => setPage,
setTab: () => setTab,
showErrorMessage: () => showErrorMessage,
showHornMessage: () => showHornMessage,
showLoadingError: () => showLoadingError,
showLoadingPopup: () => showLoadingPopup,
showLoadingPopupError: () => showLoadingPopupError,
showSuccessMessage: () => showSuccessMessage,
showTravelConfirmation: () => showTravelConfirmation,
showTravelConfirmationNoDetails: () => showTravelConfirmationNoDetails,
sleep: () => sleep,
toEscapedJSON: () => toEscapedJSON,
toggleBlueprint: () => toggleBlueprint,
travelTo: () => travelTo,
updateCaches: () => updateCaches,
uppercaseFirstLetter: () => uppercaseFirstLetter,
waitForElement: () => waitForElement
});
var init_utils2 = __esm({
"src/utils/index.js"() {
init_blueprint();
init_db();
init_data();
init_debug();
init_draggable();
init_elements();
init_events();
init_event_registry();
init_flags();
init_global();
init_horn();
init_humanizer();
init_journal();
init_links();
init_location();
init_location_current();
init_maps();
init_messages();
init_onboarding();
init_page();
init_settings();
init_settings_markup();
init_styles();
init_templates();
init_user();
init_utils();
init_trap_quantity();
init_open_all();
init_fiery_warpath();
}
});
var removeRetiredDbs, clearDataCache, moveFromCacheToDataDb, update, __default, init__ = __esm({
"src/updates/versions/0.69.0.js"() {
init_utils2();
removeRetiredDbs = () => __async(void 0, null, function* () {
try {
yield indexedDB.deleteDatabase("mh-improved-ar-cache");
} catch (error) {
debuglog("update-0.69.0", "Error deleting mh-improved-ar-cache db", error);
}
}), clearDataCache = () => __async(void 0, null, function* () {
yield dbDeleteAll("mh-improved-data");
}), moveFromCacheToDataDb = () => __async(void 0, null, function* () {
let keys = [
"fulmina_charged_tooth_stat_item-quantity",
"printing_press_charge_stat_item-quantity",
"pb-stats",
"quests"
];
for (let key of keys) {
let value = yield dbGet("cache", key);
dataSet(key, value), cacheDelete(key);
}
}), update = () => __async(void 0, null, function* () {
return yield moveFromCacheToDataDb(), yield clearDataCache(), yield removeRetiredDbs(), !0;
}), __default = {
version: "0.69.0",
update
};
}
});
var imported, versionUpdates, saveSettingsBackup, restoreSettingsBackup, getVersionUpdates, doVersionUpdates, update2, updates_default, init_updates = __esm({
"src/updates/index.js"() {
init_utils2();
init__();
imported = [__default], versionUpdates = imported, saveSettingsBackup = () => {
localStorage.setItem("mousehunt-improved-settings-backup", localStorage.getItem("mousehunt-improved-settings"));
}, restoreSettingsBackup = () => {
let backedUpSettings = localStorage.getItem("mousehunt-improved-settings-backup");
backedUpSettings && localStorage.setItem("mousehunt-improved-settings", backedUpSettings);
}, getVersionUpdates = () => {
let neededUpdates = [], updatesCompleted = getSetting("mh-improved-updates-completed", []);
for (let versionUpdate in versionUpdates)
updatesCompleted.includes(versionUpdate.version) || neededUpdates.push(versionUpdate);
return debuglog("update-migration", "Needed updates:", neededUpdates), neededUpdates;
}, doVersionUpdates = (updates) => __async(void 0, null, function* () {
for (let version of Object.keys(updates)) {
let update3 = versionUpdates[version];
try {
if (debuglog("update-migration", `Running update for ${update3.version}`), !(yield update3.update()))
throw new Error(`Error updating to ${update3.version}`);
let updatesCompleted = getSetting("mh-improved-updates-completed", []);
updatesCompleted.push(update3.version), saveSetting("mh-improved-updates-completed", updatesCompleted);
} catch (error) {
throw debuglog("update-migration", `Error updating to ${update3.version}`, error), error;
}
}
}), update2 = (previousVersion, newVersion) => __async(void 0, null, function* () {
debuglog("update-migration", `Updating from ${previousVersion} to ${newVersion}`);
let updates = getVersionUpdates();
if (!(Object.keys(updates).length > 0)) {
saveSetting("mh-improved-version", newVersion), updateCaches(), doEvent2("mh-improved-updated", previousVersion);
return;
}
let popup = showLoadingPopup(previousVersion === "0.0.0" ? "Installing MouseHunt Improved \u2026" : `Updating MouseHunt Improved to v${newVersion}\u2026`);
addBodyClass("mh-improved-updating"), setGlobal("mh-improved-updating", !0), saveSettingsBackup();
try {
yield doVersionUpdates(updates), saveSetting("mh-improved-version", newVersion), popup = showLoadingPopup(`MouseHunt Improved has been updated to v${newVersion}!`), onEvent("mh-improved-init", () => {
popup.hide(), doEvent2("mh-improved-updated", previousVersion);
}, !0);
} catch (error) {
throw restoreSettingsBackup(), showLoadingPopup("Error updating MouseHunt Improved. Please try refreshing the page."), error;
}
console.log("Updated MouseHunt Improved to v", newVersion);
}), updates_default = (previousVersion, newVersion) => __async(void 0, null, function* () {
previousVersion !== newVersion && (debuglog("update-migration", `Previous version: ${previousVersion}`), yield update2(previousVersion, newVersion), doEvent2("mh-improved-updated", newVersion));
});
}
});
var styles_default, init_styles2 = __esm({
"src/modules/taller-windows/styles.css"() {
styles_default = `.springHuntHUD-popup-allEggs,.adventureBookPopup-titleContent,.convertibleOpenView-itemContainer,.marketplaceView-browse-content,.MHCheckoutAllRewardsPageView,.treasureMapView-block-content.tall,.treasureMapView-blockWrapper.tall .treasureMapView-block-content,#messengerUINotification .notificationHeader,#supplytransfer .drawer .listContainer,#supplytransfer .drawer .tabContent,#supplytransfer .drawer{height:auto;max-height:75vh}#messengerUINotification .notificationMessageList,.treasureMapView-block-content,.treasureMapView-block-content.halfHeight{height:auto;max-height:55vh}#supplytransfer .drawer{padding-bottom:75px}.adventureBookPopup-titleContent{max-height:unset}.treasureMapDialogView.limitHeight .treasureMapView-block-content{max-height:75vh}.treasureMapDialogView.wide.limitHeight.confirm .treasureMapView,.treasureMapDialogView.limitHeight .treasureMapDialogView-content{max-height:500px}.giftSelectorView-inbox-giftContainer,#overlayPopup .giftSelectorView-scroller{height:auto;min-height:300px;max-height:65vh}body #overlayPopup .giftSelectorView-scroller.giftSelectorView-giftContainer{min-height:unset}#overlayPopup.giftSelectorViewPopup{top:50px!important}.springHuntHUD-popup-regionContainer{display:contents}#overlayPopup .imgArray{min-height:105px;max-height:500px}.floatingIslandsWorkshop-partsContainer{top:263px;left:113px;width:533px;height:auto;background-image:url(https://i.mouse.rip/fi-airships-middle.png);background-size:contain;border-radius:12px}.floatingIslandsWorkshop-parts-content{position:relative;height:100%;max-height:60vh}.floatingIslandsWorkshop-parts-title{padding:5px 10px 0;margin-top:-23px;margin-right:-1px;background:radial-gradient(circle,#fdf9bd,#fff9dc,#fdf9bd);border:none;border-radius:4px 5px 0 0}.floatingIslandsWorkshop-partsContainer:after{position:absolute;bottom:-3px;left:0;width:533px;height:30px;content:"";background-image:url(https://i.mouse.rip/fi-airships-bottom-2.png);background-position:bottom}.floatingIslandsWorkshop-stabilizer{position:absolute;top:250px;left:430px}.select2-results{max-height:50vh}.giftSelectorView-scroller{height:auto}.mh-gift-buttons-clone-wrapper{max-height:calc(75vh - 175px)}.mh-ui-goals-block .treasureMapView-block-content{max-height:unset}.mh-ui-environments-block{max-height:unset;overflow-y:auto}.treasureMapView-block-content{height:unset}.treasureMapView-blockWrapper.tall .treasureMapView-block-content.treasureMapShopsView-shopItems{height:100%;max-height:unset;overflow-x:hidden}
`;
}
});
var init, taller_windows_default, init_taller_windows = __esm({
"src/modules/taller-windows/index.js"() {
init_utils2();
init_styles2();
init = () => __async(void 0, null, function* () {
addStyles(styles_default, "taller-windows");
}), taller_windows_default = {
id: "taller-windows",
name: "Taller Windows",
type: "feature",
default: !0,
description: "Make popup and dialog windows taller.",
load: init
};
}
});
var settings_default, init_settings2 = __esm({
"src/modules/settings/settings/index.js"() {
settings_default = () => __async(void 0, null, function* () {
return [{
id: "mh-improved-advanced-settings",
title: "",
default: !0,
description: "",
settings: {
type: "blank"
}
}];
});
}
});
var icons_default, init_icons = __esm({
"src/modules/settings/icons.css"() {
icons_default = `#mousehunt-improved-settings-better-better-gifts:before{background-image:url(https://i.mouse.rip/s/better-gifts.svg)}#mousehunt-improved-settings-better-better-inventory:before{background-image:url(https://i.mouse.rip/s/better-inventory.svg)}#mousehunt-improved-settings-better-better-item-view:before{background-image:url(https://i.mouse.rip/s/better-item-view.svg)}#mousehunt-improved-settings-better-better-journal:before{background-image:url(https://i.mouse.rip/s/better-journal.svg)}#mousehunt-improved-settings-better-better-kings-reward:before{background-image:url(https://i.mouse.rip/s/better-kings-reward.svg)}#mousehunt-improved-settings-better-better-maps:before{background-image:url(https://i.mouse.rip/s/better-maps.svg)}#mousehunt-improved-settings-better-better-marketplace:before{background-image:url(https://i.mouse.rip/s/better-marketplace.svg)}#mousehunt-improved-settings-better-better-mice:before{background-image:url(https://i.mouse.rip/s/better-mice.svg)}#mousehunt-improved-settings-better-better-quests:before{background-image:url(https://i.mouse.rip/s/better-quests.svg)}#mousehunt-improved-settings-better-better-send-supplies:before{background-image:url(https://i.mouse.rip/s/better-send-supplies.svg)}#mousehunt-improved-settings-better-better-shops:before{background-image:url(https://i.mouse.rip/s/better-shops.svg)}#mousehunt-improved-settings-better-better-tournaments:before{background-image:url(https://i.mouse.rip/s/better-tournaments.svg)}#mousehunt-improved-settings-better-better-travel:before{background-image:url(https://i.mouse.rip/s/better-travel.svg)}#mousehunt-improved-settings-better-better-ui:before{background-image:url(https://i.mouse.rip/s/better-ui.svg?2)}#mousehunt-improved-settings-design-custom-background:before{background-image:url(https://i.mouse.rip/s/custom-background.svg)}#mousehunt-improved-settings-design-custom-horn:before{background-image:url(https://i.mouse.rip/s/custom-horn.svg)}#mousehunt-improved-settings-design-custom-hud:before{background-image:url(https://i.mouse.rip/s/custom-hud.svg)}#mousehunt-improved-settings-design-custom-shield:before{background-image:url(https://i.mouse.rip/s/custom-shield.svg)}#mousehunt-improved-settings-feature-big-timer:before{background-image:url(https://i.mouse.rip/s/big-timer.svg)}#mousehunt-improved-settings-feature-catch-rate-estimate:before{background-image:url(https://i.mouse.rip/s/catch-rate-estimate.svg)}#mousehunt-improved-settings-feature-codex-at-bottom:before{background-image:url(https://i.mouse.rip/s/codex-at-bottom.svg)}#mousehunt-improved-settings-feature-copy-id:before{background-image:url(https://i.mouse.rip/s/copy-id.svg)}#mousehunt-improved-settings-feature-dark-mode:before{background-image:url(https://i.mouse.rip/s/dark-mode.svg)}#mousehunt-improved-settings-feature-data-exporters:before{background-image:url(https://i.mouse.rip/s/data-exporters.svg)}#mousehunt-improved-settings-feature-delayed-menus:before{background-image:url(https://i.mouse.rip/s/delayed-menus.svg)}#mousehunt-improved-settings-feature-delayed-tooltips:before{background-image:url(https://i.mouse.rip/s/delayed-tooltips.svg)}#mousehunt-improved-settings-feature-favorite-setups:before{background-image:url(https://i.mouse.rip/s/favorite-setups.svg)}#mousehunt-improved-settings-feature-fixes:before{background-image:url(https://i.mouse.rip/s/fixes.svg)}#mousehunt-improved-settings-feature-flrt-helper:before{background-image:url(https://i.mouse.rip/s/flrt-helper.svg)}#mousehunt-improved-settings-feature-hover-profiles:before{background-image:url(https://i.mouse.rip/s/hover-profiles.svg)}#mousehunt-improved-settings-feature-image-upscaling:before{background-image:url(https://i.mouse.rip/s/image-upscaling.svg)}#mousehunt-improved-settings-feature-inline-wiki:before{background-image:url(https://i.mouse.rip/s/inline-wiki.svg)}#mousehunt-improved-settings-feature-inventory-lock-and-hide:before{background-image:url(https://i.mouse.rip/s/inventory-lock-and-hide.svg)}#mousehunt-improved-settings-feature-journal-changer:before{background-image:url(https://i.mouse.rip/s/journal-changer.svg)}#mousehunt-improved-settings-feature-keyboard-shortcuts:before{background-image:url(https://i.mouse.rip/s/keyboard-shortcuts.svg)}#mousehunt-improved-settings-feature-larger-codices:before{background-image:url(https://i.mouse.rip/s/larger-codices.svg)}#mousehunt-improved-settings-feature-larger-skin-images:before{background-image:url(https://i.mouse.rip/s/larger-skin-images.svg)}#mousehunt-improved-settings-feature-legacy-hud:before{background-image:url(https://i.mouse.rip/s/legacy-hud.svg?2)}#mousehunt-improved-settings-feature-lgs-reminder:before{background-image:url(https://i.mouse.rip/s/lgs-reminder.svg)}#mousehunt-improved-settings-feature-location-catch-stats:before{background-image:url(https://i.mouse.rip/s/location-catch-stats.svg)}#mousehunt-improved-settings-feature-location-dashboard:before{background-image:url(https://i.mouse.rip/s/location-dashboard.svg)}#mousehunt-improved-settings-feature-metric:before{background-image:url(https://i.mouse.rip/s/metric.svg)}#mousehunt-improved-settings-feature-only-open-multiple:before{background-image:url(https://i.mouse.rip/s/only-open-multiple.svg)}#mousehunt-improved-settings-feature-open-all:before{background-image:url(https://i.mouse.rip/s/open-all-but-one.svg)}#mousehunt-improved-settings-feature-open-all-but-one:before{background-image:url(https://i.mouse.rip/s/open-all-but-one.svg)}#mousehunt-improved-settings-feature-paste-hunter-id:before{background-image:url(https://i.mouse.rip/s/paste-hunter-id.svg)}#mousehunt-improved-settings-feature-prestige-base-stats:before{background-image:url(https://i.mouse.rip/s/prestige-base-stats.svg)}#mousehunt-improved-settings-feature-printing-press-paper-counter:before{background-image:url(https://i.mouse.rip/s/printing-press-paper-counter.svg)}#mousehunt-improved-settings-feature-profile-scoreboard-search:before{background-image:url(https://i.mouse.rip/s/profile-scoreboard-search.svg)}#mousehunt-improved-settings-feature-quick-filters-and-sort:before{background-image:url(https://i.mouse.rip/s/quick-filters-and-sort.svg)}#mousehunt-improved-settings-feature-quick-send-supplies:before{background-image:url(https://i.mouse.rip/s/quick-send-supplies.svg)}#mousehunt-improved-settings-feature-replace-favicon:before{background-image:url(https://i.mouse.rip/s/replace-favicon.svg)}#mousehunt-improved-settings-feature-shield-goes-to-camp:before{background-image:url(https://i.mouse.rip/s/shield-goes-to-camp.svg)}#mousehunt-improved-settings-feature-show-auras:before{background-image:url(https://i.mouse.rip/s/show-auras.svg)}#mousehunt-improved-settings-feature-ssdb-teeth-counter:before{background-image:url(https://i.mouse.rip/s/ssdb-teeth-counter.svg)}#mousehunt-improved-settings-feature-taller-windows:before{background-image:url(https://i.mouse.rip/s/taller-windows.svg)}#mousehunt-improved-settings-feature-tem-crowns:before{background-image:url(https://i.mouse.rip/s/tem-crowns.svg)}#mousehunt-improved-settings-feature-ultimate-checkmark-show:before{background-image:url(https://i.mouse.rip/s/ultimate-checkmark-show.svg)}#mousehunt-improved-settings-feature-wisdom-in-stat-bar:before{background-image:url(https://i.mouse.rip/s/wisdom-in-stat-bar.svg?2)}#mousehunt-improved-settings-feature-native-dark-mode:before{background-image:url(https://i.mouse.rip/s/native-dark-mode.svg)}#mousehunt-improved-settings-feature-unique-loot-count:before{background-image:url(https://i.mouse.rip/s/unique-loot-count.svg)}#mousehunt-improved-settings-feature-emotes:before{background-image:url(https://i.mouse.rip/s/emotes.svg)}#mousehunt-improved-settings-beta-experiments:before{background-image:url(https://i.mouse.rip/s/experiments.svg)}
`;
}
});
var styles_default2, init_styles3 = __esm({
"src/modules/settings/styles.css"() {
styles_default2 = `.mousehunt-improved-settings .PagePreferences__section{padding:10px;margin:10px 0;border:1px solid #e0cfb4}.mousehunt-improved-settings .PagePreferences__title{padding-bottom:10px;margin:0}.mousehunt-improved-settings .PagePreferences__titleText{position:relative;display:flex;gap:10px;justify-content:flex-start;font-family:system-ui,sans-serif;font-weight:200}.mousehunt-improved-settings .PagePreferences__settingNameText{color:#000;cursor:default}.mousehunt-improved-settings .PagePreferences__settingNameText:hover{text-decoration:none}.mousehunt-improved-settings .mhui-setting-toggle{position:absolute;top:10px;right:15px;width:0;height:0;border-right:6px solid transparent;border-bottom:9px solid #999;border-left:6px solid transparent;transition:transform .15s}.mousehunt-improved-settings .mhui-setting-toggle.toggled{transform:rotate(-180deg)}.mousehunt-improved-settings .toggled .PagePreferences__titleText,.mousehunt-improved-settings .toggled .PagePreferences__title{padding:0}.mousehunt-improved-settings .toggled .PagePreferences__separator,.mousehunt-improved-settings .toggled .PagePreferences__sectionWrapper,.mousehunt-improved-settings .toggled #mousehunt-improved-settings-location-hud-wrapper{height:0;overflow:hidden;visibility:hidden}#mousehunt-improved-settings-design-custom-background,#mousehunt-improved-settings-design-custom-hud,#mousehunt-improved-settings-design-custom-horn,#mousehunt-improved-settings-design-custom-shield,#mousehunt-improved-settings-feature-ultimate-checkmark-show,.mousehunt-improved-settings .PagePreferences__settingsList{position:relative;gap:0;padding:5px 0 5px 45px;border-color:#f2ebde;border-top:1px solid #f2ebde;border-left:none}#mousehunt-improved-settings-advanced .PagePreferences__settingsList,#mousehunt-improved-settings-design .PagePreferences__settingsList,#mousehunt-improved-settings-element-hiding .PagePreferences__settingsList{padding-left:10px}.mousehunt-improved-settings .PagePreferences__settingsList:not(.PagePreferences__subSetting):before,#mousehunt-improved-settings-feature-ultimate-checkmark-show:before{position:absolute;top:0;bottom:0;left:5px;width:25px;height:auto;content:"";background-repeat:no-repeat;background-position:center;background-size:25px;opacity:.4;transition:opacity .1s ease-out;will-change:transform}.mousehunt-improved-settings .PagePreferences__setting{gap:5px;align-items:center;padding-right:5px;margin:3px 0}.mousehunt-improved-settings .PagePreferences__setting .PagePreferences__settingAction{margin-bottom:0}.mousehunt-improved-settings .PagePreferences__settingDefault,#mousehunt-improved-settings-beta-experiments>.PagePreferences__setting .PagePreferences__settingAction,#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingDescription,#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList .PagePreferences__settingDefault{display:none}.mousehunt-improved-settings .PagePreferences__settingName{font-family:system-ui,sans-serif;font-weight:400}.mousehunt-improved-settings .PagePreferences__settingDescription{max-width:550px;padding:5px 0;font-family:system-ui,sans-serif;font-weight:400}#mousehunt-improved-settings-design .PagePreferences__settingDescription,#mousehunt-improved-settings-element-hiding .PagePreferences__settingDescription{display:none}.mousehunt-improved-settings .PagePreferences__subSetting .PagePreferences__settingDescription{padding-bottom:0}.mousehunt-improved-settings .PagePreferences__subSetting .PagePreferences__settingDescription.empty-description,.mousehunt-improved-settings .PagePreferences__settingDescription.empty-description{padding:0}.mousehunt-improved-settings .PagePreferences__settingsList .PagePreferences__subSetting{display:none;padding:5px 10px 5px 5px;margin-left:5px;border-top:none;border-left:1px solid #f2ebde}#mousehunt-improved-settings-location-hud .PagePreferences__title{margin-bottom:5px;border-bottom:1px solid #f2ebde}#mousehunt-improved-settings-advanced.toggled .PagePreferences__title,#mousehunt-improved-settings-location-hud.toggled .PagePreferences__title{margin-bottom:0;border:none}.mousehunt-improved-settings .PagePreferences__settingsList.active .PagePreferences__subSetting{display:block}.mousehunt-improved-settings .PagePreferences__settingsList .PagePreferences__subSetting:nth-child(odd){background-color:#f4f4f4}.PagePreferences__subSetting .PagePreferences__settingName{font-size:12px;line-height:1}.mousehunt-improved-settings .PagePreferences__settingsList.active .PagePreferences__subSetting .PagePreferences__setting{display:flex;padding:0;margin:0}.mousehunt-improved-settings .active.highlight .mousehuntSettingSlider:before{box-shadow:0 0 3px #0ac2c2 inset}.mousehunt-improved-settings .inputBoxContainer.multiSelect{display:flex;flex-flow:row wrap;justify-content:flex-end;max-width:400px}.mousehunt-improved-settings .inputBox.multiSelect{margin-right:4px;margin-bottom:4px;font-size:11px}#mousehunt-improved-settings-better-better-send-supplies-pinned-items .inputBox.multiSelect{max-width:160px}#mousehunt-improved-settings-design .inputBox.multiSelect{width:200px}.mousehunt-improved-settings .PagePreferences__subSetting .multi-toggle-row .PagePreferences__settingName{font-size:10px;line-height:1.75}.mousehunt-improved-settings .PagePreferences__settingsList.multi-toggle-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0 15px;place-items:end end;padding:0;border:none}.mousehunt-improved-settings .PagePreferences__settingsList .multi-toggle-row .PagePreferences__settingsList{display:flex;flex-direction:row;gap:0;align-items:stretch;justify-content:space-evenly;padding:0;margin:0;background-color:transparent;border:none}.mousehunt-improved-settings .PagePreferences__subSetting .mousehuntSettingSlider{display:block;width:40px;height:16px}.mousehunt-improved-settings .PagePreferences__subSetting .mousehuntSettingSlider:after{width:14px;height:14px}.mousehunt-improved-settings .PagePreferences__subSetting .mousehuntSettingSlider.active:after{left:calc(100% - 14px)}.mousehunt-improved-settings .PagePreferences__settingsList-textarea .PagePreferences__setting,.mousehunt-improved-settings .PagePreferences__settingsList-input .PagePreferences__setting{display:grid;grid-template-columns:1fr 400px}.mousehunt-improved-settings input,.mousehunt-improved-settings textarea{width:100%;font-family:monospace;font-size:12px;background-color:#eee;border:1px solid #ccc}.mousehunt-improved-settings textarea{min-height:45px}#mousehunt-improved-settings-design-custom-background>div>div>.PagePreferences__settingName,#mousehunt-improved-settings-design-custom-camp-background>div>div>.PagePreferences__settingName,#mousehunt-improved-settings-design-custom-hud>div>div>.PagePreferences__settingName,#mousehunt-improved-settings-design-custom-horn>div>div>.PagePreferences__settingName,#mousehunt-improved-settings-design-custom-shield>div>div>.PagePreferences__settingName,#mousehunt-improved-settings-feature-ultimate-checkmark-show>div>div>.PagePreferences__settingName,#mousehunt-improved-settings-advanced-override-flags>div>div>.PagePreferences__settingName,#mousehunt-improved-settings-advanced-override-styles>div>div>.PagePreferences__settingName{font-size:15px;line-height:1}#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingAction,.mousehunt-improved-settings .multi-toggle .mousehuntSettingSlider{display:block;transform:scale(.75)}#mousehunt-improved-settings-location-hud-wrapper{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;justify-content:center;justify-items:stretch}#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList{grid-column:span 4;padding:0 5px 0 10px;margin-left:0;background-color:inherit;border:none}#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList[id*=mousehunt-improved-settings-location-hud-location-huds-enabled]{grid-column:span 1}#mousehunt-improved-settings-location-hud-wrapper #mousehunt-improved-settings-location-hud-location-huds-enabled-region-seperator,#mousehunt-improved-settings-location-hud-wrapper #mousehunt-improved-settings-location-hud-location-huds-location-hud-toggle{grid-column:1 / 5;background-color:transparent}#mousehunt-improved-settings-location-hud-wrapper #mousehunt-improved-settings-location-hud-option-seperator{height:10px;background-color:transparent;border-bottom:1px solid #f2ebde}#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList:nth-child(8n+1),#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList:nth-child(8n+2),#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList:nth-child(8n+3),#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList:nth-child(8n+4),#mousehunt-improved-settings-location-hud-wrapper #mousehunt-improved-settings-location-hud-location-huds-bountiful-beanstalk-flip-avatar.PagePreferences__settingsList,#mousehunt-improved-settings-location-hud-wrapper #mousehunt-improved-settings-location-hud-location-huds-fi-draggable-airship.PagePreferences__settingsList{background-color:#eee}#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList:last-child,#mousehunt-improved-settings-location-hud-wrapper #mousehunt-improved-settings-location-hud-location-huds-bountiful-beanstalk-inventory-in-one-row.PagePreferences__settingsList,#mousehunt-improved-settings-location-hud-wrapper #mousehunt-improved-settings-location-hud-location-huds-location-hud-toggle.PagePreferences__settingsList,#mousehunt-improved-settings-location-hud-wrapper #mousehunt-improved-settings-location-hud-location-huds-prologue-pond-wood-boat.PagePreferences__settingsList{background-color:transparent}#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList.highlight{background-color:#8bf7f5}#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList .PagePreferences__settingName{font-size:11px}#mousehunt-improved-settings-advanced{position:relative}#mousehunt-improved-settings-advanced-mh-improved-advanced-settings{position:absolute;top:13px;right:50px;padding:0;visibility:visible;border:none}#mousehunt-improved-settings-feature-quick-send-supplies-items .inputBoxContainer .multiSelect{max-width:150px;margin-right:4px;margin-bottom:4px}#mousehunt-improved-settings-better-better-send-supplies-pinned-items .inputBoxContainer.multiSelect{max-width:550px}#mousehunt-improved-settings-feature-quick-send-supplies-items .multiSelect{width:375px}.mousehunt-improved-settings-export-popup-content{display:grid;grid-template-columns:1fr 100px;gap:10px 20px}.mousehunt-improved-settings-export-popup-tip{display:flex;grid-column:1 / 3;align-items:center}.mousehunt-improved-settings-export-popup-buttons-buttons,.mousehunt-improved-settings-export-popup-buttons{position:relative;display:flex;flex-direction:column;gap:10px;align-items:stretch;justify-content:flex-end}.mousehunt-improved-settings-export-popup-left{align-items:stretch}.mousehunt-improved-settings-export-popup-content textarea{height:90%;min-height:400px;padding:10px;font-family:ui-monospace,Menlo,Monaco,Cascadia Mono,Segoe UI Mono,Roboto Mono,Oxygen Mono,"Ubuntu Monospace",Source Code Pro,Fira Mono,Droid Sans Mono,Courier New,monospace;font-size:12px;background-color:#f9f9f9;border:1px solid #b3b3b3}.mousehunt-improved-settings-export-details{display:flex;flex-direction:column;gap:10px;margin-bottom:auto}.mousehunt-improved-settings-export-details .export-reset{color:#ff4242}.mousehunt-improved-settings-export-details hr{width:100%;height:1px;background-color:#b3b3b3;border:none}.mousehunt-improved-settings-export-details code{padding:3px}.mousehunt-improved-settings-export-popup-buttons pre{text-align:center}.mh-ui-success-message.settings-export-save-success,.mh-ui-success-message.settings-export-copy-success{position:absolute;right:-25px;bottom:50px;left:-25px;padding:4px}.mh-ui-success-message.settings-export-copy-success{top:25px;bottom:unset}.mh-ui-success-message.settings-export-save-success{bottom:100px}.mousehunt-improved-settings-export-popup-content .dragover{background-color:#f2f2f2;border-color:#ffb40c;box-shadow:inset 0 0 6px #f4e830}.mousehunt-improved-settings-export-popup .suffix{display:none}.pageFrameView .mousehuntHeaderView .menuItem.mousehunt-improved-icon-menu{width:20px;padding:0 5px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAFX0lEQVRoge3XbYgdVx3H8e85Z87cp7kPc+/u3rvZZDfZPJLEVpI+pQklBWvSSIxWQkFfKCjoiyq+ExXpFoIIPiD6SgT7QgSRglCkSqUkVhu0aWtMW+OSTdJ0H9jsZu/u3se5d2bO8cVa6SuJWNgrzOfVmXe/HzPn/M9AIpFIJBKJRCKxWcRmB7hbUx+tjgz5uU83W0GjvrT+wncvtRcB1GYHuxvnzm4dO/OFE78cKRa+WMnFZ7aOFffsTS09d+EdjNzscHfjwJGjnyzvOPLAG395i7C5Tj4jP7Zt8sApAGezw/0nUyAXDw8/NVLd+/TcTCej6gu0TYpeq6WiqHQOeH4g98CPvvx4amJLdr+Io28eeujeTxV3PsJzP/ges396EYNE5xQinaXTN5MD9QZ+/52zRW+09HChWHi8UCp/olCb2JYdmmB57jY3r0zTaliQMQSGtX6L++4tf2gQCoifPvXI9v33THxmtFZ6ojBUm8jVdpfdygFIu8QLv2HtZoP6wgphTzA6DH4eKkISGTHu/OosavTw4TEh0qvHvvZK838JMgXiAsjh/chcBzlUqCpvLK92TJa1V/TddDbn1mq+brYCv9Vs3zMynDs0VMkfKVVHDmYrW7Su7EYWJsEtY6MuUeMSt/8+zepcm26vR0padEoyUlZsG8kzt2yGnX2nHztRmnjwh8uLnbf/+Oyj00YKq4QkDg1KK1zXwRhAghJIIYWKolBLqZSjpBJSOtbaVBzHrsQ6p6VSUkppLHWtlHbS6Yx2HU9KfClVOZVJFXekdDmXz0snnUek8ljhgNRgoN+4TdS6Qn/lFrTeZfrKDTCadmBY7cL27Qq/lMIrZ3DyxSHHV+qJaPby7urogzu9clWAwGKxBiwgxPumnbXwr2cLGGMIw1jEscF1HRydBqkQxMioASYC2wYs2qsgUyWkzmKNIQ7atFfnEWGLuNei1wvohyHtO0uUs33ml5rIMKBHil69jrEGLaDiKYb9NBnfI5PbWnZm3rwVdtod+ulZk/McEQd9jLEb4S3IKETEESY2CEBYi2VjbexGXYOwza6Je5G1UgphrJBhZKWVQiklyaQcelayFghCJI4jkUKgHIe4H9NuR/iVIrWax+WLV6kMuSihaPQsuw9OMnNtAT8vqY4qtoyk8fJZdNplbXVeOb5XenZ83/DOO+8Eb0ibvxzJwCqtAA3K3ZjVMUgVGSsdixHWYKRCYTDSRkZZYVQpjh1lrTY21FEUuTYOU3EcZWNjM7ExXmxF2VNU+pEpakXNYKph2NTNTpeoG7JyY4l3/yFZXOhw/boBo+gruNMOkY0mtYpke9FQq2XJFnJoP0/GmjVhLeL175+uLN2Kmqd+/NveB3Ow/PuLExeeOa4AJ0PGdTzHDVqBa4NuOlK27Ep5ECEfjvr9E1G/MZ5WHbp9Q7cbcX22y+J6nzVdZEsqJh2uc6AmmdhTxS+kkUMVZpeDpwdikL32k8Oa+rZH47D1ea3aD5XG86M2CnR7tcX0vGZ5qcnKwhz37/PYNV6i6OcQ5RI3Z9a/NBAF3nN+6rhTdIt7QtM7mSvrJ9O+PBQJ6cxfa3Ll9Tc5et8I42MeupjFqVV5+9X1kwNV4D0WxKVzZ7ZKHX3OEDzTMWlx49oMx45UGd5ZxQro2wIvv3x9dCALvN+lb3/8aNf1fn5t+uqOk0/upbJ3F4gPM/fSL17a9dlff2Tgr9P3f+P5V7SX//pY1V+/eH6GXlfQWvhrd6V++1tszNfBF5nmi4VS/EI2jrj6uz/Yub9d/NkDX734Z/6ffinPTx13nFxwTAunWXfzb536ygd75CcSiUQikUgkEv+9fwI8xC/BC1L8/wAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-position:bottom;background-size:contain}.pageFrameView .mousehuntHeaderView .menuItem.mousehunt-improved-icon-menu:hover{width:20px;padding:0 5px;overflow:visible;cursor:pointer;background:url(https://www.mousehuntgame.com/images/ui/hgbar/menuItem.png) 0 -30px repeat-x;border-top-right-radius:10px}.pageFrameView .mousehuntHeaderView .menuItem.mousehunt-improved-icon-menu:hover:after{position:absolute;inset:0;content:"";background:url(https://i.mouse.rip/mh-improved/icon.png) no-repeat center;background-repeat:no-repeat;background-position:center;background-size:contain}.mh-dark-mode .pageFrameView .mousehuntHeaderView .menuItem.mousehunt-improved-icon-menu:hover{background:#000}.mousehunt-improved-settings em{font-style:italic}.mousehunt-improved-advanced-buttons{display:flex;flex-direction:column;gap:10px;padding:10px 0 5px 5px;border-top:1px solid #f2ebde}a.reset-link{color:#f30000}
`;
}
});
var addExportSettings, addAdvancedSettingsButtons, highlightLocationHud, addTogglesToSettings, moveTabToEnd, addMhImprovedIconToMenu, init2, settings_default2, init_settings3 = __esm({
"src/modules/settings/index.js"() {
init_utils2();
init_settings2();
init_icons();
init_styles3();
addExportSettings = (append) => {
let existing = document.querySelector(".mousehunt-improved-export-settings");
existing && existing.remove();
let exportSettings = makeElement("div", ["mousehunt-improved-export-settings", "mousehuntActionButton", "tiny"]);
return makeElement("span", "", "Import / Export Settings", exportSettings), exportSettings.addEventListener("click", (e) => {
e.preventDefault(), e.stopPropagation();
let settings2 = JSON.stringify(JSON.parse(localStorage.getItem("mousehunt-improved-settings")), null, 2), content = `<div class="mousehunt-improved-settings-export-popup-content">
<div class="mousehunt-improved-settings-export-popup-tip">
To import settings, drag and drop the file into the box below, or paste the text in the box.
</div>
<textarea id="mousehunt-improved-settings-text" spellcheck="false">${settings2}</textarea>
<div class="mousehunt-improved-settings-export-popup-buttons">
<div class="mousehunt-improved-settings-export-details">
<a href="#" class="export-copy">Copy to clipboard</a>
<a href="#" class="export-download">Download file</a>
<hr>
<a href="#" class="export-upload">Upload file</a>
<a href="#" class="export-format">Format</a>
<a href="#" class="export-reset">Reset to default</a>
</div>
<div class="mousehunt-improved-settings-export-popup-buttons-buttons">
<div class="mousehuntActionButton save">
<span>Save</span>
</div>
<div class="mousehuntActionButton cancel">
<span>Cancel</span>
</div>
</div>
</div>`, popup = createPopup({
title: `MouseHunt Improved Settings <code>v${mhImprovedVersion}</code>`,
content,
className: "mousehunt-improved-settings-export-popup",
show: !0
});
window.location.search.includes("safe-mode") || localStorage.setItem("mousehunt-improved-settings-backup", JSON.stringify(getSettings()));
let popupElement = document.querySelector(".mousehunt-improved-settings-export-popup");
if (!popupElement)
return;
let textarea = popupElement.querySelector("textarea");
textarea.addEventListener("dragover", (dragevent) => {
dragevent.preventDefault(), textarea.classList.add("dragover");
}), textarea.addEventListener("drop", (dropevent) => {
var _a, _b;
if (dropevent.preventDefault(), textarea.classList.remove("dragover"), !((_b = (_a = dropevent.dataTransfer) == null ? void 0 : _a.files) != null && _b.length))
return;
let file = dropevent.dataTransfer.files[0], reader = new FileReader();
reader.onload = (loadEvent) => {
textarea.value = loadEvent.target.result;
}, reader.readAsText(file);
}), document.querySelector(".export-upload").addEventListener("click", (evt) => {
evt.preventDefault();
let input = document.createElement("input");
input.type = "file", input.accept = ".json", input.addEventListener("change", (changeEvent) => {
var _a, _b;
if (!((_b = (_a = changeEvent == null ? void 0 : changeEvent.target) == null ? void 0 : _a.files) != null && _b.length))
return;
let file = changeEvent.target.files[0], reader = new FileReader();
reader.onload = (loadEvent) => {
textarea.value = loadEvent.target.result;
}, reader.readAsText(file);
}), input.click();
}), document.querySelector(".export-reset").addEventListener("click", (evt) => {
evt.preventDefault(), textarea.value = JSON.stringify({
"mh-improved-platform": mhImprovedPlatform,
"mh-improved-version": mhImprovedVersion
}, null, 2);
}), document.querySelector(".export-format").addEventListener("click", (evt) => {
evt.preventDefault();
let currentSettings = JSON.parse(textarea.value), sorted = Object.keys(currentSettings).sort((a, b) => a.startsWith("mh-improved") && !b.startsWith("mh-improved") ? -1 : b.startsWith("mh-improved") && !a.startsWith("mh-improved") ? 1 : a.localeCompare(b)), newSettings = {};
sorted.forEach((key) => {
newSettings[key] = currentSettings[key];
}), textarea.value = JSON.stringify(newSettings, null, 2);
});
let saveButton = popupElement.querySelector(".mousehuntActionButton.save");
saveButton.addEventListener("click", () => {
let newSettings = textarea.value;
try {
JSON.parse(newSettings);
} catch (error) {
showErrorMessage({
message: "Invalid JSON. Settings not saved.",
append: saveButton,
after: !0,
classname: "settings-export-save-error"
}), console.error(error);
return;
}
localStorage.setItem("mousehunt-improved-settings-backup", localStorage.getItem("mousehunt-improved-settings")), localStorage.setItem("mousehunt-improved-settings", newSettings), showSuccessMessage({
message: "Settings saved. Refreshing\u2026",
append: saveButton,
after: !0,
classname: "settings-export-save-success"
}), setTimeout(() => {
window.location.reload();
});
});
let copyButton = popupElement.querySelector(".export-copy");
copyButton.addEventListener("click", (evt) => {
evt.preventDefault(), navigator.clipboard.writeText(textarea.value), showSuccessMessage({
message: "Settings copied to clipboard.",
append: copyButton,
after: !0,
classname: "settings-export-copy-success"
});
}), popupElement.querySelector(".export-download").addEventListener("click", (evt) => {
evt.preventDefault();
let link = document.createElement("a");
link.download = "mousehunt-improved-settings.json", link.href = `data:application/json;base64,${btoa(settings2)}`, link.click();
}), popupElement.querySelector(".mousehuntActionButton.cancel").addEventListener("click", () => {
popup.hide();
});
}), append.append(exportSettings), exportSettings;
}, addAdvancedSettingsButtons = () => {
let settingInput = document.querySelector("#mousehunt-improved-settings-advanced-mh-improved-advanced-settings .PagePreferences__setting");
settingInput && addExportSettings(settingInput);
let settingWrapper = document.querySelector("#mousehunt-improved-settings-advanced-wrapper");
if (!settingWrapper)
return;
let existing = document.querySelector(".mousehunt-improved-advanced-buttons");
existing && existing.remove();
let buttonsWrapper = makeElement("div", "mousehunt-improved-advanced-buttons"), clearCachedDataLink = makeElement("a", "clear-cache-link", "Clear Cached Data");
clearCachedDataLink.href = "#", clearCachedDataLink.addEventListener("click", (e) => __async(void 0, null, function* () {
if (e.preventDefault(), window.confirm("Are you sure you want to clear the cached data?")) {
yield clearCaches();
for (let key of Object.keys(sessionStorage))
key.startsWith("mh-improved") && sessionStorage.removeItem(key);
localStorage.removeItem(`mh-improved-cached-ar-v${mhImprovedVersion}`), window.location.reload();
}
})), buttonsWrapper.append(clearCachedDataLink);
let resetJournalLink = makeElement("a", "reset-link", "Reset Journal History");
resetJournalLink.href = "#", resetJournalLink.addEventListener("click", (e) => __async(void 0, null, function* () {
e.preventDefault(), window.confirm("Are you sure you want to reset your journal history?") && (yield dbDeleteAll("journal"), window.location.reload());
})), buttonsWrapper.append(resetJournalLink);
let resetDashboardLink = makeElement("a", "reset-link", "Reset Location Dashboard");
resetDashboardLink.href = "#", resetDashboardLink.addEventListener("click", (e) => __async(void 0, null, function* () {
e.preventDefault(), window.confirm("Are you sure you want to reset your dashboard data?") && (yield dataSet("quests", {}), window.location.reload());
})), buttonsWrapper.append(resetDashboardLink), settingWrapper.append(buttonsWrapper);
}, highlightLocationHud = () => {
let locationHudSettings = document.querySelector(`#mousehunt-improved-settings-location-hud-location-huds-enabled-${getCurrentLocation2()}`);
locationHudSettings && locationHudSettings.classList.add("highlight");
}, addTogglesToSettings = () => {
let settingsPage = document.querySelectorAll(".PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .PagePreferences__section");
if (!settingsPage)
return;
document.querySelectorAll(".mhui-setting-toggle").forEach((toggle) => {
toggle.remove();
});
let toggledSections = getSetting("settings.toggled-sections", ["mousehunt-improved-settings-beta", "mousehunt-improved-settings-advanced"]);
settingsPage.forEach((setting) => {
let toggle = makeElement("div", "mhui-setting-toggle"), titleText = setting.querySelector(".PagePreferences__titleText");
titleText.childNodes.length > 1 ? titleText.insertBefore(toggle, titleText.childNodes[1]) : titleText.append(toggle), titleText.addEventListener("click", (event) => {
if (event.target.tagName === "A")
return;
event.preventDefault(), toggledSections = getSetting("settings.toggled-sections", ["mousehunt-improved-settings-beta", "mousehunt-improved-settings-advanced"]), setting.classList.contains("toggled") ? (setting.classList.remove("toggled"), toggle.classList.remove("toggled"), toggledSections = toggledSections.filter((section) => section !== setting.id)) : (setting.classList.add("toggled"), toggle.classList.add("toggled"), toggledSections.push(setting.id)), saveSetting("settings.toggled-sections", toggledSections);
}), toggledSections.includes(setting.id) ? (setting.classList.add("toggled"), toggle.classList.add("toggled")) : (setting.classList.remove("toggled"), toggle.classList.remove("toggled"));
});
}, moveTabToEnd = () => {
let mhImprovedTab = document.querySelector("#mousehunt-improved-settings");
if (!mhImprovedTab)
return;
let userscriptTab = document.querySelector("#userscript-settings");
userscriptTab && userscriptTab.after(mhImprovedTab);
}, addMhImprovedIconToMenu = () => {
addIconToMenu({
id: "mousehunt-improved-icon-menu",
href: "https://www.mousehuntgame.com/preferences.php?tab=mousehunt-improved-settings",
title: "MouseHunt Improved Settings",
position: "append",
/**
* The action to perform when the icon is clicked.
*
* @param {Event} e The event.
*/
action: (e) => {
getCurrentPage() === "preferences" && getCurrentTab() === "mousehunt-improved-settings" && (e.preventDefault(), setPage("Camp"));
}
});
}, init2 = () => __async(void 0, null, function* () {
addStyles([
styles_default2,
icons_default
], "mousehunt-improved-settings"), addMhImprovedIconToMenu(), onEvent("mh-improved-setting-added-to-page", (module) => {
(module == null ? void 0 : module.key) === "error-reporting" && (moveTabToEnd(), highlightLocationHud(), addAdvancedSettingsButtons(), getSetting("experiments.new-settings-styles-columns", !1) || addTogglesToSettings());
});
}), settings_default2 = {
id: "_settings",
type: "advanced",
alwaysLoad: !0,
load: init2,
settings: settings_default
};
}
});
var styles_default3, init_styles4 = __esm({
"src/modules/delayed-tooltips/styles.css"() {
styles_default3 = `.mousehuntTooltipParent>.mousehuntTooltip{will-change:transform}.mousehuntTooltipParent:hover>.mousehuntTooltip{animation:mh-improved-in-scale .35s 1 forwards cubic-bezier(.4,0,1,1) 0s}.PageHunterProfile .userInteractionButtonsView-button .mousehuntTooltip,.no-delayed-tooltips .mousehuntTooltip{animation:none!important}
`;
}
});
var init3, delayed_tooltips_default, init_delayed_tooltips = __esm({
"src/modules/delayed-tooltips/index.js"() {
init_utils2();
init_styles4();
init3 = () => __async(void 0, null, function* () {
addStyles(styles_default3, "delayed-tooltips"), document.addEventListener("keydown", (e) => {
e.shiftKey && document.body.classList.add("no-delayed-tooltips");
}), document.addEventListener("keyup", (e) => {
e.shiftKey || document.body.classList.remove("no-delayed-tooltips");
});
}), delayed_tooltips_default = {
id: "delayed-tooltips",
name: "Delayed Tooltips",
type: "feature",
default: !1,
description: "Delay the display of tooltips when you mouse over something. Hold down the shift key to display tooltips immediately.",
load: init3
};
}
});
var fixItemPage, fixItemPageReceiver, item_page_default, init_item_page = __esm({
"src/modules/fixes/modules/item-page.js"() {
init_utils2();
fixItemPage = () => {
if (getCurrentPage() !== "item")
return;
let currentType = document.querySelector(".itemViewContainer");
if (!currentType)
return;
let type2 = currentType.classList.toString().replace("itemViewContainer ", "").split(" ");
if (!type2 || !type2[0] || type2.includes("message_item"))
return;
let link = document.querySelector(`.itemView-header-classification-link.${type2[0]} a`);
if (!link)
return;
let onclick = link.getAttribute("onclick");
if (!onclick)
return;
let page = onclick.match(/setPage\('(.+?)'.+tab:'(.+)'/);
if (!page)
return;
let pageTitle = page[1], tab = page[2], subtab = null;
(tab === "skin" || tab === "trinket") && (subtab = tab, tab = "traps");
let url = `https://www.mousehuntgame.com/${pageTitle.toLowerCase()}.php?tab=${tab}`;
subtab && (url += `&sub_tab=${subtab}`);
let itemType = currentType.getAttribute("data-item-type");
url += `&viewing-item-id=${itemType}`, window.location = url;
}, fixItemPageReceiver = () => {
let itemId = new URLSearchParams(window.location.search).get("viewing-item-id");
if (!itemId)
return;
hg.views.ItemView.show(itemId);
let item = document.querySelector(`.inventoryPage-item[data-item-type="${itemId}"]`);
item && item.scrollIntoView();
}, item_page_default = () => __async(void 0, null, function* () {
getCurrentPage() === "item" && fixItemPage(), onNavigation(fixItemPage, {
page: "item",
onLoad: !0
}), onNavigation(fixItemPageReceiver, {
page: "inventory",
anyTab: !0,
anySubtab: !0,
onLoad: !0
}), onDialogShow("item", () => {
let currentHref = window.location.href;
setMultipleTimeout(() => {
currentHref !== window.location.href && window.history.replaceState(null, "", currentHref);
}, [10, 100, 500, 1e3]);
});
});
}
});
var marketplace_buy_button_default, init_marketplace_buy_button = __esm({
"src/modules/fixes/modules/marketplace-buy-button.js"() {
marketplace_buy_button_default = () => __async(void 0, null, function* () {
hg.views.MarketplaceView.setOrderPrice = (price) => {
let input = document.querySelector(".marketplaceView-item-unitPriceWithTariff");
input && (input.value = price, hg.views.MarketplaceView.blurInput(input));
};
});
}
});
var fixPassingParcel, passing_parcel_default, init_passing_parcel = __esm({
"src/modules/fixes/modules/passing-parcel.js"() {
init_utils2();
fixPassingParcel = () => {
let passingParcel = document.querySelector('.inventoryPage-item[data-item-type="passing_parcel_message_item"]');
if (!passingParcel)
return;
let quantity = passingParcel.querySelector(".quantity");
if (!quantity)
return;
let newMarkup = `<div class="inventoryPage-item full convertible " onclick="app.pages.InventoryPage.useItem(this); return false;" data-item-id="1281" data-item-type="passing_parcel_message_item" data-item-classification="convertible" data-name="Passing Parcel" data-display-order="0">
<div class="inventoryPage-item-margin clear-block">
<div class="inventoryPage-item-name">
<a href="#" class="" onclick="hg.views.ItemView.show('passing_parcel_message_item'); return false;">
<abbr title="Passing Parcel">Passing Parcel (collectible)</abbr>
</a>
</div>
<a href="#" class="inventoryPage-item-larryLexicon" onclick="hg.views.ItemView.show('passing_parcel_message_item'); return false;">?</a>
<div class="inventoryPage-item-imageContainer">
<div class="itemImage"><a href="#" class="" onclick="hg.views.ItemView.show('passing_parcel_message_item'); return false;">
<img src="https://www.mousehuntgame.com/images/items/message_items/5591e5c34f081715aaca4e95e97a3379.jpg"></a>
<div class="quantity">${quantity.innerText}</div>
</div>
</div>
<div class="inventoryPage-item-contentContainer">
<div class="inventoryPage-item-content-description">
<div class="inventoryPage-item-content-description-text">
This parcel is meant to be passed along to a friend! If a friend sends one to you, tear away a layer and see if there's something inside!
</div>
<div class="inventoryPage-item-content-action">
<input type="button" id="passing-parcel-action" class="inventoryPage-item-button button" value="Pass Along">
</div>
</div>
</div>
</div>`;
passingParcel.outerHTML = newMarkup, document.querySelector("#passing-parcel-action").addEventListener("click", () => {
window.location.href = "https://www.mousehuntgame.com/supplytransfer.php?item_type=passing_parcel_message_item";
});
}, passing_parcel_default = () => __async(void 0, null, function* () {
onNavigation(fixPassingParcel, {
page: "inventory",
tab: "special",
onLoad: !0
});
});
}
});
var fixRiftTooltipQuantities, rift_tooltip_quantities_default, init_rift_tooltip_quantities = __esm({
"src/modules/fixes/modules/rift-tooltip-quantities.js"() {
init_utils2();
fixRiftTooltipQuantities = () => __async(void 0, null, function* () {
var _a, _b;
if (getCurrentLocation2() !== "rift_gnawnia")
return;
let cheeseQtys = yield getUserItems(["gnawnia_boss_cheese", "riftiago_cheese"]);
if (!cheeseQtys || !cheeseQtys.length)
return;
let craft = document.querySelector(".riftGnawniaHud-craftingBait .riftGnawniaHud-tooltip-quantity");
craft && (craft.textContent = ((_a = cheeseQtys[0]) == null ? void 0 : _a.quantity) || 0), document.querySelector(".riftGnawniaHud-potion .riftGnawniaHud-tooltip-quantity") && (craft.textContent = ((_b = cheeseQtys[1]) == null ? void 0 : _b.quantity) || 0);
}), rift_tooltip_quantities_default = () => __async(void 0, null, function* () {
fixRiftTooltipQuantities(), onTravel("rift_gnawnia", {
callback: fixRiftTooltipQuantities
});
});
}
});
var ronza_default, init_ronza = __esm({
"src/modules/fixes/styles/ronza.css"() {
ronza_default = `span.chromeBitImage,span.voucherImage{vertical-align:middle}
`;
}
});
var hud_shadow_default, init_hud_shadow = __esm({
"src/modules/fixes/styles/hud-shadow.css"() {
hud_shadow_default = `.mousehuntHud-marbleDrawer{background:url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) -46px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) 731px 0 no-repeat,url(https://i.mouse.rip/mh-improved/marble-shadow.png) 6px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/backgrounds/hud_bg_blue_repeating.png) repeat-y top center}
`;
}
});
var labyrinth_default, init_labyrinth = __esm({
"src/modules/fixes/styles/labyrinth.css"() {
labyrinth_default = `.labyrinthHUD.exit.secret{background-position-y:-184px}
`;
}
});
var tooltips_default, init_tooltips = __esm({
"src/modules/fixes/styles/tooltips.css"() {
tooltips_default = `.mousehuntTooltip.top .mousehuntTooltip-arrow:after{top:-16px;left:-13px;border-width:13px}.mousehuntTooltip.left .mousehuntTooltip-arrow:after{right:-10px;bottom:-13px;border-width:13px}.mousehuntTooltip.right .mousehuntTooltip-arrow:after{bottom:-13px;left:-10px;border-width:13px}.mousehuntTooltip.bottom .mousehuntTooltip-arrow:after{bottom:-16px;left:-13px;border-width:13px}
`;
}
});
var hunter_title_default, init_hunter_title = __esm({
"src/modules/fixes/styles/hunter-title.css"() {
hunter_title_default = `.hunterTitle .titles .title:nth-child(17) .description ul li:last-child,.hunterTitle .titles .title:nth-child(18) .description ul li:last-child,.hunterTitle .titles .title:nth-child(19) .description ul li:last-child{display:none}.hunterTitle .titles .userLevel .description{border-color:#957432}
`;
}
});
var tabs_default, init_tabs = __esm({
"src/modules/fixes/styles/tabs.css"() {
tabs_default = `a.mousehuntHud-page-tabHeader.collectibles span{overflow:visible!important;font-size:13px;text-overflow:unset!important;white-space:normal!important}#messengerUINotification .tabs a:hover .arrow{border-color:transparent transparent transparent #eee}.mousehuntHud-page-tabHeader-container{margin-bottom:-1px}.mousehuntHud-page-tabHeader.active span{background-color:#fff;border-bottom:1px solid #fff}.mousehuntHud-page-tabHeader{height:30px}.mousehuntHud-page-tabHeader span{height:16px;margin-top:5px}.mousehuntHud-page-tabHeader.active span,.mousehuntHud-page-tabHeader:hover span{padding-bottom:8px;margin-top:0;border-bottom:none}
`;
}
});
var news_back_default, init_news_back = __esm({
"src/modules/fixes/styles/news-back.css"() {
news_back_default = `.PageNewsPost .MHCheckout-button-arrow{position:relative}.PageNewsPost .MHCheckout-button-arrow:before{position:absolute;top:2px;bottom:10px;left:0;width:0;height:0;content:"";border-top:6px solid transparent;border-right:10px solid #000;border-bottom:6px solid transparent}
`;
}
});
var claim_gift_default, init_claim_gift = __esm({
"src/modules/fixes/styles/claim-gift.css"() {
claim_gift_default = `.claimGiftPage__giftQuantity{background:#fff777;border:1px solid #b5814e}
`;
}
});
var tem_default, init_tem = __esm({
"src/modules/fixes/styles/tem.css"() {
tem_default = `.pageFrameView #mousehuntContainer.PageCamp .campPage-trap-statsContainer:hover{background-color:#fdfaf2}body .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-statsContainer{padding-left:10px;margin:5px 0}
`;
}
});
var colors_default, init_colors = __esm({
"src/modules/fixes/styles/colors.css"() {
colors_default = `.halloweenBoilingCauldronRecipeView-cauldronTooltip{background:#333aaa}.eggSweeper-control-boundingBox:hover{box-shadow:5px 5px 10px #fff82f inset}.greatWinterHuntRewardTrackView__claimButton{text-shadow:1px 1px 1px #fff777}.forewordFarmPlotView-plot-help{box-shadow:2px 3px 3px 1px #333666}.floatingIslandsHUD.unlockedSkyPalace .floatingIslandsHUD-overlay{background:linear-gradient(to right,#000999,transparent)}.tableOfContentsProgressView-claimButton.busy:after,.folkloreForestRegionView-button.busy:after{background:#000888 url(https://www.mousehuntgame.com/images/ui/loaders/round_bar_green.gif) 50% 50% no-repeat}.halloweenBoilingCauldronHUD-dialog-reward.complete:after{box-shadow:5px 5px 5px #000888}.folkloreForestRegionView-dialogContainer{box-shadow:10px 10px 4px 1px #0003 inset}.folkloreForestRegionView-boost{box-shadow:2px 2px 2px #33333312}.MHCheckout-featuredItemTransparent.small .MHCheckout-featuredItemTransparent-backlight{background:linear-gradient(-45deg,#fff,#fffaaa)}.MHCheckout-relicHunterGrouped{background:#fff555}.MHCheckout-splash.halloween_skins .MHCheckout-link{background:#000999}.MHCheckout-splash.lunar_new_year_2023 .MHCheckout-featuredItem-actions{border:1px solid #ff351f}.tableOfContentsProgressView-reward-quantity{background:#fffaaa}.MHCheckoutDialogView-overlay{background:#fffa8a}.eggSweeper-viewAllRewardsButton:hover{background-color:#228b22}.schoolOfSorceryHallwayView__startCourse.schoolOfSorceryHallwayView__startCourse{text-shadow:1px 2px 2px #000aad}
`;
}
});
var backgrounds_default, init_backgrounds = __esm({
"src/modules/fixes/styles/backgrounds.css"() {
backgrounds_default = `@media only screen and (max-width: 1000px){body.halloween .pageFrameView-column.left,body.halloween .pageFrameView-column.right{background-color:#e87e33!important;background-repeat:no-repeat!important;background-position:0 0!important}body.halloween .pageFrameView-column.left{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/halloween/left.png)!important;background-position-x:100%!important}body.halloween .pageFrameView-column.right{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/halloween/right.png)!important}body.lunar_new_year .pageFrameView-column.left,body.lunar_new_year .pageFrameView-column.right{background-color:#7f051b!important;background-repeat:no-repeat!important;background-position:0 0!important}body.lunar_new_year .pageFrameView-column.left{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/lunar_new_year/left.png)!important;background-position-x:100%!important}body.lunar_new_year .pageFrameView-column.right{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/lunar_new_year/right.png)!important}body.great_winter_hunt .pageFrameView-column.left,body.great_winter_hunt .pageFrameView-column.right{background-color:#bad4ed!important}body.great_winter_hunt .pageFrameView-column.left{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/great_winter_hunt/left.jpg)!important}body.great_winter_hunt .pageFrameView-column.right{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/great_winter_hunt/right.jpg)!important}body.birthday .pageFrameView-column.left,body.birthday .pageFrameView-column.right{background-color:#bad4ed!important;background-repeat:no-repeat!important;background-position:0 0!important}body.birthday .pageFrameView-column.left{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/birthday/left.png)!important;background-position-x:100%!important}body.birthday .pageFrameView-column.right{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/birthday/right.png)!important}body.valentines .pageFrameView-column.left,body.valentines .pageFrameView-column.right{background-color:#f69798!important}body.valentines .pageFrameView-column.left{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/valentines/left.png)!important}body.valentines .pageFrameView-column.right{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/valentines/right.png)!important}body.spring_hunt .pageFrameView-column.left,body.spring_hunt .pageFrameView-column.right{background-color:#86ce5c!important;background-repeat:no-repeat!important}body.spring_hunt .pageFrameView-column.left{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/spring_hunt/left.png)!important}body.spring_hunt .pageFrameView-column.right{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/spring_hunt/right.png)!important}}
`;
}
});
var tutorial_overlay_default, init_tutorial_overlay = __esm({
"src/modules/fixes/styles/tutorial-overlay.css"() {
tutorial_overlay_default = `#overlayBg.larryOffice{width:100%;height:100%;background:transparent}#overlayBg.larryOffice:after{position:fixed;top:0;right:0;left:0;height:100vh;content:"";background-color:#505050e5}
`;
}
});
var fb_img_size_default, init_fb_img_size = __esm({
"src/modules/fixes/styles/fb-img-size.css"() {
fb_img_size_default = `img[src*="https://graph.facebook.com"].treasureMapView-hunter-image{width:44px;height:44px}.treasureMapView-environment-hunters img[src*="https://graph.facebook.com"].treasureMapView-hunter-image{width:20px;height:20px}
`;
}
});
var convertibles_default, init_convertibles = __esm({
"src/modules/fixes/styles/convertibles.css"() {
convertibles_default = `.itemView-action-convertForm{display:flex;align-items:center}.itemView-action-convert-quantity{top:0}
`;
}
});
var location_names_overflow_default, init_location_names_overflow = __esm({
"src/modules/fixes/styles/location-names-overflow.css"() {
location_names_overflow_default = `.mh-location-ss_huntington_ii .mousehuntHud-environmentName,.mh-location-pinnacle_chamber .mousehuntHud-environmentName,.mh-location-great_gnarled_tree .mousehuntHud-environmentName,.mh-location-rift_bristle_woods .mousehuntHud-environmentName{position:absolute;top:-5px;left:0;padding:4px 13px 3px 0;margin-top:32px;overflow:visible;background:linear-gradient(1deg,#d8c8a0 1%,#ddcfaa 61%,#efe3ce);border-top-right-radius:75px}
`;
}
});
var preferences_default, init_preferences = __esm({
"src/modules/fixes/styles/preferences.css"() {
preferences_default = `.PreferencesPage__dialogForm .PreferencesPage__formLabel{flex:1}.PreferencesPage__dialogForm .PreferencesPage__formInput{flex:1.8}.PreferencesPage__dialogForm form{padding-left:18px}.accountVerificationRewardsView__step.can_claim{background-image:none}
`;
}
});
var image_default, init_image = __esm({
"src/modules/fixes/styles/image.css"() {
image_default = `.friendsPage-friendRow.count_countess .friendsPage-friendRow-image-border{background-image:url(https://i.mouse.rip/profile-border-c.png)}
`;
}
});
var maps_default, init_maps2 = __esm({
"src/modules/fixes/styles/maps.css"() {
maps_default = `.treasureMapView-hunter.empty .treasureMapView-hunter-miceCaught{display:none}input.treasureMapView-shareLinkInput{width:95%;margin:0 auto}.treasureMapInviteSettingsView-listing-visibility.active:before{content:"\\2713"}
`;
}
});
var queso_default, init_queso = __esm({
"src/modules/fixes/styles/queso.css"() {
queso_default = `.quesoGeyserHUD-craftingItem:nth-child(2n){margin-right:0}
`;
}
});
var accessibility_default, init_accessibility = __esm({
"src/modules/fixes/styles/accessibility.css"() {
accessibility_default = `.campPage-trap-friendContainer span,.campPage-trap-trapEffectiveness span{color:#8e6642}.journaltext .luckyCatch{color:#42802b}.friendsPage-subduedLink{background-color:#747474}.marketplaceHome-blockMenu{color:#757575}.treasureMapRootView-footer-item-quantity{background:#6a6a74}
`;
}
});
var buttons_default, init_buttons = __esm({
"src/modules/fixes/styles/buttons.css"() {
buttons_default = `.schoolOfSorceryCourseView__dropOutButton{height:19px}
`;
}
});
var other_default, init_other = __esm({
"src/modules/fixes/styles/other.css"() {
other_default = `.mousehuntHud-shield.larrys_football_challenge.golden{background-image:url(https://www.mousehuntgame.com/images/ui/elements/header_world_cup_golden_shield.png)}.itemView-loading{z-index:0;border-top-right-radius:20px}.PageNews{background-size:cover}
`;
}
});
var menu_default, init_menu = __esm({
"src/modules/fixes/styles/menu.css"() {
menu_default = `body .mousehuntHud-menu .friends .team .icon{background-image:url(https://www.mousehuntgame.com/images/ui/hud/menu/team.png)}body .mousehuntHud-menu .scoreboards>a>.icon{background-image:url(https://www.mousehuntgame.com/images/ui/hud/menu/scoreboard.png)}body .mousehuntHud-menu .forum .icon{background-image:url(https://www.mousehuntgame.com/images/ui/hud/menu/forum.png)}
`;
}
});
var font_sizes_default, init_font_sizes = __esm({
"src/modules/fixes/styles/font-sizes.css"() {
font_sizes_default = `.riftWhiskerWoodsHUD-zone-rageLevel{font-size:14px}.riftWhiskerWoodsHUD-zone-charm-craftingItem-quantity{font-size:9px}
`;
}
});
var footer_default, init_footer = __esm({
"src/modules/fixes/styles/footer.css"() {
footer_default = `.pageFrameView-column.left,.pageFrameView-column.right{margin-bottom:-140px}
`;
}
});
var bountiful_beanstalk_default, init_bountiful_beanstalk = __esm({
"src/modules/fixes/styles/bountiful-beanstalk.css"() {
bountiful_beanstalk_default = `.bountifulBeanstalkPlayHarpDialogView__volumeIcon{background-repeat:no-repeat}
`;
}
});
var scoreboard_default, init_scoreboard = __esm({
"src/modules/fixes/styles/scoreboard.css"() {
scoreboard_default = `.scoreboardTableView-filters label{display:flex;align-items:center}
`;
}
});
var dropdown_default, init_dropdown = __esm({
"src/modules/fixes/styles/dropdown.css"() {
dropdown_default = `.mousehuntHeaderView .menuItem.dropdown .arrow{top:10px;transform:rotate(180deg)}.mousehuntHeaderView .menuItem.dropdown.expanded .arrow{top:5px}.dropdownContent{color:#000}.mousehuntHeaderView .support .dropdownContent{right:-.5px;border-top:1px solid #ccc}
`;
}
});
var imported2, styles, init4, fixes_default, init_fixes = __esm({
"src/modules/fixes/index.js"() {
init_utils2();
init_item_page();
init_marketplace_buy_button();
init_passing_parcel();
init_rift_tooltip_quantities();
init_ronza();
init_hud_shadow();
init_labyrinth();
init_tooltips();
init_hunter_title();
init_tabs();
init_news_back();
init_claim_gift();
init_tem();
init_colors();
init_backgrounds();
init_tutorial_overlay();
init_fb_img_size();
init_convertibles();
init_location_names_overflow();
init_preferences();
init_image();
init_maps2();
init_queso();
init_accessibility();
init_buttons();
init_other();
init_menu();
init_font_sizes();
init_footer();
init_bountiful_beanstalk();
init_scoreboard();
init_dropdown();
imported2 = [ronza_default, hud_shadow_default, labyrinth_default, tooltips_default, hunter_title_default, tabs_default, news_back_default, claim_gift_default, tem_default, colors_default, backgrounds_default, tutorial_overlay_default, fb_img_size_default, convertibles_default, location_names_overflow_default, preferences_default, image_default, maps_default, queso_default, accessibility_default, buttons_default, other_default, menu_default, font_sizes_default, footer_default, bountiful_beanstalk_default, scoreboard_default, dropdown_default], styles = imported2, init4 = () => __async(void 0, null, function* () {
addStyles(styles, "fixes"), item_page_default(), marketplace_buy_button_default(), passing_parcel_default(), rift_tooltip_quantities_default();
}), fixes_default = {
id: "fixes",
name: "Fixes",
type: "feature",
description: "Fix various bugs and issues in the game.",
default: !0,
load: init4
};
}
});
var tooltips_default2, init_tooltips2 = __esm({
"src/modules/global-styles/styles/tooltips.css"() {
tooltips_default2 = `.PreferencesPage__blackTooltip.mh-improved-tooltip{width:20px;height:20px;margin-right:auto;margin-left:5px}.PreferencesPage__blackTooltip.mh-improved-tooltip:hover .PreferencesPage__blackTooltipText{right:-65px;bottom:165%;left:-65px;font-weight:400;line-height:16px}.mh-improved-tooltip-stay-open,.mousehuntTooltip.mh-improved-tooltip-stay-open,.mousehuntTooltipParent:hover>.mousehuntTooltip.mh-improved-tooltip-stay-open{display:block;transition:none;animation:none}
`;
}
});
var favorite_button_default, init_favorite_button = __esm({
"src/modules/global-styles/styles/favorite-button.css"() {
favorite_button_default = `.custom-favorite-button{top:0;right:0;display:inline-block;width:35px;height:35px;vertical-align:middle;background:url(https://www.mousehuntgame.com/images/ui/camp/trap/star_empty.png) 50% 50% no-repeat;background-size:90%;border-radius:50%}.custom-favorite-button-small{width:20px;height:20px}.custom-favorite-button:hover{background-color:#fff;background-image:url(https://www.mousehuntgame.com/images/ui/camp/trap/star_favorite.png);outline:2px solid #ccc}.custom-favorite-button.active{background-image:url(https://www.mousehuntgame.com/images/ui/camp/trap/star_favorite.png)}.custom-favorite-button.busy{background-image:url(https://www.mousehuntgame.com/images/ui/loaders/small_spinner.gif)}
`;
}
});
var animations_default, init_animations = __esm({
"src/modules/global-styles/styles/animations.css"() {
animations_default = `.mh-ui-fade{opacity:0;transition:opacity .3s ease-in-out}.mh-ui-fade-in{opacity:1}.mh-ui-fade-out{opacity:0}@keyframes mh-improved-fade-slightly{0%{opacity:1}50%{opacity:.75}to{opacity:1}}@keyframes mh-improved-fade-in{0%{opacity:0}to{opacity:1}}@keyframes mh-improved-fade-out{0%{opacity:1}to{opacity:0}}@keyframes mh-improved-in-from-left{0%{opacity:0;transform:translate3d(-100%,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes mh-improved-in-from-top{0%{visibility:visible;transform:translate3d(0,-100%,0)}to{transform:translateZ(0)}}@keyframes mh-improved-in-scale{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes mh-improved-in-scale-y{0%{opacity:0;transform:scaleY(0)}to{opacity:1;transform:scaleY(1)}}@keyframes mh-improved-shake{0%{transform:rotate(0)}25%{transform:rotate(5deg)}50%{transform:rotate(-5deg)}75%{transform:rotate(5deg)}to{transform:rotate(0)}}@keyframes mh-improved-shake-scaled{0%{transform:scale(1.2) rotate(0)}25%{transform:scale(1.2) rotate(5deg)}50%{transform:scale(1.2) rotate(-5deg)}75%{transform:scale(1.2) rotate(5deg)}to{transform:scale(1.2) rotate(0)}}@keyframes mh-improved-shake-light{0%{transform:rotate(0)}25%{transform:rotate(-5deg)}75%{transform:rotate(5deg)}to{transform:rotate(0)}}@keyframes mh-improved-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes mh-improved-spin-flipped{0%{transform:scaleX(-1) rotate(0)}to{transform:scaleX(-1) rotate(360deg)}}@keyframes mh-improved-spin-large{0%{transform:scale(2) rotate(0)}to{transform:scale(2) rotate(360deg)}}@keyframes mh-improved-spin-large-flipped{0%{transform:scale(-2,2) rotate(0)}to{transform:scale(-2,2) rotate(360deg)}}@keyframes mh-improved-right-to-left{0%{right:100%}to{right:0}}@keyframes mh-improved-background-slide{0%{background-position:left}50%{background-position:right}to{background-position:left}}@keyframes mh-improved-bounce-and-stretch{0%{transform:scaleX(1) translate(-10px)}60%{transform:scaleX(1)}75%{transform:scaleX(.98)}90%{transform:scaleX(.999)}}@keyframes mh-improved-hue-rotate{0%{filter:hue-rotate(0deg)}50%{filter:hue-rotate(360deg)}to{filter:hue-rotate(0deg)}}@keyframes mh-improved-hue-rotate-and-scale{0%{filter:hue-rotate(0deg);transform:scale(1)}50%{filter:hue-rotate(360deg);transform:scale(1.5)}to{filter:hue-rotate(0deg);transform:scale(1)}}@keyframes mh-improved-glow{0%{filter:brightness(1)}50%{filter:brightness(1.1)}to{filter:brightness(1)}}@keyframes mh-improved-dim{0%{filter:brightness(1)}50%{filter:brightness(.8)}to{filter:brightness(1)}}@keyframes mh-improved-scale{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}@keyframes mh-improved-scale-large{0%{transform:scale(1)}50%{transform:scale(2.7)}to{transform:scale(1)}}@keyframes mh-improved-fade-busy{0%{pointer-events:none;opacity:.5}to{pointer-events:all;opacity:1}}@keyframes mh-improved-background-to-right{0%{background-position:0 0}to{background-position:50px 50px}}@keyframes mh-improved-background-to-left{0%{background-position:50px 50px}to{background-position:0 0}}@keyframes mh-improved-rotate-slightly{0%{transform:rotate(0)}50%{transform:rotate(5deg)}to{transform:rotate(0)}}
`;
}
});
var settings_default3, init_settings4 = __esm({
"src/modules/global-styles/styles/settings.css"() {
settings_default3 = `.PagePreferences .mousehuntHud-page-tabContent.game_settings.userscript-settings .settingRow .settingRow-action-inputContainer.select.busy:before,.PagePreferences .mousehuntHud-page-tabContent.game_settings.userscript-settings .settingRow .settingRow-action-inputContainer.select.completed:before,.PagePreferences .mousehuntHud-page-tabContent.game_settings.better-mh-settings .settingRow .settingRow-action-inputContainer.select.busy:before,.PagePreferences .mousehuntHud-page-tabContent.game_settings.better-mh-settings .settingRow .settingRow-action-inputContainer.select.completed:before{top:30px;right:-25px;left:unset}.PagePreferences .mousehuntHud-page-tabContent.game_settings .settingRow .name{height:unset;min-height:20px}.PagePreferences__settingAction.inputDropdownWrapper.busy:before,.PagePreferences__settingAction.inputDropdownWrapper.completed:before{right:-25px;left:unset}.inputBoxContainer.multiSelect{max-width:400px}.settingRow-action-inputContainer.textarea{display:flex;gap:5px;align-items:flex-end}.PagePreferences__setting.textarea{display:grid;grid-template-columns:350px 1fr}.textarea .inputBox{width:100%;min-height:45px}.textarea .PagePreferences__settingAction{margin-bottom:0}.mh-utils-settings-subheader{padding-top:10px;padding-bottom:10px;font-size:10px;color:#848484}.settingRow-action-inputContainer.inputText{display:flex;gap:5px;align-items:stretch}.mh-utils-settings-refresh-message{position:fixed;right:0;bottom:0;left:0;z-index:5;padding:1em;font-size:1.5em;text-align:center;pointer-events:none;background-color:#d6f2d6;border-top:1px solid #6cc36c;opacity:1;transition:opacity .5s ease-in-out}.mh-utils-settings-refresh-message-hidden{opacity:0}.mh-ui-success-message.setting-link-copied{position:absolute;top:10px;display:inline;padding:3px;margin-left:9px}
`;
}
});
var blueprint_default, init_blueprint2 = __esm({
"src/modules/global-styles/styles/blueprint.css"() {
blueprint_default = `.mh-improved-blueprint .trapSelectorView__outerBlock{position:relative;display:flex;flex:1;flex-direction:column;gap:10px}.mh-improved-blueprint--active .mh-improved-blueprint{display:flex}
`;
}
});
var utility_default, init_utility = __esm({
"src/modules/global-styles/styles/utility.css"() {
utility_default = `.transparent-text{color:transparent}.text-black{color:#000}.hidden{display:none}.visible{display:block}.full-opacity{opacity:1}.screen-reader-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.outline{outline:1px solid #f00}.no-click{pointer-events:none}
`;
}
});
var general_default, init_general = __esm({
"src/modules/global-styles/styles/general.css"() {
general_default = `.pageFrameView-column{min-height:100vh}code{padding:0 3px;font-family:ui-monospace,Menlo,Monaco,Cascadia Mono,Segoe UI Mono,Roboto Mono,Oxygen Mono,"Ubuntu Monospace",Source Code Pro,Fira Mono,Droid Sans Mono,Courier New,monospace;background-color:#eee;border-radius:3px}.mousehuntHud-page-tabHeader.userscript-settings span{height:16px;font-size:12px;white-space:nowrap}.pageSidebarView-block{display:flex;flex-direction:column;align-items:stretch}.pageSidebarView .fb-page{order:1000}.support-link{padding:10px;background:#8dff7d;border-radius:10px;box-shadow:-1px -1px 1px #ccc inset}.support-link p{margin-top:0;font-size:14px;font-weight:900}.support-link a{font-size:16px;font-weight:900}input[type=text]{padding:2px 1px;border:1px solid #767676}input.mh-improved-disabled{pointer-events:none;filter:grayscale(1)}
`;
}
});
var horn_message_default, init_horn_message = __esm({
"src/modules/global-styles/styles/horn-message.css"() {
horn_message_default = `.huntersHornMessageView--bait_empty .huntersHornMessageView__content.huntersHornMessageView__content--image:before,.huntersHornMessageView--bait_disarmed .huntersHornMessageView__content.huntersHornMessageView__content--image:before,.huntersHornMessageView--unknown_error .huntersHornMessageView__content.huntersHornMessageView__content--image:before{background-image:var(--bg-image)}.huntersHornView__message .huntersHornMessageView--shadow{filter:drop-shadow(0 2px 3px #333)}.huntersHornView__message .huntersHornMessageView--color-blue{border-image-source:url(https://i.mouse.rip/horn-message/blue.png)}.huntersHornView__message .huntersHornMessageView--color-cyan-alt{border-image-source:url(https://i.mouse.rip/horn-message/cyan-alt.png)}.huntersHornView__message .huntersHornMessageView--color-cyan{border-image-source:url(https://i.mouse.rip/horn-message/cyan.png)}.huntersHornView__message .huntersHornMessageView--color-green-alt{border-image-source:url(https://i.mouse.rip/horn-message/green-alt.png)}.huntersHornView__message .huntersHornMessageView--color-green{border-image-source:url(https://i.mouse.rip/horn-message/green.png)}.huntersHornView__message .huntersHornMessageView--color-grey{border-image-source:url(https://i.mouse.rip/horn-message/grey.png)}.huntersHornView__message .huntersHornMessageView--color-orange-alt{border-image-source:url(https://i.mouse.rip/horn-message/orange-alt.png)}.huntersHornView__message .huntersHornMessageView--color-orange{border-image-source:url(https://i.mouse.rip/horn-message/orange.png)}.huntersHornView__message .huntersHornMessageView--color-pink{border-image-source:url(https://i.mouse.rip/horn-message/pink.png)}.huntersHornView__message .huntersHornMessageView--color-purple{border-image-source:url(https://i.mouse.rip/horn-message/purple.png)}.huntersHornView__message .huntersHornMessageView--color-red-alt{border-image-source:url(https://i.mouse.rip/horn-message/red-alt.png)}.huntersHornView__message .huntersHornMessageView--color-red{border-image-source:url(https://i.mouse.rip/horn-message/red.png)}.huntersHornView__message .huntersHornMessageView--color-yellow{border-image-source:url(https://i.mouse.rip/horn-message/yellow.png)}
`;
}
});
var messages_default, init_messages2 = __esm({
"src/modules/global-styles/styles/messages.css"() {
messages_default = `.mh-ui-error-message,.mh-ui-success-message{z-index:21;padding:10px;font-size:10px;color:#160404;background-color:#f5b9b9;border:1px solid #803e3e;border-radius:5px;box-shadow:0 1px 5px -1px #5e5e5e}.mh-ui-success-message{background-color:#a3ea85;border:1px solid #3e803e}.mh-improved-darkmode-conflict-popup .content,.mh-improved-userscript-popup .content{text-align:center}.mh-improved-darkmode-conflict-popup .jsDialogContainer,.mh-improved-userscript-popup .jsDialogContainer{color:#160404;background-color:#f5b9b9}.mh-improved-userscript-popup .mh-improved-userscript-popup-actions{display:flex;gap:1em;align-items:center;justify-content:center;margin:1em}.mh-improved-userscript-popup .mh-improved-userscript-popup-actions img{height:30px}.mh-improved-userscript-popup .mh-improved-userscript-popup-actions img:hover{filter:brightness(1.1)}.mh-improved-darkmode-conflict-popup .content p,.mh-improved-userscript-popup .content p{font-size:14px;line-height:2}
`;
}
});
var buttons_default2, init_buttons2 = __esm({
"src/modules/global-styles/styles/buttons.css"() {
buttons_default2 = `.sort-button{display:inline-block;width:0;height:0;margin-left:1px;cursor:pointer;content:"";border-top:9px solid #777;border-right:6px solid transparent;border-left:6px solid transparent}.sort-button.reverse{border-top:0;border-right:6px solid transparent;border-bottom:9px solid #777;border-left:6px solid transparent}.sort-button.unsorted{opacity:.5}.mousehuntActionButton.success:before{background-color:#00ff59;box-shadow:0 0 10px #beff99 inset}.mousehuntActionButton.success{background-color:#97f990}.mousehuntActionButton.success:hover:before,.mousehuntActionButton.success:focus:before{background-color:#00ff59}.mousehuntActionButton.danger:before{background-color:#f27b6a;box-shadow:0 0 10px #ffa5a5 inset}.mousehuntActionButton.danger{background-color:#ffa5a5}.mousehuntActionButton.danger:hover:before,.mousehuntActionButton.danger:focus:before{background-color:#ffa5a5}.mousehuntActionButton:hover:before{pointer-events:none}.mousehuntActionButton.gray{background-color:#e5e5e5;border:1px solid #8e8e8e;box-shadow:1px 1px 1px #eee}.mousehuntActionButton.gray:before{background:#dedede;box-shadow:0 0 10px #e8e8e8 inset}.mousehuntActionButton.gray:hover,.mousehuntActionButton.gray:focus{background-color:#f4f4f4}.mh-improved-math-button{font-family:monospace;user-select:none}#overlayPopup .button.button-grey{box-shadow:none}#overlayPopup .button.button-grey:hover{color:#000;background-color:#ddd}.mousehuntActionButton span{user-select:none}
`;
}
});
var game_info_bar_default, init_game_info_bar = __esm({
"src/modules/global-styles/styles/game-info-bar.css"() {
game_info_bar_default = `.mousehuntHud-gameInfo .mousehuntHud-menu{position:relative;top:unset;left:unset;display:inline;width:unset;height:unset;padding-top:unset;padding-left:unset;background:unset}
`;
}
});
var trap_qty_default, init_trap_qty = __esm({
"src/modules/global-styles/styles/trap-qty.css"() {
trap_qty_default = `.campPage-trap-baseQuantity{color:#8e6642;text-shadow:0 0 1px #ae9b6d,1px 1px #fff}.trapSelectorView__armedItemQuantity span,.campPage-trap-baseQuantity{position:absolute;right:0;bottom:0;box-sizing:border-box;padding:5px;font-size:16px;font-weight:400;line-height:11px;text-align:right;background-color:#ffffffb3;border:1px solid #9d917f;border-right:none;border-bottom:none;border-bottom-right-radius:3px;box-shadow:-1px -1px 1px #d3cecb inset}.campPage-trap-itemBrowser-favorites .campPage-trap-itemBrowser-favorite-item-quantity span.campPage-trap-baseQuantity,.campPage-trap-itemBrowser-item-leftBar span.campPage-trap-baseQuantity{padding:3px;font-size:13px;text-align:center;background-color:#fffc;border-radius:0 0 3px 3px}.campPage-trap-itemBrowser-favorites .campPage-trap-itemBrowser-favorite-item-quantity span.campPage-trap-baseQuantity{right:-1px;bottom:-1px;left:-1px;border:1px solid #4e2e0b}.campPage-trap-itemBrowser-favorite-item-image-quantity.base-quantity{background-color:#ffffffbf}
`;
}
});
var imported3, styles2, init5, global_styles_default, init_global_styles = __esm({
"src/modules/global-styles/index.js"() {
init_utils2();
init_tooltips2();
init_favorite_button();
init_animations();
init_settings4();
init_blueprint2();
init_utility();
init_general();
init_horn_message();
init_messages2();
init_buttons2();
init_game_info_bar();
init_trap_qty();
imported3 = [tooltips_default2, favorite_button_default, animations_default, settings_default3, blueprint_default, utility_default, general_default, horn_message_default, messages_default, buttons_default2, game_info_bar_default, trap_qty_default], styles2 = imported3, init5 = () => __async(void 0, null, function* () {
addStyles(styles2, "global-styles");
}), global_styles_default = {
id: "global-styles",
type: "required",
alwaysLoad: !0,
load: init5
};
}
});
var styles_default4, init_styles5 = __esm({
"src/modules/larger-codices/styles.css"() {
styles_default4 = `.campPage-trap-itemBrowser-item.codex .campPage-trap-itemBrowser-item-leftBar,.campPage-trap-itemBrowser-item.codex .campPage-trap-itemBrowser-item-content{display:block;width:auto}.campPage-trap-itemBrowser-item.codex{position:relative;display:flex;flex-direction:column;align-items:center}.campPage-trap-itemBrowser-item.codex a.campPage-trap-itemBrowser-item-image{width:125px;height:125px}.campPage-trap-itemBrowser-item.codex .campPage-trap-itemBrowser-item-description{position:absolute;inset:-10px 0 0;padding:15px;overflow-y:scroll;background-color:#fffc;opacity:0;transition:.5s}.campPage-trap-itemBrowser-item.codex:hover .campPage-trap-itemBrowser-item-description{opacity:1}.mh-dark-mode .campPage-trap-itemBrowser-item.codex .campPage-trap-itemBrowser-item-description{background-color:#000c}.codex .campPage-trap-itemBrowser-item-image:after{border:none;box-shadow:none}
`;
}
});
var init6, larger_codices_default, init_larger_codices = __esm({
"src/modules/larger-codices/index.js"() {
init_utils2();
init_styles5();
init6 = () => {
addStyles(styles_default4, "larger-codices");
}, larger_codices_default = {
id: "larger-codices",
name: "Larger Codices",
type: "feature",
default: !0,
description: "Show larger images for codices in the trap selector.",
load: init6
};
}
});
var settings_default4, init_settings5 = __esm({
"src/modules/journal-privacy/settings/index.js"() {
settings_default4 = () => __async(void 0, null, function* () {
return [
{
id: "journal-privacy.show-toggle-icon",
title: "Show toggle icon in top menu",
default: !0
},
{
id: "journal-privacy.transparent",
title: "Hide text, rather than blur",
default: !1
}
];
});
}
});
var icon_default, init_icon = __esm({
"src/modules/journal-privacy/styles/icon.css"() {
icon_default = `.mousehuntHeaderView .menuItem.mousehunt-improved-journal-privacy-icon{display:flex;align-items:center;justify-content:center;width:20px;height:25px;padding:0}.mh-journal-privacy-enabled .mousehunt-improved-journal-privacy-icon:before,.mh-journal-privacy-disabled .mousehunt-improved-journal-privacy-icon:before{display:block;width:15px;height:15px;content:"";background-repeat:no-repeat;background-size:contain;opacity:.5}.mousehuntHeaderView .menuItem.mousehunt-improved-journal-privacy-icon:hover:before{opacity:1}.mh-journal-privacy-enabled .mousehunt-improved-journal-privacy-icon:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path d="M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z" /><path fill-rule="evenodd" d="M.664 10.59a1.651 1.651 0 0 1 0-1.186A10.004 10.004 0 0 1 10 3c4.257 0 7.893 2.66 9.336 6.41.147.381.146.804 0 1.186A10.004 10.004 0 0 1 10 17c-4.257 0-7.893-2.66-9.336-6.41ZM14 10a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z" clip-rule="evenodd" /></svg>')}.mh-journal-privacy-disabled .mousehunt-improved-journal-privacy-icon:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M3.28 2.22a.75.75 0 0 0-1.06 1.06l14.5 14.5a.75.75 0 1 0 1.06-1.06l-1.745-1.745a10.029 10.029 0 0 0 3.3-4.38 1.651 1.651 0 0 0 0-1.185A10.004 10.004 0 0 0 9.999 3a9.956 9.956 0 0 0-4.744 1.194L3.28 2.22ZM7.752 6.69l1.092 1.092a2.5 2.5 0 0 1 3.374 3.373l1.091 1.092a4 4 0 0 0-5.557-5.557Z" clip-rule="evenodd" /><path d="m10.748 13.93 2.523 2.523a9.987 9.987 0 0 1-3.27.547c-4.258 0-7.894-2.66-9.337-6.41a1.651 1.651 0 0 1 0-1.186A10.007 10.007 0 0 1 2.839 6.02L6.07 9.252a4 4 0 0 0 4.678 4.678Z" /></svg>')}
`;
}
});
var styles_default5, init_styles6 = __esm({
"src/modules/journal-privacy/styles/styles.css"() {
styles_default5 = `.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) a[href*="profile.php"],.mh-journal-privacy-enabled #journalContainer .entry.socialGift .journaltext a,.mh-journal-privacy-enabled #journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6),.mh-journal-privacy-enabled #journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8),.mh-journal-privacy-enabled #journalContainer .journal__hunter-name,.mh-journal-privacy-enabled .mh-journal-privacy-name{display:inline-block;filter:blur(5px);transition:all .3s}.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) #friend-data-wrapper a[href*="profile.php"]{color:#000}.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) a[href*="profile.php"]:hover,.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) a[href*="profile.php"]:focus,.mh-journal-privacy-enabled #journalContainer .entry.socialGift .journaltext a:hover,.mh-journal-privacy-enabled #journalContainer .entry.socialGift .journaltext a:focus,.mh-journal-privacy-enabled #journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6):hover,.mh-journal-privacy-enabled #journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6):focus,.mh-journal-privacy-enabled #journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8):hover,.mh-journal-privacy-enabled #journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8):focus #journalContainer .journal__hunter-name:hover,.mh-journal-privacy-enabled #journalContainer .journal__hunter-name:focus,.mh-journal-privacy-enabled .mh-journal-privacy-name:hover,.mh-journal-privacy-enabled .mh-journal-privacy-name:focus{display:inline;filter:initial}
`;
}
});
var transparent_default, init_transparent = __esm({
"src/modules/journal-privacy/styles/transparent.css"() {
transparent_default = `.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) a[href*="profile.php"],.mh-journal-privacy-enabled #journalContainer .entry.socialGift .journaltext a,.mh-journal-privacy-enabled #journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6),.mh-journal-privacy-enabled #journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8),.mh-journal-privacy-enabled #journalContainer .journal__hunter-name,.mh-journal-privacy-enabled .mh-journal-privacy-name{display:inline-block;color:transparent;transition:color .3s}.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) #friend-data-wrapper a[href*="profile.php"]{color:#000}.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) a[href*="profile.php"]:hover,.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) a[href*="profile.php"]:focus,.mh-journal-privacy-enabled #journalContainer .entry.socialGift .journaltext a:hover,.mh-journal-privacy-enabled #journalContainer .entry.socialGift .journaltext a:focus,.mh-journal-privacy-enabled #journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6):hover,.mh-journal-privacy-enabled #journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6):focus,.mh-journal-privacy-enabled #journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8):hover,.mh-journal-privacy-enabled #journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8):focus #journalContainer .journal__hunter-name:hover,.mh-journal-privacy-enabled #journalContainer .journal__hunter-name:focus,.mh-journal-privacy-enabled .mh-journal-privacy-name:hover,.mh-journal-privacy-enabled .mh-journal-privacy-name:focus{display:inline;color:#3b5998}
`;
}
});
var applyClassToNames, removeClassFromNames, enablePrivacy, disablePrivacy, addIcon, removeIcon, isPrivacyEnabled, init7, journal_privacy_default, init_journal_privacy = __esm({
"src/modules/journal-privacy/index.js"() {
init_utils2();
init_settings5();
init_icon();
init_styles6();
init_transparent();
applyClassToNames = () => {
if (!isPrivacyEnabled)
return;
let entries = document.querySelectorAll("#journalContainer .entry.relicHunter_start .journaltext");
entries && entries.forEach((entry) => {
if (!entry || !entry.textContent || entry.getAttribute("replaced") === "true")
return;
let match = entry.textContent.match(/(.*)( has joined the | has left the | used Rare Map Dust |, the map owner, has )/);
if (match && match[1]) {
let span = document.createElement("span");
span.classList.add("mh-journal-privacy-name"), span.textContent = match[1], entry.setAttribute("data-original", match[1]), entry.setAttribute("replaced", "true"), entry.innerHTML = entry.innerHTML.replace(match[1], span.outerHTML);
}
});
}, removeClassFromNames = () => {
if (isPrivacyEnabled)
return;
let entries = document.querySelectorAll("#journalContainer .entry.relicHunter_start .journaltext");
entries && entries.forEach((entry) => {
if (!entry || !entry.textContent || entry.getAttribute("replaced") !== "true")
return;
let span = entry.querySelector(".mh-journal-privacy-name");
span && (entry.innerHTML = entry.innerHTML.replace(span.outerHTML, span.textContent), entry.removeAttribute("replaced"));
});
}, enablePrivacy = () => {
addBodyClass("mh-journal-privacy-enabled", !0), removeBodyClass("mh-journal-privacy-disabled"), applyClassToNames();
}, disablePrivacy = () => {
removeBodyClass("mh-journal-privacy-enabled"), addBodyClass("mh-journal-privacy-disabled", !0), removeClassFromNames();
}, addIcon = () => {
if (!getSetting("journal-privacy.show-toggle-icon", !1))
return;
let existingIcon = document.querySelector("#mousehunt-improved-journal-privacy");
if (existingIcon) {
existingIcon.style.display = "", existingIcon.style.visibility = "";
return;
}
addIconToMenu({
id: "mousehunt-improved-journal-privacy",
classname: "mousehunt-improved-journal-privacy-icon",
title: "Toggle Journal Privacy",
position: "prepend",
/**
* Toggle the privacy.
*/
action: () => {
isPrivacyEnabled = !isPrivacyEnabled, isPrivacyEnabled ? disablePrivacy() : enablePrivacy();
}
});
}, removeIcon = () => {
if (getSetting("journal-privacy.show-toggle-icon", !1))
return;
let icon = document.querySelector("#mousehunt-improved-journal-privacy");
icon && (icon.style.display = "none", icon.style.visibility = "hidden");
}, isPrivacyEnabled = !0, init7 = () => __async(void 0, null, function* () {
addStyles([
getSetting("journal-privacy.transparent", !1) ? transparent_default : styles_default5,
icon_default
], "journal-privacy"), enablePrivacy(), getSetting("journal-privacy.show-toggle-icon", !1) && (addIcon(), disablePrivacy()), onRequest("pages/journal.php", applyClassToNames), onActivation(() => {
addIcon(), enablePrivacy();
}), onDeactivation(() => {
removeIcon(), disablePrivacy();
}), onSettingsChange("journal-privacy.show-toggle-icon", {
enable: addIcon,
disable: removeIcon
});
}), journal_privacy_default = {
id: "journal-privacy",
name: "Journal Privacy",
type: "element-hiding",
default: !1,
description: "Hide player names in the journal. Good for screenshots that maintain privacy.",
load: init7,
settings: settings_default4
};
}
});
var styles_default6, init_styles7 = __esm({
"src/modules/hide-sidebar/styles.css"() {
styles_default6 = `.pageFrameView{-ms-grid-columns:[first] auto [content-start] 760px [content-end] auto [last];grid-template-columns:[first] auto [content-start] 760px [content-end] auto [last]}.pageFrameView .pageSidebarView-user{padding:0 0 10px;border-bottom:none}.pageSidebarView{display:none}.mousehuntHeaderView .menuItem.sidebar .dropdownContent{width:365px;padding:10px}.mousehuntHeaderView .menuItem.sidebar .dropdownContent a{display:unset;height:auto;padding:0;font-variant:none;border-bottom:none}.mousehuntHeaderView .menuItem.sidebar .dropdownContent a:hover,.mousehuntHeaderView .menuItem.sidebar .dropdownContent a:focus{text-decoration:underline;background-color:unset}.mousehuntHeaderView .menuItem.sidebar .dropdownContent a.pageSidebarView-user-image{width:30px;height:30px;padding:0;background-repeat:no-repeat;background-position:50% 50%;background-size:contain;border:1px solid #808080}.mousehuntHeaderView .menuItem.sidebar .dropdownContent .pageSidebarView-user a:nth-child(2){display:inline;padding:0;font-size:inherit;font-variant:none;color:#3b5998;border-bottom:none}.mousehuntHeaderView .menuItem.sidebar .dropdownContent .pageSidebarView-user br{display:none}.mousehuntHeaderView .menuItem.sidebar .dropdownContent a.pageSidebarView-user-logout{display:inline-block;float:right;height:auto;padding:5px 0;margin-right:10px;font-size:inherit;font-variant:none;color:#3b5998;border-bottom:none;border-radius:0}.scoreboardRankingsWrapper{display:grid;grid-template-columns:1fr 1fr;grid-gap:5px;line-height:14px}.scoreboardRelativeRankingTableView-table{padding-top:5px;background:#fff}.mousehuntHeaderView .menuItem.sidebar .dropdownContent .scoreboardRankingsWrapper a{font-size:9px;color:#3b5998;text-decoration:none;vertical-align:middle;border-radius:0}.mousehuntHeaderView .menuItem.sidebar .dropdownContent .scoreboardRankingsWrapper a:hover,.mousehuntHeaderView .menuItem.sidebar .dropdownContent .scoreboardRankingsWrapper a:focus,.mousehuntHeaderView .menuItem.sidebar .dropdownContent .scoreboardRankingsWrapper a:active{text-decoration:underline}
`;
}
});
var moveSidebar, init8, hide_sidebar_default, init_hide_sidebar = __esm({
"src/modules/hide-sidebar/index.js"() {
init_utils2();
init_styles7();
moveSidebar = () => {
let menuTab = document.createElement("div");
menuTab.classList.add("menuItem"), menuTab.classList.add("dropdown"), menuTab.classList.add("sidebar"), menuTab.addEventListener("click", () => {
menuTab.classList.toggle("expanded");
});
let menuTabTitle = document.createElement("span");
menuTabTitle.innerText = "Sidebar";
let menuTabArrow = document.createElement("div");
menuTabArrow.classList.add("arrow");
let dropdownContent = document.createElement("div");
dropdownContent.classList.add("dropdownContent");
let sidebarUser = document.querySelector(".pageSidebarView-user");
if (sidebarUser) {
let sidebarUserClone = sidebarUser.cloneNode(!0);
dropdownContent.append(sidebarUserClone);
}
let scoreBoardRankings = document.querySelectorAll(".scoreboardRelativeRankingTableView-table");
if (scoreBoardRankings) {
let scoreBoardRankingWrapper = document.createElement("div");
scoreBoardRankingWrapper.classList.add("scoreboardRankingsWrapper"), scoreBoardRankings.forEach((scoreBoardRanking) => {
let scoreBoardRankingClone = scoreBoardRanking.cloneNode(!0);
scoreBoardRankingWrapper.append(scoreBoardRankingClone);
}), dropdownContent.append(scoreBoardRankingWrapper);
}
menuTab.append(menuTabTitle), menuTab.append(menuTabArrow), menuTab.append(dropdownContent);
let tabsContainer = document.querySelector(".mousehuntHeaderView-dropdownContainer");
tabsContainer && tabsContainer.insertBefore(menuTab, tabsContainer.lastChild);
}, init8 = () => __async(void 0, null, function* () {
addStyles(styles_default6, "no-sidebar"), addBodyClass("no-sidebar"), moveSidebar(), hg.views.PageFrameView.setShowSidebar(!1), onDeactivation("no-sidebar", () => {
hg.views.PageFrameView.setShowSidebar(!0);
let menuTab = document.querySelector(".menuItem.sidebar");
menuTab && menuTab.remove();
});
}), hide_sidebar_default = {
id: "no-sidebar",
name: "Hide Sidebar",
type: "element-hiding",
default: !0,
description: "Hide the sidebar and add a \u201CSidebar\u201D dropdown in the top menu.",
load: init8
};
}
});
var styles_default7, init_styles8 = __esm({
"src/modules/adblock/styles.css"() {
styles_default7 = `.actionportfolio,.canShare .larryTip,.canShare,.communityGroupView-ad,.journalactions a.actionportfolio,.journalactions a[data-share-type=journal],.journalactions a[data-type=journal],.mousehuntHeaderView-gameBanner,.pageSidebarView .fb-page,.socialLink,.newsPostFacebookContainer,.travelShortcut.QuestSuperBrieFactory,.travelShortcut.QuestSchoolOfSorcery,.travelShortcut.QuestDraconicDepths,*[src="https://www.mousehuntgame.com//images/ui/buttons/share_green.gif"],*[src="https://www.mousehuntgame.com/images/promo/fbf_live.jpg"],*[src="https://www.mousehuntgame.com/images/promo/fbf_soon.jpg"],a[onclick="hg.utils.PageUtil.setPage('JoinDiscord'); return false;"],a[href="https://www.facebook.com/groups/103701656374148/"],.pageSidebarView-mobileApps,.pageSidebarView-title,.pageSidebarView-block-description #jsDialog-publishToOwnWall,.communityGroupView-thinHeader,.nestLootShareButton,.travelShortcut.QuestHailstoneGolems{display:none}#OnboardArrow.onboardPopup.canShare .closeButton{left:0}
`;
}
});
var init9, adblock_default, init_adblock = __esm({
"src/modules/adblock/index.js"() {
init_utils2();
init_styles8();
init9 = () => __async(void 0, null, function* () {
addStyles(styles_default7, "adblock");
}), adblock_default = {
id: "adblock",
name: "Adblock",
type: "element-hiding",
default: !1,
description: "Hide advertisements for Feedback Friday, mobile apps, news ticker, etc.",
load: init9
};
}
});
var styles_default8, init_styles9 = __esm({
"src/modules/codex-at-bottom/styles.css"() {
styles_default8 = `.trapSelectorView__activeCodexContainer--visible{order:100}
`;
}
});
var moveCodex, init10, codex_at_bottom_default, init_codex_at_bottom = __esm({
"src/modules/codex-at-bottom/index.js"() {
init_utils2();
init_styles9();
moveCodex = () => __async(void 0, null, function* () {
let codex = document.querySelector(".trapSelectorView__activeCodexContainer"), statsContainer = document.querySelector(".trapSelectorView__trapStatSummaryContainer");
codex && statsContainer && statsContainer.append(codex);
}), init10 = () => __async(void 0, null, function* () {
addStyles(styles_default8, "codex-at-bottom"), moveCodex(), onNavigation(moveCodex, {
page: "camp"
}), onEvent("mh-improved-cre-list-rendered", moveCodex);
}), codex_at_bottom_default = {
id: "codex-at-bottom",
name: "Codex at Bottom",
type: "feature",
default: !1,
description: "Move the codex to the bottom of the trap selector.",
load: init10
};
}
});
var getTravelSetting, saveTravelSetting, init_utils3 = __esm({
"src/modules/better-travel/utils.js"() {
init_utils2();
getTravelSetting = (settingName, defaultValue) => getSetting(`better-travel.${settingName}`, defaultValue), saveTravelSetting = (settingName, value) => {
saveSetting(`better-travel.${settingName}`, value);
};
}
});
var hasDisabledReminder, addReminders, reminders_default, init_reminders = __esm({
"src/modules/better-travel/modules/reminders/index.js"() {
init_utils2();
hasDisabledReminder = (item) => getFlag(`better-travel-no-reminder-${item}`), addReminders = () => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I;
let reminderOpts = {
title: "Travel Reminder",
dismiss: 6e3,
classname: "travel-reminder"
};
switch (getCurrentLocation2()) {
case "rift_valour":
if (hasDisabledReminder("champions-fire"))
break;
(_b = (_a = user.quests) == null ? void 0 : _a.QuestRiftValour) != null && _b.is_fuel_enabled && (reminderOpts.text = "Champion's Fire is active.", reminderOpts.image = "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/6622efd1db7028b30f48b15771138720.png", reminderOpts.button = "Deactivate", reminderOpts.action = () => {
let button = document.querySelector(".valourRiftHUD-fuelContainer-armButton");
button && button.click();
});
break;
case "queso_river":
case "queso_plains":
case "queso_quarry":
case "queso_geyser":
if (hasDisabledReminder("wild-tonic"))
break;
((_d = (_c = user.quests) == null ? void 0 : _c.QuestQuesoCanyon) != null && _d.is_wild_tonic_active || (_f = (_e = user.quests) == null ? void 0 : _e.QuestQuesoGeyser) != null && _f.is_wild_tonic_enabled) && (reminderOpts.text = "Wild Tonic is active.", reminderOpts.image = "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/b6b9f97a1ee3692fdff0b5a206adf7e1.png", reminderOpts.button = "Deactivate", reminderOpts.action = () => {
let button = document.querySelector(".quesoHUD-wildTonic-button");
button && button.click();
});
break;
case "floating_islands":
if (hasDisabledReminder("bottled-wind") || ((_i = (_h = (_g = user.quests) == null ? void 0 : _g.QuestFloatingIslands) == null ? void 0 : _h.hunting_site_atts) == null ? void 0 : _i.island_power_type) === "launch_pad_island")
break;
!((_l = (_k = (_j = user.quests) == null ? void 0 : _j.QuestFloatingIslands) == null ? void 0 : _k.hunting_site_atts) != null && _l.is_fuel_enabled) && // BW not active.
!((_o = (_n = (_m = user.quests) == null ? void 0 : _m.QuestFloatingIslands) == null ? void 0 : _n.hunting_site_atts) != null && _o.is_vault_island && // is SP.
((_s = (_r = (_q = (_p = user.quests) == null ? void 0 : _p.QuestFloatingIslands) == null ? void 0 : _q.hunting_site_atts) == null ? void 0 : _r.island_mod_panels[2]) != null && _s.is_complete)) && (reminderOpts.text = "Bottled Wind is <strong>not</strong> active.", reminderOpts.image = "https://www.mousehuntgame.com/images/ui/hud/floating_islands/items/bottled_wind_stat_item.png", reminderOpts.button = "Activate", reminderOpts.action = () => {
let button = document.querySelector(".floatingIslandsHUD-fuel-button");
button && button.click();
});
break;
case "bountiful_beanstalk":
case "foreword_farm":
case "prologue_pond":
case "table_of_contents":
case "school_of_sorcerey":
if (hasDisabledReminder("condensed-creativity"))
break;
(_u = (_t = user.quests) == null ? void 0 : _t.QuestBountifulBeanstalk) != null && _u.is_fuel_enabled || (_w = (_v = user.quests) == null ? void 0 : _v.QuestProloguePond) != null && _w.is_fuel_enabled || (_y = (_x = user.quests) == null ? void 0 : _x.QuestForewordFarm) != null && _y.is_fuel_enabled || (_A = (_z = user.quests) == null ? void 0 : _z.QuestTableOfContents) != null && _A.is_fuel_enabled || (_C = (_B = user.quests) == null ? void 0 : _B.QuestSchoolOfSorcery) != null && _C.is_fuel_enabled ? (reminderOpts.text = "Condensed Creativity is active.", reminderOpts.button = "Deactivate") : (reminderOpts.text = "Condensed Creativity is <strong>not</strong> active.", reminderOpts.button = "Activate"), reminderOpts.image = "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/4f5d55c1eff77474c7363f0e52d03e49.png", reminderOpts.action = hg.views.HeadsUpDisplayFolkloreForestRegionView.toggleFuel;
break;
case "winter_hunt_grove":
case "winter_hunt_workshop":
case "winter_hunt_fortress":
if (hasDisabledReminder("festive-spirit"))
break;
(_E = (_D = user.quests) == null ? void 0 : _D.QuestCinnamonTreeGrove) != null && _E.is_fuel_enabled || (_G = (_F = user.quests) == null ? void 0 : _F.QuestGolemWorkshop) != null && _G.is_fuel_enabled || (_I = (_H = user.quests) == null ? void 0 : _H.QuestIceFortress) != null && _I.is_fuel_enabled ? (reminderOpts.text = "Festive Spirit is active.", reminderOpts.button = "Deactivate") : getCurrentLocation2() === "winter_hunt_forest" && (reminderOpts.text = "Festive Spirit is <strong>not</strong> active.", reminderOpts.button = "Activate"), reminderOpts.image = "https://www.mousehuntgame.com/images/items/stats/large/cda292833fce3b65b7a6a38c000e8620.png", reminderOpts.action = () => {
let toggle = document.querySelector(".headsUpDisplayWinterHuntRegionView__fuelButton");
toggle && toggle.click();
};
}
reminderOpts.text && showHornMessage(reminderOpts);
}, reminders_default = addReminders;
}
});
var styles_default9, init_styles10 = __esm({
"src/modules/better-travel/modules/travel-window/styles.css"() {
styles_default9 = `.mh-improved-travel-window .greatWinterHuntGolemDestinationView__content{flex-direction:column;align-items:center;background-color:transparent}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environmentsScroller{height:auto;min-height:425px;max-height:650px;padding:0 0 10px 5px;margin-right:-5px}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__regionEnvironments{gap:15px 6px;justify-content:space-evenly}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__regionsContainer{display:none}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__regionName{margin:10px 0;font-size:16px;text-align:center;border:none}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment{width:150px;overflow:hidden;border:1px solid #b4a481;box-shadow:0 2px 2px #7e7e7e}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__regionGroup{margin:0}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environmentName{position:absolute;right:0;left:0;z-index:2;height:20px;background-color:#ffffffe5;border-radius:0;transition:all .2s ease-in-out}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environmentName span{padding:5px;text-align:center}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environmentImage{border-radius:0;transition:all .2s ease-in-out}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment:hover .greatWinterHuntGolemDestinationView__environmentImage,.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment:focus .greatWinterHuntGolemDestinationView__environmentImage{background-position-y:30%}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment:hover .greatWinterHuntGolemDestinationView__environmentName,.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment:focus .greatWinterHuntGolemDestinationView__environmentName{background-color:#fff}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment[data-environment-type=train_station] .greatWinterHuntGolemDestinationView__environmentName span{font-size:10px}.mh-improved-travel-window-footer{position:absolute;bottom:20px;display:flex;gap:10px;align-items:center;width:330px}.mh-improved-travel-window-edit{padding:0 15px;font-weight:400;line-height:24px}.mh-improved-travel-window--editing{border-radius:5px;outline:3px solid #f37c7c}.mh-improved-travel-window-description,.mh-improved-travel-window-hidden{display:none}.mh-improved-travel-window--editing .mh-improved-travel-window-hidden{display:block;filter:grayscale(1);opacity:.4}.mh-improved-travel-window--editing .mh-improved-travel-window-description{display:inline-block}.mh-improved-travel-window-environment-icon{cursor:pointer}.mh-improved-travel-window-search-input-wrapper{margin-bottom:15px}.mh-improved-travel-window-search-input,input.mh-improved-travel-window-search-input[type=text]{width:auto;min-width:350px;padding:10px;font-size:14px;border:1px solid #333}.greatWinterHuntGolemDestinationView__environment.greatWinterHuntGolemDestinationView__environment--active{opacity:.4}
`;
}
});
var getHiddenLocations, toggleLocation, hideLocation, unhideLocation, isLocationHidden, openTravelWindow, isEditing, environments2, makeMenuItem, addEnvironmentIconListener, travel_window_default, init_travel_window = __esm({
"src/modules/better-travel/modules/travel-window/index.js"() {
init_utils2();
init_utils3();
init_styles10();
getHiddenLocations = () => getTravelSetting("travel-window-hidden-locations", []), toggleLocation = (location) => {
isLocationHidden(location) ? unhideLocation(location) : hideLocation(location);
}, hideLocation = (location) => {
let hiddenLocations = getHiddenLocations();
hiddenLocations.includes(location) || (hiddenLocations.push(location), saveTravelSetting("travel-window-hidden-locations", hiddenLocations));
}, unhideLocation = (location) => {
let hiddenLocations = getHiddenLocations();
hiddenLocations.includes(location) && (hiddenLocations.splice(hiddenLocations.indexOf(location), 1), saveTravelSetting("travel-window-hidden-locations", hiddenLocations));
}, isLocationHidden = (location) => getHiddenLocations().includes(location), openTravelWindow = () => __async(void 0, null, function* () {
debug("Opening travel window");
let regions2 = [
{ type: "gnawnia", name: "Gnawnia" },
{ type: "valour", name: "Valour" },
{ type: "whisker_woods", name: "Whisker Woods" },
{ type: "burroughs", name: "Burroughs" },
{ type: "furoma", name: "Furoma" },
{ type: "bristle_woods", name: "Bristle Woods" },
{ type: "tribal_isles", name: "Tribal Isles" },
{ type: "varmint_valley", name: "Varmint Valley" },
{ type: "desert", name: "Sandtail Desert" },
{ type: "rodentia", name: "Rodentia" },
{ type: "queso_canyon", name: "Queso Canyon" },
{ type: "zokor_zone", name: "Hollow Heights" },
{ type: "folklore_forest", name: "Folklore Forest" },
{ type: "riftopia", name: "Rift Plane" }
];
environments2 = yield getData("environments");
let eventEnvironments2 = yield getData("environments-events");
environments2 = [...environments2, ...eventEnvironments2];
let currentEnvironment = environments2.find((e) => e.id === getCurrentLocation2()), locationsToRemove = ["acolyte_realm"];
environments2 = environments2.map((env) => (isUserTitleAtLeast(env.title) || locationsToRemove.push(env.id), env)), environments2 = environments2.filter((env) => !locationsToRemove.includes(env.id));
let content = '<div class="mh-improved-travel-window greatWinterHuntGolemDestinationView"><div class="greatWinterHuntGolemDestinationView__content">';
content += '<div class="mh-improved-travel-window-search-input-wrapper"><input type="text" class="mh-improved-travel-window-search-input" placeholder="Search locations"></div>', content += '<div class="greatWinterHuntGolemDestinationView__regionsContainer">';
for (let region of regions2) {
let buttonClass = "greatWinterHuntGolemDestinationView__regionButton";
(currentEnvironment == null ? void 0 : currentEnvironment.region) === (region == null ? void 0 : region.type) && (buttonClass += " greatWinterHuntGolemDestinationView__regionButton--active"), content += `<button class="${buttonClass}" data-region-type="${region.type}">${region.name}</button>`;
}
content += "</div>";
let hasTitles = !1;
content += '<div class="greatWinterHuntGolemDestinationView__environmentsContainer"><div class="greatWinterHuntGolemDestinationView__environmentsScroller"><div class="greatWinterHuntGolemDestinationView__regionList">', hasTitles || (content += `<div class="greatWinterHuntGolemDestinationView__regionGroup" data-region-type="all">
<div class="greatWinterHuntGolemDestinationView__regionEnvironments">`);
for (let region of regions2)
hasTitles && (content += `<div class="greatWinterHuntGolemDestinationView__regionGroup" data-region-type="${region.type}">
<div class="greatWinterHuntGolemDestinationView__regionName">${region.name}</div>
<div class="greatWinterHuntGolemDestinationView__regionEnvironments">`), environments2.filter((e) => e.region === region.type).forEach((environment) => {
let envButtonClass = "greatWinterHuntGolemDestinationView__environment";
currentEnvironment && currentEnvironment.id && currentEnvironment.id === environment.id && (envButtonClass += " greatWinterHuntGolemDestinationView__environment--active"), isLocationHidden(environment.id) && (envButtonClass += " mh-improved-travel-window-hidden"), environment.type === getCurrentLocation2() && (envButtonClass += " greatWinterHuntGolemDestinationView__environment--current"), content += `<button class="${envButtonClass}" data-environment-type="${environment.id}">
<div class="greatWinterHuntGolemDestinationView__environmentName">
<span>${environment.name}</span>
</div>
<div class="greatWinterHuntGolemDestinationView__environmentImage" style="background-image:url(${environment.headerImage});" data-environment-type="${environment.id}"></div>
</button>`;
}), hasTitles && (content += "</div></div>");
hasTitles || (content += "</div></div>"), content += "</div></div></div>", content += "</div>", content += `<div class="mh-improved-travel-window-footer">
<div class="mh-improved-travel-window-edit mousehuntActionButton"><span>Edit</span></div>
<div class="mh-improved-travel-window-description">Click on a location to toggle the visibility.</div>
</div>`, content += "</div>";
let popup = createPopup({
id: "mh-improved-travel-window",
title: "",
content,
className: "mh-improved-travel-window-popup jsDialogFixed",
show: !1
});
popup.setOffsetHeight(0), popup.setPersistentOffsetHeight(0), popup.setIsModal(!1), popup.show();
let travelWindow = document.querySelector(".mh-improved-travel-window");
if (!travelWindow)
return;
let editButton = document.querySelector(".mh-improved-travel-window-edit");
if (!editButton)
return;
let editButtonSpan = editButton.querySelector("span");
if (!editButtonSpan)
return;
let environmentButtons = document.querySelectorAll(".greatWinterHuntGolemDestinationView__environment");
if (!environmentButtons)
return;
editButton.addEventListener("click", () => {
isEditing = !isEditing, isEditing ? (travelWindow.classList.add("mh-improved-travel-window--editing"), editButtonSpan.textContent = "Save", editButton.classList.add("active")) : (travelWindow.classList.remove("mh-improved-travel-window--editing"), editButtonSpan.textContent = "Edit", editButton.classList.remove("active"));
}), environmentButtons.forEach((button) => {
let environmentType = button.getAttribute("data-environment-type");
button.addEventListener("click", () => __async(void 0, null, function* () {
isEditing ? (toggleLocation(environmentType), button.classList.toggle("mh-improved-travel-window-hidden")) : (debug(`Traveling to ${environmentType}`), yield travelTo(environmentType), popup.hide());
}));
}), onDialogHide(() => {
isEditing = !1;
});
let search = document.querySelector(".mh-improved-travel-window-search-input");
search && (search.focus(), search.addEventListener("input", () => {
let value = search.value.trim().toLowerCase();
environmentButtons.forEach((button) => {
let environmentType = button.getAttribute("data-environment-type"), environment = environments2.find((e) => e.id === environmentType);
button.style.display = environment.name.toLowerCase().includes(value) ? "block" : "none";
});
}), search.addEventListener("keydown", (e) => {
if (e.key === "Enter") {
let visibleButton = document.querySelector('.greatWinterHuntGolemDestinationView__environment[style="display: block;"]');
visibleButton && !visibleButton.classList.contains("greatWinterHuntGolemDestinationView__environment--active") && visibleButton.click();
}
}));
}), isEditing = !1, environments2 = [], makeMenuItem = () => {
addSubmenuItem({
id: "mh-improved-travel-window",
menu: "travel",
label: "Travel Window",
icon: "https://i.mouse.rip/icons/tiles.png",
callback: () => openTravelWindow()
});
}, addEnvironmentIconListener = () => {
let environmentIcon = document.querySelector(".mousehuntHud-environmentIcon");
environmentIcon && (environmentIcon.classList.add("mh-improved-travel-window-environment-icon"), environmentIcon.title = "Open Travel Window", environmentIcon.addEventListener("click", () => {
openTravelWindow();
}));
}, travel_window_default = () => __async(void 0, null, function* () {
addStyles(styles_default9, "better-travel-travel-window"), makeMenuItem(), getSetting("better-travel.travel-window-environment-icon", !0) && addEnvironmentIconListener(), onEvent("mh-improved-open-travel-window", openTravelWindow), environments2 = yield getData("environments");
});
}
});
var settings_default5, init_settings6 = __esm({
"src/modules/better-travel/settings/index.js"() {
settings_default5 = () => __async(void 0, null, function* () {
return [
{
id: "better-travel.default-to-simple-travel",
title: "Show Simple Travel tab by default",
default: !1
},
{
id: "better-travel.show-alphabetized-list",
title: "Show alphabetized list on Simple Travel tab",
default: !1
},
{
id: "better-travel.show-reminders",
title: "Show Travel Reminders",
default: !0
},
{
id: "better-travel.travel-window",
title: "Travel Window",
default: !0
},
{
id: "better-travel.travel-window-environment-icon",
title: "Environment icon opens Travel Window",
default: !0
}
];
});
}
});
var styles_default10, init_styles11 = __esm({
"src/modules/better-travel/styles/styles.css"() {
styles_default10 = `.travelPage-map-spacer,.travelPage-map-simpleToggle,.mousehuntHud-page-tabContent.map.full .travelPage-map-simpleToggle.full,.mousehuntHud-page-tabContent.map.full .travelPage-map-prefix.full{display:none}.travelPage-regionMenu{width:22%;overflow:scroll}.travelPage-map-environment-detailContainer{left:22%;width:78%}.travelPage-regionMenu-environmentLink.active,.travelPage-regionMenu-environmentLink.current{color:#000;background:#a4cafc}.travelPage-regionMenu-stats{color:#4d4d4d;background-color:#d8d8d8}.travelPage-regionMenu-numFriends{padding:0;background:none}.travelPage-mapContainer.full{height:auto;min-height:800px;max-height:900px;border:none}.travelPage-map-imageContainer{width:78%}.travelPage-map-zoomContainer{bottom:200px;transform:scale(1.5)}.travelPage-map-image-environment-name{top:70px;z-index:15;font-size:21px;font-variant:none;text-shadow:1px 1px #000,0 0 10px #000,8px 12px 9px #000}.travelPage-map-image-environment.locked .travelPage-map-image-environment-status{z-index:1;opacity:.5}.travelPage-map-image-environment-star{z-index:10}.travelPage-map-image-environment-button{top:100px;transform:scale(1.2)}.travelPage-regionMenu-environmentLink.mystery{display:block;color:#9e9e9e;pointer-events:none}.travelPage-regionMenu-item[data-region=riftopia],.travelPage-regionMenu-item[data-region=riftopia] .travelPage-regionMenu-item-contents{display:block!important}.travelPage-regionMenu-regionLink:hover,.travelPage-regionMenu-regionLink:focus{cursor:unset}#mh-simple-travel-page .travelPage-map-prefix{display:block}#mh-simple-travel-page .travelPage-regionMenu{display:grid;grid-template-columns:repeat(5,1fr);width:100%;margin-bottom:10px;overflow:visible;background-color:transparent}#mh-simple-travel-page .travelPage-regionMenu-item{box-sizing:border-box;margin:1px;background-color:#e2e2e2;border:1px solid #4c71b4}#mh-simple-travel-page .travelPage-regionMenu-item[data-region=gnawnia],#mh-simple-travel-page .travelPage-regionMenu-item[data-region=valour],#mh-simple-travel-page .travelPage-regionMenu-item[data-region=whisker_woods],#mh-simple-travel-page .travelPage-regionMenu-item[data-region=burroughs],#mh-simple-travel-page .travelPage-regionMenu-item[data-region=furoma]{min-height:215px}#mh-simple-travel-page .travelPage-regionMenu-item[data-region=riftopia]{min-height:250px}#mh-simple-travel-page .travelPage-regionMenu-environments{width:145px;padding-left:2px;box-shadow:none}#mh-simple-travel-page .travelPage-regionMenu-item-contents{overflow:visible!important}#mh-simple-travel-page .travelPage-regionMenu-environmentLink.active,#mh-simple-travel-page .travelPage-regionMenu-environmentLink.current{color:#4e6081}#mh-simple-travel-page .travelPage-regionMenu-environmentLink:hover,#mh-simple-travel-page .travelPage-regionMenu-environmentLink:focus{color:#fff;background-color:#6383bf;border-radius:3px}.huntersHornView__messageContent strong{font-weight:900}#mh-simple-travel-page .travelPage-alpha-wrapper .travelPage-regionMenu{display:block;width:100%}#mh-simple-travel-page .travelPage-alpha-wrapper .travelPage-regionMenu-environments{display:flex;flex-flow:column wrap;align-items:stretch;justify-content:flex-start;width:754px;height:425px;padding:4px 1px}#mh-simple-travel-page .travelPage-alpha-wrapper a.travelPage-regionMenu-environmentLink{width:112px;margin-left:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mhui-region-travel-item .icon{border-radius:5px}.mousehuntHud-menu ul li ul li.mhui-region-travel-item a .icon{top:6px;left:3px;width:22px;height:22px}#mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.active.highlight,#mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.current.highlight{margin-right:-3px;border-right:1px solid #4c71b4}#mh-simple-travel-page .travelPage-alpha-wrapper .travelPage-regionMenu-environmentLink.active.highlight,#mh-simple-travel-page .travelPage-alpha-wrapper .travelPage-regionMenu-environmentLink.current.highlight{margin-right:0;border-right:none;border-radius:3px}.travelPage-regionMenu-environmentLink.relic-hunter-is-here:after{position:absolute;top:5px;right:5px;display:none;width:20px;height:20px;content:"";background-image:url(https://www.mousehuntgame.com/images/mice/thumb/d6980f1b00ff8ec688804706cba9370c.gif);background-repeat:no-repeat;background-size:contain;border-radius:5px}.travelPage-regionMenu-environments:hover .travelPage-regionMenu-environmentLink.relic-hunter-is-here:after,.travelPage-regionMenu-environments:focus .travelPage-regionMenu-environmentLink.relic-hunter-is-here:after,.travelPage-regionMenu-environmentLink.relic-hunter-is-here:hover:after,.travelPage-regionMenu-environmentLink.relic-hunter-is-here:focus:after{display:block}.travelPage-regionMenu-environmentLink.relic-hunter-is-here{background-color:#e0f2d5}.mousehuntHud-page-tabContent.simple-travel .travelPage-regionMenu-environmentLink.relic-hunter-is-here{margin:0;border:none;border-radius:3px;outline:1px solid #ccc}.travelPage-alpha-wrapper .relic-hunter-is-here .travelPage-regionMenu-environmentLink-image{margin-left:0}.travelPage-map-image-environment .map-relic-hunter-is-here-image{position:absolute;top:7px;left:7px;width:68px;height:68px;overflow:hidden;background:url(https://www.mousehuntgame.com/images/mice/thumb/d6980f1b00ff8ec688804706cba9370c.gif);filter:hue-rotate(-326deg);background-repeat:no-repeat;background-size:contain;border-radius:50%;transform:rotate(-70deg)}.map-relic-hunter-is-here.travelPage-map-image-environment-pointer{top:41px;left:86px;z-index:9;filter:hue-rotate(326deg);transform:rotate(70deg)}#mh-simple-travel-page .first-letter:first-letter{font-size:12px;font-weight:900}#mh-simple-travel-page .travelPage-alpha-wrapper:hover .first-letter:first-letter{border-bottom:1px solid #4e6081}#mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.active.highlight.event-location,#mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.current.highlight.event-location,#mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.event-location{color:#c01dff}#mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.active.highlight.event-location:after,#mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.current.highlight.event-location:after,#mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.event-location:after{position:absolute;top:1px;left:4px;width:15px;height:15px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/camp/trap/star_favorite.png);filter:drop-shadow(0 0 1px #fff);background-repeat:no-repeat;background-size:contain}.travelPage-map-environment-detail-title .custom-favorite-button{margin-top:-1px;margin-left:10px}.mousehuntHud-menu ul li ul li.mh-improved-better-travel-favorites-divider{height:1px;pointer-events:none;background-color:#6c3d0e7f}.mh-improved-better-travel-favorite-location:after{position:absolute;top:6px;right:4px;bottom:0;display:block;width:20px;height:20px;content:"";background:url(https://www.mousehuntgame.com/images/ui/map/star_gold_320.png);background-size:contain;opacity:.3}.mh-improved-better-travel-favorite-location:hover:after,.mh-improved-better-travel-favorite-location:focus:after{opacity:.1}.mh-improved-better-travel-menu-item .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mousehuntHud-environmentName{padding-top:0;margin-top:29px}.mh-improved-better-travel-favorite-location .icon,.mh-improved-better-travel-region-location .icon{border:1px solid #9f9171;border-radius:3px}.mh-improved-travel-message.travelPage-map-message.active{top:46px;box-shadow:0 3px 6px -3px #333}.mh-improved-travel-message.travelPage-map-message .mousehuntActionButton{padding:3px 10px;font-size:11px}.mh-improved-travel-message>div{display:none}.travelPage-map-image-environment-pointer{top:5px;left:29px;width:140px;height:112px;background-size:cover}.travelPage-map-image-environment-pointer-image{top:10px;left:6px;width:70px;height:70px}.huntersHornView__message.huntersHornView__message--active.travel-reminder .huntersHornMessageView--unknown_error .huntersHornMessageView__content:before{display:none}.huntersHornView__message.huntersHornView__message--active.travel-reminder .huntersHornMessageView--unknown_error{border-image-source:url(https://i.mouse.rip/horn-message/pink.png)}.travelPage-map-image-environment[data-environment-type=train_station] .travelPage-map-image-environment-name,.travelPage-map-image-environment[data-environment-type=ronzas_traveling_shoppe] .travelPage-map-image-environment-name{left:-70px;width:310px}
`;
}
});
var travel_menu_hiding_default, init_travel_menu_hiding = __esm({
"src/modules/better-travel/styles/travel-menu-hiding.css"() {
travel_menu_hiding_default = `ul.fast-travel-list>li:not(.custom-submenu-item){display:none}
`;
}
});
var expandTravelRegions, travelClickHandler, cloneRegionMenu, addTab, addPage, addAlphabetizedList, addSimpleTravelPage, addSimpleTravel, getPreviousLocation, goToPreviousLocation, addToTravelDropdown, onTravelComplete, initSimpleTab, maybeSetTab, addRhToSimpleTravel, addRhToMap, maybeDoMapView, _tabHandler, listenTabChange, saveTravelLocation, getLocationFavorites, isLocationFavorite, saveLocationFavorites, addToLocationFavorites, removeFromLocationFavorites, addFavoriteButtonsToTravelPage, main, environments3, eventEnvironments, init11, better_travel_default, init_better_travel = __esm({
"src/modules/better-travel/index.js"() {
init_utils2();
init_utils3();
init_reminders();
init_travel_window();
init_settings6();
init_styles11();
init_travel_menu_hiding();
expandTravelRegions = () => {
var _a, _b;
if (getCurrentPage() !== "travel")
return;
let hud5 = document.querySelector("#mousehuntHud");
if (hud5) {
let hudHeight = hud5.offsetHeight + 30, map = document.querySelector(".travelPage-mapContainer.full");
map && (map.style.height = `calc(100vh - ${hudHeight}px)`);
}
let regionHeaders = document.querySelectorAll(".travelPage-regionMenu-regionLink");
regionHeaders && regionHeaders.forEach((regionHeader) => {
regionHeader.setAttribute("onclick", "return false;");
});
let travelAreas = document.querySelectorAll(".travelPage-regionMenu-item");
travelAreas && travelAreas.length > 0 && travelAreas.forEach((area) => {
area.classList.add("active"), area.classList.remove("contracted");
});
let locations = document.querySelectorAll(".travelPage-map-image-environment.active");
locations && locations.length > 0 && locations.forEach((location) => {
location.addEventListener("mouseover", () => {
location.classList.add("highlight");
}), location.addEventListener("mouseout", () => {
setTimeout(() => {
location.classList.remove("highlight");
}, 1e3);
});
}), (_b = (_a = app == null ? void 0 : app.pages) == null ? void 0 : _a.TravelPage) != null && _b.zoomOut && setTimeout(() => {
app.pages.TravelPage.zoomOut();
}, 500);
}, travelClickHandler = (event) => {
var _a, _b;
(_b = (_a = app == null ? void 0 : app.pages) == null ? void 0 : _a.TravelPage) != null && _b.travel && travelTo(event.target.getAttribute("data-environment"));
}, cloneRegionMenu = () => {
let regionMenu = document.querySelector(".travelPage-regionMenu");
if (!regionMenu)
return !1;
let regionMenuClone = regionMenu.cloneNode(!0), travelLinks = regionMenuClone.querySelectorAll(".travelPage-regionMenu-environmentLink");
return travelLinks && travelLinks.length > 0 && travelLinks.forEach((link) => {
link.setAttribute("onclick", "return false;"), link.addEventListener("click", travelClickHandler);
}), regionMenuClone;
}, addTab = (id, label) => {
if (getCurrentPage() !== "travel" || document.querySelector(`#mh-${id}-tab`))
return;
let tabContainer = document.querySelector(".mousehuntHud-page-tabHeader-container");
if (!tabContainer)
return;
let tab = makeElement("a", "mousehuntHud-page-tabHeader");
tab.id = `mh-${id}-tab`, tab.setAttribute("data-tab", id), tab.setAttribute("onclick", "hg.utils.PageUtil.onclickPageTabHandler(this); return false;"), makeElement("span", "", label, tab), tabContainer.append(tab);
}, addPage = (id, content) => {
if (getCurrentPage() !== "travel" || document.querySelector(`#mh-${id}-page`))
return;
let pageContainer = document.querySelector(".mousehuntHud-page-tabContentContainer");
if (!pageContainer)
return;
let page = makeElement("div", ["mousehuntHud-page-tabContent", id]);
if (page.id = `mh-${id}-page`, page.setAttribute("data-tab", id), content)
page.append(content);
else {
let blank = makeElement("div");
page.append(blank);
}
pageContainer.append(page);
}, addAlphabetizedList = (regionMenu) => {
let alphaWrapper = makeElement("div", "travelPage-alpha-wrapper"), alphaContent = makeElement("div", "travelPage-regionMenu"), alphaHeader = makeElement("div", ["travelPage-regionMenu-item", "active"]), alphaList = makeElement("div", "travelPage-regionMenu-item-contents"), alphaListContent = makeElement("div", "travelPage-regionMenu-environments"), sortedLinks = [...regionMenu.querySelectorAll(".travelPage-regionMenu-environmentLink")].sort((a, b) => {
let aName = a.innerText, bName = b.innerText;
return aName < bName ? -1 : aName > bName ? 1 : 0;
}), lastLetter = "";
return sortedLinks.forEach((link) => {
let linkClone = link.cloneNode(!0);
alphaListContent.append(linkClone), linkClone.addEventListener("click", travelClickHandler);
let firstLetter = linkClone.innerText.charAt(0).toLowerCase();
firstLetter !== lastLetter && linkClone.classList.add("first-letter"), lastLetter = firstLetter, environments3.find((env) => env.id === link.getAttribute("data-environment")) || linkClone.classList.add("event-location");
}), alphaList.append(alphaListContent), alphaHeader.append(alphaList), alphaContent.append(alphaHeader), alphaWrapper.append(alphaContent), alphaWrapper;
}, addSimpleTravelPage = () => {
expandTravelRegions();
let wrapper = makeElement("div", "travelPage-wrapper");
if (getSetting("better-travel.default-to-simple-travel", "not-set") === "not-set") {
let settingTip = makeElement("div", ["travelPage-map-prefix", "simple-travel-tip"], 'You can set this as the default travel tab in the <a href="https://www.mousehuntgame.com/preferences.php?tab=mousehunt-improved-settings">MouseHunt Improved settings</a>.');
wrapper.append(settingTip);
}
let regionMenu = cloneRegionMenu();
getSetting("better-travel.show-alphabetized-list", !1) && wrapper.append(addAlphabetizedList(regionMenu)), wrapper.append(regionMenu), addPage("simple-travel", wrapper);
}, addSimpleTravel = () => {
getCurrentPage() === "travel" && (addTab("simple-travel", "Simple Travel"), addSimpleTravelPage());
}, getPreviousLocation = () => {
let previousLocation = getSetting("better-travel.previous-location", !1);
return previousLocation && previousLocation !== getCurrentLocation2() ? environments3.find((environment) => environment.id === previousLocation) : !1;
}, goToPreviousLocation = () => {
let previousLocation = getPreviousLocation();
previousLocation && travelTo(previousLocation.id);
}, addToTravelDropdown = () => __async(void 0, null, function* () {
let currentLocation = getCurrentLocation2(), eventEnvironments2 = yield getData("environments-events");
environments3.push(...eventEnvironments2);
let currentRegion = environments3.find((environment) => environment.id === currentLocation);
if (!currentRegion && (currentRegion = eventEnvironments2.find((environment) => environment.id === currentLocation), !currentRegion))
return;
let otherRegions = environments3.filter((environment) => !(environment != null && environment.region) || !(currentRegion != null && currentRegion.region) || environment.id === "acolyte_realm" ? !1 : environment.region === currentRegion.region);
otherRegions.splice(otherRegions.findIndex((environment) => environment.id === currentLocation), 1);
let existingCustomSubmenuItems = document.querySelectorAll(".mh-improved-better-travel-menu-item");
existingCustomSubmenuItems && existingCustomSubmenuItems.forEach((item) => {
item.remove();
});
let previousLocation = getPreviousLocation();
previousLocation && addSubmenuItem({
menu: "travel",
label: `Back to ${previousLocation.name}`,
icon: "https://i.mouse.rip/icons/back.png",
callback: goToPreviousLocation,
class: "mh-improved-better-travel-menu-item mh-improved-better-travel-previous-location"
}), otherRegions.forEach((region) => {
region.id !== currentLocation && addSubmenuItem({
id: `better-travel-${region.id}`,
menu: "travel",
label: region.name,
icon: region.image,
callback: () => travelTo(region.id),
class: "mh-improved-better-travel-menu-item mh-improved-better-travel-region-location"
});
});
let favorites = getLocationFavorites();
favorites && favorites.length > 0 && (addSubmenuDivider("travel", "mh-improved-better-travel-favorites-divider"), favorites.forEach((favorite) => {
let favoriteRegion = environments3.find((environment) => environment.id === favorite);
favoriteRegion && addSubmenuItem({
id: `better-travel-favorite-${favorite}`,
menu: "travel",
label: favoriteRegion.name,
icon: favoriteRegion.image,
callback: () => travelTo(favoriteRegion.id),
class: "mh-improved-better-travel-menu-item mh-improved-better-travel-favorite-location"
});
}));
}), onTravelComplete = () => {
onEvent("travel_complete", () => {
saveTravelLocation(), setTimeout(() => {
getSetting("better-travel.show-reminders", !0) && reminders_default(), addToTravelDropdown();
}, 250);
});
}, initSimpleTab = () => {
if (getCurrentTab() === "simple-travel") {
let isActive = document.querySelector(".mousehuntHud-page-tabContent.simple-travel");
if (!isActive || isActive && isActive.classList.contains("active"))
return;
setTab("simple-travel");
}
}, maybeSetTab = () => {
getCurrentPage() === "travel" && (initSimpleTab(), getCurrentTab() === "map" && getSetting("better-travel.default-to-simple-travel", !1) && setTab("simple-travel"));
}, addRhToSimpleTravel = () => __async(void 0, null, function* () {
let location = yield getRelicHunterLocation();
if (!location)
return;
let travelLink = document.querySelectorAll(`.travelPage-regionMenu-environmentLink[data-environment="${location.id}"]`);
travelLink.length && travelLink.forEach((link) => {
link.classList.add("relic-hunter-is-here");
});
}), addRhToMap = () => __async(void 0, null, function* () {
let location = yield getRelicHunterLocation();
if (!location)
return;
let mapLocation = document.querySelector(`.travelPage-map-image-environment[data-environment-type="${location.id}"]`);
if (!mapLocation)
return;
let rh = makeElement("div", ["map-relic-hunter-is-here", "travelPage-map-image-environment-pointer"]);
makeElement("div", ["map-relic-hunter-is-here-image", "travelPage-map-image-environment-pointer-image"], "", rh), mapLocation.append(rh);
}), maybeDoMapView = () => {
getCurrentPage() === "travel" && getCurrentTab() === "map" && (expandTravelRegions(), addRhToMap());
}, _tabHandler = null, listenTabChange = () => {
var _a, _b;
_tabHandler || (_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.onclickPageTabHandler && (_tabHandler = hg.utils.PageUtil.onclickPageTabHandler, hg.utils.PageUtil.onclickPageTabHandler = (tab) => {
_tabHandler(tab), maybeDoMapView();
});
}, saveTravelLocation = () => {
if (sessionGet("doing-location-refresh", !1))
return;
let previousLocation = getTravelSetting("current-location", "not-set"), currentLocation = getCurrentLocation2();
currentLocation !== previousLocation && (saveTravelSetting("previous-location", previousLocation), saveTravelSetting("current-location", currentLocation));
}, getLocationFavorites = () => getSetting("better-travel.favorites", []), isLocationFavorite = (type2) => getLocationFavorites().includes(type2), saveLocationFavorites = (favorites) => {
saveTravelSetting("favorites", favorites);
}, addToLocationFavorites = (type2) => {
if (!isLocationFavorite(type2)) {
let faves = getLocationFavorites();
faves.push(type2), saveLocationFavorites(faves);
}
}, removeFromLocationFavorites = (type2) => {
if (getLocationFavorites()) {
let faves = getLocationFavorites();
faves.splice(faves.indexOf(type2), 1), saveLocationFavorites(faves);
}
}, addFavoriteButtonsToTravelPage = () => __async(void 0, null, function* () {
let locations = document.querySelectorAll(".travelPage-map-environment-detailContainer .travelPage-map-environment-detail");
if (!locations)
return;
let locationFavorites = getLocationFavorites();
locations.forEach((location) => {
let type2 = location.getAttribute("data-environment-type");
if (!type2 || eventEnvironments.find((environment) => environment.id === type2))
return;
let isFavorite2 = locationFavorites.includes(type2);
makeFavoriteButton({
id: `better-travel-favorite-${type2}`,
target: location.querySelector(".travelPage-map-environment-detail-title"),
size: "small",
state: isFavorite2,
isSetting: !1,
defaultState: !1,
/**
* Callback for when the favorite button is clicked.
*/
onActivate: () => {
addToLocationFavorites(type2), addToTravelDropdown();
},
/**
* Callback for when the favorite button is deactivated.
*/
onDeactivate: () => {
removeFromLocationFavorites(type2), removeSubmenuItem(type2);
}
});
});
}), main = () => {
getSetting("better-travel.travel-window", !0) && travel_window_default(), onNavigation(() => {
addSimpleTravel(), addRhToSimpleTravel(), addFavoriteButtonsToTravelPage();
}, {
page: "travel"
}), onPageChange({
travel: { show: maybeSetTab }
}), listenTabChange(), initSimpleTab(), maybeDoMapView(), onTravelComplete(), saveTravelLocation(), addToTravelDropdown(), onEvent("mh-improved-goto-previous-location", goToPreviousLocation);
}, environments3 = [], eventEnvironments = [], init11 = () => __async(void 0, null, function* () {
let stylesJoined = [styles_default10];
getFlag("no-travel-menu-hiding") || stylesJoined.push(travel_menu_hiding_default), addStyles(stylesJoined, "better-travel"), environments3 = yield getData("environments"), eventEnvironments = yield getData("environments-events"), main();
}), better_travel_default = {
id: "better-travel",
name: "Better Travel",
type: "better",
default: !0,
description: "Add locations in the current region to the Travel dropdown menu, include a \u201CSimple Travel\u201D tab with a grid of locations, offer an optional alphabetized list, and indicate where the Relic Hunter is.",
load: init11,
settings: settings_default5
};
}
});
var styles_default11, init_styles12 = __esm({
"src/modules/larger-skin-images/styles.css"() {
styles_default11 = `.skin .campPage-trap-itemBrowser-items{top:50px}.skin .campPage-trap-itemBrowser-item-description.shortDescription,.skin .campPage-trap-itemBrowser-item-image{display:none}.skin .campPage-trap-itemBrowser-item-content .campPage-trap-itemBrowser-item-name{margin-top:11px}.trapSelectorView__itemBrowserContainer.skin .campPage-trap-itemBrowser-tagGroup-name{display:none}.trapSelectorView__itemBrowserContainer.skin .campPage-trap-itemBrowser-items{right:5px;left:5px}
`;
}
});
var skinImages, isAdding, addSkinImages, triggerFromClick, init12, larger_skin_images_default, init_larger_skin_images = __esm({
"src/modules/larger-skin-images/index.js"() {
init_utils2();
init_styles12();
skinImages = {}, isAdding = !1, addSkinImages = (panel, force = !1) => __async(void 0, null, function* () {
if (panel !== "item_browser" || isAdding)
return;
isAdding = !0;
let blueprint = document.querySelector(".trapSelectorView__blueprint--active .trapSelectorView__browserStateParent");
if (!blueprint) {
isAdding = !1;
return;
}
if (!force) {
let type2 = blueprint.getAttribute("data-blueprint-type");
if (!type2 || type2 !== "skin") {
isAdding = !1;
return;
}
}
let items6 = document.querySelectorAll(".campPage-trap-itemBrowser-item.skin");
if (!items6) {
isAdding = !1;
return;
}
for (let item of items6) {
let id = item.getAttribute("data-item-id");
if (!id)
return;
let skin;
if (skinImages[id])
skin = skinImages[id];
else {
let cachedData = yield dbGet("cache", `skin-image-${id}`);
if (cachedData && cachedData.data && cachedData.data.skin)
skin = cachedData.data.skin;
else {
let itemData = yield fetch(`https://api.mouse.rip/item/${id}`).then((res) => res.json());
if (!(itemData && itemData.images.trap))
return;
skin = itemData.images.trap, dbSet("cache", {
id: `skin-image-${id}`,
skin
});
}
skinImages[id] = skin;
}
let imageWrapper = makeElement("div", "itembrowser-skin-image-wrapper"), imageEl = makeElement("img", "itembrowser-skin-image");
imageEl.setAttribute("src", skin), imageEl.setAttribute("data-item-classification", "skin"), imageEl.setAttribute("data-item-id", id), imageWrapper.append(imageEl), item.querySelector(".itembrowser-skin-image-wrapper") || item.insertBefore(imageWrapper, item.firstChild);
}
let searchInput = document.querySelector(".campPage-trap-itemBrowser-filter input");
searchInput && searchInput.addEventListener("keyup", debounce(() => {
addSkinImages("item_browser", !0);
}, 300)), isAdding = !1;
}), triggerFromClick = () => {
let button = document.querySelector(".trapSelectorView__armedItem[data-item-classification=skin]");
button && button.addEventListener("click", () => {
addSkinImages("item_browser", !0);
});
}, init12 = () => {
addStyles(styles_default11, "larger-skin-images"), onEvent("camp_page_toggle_blueprint", addSkinImages), onRequest("users/gettrapcomponents.php", (data) => {
var _a;
data != null && data.components && ((_a = data == null ? void 0 : data.components[0]) == null ? void 0 : _a.classification) === "skin" && setTimeout(() => {
addSkinImages("item_browser");
}, 250);
}), onRequest("users/changetrap.php", (data) => {
data.skin && data.skin.length && addSkinImages("item_browser");
}), onNavigation(triggerFromClick, {
page: "camp"
});
}, larger_skin_images_default = {
id: "larger-skin-images",
name: "Larger Skin Images",
type: "feature",
default: !0,
description: "Show larger images for skins in the trap selector.",
load: init12
};
}
});
var styles_default12, init_styles13 = __esm({
"src/modules/delayed-menus/styles.css"() {
styles_default12 = `.mousehuntHud-menu ul li ul{transform-origin:top;animation:mh-improved-in-scale-y .15s .25s 1 backwards cubic-bezier(.4,0,1,1)}
`;
}
});
var init13, delayed_menus_default, init_delayed_menus = __esm({
"src/modules/delayed-menus/index.js"() {
init_utils2();
init_styles13();
init13 = () => __async(void 0, null, function* () {
addStyles(styles_default12, "delayed-menus");
}), delayed_menus_default = {
id: "delayed-menus",
name: "Delayed Menus",
type: "feature",
default: !1,
description: "Add a short delay to the menu dropdowns to prevent accidental clicks.",
load: init13
};
}
});
var error_reporting_default, init_error_reporting = __esm({
"src/modules/error-reporting/index.js"() {
error_reporting_default = {
id: "error-reporting",
name: "Error Reporting",
type: "advanced",
description: "Send anonymous error reports to the developers.",
default: !0,
order: 1e3,
load: () => {
}
};
}
});
var styles_default13, init_styles14 = __esm({
"src/modules/better-journal/modules/journal-gold-and-points/styles.css"() {
styles_default13 = `.mh-ui-gold,.mh-ui-points{position:relative;margin-left:20px}.mh-ui-gold:after,.mh-ui-points:after{position:absolute;inset:-2px 0 0 -20px;width:18px;height:18px;content:"";background-image:url(https://www.mousehuntgame.com/images/items/stats/transparent_thumb/dccbaeebbdfa745340ff9363749f35ba.png);background-position:center;background-size:contain}.mh-ui-points:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/transparent_thumb/eeebc1c32b4242b95f75041be7275980.png)}
`;
}
});
var wrapGoldAndPoints, main2, journal_gold_and_points_default, init_journal_gold_and_points = __esm({
"src/modules/better-journal/modules/journal-gold-and-points/index.js"() {
init_utils2();
init_styles14();
wrapGoldAndPoints = (entry) => {
if (entry.getAttribute("data-modified-points-gold") || (entry.setAttribute("data-modified-points-gold", !0), entry.querySelector(".mh-ui-points") || entry.querySelector(".mh-ui-gold")))
return;
let points = entry.innerHTML.match(/worth (.+?) points/i), gold = entry.innerHTML.match(/points and (.+?) gold/i);
points && (entry.innerHTML = entry.innerHTML.replace(points[0], `worth <span class="mh-ui-points">${points[1]}</span> points`)), gold && (entry.innerHTML = entry.innerHTML.replace(gold[0], `points and <span class="mh-ui-gold">${gold[1]}</span> gold`));
}, main2 = () => __async(void 0, null, function* () {
addStyles(styles_default13, "better-journal-gold-and-points"), onJournalEntry(wrapGoldAndPoints, 2e3);
}), journal_gold_and_points_default = main2;
}
});
var styles_default14, init_styles15 = __esm({
"src/modules/better-journal/modules/journal-history/styles.css"() {
styles_default14 = `.journal .content .entry .journalbody .journaldate{display:flex;justify-content:space-between}.history-timestamp{text-align:right}.journal-history-page-selector{position:absolute;top:30px;right:-50px;display:flex;gap:5px;align-items:center;padding:5px 10px;background-color:#eee;border:1px solid #5b5b5b;border-radius:0 0 10px 10px}.pagerView-section.current.page-selector{position:relative}.journal-history-page-selector .page-input{width:40px;text-align:center;border:1px solid #5b5b5b}.history-timestamp:after{display:none}
`;
}
});
var makeEntriesMarkup, doPageStuff, getAllEntries, lastDate, saveToDatabase, addPageSelector, getPager, doJournalHistory, doJournalHistoryRequest, doDelayedJournalHistory, maybeDoJournalHistory, pager, journalEntries, miceThumbs, journal_history_default, init_journal_history = __esm({
"src/modules/better-journal/modules/journal-history/index.js"() {
init_utils2();
init_styles15();
makeEntriesMarkup = (entries) => entries.map((entry) => {
if (entry.data && (entry = entry.data), entry = {
id: (entry == null ? void 0 : entry.id) || 0,
timestamp: (entry == null ? void 0 : entry.timestamp) || 0,
date: (entry == null ? void 0 : entry.date) || "0:00",
location: (entry == null ? void 0 : entry.location) || "",
text: (entry == null ? void 0 : entry.text) || "",
type: (entry == null ? void 0 : entry.type) || [],
image: (entry == null ? void 0 : entry.image) || ""
}, (entry.type.includes("catchsuccess") || entry.type.includes("catchsuccessloot") || entry.type.includes("bonuscatchsuccess") || entry.type.includes("luckycatchsuccess") || entry.type.includes("bonuscatchsuccess")) && !entry.mouse) {
let mouseLink = entry.text.match(/hg\.views\.MouseView\.show\('([^']+)'\)/);
mouseLink && mouseLink[1] && (entry.mouse = mouseLink[1]);
}
let html = `<div class="${entry.type.filter((cls) => !["newEntry", "animate"].includes(cls)).join(" ")}" data-entry-id="${entry.id}" data-mouse-type="${entry.mouse || ""}">`;
if (entry.mouse) {
let mouseImages = miceThumbs.find((mouse) => mouse.type === entry.mouse);
mouseImages && (html += `<div class="journalimage"><a onclick="hg.views.MouseView.show('${entry.mouse}'); return false;"><img src="${mouseImages.thumb}" border="0"></a></div>`);
}
entry.image && !entry.mouse && (html += `<div class="journalimage">${entry.image}</div>`);
let timestamp = "";
return entry.timestamp && (timestamp = new Date(entry.timestamp).toLocaleString("en-US", { month: "short", day: "numeric", year: "numeric" })), html += `<div class="journalbody">
<div class="journalactions"></div>
<div class="journaldate">${entry.date} - ${entry.location}<span class="history-timestamp">${timestamp}</span></div>
<div class="journaltext">${entry.text}</div>
</div>
</div>`, html;
}).join(""), doPageStuff = (page, event = null) => {
if (page <= 6 || page > totalPages)
return;
event && (event.preventDefault(), event.stopPropagation());
let journalEntriesForPage = journalEntries.slice((page - 1) * 12, page * 12), journalEntryContainer = document.querySelector("#journalContainer .journalEntries");
!journalEntriesForPage.length || !journalEntryContainer || (journalEntryContainer.append(makeElement("div", "journal-history-entries", makeEntriesMarkup(journalEntriesForPage))), doEvent2("journal-history-entry-added", journalEntryContainer));
}, getAllEntries = () => __async(void 0, null, function* () {
return journalEntries.length || (journalEntries = yield dbGetAll("journal")), journalEntries.length ? (journalEntries = journalEntries.sort((a, b) => a.timestamp && b.timestamp ? b.timestamp - a.timestamp : a.id && b.id ? b.id - a.id : 0), journalEntries) : [];
}), lastDate = "", saveToDatabase = (entry) => __async(void 0, null, function* () {
var _a;
if (getCurrentPage() !== "camp" && getCurrentPage() !== "journal")
return;
let entryId = Number.parseInt(entry.getAttribute("data-entry-id"), 10);
if (!entryId)
return;
let entryText = entry.querySelector(".journalbody .journaltext");
if (!entryText)
return;
let original = yield dbGet("journal", entryId);
if (original && ((_a = original.data) != null && _a.text))
return;
let dateEl = entry.querySelector(".journaldate"), date = dateEl ? dateEl.innerText : lastDate;
lastDate = date, date = date.split("-");
let entryImage = entry.querySelector(".journalimage"), journalData = {
id: entryId,
timestamp: Date.now(),
date: date[0] ? date[0].trim() : "0:00",
location: date[1] ? date[1].trim() : "Unknown",
text: entryText.innerHTML,
type: [...entry.classList].filter((cls) => !["newEntry", "animate"].includes(cls)),
mouse: entry.getAttribute("data-mouse-type") || null,
image: entryImage ? entryImage.innerHTML : null
};
yield dbSet("journal", journalData);
}), addPageSelector = () => {
let current = document.querySelector(".pagerView-section.current");
if (!current || current.classList.contains("page-selector"))
return;
current.classList.add("page-selector");
let isShowing = !1;
current.addEventListener("click", (event) => {
if (isShowing) {
if (event.target.classList.contains("page-selector")) {
let pageSelector2 = document.querySelector(".journal-history-page-selector");
pageSelector2 && pageSelector2.remove();
}
return;
}
isShowing = !0;
let target = event.target, pageSelector = makeElement("div", "journal-history-page-selector"), pageInputLabel = makeElement("label", "page-input-label", "Go to page:");
pageInputLabel.htmlFor = "page-input", pageSelector.append(pageInputLabel);
let pageInput = makeElement("input", "page-input");
pageInput.type = "number", pageInput.min = 1, pageInput.max = totalPages;
let showPage = () => {
getPager(), pager.showPage(Number.parseInt(pageInput.value, 10)), setTimeout(() => {
pageSelector.remove(), isShowing = !1;
}, 500);
};
pageInput.addEventListener("keydown", (evt) => {
evt.key === 13 && showPage();
});
let pageSubmit = makeMhButton({
text: "Go",
size: "tiny",
className: "page-submit",
callback: showPage,
appendTo: pageSelector
});
pageSelector.append(pageInput, pageSubmit), target.append(pageSelector), pageInput.focus();
});
}, getPager = () => {
let journalPageLink = document.querySelector(".pagerView-nextPageLink.pagerView-link");
if (journalPageLink)
return pager = hg.views.JournalView.getPager(journalPageLink), pager;
}, doJournalHistory = () => __async(void 0, null, function* () {
if (!(getCurrentPage() === "camp" || getCurrentPage() === "journal"))
return;
let perPage = getCurrentPage() === "journal" ? 24 : 12, defaultPages = getCurrentPage() === "journal" ? 3 : 6;
pager || getPager(), !(!pager || !pager.getTotalItems()) && (journalEntries = journalEntries.length ? journalEntries : yield getAllEntries(), totalPages = Math.ceil(journalEntries.length / perPage), totalPages = totalPages <= defaultPages ? defaultPages : totalPages, !(totalPages < 6) && (addPageSelector(), !(!pager || !pager.setTotalItems) && (pager.setTotalItems(totalPages * perPage), pager.enable(), pager.render())));
}), doJournalHistoryRequest = () => {
doJournalHistory(), pager || doJournalHistory(), pager && pager.getCurrentPage() > 6 && doPageStuff(pager.getCurrentPage());
}, doDelayedJournalHistory = () => {
setTimeout(doJournalHistory, 500), setTimeout(doJournalHistory, 1e3);
}, maybeDoJournalHistory = () => {
pager = null, (getCurrentPage() === "camp" || getCurrentPage() === "journal") && (doDelayedJournalHistory(), addEvent("ajax_response", doDelayedJournalHistory, { removeAfterFire: !0 }));
}, journalEntries = [], miceThumbs = [], journal_history_default = () => __async(void 0, null, function* () {
addStyles(styles_default14, "better-journal-journal-history"), miceThumbs = yield getData("mice-thumbnails"), doDelayedJournalHistory(), onRequest("pages/journal.php", doJournalHistoryRequest), onNavigation(maybeDoJournalHistory), onJournalEntry(saveToDatabase, 1);
});
}
});
var styles_default15, init_styles16 = __esm({
"src/modules/better-journal/modules/journal-icons-minimal/styles.css"() {
styles_default15 = `.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=super_brie_cheese"],.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=chrome_trinket"],.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=party_trinket"],.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=snowball_trinket"],.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=scavenger_hunt_hint_stat_item"],.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=map_clue_stat_item"]{position:relative;padding-left:20px;white-space:nowrap}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=super_brie_cheese"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=chrome_trinket"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=party_trinket"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=snowball_trinket"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=scavenger_hunt_hint_stat_item"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=map_clue_stat_item"]:before{position:absolute;top:-3px;left:-2px;display:inline-block;width:19px;height:19px;content:"";background-repeat:no-repeat;background-size:contain}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=super_brie_cheese"]:before{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/32b20c3984d2f03b132c295ea3b99e7e.png)}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=chrome_trinket"]:before{top:-4px;left:-3px;background-image:url(https://i.mouse.rip/upscaled/7d9f0e220db8280b84b8bffe39cd803e.png);background-size:22px}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=party_trinket"]{padding-left:20px}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=party_trinket"]:before{left:-4px;background-image:url(https://i.mouse.rip/upscaled/8331fe131377c15fcf5c4773bde1fd8f.png)}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=snowball_trinket"]:before{top:-2px;background-image:url(https://www.mousehuntgame.com/images/items/trinkets/large/36d3d62f27e2b76944591f86229bc2f0.png)}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=scavenger_hunt_hint_stat_item"],.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=map_clue_stat_item"]{padding-left:17px}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=scavenger_hunt_hint_stat_item"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=map_clue_stat_item"]:before{left:-3px;background-image:url(https://www.mousehuntgame.com/images/items/stats/large/5da5d920ba95f944d4e5b37ae235685e.png)}.journal .entry.unstable_charm_trigger a[href*="https://www.mousehuntgame.com/item.php?item_type="]:before{display:none}.journal .entry.unstable_charm_trigger .journaltext a{padding-left:unset}
`;
}
});
var styles_default16, init_styles17 = __esm({
"src/modules/better-journal/modules/journal-icons/styles.css"() {
styles_default16 = `.entry.short.misc.custom.refine_pollutinum .journaltext a:before{display:none}.entry.short.misc.custom.refine_pollutinum .journaltext a{padding:0}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=map_clue_stat_item"]:before{left:1px}.spring_hunt_charge_trinket_effect .journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=chocolatium_stat_item"]:before,.spring_hunt_relic_hunter_egg_drop .journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=relic_hunter_egg_convertible"]:before{display:none}.spring_hunt_charge_trinket_effect .journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=chocolatium_stat_item"],.spring_hunt_relic_hunter_egg_drop .journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=relic_hunter_egg_convertible"]{padding-left:unset}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=fulminas_gift_convertible"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=storm_egg_convertible"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=prize_credit_stat_item"]:before{left:0}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=fulminas_gift_convertible"]{padding-left:22px}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=amber_queso_stat_item"]{position:relative;padding-left:15px}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=amber_queso_stat_item"]:before{left:0}
`;
}
});
var journal_icons_default, init_journal_icons = __esm({
"src/modules/better-journal/modules/journal-icons/index.js"() {
init_utils2();
init_styles16();
init_styles17();
journal_icons_default = () => __async(void 0, null, function* () {
document.querySelector("#better-journal-icons") || (addStyles([styles_default16, styles_default15], "better-journal-icons"), addExternalStyles("journal-icons.css"));
});
}
});
var journal_icons_minimal_default, init_journal_icons_minimal = __esm({
"src/modules/better-journal/modules/journal-icons-minimal/index.js"() {
init_utils2();
init_styles16();
journal_icons_minimal_default = () => __async(void 0, null, function* () {
addStyles(styles_default15, "better-journal-icons-minimal");
});
}
});
// dist/data/journal-item-colors.json
var journal_item_colors_default, init_journal_item_colors = __esm({
"dist/data/journal-item-colors.json"() {
journal_item_colors_default = { scavenger_hunt_hint_stat_item: "#1e831e", map_clue_stat_item: "#1e831e", fulminas_gift_convertible: "#a012a0", chrome_trinket: "#8b9ec8", snowball_trinket: "#1f719e", ultimate_trinket: "#068987", front_cover_torn_page: "#7a5b2d", back_cover_torn_page: "#7a5b2d", gnawnia_torn_page: "#7a5b2d", dojo_torn_page: "#7a5b2d", deep_mouse_torn_page: "#7a5b2d", rift_notes_1_torn_page: "#7a5b2d", rift_notes_2_torn_page: "#7a5b2d", rift_notes_3_torn_page: "#7a5b2d", whisker_woods_rift_torn_page: "#7a5b2d", dark_magi_torn_page: "#7a5b2d", king_scarab_torn_page: "#7a5b2d", shattered_carmine_1_torn_page: "#7a5b2d", shattered_carmine_2_torn_page: "#7a5b2d", soapy_oasis_pattern_crafting_item: "#7a5b2d", soapy_phantasmic_pattern_crafting_item: "#7a5b2d", polluted_chrome_monstrobot_pattern_crafting_item: "#7a5b2d", noxious_school_of_sharks_pattern_crafting_item: "#7a5b2d", cursed_gold_stat_item: "#4d631a", temporal_plate_crafting_item: "#a66bc5", draconic_geyser_trap_crafting_item: "#ea4224", golden_goose_stat_item: "#e27a11", zugzwang_sock_collectible: "#493fac", washboard_base_blueprints_crafting_item: "#5792c0", repear_perch_blueprint_crafting_item: "#5792c0", polluted_base_blueprints_crafting_item: "#5792c0", summer_key_shard_crafting_item: "#388d18", spring_key_shard_crafting_item: "#a39600", winter_key_shard_crafting_item: "#51b2db", fall_key_shard_crafting_item: "#fc6617", minuscule_photo_album_message_item: "#af8146", frozen_sealed_bottle_message_item: "#7db9c8", corrupt_trident_collectible: "#f46a4f", ancient_amulet_collectible: "#fb9231", zugzwangs_leftover_rock: "#0cc1e8", ascended_elder_glasses_collectible: "#986787", contaminated_crumb_cake_collectible: "#a39800", red_button_collectible: "#eb1b22", rift_valour_supply_kit_convertible: "#03bfbf", crystallized_fossil_collectible: "#3f5edc", shufflers_kit_convertible: "#839a38", optic_receiver_collectible: "#020202", rare_map_dust_stat_item: "#8e8e48", calming_trinket: "#cc3015", baitkeep_trinket: "#50929c", teddy_bear_message_item: "#976d51", sandblasted_metal_crafting_item: "#af8146", valour_rift_tower_collectible: "#bc8625", folklore_companion_vol_1_3_collectible: "#a5b138", enchanted_page_collectible: "#83be89", fulmina_tooth_crafting_item: "#c598dc", bristle_woods_rift_theme_scrap_I_crafting_item: "#0060ff", bristle_woods_rift_theme_scrap_II_crafting_item: "#0060ff", bristle_woods_rift_theme_scrap_III_crafting_item: "#0060ff", burroughs_rift_theme_scrap_1_crafting_item: "#0060ff", burroughs_rift_theme_scrap_2_crafting_item: "#0060ff", burroughs_rift_theme_scrap_3_crafting_item: "#0060ff", chrome_theme_scrap_1_crafting_item: "#0060ff", chrome_theme_scrap_2_crafting_item: "#0060ff", chrome_theme_scrap_3_crafting_item: "#0060ff", labyrinth_theme_scrap_1_crafting_item: "#0060ff", labyrinth_theme_scrap_2_crafting_item: "#0060ff", labyrinth_theme_scrap_3_crafting_item: "#0060ff", labyrinth_theme_scrap_4_crafting_item: "#0060ff", labyrinth_theme_scrap_5_crafting_item: "#0060ff", labyrinth_theme_scrap_6_crafting_item: "#0060ff", lightning_slayer_theme_scrap_1_crafting_item: "#0060ff", lightning_slayer_theme_scrap_2_crafting_item: "#0060ff", lightning_slayer_theme_scrap_3_crafting_item: "#0060ff", living_garden_theme_scrap_1_crafting_item: "#0060ff", living_garden_theme_scrap_2_crafting_item: "#0060ff", living_garden_theme_scrap_3_crafting_item: "#0060ff", moussu_picchu_theme_scrap_1_crafting_item: "#0060ff", moussu_picchu_theme_scrap_2_crafting_item: "#0060ff", moussu_picchu_theme_scrap_3_crafting_item: "#0060ff", polluted_theme_scrap_1_crafting_item: "#0060ff", polluted_theme_scrap_2_crafting_item: "#0060ff", polluted_theme_scrap_3_crafting_item: "#0060ff", queso_theme_scrap_i_crafting_item: "#0060ff", queso_theme_scrap_ii_crafting_item: "#0060ff", queso_theme_scrap_iii_crafting_item: "#0060ff", regal_theme_half_one_crafting_item: "#0060ff", regal_theme_half_two_crafting_item: "#0060ff", relic_hunter_theme_scrap_1_crafting_item: "#0060ff", relic_hunter_theme_scrap_2_crafting_item: "#0060ff", relic_hunter_theme_scrap_3_crafting_item: "#0060ff", relic_hunter_theme_scrap_4_crafting_item: "#0060ff", relic_hunter_theme_scrap_9_crafting_item: "#0060ff", relic_hunter_theme_scrap_5_crafting_item: "#0060ff", relic_hunter_theme_scrap_6_crafting_item: "#0060ff", relic_hunter_theme_scrap_7_crafting_item: "#0060ff", relic_hunter_theme_scrap_8_crafting_item: "#0060ff", ggg_theme_scrap_2_crafting_item: "#0060ff", ggg_theme_scrap_3_crafting_item: "#0060ff", ggg_theme_scrap_1_crafting_item: "#0060ff", regal_codex_page_stat_item: "#6b0b6b", chrome_bit_stat_item: "#6590e2" };
}
});
var makeStyles, journal_item_colors_default2, init_journal_item_colors2 = __esm({
"src/modules/better-journal/modules/journal-item-colors/index.js"() {
init_utils2();
init_journal_item_colors();
makeStyles = () => Object.entries(journal_item_colors_default).map(([id, icon]) => `#overlayPopup.hunting_summary .lootContainer a[href="https://www.mousehuntgame.com/item.php?item_type=${id}"], .journal .entry a[href="https://www.mousehuntgame.com/item.php?item_type=${id}"] { color: ${icon}; }`).join(" "), journal_item_colors_default2 = () => __async(void 0, null, function* () {
addStyles(makeStyles(), "better-journal-link-colors");
});
}
});
var styles_default17, init_styles18 = __esm({
"src/modules/better-journal/modules/journal-list/styles.css"() {
styles_default17 = `ul.better-journal-list{margin-left:15px;list-style:disc}.better-journal-list a:after{content:""!important}.journal .content .entry .journaltext .better-journal-list{line-height:16px}.journal .content .entry.bountifulBeanstalk-defeatedGiant .journaltext ul{margin-top:-15px;line-height:21px;list-style:disc}.journal .content .entry.bountifulBeanstalk-defeatedGiant .journaltext li{margin-left:20px}.entry.gloomyGreenwood-incense .journaltext:after{content:""}
`;
}
});
var classesToCheck, otherStrings, classesToSkip, makeListItems, allItems2, linkItems, splitText, getItemsFromText, addClassesToLiAndUl, formatAsList, formatXasList, journal_list_default, init_journal_list = __esm({
"src/modules/better-journal/modules/journal-list/index.js"() {
init_utils2();
init_styles18();
classesToCheck = {
loot: [
"bonuscatchsuccess",
"catchsuccess",
"catchsuccessprize",
"catchsuccessloot",
"luckycatchsuccess",
"catchsuccessprize"
],
convertible: [
"convertible_open"
],
other: [
"iceberg_defeated",
"dailyreward"
],
hasListNeedsClasses: [
"folkloreForest-bookClaimed",
"schoolOfSorcery-completed",
"schoolOfSorcery-droppedOut"
]
}, otherStrings = [
"the following loot</b>",
"Inside my chest was",
"Inside I found",
"I found",
"I found</b>",
"Inside, I found</b>",
"Loyalty Chest and received:",
"I sifted through my Dragon Nest and found</b>",
"my Skyfarer's Oculus and discovered the following loot:",
"my Skyfarer's Oculus and discovered:"
], classesToSkip = [
"mountain-boulderLooted",
"labyrinth-exitMaze"
], makeListItems = (itemList) => {
let list = makeElement("ul", "better-journal-list");
return itemList.length === 0 || itemList.forEach((item) => {
makeElement("li", "better-journal-list-item", item, list);
}), list;
}, allItems2 = null, linkItems = null, splitText = (text) => __async(void 0, null, function* () {
let items6 = text.split(/<br>|, (?=\d)| and (?=\d)/);
return allItems2 || (allItems2 = yield getData("items")), items6.map((item) => {
if (linkItems) {
let itemData = allItems2.find((i) => i.name === item.trim().replace(/^\d+ /, ""));
if (itemData)
return `<a class="loot" title="" href="https://www.mousehuntgame.com/item.php?item_type=${itemData.type}" onclick="hg.views.ItemView.show('${itemData.type}'); return false;">${item}</a>`;
}
return item.trim();
}).filter(Boolean);
}), getItemsFromText = (type2, text) => __async(void 0, null, function* () {
let innerHTML = text.innerHTML, items6, list, newText;
if (type2 === "loot")
items6 = innerHTML.split(" that dropped "), items6.length >= 2 ? (list = yield splitText(items6[1]), newText = `${items6[0]} that dropped:`) : (items6 = innerHTML.split("<b>that dropped</b> "), items6.length >= 2 && (list = yield splitText(items6[1]), newText = `${items6[0]} that dropped:`));
else if (type2 === "convertible") {
if (items6 = innerHTML.split("I received "), items6.length >= 2) {
let suffix = items6[1].split(" from "), suffixString = suffix[1];
suffix.length >= 2 ? (suffixString.endsWith(".") && (suffixString = suffixString.slice(0, -1)), list = yield splitText(suffix[0]), newText = `I opened ${suffixString} and received:`) : (list = yield splitText(items6[1]), newText = "I received: ");
}
} else if (type2 === "hasListNeedsClasses") {
let ul = text.querySelector("ul");
ul.classList.add("better-journal-list"), ul.querySelectorAll("li").forEach((li) => {
li.classList.add("better-journal-list-item");
});
} else
for (let string of otherStrings)
if (innerHTML.includes(string)) {
items6 = innerHTML.split(string), list = yield splitText(items6[1]), newText = `${items6[0]} ${string}: `.replace("::", ":");
break;
}
return {
list: list || [],
newText: newText || innerHTML
};
}), addClassesToLiAndUl = (text) => {
let list = text.querySelector("ul");
list && (list.classList.add("better-journal-list"), list.querySelectorAll("li").forEach((li) => {
li.classList.add("better-journal-list-item");
}));
}, formatAsList = (entry) => __async(void 0, null, function* () {
if (entry.getAttribute("data-better-journal-processed"))
return;
let classes = new Set(entry.classList), type2;
if (entry.setAttribute("data-better-journal-processed", "true"), classesToSkip.some((c) => classes.has(c)))
return;
let text = entry.querySelector(".journalbody .journaltext");
if (!text)
return;
for (let [key, value] of Object.entries(classesToCheck))
if (value.some((c) => classes.has(c))) {
type2 = key;
break;
}
if (type2 === "update") {
addClassesToLiAndUl(text);
return;
}
let { newText, list } = yield getItemsFromText(type2, text);
list.length > 0 && newText !== text.innerHTML && (text.innerHTML = newText, type2 !== "hasListNeedsClasses" && text.append(makeListItems(list)));
}), formatXasList = (entry) => __async(void 0, null, function* () {
if (entry.getAttribute("data-better-journal-processed-x-list"))
return;
let text = entry.querySelector(".journalbody .journaltext");
if (!text)
return;
let xList = text.querySelectorAll(".mhi-x-entry");
if (!xList.length)
return;
let items6 = yield getData("items"), list = makeElement("ul", "better-journal-list"), firstEl;
xList.forEach((x) => {
let dot = x.querySelector(".dot");
dot && dot.remove();
let splitxText = x.textContent.split(" x ");
if (splitxText.length < 2)
return;
let quantity = splitxText[0], itemName = splitxText[1], item = items6.find((i) => i.name === itemName.trim());
if (!item && (item = items6.find((i) => i.name === itemName.trim().replace(/s$/, "")), !item))
return;
let link = makeElement("a", "loot", itemName);
link.href = `https://www.mousehuntgame.com/item.php?item_type=${item.type}`, link.addEventListener("click", (e) => {
e.preventDefault(), hg.views.ItemView.show(item.type);
});
let listItem = makeElement("li", "better-journal-list-item");
listItem.append(`${Number.parseInt(quantity.trim(), 10).toLocaleString()} `), listItem.append(link), list.append(listItem), firstEl ? x.remove() : firstEl = x;
}), firstEl.replaceWith(list), entry.setAttribute("data-better-journal-processed-x-list", "true");
}), journal_list_default = () => __async(void 0, null, function* () {
addStyles(styles_default17, "better-journal-list"), linkItems = getSetting("better-journal-list.link-all-items"), onJournalEntry(formatAsList, 3e3), onJournalEntry(formatXasList, 3e3);
});
}
});
var styles_default18, init_styles19 = __esm({
"src/modules/better-journal/modules/journal-replacements/styles.css"() {
styles_default18 = `.itemtransaction p.mhi-x-entry{display:inline}.itemtransaction p.mhi-x-entry .dot,.entry.short.relicHunter_catch br{display:none}
`;
}
});
var replacements, replaceInEntry, updateLog, updateMouseImageLinks, updateItemLinks, shouldSkip, processEntry, journal_replacements_default, init_journal_replacements = __esm({
"src/modules/better-journal/modules/journal-replacements/index.js"() {
init_utils2();
init_styles19();
replacements = [
// Hunt entries
["I sounded the Hunter's Horn and was successful in the hunt!", ""],
["where I was successful in my hunt! I", "and"],
["I went on a hunt with", "I hunted with"],
[/\d+? oz. /i, ""],
[/\d+? lb. /i, ""],
[/from (\d+?) x/i, "from $1"],
[/purchased (\d+?) x/i, "purchased $1"],
["<br><b>The mouse also dropped the following loot:</b>", "==DROPREPLACE=="],
[".<br>==DROPREPLACE==<br>", " that dropped "],
["<br>==DROPREPLACE==<br>", " that dropped "],
["I caught a", "<p>I caught a"],
["found that I had caught a mouse! I", ""],
["found that I had caught a mouse! <p>I", ""],
["I checked my trap and caught", "I checked my trap and found"],
["I returned to check my trap, but it appeared", "I checked my trap, but"],
["was successful in the hunt! I", ""],
["where I was successful in my hunt! I", "and"],
["my efforts were fruitless. A", "a"],
["got <font", "was <font"],
["trap.<br><br>Additionally, the fiend pillaged", "trap, and stealing"],
["gold from me!", "gold."],
["trap.<br><br>Additionally, the power of this mouse crippled my courage, setting me back", "trap and I lost"],
// Map entries
["I successfully completed ", "Completing "],
["! Everyone who helped has been rewarded with", " gave me"],
[" each!", ", I can "],
["claim my reward", "claim the reward."],
["now!", ""],
[", ending the hunt!", "."],
["View Map Summary", ""],
["Poster!  The Marshall granted us our ", "Poster gave me one "],
[/ for turning in this lawless gang of the .+?\. time to find another <b>wanted poster<\/b>/i, ""],
[" caught ", " caught the final ", "wanted_poster-complete"],
// Other
["I should hunt and catch a Relic Hunter or visit a Cartographer to obtain a new Treasure Map!", ""],
["hunt and catch a Relic Hunter or ", "I can "],
["Treasure Map!", "Treasure Map."],
[", causing my trap to glimmer with a magnificent shine", ""],
[", causing my trap to sparkle with a fiendish glow", ""],
[", causing my trap to spark with lightning", ""],
["!The", "! The"],
["(Local Time)", ""],
["and your item(s) have been", ""],
[":</b><br>", "</b> "],
[/<a href="receipt.php.+?view receipt<\/a>/i, ""],
["me:<br>", "me "],
[/i should tell my friends to check .+? during the next .+? to catch one!/i, ""],
[/i can go to my .+? to open it/i, ""],
["Luckily she was not interested in my cheese or charms!", ""],
["while she was in my trap, but", "and"],
[" while scampering off!", ""],
["The mouse stole", " The mouse stole"],
["Chest, I can", "Chest, "],
["<br>I should ", "I can "],
["<br>I can ", "I can "],
[" I replaced my bait since it seemed to be stale.", ""],
["*POP* Your Unstable Charm pops off your trap and has", "My Unstable Charm"],
["You quickly add it to your inventory!", ""],
["I quickly added it to my inventory!", ""],
[" burned out and left behind ", " turned into "],
[" a elusive ", " a "],
["I moved forward a whopping", "I moved forward"],
["!I", "! I"],
["in search of more loot", ""],
["or I can return to the", "or return to the"],
[" and begin a new expedition", ""],
[" ate a piece of cheese without setting off my trap.", " stole my cheese."],
["slowly collapsed into itself with a powerful force, compressing mist in the air into an ", "compressed mist in the air into an "],
["Your S.U.P.E.R. Scum Scrubber scrubbed the mouse clean and found ", "My trap found an extra "],
["You scrubba-lubba-dub-dubbed your barrel and refined ", "I refined "],
["an additional 1 ", "an additional "],
[">.", ">"],
[", and ", " and "],
["!.,", "!"],
["My tower's ", "My "],
["Energy Cannon", "cannon"],
["before it could even touch my cheese!", ""],
["The mouse dropped the following prize", "that dropped"],
["My Unstable Charm turned into", "My Unstable Charm became"],
["My Condensed Creativity created additional loot:", "My Condensed Creativity created an additional "],
["The mouse stole an Ancient Relic and dropped a Relic Hunter Scroll Case", "The mouse stole an Ancient Relic and dropped a Relic Hunter Scroll Case!"],
["*BLING*", '<span class="decoration"></span>'],
["Aura helped me find", "Aura found"],
["processed  added", "processed and added"],
["I have started a", "I started a"],
[/an additional:<br>/i, "an additional "],
["<br></p><p>", "<p>"],
["<br><p>", "<p>"],
[/<p class="mhi-x-entry"><span class="dot"> • <\/span>/g, "", "!shop_purchase"],
[/(\d+?) x /gi, '<p class="mhi-x-entry"><span class="dot"> \u2022 </span>$1 x ', "!shop_purchase"],
["My Condensed Creativity created an additional ", "My Condensed Creativity created an additional: "],
[/<p><\/p>/g, ""],
["I can view other recipe", '<p class="double">I can view other recipe'],
["Here is the loot summary from my infiltration of", "I looted the following from"],
["Trove. and received", "Trove and received"],
["Lucky me, a prize mouse wandered by and fell for my trap!", "A prize mouse fell into my trap!"],
[/(\d+?,?\d*?) x /gi, " $1 ", "shop_purchase"],
["In a flash of light my", "My"],
["Chrome Dragon Slayer Cannon</a> found an additional ", "Chome Dragon Slayer Cannon</a> found a "],
["Dragon Slayer Cannon</a> found an additional ", "Dragon Slayer Cannon</a> found an extra "],
["I opened my harvest bin and retrieved the following yield: <br><br>From ", "I opened my harvest bin and retrieved the following yield from "],
["My Slayer Aura found 1 extra ", "My Slayer Aura found an extra "],
["Inside, I found", "I found"],
["Inside I found", "I found"],
[/i earned some extra loot:<br>• (\d+?) <(.+?)>enerchi<\/a> from my (.+?)<br>/i, `My $3 gave me an additional $1<a href="https://www.mousehuntgame.com/item.php?item_type=combat_energy_stat_item" onclick="hg.views.ItemView.show('combat_energy_stat_item'); return false;">Enerchi</a>.`],
["my Skyfarer's Oculus and discovered the following loot:", "my Skyfarer's Oculus and discovered: "],
["focussed the light from my ", "focused the light from my "],
[`Queso Cannonstorm Base</a> blasted 5 <a class="" title="" href="https://www.mousehuntgame.com/item.php?item_type=amber_queso_stat_item" onclick="hg.views.ItemView.show('amber_queso_stat_item'); return false;">Solidified Amber Queso</a> to smithereens, revealing`, "Queso Cannonstorm Base</a> revealed"],
[`Queso Cannonstorm Base</a> blasted 5 <a class="" title="" href="https://www.mousehuntgame.com/item.php?item_type=amber_queso_stat_item" onclick="hg.views.ItemView.show('amber_queso_stat_item'); return false;">Solidified Amber Queso</a> but nothing was found`, "Queso Cannonstorm Base</a> revealed nothing"],
["within the rubble!", ""],
["shatter brilliantly! I have", "shatter brilliantly! <p>I have"],
["I used a Master Magus Wand to DOUBLE my Spell Force which caused it to shatter brilliantly!", "I used a Master Magus Wand to double my Spell Force! It shattered in a brilliant explosion of light!"],
["times.I can", "times. I can"],
["Here is the summary of loot that I earned during my studies:<br><br>", "I earned the following loot during my studies:"],
// Event stuff
// SEH
[/was.+chocolatonium.+trap!/i, ""],
// SEH.
["A chocoholic", "I caught a bonus"],
["A chocolate-crazed", "I caught a bonus"],
["A voracious", "I caught a bonus"],
["A gluttonous", "I caught a bonus"],
["A hypoglycemic", "I caught a bonus"],
["A ravenous", "I caught a bonus"],
["A greedy", "I caught a bonus"],
["A hungry", "I caught a bonus"],
["A hyperactive", "I caught a bonus"],
["A sugar-induced", "I caught a bonus"],
["Eggstra Fondue extracted", "My Eggstra Fondue extracted"],
["Additionally my Eggstra Fondue also extracted", "And"],
// KGA.
["Prize Pack!<br><br><b>", "Prize Pack!<b>"],
// halloween.
["My Insidious Incense scared up an additional ", "My Insidious Incense scared up an additional: "]
], replaceInEntry = (entry) => {
if (entry.getAttribute("data-replaced"))
return;
let element2 = entry.querySelector(".journalbody .journaltext"), oldText = element2.innerHTML;
replacements.forEach((replacement) => __async(void 0, null, function* () {
if (!Array.isArray(replacement) || replacement.length < 2)
return;
if (replacement.length === 3) {
if (replacement[2].includes("!")) {
if (entry.classList.contains(replacement[2].replace("!", "")))
return;
} else if (!entry.classList.contains(replacement[2]))
return;
}
let newText = oldText.replace(replacement[0], replacement[1]);
oldText !== newText && (element2.innerHTML = newText, oldText = newText);
})), entry.setAttribute("data-replaced", "true");
}, updateLog = (entry) => {
if (!entry.classList.contains("log_summary"))
return;
let link = entry.querySelector("td a");
if (!link)
return;
link.classList.add("mh-ui-progress-log-link", "mousehuntActionButton", "small", "lightBlue");
let span = document.createElement("span");
span.innerText = "View Progress Log", link.innerText = "", link.append(span);
}, updateMouseImageLinks = (entry) => {
let mouseType = entry.getAttribute("data-mouse-type");
if (!mouseType || entry.getAttribute("data-mouse-image-updated"))
return;
let mouseImageLink = entry.querySelector(".journalimage a[onclick]");
mouseImageLink && (mouseImageLink.setAttribute("onclick", `hg.views.MouseView.show('${mouseType}'); return false;`), entry.setAttribute("data-mouse-image-updated", "true"));
}, updateItemLinks = (entry) => {
if (!entry.classList.contains("iceberg_defeated"))
return;
let itemLinks = entry.querySelectorAll('.journaltext a[href*="item.php"]');
itemLinks && itemLinks.forEach((link) => {
let itemType = link.href.match(/item\.php\?item_type=(\w+)/);
itemType && itemType.length === 2 && link.addEventListener("click", (e) => {
e.preventDefault(), hg.views.ItemView.show(itemType[1]);
});
});
}, shouldSkip = (entry) => {
let keepOriginalClasses = /* @__PURE__ */ new Set([
"lunar_lantern",
"valentines_matchmaker",
"vending_machine_purchase",
"fullyExplored",
"folkloreForest-bookClaimed",
"claimBooty"
]);
return entry.classList ? [...entry.classList].some((c) => keepOriginalClasses.has(c)) : !0;
}, processEntry = (entry) => __async(void 0, null, function* () {
shouldSkip(entry) || (replaceInEntry(entry), updateLog(entry), updateMouseImageLinks(entry), updateItemLinks(entry));
}), journal_replacements_default = () => __async(void 0, null, function* () {
addStyles(styles_default18, "better-journal-replacements"), onJournalEntry(processEntry, 500);
});
}
});
var fullstop_default, init_fullstop = __esm({
"src/modules/better-journal/modules/journal-styles/styles/fullstop.css"() {
fullstop_default = `.entry.short.log_summary.stats .fullstop{display:none}.journal .entry .journaltext br:after{content:" "}.journal .entry .journaltext br:last-child,.journal .content .entry .journaltext>br:last-of-type,.journal .content .entry .journaltext>br:first-of-type{display:none}.journal .content .entry .journaltext>br+br:last-of-type,.journal .content .entry.floatingIslands.fullyExplored .journaltext br,.journal .content .entry.floatingIslands.defeatedEnemy .journaltext br,.journal .content .entry.folkloreForest-plantClaimed .journaltext br,.journal .content .entry.folkloreForest-lootFuelBoost .journaltext br,.journal .content .entry.relicHunter_complete .journaltext br:first-of-type,.journal .content .entry.wanted_poster-complete .journaltext br:first-of-type,.journal .content .entry.folkloreForest-bookClaimed .journaltext br:first-of-type,.journal .content .entry.folkloreForest-bookClaimed .journaltext br:last-of-type,.journal .content .entry.harbour br{display:block}.journal .content .entry.kings_giveaway_bonus_prize_entry .journaltext>br+br:last-of-type,.journal .content .entry.floatingIslands.discoveredMod .journaltext br:last-of-type,.journal .content .entry.wanted_poster-complete .journaltext br:last-of-type,.journal .content .entry.floatingIslands.fullyExplored .journaltext br:first-of-type{display:none}.journal .entry.catchsuccessloot .journaltext br,.journal .entry.luckycatchsuccess .journaltext br,.journal .entry.relicHunter_catch .journaltext br:after,.journal .entry.relicHunter_complete .journaltext br:after{content:""}.journal .content .entry.catchsuccessloot .journaltext>br:last-of-type,.journal .content .entry.luckycatchsuccess .journaltext>br:last-of-type{display:block}.entry.socialGift-send .journaltext a:last-of-type:after,.entry.queso_geyser.eruption_started .journaltext b:after,.entry.torch_charm_event .journaltext a:last-of-type:after,.unstable_charm_trigger .journaltext a:last-of-type:after,.journaltext .loot:last-of-type:after,.journaltext .lucky:last-of-type:after,.journaltext .item:last-of-type:after,.entry.short.supplytransferitem .journaltext a:after,.entry.gloomyGreenwood-incense .journaltext:after,.journal .entry.relicHunter_complete .journaltext b:last-of-type:after,.journal .entry.wanted_poster-complete .journaltext b:last-of-type:after,.entry.halloween_boiling_cauldron.brew_finished a:last-of-type:after,.entry.halloween_boiling_cauldron.brew_removed a:last-of-type:after,.entry.folkloreForest-farmToTable .journaltext a:last-of-type:after,.entry.folkloreForest-forewordFarm.folkloreForest-plantStarted .journaltext a:after,.entry.festiveSpiritLootBoost .journaltext a:after,.entry.golemUpgraded .journaltext a:after,.entry.workshopPartProduced .journaltext a:after,.entry.birthday_factory.enter_room b:after,.entry.potionuse .journaltext span:last-of-type:after,.entry.labyrinth-clue.labyrinth-clue-good .journaltext:after,.entry.donationComplete .journaltext a:last-of-type:after{display:inline;content:"."}.journaltext .better-journal-list a.lucky:last-of-type:after,.journaltext .better-journal-list a.item:last-of-type:after,.journaltext .better-journal-list a.loot:last-of-type:after,.entry.alchemists_cookbook_base_bonus .journaltext .loot:last-of-type:after,.entry.short.dailyreward a:last-of-type:after,.entry.short.log_summary.stats .journaltext .loot:last-of-type:after,.entry.convertible_open .journaltext .item:last-of-type:after,.entry.short.craft.convertible_open .journaltext .item:last-of-type:after,.entry.short.supplytransferitem .journaltext #friend-data-wrapper a:after,.entry.folkloreForest-plantClaimed .journaltext a:last-of-type:after,.entry.folkloreForest-forewordFarm.folkloreForest-plantStarted .journaltext a:after,.entry.mountain-boulderLooted a:last-of-type:after,.entry.short.craft.convertible_open a.item:after{display:none;content:""}.entry.floatingIslands.fullyExplored .journaltext .item:last-of-type:after{content:""}.journaltext .lucky:last-of-type:after,.journaltext .lucky:after{display:none}
`;
}
});
var backgrounds_default2, init_backgrounds2 = __esm({
"src/modules/better-journal/modules/journal-styles/styles/backgrounds.css"() {
backgrounds_default2 = `.journal .content .entry{background-repeat:no-repeat}.journal .content .entry,.journal .content .entry.adventureBook-journal,.journal .content .entry.craft.newrecipe,.journal .content .entry.folkloreForest-bookClaimed,.journal .content .entry.aurora_base_trigger,.journal .content .entry.regulator_base_trigger,.journal .content .entry.short.misc.custom.denture_base_decay_trigger,.journal .content .entry.burroughs_rift.danger_zone,.journal .content .entry.burroughs_rift.regulator_base_trigger,.journal .content .entry.birthday_factory,.journal .content .entry.boiling_cauldron_potion_bonus.boon_potion_bonus,.journal .content .entry.desert_heater_base_trigger,.journal .content .iceberg_advance_prevented,.journal .content .entry.minigame_done,.journal .content .entry.minigame_start,.journal .content .entry.living_grove_base_trigger,.journal .content .entry.queso_geyser,.journal .content .entry.rift_valour.claim_loot,.journal .content .entry.slac_in_a_box_trigger.popped,.journal .content .entry.sunken_city.dive,.journal .content .entry.sunken_city.zone,.journal .content .train_station.load_supply_crates,.journal .content .train_station.minigame_done,.journal .content .train_station.minigame_start,.journal .content .train_station.phase_bridge_jump,.journal .content .train_station.prize_claimed,.journal .content .train_station.progress,.journal .content .train_station.raider_wave_defeated,.journal .content .train_station.stoke_furnace,.journal .content .train_station.train_done,.journal .content .train_station.train_leave,.journal .content .train_station.train_start,.journal .content .train_station.use_mouse_repellent,.journal .content .train_station.warehouse_manager_catch,.journal .content .train_station.warehouse_manager_done,.journal .content .train_station.phase_boarding,.journal .content .entry.winter_hunt_2013,.journal .content .entry.winter_hunt_2015,.journal .content .entry.winter_hunt_2016,.journal .content .entry.floatingIslands,.journal .content .entry.vegetation_base_trigger{background-position:10px center;background-size:50px}.journal .content .entry.labyrinthSmall.labyrinth-clue,.journal .content .entry.winterTaiga{background-position:10px center!important;background-size:50px!important}.journal .content .entry.bonuscatchfailure,.journal .content .entry.bonuscatchsuccess{background-position:left;background-size:cover}.journal .content .entry.minimalJournalImage{background-position:15px center!important;background-size:40px!important}
`;
}
});
var progress_log_default, init_progress_log = __esm({
"src/modules/better-journal/modules/journal-styles/styles/progress-log.css"() {
progress_log_default = `.journal .content .entry.log_summary .journalbody{margin-left:10px}.journal .content .entry.log_summary .journaltext b{display:block;width:30%;padding-top:.5em;padding-bottom:5px;margin:0 auto;font-weight:900;border-bottom:1px solid #c6c6c6}.journal .content .entry.log_summary .journalimage{display:none}.mh-ui-progress-log-link{display:block;width:50%;margin:1em auto}.log_summary tbody{display:block;margin:0}.entry.short.log_summary{background-color:#fff}#overlayPopup.hunting_summary .label{padding:5px;font-size:13px;background-color:#eee;border:1px solid #ccc}.journal .content .log_summary table td.value{padding-right:10px;font-size:12px;line-height:24px}.journal .content .log_summary table{display:flex;justify-content:center}.journal .content .log_summary table td.field{padding-left:10px}.journal .content .log_summary table td.field.mice,.journal .content .log_summary table td.field.points,.journal .content .log_summary table td.field.gold,.journal .content .log_summary table td.field.loot{padding:0;font-size:12px;text-align:center}.journal .content .log_summary table tr:nth-child(7){outline:none}.journal .content .log_summary table td.spacer{display:none}.journal .content .log_summary table th{border-color:#c6c6c6}#overlayPopup.hunting_summary .leftColumn,#overlayPopup.hunting_summary .rightColumn{margin-bottom:20px}#overlayPopup.hunting_summary .title{margin:10px;font-size:19px;text-align:center}#overlayPopup.hunting_summary .baitContainer,#overlayPopup.hunting_summary .lootContainer{display:grid;margin-bottom:20px;border:1px solid #ccc}#overlayPopup.hunting_summary .lootContainer{grid-template-columns:1fr 1fr 1fr 1fr}#overlayPopup.hunting_summary .baitContainer .label,#overlayPopup.hunting_summary .lootContainer .label{border-top:none;border-right:none;border-left:none}#overlayPopup.hunting_summary .baitContainer .label{grid-column:span 2}#overlayPopup.hunting_summary .lootContainer .label{grid-column:span 4}#overlayPopup.hunting_summary .lootContainer a .wrapper{padding:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#overlayPopup.hunting_summary .miceContainer a{display:grid;grid-template-columns:0 50px auto;align-items:center;padding:6px 0;font-size:10px;line-height:14px}#overlayPopup.hunting_summary .miceContainer{display:grid;grid-template-columns:1fr 1fr;place-items:start stretch}#overlayPopup.hunting_summary .miceContainer .catches{float:none;font-size:11px}#overlayPopup.hunting_summary .miceContainer a img{margin:0 3px}#overlayPopup.hunting_summary .baitContainer a{display:inline-block;float:none;width:auto}#overlayPopup.hunting_summary .lootContainer a{width:160px}#overlayPopup.hunting_summary .baitContainer a .wrapper{font-size:10px}#overlayPopup.hunting_summary .baitContainer a img{width:35px;height:auto;margin-top:6px}#overlayPopup.hunting_summary .baitContainer a b{display:inline-block;padding-bottom:6px}.reportTitle{margin-bottom:5px;font-size:1.5em}.reportSubtitle{font-size:1.125em}.journal .content .entry.log_summary .journaltext>table{line-height:initial}#overlayPopup.hunting_summary .miceContainer a[href="https://www.mousehuntgame.com/adversaries.php?mouse=snooty"],#overlayPopup.hunting_summary .miceContainer a[href="https://www.mousehuntgame.com/adversaries.php?mouse=mobster"],#overlayPopup.hunting_summary .miceContainer a[href="https://www.mousehuntgame.com/adversaries.php?mouse=leprechaun"],#overlayPopup.hunting_summary .miceContainer a[href="https://www.mousehuntgame.com/adversaries.php?mouse=treasurer"],#overlayPopup.hunting_summary .miceContainer a[href="https://www.mousehuntgame.com/adversaries.php?mouse=high_roller"]{background-color:#ddffd6}.mh-dark #overlayPopup.hunting_summary .miceContainer a[href="https://www.mousehuntgame.com/adversaries.php?mouse=snooty"],.mh-dark #overlayPopup.hunting_summary .miceContainer a[href="https://www.mousehuntgame.com/adversaries.php?mouse=mobster"],.mh-dark #overlayPopup.hunting_summary .miceContainer a[href="https://www.mousehuntgame.com/adversaries.php?mouse=leprechaun"],.mh-dark #overlayPopup.hunting_summary .miceContainer a[href="https://www.mousehuntgame.com/adversaries.php?mouse=treasurer"],.mh-dark #overlayPopup.hunting_summary .miceContainer a[href="https://www.mousehuntgame.com/adversaries.php?mouse=high_roller"]{background-color:var(--d-green-dark)}.mh-dark .journal .content .log_summary table th,.mh-dark .journal .content .entry.log_summary .journaltext b{border-color:var(--d-action)}
`;
}
});
var general_default2, init_general2 = __esm({
"src/modules/better-journal/modules/journal-styles/styles/general.css"() {
general_default2 = `.journalEntries{background-color:#f1f1f1}.journal .content{padding:0 5px}.journal .content .entry .journalbody{margin-top:3px;margin-bottom:3px;margin-left:75px}.journal .content .entry.minimalJournal .journalbody{margin-left:10px}.journal .content .entry{position:relative;padding:6px 3px 6px 0;border:1px solid #5b5b5b;border-bottom:none;transition:box-shadow .1s}.journal .content .entry .journalimage{position:absolute;top:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:center;width:55px;height:auto;margin:10px 0 0 10px}.shop_purchase .journal .content .entry .journalimage{margin:15px 0 0 10px}.journal .content .entry .journalimage a:hover,.journal .content .entry .journalimage a:focus{overflow:visible}.journal .content .entry .journalimage a{display:inline-block;width:59px;height:59px;overflow:hidden}.journal .content .entry a:hover img,.journal .content .entry a:focus img{filter:brightness(1.1)}.journal .content .entry .journalbody .journaltext{margin-right:5px;line-height:20px}.journal .content .entry .journaltext b{font-weight:400}.journal .content .entry .journaltext p:first-of-type{margin-top:0}.journal .content .entry .journaltext>*{line-height:24px}.journal .content .entry .journalbody .journaldate{display:inline-block;width:calc(100% - 10px);padding-top:5px;padding-bottom:3px;margin-bottom:5px;font-size:11px;font-weight:400;border-bottom:1px solid rgb(0 0 0 / 30%)}.journal-detailLinkContainer a:first-child{display:none}.journal-detailLinkContainer{text-align:center}a.journal-detailLink.full{font-size:11px;text-transform:lowercase;background:none}a.journal-detailLink.full:before{text-transform:capitalize;content:"View "}a.journal-detailLink.full:after{content:" \\2192"}.journalContainer .pagerView-container{border:1px solid #5b5b5b;border-right:none;border-left:none}.journal .content .entry a:hover img{padding:1px;border:none;outline:1px solid #90d3e4}.journal .content .entry .journaltext p:last-of-type{margin-bottom:0}.journal .content .entry .journaltext .decoration{margin-right:65px}.journal .content .entry .journaltext .decoration:after{position:absolute;top:0;left:0;display:block;width:28px;height:28px;content:"";background:url(https://www.mousehuntgame.com/images/items/trinkets/large/430b05beed99ba1995f5ab78e394f5d6.png) no-repeat;background-size:contain}.journal .content .entry .journalbody .journalactions{position:absolute;right:5px;float:none}.journal .content .entry .journaltext p.double{margin-top:1em}.jsingle.journal .content .log_summary table{margin:0 auto}.journal .content .entry.minimalJournalImage .journalbody .journaldate{display:none}p.mhi-x-entry{display:block;padding:0;margin:0;line-height:22px!important}.journal .content .entry:hover{box-shadow:inset 0 0 5px #0006}.journal .content .entry.craft.item{padding-bottom:10px}.journal .content .entry.out_of_candles{background-color:#bd7f89}.journal .content .entry.desert_heater_base_trigger.fail{background-image:url(https://i.mouse.rip/upscaled/flameshard_crafting_item.png);background-blend-mode:luminosity}.journal .content .entry.alchemists_cookbook_base_bonus{background-position:10px}.journal .content .entry.electromagnetic_base_trigger:after{display:none}.journal .content .entry.halloween-special-loot,.journal .content .entry.halloween2019_shot_supplies{padding-left:0}.journal .content .entry.outofsuperbriebutton{margin-left:0}.journal .content .entry.pirate_sleigh_trigger{background:#4fa9e6}.journal .content .entry.queso_cannonstorm_base_trigger.fail{background-color:#f9d99a;background-image:url(https://www.mousehuntgame.com/images/items/stats/large/fe36041df0bec6dcc887ce67feefc4c8.png);background-blend-mode:luminosity}.journal .content .entry.queso_cannonstorm_base_trigger .journaltext a[href*="https://www.mousehuntgame.com/item.php?item_type=amber_queso_stat_item"]{padding-left:0}.journal .content .entry.queso_cannonstorm_base_trigger .journaltext a[href*="https://www.mousehuntgame.com/item.php?item_type=amber_queso_stat_item"]:before{display:none}.journal .content .entry.short.queso_canyon_queso_pumped .journalbody{margin-left:85px}.journal .content .entry.valentines_matchmaker{padding-left:0;margin-left:0;background-position:center;background-size:cover}.journal .entry.luckycatchsuccess .journalimage:after,.journal .entry.short.misc.custom.donationComplete br:last-of-type,.journal .content .entry.short.relicHunter_complete .journaltext>br+br:last-of-type,.journal .entry.short.relicHunter_complete br:nth-of-type(2),.journal .entry.vegetation_base_trigger:after{display:none}.journal .content .entry.vending_machine_purchase{background-position:top,bottom,center;background-size:contain}.journal .content .entry .journaltext,.journal .content .entry .journaltext p{font-size:11px}.journal.jdouble .content .entry:last-child{border-bottom:1px solid #5b5b5b}.journal.jdouble .leftcol{border:none}.journal.jdouble .rightcol{margin-left:10px;border:none}.journal.jdouble .journalEntries{display:flex;padding:10px}
`;
}
});
var date_hiding_default, init_date_hiding = __esm({
"src/modules/better-journal/modules/journal-styles/styles/date-hiding.css"() {
date_hiding_default = `.journal .content .entry.refractorBaseEffect-empyrean_jewel_base .journalbody .journaldate,.journal .content .entry.refractorBaseEffect-royal_ruby_refractor_base .journalbody .journaldate,.journal .content .entry.refractorBaseEffect-sorcerers_sapphire_refractor_base .journalbody .journaldate,.journal .content .entry.refractorBaseEffect-dragons_breath_opal_refractor_base .journalbody .journaldate,.journal .content .entry.short.refine_pollutinum .journalbody .journaldate,.journal .content .entry.short.torch_charm_event .journalbody .journaldate,.journal .content .entry.short.unstable_charm_trigger .journalbody .journaldate,.journal .content .entry.short.tournamentpointswithloot .journalbody .journaldate,.journal .content .entry.short.tournamentpoints .journalbody .journaldate,.journal .content .entry.short.rift-bristlewoods-acolyteSandStolen .journalbody .journaldate,.journal .content .entry.short.rift-bristlewoods-lootBooster .journalbody .journaldate,.journal .content .entry.short.super_rift_vacuum_trigger .journalbody .journaldate,.journal .content .entry.short.queso_canyon_queso_pumped .journalbody .journaldate,.journal .content .entry.short.custom.chesla_trap_trigger .journalbody .journaldate,.journal .content .entry.short.wordCount.minimalJournal .journalbody .journaldate,.journal .content .entry.short.folkloreForest.folkloreForest-lootFuelBoost .journalbody .journaldate,.journal .content .entry.short.labyrinth.labyrinth-chooseDoor .journalbody .journaldate,.journal .content .entry.short.labyrinth.labyrinth-intersection .journalbody .journaldate,.journal .content .entry.short.labyrinth.labyrinth-scrambleDoors .journalbody .journaldate,.journal .content .entry.short.misc.custom.chesla_trap_trigger .journalbody .journaldate,.journal .content .entry.short.misc.custom.birthday_factory.claim_package .journaldate,.journal .content .entry.folkloreForest-tableOfContents.mythweaverIncrease .journaldate,.journal .content .entry.iceberg_advance .journalbody .journaldate,.journal .content .entry.iceberg_defeated .journalbody .journaldate,.journal .content .entry.iceberg_phase_change .journalbody .journaldate,.journal .content .entry.iceberg_advance_prevented.general .journalbody .journaldate,.journal .content .entry.spring_hunt_charge_trinket_effect .journalbody .journaldate,.journal .content .entry.harbour .journalbody .journaldate,.journal .content .entry.iceberg_drill .journalbody .journaldate,.journal .content .entry.short.desertstreak .journalbody .journaldate,.journal .content .entry.schoolOfSorcery-wandUsed .journalbody .journaldate,.journal .content .entry.short.rift-whisker-woods-increase .journalbody .journaldate{display:none}.journal .content .log_summary.stats .journaldate,.journal .entry.birthday2018-anniversary-trap-trigger .journaldate,.journal .birthday2015-trayComplete-special .journaldate,.journal .train_station.progress .journaldate,.journal .entry.furoma_base_trigger .journaldate,.journal .entry.living_grove_base_trigger .journaldate,.journal .entry.desert_heater_base_trigger .journaldate,.journal .entry.queso_cannonstorm_base_trigger .journaldate,.journal .entry.aurora_base_trigger .journaldate,.journal .entry.timepiece_trigger .journaldate,.journal .entry.vegetation_base_trigger .journaldate,.journal .entry.electromagnetic_base_trigger .journaldate,.journal .entry.pirate_sleigh_trigger .journaldate,.journal .entry.slac_in_a_box_trigger .journaldate,.journal .entry.regulator_base_trigger .journaldate,.journal .entry.rift_mist_diffuser_trigger .journaldate,.journal .entry.spring_hunt_relic_hunter_egg_drop .journaldate,.journal .entry.denture_base_saved_trigger .journaldate,.journal .entry.denture_base_decay_trigger .journaldate,.journal .entry.printing_press_base_journal_entry .journaldate,.journal .entry.lunar_lantern .journaldate,.journal .entry.mousoleum .journaldate,.journal .entry.labyrinth-lantern .journaldat,.journal .entry.labyrinth-base-burnClue .journaldate,.journal .entry.labyrinth-clue .journaldate,.journal .entry.bountifulBeanstalk-goldenHarpStrings .journaldate,.journal .entry.riftFuroma-energyLost .journaldate{display:none!important}
`;
}
});
var events_default, init_events2 = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/events.css"() {
events_default = `.journal .entry.ronza_chrome_voucher_claim{background-color:#cae5e8;background-image:url(https://www.mousehuntgame.com/images/items/stats/large/a3be8c11176c289f6c79068cbe813968.png)}.journal .entry.halloween-candy{background-color:#f1b7dc}.journal .entry.lunar_lantern{background-color:#ffd0b3;border:1px solid #5b5b5b;border-bottom:none}.entry.short.misc.custom.chocolateshop_reward_claimed{background-color:#e7cdaa}.spring_hunt_charge_trinket_effect .journalimage img{width:30px}.journal .entry.spring_hunt_charge_trinket_effect{display:flex;align-items:center;min-height:35px;padding-bottom:6px}.journal .entry.spring_hunt_charge_trinket_effect .journalimage{margin:0}.journal .entry.chocolateshop_item_purchased{background-repeat:repeat}
`;
}
});
var draw_winner_default, init_draw_winner = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/draw-winner.css"() {
draw_winner_default = `.journal .entry.drawwinner{box-shadow:inset 0 0 4px 2px #8fc68f;animation:warpathWiggle 1s 5}.journal .entry.drawwinner:after{position:absolute;inset:0;content:"";background:url(https://www.mousehuntgame.com/images/ui/journal/donation_shimmer.png) no-repeat -130px 0;animation:donationShimmer 5s infinite}@media (prefers-reduced-motion: reduce){.journal .entry.drawwinner,.journal .entry.drawwinner:after{animation:none}}
`;
}
});
var kga_default, init_kga = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/kga.css"() {
kga_default = `.journal .content .entry.kings_giveaway_bonus_prize_entry .journalimage,.journal .content .entry.kings_giveaway_vault_prize_entry .journalimage{height:60px;margin-top:30px;background:none;border:none}.journal .content .entry.kings_giveaway_vault_prize_entry{background:linear-gradient(180deg,#ebaff8,#edd1f3,#ebaff8)}.journal .content .entry.kings_giveaway_vault_prize_entry br:nth-of-type(3),.journal .content .entry.kings_giveaway_vault_prize_entry br:nth-of-type(4){display:none}
`;
}
});
var rank_up_default, init_rank_up = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/rank-up.css"() {
rank_up_default = `.journal .entry.titlechange{overflow:hidden;background-image:url(https://www.mousehuntgame.com/images/ui/hud/camp/re_engagement/popup/rank_up_icon.png);background-repeat:no-repeat;background-position:right center;background-size:contain;background-blend-mode:luminosity;transition:.3s ease-in}.journal .content .titlechange .titlechangeheader{border-bottom:none}.journal .entry.titlechange .journalbody .journaldate{width:auto;max-width:185px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.journal .entry.titlechange:hover{z-index:99;background-blend-mode:luminosity;border:1px solid #5b5b5b;box-shadow:0 5px 5px -5px #000;transform:scale(1.1)}.journal .entry.titlechange:after{position:absolute;inset:0;pointer-events:none;content:"";background:url(https://www.mousehuntgame.com/images/ui/journal/donation_shimmer.png) no-repeat -130px 0;filter:hue-rotate(123deg);transition:all .3s;animation:donationShimmer 5s infinite}@media screen and (prefers-reduced-motion: reduce){.journal .entry.titlechange:after{animation:none}}.journal .content .titlechange .journalimage img,.journal .content .titlechange .journalimage{width:60px;filter:drop-shadow(0 1px 2px #3e93a3)}.journal .content .titlechange .journalimage{margin-top:5px;margin-left:5px}.journal .entry.titlechange .journalbody{text-shadow:0 0 1px #70c9da}
`;
}
});
var ultimate_default, init_ultimate = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/ultimate.css"() {
ultimate_default = `.journal .content .ultimate_intact{background-image:url(https://i.mouse.rip/ultimate_intact.png)}.journal .content .ultimate_pop{background-image:url(https://i.mouse.rip/ultimate_pop.png)}
`;
}
});
var badge_default, init_badge = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/badge.css"() {
badge_default = `.journal .content .entry.badge{z-index:1;margin-bottom:-1px;background:linear-gradient(135deg,#eee,#c6d8ee 50%);border:1px solid #5b5b5b;transition:transform .15s ease-in-out}.journal .content .entry.badge:hover{z-index:99;border:1px solid #5b5b5b;box-shadow:0 5px 5px -5px #000;transform:scale(1.1)}.journal .content .entry.badge:hover,.journal .content .entry.badge{animation:mh-improved-glow 1s 2}.journal .content .entry.badge .journalimage{width:80px;height:80px;margin:0}.journal .content .entry.badge .journalimage img{width:65px;transition:.3s ease-in-out}@media (prefers-reduced-motion: reduce){.journal .content .entry.badge,.journal .content .entry.badge:hover{transform:none;animation:none}.journal .content .entry.badge .journalimage img{transform:none}}.entry.short.badge.better-journal-styles-badge-bronze{background:linear-gradient(135deg,#eee,#f6b584 80%)}.entry.short.badge.better-journal-styles-badge-silver{background:linear-gradient(135deg,#eee,#c6d8ee 50%)}.entry.short.badge.better-journal-styles-badge-gold{background:linear-gradient(135deg,#eee,#fff24e 80%)}.entry.short.badge.better-journal-styles-badge-platinum{background:linear-gradient(135deg,#eee,#c3b8ff 80%)}.entry.short.badge.better-journal-styles-badge-diamond{background:linear-gradient(135deg,#eee,#8bdae9 80%)}
`;
}
});
var larry_gift_default, init_larry_gift = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/larry-gift.css"() {
larry_gift_default = `.entry.short.misc.custom.larryGift:after{position:absolute;top:20px;right:-5px;display:block;width:61px;height:61px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/onboarding/info_arrow_larry.png);filter:opacity(.4) saturate(.3);background-repeat:no-repeat;background-position:10px;background-size:contain;transition:filter .2s;transform:scaleX(-1) rotate(-5deg);transform-origin:center}.entry.short.misc.custom.larryGift:hover:after{filter:opacity(1) saturate(1)}.entry.short.misc.custom.larryGift .journalbody{margin-right:45px}
`;
}
});
var maps_default2, init_maps3 = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/maps.css"() {
maps_default2 = `.journal .entry.wanted_poster-complete .journaltext b,.journal .entry.relicHunter_complete .journaltext b{font-weight:700}.journal .entry.wanted_poster-complete .journaltext b:first-of-type{font-weight:400}
`;
}
});
var tournaments_default, init_tournaments = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/tournaments.css"() {
tournaments_default = `.entry.short.tournamentpointswithloot,.entry.short.tournamentpoints{padding:2px;background:#dbd1b4}.entry.short.tournamentpointswithloot .journalbody,.entry.short.tournamentpoints .journalbody{display:flex;align-items:center;justify-content:flex-start;margin:5px 5px 5px 10px;white-space:normal}
`;
}
});
var popup_default, init_popup = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/popup.css"() {
popup_default = `#OnboardArrow.onboardPopup.top .canShare .larryTip{bottom:48px;display:flex;flex-flow:column wrap;height:30px}
`;
}
});
var social_gift_default, init_social_gift = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/social-gift.css"() {
social_gift_default = `.journal .entry.socialGift.socialGift-send .journalbody .journaltext{min-height:40px;max-height:60px;padding-right:10px;padding-left:80px;margin-right:-2px;margin-bottom:-4px;margin-left:-75px;overflow-y:auto;box-shadow:inset 0 -20px 15px -16px #999}.socialGift.socialGift-send .journaltext #friend-data-wrapper{display:none}.journal .entry.socialGift-send{padding-bottom:0}
`;
}
});
var other_default2, init_other2 = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/other.css"() {
other_default2 = `.journal .relicHunter_slayer_aura_relic_bonus{background-image:url(https://www.mousehuntgame.com/images/items/collectibles/large/a6e804d0d9eeb22ff01660a144521ff1.png);background-repeat:no-repeat;background-size:45px!important}.journal .entry.generic_falure,.journal .entry.pollutinum_stolen{background:#ffbfbf}
`;
}
});
var aura_default, init_aura = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/aura.css"() {
aura_default = `.journal .content .entry.spookyAuraActivated{background-color:#9df327}.entry.short.misc.custom.anniversaryAuraActivated i{font-size:10px}.entry.short.misc.custom.anniversaryAuraActivated br:nth-of-type(3){display:none}.entry.short.misc.custom.minimalJournalImage.relicHunter_slayer_aura_relic_bonus .journaltext{line-height:25px}
`;
}
});
var floating_islands_default, init_floating_islands = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/floating-islands.css"() {
floating_islands_default = `.journal .entry.floatingIslands.skyPalaceTravel,.journal .entry.floatingIslands.dirigibleTravel{max-height:103px;overflow-y:auto}
`;
}
});
var labyrinth_default2, init_labyrinth2 = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/labyrinth.css"() {
labyrinth_default2 = `.entry.short.misc.custom.labyrinth.labyrinth-chooseDoor,.entry.short.misc.custom.labyrinth.labyrinth-intersection{display:flex;align-items:center}.journal .content .entry.ancient-stealth .journalbody{margin-left:85px}.journal .content .entry.ancient-stealth .journaldate{display:none}.journal .entry.labyrinth-intersection{background-color:#acc8dc}.journal .entry.ancient-stealth{padding:1px 0}.entry.short.misc.custom.labyrinth.labyrinth-exitMaze li{padding:0;line-height:1.6}.entry.short.misc.custom.labyrinth.labyrinth-exitMaze br{display:block}
`;
}
});
var frift_default, init_frift = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/frift.css"() {
frift_default = `.journal .content .entry.riftFuroma{position:relative}.journal .content .entry.riftFuroma-energyLost .journalbody{margin-left:80px}.journal .content .entry.riftFuroma-energyLost .journalbody:before{position:absolute;top:-15px;left:-95px;display:block;width:75px;height:80px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/hud/rift_furoma/droid.png);background-repeat:no-repeat;background-position:0 -190px;background-size:110%;mix-blend-mode:luminosity}.journal .content .entry.riftFuroma-energyLost .journaltext{display:flex;align-items:center;min-height:54px}.journal .content .entry.riftFuroma-retreat{background-color:#f4c3b2}.journal .content .entry.riftFuroma-energyLost{min-height:60px}.journal .content .entry.riftFuroma-enterPagoda,.journal .content .entry.riftFuroma-unlockBattery{background-color:#f3b782}.journal .content .entry.riftFuroma-exitPagoda{background-color:#e3bfb4}
`;
}
});
var halloween_default, init_halloween = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/halloween.css"() {
halloween_default = `.journal .entry.gloomyGreenwood-incense{background-color:#ffc277}
`;
}
});
var frox_default, init_frox = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/frox.css"() {
frox_default = `.journal .entry.fortRox-nightJournal,.journal .entry.fortRox-nightDone{max-height:120px;overflow-y:auto}
`;
}
});
var folklore_forest_default, init_folklore_forest = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/folklore-forest.css"() {
folklore_forest_default = `.journal .entry.folkloreForest.folkloreForest-lootFuelBoost{min-height:unset;background-color:#b6f1d1}.entry.folkloreForest-farmToTable .journaltext a:nth-last-of-type(2):after{content:" and "}.journal .entry.folkloreForest-tableOfContents.wordCount{display:flex;align-items:center;justify-content:center;min-height:40px;background-color:#fff9ee;box-shadow:inset 0 0 9px -2px #a78f77}.journal .entry.folkloreForest-tableOfContents.wordCount .journaltext{max-width:275px;margin:0 auto;font-size:11px}.journal .entry.folkloreForest-tableOfContents.wordCount:after{position:absolute;top:10px;left:2px;width:37px;height:37px;color:#d9bb92;content:"";background-image:url(https://www.mousehuntgame.com/images/folklore_forest_upgrades/golden_quill_thumb.png);background-repeat:no-repeat;background-size:cover;mix-blend-mode:luminosity}
`;
}
});
var toxic_spill_default, init_toxic_spill = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/toxic-spill.css"() {
toxic_spill_default = `.entry.short.misc.custom.refine_pollutinum{display:flex;align-items:center;height:45px;background-color:#7f7;background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/af9ffb2d0655dbf62a5e4a086515bb23.png);background-position:10px;background-size:50px}.entry.short.misc.custom.torch_charm_event .refine_pollutinum{width:55px}
`;
}
});
var school_default, init_school = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/school.css"() {
school_default = `.entry.schoolOfSorcery-wandUsed{background-image:url(https://www.mousehuntgame.com/images/items/stats/transparent_thumb/b7f8c1eba68c2d1c139f6b48aeb5831d.png);background-repeat:no-repeat}.journal .content .entry.minimalJournal.schoolOfSorcery-wandUsed .journalbody{margin-top:3px;margin-bottom:3px;margin-left:75px}.journal .entry.schoolOfSorcery-completed{background-color:#ebb5ed}.journal .entry.schoolOfSorcery-droppedOut{background-color:#ffacc4}
`;
}
});
var mousoleum_default, init_mousoleum = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/mousoleum.css"() {
mousoleum_default = `.journal .content .entry.mousoleum.creepy_coffin_trigger,.journal .content .entry.mousoleum.repair_wall,.journal .content .entry.mousoleum.damage_wall{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/d764ca82aa14f187f9796e1e5334e20c.png)}
`;
}
});
var queso_default2, init_queso2 = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/queso.css"() {
queso_default2 = `.journal .entry.queso_geyser.wild_tonic_disabled{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/8e292ff717bd65936d2c96707aa77de0.png);background-blend-mode:darken}.journal .entry.queso_canyon_queso_pumped{background-image:url(https://www.mousehuntgame.com/images/items/bait/transparent_thumb/06c81c66b0f21f2a8b6a2b989f40bd8d.png);background-position:10px -5px}.journal .entry.queso_canyon_queso_pumped .journalbody{margin-left:65px}.journal .entry.queso_cannonstorm_base_trigger .journalimage img{width:50px;padding-left:0}.journal .entry.queso_geyser.pressure_increased{display:flex;align-items:center;min-height:40px}.entry.queso_geyser.eruption_started .journaltext b{font-weight:900}
`;
}
});
var wwrift_default, init_wwrift = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/wwrift.css"() {
wwrift_default = `.journal .content .entry.short.rift-whisker-woods-increase{padding:6px 0}.journal .content .entry.short.rift-whisker-woods-increase .journalbody{margin:0 15px;font-size:10px;text-align:center}.journal .content .entry.short.rift-whisker-woods-increase .journalbody br{display:block}.journal .content .entry.rift-whisker-woods-catch-miniboss{background-color:#d8d479}.journal .content .entry.rift-whisker-woods-catch-boss{background-color:#fac75f}.journal .content .entry.rift-whisker-woods-increase-high{background-color:#e3d981}.journal .content .entry.rift-whisker-woods-increase-miniboss{background-color:#ffba4e}.journal .content .entry.short.rift-whisker-woods-increase .journaltext b{font-weight:900}
`;
}
});
var birthday_default, init_birthday = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/birthday.css"() {
birthday_default = `.journal .content .entry.vending_machine_purchase{padding:6px 6px 10px 0;background-repeat:no-repeat,no-repeat,repeat;background-position:top,bottom,center;background-size:contain}.journal .content .entry.vending_machine_purchase .journalimage{position:relative;display:block;width:unset;height:unset;margin:10px 0 0 6px;background-color:#2a2a2f;box-shadow:0 0 2px -1px #43434b}.journal .content .entry.vending_machine_purchase .journalimage img{width:55px;height:55px}.journal .content .entry.vending_machine_purchase .journalbody{margin:0 0 0 70px}.journal .content .entry.vending_machine_purchase .journaldate{display:none}.journal .content .entry.vending_machine_purchase .journaltext{margin-top:16px;font-size:10px;font-weight:900;line-height:12px}.journal .content .entry.vending_machine_purchase .journaltext>br+br:last-of-type,.journal .content .entry.vending_machine_purchase .journaltext br{display:block!important}.journal .content .entry.vending_machine_purchase .journaltext>div{position:relative;font-size:11px;font-weight:400;line-height:18px}
`;
}
});
var garden_default, init_garden = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/garden.css"() {
garden_default = `.journal .content .entry.minigame_start.yellow_drops{background-color:#fffd97;background-blend-mode:darken}.journal .content .entry.minigame_start.red_drops{background-color:#ffaf98;background-blend-mode:darken}.journal .content .entry.minigame_start.orange_drops{background-color:#ffde97;background-blend-mode:darken}
`;
}
});
var brift_default, init_brift = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/brift.css"() {
brift_default = `.journal .entry.burroughs_rift.danger_zone{background-color:#ccdfe2;background-position:10px center;background-size:59px}
`;
}
});
var harbour_default, init_harbour = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/harbour.css"() {
harbour_default = `.entry.harbour.catch{background-color:#d2ba96}.journal .content .entry.harbour .journaltext b{display:block}.mh-dark .journal .content .entry.harbour.claimBooty br{display:none}
`;
}
});
var vrift_default, init_vrift = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/vrift.css"() {
vrift_default = `.journal .entry.rift_valour.minimalJournalImage.enter_tower .journaltext,.journal .entry.rift_valour.minimalJournalImage.no_loot_retreat .journaltext,.journal .entry.rift_valour.minimalJournalImage.upgrade_longstride .journaltext,.journal .entry.rift_valour.minimalJournalImage.upgrade_stamina .journaltext,.journal .entry.rift_valour.minimalJournalImage.upgrade_siphon .journaltext{padding-top:0}.journal .entry.rift_valour.moved_forward{background-color:#8fe5ff}
`;
}
});
var iceberg_default, init_iceberg = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/iceberg.css"() {
iceberg_default = `.journal .content .iceberg_advance,.journal .content .iceberg_pushback,.journal .content .iceberg_pushback_prevented,.journal .entry.riftFuroma{font-style:inherit}.journal .content .iceberg_advance .journalbody,.journal .content .iceberg_pushback .journalbody,.journal .content .iceberg_pushback_prevented .journalbody{font-size:11px}.journal .content .iceberg_advance_prevented.general{background-color:#a6d1ee;background-position:10px}.journal .content .iceberg_advance,.journal .content .iceberg_advance_prevented,.journal .content .iceberg_pushback,.journal .content .iceberg_pushback_prevented{padding-bottom:6px}.entry.short.iceberg_phase_change .journaltext{display:flex;align-items:center}.journal .content .entry.iceberg_defeated .journaltext>br{display:block}.journal .content .entry.iceberg_phase_change .journalbody .journaltext{line-height:23px}
`;
}
});
var bwrift_default, init_bwrift = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/bwrift.css"() {
bwrift_default = `.entry.short.rift-bristlewoods-acolyteSandStolen{padding:2px;background:#ffc16e}.entry.short.rift-bristlewoods-acolyteSandStolen .journalbody{display:flex;align-items:center;justify-content:flex-start;padding-left:45px;margin:5px 5px 5px 10px;white-space:normal}
`;
}
});
var ssdb_default, init_ssdb = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/base/ssdb.css"() {
ssdb_default = `.journal .content .entry.short.misc.custom.denture_base_decay_trigger{background-blend-mode:lighten}
`;
}
});
var gem_default, init_gem = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/base/gem.css"() {
gem_default = `.journal .entry.refractorBaseEffect-empyrean_jewel_base{background-color:#16f99b7f;background-image:url(https://i.mouse.rip/upscaled/bases/0314ad5d2428777c9ff0e91bdc803218.png);background-size:50px}.journal .entry.refractorBaseEffect-royal_ruby_refractor_base{background-color:#f44b917f;background-image:url(https://i.mouse.rip/upscaled/bases/24e306ffd63ef1c14412597ed995f2ca.png);background-size:50px}.journal .entry.refractorBaseEffect-sorcerers_sapphire_refractor_base{background-color:#72d5ff7f;background-image:url(https://i.mouse.rip/upscaled/bases/5686d2d3f6106d95ce2966db6400c639.png);background-size:50px}.journal .entry.refractorBaseEffect-dragons_breath_opal_refractor_base{background-color:#d89bca7f;background-image:url(https://www.mousehuntgame.com/images/newsposts/2024/jewel_bases/new_refractor_base_thumbnail.gif);background-size:50px}.journal .entry.refractorBaseEffect-empyrean_jewel_base .journaltext,.journal .entry.refractorBaseEffect-royal_ruby_refractor_base .journaltext,.journal .entry.refractorBaseEffect-sorcerers_sapphire_refractor_base .journaltext,.journal .entry.refractorBaseEffect-dragons_breath_opal_refractor_base .journaltext{margin-left:60px}
`;
}
});
var alchemist_cookbook_default, init_alchemist_cookbook = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/base/alchemist-cookbook.css"() {
alchemist_cookbook_default = `.journal .content .entry.alchemists_cookbook_base_bonus .journalbody{margin-left:80px}.journal .entry.alchemists_cookbook_base_bonus{background-position:5px;box-shadow:inset 0 0 20px #ae3fa4}
`;
}
});
var torch_default, init_torch = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/charm/torch.css"() {
torch_default = `.entry.short.misc.custom.torch_charm_event{display:flex;align-items:center;min-height:35px;padding-left:5px;font-size:10px;line-height:15px;background-color:#dcf7ff}.entry.short.misc.custom.torch_charm_event .journalimage{width:55px}.entry.short.misc.custom.torch_charm_event .journalimage img{width:45px;height:45px}
`;
}
});
var unstable_default, init_unstable = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/charm/unstable.css"() {
unstable_default = `.entry.short.misc.custom.unstable_charm_trigger{display:flex;align-items:center;min-height:35px;padding-left:5px;font-size:10px;line-height:15px;background-color:#dcf7ff}.journal .entry.short.misc.custom.unstable_charm_trigger .journaltext{margin-left:-10px}.jsingle.journal .entry.short.misc.custom.unstable_charm_trigger .journaltext{max-width:580px}.entry.short.misc.custom.unstable_charm_trigger .journalimage{width:45px;margin-top:0}.journal .entry.short.misc.custom.unstable_charm_trigger .journalimage img{width:40px;height:40px}
`;
}
});
var rift_vacuum_default, init_rift_vacuum = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/charm/rift-vacuum.css"() {
rift_vacuum_default = `.journal .entry.short.super_rift_vacuum_trigger{box-shadow:0 0 20px #c997de inset}.journal .entry.short.custom.super_rift_vacuum_trigger{background-position:10px 5px;background-size:50px}
`;
}
});
var gilded_default, init_gilded = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/charm/gilded.css"() {
gilded_default = `.entry.short.misc.custom.chesla_trap_trigger{display:flex;align-items:center;min-height:35px;padding-left:10px;font-size:10px;line-height:15px;background-color:#f5def9}
`;
}
});
var ultimate_default2, init_ultimate2 = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/charm/ultimate.css"() {
ultimate_default2 = `.journal .content .ultimate_pop,.journal .content .ultimate_intact{position:relative;background-color:#49eec2;background-size:60px}.journal .content .ultimate_intact{animation:mh-improved-glow .8s ease-in-out 1}.journal .content .ultimate_pop{animation:mh-improved-dim .8s ease-in-out 1}@media (prefers-reduced-motion: reduce){.journal .content .ultimate_intact,.journal .content .ultimate_pop{animation:none}}
`;
}
});
var bonus_default, init_bonus = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/catch/bonus.css"() {
bonus_default = `.journal .content .bonuscatchsuccess,.journal .content .bonuscatchfailure{box-shadow:none}.journal .content .bonuscatchsuccess:after,.journal .content .bonuscatchfailure:after{top:10px;right:12px;left:unset;content:"BONUS"}.journal .content .bonuscatchsuccess:before,.journal .content .bonuscatchfailure:before{display:none}.journal .content .bonuscatchfailure:after{background-color:#cb0e01}
`;
}
});
var failure_default, init_failure = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/catch/failure.css"() {
failure_default = `.journal .content .entry.catchfailure{background-color:#f2f2f2;background-position:0;background-size:75px}
`;
}
});
var lucky_default, init_lucky = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/catch/lucky.css"() {
lucky_default = `.journal .entry.luckycatchsuccess .journalimage:after{background:none}
`;
}
});
var prize_default, init_prize = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/catch/prize.css"() {
prize_default = `.journal .content .catchsuccessprize{background-color:#7dea7d}.journal .content .catchsuccessprize br{display:none}
`;
}
});
var stuck_snowball_default, init_stuck_snowball = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/mouse/stuck-snowball.css"() {
stuck_snowball_default = `.journal .entry.stuck_snowball_catch{background:#a5d6fb}
`;
}
});
var valentines_default, init_valentines = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/mouse/valentines.css"() {
valentines_default = `.journal .content .entry.valentines_matchmaker{background-position:left;animation:mh-improved-background-slide 240s ease-in-out infinite}@media (prefers-reduced-motion: reduce){.journal .content .entry.valentines_matchmaker{animation:none}}
`;
}
});
var glazy_default, init_glazy = __esm({
"src/modules/better-journal/modules/journal-styles/styles/custom-entries/mouse/glazy.css"() {
glazy_default = `.mh-dark-mode .entry.short.catchsuccessloot[data-mouse-type=glazed],.entry.short.catchsuccessloot[data-mouse-type=glazed]{color:#000!important;background-color:#fcdb28;box-shadow:0 0 10px 8px #fdee96 inset}.mh-dark-mode .entry.short.catchsuccessloot[data-mouse-type=glazed] a{color:#3b5998}
`;
}
});
var imported4, styles3, addBadgeClass, updateRankUpIcon, journal_styles_default, init_journal_styles = __esm({
"src/modules/better-journal/modules/journal-styles/index.js"() {
init_utils2();
init_fullstop();
init_backgrounds2();
init_progress_log();
init_general2();
init_date_hiding();
init_events2();
init_draw_winner();
init_kga();
init_rank_up();
init_ultimate();
init_badge();
init_larry_gift();
init_maps3();
init_tournaments();
init_popup();
init_social_gift();
init_other2();
init_aura();
init_floating_islands();
init_labyrinth2();
init_frift();
init_halloween();
init_frox();
init_folklore_forest();
init_toxic_spill();
init_school();
init_mousoleum();
init_queso2();
init_wwrift();
init_birthday();
init_garden();
init_brift();
init_harbour();
init_vrift();
init_iceberg();
init_bwrift();
init_ssdb();
init_gem();
init_alchemist_cookbook();
init_torch();
init_unstable();
init_rift_vacuum();
init_gilded();
init_ultimate2();
init_bonus();
init_failure();
init_lucky();
init_prize();
init_stuck_snowball();
init_valentines();
init_glazy();
imported4 = [fullstop_default, backgrounds_default2, progress_log_default, general_default2, date_hiding_default, events_default, draw_winner_default, kga_default, rank_up_default, ultimate_default, badge_default, larry_gift_default, maps_default2, tournaments_default, popup_default, social_gift_default, other_default2, aura_default, floating_islands_default, labyrinth_default2, frift_default, halloween_default, frox_default, folklore_forest_default, toxic_spill_default, school_default, mousoleum_default, queso_default2, wwrift_default, birthday_default, garden_default, brift_default, harbour_default, vrift_default, iceberg_default, bwrift_default, ssdb_default, gem_default, alchemist_cookbook_default, torch_default, unstable_default, rift_vacuum_default, gilded_default, ultimate_default2, bonus_default, failure_default, lucky_default, prize_default, stuck_snowball_default, valentines_default, glazy_default], styles3 = imported4, addBadgeClass = (entry) => {
if (!entry || !entry.classList.contains("badge"))
return;
let badgeType = entry.querySelector(".journalimage img");
if (!badgeType)
return;
let badgeTypeClass = badgeType.src.replace("https://www.mousehuntgame.com/images/ui/crowns/crown_", "").replace(".png", "").trim();
entry.classList.add(`better-journal-styles-badge-${badgeTypeClass}`);
let content = entry.querySelector(".journaltext");
content && (content.innerHTML = content.innerHTML.replace("I can view my trophy crowns on my", "").replace('<a href="https://www.mousehuntgame.com/hunterprofile.php?tab=kings_crowns">hunter profile</a>', "").replace("<br>", "").replace(".", "").trim());
}, updateRankUpIcon = (entry) => {
if (!entry.classList.contains("titlechange"))
return;
let rankUp = entry.querySelector(".journalimage img");
if (!rankUp)
return;
let shield = getUserTitleShield(getUserTitle());
shield && (rankUp.src = shield);
}, journal_styles_default = () => __async(void 0, null, function* () {
addStyles(styles3, "better-journal-styles"), onJournalEntry(addBadgeClass, 4e3), onJournalEntry(updateRankUpIcon, 4e3);
});
}
});
var styles_default19, init_styles20 = __esm({
"src/modules/better-journal/modules/journal-tags/styles.css"() {
styles_default19 = `.journal .content .catchsuccessloot,.journal .content .attractionfailure,.journal .content .catchfailure,.journal .content .luckycatchsuccess,.journal .content .passive,.journal .content .linked{position:relative}.journal .content .catchsuccessloot:after,.journal .content .attractionfailure:after,.journal .content .catchfailure:after,.journal .content .luckycatchsuccess:after,.journal .content .passive:after,.journal .content .linked:after{position:absolute;top:10px;right:12px;left:unset;z-index:1;padding:1px 3px;font-size:9px;font-weight:700;line-height:11px;color:#fff;text-transform:uppercase;content:"";background:#53891b;border-radius:3px;opacity:0;transition:.2s}.journal .content .catchsuccessloot:hover:after,.journal .content .attractionfailure:hover:after,.journal .content .catchfailure:hover:after,.journal .content .luckycatchsuccess:hover:after,.journal .content .passive:hover:after,.journal .content .linked:hover:after{opacity:1}.journal .content .bonuscatchsuccess:after,.journal .content .bonuscatchfailure:after{opacity:0;transition:opacity .3s}.journal .content .bonuscatchsuccess:hover:after,.journal .content .bonuscatchfailure:hover:after{opacity:1}.journal .content .catchsuccessloot:after{content:"Catch";background:#53891b}.journal .content .catchfailure:after{content:"FTC";background:#891b1b}.journal .content .linked:after{content:"Friend"}.journal .content .luckycatchsuccess:after{content:"Lucky";background-color:#4ac338}.journal .content .passive:after{content:"Trap Check"}.journal .content .attractionfailure:after{content:"FTA";background:#959595}.journal .content .linked.attractionfailure:after{content:"Friend \\b7  FTA"}.journal .content .linked.catchfailure:after{content:"Friend \\b7  FTC"}.journal .content .linked.luckycatchsuccess:after{content:"Friend \\b7  Lucky"}.journal .content .passive.attractionfailure:after{content:"Trap Check \\b7  FTA"}.journal .content .passive.catchfailure:after{content:"Trap Check \\b7  FTC"}
`;
}
});
var journal_tags_default, init_journal_tags = __esm({
"src/modules/better-journal/modules/journal-tags/index.js"() {
init_utils2();
init_styles20();
journal_tags_default = () => __async(void 0, null, function* () {
addStyles(styles_default19, "journal-tags");
});
}
});
var list_and_icons_default, init_list_and_icons = __esm({
"src/modules/better-journal/styles/list-and-icons.css"() {
list_and_icons_default = `.journal .content .entry .journaltext .better-journal-list{line-height:21px}
`;
}
});
var styles_default20, init_styles21 = __esm({
"src/modules/better-journal/styles/styles.css"() {
styles_default20 = `.journal .entry .journalbody .journaltext{font-size:11px}.journal .entry .journalbody .journaltext p{margin:0;font-size:11px}.journaltext .lucky:after{width:14px;height:14px;background-image:url(https://www.mousehuntgame.com/images/ui/camp/trap/stat_luck.png);background-size:cover}
`;
}
});
var settings_default6, init_settings7 = __esm({
"src/modules/better-journal/settings/index.js"() {
settings_default6 = () => __async(void 0, null, function* () {
return [
{
id: "better-journal.styles",
title: "Journal styles",
default: !0
},
{
id: "better-journal.replacements",
title: "Journal text replacements",
default: !0
},
{
id: "better-journal.icons",
title: "Show loot icons"
},
{
id: "better-journal.icons-minimal",
title: "Show loot icons (minimal)"
},
{
id: "better-journal.list",
title: "Show loot as list"
},
{
id: "better-journal.gold-and-points",
title: "Show gold and points icons",
default: !0
},
{
id: "better-journal.item-colors",
title: "Unique item colors (Map clues, Ful'Mina's gifts, etc.)",
default: !0
},
{
id: "better-journal.journal-tags",
title: "Show hunt type on hover",
default: !1
},
{
id: "better-journal.journal-history",
title: "Journal History",
default: !0
}
];
});
}
});
var init14, better_journal_default, init_better_journal = __esm({
"src/modules/better-journal/index.js"() {
init_utils2();
init_journal_gold_and_points();
init_journal_history();
init_journal_icons();
init_journal_icons_minimal();
init_journal_item_colors2();
init_journal_list();
init_journal_replacements();
init_journal_styles();
init_journal_tags();
init_list_and_icons();
init_styles21();
init_settings7();
init14 = () => __async(void 0, null, function* () {
addStyles(styles_default20, "better-journal");
let enabled = {
styles: getSetting("better-journal.styles", !0),
list: getSetting("better-journal.list", !1),
icons: getSetting("better-journal.icons"),
iconsMinimal: getSetting("better-journal.icons-minimal"),
replacements: getSetting("better-journal.replacements", !0),
goldAndPoints: getSetting("better-journal.gold-and-points", !0),
itemColors: getSetting("better-journal.item-colors", !0),
history: getSetting("better-journal.journal-history", !0),
tags: getSetting("better-journal.journal-tags", !1)
}, modules2 = [
{ enabled: enabled.styles, load: journal_styles_default },
{ enabled: enabled.list, load: () => {
journal_list_default(), (enabled.icons || enabled.iconsMinimal) && addStyles(list_and_icons_default, "better-journal-list-and-icons");
} },
{ enabled: enabled.icons, load: () => {
journal_icons_default(), journal_icons_minimal_default();
} },
{ enabled: enabled.iconsMinimal, load: () => {
enabled.icons || journal_icons_minimal_default();
} },
{ enabled: enabled.replacements, load: journal_replacements_default },
{ enabled: enabled.goldAndPoints, load: journal_gold_and_points_default },
{ enabled: enabled.itemColors, load: journal_item_colors_default2 },
{ enabled: enabled.history, load: journal_history_default },
{ enabled: enabled.tags, load: journal_tags_default }
];
for (let module of modules2)
module.enabled && module.load();
}), better_journal_default = {
id: "better-journal",
name: "Better Journal",
type: "better",
default: !0,
description: "Modify the journal text, layout, and styling.",
load: init14,
settings: settings_default6
};
}
});
var styles_default21, init_styles22 = __esm({
"src/modules/better-item-view/modules/hover-item/styles.css"() {
styles_default21 = `#item-data-wrapper{position:absolute;z-index:999999;box-sizing:border-box;display:block;width:300px;height:100px;background:linear-gradient(#decebb 5%,#f0eddf 50%);border:1px solid #9a8872;border-radius:10px;box-shadow:0 1px 5px -1px #5e5e5e}.item-data-wrapper-loading{display:flex;align-items:flex-end;justify-content:center;height:90%;background-image:url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif);background-repeat:no-repeat;background-position:center;background-size:55px}#item-data-wrapper .item-data{display:grid;grid-template-columns:90px 1fr;gap:10px;align-items:center;height:95px}#item-data-wrapper .item-image{height:80px;margin-left:10px;background-color:#fff;border:1px solid #25211e;border-radius:5px}#item-data-wrapper .item-text{display:flex;flex-direction:column;justify-content:space-around;height:80px;margin-right:10px}#item-data-wrapper .item-name{width:160px;font-size:12px;font-weight:900}
`;
}
});
var fetchItemData, makeItemMarkup, makeLoadingMarkup, itemDataWrapper, main3, hover_item_default, init_hover_item = __esm({
"src/modules/better-item-view/modules/hover-item/index.js"() {
init_utils2();
init_styles22();
fetchItemData = (itemId) => __async(void 0, null, function* () {
var _a;
let itemDataRequest = yield doRequest("managers/ajax/users/userInventory.php", {
action: "get_items",
"item_types[]": itemId
});
return (_a = itemDataRequest == null ? void 0 : itemDataRequest.items) == null ? void 0 : _a[0];
}), makeItemMarkup = (item) => {
if (!item)
return !1;
let itemData = makeElement("div", "item-data"), itemImage = makeElement("img", "item-image");
itemImage.src = item.thumbnail, itemData.append(itemImage);
let itemText = makeElement("div", "item-text");
makeElement("div", "item-name", item.name, itemText);
let quantity = makeElement("div", "item-quanity");
makeElement("span", "", "You own: ", quantity), makeElement("span", "", item.quantity.toLocaleString(), quantity), itemText.append(quantity);
let description = makeElement("div", "item-description"), firstSentence = item.description.match(/[^!.?]+[!.?]/);
return makeElement("div", "item-description-text", firstSentence ? firstSentence[0] : item.description, description), itemData.append(itemText), itemData;
}, makeLoadingMarkup = (e) => {
itemDataWrapper && itemDataWrapper.remove(), itemDataWrapper = makeElement("div", "item-data-wrapper"), itemDataWrapper.id = "item-data-wrapper", itemDataWrapper.innerHTML = '<span class="item-data-wrapper-loading">Loading...</span>', document.body.append(itemDataWrapper);
let rect = e.target.getBoundingClientRect(), top = rect.top + window.scrollY, left = rect.left + window.scrollX, tooltipTop = top - itemDataWrapper.offsetHeight - 10;
return tooltipTop < 0 && (tooltipTop = top + rect.height + 10), itemDataWrapper.style.top = `${tooltipTop}px`, itemDataWrapper.style.left = `${left - itemDataWrapper.offsetWidth / 2 + rect.width / 2}px`, itemDataWrapper;
}, main3 = () => {
let itemLinks = document.querySelectorAll('.journal .content .entry .journaltext a[onclick*="ItemView.show"]');
itemLinks && itemLinks.forEach((link) => {
let itemType = link.getAttribute("onclick").match(/'([^']+)'/)[1];
link.setAttribute("onclick", `hg.views.ItemView.show('${itemType}'); return false;`);
let timeoutId = null, isMouseOver = !1;
link.addEventListener("mouseenter", (e) => __async(void 0, null, function* () {
isMouseOver = !0, timeoutId && clearTimeout(timeoutId), timeoutId = setTimeout(() => __async(void 0, null, function* () {
if (!isMouseOver)
return;
makeLoadingMarkup(e);
let itemData = yield fetchItemData(itemType);
if (itemData && itemDataWrapper && isMouseOver) {
let markup = makeItemMarkup(itemData);
itemDataWrapper.innerHTML = markup.outerHTML;
}
}), 500);
})), link.addEventListener("mouseleave", () => {
isMouseOver = !1, timeoutId && clearTimeout(timeoutId), itemDataWrapper && itemDataWrapper.remove();
});
});
}, hover_item_default = () => {
addStyles(styles_default21, "better-item-view-hover-item"), setTimeout(main3, 500), onRequest("*", () => {
setTimeout(main3, 1e3);
});
};
}
});
var settings_default7, init_settings8 = __esm({
"src/modules/better-item-view/settings/index.js"() {
settings_default7 = () => __async(void 0, null, function* () {
return [
{
id: "better-item-view.show-drop-rates",
title: "Show drop rates",
default: !0
},
{
id: "better-item-view.show-item-hover",
title: "Show item details on hover (in journal)",
default: !0
}
];
});
}
});
var styles_default22, init_styles23 = __esm({
"src/modules/better-item-view/styles.css"() {
styles_default22 = `.itemView-titleContainer{height:26px}.itemView-header-name{display:flex;align-items:center;justify-content:space-between}.mh-item-links{display:flex;justify-content:flex-end;margin-right:-10px}.mh-item-links a{margin-right:5px}.itemView-header-name .mh-item-links span{display:inline-block;font-size:11px;font-weight:400}.mouseview-has-mhct .mouse-ar-wrapper{display:grid;grid-template-columns:1fr 1fr 50px;gap:10px;place-items:center stretch;width:auto;padding:5px;font-size:12px}.itemViewPopup .mouseview-has-mhct .mouse-ar-wrapper{padding:5px 7px 5px 5px}.mouseview-has-mhct .has-stages .mouse-ar-wrapper{grid-template-columns:1fr 1fr 1fr 50px}.itemView-has-mhct .mouse-ar-wrapper div{padding:0 2px}.itemView-has-mhct .mice-ar-wrapper{margin-right:10px}.mouse-ar-wrapper .stage{font-size:10px}.mouse-ar-wrapper .cheese{font-size:11px}.itemView-has-mhct .ar-header{display:flex;align-items:center;justify-content:space-between;height:26px;padding-bottom:2px;margin-top:10px;margin-bottom:10px;font-size:12px;font-weight:900;border-bottom:1px solid #ccc}.itemView-has-mhct .ar-link{font-size:9px}.itemView-has-mhct .rate{text-align:right}.itemView-has-mhct .mouse-ar-wrapper:nth-child(odd){background-color:#e7e7e7}.itemView-has-mhct .itemView-description{font-weight:500;line-height:19px}.itemView-action.crafting_item b{display:none}.itemView-action.crafting_item:before{content:"This can be used to craft other items!"}.itemViewContainer.map_piece .itemView-action-text.map_piece,.itemViewContainer.base .itemView-action-text.base,.itemViewContainer.weapon .itemView-actio-textn.weapon,.itemViewContainer.bait .itemView-action-text.bait,.itemViewContainer.trinket .itemView-action-text.trinket,.itemViewContainer.potion .itemView-action-text.potion,.itemViewContainer.readiness_item .itemView-action-text.readiness_item,.itemViewContainer.convertible .itemView-action-text.convertible,.itemViewContainer.torn_page .itemView-action-text.torn_page,.itemViewContainer.crafting_item .itemView-action-text.crafting_item,.itemViewContainer.collectible .itemView-action-text.collectible,.itemViewContainer.message_item .itemView-action-text.message_item,.itemViewContainer.bonus_loot .itemView-action-text.bonus_loot,.itemViewContainer.stat .itemView-action-text.stat,.itemViewContainer.quest .itemView-action-text.quest,.itemViewContainer.skin .itemView-action-text.skin{display:none!important}.itemViewContainer .shopCustomization .itemViewStatBlock-stat{display:flex;flex-direction:column;align-items:center}.itemViewContainer .itemViewStatBlock-stat{display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.itemViewContainer .itemViewStatBlock-stat-value{flex:1;text-align:left}.itemViewContainer .itemViewStatBlock-stat.cheeseEffect{font-size:9px;text-align:center}.itemViewContainer .itemViewStatBlock.trinket .itemViewStatBlock-padding{display:flex;flex-direction:column;align-items:stretch;width:100px}.itemViewContainer .itemViewStatBlock.trinket{width:100px;font-size:13px}#overlayPopup.itemViewPopup #jsDialogClose{right:6px;z-index:1;border-top-right-radius:10px}#overlayPopup.itemViewPopup .itemView-header-classification{right:25px}.itemView-actionContainer{display:flex;flex-wrap:wrap;gap:10px}.itemView-action{border-top:none}.itemViewContainer.potion .inventoryPage-item-recipeOptions li{width:365px}.itemView-character-image{width:auto;height:84px;margin-top:-15px;margin-left:-9px}.itemView-character-name{left:-11px;width:75px;font-size:15px}.itemView-padding{margin-left:70px}.itemView-thumbnail{width:200px;height:200px;margin-left:-15px;background-repeat:no-repeat;background-position:center;background-size:contain}.itemView-thumbnail.large{background-size:100%}input.itemView-action-convert-quantity{width:50px}.itemViewPopup .itemViewStatBlock-padding{flex-direction:column}.itemView-character .itemView-character-image{transition:all .4s ease-out;transform-origin:bottom}.itemView-character:hover .itemView-character-image{transform:scale(1.2) rotate(-10deg) translate(5px)}.itemView-header-classification{visibility:hidden}.itemView-header-classification span{visibility:visible}.itemViewStatBlock-stat{display:flex;align-items:center}.itemView-sidebar-checklistItem:nth-child(1),.itemView-sidebar-checklistItem:nth-child(2),.itemView-sidebar-checklistItem.checked{display:block}.itemView-sidebar-checklistItem{background:url(https://www.mousehuntgame.com/images/icons/bad_idea.png) 1px 4px no-repeat;background-size:14px;opacity:.8}.itemView-partsContainer{display:flex;flex-direction:column;align-items:stretch;padding-top:15px;padding-bottom:10px;margin-top:15px;border-top:1px solid #666}.convertibleOpenView-item-imageContainer{margin-right:auto}.convertibleOpenView-itemContainer.num_items_1 .convertibleOpenView-item{gap:20px;width:100%}.itemView-obtainHint{margin-left:190px}.itemViewContainer iframe.socialLink-facebookLike{margin-right:5px}.convertibleOpenView-itemContainer{padding-top:10px;margin-top:0}.itemViewContainer.skin .itemView-thumbnail{background-size:cover}.inventoryPage-item.trinket .itemViewStatBlock.trinket .itemViewStatBlock-padding{overflow:hidden;border-radius:3px}.inventoryPage-item.trinket .itemViewStatBlock.trinket{border-top:none}.inventoryPage-item.trinket .itemViewStatBlock-stat{border-top:1px solid #ccc;border-bottom:none}.itemView-action-convertForm{position:relative;padding-bottom:20px}.mh-improved-item-open-controls{position:absolute;top:30px;right:0;left:0;display:flex;flex:1 1 100%;flex-flow:row wrap;gap:5px;align-items:center;justify-content:center;margin-top:7px}.mh-improved-airship-part-container{position:relative;background-image:none!important}.mh-improved-airship-part{position:absolute;inset:0;background-repeat:no-repeat;background-size:100%}.mh-improved-airship-part.balloon{background-image:url(https://www.mousehuntgame.com/images/ui/hud/floating_islands/airship/balloon/silhouette.png)}.mh-improved-airship-part.sail{background-image:url(https://www.mousehuntgame.com/images/ui/hud/floating_islands/airship/sail/silhouette.png)}.mh-improved-airship-part.hull{background-image:url(https://www.mousehuntgame.com/images/ui/hud/floating_islands/airship/hull/silhouette.png)}.mh-improved-airship-part-container .mh-improved-airship-part.silhouette{transition:opacity .3s}.mh-improved-airship-part-container:hover .mh-improved-airship-part.silhouette{opacity:.1}.mh-improved-scroll-to-map{margin-top:10px}.mh-improved-scroll-to-map strong{font-weight:900}ul.mh-improved-scroll-to-map-multiple-list{display:flex;flex-direction:column;align-items:flex-start;padding-top:10px;padding-bottom:10px;padding-left:20px;list-style-type:disc;background-color:#eee;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.mh-improved-scroll-to-map-multiple{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding-top:5px;padding-bottom:2px;padding-left:5px;margin-top:10px;background-color:#eee;border-top-left-radius:5px;border-top-right-radius:5px}.mh-improved-scroll-to-map-title-text{font-size:12px;border-bottom:1px solid #ccc}.mh-improved-scroll-to-map .PreferencesPage__blackTooltip.mh-improved-tooltip{margin-right:5px}.mh-improved-scroll-to-map-multiple-list li{line-height:1.5}
`;
}
});
var getLinkMarkup, addLinks, items, updateForAirshipParts, addQuantityButtons, showDropRates, maybeShowMiceOnMapLink, updateDescription, updateItemView, shortenRecipeGoldHint, init15, better_item_view_default, init_better_item_view = __esm({
"src/modules/better-item-view/index.js"() {
init_utils2();
init_hover_item();
init_settings8();
init_styles23();
getLinkMarkup = (name, id) => makeLink("MHCT", `https://api.mouse.rip/mhct-redirect-item/${id}`, !0) + makeLink("Wiki", `https://mhwiki.hitgrab.com/wiki/index.php/${encodeURIComponent(name.replaceAll(" ", "_"))}`, !0), addLinks = (itemId) => {
let title = document.querySelector(".itemView-header-name");
if (!title)
return;
let currentLinks = document.querySelector(".mh-item-links");
currentLinks && currentLinks.remove();
let div = document.createElement("div");
div.classList.add("mh-item-links"), div.innerHTML = getLinkMarkup(title.innerText, itemId), title.append(div);
let values = document.querySelector(".mouseView-values"), desc = document.querySelector(".mouseView-descriptionContainer");
values && desc && desc.insertBefore(values, desc.firstChild);
}, updateForAirshipParts = (itemId, itemView) => __async(void 0, null, function* () {
items || (items = yield getData("items"));
let item = items.find((i) => i.id === Number.parseInt(itemId, 10));
if (!item || !item.is_airship_part || !item.airship_part_type)
return;
let thumbnail = itemView.querySelector(".itemView-thumbnail");
if (!thumbnail)
return;
thumbnail.classList.add("mh-improved-airship-part-container");
let els = {
hull: makeElement("div", ["mh-improved-airship-part", "hull", "silhouette"]),
sail: makeElement("div", ["mh-improved-airship-part", "sail", "silhouette"]),
balloon: makeElement("div", ["mh-improved-airship-part", "balloon", "silhouette"])
};
els[item.airship_part_type].classList.remove("silhouette"), els[item.airship_part_type].style.backgroundImage = `url(${item.images.large})`, thumbnail.append(els.hull), thumbnail.append(els.sail), thumbnail.append(els.balloon);
}), addQuantityButtons = (itemView) => {
let quantityForm = itemView.querySelector(".itemView-action-convertForm");
if (!quantityForm)
return;
let input = quantityForm.querySelector(".itemView-action-convert-quantity");
if (!input)
return;
let quantity = quantityForm.innerText.split("/");
if (!quantity || quantity.length !== 2)
return;
let maxQty = Number.parseInt(quantity[1].trim(), 10), openControls = makeElement("div", ["mh-improved-item-open-controls"]);
makeMathButtons([1, 3, 5, 10], {
appendTo: openControls,
input,
maxQty,
classNames: ["mh-improved-item-qty", "tiny", "lightBlue"]
});
let openMaxButton = makeElement("a", ["mousehuntActionButton", "lightBlue", "tiny", "mh-improved-shop-buy-max"]), openMaxButtonText = makeElement("span", "", "Max");
openMaxButton.append(openMaxButtonText);
let hasMaxed = !1;
openMaxButton.addEventListener("click", () => {
hasMaxed ? (input.value = 0, openMaxButtonText.innerText = "Max") : (input.value = maxQty, openMaxButtonText.innerText = "Reset"), hasMaxed = !hasMaxed;
}), openControls.append(openMaxButton), quantityForm.append(openControls);
}, showDropRates = (itemId, itemView) => __async(void 0, null, function* () {
let id = Number.parseInt(itemId, 10);
if ([
2473,
// Mina's gift
823,
// party charm
803,
// chrome charm
420,
// king's credits
1980,
// king's keys
585,
// scrambles
412,
// sb supply pack
2541,
// RLC
2863
// Chrome bits.
].includes(id))
return;
let mhctJson = yield getArForMouse(itemId, "item");
if (!mhctJson || mhctJson === void 0)
return;
itemView.classList.add("mouseview-has-mhct");
let container = itemView.querySelector(".itemView-padding");
if (!container)
return;
let arWrapper = makeElement("div", "ar-wrapper"), title = makeElement("div", "ar-header"), titleText = makeElement("div", "ar-title", "Drop Rates", title);
makeTooltip({
appendTo: titleText,
text: 'The best location and bait, according to data gathered by <a href="https://mhct.win/" target="_blank" rel="noopener noreferrer">MHCT</a>.'
});
let link = makeElement("a", "ar-link", "View on MHCT \u2192");
link.href = `https://api.mouse.rip/mhct-redirect-item/${itemId}`, link.target = "_mhct", title.append(link), arWrapper.append(title);
let itemsArWrapper = makeElement("div", "item-ar-wrapper"), hasStages = mhctJson.some((itemAr) => itemAr.stage);
hasStages && itemsArWrapper.classList.add("has-stages"), mhctJson = mhctJson.filter((itemAr) => Number.parseInt(itemAr.drop_pct, 10) > 0).slice(0, 10), mhctJson.forEach((itemAr) => {
let dropPercent = Number.parseInt(itemAr.drop_pct, 10).toFixed(2);
if (dropPercent !== "0.00") {
let itemArWrapper = makeElement("div", "mouse-ar-wrapper");
makeElement("div", "location", itemAr.location, itemArWrapper), hasStages && makeElement("div", "stage", itemAr.stage, itemArWrapper), makeElement("div", "cheese", itemAr.cheese, itemArWrapper), makeElement("div", "rate", `${dropPercent}%`, itemArWrapper), itemsArWrapper.append(itemArWrapper);
}
}), mhctJson.length > 0 && (arWrapper.append(itemsArWrapper), container.append(arWrapper));
}), maybeShowMiceOnMapLink = (itemId, itemView) => __async(void 0, null, function* () {
var _a;
items || (items = yield getData("items"));
let item = items.find((i) => i.id === Number.parseInt(itemId, 10));
if (!(item && (item == null ? void 0 : item.classification) === "convertible" && ((_a = item == null ? void 0 : item.tags) != null && _a.includes("scroll_case"))))
return;
let scrollsToMaps = yield getData("scrolls-to-maps");
if (!scrollsToMaps || !scrollsToMaps[item.type] || !scrollsToMaps[item.type].length)
return;
let itemViewDescription = itemView.querySelector(".itemView-description");
if (!itemViewDescription)
return;
let mapLink = makeElement("div", "mh-improved-scroll-to-map");
if (scrollsToMaps[item.type].length === 1) {
let map = scrollsToMaps[item.type][0];
if (!map.name || !map.mhctId) {
mapLink.remove();
return;
}
}
let title = makeElement("div", "mh-improved-scroll-to-map-multiple");
makeElement("strong", "mh-improved-scroll-to-map-title-text", "Maps for this scroll case:", title);
let tooltip = makeElement("div", ["PreferencesPage__blackTooltip", "mh-improved-tooltip"]);
makeElement("span", "PreferencesPage__blackTooltipText", "Click the map to view the possible mice on MHCT.", tooltip), title.append(tooltip), mapLink.append(title);
let mapList = makeElement("ul", "mh-improved-scroll-to-map-multiple-list"), hasShownMaps = !1;
if (scrollsToMaps[item.type].forEach((map) => {
if (!map.name || !map.mhctId)
return;
hasShownMaps = !0;
let listItem = makeElement("li", "mh-improved-scroll-to-map-multiple-list-item"), link = makeElement("a", "mh-improved-scroll-to-map-link", map.name);
link.href = `https://www.mhct.win/mapper.php?item=${map.mhctId}`, link.target = "_mhct", listItem.append(link), mapList.append(listItem);
}), !hasShownMaps) {
mapLink.remove();
return;
}
mapLink.append(mapList), itemViewDescription.append(mapLink);
}), updateDescription = (itemView) => {
let toTruncate = [
["Upon opening this scroll case and completing the Gilded", "<b>A great way to share the Lucky Golden Shield with friends!</b>"],
["Upon opening this case and completing the Chrome Treasure Map", "<b>\u2022 Chrome Journal Theme Scrap</b><br>"]
], description = itemView.querySelector(".itemView-description");
if (!description)
return;
let text = description.innerHTML;
toTruncate.forEach(([start2, end]) => {
let startIndex = text.indexOf(start2), endIndex = text.indexOf(end);
startIndex !== -1 && endIndex !== -1 && endIndex > startIndex && (text = text.slice(0, Math.max(0, startIndex)) + text.slice(Math.max(0, endIndex + end.length)));
}), description.innerHTML = text;
}, updateItemView = () => __async(void 0, null, function* () {
let itemView = document.querySelector(".itemViewContainer");
if (!itemView)
return;
let itemId = itemView.getAttribute("data-item-id");
if (!itemId)
return;
let sidebar = document.querySelector(".itemView-sidebar");
if (sidebar) {
let crafting = document.querySelector(".itemView-action.crafting_item");
crafting && sidebar.append(crafting);
let smashing = document.querySelector(".itemView-partsContainer");
if (smashing && (sidebar.append(smashing), !smashing.getAttribute("data-has-changed-title"))) {
let smashingTitle = smashing.querySelector("b");
smashingTitle && (smashingTitle.innerText = "Hunter's Hammer to get:", smashing.setAttribute("data-has-changed-title", "true"), smashing.innerHtml = smashing.innerHTML.replace("If you smash it, you'll get:", ""));
}
}
let obtainHint = document.querySelector(".itemView-obtainHint"), description = document.querySelector(".itemView-description");
if (obtainHint && description && description.after(obtainHint), itemView.classList.contains("base") || itemView.classList.contains("weapon") || itemView.classList.contains("skin")) {
let thumbnailContainer = itemView.querySelector(".itemView-thumbnailContainer");
if (thumbnailContainer) {
let thumbnail = thumbnailContainer.querySelector(".itemView-thumbnail"), fullSize = thumbnailContainer.querySelector("a");
thumbnail && fullSize && fullSize.getAttribute("data-image") && (thumbnail.style.backgroundImage = `url(${fullSize.getAttribute("data-image")})`, thumbnail.style.backgroundSize = "contain", itemView.classList.contains("base") && (thumbnail.style.backgroundPositionY = "-100px"));
}
}
updateDescription(itemView), addLinks(itemId), addQuantityButtons(itemView), updateForAirshipParts(itemId, itemView), getSetting("better-item-view.show-drop-rates", !0) && showDropRates(itemId, itemView), yield maybeShowMiceOnMapLink(itemId, itemView);
}), shortenRecipeGoldHint = () => {
["layout", "content", "actions"].forEach((layout) => {
onRender({
group: "ItemView",
layout,
after: !0,
callback: (data, results) => results.replaceAll("gold per piece", "gold each").replaceAll("One potion converts ", "")
});
});
}, init15 = () => __async(void 0, null, function* () {
addStyles(styles_default22, "better-item-view"), getSetting("better-item-view.show-item-hover", !0) && hover_item_default(), shortenRecipeGoldHint(), onNavigation(shortenRecipeGoldHint, {
page: "inventory",
tab: "potions"
}), onOverlayChange({ item: { show: updateItemView } });
}), better_item_view_default = {
id: "better-item-view",
name: "Better Items",
type: "better",
default: !0,
description: "Update the styles, show drop rates, and provide links to MHCT and MH Wiki.",
load: init15,
settings: settings_default7
};
}
});
var styles_default23, init_styles24 = __esm({
"src/modules/experiments/modules/use-pb-as-skin-preview-base/styles.css"() {
styles_default23 = `.itembrowser-skin-image-wrapper{background:url(https://www.mousehuntgame.com/images/items/bases/trap_small/ff3bf3e54a4acf164085b3240910d0ef.png)}
`;
}
});
var styles_trap_background_default, init_styles_trap_background = __esm({
"src/modules/experiments/modules/use-pb-as-skin-preview-base/styles-trap-background.css"() {
styles_trap_background_default = `.itembrowser-skin-image-wrapper{background:url(https://www.mousehuntgame.com/images/items/bases/trap_small/ff3bf3e54a4acf164085b3240910d0ef.png),linear-gradient(0deg,#eee2b4,#b1e0d1)}
`;
}
});
var init16, use_pb_as_skin_preview_base_default, init_use_pb_as_skin_preview_base = __esm({
"src/modules/experiments/modules/use-pb-as-skin-preview-base/index.js"() {
init_utils2();
init_styles24();
init_styles_trap_background();
init16 = () => __async(void 0, null, function* () {
addStyles(getSetting("experiments.trap-background", !1) ? styles_trap_background_default : styles_default23, "use-pb-as-skin-preview-base");
}), use_pb_as_skin_preview_base_default = {
id: "experiments.use-pb-as-skin-preview-base",
name: "Use Prestige Base in skin previews",
load: init16
};
}
});
// dist/data/trap-special-effects.json
var trap_special_effects_default, init_trap_special_effects = __esm({
"dist/data/trap-special-effects.json"() {
trap_special_effects_default = { all: ["alchemists_cookbook_base", "ancient_booster_base", "black_widow_base", "chocolate_bar_base", "competitors_bronze_base", "challengers_silver_base", "champions_gold_base", "condemned_base", "cupcake_birthday_base", "cupcake_2016_birthday_base", "cupcake_2017_birthday_base", "denture_base", "elixir_exchanger_base", "furoma_rift_energy_base", "furoma_rift_energy_upgraded_base", "gift_of_the_day_base", "seasonal_gift_of_the_day_base", "icy_melty_base", "living_grove_base", "new_years_2024_base", "physical_enhancement_base", "polluted_base", "refined_pollutinum_base", "rift_mist_diffuser_base", "skelloton_base", "snow_golem_base", "soiled_base", "spellbook_base", "upgraded_denture_base", "valour_rift_prestige_base", "empyrean_jewel_base", "royal_ruby_refractor_base", "sorcerers_sapphire_refractor_base", "admirals_galleon_weapon", "anniversary_acronym_weapon", "anniversary_ambush_weapon", "anniversary_ancient_box_trap_weapon", "anniversary_mouse_deathbot_weapon", "anniversary_reaper_perch_weapon", "biomolecular_reatomizer_weapon", "boiling_cauldron_weapon", "chrome_drillbot_weapon", "chrono_gwh_weapon", "digby_drillbot_weapon", "glacier_gatler_weapon", "haunting_house_weapon", "holiday_express_weapon", "ice_blaster_weapon", "pirate_sleigh_weapon", "rift_glacier_gatler_weapon", "bday_2012_weapon", "bday_candle_kaboom_weapon", "bubbles_party_crasher_weapon", "cupcake_bot_weapon", "forgotten_art_of_dance_weapon", "partybot_weapon", "queso_factory_weapon", "sprinkley_cupcake_surprise_weapon", "ultra_megamouser_mechabot_weapon", "wacky_inflatable_party_people_weapon", "brain_extractor_upgrade_weapon", "brain_extractor_weapon", "cackle_lantern_weapon", "candy_crusher_weapon", "cemetery_gate_grappler_weapon", "halloween_haunted_shipwreck_weapon", "hween_2011_upgraded_weapon", "hween_2011_weapon", "pumpkin_pummeler_weapon", "sandcastle_shard_weapon", "terrifying_spider_weapon", "christmas_cactus_weapon", "christmas_cracker_trap_weapon", "christmas_crystalabra_weapon", "clockapult_of_winter_past_weapon", "double_diamond_toboggan_adventure_weapon", "explosive_toboggan_ride_weapon", "gingerbread_house_surprise_weapon", "goldfrost_crossbow_weapon", "great_winter_event_horizon_weapon", "harrowing_holiday_harp_weapon", "nutcracker_winter_weapon", "snow_barrage_weapon", "snowglobe_trap_weapon", "winter_hunt_2012_weapon", "xmas_2016_forgotten_weapon", "xmas_2016_hydro_weapon_weapon", "derelict_airship_weapon"], meadow: [], town_of_gnawnia: [], windmill: [], harbour: [], mountain: [], kings_arms: [], tournament_hall: [], kings_gauntlet: ["ancient_gauntlet_weapon"], calm_clearing: [], great_gnarled_tree: [], lagoon: [], laboratory: [], mousoleum: ["creepy_coffin_weapon"], town_of_digby: [], bazaar: [], pollution_outbreak: ["washboard_base", "super_scum_scrubber_weapon"], training_grounds: [], dojo: ["furoma_base"], meditation_room: [], pinnacle_chamber: [], catacombs: [], forbidden_grove: ["runic_base"], acolyte_realm: ["runic_base"], cape_clawed: ["tribal_kaboom_base"], elub_shore: ["tiki_base", "tribal_base", "vegetation_base", "tribal_kaboom_base"], nerg_plains: ["tiki_base", "tribal_base", "vegetation_base", "tribal_kaboom_base"], derr_dunes: ["tiki_base", "tribal_base", "vegetation_base", "tribal_kaboom_base"], jungle_of_dread: ["tribal_kaboom_base", "cackle_lantern_weapon", "dreaded_totem_weapon"], dracano: ["tribal_kaboom_base"], balacks_cove: ["nutcracker_winter_weapon"], claw_shot_city: ["claw_shot_base", "slac_spring_weapon", "slac_ii_sling_weapon"], train_station: ["supply_grabber_weapon", "bandit_deflector_weapon", "engine_doubler_weapon"], fort_rox: ["electromagnet_meteorite_base", "battering_ram_buster_weapon"], desert_warpath: ["desert_heater_base", "warpath_thrasher_weapon", "warden_slayer_weapon"], desert_city: ["desert_heater_base"], desert_oasis: ["aurora_base", "hothouse_base", "living_base", "desert_heater_base"], lost_city: ["aurora_base", "curse_breaker_base", "hothouse_base", "living_base", "desert_heater_base"], sand_dunes: ["aurora_base", "hothouse_base", "living_base", "smelly_sodium_base", "desert_heater_base"], ss_huntington_ii: [], seasonal_garden: ["seasonal_base", "sandcastle_shard_weapon", "zugzwang_ultimate_move_weapon", "cheslas_revenge_weapon"], zugzwang_tower: ["blackstone_pass_weapon", "mystic_low_weapon", "obvious_ambush_weapon", "technic_low_weapon", "zugzwang_ultimate_move_weapon"], zugzwang_library: [], slushy_shoreline: ["steam_laser_mk_i_weapon", "steam_laser_mk_ii_weapon", "steam_laser_mk_iii_weapon"], iceberg: ["deep_freeze_base", "hearthstone_base", "magnet_base", "remote_detonator_base", "spiked_base", "iceberg_boiler_base", "ultimate_iceberg_base", "steam_laser_mk_i_weapon", "steam_laser_mk_ii_weapon", "steam_laser_mk_iii_weapon"], sunken_city: ["depth_charge_base", "bubbles_party_crasher_weapon"], queso_river: ["queso_canyon_base", "queso_factory_weapon"], queso_plains: ["queso_cannonstorm_base"], queso_quarry: ["queso_cannonstorm_base"], queso_geyser: ["queso_cannonstorm_base"], fungal_cavern: ["gemology_base", "living_grove_base", "crystal_mineral_crusher_weapon"], labyrinth: ["compass_magnet_base", "labyrinth_base", "minotaur_base", "treasure_gwh_base"], ancient_city: ["thief_base"], moussu_picchu: ["forecaster_base", "storm_wrought_ballista_weapon", "chrome_storm_wrought_ballista_weapon", "geyser_draconic_weapon"], foreword_farm: ["folklore_printing_press_base", "naughty_list_printing_press_base"], prologue_pond: ["folklore_printing_press_base", "naughty_list_printing_press_base"], table_of_contents: ["folklore_printing_press_base", "naughty_list_printing_press_base"], bountiful_beanstalk: ["folklore_printing_press_base", "naughty_list_printing_press_base"], school_of_sorcery: ["folklore_printing_press_base", "naughty_list_printing_press_base"], rift_burroughs: ["mist_meter_regulator_base", "christmas_crystalabra_weapon"], rift_whisker_woods: ["dark_chocolate_bunny_weapon", "christmas_crystalabra_weapon"], rift_furoma: ["furoma_base", "christmas_crystalabra_weapon"], rift_gnawnia: ["christmas_crystalabra_weapon"], rift_bristle_woods: ["christmas_crystalabra_weapon"], rift_valour: ["christmas_crystalabra_weapon"] };
}
});
var addSpecialEffectsStyles, init17, trap_selector_special_effects_default, init_trap_selector_special_effects = __esm({
"src/modules/experiments/modules/trap-selector-special-effects/index.js"() {
init_utils2();
init_trap_special_effects();
addSpecialEffectsStyles = () => __async(void 0, null, function* () {
let styles8 = [];
trap_special_effects_default.all.forEach((item) => {
styles8.push(`.campPage-trap-itemBrowser-item.${item}`);
});
let currentLocation = getCurrentLocation2();
trap_special_effects_default[currentLocation] && trap_special_effects_default[currentLocation].forEach((item) => {
styles8.push(`.mh-improved-location-${currentLocation} .campPage-trap-itemBrowser-item.${item}`);
}), addModuleStyles(`${styles8.join(" .campPage-trap-itemBrowser-item-name::after,")}
.mh-improved-special-effects-highlight {
position: absolute;
top: 4px;
right: 3px;
display: inline-block;
width: 10px;
height: 10px;
content: "";
background-color: #48b0a9;
border-radius: 50%;
}`, "mh-improved-trap-selector-special-effects", !0);
});
hasAddedSpecialEffectsStyles = !1;
init17 = () => __async(void 0, null, function* () {
onEvent("camp_page_toggle_blueprint", () => {
hasAddedSpecialEffectsStyles || (addSpecialEffectsStyles(), hasAddedSpecialEffectsStyles = !0);
}), onTravel(() => {
hasAddedSpecialEffectsStyles = !1;
});
}), trap_selector_special_effects_default = {
id: "trap-selector-special-effects",
name: "Add an indicator to items in the trap selector that have special effects",
description: "",
load: init17
};
}
});
var raffle_default, init_raffle = __esm({
"src/modules/experiments/modules/raffle/raffle.css"() {
raffle_default = `.mh-return-raffles.message{position:sticky;top:0;right:0;left:0;z-index:10;background-color:#f9f9f9}.notificationMessageList .tab{scroll-behavior:smooth}.mh-return-raffles.message .actions{display:flex;gap:10px;align-items:center;justify-content:flex-start;float:none}.notificationMessageList .message.done{background-color:#bffdd2}.notificationMessageList .message.skipped{background-color:#dfdfdf}
`;
}
});
var getBallotsToSend, getSavedSentBallots, getSavedSentBallot, saveSentBallot, sendBallot, returnRaffles, _inboxOpen, replaceInboxMethods, init18, raffle_default2, init_raffle2 = __esm({
"src/modules/experiments/modules/raffle/index.js"() {
init_utils2();
init_raffle();
getBallotsToSend = () => {
let ballotsToSend = [], ballots = document.querySelectorAll(".message.notification.ballot");
return ballots.length && ballots.forEach((ballot) => {
if (ballot.classList.contains("done") || ballot.classList.contains("skipped"))
return;
let name = ballot.querySelector(".messageText a"), action = ballot.querySelector(".sendBallot");
!action || !name || ballotsToSend.push({
id: action.getAttribute("data-sender"),
name: name.innerText ? name.innerText.trim() : "",
element: ballot
});
}), ballotsToSend;
}, getSavedSentBallots = () => sessionGet("sent-ballots", []), getSavedSentBallot = (id) => getSavedSentBallots().includes(id), saveSentBallot = (id) => {
let savedSentBallots = getSavedSentBallots();
savedSentBallots.push(id), sessionSet("sent-ballots", savedSentBallots);
}, sendBallot = (ballot) => __async(void 0, null, function* () {
var _a;
debuglog("feature-flags-raffle", `Returning ballot for ${ballot.name} (${ballot.id})\u2026`);
let button = document.querySelector(`.sendBallot[data-sender="${ballot.id}"]`);
if (!button)
return debuglog("feature-flags-raffle", `Could not find button for ${ballot.name} (${ballot.id})`), { status: "error", proceed: !1 };
let buttonParent = button.parentElement.parentElement;
if (buttonParent) {
let id = buttonParent.getAttribute("data-id");
if (id) {
if (getSavedSentBallot(id))
return debuglog("feature-flags-raffle", `Already returned ballot for ${ballot.name} (${ballot.id})`), { status: "skipped", proceed: !0 };
saveSentBallot(id);
}
}
let response;
try {
response = yield doRequest("managers/ajax/users/givefriendballot.php", {
snuid: ballot.id
});
} catch (error) {
return debuglog("feature-flags-raffle", `Error returning ballot for ${ballot.name}: ${error}`), yield sleep(1e3), { status: "error", proceed: !0 };
}
return response != null && response.error && !((_a = response == null ? void 0 : response.error) != null && _a.includes("You have already entered ")) ? (debuglog("feature-flags-raffle", `Error returning ballot for ${ballot.name}: ${response.error}`), { status: "error", proceed: !1 }) : (debuglog("feature-flags-raffle", `Returned ballot for ${ballot.name} (${ballot.id})`), button.classList.add("disabled"), button.setAttribute("disabled", !0), yield sleep(250), { status: "done", proceed: !0 });
}), returnRaffles = () => __async(void 0, null, function* () {
let drawTab = document.querySelector('.notificationMessageList .tab.active[data-tab="daily_draw"]');
if (!drawTab)
return;
let existing = document.querySelector(".mh-return-raffles.message");
existing && existing.remove();
let messageWrapper = makeElement("div", ["mh-return-raffles", "message"]), actionsWrapper = makeElement("div", ["actions"]), returnButton = makeElement("input", ["mh-return-raffles-button", "sendBallot"]);
returnButton.setAttribute("type", "button"), returnButton.setAttribute("value", "Return Raffles");
let statusEl = makeElement("div", ["status"]), isReturning = !1;
returnButton.addEventListener("click", () => __async(void 0, null, function* () {
if (isReturning) {
returnButton.value = "Return Raffles", statusEl.innerText = "Stopped returning ballots.", setTimeout(() => {
statusEl.innerText = "";
}, 1e3), isReturning = !1;
return;
}
isReturning = !0, returnButton.value = "Stop Returning", statusEl.innerText = "Returning ballots\u2026";
let ballotsToSend = getBallotsToSend();
if (!ballotsToSend.length)
return;
debuglog("feature-flags-raffle", `Returning ${ballotsToSend.length} ballots\u2026`, ballotsToSend);
let tab = document.querySelector('.notificationMessageList .tab.active[data-tab="daily_draw"]');
if (tab) {
for (let ballot of ballotsToSend) {
if (!isReturning)
break;
ballot.element.scrollIntoView({
behavior: "smooth",
block: "nearest"
}), statusEl.innerText = `Returning ballot for ${ballot.name}\u2026`, ballot.element.classList.add("hover");
let { status, proceed } = yield sendBallot(ballot, tab);
if (status === "skipped" && (statusEl.innerText = `Already returned ballot for ${ballot.name}!`), ballot.element.classList.remove("hover"), !proceed) {
statusEl.innerText = "Ballots returned!";
break;
}
ballot.element.classList.add(status);
}
isReturning && (isReturning = !1, returnButton.value = "Return Raffles", statusEl.innerText = "Ballots returned!", setTimeout(() => {
statusEl.innerText = "";
}, 1e3));
}
})), actionsWrapper.append(returnButton), actionsWrapper.append(statusEl), messageWrapper.append(actionsWrapper), drawTab.insertBefore(messageWrapper, drawTab.firstChild);
}), replaceInboxMethods = () => {
var _a, _b, _c, _d;
if (typeof messenger == "undefined" || !((_b = (_a = messenger == null ? void 0 : messenger.UI) == null ? void 0 : _a.notification) != null && _b.showTab) || _inboxOpen || (_inboxOpen = messenger.UI.notification.showTab, messenger.UI.notification.showTab = (tab) => {
let toReturn = _inboxOpen(tab);
return tab === "daily_draw" && returnRaffles(), toReturn;
}, !((_d = (_c = messenger == null ? void 0 : messenger.UI) == null ? void 0 : _c.notification) != null && _d.togglePopup)))
return;
let _inboxPopup = messenger.UI.notification.togglePopup;
messenger.UI.notification.togglePopup = (e) => {
let toReturn = _inboxPopup(e);
return onEvent("ajax_response", () => {
setTimeout(() => {
let activeTab = document.querySelector(".notificationHeader .tab.active");
activeTab && activeTab.getAttribute("data-tab") === "daily_draw" && returnRaffles();
}, 100);
}, !0), toReturn;
};
}, init18 = () => __async(void 0, null, function* () {
getSetting("hide-daily-draw", !1) || (addStyles(raffle_default, "feature-flags-raffle"), replaceInboxMethods());
}), raffle_default2 = {
id: "experiments.raffle",
name: "Return Raffles button",
description: "Add a button to return all raffle tickets to the Inbox. Use at your own risk.",
load: init18
};
}
});
var styles_default24, init_styles25 = __esm({
"src/modules/experiments/modules/new-settings-styles-columns/styles.css"() {
styles_default24 = `.mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings.active.two-column{display:grid;grid-template-columns:49% 49%;justify-content:space-between}.two-column.mousehunt-improved-settings .PagePreferences__title{max-width:350px}.two-column.mousehunt-improved-settings .PagePreferences__setting{flex-wrap:wrap}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-design-wrapper .PagePreferences__setting{display:flex;flex-direction:row;align-items:flex-start}.two-column.mousehunt-improved-settings .mh-improved-custom-bg-preview,.two-column.mousehunt-improved-settings .mh-improved-custom-horn-show-horn,.two-column.mousehunt-improved-settings .mh-improved-custom-hud-preview{top:20px;left:10px;font-size:11px}.two-column #mousehunt-improved-settings-design .PagePreferences__settingAction{max-width:200px}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-feature-ultimate-checkmark-show.PagePreferences__subSetting .multi-toggle-row .PagePreferences__settingName{max-width:65px;padding:0;overflow:hidden;line-height:14px;text-overflow:ellipsis;white-space:nowrap}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-feature-ultimate-checkmark-show.PagePreferences__subSetting .multi-toggle-row{gap:0;justify-items:stretch}.two-column.mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__subSetting{margin-left:5px}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList.PagePreferences__subSetting{padding:0 5px;background-color:transparent;border-right:1px solid #e0cfb4;border-radius:0}.two-column.mousehunt-improved-settings .PagePreferences__settingsList-textarea .PagePreferences__setting,.two-column.mousehunt-improved-settings .PagePreferences__settingsList-input .PagePreferences__setting{display:flex;flex-direction:column;gap:0;align-items:stretch;padding:0;margin:0}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-advanced-mh-improved-advanced-settings{position:absolute;top:15px;right:10px}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-feature-quick-send-supplies-items .inputBoxContainer.multiSelect{display:grid;grid-template-columns:1fr 1fr}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-feature-quick-send-supplies-items .multiSelect{width:auto;max-width:140px}.two-column #mousehunt-improved-settings-better-better-gifts-ignore-bad-gifts select.inputBox.multiSelect{max-width:200px}.two-column select.inputBox.multiSelect{max-width:140px;margin:0}.two-column .inputBoxContainer.multiSelect{gap:5px 10px;justify-content:flex-start;margin-top:5px}.two-column #mousehunt-improved-settings-location-hud-wrapper{grid-template-columns:1fr 1fr;padding:10px 0 0;margin:-10px -11px 0;border-left:1px solid #e0cfb4}.two-column #mousehunt-improved-settings-location-hud .PagePreferences__title{border-bottom:1px solid #f2ebde}.two-column.mousehunt-improved-settings .PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .mhui-setting-toggle,.PagePreferences .mousehuntHud-page-tabContent.game_settings.two-column.mousehunt-improved-settings .mhui-setting-toggle,.two-column #mousehunt-improved-settings-feature-quick-send-supplies-items .PagePreferences__settingLabel{display:none}.two-column #mousehunt-improved-settings-better-better-send-supplies-pinned-items .settingRow-action-inputContainer{width:300px}.two-column #mousehunt-improved-settings-advanced-override-styles,.two-column #mousehunt-improved-settings-advanced-override-flags{margin-left:0}.two-column #mousehunt-improved-settings-advanced-override-styles .PagePreferences__settingName,.two-column #mousehunt-improved-settings-advanced-override-flags .PagePreferences__settingName{margin-bottom:10px}.two-column .PagePreferences__settingsList .PagePreferences__subSetting{opacity:.4}.two-column .PagePreferences__settingsList:hover .PagePreferences__subSetting{opacity:1}.two-column .mousehunt-improved-settings .PagePreferences__titleText{padding-bottom:0}.two-column .mousehunt-improved-settings .PagePreferences__settingsList-textarea .PagePreferences__setting,.two-column .mousehunt-improved-settings .PagePreferences__settingsList-input .PagePreferences__setting{gap:5px}.two-column .mousehunt-improved-settings .PagePreferences__settingDescription{display:none}.two-column .mousehunt-improved-settings .PagePreferences__subSetting .PagePreferences__settingName{font-size:11px;line-height:1.5}.two-column #mousehunt-improved-settings-feature-quick-send-supplies-items .PagePreferences__setting{display:flex;flex-direction:column;align-items:flex-end}.two-column #mousehunt-improved-settings-better-better-send-supplies-pinned-items .inputBox.multiSelect{max-width:140px}.two-column #mousehunt-improved-settings-better-better-send-supplies-pinned-items .inputBoxContainer.multiSelect{display:grid;grid-template-columns:1fr 1fr}.two-column .mousehunt-improved-settings .PagePreferences__settingNameText{line-height:1.5}.two-column .mousehunt-improved-settings .mousehunt-improved-settings-design-wrapper .PagePreferences__settingNameText{line-height:1}.two-column #mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList{grid-column:span 2}.two-column #mousehunt-improved-settings-location-hud-wrapper #mousehunt-improved-settings-location-hud-location-huds-enabled-region-seperator,.two-column #mousehunt-improved-settings-location-hud-wrapper #mousehunt-improved-settings-location-hud-location-huds-location-hud-toggle{grid-column:1 / 3}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList.PagePreferences__subSetting:nth-child(4n+3),.two-column.mousehunt-improved-settings #mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList.PagePreferences__subSetting:nth-child(4n+4){background-color:#eee}.two-column #mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingNameText{line-height:1.5}
`;
}
});
var init19, new_settings_styles_columns_default, init_new_settings_styles_columns = __esm({
"src/modules/experiments/modules/new-settings-styles-columns/index.js"() {
init_utils2();
init_styles25();
init19 = () => __async(void 0, null, function* () {
addStyles(styles_default24, "new-settings-styles-columns"), onNavigation(() => __async(void 0, null, function* () {
document.querySelectorAll(".PagePreferences__settingsWrapper > .PagePreferences__settingsList").forEach((setting) => {
setting.addEventListener("click", () => {
setting.classList.toggle("hover");
});
});
}), {
page: "preferences"
});
}), new_settings_styles_columns_default = {
id: "experiments.new-settings-styles-columns",
name: "Settings: Columns",
load: init19
};
}
});
var styles_default25, init_styles26 = __esm({
"src/modules/experiments/modules/square-profile-pics/styles.css"() {
styles_default25 = `.treasureMapView-hunter-image,.treasureMapView-block-content-heading-image,.treasureMapListingsTableView-profilePic{border-radius:3px}.treasureMapView-block-content-heading-image{box-shadow:0 0 1px 1px #999}.treasureMapListingsTableView-owner{margin-top:5px}
`;
}
});
var init20, square_profile_pics_default, init_square_profile_pics = __esm({
"src/modules/experiments/modules/square-profile-pics/index.js"() {
init_utils2();
init_styles26();
init20 = () => __async(void 0, null, function* () {
addStyles(styles_default25, "consistent-profile-pics");
}), square_profile_pics_default = {
id: "experiments.consistent-profile-pics",
name: "Make all profile pictures square",
load: init20
};
}
});
var styles_default26, init_styles27 = __esm({
"src/modules/experiments/modules/troll-mode/styles.css"() {
styles_default26 = `*+*{transition:.3s}*+*+*{filter:hue-rotate(90deg);transform:rotate(.5deg)}*+*+*+*{transform:rotate(-.6deg)}*+*>*{transform:rotate(-.1deg)}*+*+*>*{transform:rotate(.2deg)}div+div+div{filter:hue-rotate(90deg)}*>*>*>*>*>*>*>*>*>*>*{transition:.9s}*>*>*>*>*>*>*>*>*>*:hover *{transform:rotateX(20deg)}*>*>*>*>*>*>*>*>*>*>*:hover{transform:rotateX(-20deg)}.lolspin{animation:mh-improved-spin 1s linear infinite}@media (prefers-reduced-motion: reduce){.lolspin{animation:none}}
`;
}
});
var trollEm, trollem2, init21, troll_mode_default, init_troll_mode = __esm({
"src/modules/experiments/modules/troll-mode/index.js"() {
init_utils2();
init_styles27();
trollEm = () => {
let domQuery = "#journallatestentry", lastCatch = document.querySelector(domQuery);
lastCatch && ["attractionfailure", "catchfailure", "catchfailuredamage"].some((s) => lastCatch.classList.contains(s)) && (hg.views.MessengerView.addMessage({
content: {
body: app.views.OnboardingTutorialView.tutorial.wrapInfoArrow(`wow you really are an amazing mousehunter ${user.username}`, "lol")
},
highlight_dom: domQuery,
highlight_padding: {
top: 0,
left: 0,
right: 0,
bottom: 1
},
css_class: "larryCircle",
on_show_callback: () => app.views.OnboardingTutorialView.tutorial.showBouncyArrow(domQuery, "top"),
on_close_callback: () => app.views.OnboardingTutorialView.tutorial.hideBouncyArrow(),
show_overlay: !0
}), hg.views.MessengerView.go());
}, trollem2 = () => {
let banner = document.querySelector(".campPage-banner");
if (!banner)
return;
let bannerLink = document.createElement("a"), newbieImg = document.createElement("img");
newbieImg.src = "https://www.mousehuntgame.com/images/promo/campbanners/groups/newbie.png", bannerLink.append(newbieImg), bannerLink.addEventListener("click", () => {
addStyles(styles_default26, "troll-mode"), banner.classList.add("lolspin"), setTimeout(() => {
banner.classList.remove("lolspin");
}, 1e3);
let elements = document.querySelectorAll("body * *");
elements[Math.floor(Math.random() * elements.length)].classList.add("lolspin"), setInterval(() => {
elements[Math.floor(Math.random() * elements.length)].classList.add("lolspin");
}, 500);
}), banner.append(bannerLink), banner.classList.remove("hidden");
}, init21 = () => __async(void 0, null, function* () {
trollEm(), onTurn(trollEm, 1e3), trollem2();
}), troll_mode_default = {
id: "experiments.lol-gottem",
name: "Troll mode",
description: "lol",
load: init21
};
}
});
var styles_default27, init_styles28 = __esm({
"src/modules/experiments/modules/trap-background/styles.css"() {
styles_default27 = `.trapImageView-layerWrapper{inset:1px;background:linear-gradient(0deg,#eee2b4,#b1e0d1);border-top-left-radius:4px;border-top-right-radius:4px}.itembrowser-skin-image-wrapper{background:url(https://www.mousehuntgame.com/images/items/bases/trap_small/a44d6a59ca9c0d11224bb36fd4e16378.png),linear-gradient(0deg,#eee2b4,#b1e0d1)}
`;
}
});
var init22, trap_background_default, init_trap_background = __esm({
"src/modules/experiments/modules/trap-background/index.js"() {
init_utils2();
init_styles28();
init22 = () => __async(void 0, null, function* () {
addStyles(styles_default27, "trap-background");
}), trap_background_default = {
id: "experiments.trap-background",
name: "Add background gradient to trap",
load: init22
};
}
});
var imported5, modules, init23, experiments_default, init_experiments = __esm({
"src/modules/experiments/index.js"() {
init_utils2();
init_use_pb_as_skin_preview_base();
init_trap_selector_special_effects();
init_raffle2();
init_new_settings_styles_columns();
init_square_profile_pics();
init_troll_mode();
init_trap_background();
imported5 = [use_pb_as_skin_preview_base_default, trap_selector_special_effects_default, raffle_default2, new_settings_styles_columns_default, square_profile_pics_default, troll_mode_default, trap_background_default], modules = imported5, init23 = () => __async(void 0, null, function* () {
[
{
id: "better-marketplace.show-chart-images",
name: "Better Marketplace: Show sales price history charts on category pages",
description: "",
load: () => {
}
},
{
id: "better-journal-list.link-all-items",
name: "Better Journal List: Link all items",
load: () => {
}
}
].forEach((module) => {
modules.push(module);
}), modules.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0), modules.forEach((module) => {
module.load && getSetting(module.id, !1) && module.load();
});
}), experiments_default = {
id: "experiments",
name: "Experiments",
description: "",
type: "beta",
default: !0,
order: -1,
load: init23,
settings: () => modules.map((module) => ({
id: module.id || module.name,
title: module.name || module.id,
description: module.description || "",
default: module.default || !1
}))
};
}
});
// dist/data/backgrounds.json
var backgrounds_default3, init_backgrounds3 = __esm({
"dist/data/backgrounds.json"() {
backgrounds_default3 = [{ id: "midnight", name: "Midnight", css: "linear-gradient(220.55deg, #565656 0%, #181818 100%)" }, { id: "amber-sunrise", name: "Amber Sunrise", css: "radial-gradient(circle at center top, #b45309, #fdba74, #9f1239)" }, { id: "aqua-depths", name: "Aqua Depths", css: "linear-gradient(220.55deg, #24cfc5 0%, #001c63 100%)" }, { id: "aurora", name: "Aurora", css: "radial-gradient(65% 100% at 50% 0%, #00ff94 0%, rgba(0, 255, 148, 0.25) 100%), linear-gradient(230deg, #000000 25%, #170059 100%), linear-gradient(215deg, #ffebb9 10%, #19004e 80%), radial-gradient(100% 245% at 100% 100%, #ffffff 0%, #000353 100%), linear-gradient(125deg, #1400ff 0%, #3a0000 100%), linear-gradient(225deg, #00ebfc 3.7%, #00f0ff 11.4%, #000b6f 55.3%, #001676 64.1%, #001676 75%, #00e1f6 100%, #00ecfd 100%, #001676 100%), linear-gradient(135deg, #00f0ff 0%, #000b6f 2.4%, #00ebfc 20.5%, #001676 35%, #00e1f6 47.2%, #001676 66.8%, #00ecfd 84.9%, #001676 100%)" }, { id: "camo", name: "Camo", css: "url(https://i.mouse.rip/mh-improved/custom-hud/hud-camo.png) top center / 200px" }, { id: "canary-shine", name: "Canary Shine", css: "linear-gradient(220.55deg, #fff500 0%, #ffb800 100%)" }, { id: "candy-cane-breeze", name: "Candy Cane Breeze", css: "radial-gradient(at 30% -5%, #92f2f2, #d6cff1, rgba(255, 255, 255, 0) 25%), radial-gradient(at 50% 70%, #c4f2e5, rgba(255, 255, 255, 0) 30%), radial-gradient(at 70% 0%, #d6cff1, rgba(255, 255, 255, 0) 20%), linear-gradient(75deg, #92f2f2 5%, rgba(255, 255, 255, 0), #a8d0f0, rgba(255, 255, 255, 0), #eed5f2, rgba(255, 255, 255, 0), #d6cff1, rgba(255, 255, 255, 0), #c4f2e5 90%), radial-gradient(at 30% 50%, #92f2f2, rgba(255, 255, 255, 0) 30%), radial-gradient(at 30% 50%, #9cb9fc, rgba(255, 255, 255, 0) 30%), radial-gradient(at 100% 50%, #92f2f2, #c2dcf2, rgba(255, 255, 255, 0) 50%), linear-gradient(115deg, #92f2f2 5%, #a8d0f0 10%, #d6cff1, #eed5f2 20%, #a8d0f0, #a8d0f0 30%, #d6cff1, #c2dcf2 40%, #92f2f2, #a8d0f0 70%)" }, { id: "candy-clouds", name: "Candy Clouds", css: "url(https://i.mouse.rip/mh-improved/custom-hud/hud-candy-clouds.png) repeat top center / contain" }, { id: "celestial-dreamscape", name: "Celestial Dreamscape", css: "radial-gradient(18% 28% at 24% 50%, #cefaff 7%, rgba(7, 58, 255, 0) 100%), radial-gradient(18% 28% at 18% 71%, rgba(255, 255, 255, 0.35) 6%, rgba(7, 58, 255, 0) 100%), radial-gradient(70% 53% at 36% 76%, #73f2ff 0%, rgba(7, 58, 255, 0) 100%), radial-gradient(42% 53% at 15% 94%, #ffffff 7%, rgba(7, 58, 255, 0) 100%), radial-gradient(42% 53% at 34% 72%, #ffffff 7%, rgba(7, 58, 255, 0) 100%), radial-gradient(18% 28% at 35% 87%, #ffffff 7%, rgba(7, 58, 255, 0) 100%), radial-gradient(31% 43% at 7% 98%, #ffffff 24%, rgba(7, 58, 255, 0) 100%), radial-gradient(21% 37% at 72% 23%, rgba(211, 255, 109, 0.61) 24%, rgba(7, 58, 255, 0) 100%), radial-gradient(35% 56% at 91% 74%, rgba(138, 79, 255, 0.96) 9%, rgba(7, 58, 255, 0) 100%), radial-gradient(74% 86% at 67% 38%, rgba(109, 255, 174, 0.96) 24%, rgba(7, 58, 255, 0) 100%), linear-gradient(125deg, #4eb5ff 1%, #4c00fc 100%)" }, { id: "cobalt-mist", name: "Cobalt Mist", css: "linear-gradient(#3951c6, #8896dd)" }, { id: "cold-breeze", name: "Cold Breeze", css: "conic-gradient(at center top, #ffffff, #0ea5e9, #0ea5e9)" }, { id: "cosmic-twilight", name: "Cosmic Twilight", css: "linear-gradient(to right, #0f172a, #581c87, #0f172a)" }, { id: "cotton-candy-shores", name: "Cotton Candy Shores", css: "linear-gradient(#32c7e5, #f078d5)" }, { id: "crimson-blush", name: "Crimson Blush", css: "linear-gradient(#b9466c, #e3b5c4)" }, { id: "cyberpop", name: "Cyberpop", css: "linear-gradient(135deg, #0e0220 0%, #000000 6px, #e40475 24.8%, #0e0220 35%, #48e0e4 56.3%, #48e0e4 62.4%, #ff00c8 72.9%, rgba(0, 0, 0, 0.86) 78.5%, #48e0e4 100%)" }, { id: "dark-digital", name: "Dark Digital", css: "url(https://i.mouse.rip/mh-improved/custom-hud/hud-dark-digital.png) top left / 230px" }, { id: "dark", name: "Dark", css: "url(https://i.mouse.rip/mh-improved/custom-hud/hud-dark.png) top left / 200px" }, { id: "dreamy-hues", name: "Dreamy Hues", css: "linear-gradient(97.92deg, #bc97c6 0%, #f6d2c8 6.33%, #f5e2c8 12.2%, #bde8d9 21.5%, #e8dfc6 34.83%, #edc7c6 44.22%, #e6bdcf 52.26%, #c7b2e5 60.55%, #b8bfe7 70.29%, #c3e1d3 79.4%, #eedfc5 89.06%, #e5b0c9 94.93%, #b495c5 100.7%)" }, { id: "electric-hexes", name: "Electric Hexes", css: "url(https://i.mouse.rip/mh-improved/custom-hud/hud-electric-hexes.png) top left / 550px" }, { id: "emerald-forest", name: "Emerald Forest", css: "linear-gradient(#43ac20, #76df53)" }, { id: "emerald-lagoon", name: "Emerald Lagoon", css: "radial-gradient(80.99% 100% at 50% 0%, #00ff0a 0%, #36008e 100%), radial-gradient(50% 123.47% at 50% 50%, #efe7c8 0%, #36008e 100%), linear-gradient(301.28deg, #ff006b 0%, #48dd9e 100%), linear-gradient(294.84deg, #5a60e4 0%, #d30000 100%), linear-gradient(52.29deg, #000000 0%, #00ff85 100%), radial-gradient(100% 138.69% at 100% 0%, #0007a5 0%, #ff7a00 100%), radial-gradient(70.41% 100% at 50% 0%, #d5b300 0%, #2200aa 100%)" }, { id: "flamingo-fling", name: "Flamingo Fling", css: "linear-gradient(#e84a8c, #f3a5c5)" }, { id: "flowers", name: "Flowers", css: "url(https://i.mouse.rip/mh-improved/custom-hud/hud-flowers.png) left center / 300px" }, { id: "frosted-orchid", name: "Frosted Orchid", css: "linear-gradient(#ecadaf 0%, #e0b6a5 13.54%, #dc8b9d 30.21%, #c05ac9 44.27%, #b865cf 57.81%, #c3a7d9 71.87%, #c5c1e2 84.9%, #c6d8e4 100%)" }, { id: "galactic-dusk", name: "Galactic Dusk", css: "linear-gradient(220.55deg, #4063bc 0%, #6b0013 100%)" }, { id: "glacial-gleam", name: "Glacial Gleam", css: "linear-gradient(220.55deg, #c5edf5 0%, #4a879a 100%)" }, { id: "groovy-green", name: "Groovy Green", css: "url(https://www.mousehuntgame.com/images/ui/hud/folklore_forest_region/pattern.png) repeat bottom center / 200px" }, { id: "lavender-lustre", name: "Lavender Lustre", css: "linear-gradient(#de97f9, #9157ff)" }, { id: "mint-surf", name: "Mint Surf", css: "linear-gradient(0deg, #08aeea 0%, #2af598 100%)" }, { id: "neon-nights", name: "Neon Nights", css: "linear-gradient(#f3b167, #ec38bc, #7303c0, #03001e)" }, { id: "night-in-salem", name: "Night in Salem", css: "linear-gradient(#111827, #581c87, #7c3aed)" }, { id: "oahu-sunset", name: "Oahu Sunset", css: "linear-gradient(to top, #fb923c, #38bdf8)" }, { id: "orange-coral", name: "Orange Coral", css: "linear-gradient(to top, #fb923c, #fb7185)" }, { id: "pastel-daydream", name: "Pastel Daydream", css: "radial-gradient(at 40% 20%, #ffb87a 0px, rgba(0, 0, 0, 0) 50%), radial-gradient(at 80% 0%, #1fddff 0px, rgba(0, 0, 0, 0) 50%), radial-gradient(at 0% 50%, #fcdee1 0px, rgba(0, 0, 0, 0) 50%), radial-gradient(at 73% 51%, #ff85ad 0px, rgba(0, 0, 0, 0) 50%), radial-gradient(at 0% 100%, #ffb58a 0px, rgba(0, 0, 0, 0) 50%), radial-gradient(at 80% 100%, #6b66ff 0px, rgba(0, 0, 0, 0) 50%), radial-gradient(at 0% 0%, #ff85a7 0px, rgba(0, 0, 0, 0) 50%)" }, { id: "polaroid-memories", name: "Polaroid Memories", css: "linear-gradient(to top, #040308, #ad4a28, #dd723c, #fc7001, #dcb697, #9ba5ae, #3e5879, #020b1a)" }, { id: "radiant-rouge", name: "Radiant Rouge", css: "linear-gradient(161.15deg, #ffa492 12.73%, #ff2c55 72.95%)" }, { id: "rainbow", name: "Rainbow", css: "linear-gradient(#e02020 0%, #fa6400 17%, #f7b500 33%, #6dd400 50%, #0091ff 67%, #6236ff 83%, #b620e0 100%)" }, { id: "rainbows-embrace", name: "Rainbow's Embrace", css: "radial-gradient(50% 100% at left -10% top 80%, #db0072, rgba(0, 0, 0, 0)), radial-gradient(50% 100% at left 25% top 60%, #ffe53e, rgba(0, 0, 0, 0)), radial-gradient(50% 100% at left 55% top 40%, #00ffe4, rgba(0, 0, 0, 0)), radial-gradient(50% 100% at left 90% top 20%, #d150ff, rgba(0, 0, 0, 0))" }, { id: "sangria-solstice", name: "Sangria Solstice", css: "linear-gradient(181deg, #770738, #ddbb90)" }, { id: "sea-sky", name: "Sea Sky", css: "linear-gradient(to top, #38bdf8, #312e81)" }, { id: "skyline-whisper", name: "Skyline Whisper", css: "linear-gradient(#53a5df, #a9d2ef)" }, { id: "soft-metal", name: "Soft Metal", css: "conic-gradient(at right top, rgb(199, 210, 254), rgb(71, 85, 105), rgb(199, 210, 254))" }, { id: "spectral-summer", name: "Spectral Summer", css: "linear-gradient(to top, #3f51b1 0%, #5a55ae 13%, #7b5fac 25%, #8f6aae 38%, #a86aa4 50%, #cc6b8e 62%, #f18271 75%, #f3a469 87%, #f7c978 100%)" }, { id: "warm-glow", name: "Warm Glow", css: "radial-gradient(at center top, #d1d5db, #c026d3, #ea580c)" }];
}
});
var settings_default8, init_settings9 = __esm({
"src/modules/custom-hud/settings/index.js"() {
init_backgrounds3();
settings_default8 = () => __async(void 0, null, function* () {
let gradientOptions = backgrounds_default3.map((gradient) => ({
name: gradient.name,
value: gradient.id
})), options2 = [
{ name: "Default", value: "default" },
{
name: "Color",
value: "group",
options: [
{ name: "Cyan", value: "hud-cyan" },
{ name: "Green", value: "hud-green" },
{ name: "Pink", value: "hud-pink" },
{ name: "Purple", value: "hud-purple" },
{ name: "Red", value: "hud-red" },
{ name: "Teal", value: "hud-teal" },
{ name: "Faded", value: "hud-faded" },
{ name: "Gray", value: "hud-gray" }
]
},
{ name: "Blueprint", value: "hud-blueprint" },
{
name: "Other",
value: "group",
options: gradientOptions
}
];
return [{
id: "custom-hud",
title: 'Custom HUD background <a class="mh-improved-custom-hud-preview hidden">Preview choices</a>',
default: [options2[0]],
description: "Change the marbled HUD background.",
settings: {
type: "multi-select",
number: 1,
options: options2
}
}];
});
}
});
var blueprint_default2, init_blueprint3 = __esm({
"src/modules/custom-hud/styles/blueprint.css"() {
blueprint_default2 = `body .mousehuntHud-marbleDrawer{background:url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) -46px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) 731px 0 no-repeat,url(https://i.mouse.rip/mh-improved/custom-hud/hud-blueprint.png) repeat-y top center}
`;
}
});
var groovy_green_default, init_groovy_green = __esm({
"src/modules/custom-hud/styles/groovy-green.css"() {
groovy_green_default = `body .mousehuntHud-marbleDrawer{background:url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) -46px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) 731px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/folklore_forest_region/pattern.png) repeat-y bottom center/cover}
`;
}
});
var midnight_default, init_midnight = __esm({
"src/modules/custom-hud/styles/midnight.css"() {
midnight_default = `.pageFrameView #mousehuntContainer.PageCamp .gameHeader:before,.pageFrameView #mousehuntContainer.PageJournal .gameHeader:before{background:transparent}.pageFrameView #mousehuntContainer.PageCamp,.pageFrameView #mousehuntContainer.PageJournal{background-color:#383e49}body .mousehuntHud-marbleDrawer{background:url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) -46px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) 731px 0 no-repeat;background-color:#383e49}.pageFrameView .pageFrameView-contentContainer,.pageFrameView .pageFrameView-column.right,.pageFrameView .pageFrameView-column.left{background-color:#111;border-color:#111}
`;
}
});
var suede_default, init_suede = __esm({
"src/modules/custom-hud/styles/suede.css"() {
suede_default = `.mousehuntHud-marbleDrawer{background:url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) -51px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) 736px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/suede.jpg) repeat bottom left/760px}#mousehuntContainer.PageCamp{background:url(https://www.mousehuntgame.com/images/ui/hud/suede.jpg) repeat-y}
`;
}
});
var addStyleEl, listenForPreferenceChanges, persistBackground, init24, custom_hud_default, init_custom_hud = __esm({
"src/modules/custom-hud/index.js"() {
init_utils2();
init_settings9();
init_backgrounds3();
init_blueprint3();
init_groovy_green();
init_midnight();
init_suede();
addStyleEl = (selectedPreview = !1) => {
let setting = selectedPreview || getSetting("custom-hud-0", "default"), stylesEl = document.querySelector("#mh-improved-custom-hud-style");
if (stylesEl && stylesEl.remove(), setting === "default")
return;
let mapping = {
"hud-blueprint": blueprint_default2,
"hud-suede": suede_default,
"hud-groovy-green": groovy_green_default,
"hud-midnight": midnight_default
}, styleEl = document.createElement("style");
if (styleEl.id = "mh-improved-custom-hud-style", mapping[setting])
styleEl.innerHTML = mapping[setting];
else {
let gradient = backgrounds_default3.find((g) => g.id === setting);
gradient ? styleEl.innerHTML = `body .mousehuntHud-marbleDrawer {
background: url(https://i.mouse.rip/mousehuntHudPedestal.png) -46px 0 no-repeat, url(https://i.mouse.rip/mousehuntHudPedestal.png) 731px 0 no-repeat, ${gradient.css};
}` : styleEl.innerHTML = `body .mousehuntHud-marbleDrawer {
background: url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) -46px 0 no-repeat, url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) 731px 0 no-repeat, url(https://i.mouse.rip/mh-improved/marble-shadow.png) 6px 0 no-repeat, url(https://i.mouse.rip/mh-improved/custom-hud/${setting}.png) repeat-y top center;
}
.mousehuntHud-titleProgressBar {
mix-blend-mode: luminosity;
}`;
}
document.head.append(styleEl);
}, listenForPreferenceChanges = () => {
let input = document.querySelector("#mousehunt-improved-settings-design-custom-hud select");
input && input.addEventListener("change", () => {
addStyleEl();
});
}, persistBackground = () => {
addStyleEl(), onNavigation(listenForPreferenceChanges, {
page: "preferences",
onLoad: !0
}), onNavigation(() => {
setMultipleTimeout(listenForPreferenceChanges, [250, 500, 1e3, 2e3, 5e3]), addSettingPreview({
id: "custom-hud",
selector: ".mh-improved-custom-hud-preview",
inputSelector: "#mousehunt-improved-settings-design-custom-hud select",
items: backgrounds_default3,
previewCallback: (selected) => addStyleEl(selected)
});
}, {
page: "preferences",
onLoad: !0
});
}, init24 = () => __async(void 0, null, function* () {
persistBackground();
}), custom_hud_default = {
id: "custom-hud",
type: "design",
alwaysLoad: !0,
load: init24,
settings: settings_default8
};
}
});
var replace, add, init25, replace_favicon_default, init_replace_favicon = __esm({
"src/modules/replace-favicon/index.js"() {
init_utils2();
replace = () => {
let favicon = document.querySelector("#favicon");
favicon && (favicon.href = "https://i.mouse.rip/mh-icons/favicon.ico");
}, add = () => {
[
{ rel: "apple-touch-icon", sizes: "180x180", href: "https://i.mouse.rip/mh-icons/apple-touch-icon.png" },
{ rel: "icon", type: "image/png", sizes: "32x32", href: "https://i.mouse.rip/mh-icons/favicon-32x32.png" },
{ rel: "icon", type: "image/png", sizes: "16x16", href: "https://i.mouse.rip/mh-icons/favicon-16x16.png" },
{ rel: "mask-icon", href: "https://i.mouse.rip/mh-icons/safari-pinned-tab.svg", color: "#cfae00" }
].forEach((icon) => {
let link = document.createElement("link");
for (let key in icon)
link.setAttribute(key, icon[key]);
document.head.append(link);
});
}, init25 = () => __async(void 0, null, function* () {
add(), replace(), onTurn(() => {
setMultipleTimeout(replace, [1e3, 2e3, 3e3, 4e3, 5e3]);
});
}), replace_favicon_default = {
id: "replace-favicon",
name: "Replace Favicon",
type: "feature",
default: !1,
description: "Replace the favicon with a more fitting one.",
load: init25
};
}
});
var exportRankupForecasterData, exportRankupForecasterDataAsCsv, importRankupForecassterData, addRankupForecasterButtons, rank_up_forecaster_default, init_rank_up_forecaster = __esm({
"src/modules/feature-flags/modules/rank-up-forecaster.js"() {
init_utils2();
exportRankupForecasterData = () => {
let allArea = localStorage.getItem("Chro-forecaster-all-area"), currentArea = localStorage.getItem("Chro-forecaster-current-area"), time = localStorage.getItem("Chro-forecaster-time"), dataStr = JSON.stringify({
allArea,
currentArea,
time
}), base64 = btoa(dataStr), link = document.createElement("a"), date = /* @__PURE__ */ new Date(), dateString = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
link.download = `rank-up-forecaster-${dateString}.json`, link.href = `data:application/json;base64,${base64}`, link.click();
}, exportRankupForecasterDataAsCsv = () => {
let time = localStorage.getItem("Chro-forecaster-time"), data = JSON.parse(time), csv = ["Time,Wisdom"];
data.forEach((row) => {
let date2 = new Date(row[0]);
csv.push(`"${date2.toLocaleString()}",${row[1]}`);
});
let csvStr = csv.join(`
`), link = document.createElement("a"), date = /* @__PURE__ */ new Date(), dateString = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
link.download = `rank-up-forecaster-${dateString}.csv`, link.href = `data:text/csv;charset=utf-8,${csvStr}`, link.click();
}, importRankupForecassterData = () => {
let input = document.createElement("input");
input.type = "file", input.accept = ".json", input.addEventListener("change", (e) => {
let file = e.target.files[0];
if (!file)
return;
let reader = new FileReader();
reader.onload = (re) => {
let contents = re.target.result, data = JSON.parse(contents);
localStorage.setItem("Chro-forecaster-all-area", data.allArea), localStorage.setItem("Chro-forecaster-current-area", data.currentArea), localStorage.setItem("Chro-forecaster-time", data.time);
}, reader.readAsText(file);
}), input.click();
let points = document.querySelector(".mousehuntHud-userStat-row.points");
points && points.click();
}, addRankupForecasterButtons = () => {
let forecastOpen = document.querySelector(".mousehuntHud-userStat-row.points");
forecastOpen && forecastOpen.addEventListener("click", () => {
setTimeout(() => {
let rankup = document.querySelector("#forecaster-content-div");
if (!rankup || document.querySelector(".mh-ui-forecaster-buttons"))
return;
let wrapper = makeElement("div", "mh-ui-forecaster-buttons"), exportButton = makeElement("button", "mh-ui-export-forecaster-data", "Export Data");
exportButton.addEventListener("click", exportRankupForecasterData), wrapper.append(exportButton);
let importButton = makeElement("button", "mh-ui-import-forecaster-data", "Import Data");
importButton.addEventListener("click", importRankupForecassterData), wrapper.append(importButton);
let exportCsvButton = makeElement("button", "mh-ui-export-forecaster-csv", "Export as CSV");
exportCsvButton.addEventListener("click", exportRankupForecasterDataAsCsv), wrapper.append(exportCsvButton), rankup.append(wrapper);
}, 250);
});
}, rank_up_forecaster_default = () => __async(void 0, null, function* () {
addStyles(`.mh-ui-forecaster-buttons {
display: flex;
flex-wrap: wrap;
gap: 5px;
justify-content: space-around;
max-width: 180px;
margin-top: 10px;
}`, "rank-up-forecaster"), addRankupForecasterButtons();
});
}
});
var social_default, init_social = __esm({
"src/modules/feature-flags/modules/social.js"() {
init_utils2();
social_default = () => {
window.twttr = {
widgets: {
load: () => {
},
createShareButton: () => {
}
}
};
class SocialLink {
/**
* Noop constructor.
*
* @param {string} url The URL.
*/
constructor(url) {
this.url = url;
}
appendTo() {
}
setFacebookLikeUrl() {
}
setFacebookShareUrl() {
}
setImage() {
}
setTitle() {
}
setTwitterUrl() {
}
}
hg.classes.SocialLink = SocialLink, addStyles('a[onclick="SocialFramework.shareToFeedButton(this); return false;"] { filter: grayscale(1) opacity(0.5); cursor: not-allowed;}', "social-noop");
};
}
});
var settings_default9, init_settings10 = __esm({
"src/modules/feature-flags/settings/index.js"() {
settings_default9 = () => __async(void 0, null, function* () {
return [{
id: "override-flags",
title: "Feature Flags",
default: "",
description: 'Enable <a href="https://github.com/MHCommunity/mousehunt-improved/blob/main/docs/feature-flags.md" target="_blank" rel="noopener noreferrer">feature flags</a>. Separate flags with commas.',
settings: {
type: "input"
}
}];
});
}
});
var init26, feature_flags_default, init_feature_flags = __esm({
"src/modules/feature-flags/index.js"() {
init_utils2();
init_rank_up_forecaster();
init_social();
init_settings10();
init26 = () => __async(void 0, null, function* () {
(getFlag("social-noop") || getFlag("twitter")) && social_default(), getFlag("rankup-forecaster") || rank_up_forecaster_default();
}), feature_flags_default = {
id: "feature-flags",
type: "advanced",
alwaysLoad: !0,
load: init26,
settings: settings_default9,
order: 200
};
}
});
var styles_default28, init_styles29 = __esm({
"src/modules/better-mice/modules/hover-mice/styles.css"() {
styles_default28 = `#mouse-data-wrapper{position:absolute;z-index:999999;box-sizing:border-box;display:block;width:300px;height:100px;background:linear-gradient(#decebb 5%,#f0eddf 50%);border:1px solid #9a8872;border-radius:10px;box-shadow:0 1px 5px -1px #5e5e5e}.mouse-data-wrapper-loading{display:flex;align-items:flex-end;justify-content:center;height:90%;background-image:url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif);background-repeat:no-repeat;background-position:center;background-size:55px}#mouse-data-wrapper .mouse-data{display:grid;grid-template-columns:90px 1fr;gap:10px;align-items:center;height:95px}#mouse-data-wrapper .mouse-image{height:80px;margin-left:10px;border:1px solid #25211e;border-radius:5px}#mouse-data-wrapper .mouse-text{display:flex;flex-direction:column;justify-content:space-around;height:80px;margin-right:10px}#mouse-data-wrapper .mouse-name{width:160px;font-size:12px;font-weight:900}.mouse-catch-stats{display:grid;grid-template-columns:2fr 3fr;gap:0 20px;font-size:10px}.mouse-catch-stats div{display:flex;flex-direction:row;align-items:center;justify-content:space-between;line-height:1.5}#mouse-data-wrapper .mouse-data.crown:after{position:absolute;top:7px;right:5px;width:30px;height:30px;content:"";background-size:cover}#mouse-data-wrapper .mouse-data.crown.bronze:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_bronze.png)}#mouse-data-wrapper .mouse-data.crown.silver:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_silver.png)}#mouse-data-wrapper .mouse-data.crown.gold:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_gold.png)}#mouse-data-wrapper .mouse-data.crown.platinum:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_platinum.png)}#mouse-data-wrapper .mouse-data.crown.diamond:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_diamond.png)}
`;
}
});
var fetchMouseData, makeMouseMarkup, makeLoadingMarkup2, mouseDataWrapper, main4, hover_mice_default, init_hover_mice = __esm({
"src/modules/better-mice/modules/hover-mice/index.js"() {
init_utils2();
init_styles29();
fetchMouseData = (mouseId) => __async(void 0, null, function* () {
var _a;
let mouseDataRequest = yield doRequest("managers/ajax/mice/getstat.php", {
action: "get_mice",
"mouse_types[]": mouseId
});
return (_a = mouseDataRequest == null ? void 0 : mouseDataRequest.mice) == null ? void 0 : _a[0];
}), makeMouseMarkup = (mouse) => {
if (!mouse)
return !1;
let mouseData = makeElement("div", "mouse-data");
mouse.crown && mouse.crown !== "none" && mouseData.classList.add("crown", mouse.crown);
let mouseImage = makeElement("img", "mouse-image");
mouse.square && (mouseImage.src = mouse.square), mouseData.append(mouseImage);
let mouseText = makeElement("div", "mouse-text");
mouse.name && makeElement("div", "mouse-name", mouse.name, mouseText);
let catchStats = makeElement("div", "mouse-catch-stats"), catches = makeElement("div", "mouse-catches");
makeElement("span", "", "Catches: ", catches), makeElement("span", "", mouse.num_catches_formatted || 0, catches), catchStats.append(catches);
let avgWeight = makeElement("div", "mouse-avg-weight");
makeElement("span", "", "Avg: ", avgWeight), makeElement("span", "", mouse.avg_weight || "0z", avgWeight), catchStats.append(avgWeight);
let misses = makeElement("div", "mouse-misses");
makeElement("span", "", "Misses: ", misses), makeElement("span", "", mouse.num_misses_formatted || 0, misses), catchStats.append(misses);
let heaviest = makeElement("div", "mouse-heaviest");
return makeElement("span", "", "Heaviest: ", heaviest), makeElement("span", "", mouse.heaviest_catch || "0z", heaviest), catchStats.append(heaviest), mouseText.append(catchStats), mouseData.append(mouseText), mouseData;
}, makeLoadingMarkup2 = (e) => {
mouseDataWrapper && mouseDataWrapper.remove(), mouseDataWrapper = makeElement("div", "mouse-data-wrapper"), mouseDataWrapper.id = "mouse-data-wrapper", mouseDataWrapper.innerHTML = '<span class="mouse-data-wrapper-loading">Loading...</span>', document.body.append(mouseDataWrapper);
let rect = e.target.getBoundingClientRect(), top = rect.top + window.scrollY, left = rect.left + window.scrollX, tooltipTop = top - mouseDataWrapper.offsetHeight - 10;
return tooltipTop < 0 && (tooltipTop = top + rect.height + 10), mouseDataWrapper.style.top = `${tooltipTop}px`, mouseDataWrapper.style.left = `${left - mouseDataWrapper.offsetWidth / 2 + rect.width / 2}px`, mouseDataWrapper;
}, main4 = () => {
let miceLinks = document.querySelectorAll('.journal .content .entry .journaltext a[onclick*="MouseView.show"]');
miceLinks && miceLinks.forEach((link) => {
let mouseType = link.getAttribute("onclick").match(/'([^']+)'/)[1];
link.setAttribute("onclick", `hg.views.MouseView.show('${mouseType}'); return false;`);
let timeoutId = null, isMouseOver = !1;
link.addEventListener("mouseenter", (e) => __async(void 0, null, function* () {
isMouseOver = !0, timeoutId && clearTimeout(timeoutId), timeoutId = setTimeout(() => __async(void 0, null, function* () {
if (!isMouseOver)
return;
makeLoadingMarkup2(e);
let mouseData = yield fetchMouseData(mouseType);
if (mouseData && mouseDataWrapper && isMouseOver) {
let markup = makeMouseMarkup(mouseData);
mouseDataWrapper.innerHTML = markup.outerHTML;
}
}), 500);
})), link.addEventListener("mouseleave", () => {
isMouseOver = !1, timeoutId && clearTimeout(timeoutId), mouseDataWrapper && mouseDataWrapper.remove();
});
});
}, hover_mice_default = () => {
addStyles(styles_default28, "better-mice-hover-mice"), setTimeout(main4, 500), onRequest("*", () => {
setTimeout(main4, 1e3);
});
};
}
});
var makeKingsCrownsTab, makeKingsCrownsTabContentContent, makeMouseCrownSection, makeKingsCrownsTabContent, addKingsCrownsToMicePage, parseImperialWeight, getSetRowValue, sortStats, addSortButton, getSelectorPrefix, addSortingToCat, _categoryClickHandler, addSortingTabClickListeners, clickCurrentTab, addSortingToStatsPage, mouse_page_default, init_mouse_page = __esm({
"src/modules/better-mice/modules/mouse-page/index.js"() {
init_utils2();
makeKingsCrownsTab = () => {
let tabContainer = document.querySelector(".mousehuntHud-page-tabHeader-container");
if (!tabContainer)
return !1;
let existingTab = document.querySelector(".mousehuntHud-page-tabHeader.kings-crowns-tab");
if (existingTab)
return existingTab;
let kingsCrownsTab = makeElement("a", ["mousehuntHud-page-tabHeader", "groups", "kings-crowns-tab"]);
return makeElement("span", "", "King's Crowns", kingsCrownsTab), kingsCrownsTab.setAttribute("data-tab", "kings_crowns"), kingsCrownsTab.setAttribute("data-legacy-mode", ""), kingsCrownsTab.setAttribute("onclick", "hg.utils.PageUtil.onclickPageTabHandler(this); return false;"), tabContainer.append(kingsCrownsTab), kingsCrownsTab;
}, makeKingsCrownsTabContentContent = () => {
if (document.querySelector(".mousehuntHud-page-tabContent.kings_crowns"))
return;
let tabContentContainer = document.querySelector(".mousehuntHud-page-tabContentContainer");
if (!tabContentContainer)
return;
let tabContent = makeElement("div", ["mousehuntHud-page-tabContent", "kings_crowns"]);
tabContent.setAttribute("data-tab", "kings_crowns"), tabContent.setAttribute("data-template-file", "AdversariesPage"), makeElement("div", "mousehuntHud-page-tabContent-loading", "", tabContent);
let subTabContent = makeElement("div", ["mousehuntHud-page-subTabContent", "all", "active"]);
subTabContent.setAttribute("data-tab", "all"), subTabContent.setAttribute("data-template-file", "AdversariesPage"), subTabContent.setAttribute("data-template", "subtab"), subTabContent.setAttribute("data-initialized", ""), subTabContent.setAttribute("data-user-id", ""), makeElement("div", "mouseCrownsView", "", subTabContent), tabContent.append(subTabContent), tabContentContainer.append(tabContent);
}, makeMouseCrownSection = (type2, mice, header = !1, subheader = !1) => {
let wrapper = makeElement("div", ["kings-crown-section", "mouseCrownsView-group", type2]);
if (header) {
let headerDiv = makeElement("div", "mouseCrownsView-group-header");
makeElement("div", ["mouseCrownsView-crown", type2], "", headerDiv);
let name = makeElement("div", "mouseCrownsView-group-header-name");
makeElement("b", !1, header, headerDiv), subheader && makeElement("div", "mouseCrownsView-group-header-subtitle", subheader, name), headerDiv.append(name), wrapper.append(headerDiv);
}
let list = makeElement("div", "mouseCrownsView-group-mice");
return mice.forEach((mouse) => {
if (!mouse.id)
return;
let mouseWrapper = makeElement("div", "mouseCrownsView-group-mouse");
mouseWrapper.setAttribute("data-mouse-id", mouse.id), mouseWrapper.setAttribute("data-mouse-type", mouse.type), mouseWrapper.setAttribute("data-mouse-large", mouse.large), mouseWrapper.setAttribute("onclick", "hg.views.MouseCrownsView.showMouseImage(this); return false;"), mouse.landscape && mouseWrapper.classList.add("landscape");
let innerWrapper = makeElement("div", "mouseCrownsView-group-mouse-padding"), image = makeElement("div", ["mouseCrownsView-group-mouse-image", mouse.type]);
image.setAttribute("data-image", mouse.large || mouse.image), image.setAttribute("data-loader", "mouse"), image.setAttribute("style", `background-image: url("${mouse.image}");`), innerWrapper.append(image), makeElement("div", "mouseCrownsView-group-mouse-catches", mouse.num_catches, innerWrapper);
let label = makeElement("div", "mouseCrownsView-group-mouse-label"), nameWrapper = makeElement("span", !1, "");
makeElement("div", "mouseCrownsView-group-mouse-name", mouse.name, nameWrapper), label.append(nameWrapper), innerWrapper.append(label);
let favoriteButton = makeElement("div", "mouseCrownsView-group-mouse-favouriteButton");
mouse.is_favourite && favoriteButton.classList.add("active"), favoriteButton.setAttribute("data-mouse-id", mouse.id), favoriteButton.setAttribute("onclick", "hg.views.MouseCrownsView.toggleFavouriteHandler(event); return false;"), innerWrapper.append(favoriteButton), mouseWrapper.append(innerWrapper), list.append(mouseWrapper);
}), wrapper.append(list), wrapper;
}, makeKingsCrownsTabContent = () => __async(void 0, null, function* () {
var _a, _b, _c, _d;
makeKingsCrownsTabContentContent();
let crowns = [], cachedCrowns = sessionGet("kings-crowns"), cachedCrownsTime = sessionGet("kings-crowns-time");
if (cachedCrowns && cachedCrownsTime && Date.now() - cachedCrownsTime < 3e5)
crowns = JSON.parse(cachedCrowns);
else {
let crownsReq = yield doRequest("managers/ajax/pages/page.php", {
page_class: "HunterProfile",
"page_arguments[tab]": "kings_crowns",
"page_arguments[sub_tab]": !1
});
if (crowns = ((_d = (_c = (_b = (_a = crownsReq == null ? void 0 : crownsReq.page) == null ? void 0 : _a.tabs) == null ? void 0 : _b.kings_crowns) == null ? void 0 : _c.subtabs[0]) == null ? void 0 : _d.mouse_crowns) || [], crowns.length <= 0)
return;
sessionSet("kings-crowns", crowns), sessionSet("kings-crownsTime", Date.now());
}
let tabInnerContent = document.querySelector(".mousehuntHud-page-tabContent.kings_crowns");
if (tabInnerContent) {
if (crowns.favourite_mice_count > 0) {
let favorites = makeMouseCrownSection("favorites", crowns.favourite_mice), existingFavorites = tabInnerContent.querySelector(".mouseCrownsView-group.favorites");
existingFavorites ? existingFavorites.replaceWith(favorites) : tabInnerContent.append(favorites);
}
crowns.badge_groups.forEach((group) => {
var _a2, _b2;
if (group.mice.length === 0)
return;
group.name = ((_a2 = group == null ? void 0 : group.name) == null ? void 0 : _a2.length) > 0 ? group.name : "No", group.catches = ((_b2 = group == null ? void 0 : group.catches) == null ? void 0 : _b2.length) > 0 ? group.catches : "0";
let section = makeMouseCrownSection(group.type, group.mice, `${group.name} Crown (${group.count})`, `Earned at ${group.catches} catches`), existingSection = tabInnerContent.querySelector(`.mouseCrownsView-group.${group.type}`);
existingSection ? existingSection.replaceWith(section) : tabInnerContent.append(section);
});
}
}), addKingsCrownsToMicePage = () => __async(void 0, null, function* () {
makeKingsCrownsTab(), makeKingsCrownsTabContent();
}), parseImperialWeight = (weightText) => {
let lbsSplit = weightText.innerText.split("lb."), lbs = lbsSplit.length > 1 ? lbsSplit[0] : 0, ozSplit = weightText.innerText.split("oz."), oz = ozSplit.length > 1 ? ozSplit[0] : 0;
return Number.parseInt(lbs) * 16 + Number.parseInt(oz);
}, getSetRowValue = (row, type2) => {
let value = 0;
if (value = row.getAttribute(`data-sort-value-${type2}`), value)
return Number.parseInt(value);
let valueText = row.querySelector(`${getSelectorPrefix()} .mouseListView-categoryContent-subgroup-mouse-stats.${type2}`);
return type2 === "average_weight" || type2 === "heaviest_catch" ? valueText != null && valueText.innerText && (valueText.innerText.includes("lb") || valueText.innerText.includes("oz")) ? value = parseImperialWeight(valueText) : valueText != null && valueText.innerText && valueText.innerText.includes("kg") ? value = valueText == null ? void 0 : valueText.innerText.replace("kg.", "") : value = 0 : value = valueText.innerText && (valueText == null ? void 0 : valueText.innerText.replaceAll(",", "")) || 0, row.setAttribute(`data-sort-value-${type2}`, value), Number.parseInt(value);
}, sortStats = (type2, reverse = !1) => {
reverse = !reverse;
let rows = document.querySelectorAll(`${getSelectorPrefix()} .active  .mouseListView-categoryContent-subgroup-mouse:not(:first-child)`);
!rows.length || !document.querySelector(`${getSelectorPrefix()} .active  .mouseListView-categoryContent-subgroup-mouse:first-child`) || (rows.forEach((row) => {
getSetRowValue(row, type2);
}), rows = [...rows].sort((a, b) => {
let aVal = getSetRowValue(a, type2), bVal = getSetRowValue(b, type2);
if (aVal === bVal || type2 === "name") {
let aNameEl = a.querySelector(".mouseListView-categoryContent-subgroup-mouse-stats.name");
if (!aNameEl)
return 0;
let bNameEl = b.querySelector(".mouseListView-categoryContent-subgroup-mouse-stats.name");
if (!bNameEl)
return 0;
let aName = aNameEl.innerText, bName = bNameEl.innerText;
return aName === bName ? 0 : aName > bName ? 1 : -1;
}
return aVal > bVal ? 1 : -1;
}), reverse && (rows = rows.reverse()), rows.forEach((row) => {
row.parentNode.append(row);
}));
}, addSortButton = (elements, type2) => {
elements.forEach((el) => {
let sortButton = makeElement("div", ["sort-button", "unsorted"], "");
el.addEventListener("click", () => {
if (el.parentNode.querySelectorAll(".sort-button").forEach((button) => {
button !== sortButton && (button.classList.remove("reverse"), button.classList.add("unsorted"));
}), sortButton.classList.contains("unsorted")) {
sortButton.classList.remove("unsorted"), sortStats(type2);
return;
}
if (sortButton.classList.contains("reverse")) {
sortButton.classList.remove("reverse"), sortStats(type2);
return;
}
sortButton.classList.add("reverse"), sortStats(type2, !0);
}), el.append(sortButton);
});
}, getSelectorPrefix = () => {
let currentTab = getCurrentTab(), currentSubtab = getCurrentSubtab();
return currentTab === currentSubtab && (currentSubtab = !1), `.mousehuntHud-page-subTabContent.active${currentSubtab ? `.${currentSubtab}` : ""}`;
}, addSortingToCat = (cat, retries = 0) => __async(void 0, null, function* () {
let cats = [
"name",
"catches",
"misses",
"average_weight",
"heaviest_catch"
], selector = `${getSelectorPrefix()} .mouseListView-categoryContent-category[data-category="${cat}"]`;
yield waitForElement(selector);
let category = document.querySelector(selector);
if (!category || category && category.classList.contains("loading")) {
if (retries > 10)
return;
setTimeout(() => addSortingToCat(cat, retries + 1), 300);
return;
}
if (category.getAttribute("data-added-sorting"))
return;
cats.forEach((mCat) => {
let els = category.querySelectorAll(`${getSelectorPrefix()} .mouseListView-categoryContent-category.all.active .mouseListView-categoryContent-subgroup-mouse.header .mouseListView-categoryContent-subgroup-mouse-stats.${mCat}`);
els.length && addSortButton(els, mCat);
}), category.setAttribute("data-added-sorting", !0);
let rows = category.querySelectorAll(`${getSelectorPrefix()} .mouseListView-categoryContent-subgroup-mouse:not(:first-child)`);
rows.length && rows.forEach((row) => {
let catches = row.querySelector(`${getSelectorPrefix()} .mouseListView-categoryContent-subgroup-mouse-stats.catches`);
if (!catches)
return;
let value = catches.innerText && catches.innerText.replaceAll(",", "") || 0;
value >= 2500 ? row.classList.add("crown", "diamond") : value >= 1e3 ? row.classList.add("crown", "platinum") : value >= 500 ? row.classList.add("crown", "gold") : value >= 100 ? row.classList.add("crown", "silver") : value >= 10 && row.classList.add("crown", "bronze");
});
}), _categoryClickHandler = null, addSortingTabClickListeners = () => {
_categoryClickHandler || (_categoryClickHandler = hg.views.MouseListView.categoryClickHandler, hg.views.MouseListView.categoryClickHandler = (el) => {
_categoryClickHandler(el), addSortingToCat(el.getAttribute("data-category"));
});
}, clickCurrentTab = () => __async(void 0, null, function* () {
let currentCategoryTab = yield waitForElement(".mousehuntHud-page-tabContent.active .mousehuntHud-page-subTabContent.active .mouseListView-categoryContainer.active a");
if (!currentCategoryTab)
return;
let category = currentCategoryTab.getAttribute("data-category");
if (addSortingToCat(category), getCurrentSubtab() === "your_stats") {
let activeTab = yield waitForElement('.mousehuntHud-page-subTabHeader.active[data-tab="your_stats"]');
activeTab && activeTab.click();
}
}), addSortingToStatsPage = () => {
addSortingTabClickListeners(), setTimeout(clickCurrentTab, 250);
}, mouse_page_default = () => __async(void 0, null, function* () {
var _a, _b;
if (getCurrentPage() === "adversaries" && getCurrentTab() === "kings_crowns") {
addKingsCrownsToMicePage();
let tab = document.querySelector(".mousehuntHud-page-tabHeader.kings-crowns-tab");
tab && ((_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.onclickPageTabHandler) && hg.utils.PageUtil.onclickPageTabHandler(tab);
}
onNavigation(addKingsCrownsToMicePage, {
page: "adversaries"
}), onNavigation(addSortingToStatsPage, {
page: "adversaries",
tab: "your_stats"
}), onNavigation(addSortingToStatsPage, {
page: "adversaries",
tab: "your_stats",
anySubtab: !0
}), onNavigation(addSortingToStatsPage, {
page: "hunterprofile",
tab: "mice",
anySubtab: !0
});
});
}
});
var settings_default10, init_settings11 = __esm({
"src/modules/better-mice/settings/index.js"() {
settings_default10 = () => __async(void 0, null, function* () {
return [
{
id: "better-mice.show-attraction-rates",
title: "Show attraction rates",
default: !0
},
{
id: "better-mice.show-mouse-hover",
title: "Show mice details on hover (in journal)"
},
{
id: "better-mice.show-sidebar",
title: "Show available mice in sidebar",
default: !0
}
];
});
}
});
var styles_default29, init_styles30 = __esm({
"src/modules/better-mice/modules/sidebar/styles.css"() {
styles_default29 = `.mh-improved-mice-sidebar{padding:0;margin:5px 0 15px;border:1px solid #ddedff}.mh-improved-mice-sidebar-title{position:relative;padding:5px;font-size:11px;text-align:center;background-color:#ddedff}.mh-improved-mice-sidebar-list{display:flex;flex-direction:column}.mh-improved-mice-sidebar-mouse{display:flex;gap:5px;align-items:center;justify-content:flex-start;padding:1px 5px}.mh-improved-mice-sidebar-mouse-image{width:20px;height:20px;background-size:cover;border-radius:3px;box-shadow:inset 0 0 0 1px #fff}.mh-improved-mice-sidebar-mouse-name{font-size:10px}.mh-improved-mice-sidebar-mouse:hover{cursor:pointer;background-color:#eee}
`;
}
});
var updateSidebarListFromMiceEff, updateSidebarList, sidebar_default, init_sidebar = __esm({
"src/modules/better-mice/modules/sidebar/index.js"() {
init_utils2();
init_styles30();
updateSidebarListFromMiceEff = (data) => __async(void 0, null, function* () {
return yield updateSidebarList(data, !0);
}), updateSidebarList = (data = null, isFromMiceEff = !1) => __async(void 0, null, function* () {
let sidebar = document.querySelector(".pageSidebarView .pageSidebarView-block");
if (!sidebar)
return;
(!data || !isFromMiceEff) && (data = yield doRequest("managers/ajax/users/getmiceeffectiveness.php"));
let groups2 = (data == null ? void 0 : data.effectiveness) || {}, mice = Object.values(groups2).reduce((acc, group) => [...acc, ...group.mice], []), existingList = document.querySelector(".mh-improved-mice-sidebar-list");
if (!mice) {
existingList && existingList.remove();
return;
}
let miceSidebar = makeElement("div", "mh-improved-mice-sidebar");
makeElement("h3", "mh-improved-mice-sidebar-title", "Available Mice", miceSidebar);
let miceContainer = makeElement("div", "mh-improved-mice-sidebar-list");
if (mice.forEach((mouse) => {
let mouseEl = makeElement("div", "mh-improved-mice-sidebar-mouse");
mouseEl.addEventListener("click", () => {
hg.views.MouseView.show(mouse == null ? void 0 : mouse.type);
});
let mouseImage = makeElement("div", "mh-improved-mice-sidebar-mouse-image");
mouseImage.style.backgroundImage = `url(${mouse == null ? void 0 : mouse.thumb})`, mouseEl.append(mouseImage), makeElement("div", "mh-improved-mice-sidebar-mouse-name", mouse.name, mouseEl), miceContainer.append(mouseEl);
}), existingList) {
existingList.replaceWith(miceContainer);
return;
}
miceSidebar.append(miceContainer);
let mapSidebar = document.querySelector(".pageSidebarView-block .mh-improved-map-sidebar");
if (mapSidebar) {
mapSidebar.before(miceSidebar);
return;
}
let existing = document.querySelector(".mh-improved-mice-sidebar");
if (existing) {
existing.replaceWith(miceSidebar);
return;
}
sidebar.append(miceSidebar);
}), sidebar_default = () => __async(void 0, null, function* () {
getSetting("no-sidebar", !0) || (addStyles(styles_default29, "better-mice-sidebar"), updateSidebarList(), onRequest("users/getmiceeffectiveness.php", updateSidebarListFromMiceEff, !0), onRequest("users/changetrap.php", updateSidebarList, !0));
});
}
});
var styles_default30, init_styles31 = __esm({
"src/modules/better-mice/styles.css"() {
styles_default30 = `.mouseView-titleContainer{height:26px}.mouseView-values{float:none;font-size:11px;line-height:unset}.mouseView-title{font-size:1.2em;line-height:24px}.mh-ui-mouse-links{display:inline-block;float:right;margin-right:15px}.mh-ui-mouse-links-map{display:flex;justify-content:center;padding-bottom:5px}.mh-ui-mouse-links a{margin-right:10px}.mh-ui-mouse-links-map a{margin:10px 10px 10px 0}.mouseview-title-group{font-size:11px}.mh-ui-mouse-links-map .mousehuntActionButton.tiny{margin:3px}.mouseView-movedContainer{display:flex;flex-flow:row wrap;gap:10px}.mouseview-has-mhct .mouseView-weaknessContainer{display:flex;flex-direction:column;align-items:center;width:90px}.mouseview-has-mhct .mouseView-categoryContent-subgroup-mouse-weaknesses{width:100%}.mouseview-has-mhct .mouseView-socialContainer{display:none}.mouseview-has-mhct .mouseView-statsContainer{display:flex;align-items:stretch;width:155px}.mouseview-has-mhct .mouseView-statsContainer-block-padding{display:flex;flex-direction:column;align-items:center;min-width:125px;padding:10px 8px}.mouseview-has-mhct .mouseView-descriptionContainer{width:100%}.mouseView-categoryContent-subgroup-mouse-weaknesses-label{font-size:12px;font-weight:400;font-variant:none}.mouseview-has-mhct .mouseView-difficulty{display:none}.mouseview-has-mhct .mouse-ar-wrapper{display:grid;grid-template-columns:1fr 1fr 50px;gap:10px;place-items:center stretch;width:auto;padding:5px;font-size:12px}.mouseview-has-mhct .has-stages .mouse-ar-wrapper{grid-template-columns:1fr 1fr 1fr 50px}.mouseview-has-mhct .mouse-ar-wrapper div{font-size:12px}.mouseview-has-mhct .mouse-ar-wrapper div.rate{font-size:13px}.mouseview-has-mhct .ar-header{display:flex;align-items:center;justify-content:space-between;height:26px;padding-bottom:2px;margin-top:10px;font-size:12px;font-weight:900;border-bottom:1px solid #ccc}.mouseview-has-mhct .ar-link{font-weight:400}.mouseview-has-mhct .rate{text-align:right}.mouseview-has-mhct .mouse-ar-wrapper:nth-child(odd){background-color:#e7e7e7}.mouseview-has-mhct .mouseView-description{line-height:1.5}.mh-ui-mouse-links-map-name{color:#3b5998;cursor:pointer}.treasureMapView-highlight-name{padding:5px 0 10px;font-weight:400;text-align:center}.mh-ui-mouse-links-map-name:hover{text-decoration:underline}.mh-ui-mouse-links-map .treasureMapView-highlight-group{text-align:center}.mouseView-image{box-shadow:none}.mouseView-image:hover{box-shadow:1px 1px 2px #e96300}.mouseView a.custom-favorite-button,.mouseView a.custom-favorite-button-small{position:absolute;top:15px;left:15px;width:30px;height:30px;background-size:contain}#custom-submenu-item-king-s-crowns .icon{filter:sepia(1) brightness(.5)}.mouseView-statsContainer-block-padding abbr{text-decoration:none}.mouseView-statsContainer-block-padding{padding:5px}a.mouseListView-categoryContent-subgroup-mouse-thumb{position:relative}.crown .mouseListView-categoryContent-subgroup-mouse-thumb:after{position:absolute;top:-4px;left:-8px;z-index:2;width:20px;height:20px;content:"";background-color:#fdfdfa;background-size:contain;border:1px solid #929292;border-radius:50%}.crown.bronze .mouseListView-categoryContent-subgroup-mouse-thumb:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_bronze.png)}.crown.silver .mouseListView-categoryContent-subgroup-mouse-thumb:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_silver.png)}.crown.gold .mouseListView-categoryContent-subgroup-mouse-thumb:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_gold.png)}.crown.diamond .mouseListView-categoryContent-subgroup-mouse-thumb:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_diamond.png)}.crown.platinum .mouseListView-categoryContent-subgroup-mouse-thumb:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_platinum.png)}.mouseListView-categoryContent-subgroup-mouse-thumb,.mouseListView-categoryContent-subgroup-mouse .mouseListView-categoryContent-subgroup-mouse-margin{transition:.2s ease-in}.mouseListView-categoryContent-subgroup-mouse-thumb:hover{transform:scale(1.2)}.mouseListView-categoryContent-subgroup-mouse-margin{border:1px solid #e6e6e6;box-shadow:none}.mouseListView-categoryContent-subgroup-mouse:hover .mouseListView-categoryContent-subgroup-mouse-margin{border-color:#cdcdcd;box-shadow:none;transition:none}.mouseViewPopup .mouseView-image:hover{box-shadow:none;transform:scale(.95)}.mouseViewPopup .showLargeImage .mouseView-image:hover{transform:scale(1)}.mouseViewPopup .mouseView-image{margin-bottom:10px;transition:.2s ease-in}.mouseViewPopup .mouseView-descriptionContainer{display:grid;grid-template-columns:4fr 2fr;justify-items:stretch}.mouseViewPopup .mouseView-values{margin-left:0}.mouseViewPopup .mouseView-description{grid-column:span 2;padding-top:5px}.mouseViewPopup .mouseView-group.mouseview-title-group{text-align:right}img.minluck-power-type-img{width:20px}li.minluck-item{display:inline-flex;gap:2px;align-items:center;width:auto;padding:2px 3px;margin:2px;font-size:12px;background-color:#f2f2f2;border:1px solid #ccc;border-radius:8px}ul.minluck-list{display:flex;flex-wrap:wrap;place-content:center flex-start;width:auto;margin-right:-5px}.minluck-title{display:flex;align-items:center;justify-content:space-between;padding-bottom:2px;margin-top:10px;margin-bottom:5px;font-size:12px;font-weight:900;border-bottom:1px solid #ccc}.mouseview-relicHunter{display:flex;align-items:center;justify-content:space-around;width:100%;padding:10px;font-size:15px;background-color:#edd1f3;border-radius:10px}.mouseListView-categoryContent-subgroup-mouse-stats.catches,.mouseListView-categoryContent-subgroup-mouse-stats.misses{width:13%}.mouseListView-categoryContent-subgroup-mouse-stats.average_weight,.mouseListView-categoryContent-subgroup-mouse-stats.heaviest_catch{width:15%;text-align:center}.mouseListView-categoryContent-subgroup-mouse-stats.name{width:44%}.mouseListView-categoryContent-subgroup-mouse-thumb-name{width:auto}.mouseListView-categoryContent-filter-option:hover{color:#fff;background:#354661}.mouseListView-categoryContent-filter-option{margin-left:5px}.mouseView .mouseView-imageContainer a.custom-favorite-button{opacity:0;transition:.2s ease-in}.mouseView .mouseView-imageContainer:hover a.custom-favorite-button{opacity:1}.mouseListView-category-name{padding-left:10px}#overlayPopup.mouseViewPopup #jsDialogClose{right:6px}.mouseListView-categoryContent-subgroup-miceContainer{border:none}.mouseListView-categoryContent-subgroup-name{font-size:12px;border-radius:5px}.mouseListView-categoryContent-subgroup-mouse.stats.header{border-radius:5px}.mouseListView-subcategory,.mouseListView-subcategory:last-child{border-color:#ccc}.mouseListView-categoryContent-subgroup-mouse-numCatches.bronze:before,.mouseListView-categoryContent-subgroup-mouse-numCatches.silver:before,.mouseListView-categoryContent-subgroup-mouse-numCatches.gold:before,.mouseListView-categoryContent-subgroup-mouse-numCatches.platinum:before,.mouseListView-categoryContent-subgroup-mouse-numCatches.diamond:before{opacity:.5}
`;
}
});
var getLinkMarkup2, addLinks2, isFavorite, addFavoriteButton, addMinluck, addWisdom, updateMouseView, _original, replaceShowMouseImage, addShowMouseToNewJournalEntries, main5, wisdoms, minlucks, init27, better_mice_default, init_better_mice = __esm({
"src/modules/better-mice/index.js"() {
init_utils2();
init_hover_mice();
init_mouse_page();
init_settings11();
init_sidebar();
init_styles31();
getLinkMarkup2 = (name, id) => makeLink("MHCT AR", `https://api.mouse.rip/mhct-redirect/${id}`) + makeLink("Wiki", `https://mhwiki.hitgrab.com/wiki/index.php/${encodeURIComponent(name.replaceAll(" ", "_"))}`, !0), addLinks2 = (id) => {
let title = document.querySelector(".mouseView-title");
if (!title)
return;
let currentLinks = document.querySelector(".mh-ui-mouse-links");
currentLinks && currentLinks.remove();
let div = document.createElement("div");
div.classList.add("mh-ui-mouse-links"), div.innerHTML = getLinkMarkup2(title.innerText, id), title.parentNode.insertBefore(div, title);
let values = document.querySelector(".mouseView-values"), desc = document.querySelector(".mouseView-descriptionContainer");
values && desc && desc.insertBefore(values, desc.firstChild);
}, isFavorite = (mouseId) => __async(void 0, null, function* () {
var _a, _b, _c, _d, _e;
let favorites = yield doRequest("managers/ajax/pages/page.php", {
page_class: "HunterProfile",
"page_arguments[tab]": "kings_crowns",
"page_arguments[sub_tab]": !1,
"page_arguments[snuid]": window.user.sn_user_id
});
return (_e = (_d = (_c = (_b = (_a = favorites == null ? void 0 : favorites.page) == null ? void 0 : _a.tabs) == null ? void 0 : _b.kings_crowns) == null ? void 0 : _c.subtabs[0]) == null ? void 0 : _d.mouse_crowns) != null && _e.favourite_mice.length ? favorites.page.tabs.kings_crowns.subtabs[0].mouse_crowns.favourite_mice.some((mouse) => mouse.id && mouse.id === Number.parseInt(mouseId, 10)) : !1;
}), addFavoriteButton = (mouseId, mouseView) => __async(void 0, null, function* () {
let state = yield isFavorite(mouseId), fave = yield makeFavoriteButton({
target: mouseView,
size: "large",
isSetting: !1,
state,
/**
* Save the favorite state when the button is clicked.
*/
onChange: () => {
doRequest("managers/ajax/mice/mouse_crowns.php", {
action: "toggle_favourite",
user_id: window.user.user_id,
mouse_id: mouseId
});
}
}), mouseviewImage = mouseView.querySelector(".mouseView-imageContainer");
mouseviewImage ? mouseviewImage.append(fave) : mouseView.append(fave);
}), addMinluck = (mouseId, mouseView) => __async(void 0, null, function* () {
let appendTo = mouseView.querySelector(".mouseView-contentContainer");
if (!appendTo)
return;
let minluckContainer = makeElement("div", "minluck-container"), titleText = makeElement("div", "minluck-title", "Minlucks");
makeTooltip({
appendTo: titleText,
text: "If your current luck is above the minluck, you are guaranteed to catch the mouse if you attract it."
}), minluckContainer.append(titleText);
let minluckList = makeElement("ul", "minluck-list");
minlucks || (minlucks = yield getData("minlucks"));
let minluck = minlucks.find((m) => m.id === Number.parseInt(mouseId, 10)), mouseMinlucks = (minluck == null ? void 0 : minluck.minlucks) || {};
Object.keys(mouseMinlucks).forEach((powerType) => {
if (!mouseMinlucks[powerType] || mouseMinlucks[powerType] === "\u221E")
return;
let minluckItem = makeElement("li", "minluck-item"), powerTypeImg = makeElement("img", "minluck-power-type-img");
powerTypeImg.src = `https://www.mousehuntgame.com/images/powertypes/${powerType.toLowerCase()}.png`, minluckItem.append(powerTypeImg), makeElement("div", "minluck-power-type-minluck", mouseMinlucks[powerType], minluckItem), minluckList.append(minluckItem);
}), minluckContainer.append(minluckList), appendTo.append(minluckContainer);
}), addWisdom = (mouseId, mouseView) => __async(void 0, null, function* () {
let values = mouseView.querySelector(".mouseView-values");
if (!values)
return;
wisdoms || (wisdoms = yield getData("wisdom"));
let wisdom = wisdoms.find((m) => m.id === Number.parseInt(mouseId, 10));
wisdom = (wisdom == null ? void 0 : wisdom.wisdom) || 0, wisdom = wisdom.toString().replaceAll(/\B(?=(\d{3})+(?!\d))/g, ","), makeElement("span", "wisdom-container", ` / ${wisdom} Wisdom`, values);
}), updateMouseView = () => __async(void 0, null, function* () {
let mouseView = document.querySelector("#overlayPopup .mouseView");
if (!mouseView)
return;
let mouseId = mouseView.getAttribute("data-mouse-id");
if (!mouseId || !mouseView.querySelector(".mouseView-title"))
return;
let catchesEl = document.querySelectorAll(".mouseView-statsContainer-block-padding td abbr");
catchesEl && catchesEl.length > 0 && catchesEl.forEach((el) => {
let catchesNumber = el.getAttribute("title").replace(" Catches", "").replace(" catches", "").replace(" Misses", "").replace(" misses", "").trim();
catchesNumber && (el.innerText = catchesNumber);
}), addLinks2(mouseId), addFavoriteButton(mouseId, mouseView), addMinluck(mouseId, mouseView), addWisdom(mouseId, mouseView), mouseView.classList.add("mouseview-has-mhct");
let group = document.querySelector(".mouseView-group");
if (group) {
group.classList.add("mouseview-title-group");
let descContainer = document.querySelector(".mouseView-descriptionContainer");
descContainer && (descContainer.childNodes.length > 1 ? descContainer.insertBefore(group, descContainer.childNodes[1]) : descContainer.append(group));
}
let groupTitle = mouseView.querySelector(".mouseView-group.mouseview-title-group");
if (groupTitle) {
let newHtml = groupTitle.innerHTML.replace("Group: ", ""), subGroups = newHtml.split("(");
subGroups.length > 1 ? (newHtml = `<span class="mouseview-group">${subGroups[0]}</span><span class="mouseview-subgroup">(${subGroups[1]}</span>`, groupTitle.classList.add("mouseview-title-group-has-subgroup")) : newHtml = `<span class="mouseview-group">${newHtml}</span>`, groupTitle.innerHTML = newHtml;
}
let container = mouseView.querySelector(".mouseView-contentContainer");
if (!container)
return;
let imageContainer = mouseView.querySelector(".mouseView-imageContainer");
if (imageContainer) {
let movedContainer = makeElement("div", "mouseView-movedContainer"), statsContainer = mouseView.querySelector(".mouseView-statsContainer");
statsContainer && movedContainer.append(statsContainer);
let weaknessContainer = mouseView.querySelector(".mouseView-weaknessContainer");
if (weaknessContainer && (movedContainer.append(weaknessContainer), weaknessContainer.querySelectorAll(".mouseView-categoryContent-subgroup-mouse-weaknesses-padding").forEach((w) => {
w.querySelector(".mouseView-weakness") || (w.classList.add("mouseview-weakness-empty"), w.classList.add("hidden"));
})), Number.parseInt(mouseId, 10) === 401) {
let location = yield getRelicHunterLocation();
if (location && location.name) {
let relicHunterBox = makeElement("div", ["mouseview-relicHunter", "mouseview-relicHunter"]);
makeElement("div", "hint", location.name, relicHunterBox);
let button = makeElement("div", ["mousehuntActionButton", "small"]);
makeElement("span", "", "Travel", button), button.addEventListener("click", () => {
app.pages.TravelPage.travel(location.id), setPage("Camp");
}), relicHunterBox.append(button), movedContainer.append(relicHunterBox);
}
}
imageContainer.append(movedContainer);
}
if (!getSetting("better-mice.show-attraction-rates", !0))
return;
let arWrapper = makeElement("div", "ar-wrapper"), title = makeElement("div", "ar-header"), titleText = makeElement("div", "ar-title", "Attraction Rates", title);
makeTooltip({
appendTo: titleText,
text: 'The best location and bait, according to data gathered by <a href="https://mhct.win/" target="_blank" rel="noopener noreferrer">MHCT</a>.'
});
let link = makeElement("a", "ar-link", "View on MHCT \u2192");
link.href = `https://api.mouse.rip/mhct-redirect/${mouseId}`, link.target = "_mhct", title.append(link), arWrapper.append(title);
let mhctJson = yield getArForMouse(mouseId, "mouse");
if (!mhctJson || mhctJson === void 0 || mhctJson.length === 0 || "error" in mhctJson)
return;
mhctJson = mhctJson.slice(0, 15);
let miceArWrapper = makeElement("div", "mice-ar-wrapper"), hasStages = mhctJson.some((mouseAr) => mouseAr.stage);
hasStages && miceArWrapper.classList.add("has-stages");
let calculateWidths = (weights) => {
weights = __spreadValues({
average: 0.8,
median: 0.5,
max: 0.4,
shortest: 0.9,
location: 0.4,
stage: 0.6,
cheese: 0.6,
keyWidth: 10
}, weights);
let availableWidth = 390 - 10 * 3 - (hasStages ? 10 : 0), calculateLengths = (key) => {
let keyLengths = mhctJson.map((mouseAr) => {
var _a;
return ((_a = mouseAr[key]) == null ? void 0 : _a.length) || 0;
}).filter((l) => l > 0);
keyLengths.sort((a, b) => a - b);
let avgLength = keyLengths.reduce((a, b) => a + b, 0) / keyLengths.length, medianLength = keyLengths.length % 2 === 0 ? (keyLengths[keyLengths.length / 2 - 1] + keyLengths[keyLengths.length / 2]) / 2 : keyLengths[Math.floor(keyLengths.length / 2)];
return {
avg: avgLength * weights.keyWidth,
median: medianLength * weights.keyWidth,
max: Math.max(...keyLengths) * weights.keyWidth,
shortest: Math.min(...keyLengths) * weights.keyWidth
};
}, lengths = {
location: calculateLengths("location"),
stage: hasStages ? calculateLengths("stage") : { avg: 1, median: 1, max: 1, shortest: 1 },
cheese: calculateLengths("cheese")
}, weightedWidths = {
location: (lengths.location.avg * weights.average + lengths.location.max * weights.max + lengths.location.median * weights.median + lengths.location.shortest * weights.shortest) * weights.location,
stage: hasStages ? (lengths.stage.avg * weights.average + lengths.stage.max * weights.max + lengths.stage.median * weights.median + lengths.stage.shortest * weights.shortest) * weights.stage : 0,
cheese: (lengths.cheese.avg * weights.average + lengths.cheese.max * weights.max + lengths.cheese.median * weights.median + lengths.cheese.shortest * weights.shortest) * weights.cheese
}, totalWeightedWidth = weightedWidths.location + weightedWidths.stage + weightedWidths.cheese, calculateOptimalWidth = (key) => {
let optimalWidth = weightedWidths[key] / totalWeightedWidth * availableWidth;
return Math.floor(optimalWidth);
};
return {
locationWidth: calculateOptimalWidth("location"),
stageWidth: hasStages ? calculateOptimalWidth("stage") : 0,
cheeseWidth: calculateOptimalWidth("cheese")
};
}, locationWidth, stageWidth, cheeseWidth;
if (!getFlag("better-mice-no-new-ar-widths")) {
let widths = calculateWidths();
locationWidth = widths.locationWidth, stageWidth = widths.stageWidth, cheeseWidth = widths.cheeseWidth;
}
mhctJson.forEach((mouseAr) => {
let mouseArWrapper = makeElement("div", "mouse-ar-wrapper");
getFlag("better-mice-no-new-ar-widths") || (mouseArWrapper.style.gridTemplateColumns = hasStages ? `${locationWidth}px ${stageWidth}px ${cheeseWidth}px 50px` : `${locationWidth}px ${cheeseWidth}px 50px`), makeElement("div", "location", mouseAr.location, mouseArWrapper), hasStages && makeElement("div", "stage", mouseAr.stage ? mouseAr.stage.replace("/", " / ").replace("  /  ", " / ") : "", mouseArWrapper), makeElement("div", "cheese", mouseAr.cheese, mouseArWrapper), makeElement("div", "rate", `${(mouseAr.rate / 100).toFixed(2)}%`, mouseArWrapper), miceArWrapper.append(mouseArWrapper);
}), mhctJson.length > 0 && (arWrapper.append(miceArWrapper), container.append(arWrapper));
}), replaceShowMouseImage = () => {
_original || (_original = hg.views.MouseCrownsView.showMouseImage, hg.views.MouseCrownsView.showMouseImage = (element2) => {
let type2 = element2.getAttribute("data-mouse-type");
if (type2) {
hg.views.MouseView.show(type2);
return;
}
_original(element2);
});
}, addShowMouseToNewJournalEntries = () => {
let newEntries = document.querySelectorAll(".newEntry");
newEntries.length && newEntries.forEach((entry) => {
let mouseType = entry.getAttribute("data-mouse-type"), journalImageLink = entry.querySelector(".journalimage a");
!mouseType || !journalImageLink || journalImageLink.addEventListener("click", (e) => {
e.preventDefault(), hg.views.MouseView.show(mouseType);
});
});
}, main5 = () => __async(void 0, null, function* () {
onOverlayChange({ mouse: { show: updateMouseView } }), minlucks = yield getData("minlucks"), wisdoms = yield getData("wisdom"), addSubmenuItem({
menu: "mice",
label: "Groups",
icon: "https://www.mousehuntgame.com/images/ui/hud/menu/mice.png",
href: "https://www.mousehuntgame.com/adversaries.php?tab=groups"
}), addSubmenuItem({
menu: "mice",
label: "Regions",
icon: "https://www.mousehuntgame.com/images/ui/hud/menu/travel.png",
href: "https://www.mousehuntgame.com/adversaries.php?tab=regions"
}), addSubmenuItem({
menu: "mice",
label: "Your Stats",
icon: "https://www.mousehuntgame.com/images/ui/hud/menu/special.png",
href: "https://www.mousehuntgame.com/adversaries.php?tab=your_stats"
}), addSubmenuItem({
menu: "mice",
label: "King's Crowns",
icon: "https://www.mousehuntgame.com/images/ui/crowns/crown_silver.png",
href: "https://www.mousehuntgame.com/adversaries.php?tab=kings_crowns"
});
}), init27 = () => __async(void 0, null, function* () {
addStyles(styles_default30, "better-mice"), main5(), mouse_page_default(), getSetting("better-mice.show-mouse-hover", !0) && hover_mice_default(), getSetting("better-mice.show-mice-sidebar", !0) && sidebar_default(), replaceShowMouseImage(), onTurn(addShowMouseToNewJournalEntries, 100);
}), better_mice_default = {
id: "better-mice",
name: "Better Mice",
type: "better",
default: !0,
description: "Add attraction rate stats and links to MH Wiki and MHCT to mouse dialogs. Sort the mouse stats pages and add the King\u2019s Crown tab to the mouse pages.",
load: init27,
settings: settings_default10
};
}
});
var styles_default31, init_styles32 = __esm({
"src/modules/hide-news-ticker/styles.css"() {
styles_default31 = `.mousehuntHeaderView-newsTicker{display:none}
`;
}
});
var init28, hide_news_ticker_default, init_hide_news_ticker = __esm({
"src/modules/hide-news-ticker/index.js"() {
init_utils2();
init_styles32();
init28 = () => __async(void 0, null, function* () {
addStyles(styles_default31, "hide-news-ticker");
}), hide_news_ticker_default = {
id: "hide-news-ticker",
name: "Hide News Ticker",
type: "element-hiding",
default: !0,
description: "Hide the news ticker in the header.",
load: init28
};
}
});
var markethunt_default, init_markethunt = __esm({
"src/modules/native-dark-mode/styles/markethunt.css"() {
markethunt_default = `.mh-dark .marketplaceContentContainer #chartArea,.mh-dark .marketplaceContentContainer #stockChartContainer{background-color:#2d2d2d!important}.mh-dark .marketplaceContentContainer #chartArea svg.highcharts-root,.mh-dark .marketplaceContentContainer #chartArea .highcharts-series,.mh-dark .marketplaceContentContainer #chartArea .highcharts-markers,.mh-dark .marketplaceContentContainer #chartArea .highcharts-legend-item path,.mh-dark .marketplaceContentContainer #chartArea .highcharts-legend-item rect{filter:invert(1)}.marketplaceView-item-averagePrice.infobox-stat img{display:none}.marketplaceView-item-averagePrice.infobox-stat #infoboxSbPrice:after{display:inline-block;width:16px;height:16px;vertical-align:bottom;content:"";background:url(https://www.mousehuntgame.com/images/items/bait/large/32b20c3984d2f03b132c295ea3b99e7e.png);background-repeat:no-repeat;background-size:contain}.mh-dark .marketplaceContentContainer #chartArea .cl-switch .label,.mh-dark .marketplaceContentContainer #chartArea #markethuntInfobox,.mh-dark .marketplaceContentContainer #chartArea #markethuntInfobox .marketplaceView-goldValue{color:var(--d-text-muted)}
`;
}
});
var inbox_default, init_inbox = __esm({
"src/modules/native-dark-mode/styles/inbox.css"() {
inbox_default = `.mh-dark #messengerUINotification{background-color:var(--d-bg)!important;border-color:var(--d-border)}.mh-dark #messengerUINotification .tabs a.active{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark #messengerUINotification .notificationHeader{background-color:var(--d-bg)}.mh-dark #messengerUINotification .tabs a,.mh-dark #messengerUINotification .tabs a:hover,.mh-dark #messengerUINotification .tabs a:visited{color:var(--d-text-muted);background-color:var(--d-bg);border-color:var(--d-border);border-right:none}.mh-dark #messengerUINotification .tabs a:hover,.mh-dark #messengerUINotification .tabs a.active{background-color:var(--d-alt)}.mh-dark #messengerUINotification .tabs a.active .arrow{border-left-color:var(--d-alt)}.mh-dark .notificationMessageList .message:nth-child(2n){background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .notificationMessageList .message:nth-child(odd){background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .notificationMessageList .message .clear-block{color:var(--d-text)}.mh-dark .notificationMessageList .message a{color:var(--d-link)}.mh-dark .notificationMessageList .message .date{color:var(--d-text-muted)}.mh-dark #messengerUINotification .tabs a.active .arrowShadow{border-left-color:var(--d-border)}.mh-dark .notificationMessageList .tab[data-tab=news] .message{background-color:var(--d-yellow)}.mh-dark .notificationMessageList .tab[data-tab=news] .message .clear-block,.mh-dark .notificationMessageList .tab[data-tab=news] .message .date{color:var(--d-text-dark)}.mh-dark #messengerUINotification .messengerUINotificationClose{color:var(--d-text-muted);background-color:var(--d-action);border-color:var(--d-border)}.mh-dark #messengerUINotification .messengerUINotificationClose:hover{background-color:var(--d)}.mh-dark .notificationMessageList .message .messageText{color:var(--d-text-muted)}.mh-dark .notificationMessageList .news.message .messageText{color:var(--d-text-dark)}
`;
}
});
var hover_items_default, init_hover_items = __esm({
"src/modules/native-dark-mode/styles/hover-items.css"() {
hover_items_default = `.mh-dark #friend-data-wrapper,.mh-dark #friend-data-wrapper .friendsPage-friendRow,.mh-dark #friend-data-wrapper .friendsPage-friendRow-statsContainer,.mh-dark #mouse-data-wrapper,.mh-dark #item-data-wrapper{color:var(--d-text);background:var(--d);border:var(--d-black);box-shadow:0 1px 5px -1px var(--d-action)}.mh-dark #friend-data-wrapper .friendsPage-friendRow-stat span,.mh-dark #friend-data-wrapper .friendsPage-friendRow-stat a{color:var(--d-text)}.mh-dark #friend-data-wrapper .friendsPage-friendRow-statsContainer{background:var(--d);box-shadow:0 10px 30px var(--d-alt) inset}.mh-dark #friend-data-wrapper a.userInteractionButtonsView-button{border-radius:25%;box-shadow:0 0 2px 1px var(--d-black) inset}.mh-dark #friend-data-wrapper .userInteractionButtonsView-button:hover:before,.mh-dark #friend-data-wrapper .userInteractionButtonsView-button.busy:before{border-radius:25%}
`;
}
});
var mice_default, init_mice = __esm({
"src/modules/native-dark-mode/styles/mice.css"() {
mice_default = `.mh-dark .mouseListView-categoryContent-name{color:var(--d-text)}.mh-dark .mouseListView-category-margin{padding-bottom:5px;color:var(--d-text-muted);background:var(--d-bg);border:1px solid var(--d-border);border-right:none;border-radius:10px 0 0 10px}.mh-dark .mouseListView-categoryContent-subgroupContainer{border-radius:5px 5px 10px 10px}.mh-dark .mouseListView-categoryContent-subgroup-name,.mh-dark .mouseListView-categoryContent-weaknessesContainer{background-color:var(--d-alt);border:1px solid var(--d-border)}.mh-dark .mouseListView-categoryContent-subgroup-name{margin:0;border:none}.mh-dark .mouseListView-categoryContent:before{left:0;background-color:var(--d-border)}.mh-dark .mouseListView-categoryContainer.active{color:var(--d-text-dark)}.mh-dark .mouseListView-categoryContainer.active .mouseListView-category-progress,.mh-dark .mouseListView-categoryContainer.active .mouseListView-category-name{color:var(--d-text)}.mh-dark .mouseListView-categoryContent-subgroup-mouse-margin{color:var(--d-text);background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .adversariesPage-list-header{background-color:var(--d-bg);border-color:var(--d-border);box-shadow:none}.mh-dark .adversariesPage-list-header label{color:var(--d-text)}.mh-dark .mouseListView-categoryContent-subgroup-mouse.stats:nth-child(odd){background-color:transparent}.mh-dark .mouseListView-categoryContent-subgroup-mouse:hover .mouseListView-categoryContent-subgroup-mouse-margin{background-color:var(--d-bg);border-color:var(--d-action)}.mh-dark .mouseListView-categoryContent-filter-option{margin-left:1px;color:var(--d-text);background-color:var(--d-bg-alt);border:1px solid var(--d-border)}.mh-dark .mouseListView-categoryContent-subgroup-mouse.stats.header{background-color:var(--d)!important}.mh-dark .mouseListView-categoryContent-subgroup-miceContainer{border:none}.mh-dark .mouseListView-category,.mh-dark .mouseListView-category:hover{background:none}.mh-dark .mouseListView-category:hover .mouseListView-category-margin,.mh-dark .mouseListView-categoryContainer.active .mouseListView-category .mouseListView-category-margin{color:var(--d-text-muted);background-color:var(--d-blue-darker)}.mh-dark .mouseListView-category{padding-bottom:5px}.mh-dark .mouseListView-category.complete .mouseListView-category-status,.mh-dark .mouseListView-subcategory.complete:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/camp/re_engagement/popup/check.png);background-size:contain}.mh-dark .mouseListView-categoryContent-category{background-color:transparent}.mh-dark .mouseListView-subcategory{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .mouseListView-categoryContainer.active .mouseListView-category{padding-bottom:3px;background:none}.mh-dark .mouseListView-categoryContainer.active .mouseListView-subcategory:hover{color:var(--d-text-muted);background-color:var(--d-blue-darker)}.mh-dark .mouseCrownsView-group{background-color:var(--d-bg);border-color:var(--d-border);box-shadow:0 0 1px 1px var(--d-border)}.mh-dark .mouseCrownsView-group-mouse.highlight.favourite{border-color:var(--d-border)}.mh-dark .mouseCrownsView-group.favourite .mouseCrownsView-group-header{background-color:var(--d-transparent-10)!important;box-shadow:0 0 1px 1px var(--d-border)}.mh-dark .mouseCrownsView-group-header-name{color:var(--d-text)}.mh-dark .mouseCrownsView-group-header b{color:var(--d-text-dark)}.mh-dark .mouseCrownsView-group.favourite .mouseCrownsView-group-header b{color:var(--d-text)}.mh-dark .mouseCrownsView-group.diamond .mouseCrownsView-group-header{box-shadow:inset 0 0 1px 1px #b6d9fc}.mh-dark .mouseCrownsView-group.diamond{background-color:var(--d-blue-darker);box-shadow:0 0 1px 1px var(--d-blue-dark)}.mh-dark .mouseCrownsView-group.gold{background-color:var(--d-yellow);box-shadow:0 0 1px 1px var(--d-yellow-dark)}.mh-dark .mouseCrownsView-group.silver{background-color:var(--d-blue-dark);box-shadow:0 0 1px 1px var(--d-blue)}.mh-dark .mouseCrownsView-group.platinum{background-color:var(--d-purple-dark);box-shadow:0 0 1px 1px var(--d-purple)}.mh-dark .mouseCrownsView-group.bronze{background-color:var(--d-orange);box-shadow:0 0 1px 1px var(--d-orange-dark)}.mh-dark .mouseListView-categoryContent-subgroup-mouse-numCatches:before{background-color:var(--d-black);box-shadow:0 1px 2px #000,inset -1px -1px 10px #6a6a6a}.mh-dark .mouseListView-categoryContent-weaknesses-label{border-right-color:var(--d)}.mh-dark .mouseListView-categoryContent-subgroup-mouse.stats.header .mouseListView-categoryContent-subgroup-mouse-margin{padding:8px 5px;margin:0}
`;
}
});
var journal_preview_default, init_journal_preview = __esm({
"src/modules/native-dark-mode/styles/journal-preview.css"() {
journal_preview_default = `.mh-dark .mousehuntTabContentContainer-padding{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border);box-shadow:none}.mh-dark .journalThemeSelectorView-category-description{background-color:var(--d);border-color:var(--d-border)}.mh-dark .journalThemeSelectorView-theme-image{border:none}.mh-dark .journalThemeSelectorView-theme{color:var(--d-text)}.mh-dark .journalThemeSelectorView-tag-name{border-color:var(--d-border)}.mh-dark .journalThemeSelectorView-theme.active{color:var(--d-text);background-color:var(--d-blue)}.mh-dark .journalThemeSelectorView-theme:hover{color:var(--d-text);background-color:var(--d-action)}.mh-dark .journalThemeSelectorView-theme.disabled{color:var(--d-text-muted)}
`;
}
});
var header_dropdown_default, init_header_dropdown = __esm({
"src/modules/native-dark-mode/styles/header-dropdown.css"() {
header_dropdown_default = `.mh-dark .mousehuntHeaderView .dropdownContent{color:var(--d-color);background-color:var(--d);border-color:var(--d-border)}.mh-dark .mousehuntHeaderView .menuItem.sidebar .dropdownContent .pageSidebarView-user a:nth-child(2){color:var(--d-link)}.mh-dark .mousehuntHeaderView .menuItem.sidebar .dropdownContent a.pageSidebarView-user-logout{color:var(--d-link)}.mh-dark .mousehuntHeaderView .dropdownContent a{color:var(--d-text);border-color:var(--d-border)}.mh-dark .regionName{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .regionWrapper{border-color:var(--d-border)}.mh-dark .locationWrapper{background-color:var(--d)}.mh-dark .locationWrapper:nth-child(2n){background-color:var(--d-alt)}.mh-dark .dashboardWrapper{border-color:var(--d-border);box-shadow:none}.mh-dark .scoreboardRelativeRankingTableView-table{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .mousehuntHeaderView .menuItem.sidebar .dropdownContent .scoreboardRankingsWrapper a{color:var(--d-link)}.mh-dark .scoreboardRelativeRankingTableView-table tr.highlight{color:var(--d-text-dark);background-color:var(--d-yellow)}.mh-dark .scoreboardRelativeRankingTableView-table tr.highlight a{color:var(--d-purple-dark)}
`;
}
});
var adventure_default, init_adventure = __esm({
"src/modules/native-dark-mode/styles/adventure.css"() {
adventure_default = `.mh-dark .adventureBookPopup-adventure-details{background-color:var(--d)}.mh-dark .adventureBookPopup-adventure-details a{color:var(--d-link)}.mh-dark .adventureBookPopup-adventure-details-block-goalGroup.visible{background-color:var(--d-bg);border:1px solid var(--d-border);box-shadow:none}.mh-dark .adventureBookPopup-adventure-details-powerTypeContainer{margin-right:0;margin-left:0;background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .adventureBookPopup-adventure-footer{color:var(--d-text);background-color:var(--d-alt)}.mh-dark .adventureBookPopup-adventure-details-description-reason{color:var(--d-text-dark);background-color:var(--d-orange)}.mh-dark a.adventureBookPopup-title,.mh-dark a.adventureBookPopup-title.complete{color:var(--d-text);background-color:var(--d);border-color:var(--d-border)}.mh-dark a.adventureBookPopup-title.complete{background-color:var(--d-alt)}.mh-dark .adventureBookPopup-adventure-details-block-step.multi_choice{background-color:var(--d)}.mh-dark .adventureBookBanner-goalImage{outline:none}.mh-dark .pageFrameView #mousehuntContainer.PageCamp .adventureBookBanner-adventureName{color:var(--d-text)}.mh-dark .adventureBookPopup-titleDirectory,.mh-dark a.adventureBookPopup-title.active{border-color:var(--d-border)}.mh-dark .adventureBookPopup-title-margin{color:var(--d-text)}.mh-dark .adventureBookPopup-adventure-header-title,.mh-dark .adventureBookPopup-adventure-header-duration{color:var(--d-black);text-shadow:none}.mh-dark a.adventureBookPopup-title.active .adventureBookPopup-title-margin{color:var(--d-text-muted)}.mh-dark .adventureBookPopup-adventureContainer,.mh-dark .adventureBookPopup-adventure-details-block-goalGroup-container{border-color:var(--d-border)}.mh-dark .claimed .adventureBookPopup-adventure-header,.mh-dark .adventureBookPopup-adventureContainer.canClaim .adventureBookPopup-adventure-footer,.mh-dark .adventureBookPopup-adventureContainer.claimed .adventureBookPopup-adventure-footer{background-color:var(--d-green)}.mh-dark a.adventureBookPopup-adventure-button{color:var(--d-text-dark)}.mh-dark .adventureBookBanner-goalName-padding a{color:var(--d-link)}
`;
}
});
var team_default, init_team = __esm({
"src/modules/native-dark-mode/styles/team.css"() {
team_default = `.mh-dark .teamPage-messageBoard-corkboard div.messageBoardView-message-container{box-shadow:none}.mh-dark .scoreboardTableView-tournament-property b{color:var(--d-yellow-dark)}
`;
}
});
var location_catch_stats_default, init_location_catch_stats = __esm({
"src/modules/native-dark-mode/styles/location-catch-stats.css"() {
location_catch_stats_default = `.mh-catch-stats-wrapper .mh-catch-stats:nth-child(odd){background-color:var(--d-bg-alt)}.mh-catch-stats{color:var(--d-text);background-color:var(--d-bg)}.mh-catch-stats-header{background-color:var(--d-alt);border-color:var(--d-border)}.mh-catch-stats-wrapper{background-color:var(--d-bg);border-color:var(--d-border);box-shadow:1px 1px 1px var(--d-transparent-50),1px 3px 5px #6a6969}.mh-catch-stats:hover,.mh-catch-stats-wrapper .mh-catch-stats:nth-child(odd):hover,.mh-catch-stats:focus,.mh-catch-stats-wrapper .mh-catch-stats:nth-child(odd):focus{color:var(--d-text);background-color:var(--d-action);outline-color:var(--d-border)}
`;
}
});
var news_default, init_news = __esm({
"src/modules/native-dark-mode/styles/news.css"() {
news_default = `.mh-dark .mousehuntHeaderView-newsTicker{border-color:var(--d-border)}.mh-dark .mousehuntHeaderView-newsTicker a{color:var(--d-link)}.mh-dark .mousehuntHeaderView-newsTicker .label{color:var(--d-text)}.mh-dark #mousehuntContainer.PageNewsPost,.mh-dark #mousehuntContainer.PageNews,.mh-dark #mousehuntContainer .PageNews{background:transparent}.mh-dark .newsArchivesListView-post{color:var(--d-text);background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .newsArchivesListView-post a{color:var(--d-link)}.mh-dark .newsArchivesListView.loading .newsArchivesListView-page:before{background:none}.mh-dark .newsArchivesListView-post-details,.mh-dark .mousehuntPage-content .newsArchivesListView h1{color:var(--d-text-muted)}.mh-dark .newsPostBody{color:var(--d-text)}
`;
}
});
var tabs_default2, init_tabs2 = __esm({
"src/modules/native-dark-mode/styles/tabs.css"() {
tabs_default2 = `.mh-dark .mousehuntHud-page-tabHeader span,.mh-dark .mousehuntHud-page-tabHeader.active span,.mh-dark .mousehuntHud-page-tabHeader:hover span,.mh-dark .mousehuntHud-page-tabHeader:focus span{color:var(--d-text);background-color:var(--d-alt);border-color:var(--d-border);border-bottom-color:var(--d-alt);box-shadow:1px 1px 1px var(--d-border)}.mh-dark .mousehuntHud-page-tabHeader.active span,.mh-dark .mousehuntHud-page-tabHeader:hover span{background-color:var(--d);border-bottom-color:var(--d);box-shadow:1px 1px 1px var(--d)}
`;
}
});
var journal_main_default, init_journal_main = __esm({
"src/modules/native-dark-mode/styles/journal-main.css"() {
journal_main_default = `.mh-dark .journalContainer .top a{color:var(--d-text-dark)}.mh-dark .journal a{color:var(--d-link)}.mh-dark .journal .content .entry{color:var(--d-text)!important;background-color:var(--d);border-color:var(--d-border)}.mh-dark .journal .content .entry a{color:var(--d-link)}.mh-dark .journal .content .entry .journalbody .journaldate{color:var(--d-text);border-bottom:1px solid var(--d-transparent-10)}.mh-dark .journal .content .entry.kings_giveaway_vault_prize_entry,.mh-dark .journal .content .entry.kings_giveaway_vault_prize_entry .journaldate,.mh-dark .journal .content .entry.badge,.mh-dark .journal .content .entry.badge .journalbody .journaldate{color:var(--d-text-dark)!important}.mh-dark .pagerView-container{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .journal .content .entry:last-child{border-bottom-color:#5b5b5b}.mh-dark .campPage-quests-objective-container{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .campPage-quests-objective{color:var(--d-text)}.mh-dark .campPage-quests-objective-container.locked{background-color:var(--d-alt);box-shadow:none}.mh-dark .campPage-quests-objective-container.complete .campPage-quests-objective{color:var(--d-text)}.mh-dark .campPage-quests-objective-container.complete{background-color:var(--d-green-dark);border-color:var(--d-border)}.mh-dark .pagerView-section.previous.active .pagerView-link,.mh-dark .pagerView-section.next.active .pagerView-link{color:var(--d-text-muted)}.mh-dark .journal-history-page-selector{background-color:var(--d-bg);border-color:var(--d-border);border-top:none}.mh-dark .journal-history-page-selector label{color:var(--d-text-muted)}.mh-dark .journal-history-page-selector button{color:var(--d-text-muted);background-color:var(--d-bg)}.mh-dark .journal.jsingle .close a:after{color:var(--d-red);background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .journal.jsingle .close a:hover:after{color:var(--d-red);background-color:var(--d-bg)}
`;
}
});
var settings_default11, init_settings12 = __esm({
"src/modules/native-dark-mode/styles/settings.css"() {
settings_default11 = `.mh-dark .PagePreferences__title,.mh-dark .mousehunt-improved-settings .PagePreferences__title,.mh-dark .PagePreferences__section,.mh-dark .mousehunt-improved-settings .PagePreferences__section,.mh-dark #mousehunt-improved-settings-location-hud .PagePreferences__title{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .PagePreferences__separator,.mh-dark #mousehunt-improved-settings-design-custom-background,.mh-dark #mousehunt-improved-settings-design-custom-hud,.mh-dark #mousehunt-improved-settings-design-custom-horn,.mh-dark #mousehunt-improved-settings-design-custom-shield,.mh-dark #mousehunt-improved-settings-feature-ultimate-checkmark-categories,.mh-dark #mousehunt-improved-settings-feature-ultimate-checkmark-show,.mh-dark .mousehunt-improved-settings .PagePreferences__settingsList,.mh-dark .mousehunt-improved-settings .PagePreferences__settingsList.active .PagePreferences__subSetting{border-color:var(--d-border)}.mh-dark .mousehunt-improved-settings .PagePreferences__settingsList.active .PagePreferences__subSetting:nth-child(odd){background-color:var(--d)}.mh-dark .mousehunt-improved-settings .PagePreferences__settingsList.active .PagePreferences__subSetting{border-color:var(--d-alt)}.mh-dark .mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__settingsList-mousehunt-improved-settings-better:before,.mh-dark .mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__settingsList-mousehunt-improved-settings-feature:before,.mh-dark .mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__settingsList-mousehunt-improved-settings-beta:before,.mh-dark #mousehunt-improved-settings-design-custom-background:before,.mh-dark #mousehunt-improved-settings-design-custom-horn:before,.mh-dark #mousehunt-improved-settings-design-custom-hud:before,.mh-dark #mousehunt-improved-settings-design-custom-shield:before,.mh-dark #mousehunt-improved-settings-feature-ultimate-checkmark-show:before{filter:invert(1)}.mh-dark h3.PagePreferences__titleText,.mh-dark .PagePreferences .mousehuntHud-page-tabContent.game_settings .PagePreferences__settingNameText,.mh-dark .PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .PagePreferences__settingNameText{color:var(--d-text)}.mh-dark .PagePreferences__settingDescription{color:var(--d-text-muted)}.mh-dark #mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList:nth-child(8n+1),.mh-dark #mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList:nth-child(8n+2),.mh-dark #mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList:nth-child(8n+3),.mh-dark #mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList:nth-child(8n+4),.mh-dark #mousehunt-improved-settings-location-hud-wrapper #mousehunt-improved-settings-location-hud-location-huds-bountiful-beanstalk-flip-avatar.PagePreferences__settingsList,.mh-dark #mousehunt-improved-settings-location-hud-wrapper #mousehunt-improved-settings-location-hud-location-huds-fi-draggable-airship.PagePreferences__settingsList{background-color:var(--d)}.mh-dark #mousehunt-improved-settings-location-hud-wrapper #mousehunt-improved-settings-location-hud-option-seperator{border-color:var(--d-border)}.mh-dark #mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList.highlight{background-color:var(--d-blue-dark)}.mh-dark #mousehunt-improved-settings-mousehunt-improved-settings-overrides-override-styles textarea,.mh-dark #mousehunt-improved-settings-mousehunt-improved-settings-overrides-override-flags input{color:var(--d-text);background-color:var(--d-action);border-color:var(--d-border)}.mh-dark .mousehuntSettingSlider{border-color:var(--d-border);box-shadow:0 0 7px var(--d-border) inset}.mh-dark .accountVerificationRewardsView__step.claimed{color:var(--d-text-dark);background-color:var(--d-green)}.mh-dark .accountVerificationRewardsView__step.can_claim{color:var(--d-text-dark);background-color:var(--d-yellow)}.mh-dark .mousehuntHud-page-tabContent.game_settings a,.mh-dark .mousehunt-improved-settings-export-details a{color:var(--d-link)}.mh-dark .mousehunt-improved-advanced-buttons{border-color:var(--d-border)}.mh-dark .mousehuntHud-page-tabContent.game_settings a.reset-link{color:var(--d-red)}.mh-dark .mh-utils-settings-refresh-message{color:var(--d-text-dark)}
`;
}
});
var overlays_default, init_overlays = __esm({
"src/modules/native-dark-mode/styles/overlays.css"() {
overlays_default = `.mh-dark #overlayPopup.treasureMapPopup .jsDialogContainer .content,.mh-dark #overlayPopup.itemViewPopup .jsDialogContainer .content,.mh-dark #overlayPopup.mouseViewPopup .jsDialogContainer .content,.mh-dark #overlayPopup.largerImage .jsDialogContainer .content,.mh-dark #overlayPopup.convertibleOpenViewPopup .jsDialogContainer .content,.mh-dark #overlayPopup.adventureBookPopup .jsDialogContainer .content,.mh-dark #overlayPopup.marketplaceViewPopup .jsDialogContainer .content,.mh-dark #overlayPopup.giftSelectorViewPopup .jsDialogContainer .content,.mh-dark #overlayPopup.supportPageContactUsForm .jsDialogContainer .content{color:var(--d-text);background-color:var(--d-bg)}.mh-dark #overlayPopup.treasureMapPopup .jsDialogContainer,.mh-dark #overlayPopup.itemViewPopup .jsDialogContainer,.mh-dark #overlayPopup.mouseViewPopup .jsDialogContainer,.mh-dark #overlayPopup.largerImage .jsDialogContainer,.mh-dark #overlayPopup.convertibleOpenViewPopup .jsDialogContainer,.mh-dark #overlayPopup.adventureBookPopup .jsDialogContainer,.mh-dark #overlayPopup.marketplaceViewPopup .jsDialogContainer,.mh-dark #overlayPopup.giftSelectorViewPopup .jsDialogContainer,.mh-dark #overlayPopup.supportPageContactUsForm .jsDialogContainer{background-color:var(--d-bg)}.mh-dark #overlayPopup.treasureMapPopup .jsDialogContainer .suffix,.mh-dark #overlayPopup.itemViewPopup .jsDialogContainer .suffix,.mh-dark #overlayPopup.mouseViewPopup .jsDialogContainer .suffix,.mh-dark #overlayPopup.largerImage .jsDialogContainer .suffix,.mh-dark #overlayPopup.convertibleOpenViewPopup .jsDialogContainer .suffix,.mh-dark #overlayPopup.adventureBookPopup .jsDialogContainer .suffix,.mh-dark #overlayPopup.marketplaceViewPopup .jsDialogContainer .suffix,.mh-dark #overlayPopup.giftSelectorViewPopup .jsDialogContainer .suffix,.mh-dark #overlayPopup.supportPageContactUsForm .jsDialogContainer .suffix{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark #overlayPopup.treasureMapPopup .jsDialogContainer .prefix,.mh-dark #overlayPopup.itemViewPopup .jsDialogContainer .prefix,.mh-dark #overlayPopup.mouseViewPopup .jsDialogContainer .prefix,.mh-dark #overlayPopup.largerImage .jsDialogContainer .prefix,.mh-dark #overlayPopup.convertibleOpenViewPopup .jsDialogContainer .prefix,.mh-dark #overlayPopup.adventureBookPopup .jsDialogContainer .prefix,.mh-dark #overlayPopup.marketplaceViewPopup .jsDialogContainer .prefix,.mh-dark #overlayPopup.giftSelectorViewPopup .jsDialogContainer .prefix,.mh-dark #overlayPopup.supportPageContactUsForm .jsDialogContainer .prefix{background-color:var(--d-bg)}.mh-dark #overlayPopup.treasureMapPopup .jsDialogContainer .jsDialog.bottom,.mh-dark #overlayPopup.itemViewPopup .jsDialogContainer .jsDialog.bottom,.mh-dark #overlayPopup.mouseViewPopup .jsDialogContainer .jsDialog.bottom,.mh-dark #overlayPopup.largerImage .jsDialogContainer .jsDialog.bottom,.mh-dark #overlayPopup.convertibleOpenViewPopup .jsDialogContainer .jsDialog.bottom,.mh-dark #overlayPopup.adventureBookPopup .jsDialogContainer .jsDialog.bottom,.mh-dark #overlayPopup.marketplaceViewPopup .jsDialogContainer .jsDialog.bottom,.mh-dark #overlayPopup.giftSelectorViewPopup .jsDialogContainer .jsDialog.bottom,.mh-dark #overlayPopup.supportPageContactUsForm .jsDialogContainer .jsDialog.bottom{background-color:var(--d-alt);border-radius:0 0 15px 15px}.mh-dark #overlayPopup.treasureMapPopup .jsDialogContainer h2,.mh-dark #overlayPopup.itemViewPopup .jsDialogContainer h2,.mh-dark #overlayPopup.mouseViewPopup .jsDialogContainer h2,.mh-dark #overlayPopup.largerImage .jsDialogContainer h2,.mh-dark #overlayPopup.convertibleOpenViewPopup .jsDialogContainer h2,.mh-dark #overlayPopup.adventureBookPopup .jsDialogContainer h2,.mh-dark #overlayPopup.marketplaceViewPopup .jsDialogContainer h2,.mh-dark #overlayPopup.giftSelectorViewPopup .jsDialogContainer h2,.mh-dark #overlayPopup.supportPageContactUsForm .jsDialogContainer h2,.mh-dark #overlayPopup.treasureMapPopup .jsDialogContainer h3,.mh-dark #overlayPopup.itemViewPopup .jsDialogContainer h3,.mh-dark #overlayPopup.mouseViewPopup .jsDialogContainer h3,.mh-dark #overlayPopup.largerImage .jsDialogContainer h3,.mh-dark #overlayPopup.convertibleOpenViewPopup .jsDialogContainer h3,.mh-dark #overlayPopup.adventureBookPopup .jsDialogContainer h3,.mh-dark #overlayPopup.marketplaceViewPopup .jsDialogContainer h3,.mh-dark #overlayPopup.giftSelectorViewPopup .jsDialogContainer h3,.mh-dark #overlayPopup.supportPageContactUsForm .jsDialogContainer h3{color:var(--d-text)}.mh-dark #overlayBg{background:var(--d-transparent-70)}.mh-dark .mh-improved-travel-window.greatWinterHuntGolemDestinationView{background-color:var(--d-bg)}.mh-dark .mh-improved-travel-window .greatWinterHuntGolemDestinationView__environmentName{color:var(--d-text);background-color:var(--d-bg-alt);border-color:var(--d-border);box-shadow:none}.mh-dark .mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment{background-color:var(--d-bg-alt);border-color:var(--d-border);border-radius:0;box-shadow:none}.mh-dark .mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment:hover .greatWinterHuntGolemDestinationView__environmentName,.mh-dark .mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment:focus .greatWinterHuntGolemDestinationView__environmentName{background-color:var(--d-action)}.mh-dark #overlayPopup .button,.mh-dark .notificationMessageList .message .actions input[type=button],.mh-dark .notificationMessageList .message .actions input[value="View Profile"],.mh-dark .notificationMessageList .message .actions input[value="View Profile"].ignoreRequest.ignoreRequest{box-shadow:0 -5px 8px -2px #ffae00 inset}.mh-dark #overlayPopup.tornPage .tornPageText p{color:var(--d-text-muted)}.mh-dark .inventoryPage-confirmPopup-itemContainer{background-color:var(--d-bg-alt)}.mh-dark .inventoryPage-confirmPopup-itemTable{background-color:var(--d-bg)}.mh-dark .inventoryPage-confirmPopup-itemContainer.received{background-color:var(--d-bg-alt)}.mh-dark .inventoryPage-confirmPopup-suffix-quantityContainer input{color:var(--d-text);background-color:var(--d);border-color:var(--d-border);border-width:1px}.mh-dark #overlayPopup.floatingIslandsDialog .jsDialogContainer .content{color:var(--d-text-dark);background-color:transparent}.mh-dark .itemView-loading{background:none;box-shadow:none}.mh-dark .mh-ui-assignment-meta-wrapper{color:var(--d-text)}.mh-dark .mh-ui-assignment-wiki-button{color:var(--d-link)}.mh-dark .mh-ui-assignment-details-summary{color:var(--d-text)}.mh-dark .mh-ui-assignment-details-task-title,.mh-dark .mh-ui-assignment-details-title{color:var(--d-text-muted)}.mh-dark #overlayPopup .img .name{color:var(--d-text)}.mh-dark .mousehuntCharacterGuideBox-content{background-color:var(--d-bg-alt)}.mh-dark #overlayPopup.loading .jsDialogContainer .suffix{background-blend-mode:darken}.mh-dark .convertibleOpenView-header{background-color:var(--d)}.mh-dark .convertibleOpenView-header a{color:var(--d-link)}.mh-dark #overlayPopup.hunting_summary .jsDialogContainer{background-color:var(--d-bg)}.mh-dark #overlayPopup.hunting_summary .title{color:var(--d-text)}.mh-dark #overlayPopup.hunting_summary .jsDialogContainer .suffix{background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .item-data-wrapper-loading,.mh-dark .mouse-data-wrapper-loading,.mh-dark .friend-data-wrapper-loading{background-color:var(--d);background-blend-mode:multiply}
`;
}
});
var kings_calibrator_default, init_kings_calibrator = __esm({
"src/modules/native-dark-mode/styles/kings-calibrator.css"() {
kings_calibrator_default = `.mh-dark .shopsPage-kingsCalibratorPromo{color:var(--d-text);background-color:var(--d-alt);border-color:var(--d-border);box-shadow:inset -1px -1px 2px var(--d-border)}.mh-dark .campPage-daily-container .shopsPage-kingsCalibratorPromo-button{background-color:var(--d-blue)}.mh-dark .kingsGiveawayCalibratorPopup-upgradeContainer{background-color:var(--d);box-shadow:none}.mh-dark .kingsGiveawayCalibratorPopup-tabHeader span{color:var(--d-text);background-color:var(--d)}.mh-dark .kingsGiveawayCalibratorPopup-tabHeader:hover span,.mh-dark .kingsGiveawayCalibratorPopup-tabHeader.active span{background-color:var(--d-bg)}.mh-dark .kingsGiveawayCalibratorPopup-upgrade.active{color:var(--d-text-dark);background-color:var(--d-green)}.mh-dark .kingsGiveawayCalibratorPopup-upgrade-description{color:var(--d-text);background-color:var(--d-alt)}.mh-dark .kingsGiveawayCalibratorPopup-upgrade{border-color:var(--d-border)}.mh-dark .kingsGiveawayCalibratorPopup-numCredits{color:var(--d-text);text-shadow:none;background-color:var(--d)}.mh-dark .kingsGiveawayCalibratorPopup-upgrade-name{color:var(--d-text-dark)}.mh-dark .locked .kingsGiveawayCalibratorPopup-upgrade-name{color:var(--d-text-muted)}
`;
}
});
var travel_default, init_travel = __esm({
"src/modules/native-dark-mode/styles/travel.css"() {
travel_default = `.mh-dark .travelPage-regionMenu-environments,.mh-dark #mh-simple-travel-page .travelPage-regionMenu-item,.mh-dark #mh-simple-travel-page .travelPage-alpha-wrapper .travelPage-regionMenu-environments{background-color:var(--d)}.mh-dark .travelPage-regionMenu-environmentLink.relic-hunter-is-here,.mh-dark .mousehuntHud-page-tabContent.simple-travel .travelPage-regionMenu-environmentLink.relic-hunter-is-here{color:var(--d-text);background-color:var(--d-green-dark);outline-color:var(--d-alt)}.mh-dark #mh-simple-travel-page .travelPage-regionMenu-environmentLink:hover,.mh-dark #mh-simple-travel-page .travelPage-regionMenu-environmentLink:focus,.mh-dark #mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.active.highlight,.mh-dark #mh-simple-travel-page .travelPage-alpha-wrapper .travelPage-regionMenu-environmentLink.active.highlight{color:var(--d-text);background-color:var(--d-blue)}.mh-dark .travelPage-regionMenu-stats{color:var(--d-text);background-color:var(--d-alt)}.mh-dark #mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.active.highlight{margin-right:-1px;border-right:none}.mh-dark .travelPage-regionMenu-item.active .travelPage-regionMenu-regionLink{background-color:var(--d-blue-dark);box-shadow:2px 2px 2px var(--d-blue-dark) inset}.mh-dark #mh-simple-travel-page .travelPage-regionMenu-item{border-color:var(--d-blue-dark)}.mh-dark a.travelPage-regionMenu-environmentLink,.mh-dark a.travelPage-regionMenu-regionLink,.mh-dark .travelPage-map-pieces-detail-title{background-color:var(--d);border-color:var(--d-border)}.mh-dark .travelPage-map-pieces-row{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .travelPage-map-pieces-detail-environment-title{border:none}.mh-dark .travelPage-map-environment-detailContainer{background:var(--d);border-color:var(--d-border);border-bottom:none;box-shadow:none}.mh-dark .travelPage-regionMenu-environmentLink{color:var(--d-link)}.mh-dark .travelPage-map-pieces-detail-environment-name{color:var(--d-text)}.mh-dark .travelPage-map-pieces-row a{color:var(--d-link)}.mh-dark input.mh-improved-travel-window-search-input[type=text]{padding:10px;color:var(--d-text);background-color:var(--d-action);border-color:var(--d-border)}
`;
}
});
var inventory_default, init_inventory = __esm({
"src/modules/native-dark-mode/styles/inventory.css"() {
inventory_default = `.mh-dark .inventoryPage-item.small .inventoryPage-item-margin{background-color:var(--d-bg);border:1px solid var(--d-border)}.mh-dark .itemImage .quantity{color:var(--d-text-dark)}.mh-dark .inventoryPage-tagContent-tagTitle{color:var(--d-text)}.mh-dark a.inventoryPage-tagDirectory-tag{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .inventoryPage-item-name abbr{color:var(--d-text)}.mh-dark .inventoryPage-tagDirectory{border-color:var(--d-border)}.mh-dark .inventoryPage-tagDirectory-tag.active,.mh-dark .inventoryPage-tagDirectory-tag:hover{color:var(--d-text-muted);background-color:var(--d-blue-darker)}.mh-dark .inventoryPage-item.small .tooltip{color:var(--d-text-dark)}.mh-dark .inventoryPage-item.small .inventoryPage-item-button{color:#000;background-color:#fc6;border-color:#ddd}.mh-dark .inventoryPage-item.small.armed .inventoryPage-item-margin{border-color:var(--d-green);box-shadow:inset 0 0 4px var(--d-green)}.mh-dark .mhui-inventory-lock-and-hide-item-controls{background-color:var(--d-transparent-20)}.mh-dark a.mousehuntHud-page-subTabContent-prefix-filter-option,.mh-dark .mousehuntHud-page-subTabHeader span{color:var(--d-text);background-color:var(--d-bg-alt);border-color:var(--d-border);box-shadow:none}.mh-dark .mousehuntHud-page-subTabContent-prefix-filter-option.active,.mh-dark .mousehuntHud-page-subTabContent-prefix-filter-option:hover,.mh-dark .mousehuntHud-page-subTabHeader.active span,.mh-dark .mousehuntHud-page-subTabHeader:hover span,.mh-dark .mousehuntHud-page-subTabHeader:focus span{color:var(--d-text-muted);background-color:var(--d-blue-darker)}.mh-dark .mousehuntHud-page-subTabContent-prefix-filter-options{border-color:var(--d-border)}.mh-dark .mousehuntHud-page-subTabHeader-container .mousehuntHud-page-subTabHeader:last-child span{border-right-color:var(--d-border)}.mh-dark .inventoryPage-item-margin{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .item_set{color:var(--d-text-dark);background-color:var(--d-yellow)}.mh-dark .itemViewStatBlock-stat-value{background-color:transparent}.mh-dark .itemViewStatBlock{border-color:var(--d-border)}.mh-dark .itemViewStatBlock-stat-label{background-color:var(--d-action)}.mh-dark .inventoryPage-item-content-description-text{color:var(--d-text)}.mh-dark .inventoryPage-item-content-description-text a{color:var(--d-link)}.mh-dark .mousehuntHud-page-tabContent-loading{background:url(https://www.mousehuntgame.com/images/ui/loaders/mouse_loading_large.gif?asset_cache_version=3) 50% 50% no-repeat}.mh-dark .inventoryPage-item-recipeOptions li{color:var(--d-text);background-color:var(--d-yellow-dark);border-color:var(--d-border)}.mh-dark .inventoryPage-item-recipeOptions li:hover{color:var(--d-text-dark);background-color:var(--d-yellow)}.mh-dark .mousehuntPage-content input.inventoryPage-item-button[type=submit],.mh-dark .mousehuntPage-content input.inventoryPage-item-button[type=button]{color:var(--d-black);background-color:#fc6}.mh-dark .mousehuntPage-content input.inventoryPage-item-button[type=submit]:hover,.mh-dark .mousehuntPage-content input.inventoryPage-item-button[type=button]:hover{color:var(--d-black);background-color:#fc9}.mh-dark .mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabContent-margin{background-color:var(--d)}.mh-dark .mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .inventoryPage-item-margin{background-color:var(--d-bg-alt)}.mh-dark .mousehuntHud-page-subTabContent-prefix-title{color:var(--d-text);text-shadow:none}.mh-dark .inventoryPage-craftingTable-slotContainer{background-color:var(--d-bg)}.mh-dark .mousehuntHud-page-subTabContent.crafting_table .inventoryPage-craftingTable{background-color:var(--d-bg);border-color:var(--d-border);box-shadow:none}.mh-dark .inventoryPage-craftingTable-slot{background-color:var(--d-bg-alt);border-color:var(--d-border);box-shadow:none}.mh-dark .inventoryPage-craftingTable-slot-item.empty .itemImage{box-shadow:0 0 0 1px var(--d-action) inset}.mh-dark .mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .tooltip .inventoryPage-item-margin{background-color:transparent}.mh-dark .inventoryPage-item-content-description-consumedItem.error{color:var(--d-red-dark)}.mh-dark .tiny-item:nth-child(2n){background-color:var(--d-alt)}.mh-dark .tiny-item:hover,.mh-dark .tiny-item:nth-child(2n):hover{background-color:var(--d-bg-alt)}.mh-dark .inventoryPage-craftingTable-slot-item .itemImage{box-shadow:none}.mh-dark .inventoryPage-craftingTable-slot-item-controls{border-color:var(--d-border)}.mh-dark .inventoryPage-craftingTable-slot-item-controls a{color:var(--d-text);background-color:var(--d-alt)}.mh-dark .inventoryPage-craftingTable-slot-item-controls input[type=text]:hover{border-color:var(--d-border)}.mh-dark .inventoryPage-craftingTable-slot-item-controls a:hover{color:var(--d-text-muted);background-color:var(--d)}.mh-dark .inventoryPage-craftingTable-slot-item[data-owned="1"] .inventoryPage-craftingTable-slot-item-controls-increment{color:var(--d-text-muted);background-color:var(--d-border)}.mh-dark .inventoryPage-item.trinket .itemViewStatBlock-stat,.mh-dark .itemViewStatBlock-stat{border-color:var(--d-border)}.mh-dark .inventoryPage-item.small.message_item .inventoryPage-item-content-name{color:var(--d-green)}
`;
}
});
var gifts_default, init_gifts = __esm({
"src/modules/native-dark-mode/styles/gifts.css"() {
gifts_default = `.mh-dark .giftSelectorView-content-rightBar{background-color:var(--d-bg)}.mh-dark .giftSelectorView-claimableGift.accordion_disabled,.mh-dark .giftSelectorView-claimableGift.expanded{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .giftSelectorView-claimableGift-titleContainer{color:var(--d-text)}.mh-dark a.giftSelectorView-friendRow-action.ignore{color:var(--d-text);background-color:var(--d);outline-color:var(--d-border)}.mh-dark a.giftSelectorView-friendRow-action.ignore:hover{background-color:var(--d-bg);outline-color:var(--d)}.mh-dark .giftSelectorView-friendRow:hover{outline-color:var(--d)}.mh-dark .giftSelectorView-claimableGift:after{box-shadow:0 -1px 1px #434651 inset,0 -20px 50px #434651 inset}.mh-dark .giftSelectorView-claimableGift.expanded:after{box-shadow:0 -1px 1px #434651 inset}.mh-dark .giftSelectorView-tabHeader:hover span,.mh-dark .giftSelectorView-tabHeader.active span{color:var(--d-text);background-color:var(--d-bg)}.mh-dark .giftSelectorView-tabHeader span{color:var(--d-text-muted);background-color:var(--d-bg-alt)}.mh-dark .giftSelectorView-gift .giftSelectorView-gift-padding{color:var(--d-text);background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .giftSelectorView-gift.gift_of_the_day .giftSelectorView-gift-padding{color:var(--d-text);background-color:var(--d-blue)}.mh-dark .giftSelectorView-friend-padding,.mh-dark .giftSelectorView-confirmPopup-block-actionItem .giftSelectorView-friend:hover .giftSelectorView-friend-padding{color:var(--d-link);background-color:var(--d-alt)}.mh-dark .giftSelectorView-friend:hover .giftSelectorView-friend-padding{background-color:var(--d);box-shadow:none}.mh-dark .giftSelectorView-friend.selected:hover .giftSelectorView-friend-padding,.mh-dark .giftSelectorView-actionContainer,.mh-dark .giftSelectorView-headerContainer{background-color:var(--d-blue-dark)}.mh-dark input.giftSelectorView-friend-search-input{color:var(--d-text);background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .giftSelectorView-friend-search-clear{color:var(--d-text-muted)}.mh-dark .giftSelectorView-friend.favorite .giftSelectorView-friend-padding{box-shadow:none}.mh-dark .giftSelectorView-tabContent,.mh-dark .mh-gift-buttons-clone-wrapper .giftSelectorView-content-leftBar-highlightBlock{background-color:var(--d)}.mh-dark .giftSelectorView-content-leftBar-highlightBlock{background-color:var(--d-bg)}.mh-dark .giftSelectorView-content-leftBar>.giftSelectorView-content-leftBar-highlightBlock:before{box-shadow:none}.mh-dark .mh-gift-buttons-clone-wrapper .giftSelectorView-gift.gift_of_the_day .giftSelectorView-gift-padding{color:var(--d-text);background-color:var(--d-bg)}.mh-dark .mh-gift-buttons-clone-wrapper .giftSelectorView-gift.gift_of_the_day:hover .giftSelectorView-gift-padding,.mh-dark .giftSelectorView-gift.active .giftSelectorView-gift-padding,.mh-dark .giftSelectorView-gift:hover .giftSelectorView-gift-padding{color:var(--d-text);background-color:var(--d-blue-dark)}.mh-dark .giftSelectorView-confirmPopup-content{background-color:var(--d-blue-darker)}.mh-dark .giftSelectorView-confirmPopup-content a{color:var(--d-link)}.mh-dark .giftSelectorView-confirmPopup-padding{box-shadow:0 0 10px var(--d-black)}.mh-dark .giftSelectorView-friend.complete .giftSelectorView-friend-padding{color:var(--d-text);background-color:var(--d-green-dark)}.mh-dark .giftSelectorView-inbox-footer{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark #giftSelectorView-inbox{border-color:var(--d-border)}.mh-dark a.giftSelectorView-inboxHeader-closeButton{color:var(--d-text-muted);background-color:var(--d-action);border-color:var(--d-border)}.mh-dark .giftSelectorView-inboxHeader{color:var(--d-text);background-color:var(--d-bg)}.mh-dark .giftSelectorView-inboxGiftOfTheDay{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .giftSelectorView-inboxGiftOfTheDay-label{color:var(--d-text-muted)}.mh-dark .giftSelectorView-inbox-giftContainer{background-color:var(--d-alt)}.mh-dark .giftSelectorView-inbox-gift-details{color:var(--d-text)}.mh-dark .giftSelectorView-inbox-gift-details a{color:var(--d-link)}.mh-dark .giftSelectorView-inbox-gift-sent{color:var(--d-text-muted)}.mh-dark .giftSelectorView-inbox-giftRow:nth-child(2n){background-color:var(--d-bg)}.mh-dark .giftSelectorView-inbox-giftRow{border-color:var(--d-border)}.giftSelectorView-inbox-giftRow.paidgift{background-color:var(--d-yellow-dark)}.mh-dark .giftSelectorView-tabHeader.highlight span{color:var(--d-text-dark);background-color:var(--d-yellow)}
`;
}
});
var journal_misc_entries_default, init_journal_misc_entries = __esm({
"src/modules/native-dark-mode/styles/journal-misc-entries.css"() {
journal_misc_entries_default = `.mh-dark .entry.short.misc.custom.unstable_charm_trigger{background-color:var(--d-blue-dark)}.mh-dark .journal .content .entry.catchsuccessloot,.mh-dark .journal .content .entry.luckycatchsuccess,.mh-dark .journal .content .entry.catchsuccessprize,.mh-dark .journal .content .entry.passive,.mh-dark .journal .content .entry.linked{background-color:var(--d-alt)}.mh-dark .journal .content .entry.catchfailure,.mh-dark .journal .content .entry.attractionfailure{background-color:var(--d-red-darker)}.mh-dark .journal .content .entry.short.misc.custom.chesla_trap_trigger{background-color:var(--d-purple)}.mh-dark .entry.short.relicHunter_complete,.mh-dark .entry.short.supplytransferitem{background-blend-mode:normal}.mh-dark .journal .content .supplytransfergold,.mh-dark .journal .content .marketplacesale,.mh-dark .entry.short.supplytransfergold{background-color:var(--d-purple-dark);background-image:url(https://i.mouse.rip/gold-journal.png);background-blend-mode:normal}.mh-dark .journal .content .entry.marketplace.marketplace_create_listing,.mh-dark .journal .content .entry.marketplace.marketplace_complete_listing,.mh-dark .journal .content .entry.marketplace.marketplace_claim_listing,.mh-dark .journal .content .entry.marketplace.marketplace_cancel_listing{background-color:var(--d-purple-dark);background-blend-mode:normal}.mh-dark .entry.short.travel{background-color:var(--d-yellow-dark);background-image:url(https://i.mouse.rip/travel-journal.png);background-blend-mode:normal}.mh-dark .journal .content .attractionfailurestale{background-image:url(https://i.mouse.rip/stale.png);background-blend-mode:normal}.mh-dark .journal .content .captchasolved{background-color:var(--d-blue-dark);background-image:url(https://i.mouse.rip/journal_puzzle_reward.png);background-blend-mode:normal}.mh-dark .journal .content .attractionfailure,.mh-dark .journal .content .outofsuperbrie,.mh-dark .journal .content .catchfailure{background-color:var(--d-red-darker);background-image:url(https://i.mouse.rip/steal-new.png);background-blend-mode:normal}.mh-dark .journal .content .catchfailuredamage{background-color:var(--d-red-darker);background-image:url(https://i.mouse.rip/pillage.png);background-blend-mode:normal}.mh-dark .journal .content .entry.custom.refine_pollutinum{background-color:var(--d-green-dark);background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/af9ffb2d0655dbf62a5e4a086515bb23.png);background-blend-mode:normal}.mh-dark .journal .content .entry.relicHunter_slayer_aura_relic_bonus{background-color:var(--d);background-blend-mode:difference}.mh-dark .journal .entry.socialGift.socialGift-send .journalbody .journaltext{box-shadow:inset 0 -20px 15px -16px #151515}.mh-dark .journal .content .entry.harbour{background-color:var(--d-yellow-dark)}.mh-dark .journal .content .entry.labyrinthSmall.labyrinth-clue{background-color:var(--d-yellow-dark);background-blend-mode:luminosity}.mh-dark .journal .content .entry.super_rift_vacuum_trigger,.mh-dark .journal .content .entry.rift-bristlewoods-lootBooster,.mh-dark .journal .content .entry.short.relicHunter_catch{background-color:var(--d-purple-alt);background-blend-mode:normal}.mh-dark .journal .content .entry.kings_giveaway_bonus_prize_entry{background-color:var(--d-purple-dark)}
`;
}
});
var quests_default, init_quests = __esm({
"src/modules/native-dark-mode/styles/quests.css"() {
quests_default = `.mh-dark .mh-ui-assignment-meta,.mh-dark #overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .content b{color:var(--d-text)}.mh-dark #overlayPopup.zugzwangsLibraryQuestShopPopup .jsDialogContainer .suffix,.mh-dark #overlayPopup.zugzwangsLibraryQuestShopPopup .smashQuest a,.mh-dark .mh-ui-assignment-meta a{color:var(--d-link)}.mh-dark #overlayPopup.zugzwangsLibraryQuestShopPopup a.questLink{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark #overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .content{background-color:var(--d-alt)}.mh-dark #overlayPopup.zugzwangsLibraryQuestShopPopup .jsDialogContainer .content{padding:10px}.mh-dark #overlayPopup.zugzwangsLibraryQuestShopPopup #jsDialogAjaxPrefix{margin-bottom:0;border-color:transparent}
`;
}
});
var camp_tabs_default, init_camp_tabs = __esm({
"src/modules/native-dark-mode/styles/camp-tabs.css"() {
camp_tabs_default = `.mh-dark .campPage-tabs-tabHeader span,.mh-dark .campPage-tabs-tabHeader:hover span,.mh-dark .campPage-tabs-tabHeader:focus span,.mh-dark .campPage-tabs-tabHeader.active span,.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader:hover span,.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader:focus span{color:var(--d-text);background-color:var(--d-bg-alt);border-color:var(--d-border);box-shadow:1px 1px 1px var(--d-bg)}.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader.active span,.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader:hover span{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border);box-shadow:1px 1px 1px var(--d-bg)}.mh-dark .campPage-tabs-tabHeader.active span,.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader:hover span{border-color:var(--d-border)}.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader:hover span{box-shadow:none}.mh-dark .campPage-tabs-tabContentContainer{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border);border-top-color:var(--d-bg);box-shadow:1px 1px 1px var(--d-border)}.mh-dark .campPage-tabs-tabContent.active[data-tab=daily],.mh-dark .campPage-tabs-tabContent-larryTip-container,.mh-dark .campPage-quests-container{background-color:var(--d);border-color:var(--d-border);box-shadow:none}.mh-dark .campPage-tabs-tabContent-larryTip-environment,.mh-dark .campPage-quests-title{color:var(--d-text)}.mh-dark .campPage-tabs-tabHeader span{border-bottom-color:var(--d-border)!important}.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader:hover span,.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader:focus span{border-color:var(--d-border)!important}.mh-dark .campPage-daily-draw-prize-description,.mh-dark .campPage-daily-draw-button{color:var(--d-text-dark)}.mh-dark .campPage-quests-footer-smash{color:var(--d-link);background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .adventureBookBanner-container{background-color:var(--d);border-color:var(--d-border);box-shadow:-1px 1px 3px var(--d-bg) inset}.mh-dark .adventureBookBanner-complete .adventureBookBanner-completed,.mh-dark .adventureBookBanner-adventureName{color:var(--d-text)}.mh-dark .adventureBookBanner-goalContainer{color:var(--d-text-muted)}.mh-dark .adventureBookBanner-container:hover .adventureBookBanner-moreInfo,.mh-dark .adventureBookBanner-moreInfo{color:var(--d-link)}.mh-dark span.mh-ui-tem-crown-text{color:var(--d-text);background-color:var(--d);border-color:var(--d-border)}.mh-dark .campPage-trap-trapEffectiveness-mouse-image{box-shadow:1px 1px 1px var(--d-bg)}.mh-dark .trapSelectorView__blueprint{border-color:var(--d-blue-dark)}.mh-dark img.mh-ui-tem-crown-icon,.mh-dark .campPage-trap-trapEffectiveness-mouse-powerType{background-color:var(--d);border-color:var(--d-border)}.mh-dark .campPage-tabs-tabContent-larryTip-container p:last-of-type a{color:var(--d-link)}
`;
}
});
var progress_log_default2, init_progress_log2 = __esm({
"src/modules/native-dark-mode/styles/progress-log.css"() {
progress_log_default2 = `.mh-dark #overlayPopup.hunting_summary .miceContainer,.mh-dark #overlayPopup.hunting_summary .environmentContainer,.mh-dark #overlayPopup.hunting_summary .baitContainer,.mh-dark #overlayPopup.hunting_summary .lootContainer{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark #overlayPopup.hunting_summary .label{color:var(--d-text);background-color:var(--d);border-color:var(--d-border)}.mh-dark #overlayPopup.hunting_summary .miceContainer a,.mh-dark #overlayPopup.hunting_summary .baitContainer a,.mh-dark #overlayPopup.hunting_summary .lootContainer a{color:var(--d-text)}.mh-dark #overlayPopup.hunting_summary .lootContainer a:hover,.mh-dark #overlayPopup.hunting_summary .baitContainer a:hover,.mh-dark #overlayPopup.hunting_summary .miceContainer a:hover{background-color:var(--d-action)}
`;
}
});
var page_default, init_page2 = __esm({
"src/modules/native-dark-mode/styles/page.css"() {
page_default = `.mh-dark .pageFrameView-content,.mh-dark .mousehuntHeaderView,.mh-dark #mousehuntContainer,.mh-dark .pageSidebarView,.mh-dark .bg-color{background-color:var(--d);border-color:var(--d)}.mh-dark #mousehuntContainer.PageCamp{background:var(--d);box-shadow:none}
`;
}
});
var root_default, init_root = __esm({
"src/modules/native-dark-mode/styles/_root.css"() {
root_default = `:root{--d: #262b33;--d-transparent-10: rgb(255 255 255 / 10%);--d-transparent-20: rgb(255 255 255 / 20%);--d-transparent-30: rgb(38 43 51 / 30%);--d-transparent-50: rgb(38 43 51 / 50%);--d-transparent-70: rgb(38 43 51 / 70%);--d-transparent-90: rgb(38 43 51 / 90%);--d-black: #222;--d-white: #e7eaee;--d-alt: #383e49;--d-bg: #434651;--d-bg-alt: #383838;--d-border: #111;--d-action: #5e646f;--d-text: #c8ced8;--d-text-dark: #555;--d-text-muted: #a7adb9;--d-link: #bf93ff;--d-orange: #fcb671;--d-orange-dark: #eb7805;--d-yellow: #f7e7a2;--d-yellow-dark: #4e4a3c;--d-blue: #0e7fbf;--d-blue-dark: #0a5a7f;--d-blue-darker: #08435e;--d-green: #40ba12;--d-green-dark: #105507;--d-green-darker: #063300;--d-purple: #923293;--d-purple-alt: #6f2057;--d-purple-dark: #6b1e6b;--d-red: #c63636;--d-red-dark: #a02c2c;--d-red-darker: #732639}
`;
}
});
var general_default3, init_general3 = __esm({
"src/modules/native-dark-mode/styles/general.css"() {
general_default3 = `body.mh-dark{color:var(--d-text);background-color:var(--d);scrollbar-color:var(--d-text-muted) var(--d-alt)}.mh-dark .quickSendWrapper{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .mousehuntActionButton.lightBlue{box-shadow:1px 1px 1px var(--d-blue-dark)}.mh-dark .mousehunt-improved-lgs-reminder-new{color:var(--d-text-dark)}.mh-dark .mousehuntPage-content select,.mh-dark .journal .entry .journaltext input.quickSendInput,.mh-dark .mousehuntPage-content input.quickSendInput,.mh-dark .quickSendInput,.mh-dark input.treasureMapView-block-search-text,.mh-dark .mh-improved-favorite-setups-component-picker-popup-search input,.mh-dark .mousehuntPage-content textarea,.mh-dark .mousehuntPage-content input,.mh-dark #mousehunt-improved-settings-advanced-override-flags input,.mh-dark #mousehunt-improved-settings-advanced-override-styles textarea{color:var(--d-text);background-color:var(--d-action);border-color:var(--d-border)}.mh-dark .mousehuntPage-content input::placeholder,.mh-dark .mousehuntPage-content select::placeholder,.mh-dark .mousehuntPage-content textarea::placeholder{color:var(--d-text-muted)}.mh-dark .journal-history-page-selector .page-input{border:1px solid var(--d-border)}.mh-dark .huntersHornView__hornImage{filter:drop-shadow(1px 1px 0 rgb(175 175 175 / 50%)) drop-shadow(-1px 1px 0 rgb(175 175 175 / 50%)) drop-shadow(1px -1px 0 rgb(175 175 175 / 50%)) drop-shadow(-1px -1px 0 rgb(175 175 175 / 50%)) drop-shadow(1px 4px 3px #6b6b6b)}.mh-dark .treasureMapRootView .messageBoardView .pagerView-section.previous .pagerView-link,.mh-dark .teamPage-messageBoard-corkboard .pagerView-section.previous .pagerView-link,.mh-dark .hunterInfoView-corkBoardBlock .pagerView-section.previous .pagerView-link{color:var(--d-text-muted)}.mh-dark #OnboardArrow.onboardPopup.top{z-index:100;color:#000}.mh-dark .travelPage-map-message{top:375px;color:#000}.mh-dark #mhhh_flash_message_div,.mh-dark .notificationMessageList .message .clear-block{color:var(--d-text-dark)}.mh-dark code{background-color:var(--d-alt)}.mh-dark #overlayPopup.mh-improved-update-summary .jsDialogContainer .content{color:#000;background-color:transparent}.mh-dark #overlayPopup.mh-improved-update-summary .jsDialog.bottom{background-color:transparent}.mh-dark #overlayPopup.mh-improved-update-summary .jsDialogContainer .content h2{color:#000}.mh-dark #overlayPopup.loading.mh-improved-loading .jsDialogContainer .suffix{background-image:url(https://www.mousehuntgame.com/images/ui/loaders/round_bar_green.gif);background-position:98% 10px;background-size:110px}.mh-dark #mousehuntContainer.PageNewsPost{background:transparent}.mh-dark .flexibleDialogWarmBrown.shopDescription b{color:#fc6;text-shadow:none}.mh-dark .drawPage-ballot .entries,.mh-dark .recentWinners,.mh-dark .socialBallots,.mh-dark .drawPage-ballot,.mh-dark .ballotEntry{color:var(--d-black);background-color:var(--d-yellow)}.mh-dark input#ballot_qty{color:var(--d-text-dark);background-color:var(--d-transparent-20)}.mh-dark .hunterTitle .titles h1{color:var(--d-text)}.mh-dark .hunterTitle .titles .userLevel{color:var(--d-text-dark)}.mh-dark .harbourHUD-area-title{color:#000}.mh-dark #chro-minluck-table{color:var(--d-text)}.mh-dark #minluck-list{color:var(--d-text-muted);background-color:var(--d)}.mh-dark .chro-minluck-overall-cr.bad-minluck{color:var(--d-red)}.mh-dark .chro-minluck-overall-cr.good-minluck{color:var(--d-green)}.mh-dark .QuestKingsGiveawayCampHUD__footer,.mh-dark .QuestKingsGiveawayCampHUD-quantity{color:var(--d-text-dark)}.mh-dark #mh-improved-cre.cre-loading:after{color:var(--d-text-muted)}.mh-dark .pagerView-link{background-color:var(--d-alt);border-color:var(--d-border);border-style:solid}.mh-dark .pagerView-link:hover{background-color:var(--d)}.mh-dark .mousehuntPage-content input[type=text]:hover,.mh-dark .mousehuntPage-content input[type=password]:hover,.mh-dark .mousehuntPage-content input[type=input]:hover,.mh-dark .mousehuntPage-content select:hover,.mh-dark .mousehuntPage-content textarea:hover{border-color:var(--d-yellow-dark)}.mh-dark .mousehunt-improved-error p{color:var(--d-red-dark)}.claimGiftPage__giftQuantity,.claimGiftPage__giftDescription{color:var(--d-text-dark)}.mh-dark .inventoryPage-confirmPopup-suffix-quantityContainer-setMax{color:var(--d-link)}
`;
}
});
var premium_default, init_premium = __esm({
"src/modules/native-dark-mode/styles/premium.css"() {
premium_default = `.mh-dark a.MHCheckoutRootView-viewTOSButton{color:var(--d-link)}.mh-dark #overlayPopup.MHCheckout .jsDialogContainer .content{color:#000}
`;
}
});
var camp_trap_default, init_camp_trap = __esm({
"src/modules/native-dark-mode/styles/camp-trap.css"() {
camp_trap_default = `.mh-dark .campPage-trap{background:var(--d-bg);border-color:var(--d-border);box-shadow:-1px -1px 1px var(--d-border) inset}.mh-dark a.campPage-trap-friendContainer-toggleFriendsButton{color:var(--d-link)}.mh-dark .campPage-trap-friendContainer-toggleFriendsButton-arrow{border-color:var(--d-link) transparent transparent transparent}.mh-dark .campPage-trap-friendContainer .label{color:var(--d-text)}.mh-dark .campPage-trap-friendContainer span{color:var(--d-text-muted)}.mh-dark .campPage-trap-friendList.full,.mh-dark .campPage-trap-itemStats,.mh-dark .campPage-trap-trapEffectiveness,.mh-dark .campPage-trap-armedItem,.mh-dark .campPage-trap-armedItem.bait.active,.mh-dark .campPage-trap-armedItem.bait,.mh-dark .campPage-trap-armedItem.skin,.mh-dark .campPage-trap-armedItem.mh-favorite-setups-button,.mh-dark .campPage-trap-itemBrowser-armed,.mh-dark .campPage-trap-trapEffectivenessContainer,.mh-dark .campPage-trap-itemBrowser-itemContainer{color:var(--d-text);background:var(--d);border-color:var(--d-border);box-shadow:-1px 1px 3px var(--d-bg) inset}.mh-dark .campPage-trap-armedItem-skin-description{color:var(--d-text)}.mh-dark .campPage-trap-baitLabel{color:var(--d-text-muted)}.mh-dark .campPage-trap-baitName,.mh-dark .campPage-trap-baitQuantity{color:var(--d-text);text-shadow:none}.mh-dark .campPage-trap-baitDetails{color:var(--d-text-muted);text-shadow:none}.mh-dark span.campPage-trap-baitQuantity,.mh-dark .trapSelectorView__armedItemQuantity span,.mh-dark .campPage-trap-armedItem .quantity span{right:-5px;bottom:4px;color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border);box-shadow:-1px -1px 1px var(--d-bg) inset}.mh-dark .trapSelectorView__weaponSkinGroup.trapSelectorView__armedItemBorder{background-color:transparent}.mh-dark .campPage-trap-trapStat .value{color:var(--d-text);background:var(--d-bg);border-color:var(--d-border)}.mh-dark .campPage-trap .trapImageView{border-bottom-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-armed-label{color:var(--d-text)}.mh-dark .campPage-trap-armedItem.active{background-color:var(--d-alt)}.mh-dark .campPage-trap-armedItem.inactive{background-color:var(--d)}.mh-dark .campPage-trap-itemBrowser-favorites{background-color:var(--d-bg)}.mh-dark .campPage-trap-trapEffectiveness span{color:var(--d-text-muted)}.mh-dark .campPage-trap-itemBrowser-armed-item,.mh-dark .campPage-trap-itemBrowser-armed .loading,.mh-dark .campPage-trap-itemBrowser-empty-container{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-filter input[data-filter=search]{border-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-filter input[data-filter=search]::placeholder{color:var(--text-dark)}.mh-dark .campPage-trap-blueprint-closeButton{color:var(--d-text);background:var(--d-bg);border-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-favorite-item-image-frame{border-color:var(--d-border);box-shadow:2px 2px 3px var(--d-border) inset}.mh-dark .empty .campPage-trap-itemBrowser-favorite-item-image{background:var(--d-bg)}.mh-dark .campPage-trap-itemBrowser-favorite-item.loading .campPage-trap-itemBrowser-favorite-item-image:after{background-color:var(--d-bg)}.mh-dark .mh-improved-favorite-setups-blueprint-container{color:var(--d-text);background:var(--d-bg);border-color:var(--d-border);box-shadow:2px 2px 3px var(--d-border) inset}.mh-dark .mh-improved-favorite-setups-blueprint-container .header{color:var(--d-text)}.mh-dark .mh-improved-favorite-setups-blueprint-container .row{background-color:var(--d);border-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-item-powerType:after{color:var(--d-text-muted)}.mh-dark .campPage-trap-itemBrowser-tagGroup-name{color:var(--d-text-muted);background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-quickLinks{background-color:var(--d-bg)}.mh-dark .campPage-trap-itemBrowser-quickLinks-header{color:var(--d-text-muted)}.mh-dark .campPage-trap-itemBrowser-item-statContainer{background-color:var(--d-alt);box-shadow:0 0 1px var(--d-black),0 1px 30px var(--d) inset}.mh-dark .campPage-trap-itemBrowser-item-stat .value span{color:var(--d-text-muted)}.mh-dark .campPage-trap-armedItem:hover,.mh-dark .campPage-trap-armedItem:focus,.mh-dark .campPage-trap-armedItem.inactive:hover,.mh-dark .campPage-trap-armedItem.inactive:focus,.mh-dark .campPage-trap-armedItem.active:hover,.mh-dark .campPage-trap-armedItem.active:focus,.mh-dark .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-statsContainer:hover,.mh-dark .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-statsContainer:focus,.mh-dark .pageFrameView #mousehuntContainer.PageCamp .mh-improved-favorite-setups-button:hover,.mh-dark .pageFrameView #mousehuntContainer.PageCamp .mh-improved-favorite-setups-button:focus{background-color:var(--d-alt)}.mh-dark .campPage-trap-itemBrowser-item{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-items{scrollbar-color:var(--d-text-muted) var(--d-alt)}.mh-dark .campPage-trap-itemBrowser-favorite-item-image-quantity{box-sizing:content-box;color:var(--d-text);background:var(--d-bg);border-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-item-powerType:before{background-color:transparent;border-color:transparent}.mh-dark .row.editing .campPage-trap-itemBrowser-favorite-item:after{background-color:var(--d-bg)}.mh-dark .mousehuntActionButton{box-shadow:1px 1px 1px var(--d-yellow)}.mh-dark a.mousehuntActionButton.danger{box-shadow:1px 1px 1px var(--d-red)}.mh-dark a.random-title:after{filter:invert(1)}.mh-dark .row.editing .campPage-trap-itemBrowser-favorite-item:hover:after{background-color:var(--d-alt)}.mh-dark .campPage-trap-trapStat .math{background-color:var(--d-alt);border-color:var(--d-border);box-shadow:-1px -1px 1px var(--d) inset}.mh-dark a.campPage-trap-itemBrowser-item-armButton,.mh-dark .armed a.campPage-trap-itemBrowser-item-armButton{color:#fff}.mh-dark a.campPage-trap-itemBrowser-item-armButton{background-color:#6a8b23}.mh-dark .campPage-trap-itemBrowser-item-armButton.busy{background-blend-mode:darken}.mh-dark .armed a.campPage-trap-itemBrowser-item-armButton{background-color:var(--d-orange);box-shadow:0 -2px 1px var(--d-orange) inset,0 -13px 1px var(--d-orange-dark) inset,0 0 1px #333}.mh-dark .campPage-trap-itemBrowser-item-image:after{border-color:var(--d-border);box-shadow:2px 2px 3px -1px var(--d) inset}.mh-dark .trapSelectorView__codexFilterGroup{border-color:var(--d-border)}.mh-dark .trapSelectorView__codexFilterButton{background-color:var(--d-bg)}.mh-dark .trapSelectorView__codexFilterButton.active{border-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item-image:hover,.mh-dark .campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item-image:focus{background-color:var(--d)}.mh-dark .trapSelectorView__codexList .campPage-trap-itemBrowser-item-image:after{box-shadow:none}.mh-dark .campPage-trap-trapEffectivenessContainer .loading,.mh-dark .campPage-trap-itemBrowser-items .loading{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .campPage-trap-trapEffectiveness-header b{color:var(--d-text)}.mh-dark .campPage-trap-trapEffectiveness-difficultyGroup{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .campPage-trap-trapEffectiveness-mouse:hover{background-color:var(--d-alt);border-color:var(--d-border);outline-color:var(--d-border)}.mh-dark .trapSelectorView__trapStatSummary,.mh-dark .trapSelectorView__outerBlock,.mh-dark button.trapSelectorView__armedItem,.mh-dark .campPage-trap-friendList.full,.mh-dark .campPage-trap-itemStats,.mh-dark .campPage-trap-trapEffectiveness,.mh-dark .mh-improved-favorite-setups-button,.mh-dark .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-trapEffectiveness,.mh-dark .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-statsContainer,.mh-dark .trapSelectorView__armedItemBorder,.mh-dark .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-armedItem.bait,.mh-dark #mh-improved-cre{color:var(--d-text);background-color:var(--d);border-color:var(--d-border);box-shadow:-1px 1px 3px var(--d-bg) inset}.mh-dark .trapSelectorView__innerBlock{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .mh-improved-cre-row:hover{background-color:var(--d-bg)}.mh-dark .campPage-trap-baitName{box-shadow:none}.mh-dark .trapSelectorView__armedItemQuantity span{text-shadow:none}.mh-dark span.campPage-trap-baitQuantity{right:0;bottom:0}.mh-dark .trapSelectorView__trapStatSummaryContainer{background:transparent;border:none}.mh-dark .campPage-trap-itemBrowser-item-favorite,.mh-dark .campPage-trap-itemBrowser-item.largeQuantity .campPage-trap-itemBrowser-item-quantity .quantity{background-color:var(--d-bg)}.mh-dark .trapSelectorView__armedItem--empty .trapSelectorView__armedItemImage{color:var(--d-text-muted)}.mh-improved-cre-row:hover,.mh-dark #mh-improved-cre thead{box-shadow:0 -1px var(--d-transparent-10) inset}.mh-dark .mh-improved-cre-data-bad{color:var(--d-red)}.mh-dark .mh-improved-cre-data-good{color:var(--d-green)}.mh-dark .mh-improved-cre-name a{color:inherit}.mh-dark .campPage-trap-trapEffectiveness-mouse-name{color:var(--d-text)}.mh-dark .campPage-trap-itemBrowser-favorites .campPage-trap-itemBrowser-favorite-item-quantity span.campPage-trap-baitQuantity,.mh-dark .campPage-trap-itemBrowser-item-leftBar span.campPage-trap-baitQuantity,.mh-dark .campPage-trap-itemBrowser-favorites .campPage-trap-itemBrowser-favorite-item-quantity span.campPage-trap-baseQuantity,.mh-dark .campPage-trap-itemBrowser-item-leftBar span.campPage-trap-baseQuantity{background-color:var(--d-transparent-90);border-color:var(--d-border)}.mh-dark .campPage-trap-trapEffectivenessBar{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .mh-improved-aura-view .time{color:var(--d-text-muted)}
`;
}
});
var select2_default, init_select2 = __esm({
"src/modules/native-dark-mode/styles/select2.css"() {
select2_default = `.mh-dark .select2-container .select2-choice{background:var(--d-alt);border-color:var(--d-border);box-shadow:none}.mh-dark .select2-container .select2-choice .select2-arrow{background:var(--d-alt);border-color:var(--d-border)}.mh-dark .friendsPage-list-filter.active{background-color:var(--d)}.mh-dark .select2-drop{background-color:var(--d-bg)}.mh-dark .select2-results .select2-no-results,.mh-dark .select2-results .select2-searching,.mh-dark .select2-results .select2-selection-limit{color:var(--d-text-muted);background-color:var(--d-bg)}.mh-dark input[type=text]{border-color:var(--d-border)}.mh-dark .select2-drop-active{border-color:var(--d-action)}.mh-dark .select2-drop-auto-width{border-top-color:var(--d-action)}.mh-dark .select2-chosen{color:var(--d-text-muted)}.mh-dark .select2-results .select2-result-label{color:var(--d-text);background-color:var(--d-bg)}.mh-dark .PageAdversaries .adversariesPage-list-filter #select2-drop li,.mh-dark .PageFriends .adversariesPage-list-filter #select2-drop li{background-color:var(--d-bg)}.mh-dark .PageAdversaries .adversariesPage-list-filter #select2-drop li:nth-child(2n){background-color:var(--d-bg-alt)}.mh-dark .select2-drop li.select2-highlighted,.mh-dark .select2-results .select2-highlighted .select2-result-label{background-color:var(--d-blue-dark)}.mh-dark .select2-search input{color:var(--d-text);background:var(--d-action)}
`;
}
});
var loading_default, init_loading = __esm({
"src/modules/native-dark-mode/styles/loading.css"() {
loading_default = `.mh-dark .springHuntHUD-popup-tabContentContainer.loading:after,.mh-dark .eggSweeper-layer.loading:after,.mh-dark .giftSelectorView-friendContainer.loading,.mh-dark .itemPurchaseView-container.loading .itemPurchaseView-action-state.loading,.mh-dark .itemView-loading:after,.mh-dark .journalContainer.loading .journalEntries:after,.mh-dark .MHCheckoutReviewCartPageView-paymentLoader:after,.mh-dark .MHCheckoutTermsOfServicePageView,.mh-dark .messageBoardView-loader,.mh-dark .mouseListView-categoryContent-loading,.mh-dark .mouseView-image.loading,.mh-dark .newsArchivesListView.loading .newsArchivesListView-page:after,.mh-dark .scoreboardTableView.loading .scoreboardTableView-results:after,.mh-dark .halloweenMemoryGame-content.loading,.mh-dark .trapSelectorView__codexBrowser .loading,.mh-dark .treasureMapDialogView.loading .treasureMapDialogView-content,.mh-dark .treasureMapListingsTableView-loading-mouse,.mh-dark .treasureMapRootView-content.loading,.mh-dark .treasureMapView-block-content.loading:after,.mh-dark .userSelector-table tr.loading td,.mh-dark .mousehuntHud-page-tabContent-loading,.mh-dark .mousehuntHud-page-subTabContent-loading,.mh-dark .mousehuntPage-loading,.mh-dark .adversariesPage-categoryContent-loading,.mh-dark .campPage-trap-itemBrowser-items .loading,.mh-dark .campPage-trap-trapEffectivenessContainer .loading,.mh-dark .campPage-tabs-tabContent-loading,.mh-dark .friendsPage-friendList-content.busy:after,.mh-dark .tournamentPage-tournamentRow-loading,.mh-dark .adventCalendarView-gift.busy:after,.mh-dark .springHuntHUD-dialog-loading,.mh-dark .giftSelectorView-content-selectedFriend-loading,.mh-dark .giftSelectorView-confirmOverlay.loading .giftSelectorView-confirmPopup-content,.mh-dark .giftSelectorView-inbox-loading,.mh-dark .riftFuromaHUD-craftingPopup-padding-loading,.mh-dark .marketplaceView-item-image,.mh-dark .campPage-trap-friendList.loading .campPage-trap-friendList-loading,.mh-dark .campPage-trap-itemBrowser-armed .loading,.mh-dark .teamPage-acivity-loading{background-image:url(https://i.mouse.rip/mouse-loading.gif);opacity:.7}.treasureMapView-block-content.loading:after{background-color:transparent}
`;
}
});
var send_supplies_default, init_send_supplies = __esm({
"src/modules/native-dark-mode/styles/send-supplies.css"() {
send_supplies_default = `.mh-dark #supplytransfer .categoryMenu a{color:var(--d-link);background-color:var(--d)}.mh-dark #supplytransfer .drawer{background-color:var(--d)}.mh-dark #supplytransfer .drawer .tabContent h2,.mh-dark span.mhui-supply-sort-label,.mh-dark .mhui-supply-search-form label{color:var(--d-text)}.mh-dark #supplytransfer .listContainer a.element.item{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark #supplytransfer .listContainer a.element.item.pinned,.mh-dark #supplytransfer .categoryMenu a:hover{color:var(--d-text-dark)}.mh-dark #supplytransfer .listContainer a.element:hover,.mh-dark #supplytransfer .listContainer a.element.recipient:hover,.mh-dark #supplytransfer .listContainer a.element.item.pinned:hover,.mh-dark #supplytransfer .tabs .tab .image:hover,.mh-dark #supplytransfer .tabs .tab .image.empty:hover{color:var(--d-text-dark);background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark #supplytransfer .tabs .tab .image:hover,.mh-dark #supplytransfer .tabs .tab .image.empty:hover{color:var(--d-link)}.mh-dark #supplytransfer .listContainer a.element.item:hover{background-color:var(--d-blue-dark)}.mh-dark #supplytransfer .listContainer a.element.recipient{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark #supplytransfer .drawer .tabContent .summary .box{background-color:var(--d-bg)}.mh-dark #supplytransfer .tabContent.recipient .listContainer span.content{color:var(--d-link)}.mh-dark #supplytransfer .listContainer a.element .details{color:var(--d-text)}.mh-dark #supplytransfer .drawer .tabContent a{color:var(--d-link)}.mh-dark #supplytransfer .drawer .tabContent.confirm #supplytransfer-confirm-send:hover{color:var(--d-text);background-color:var(--d-blue-dark)}.mh-dark #supplytransfer .tabs{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark #supplytransfer .friendList.listContainer{border-top:none}.mh-dark #supplytransfer .listContainer.friendList label{color:var(--d-text-muted)}
`;
}
});
var sidebar_default2, init_sidebar2 = __esm({
"src/modules/native-dark-mode/styles/sidebar.css"() {
sidebar_default2 = `.mh-dark .mh-improved-map-sidebar-goal-image,.mh-dark .mh-improved-mice-sidebar-mouse-image{box-shadow:inset 0 0 0 1px var(--d-border)}.mh-dark .mh-improved-map-sidebar-item .mh-improved-map-sidebar-goal-image{box-shadow:none}.mh-dark .mh-improved-map-sidebar-goal-active{background-color:var(--d)}.mh-dark .mh-improved-map-sidebar-goal:hover,.mh-dark .mh-improved-mice-sidebar-mouse:hover{background-color:var(--d-bg)}.mh-dark .mh-improved-mice-sidebar,.mh-dark .mh-improved-map-sidebar{border-color:var(--d-border)}.mh-dark .mh-improved-mice-sidebar-title,.mh-dark .mh-improved-map-sidebar-title{color:var(--d-text);background-color:var(--d-bg)}.mh-dark .scoreboardRelativeRankingTableView-table{background-color:var(--d-bg);border:1px solid var(--d-border)}.mh-dark .scoreboardRelativeRankingTableView tr{color:var(--d-text);background-color:var(--d)}.mh-dark .scoreboardRelativeRankingTableView th{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .mh-improved-map-sidebar-title:after{filter:invert(1)}.mh-dark .pageSidebarView-user a,.mh-dark .scoreboardRelativeRankingTableView-table a{color:var(--d-link)}
`;
}
});
var maps_default3, init_maps4 = __esm({
"src/modules/native-dark-mode/styles/maps.css"() {
maps_default3 = `.mh-dark .mh-ui-quick-invite-wrapper,.mh-dark .treasureMapView-leftBlock .treasureMapView-block{background-color:var(--d);border-color:var(--d-border)}.mh-dark .treasureMapRootView-subTabContainer{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .treasureMapRootView-subTab.active,.mh-dark .treasureMapRootView-subTabContainer:hover .treasureMapRootView-subTab:hover{color:var(--d-text-muted);background-color:var(--d-bg-alt);border-color:var(--d-border);border-radius:0}.mh-dark .treasureMapRootView-subTab,.mh-dark .treasureMapRootView-subTabContainer:hover .treasureMapRootView-subTab.active{color:var(--d-text);border-color:var(--d-border)}.mh-dark .treasureMapRootView .messageBoardView div.messageBoardView-message-container,.mh-dark .teamPage-messageBoard-corkboard .messageBoardView-message-container{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .treasureMapRootView .messageBoardView div.messageBoardView-message-container{border-bottom-color:var(--d-bg)}.mh-dark .treasureMapRootView .messageBoardView .messageBoardView-message,.mh-dark .teamPage-messageBoard-corkboard .messageBoardView-message,.mh-dark .hunterInfoView-corkBoardBlock .messageBoardView-message{background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .treasureMapRootView .messageBoardView div.messageBoardView-message.new{border-color:var(--d-border)!important}.mh-dark textarea.messageBoardView-message-textarea{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .treasureMapView-environment.complete .treasureMapView-environment-title{color:var(--d-text-dark)}.mh-dark .treasureMapView-environment.active .treasureMapView-environment-title a{color:var(--d-link)}.mh-dark .treasureMapView-mapWarning.treasureMapRootView-padding{color:var(--d-text);background-color:var(--d-red-dark)}.mh-dark .mh-ui-environments-block .treasureMapView-block-content{background-color:transparent}.mh-dark .treasureMapView-allyTable .treasureMapView-allyRow:nth-child(2n){background-color:var(--d-bg)}.mh-dark .treasureMapView-block{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .treasureMapRootView-tab-name{color:var(--d-text)}.mh-dark .treasureMapView-scoreboard{background-color:var(--d);border-color:var(--d-border)}.mh-dark .treasureMapView-block-row.active{color:var(--d-purple-dark);background-color:var(--d-yellow)}.mh-dark .treasureMapInventoryView .treasureMapView-blockWrapper .treasureMapView-leftBlock .treasureMapView-block-content{margin-left:0;background-color:var(--d-alt);border:1px solid var(--d-border)}.mh-dark .treasureMapPopup-seasonContainer.mousehuntTooltipParent,.mh-dark .treasureMapInventoryView-relicHunter{background-color:var(--d);border-color:var(--d-border)}.mh-dark .mh-ui-goals-sidebar-toggle{filter:invert(1)}.mh-dark .treasureMapView-highlight-content{background-color:var(--d)}.mh-dark .treasureMapView-highlight-name.mh-ui-mouse-links-map-name,.mh-dark .treasureMapView-highlight a{color:var(--d-link)}.mh-dark .mh-ui-mouse-links-map-ars .mhct-data{color:var(--d-text-muted);background-color:var(--d)}.mh-dark .mh-ui-mouse-links-map-ars .mhct-row:nth-child(odd){color:var(--d-text-muted);background-color:var(--d-alt)}.mh-dark .treasureMapView-highlight{outline:1px solid var(--d-border)}.mh-dark .mh-ui-mouse-links-map-ars .mhct-title{color:var(--d-text);background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .treasureMapPopup-shop .treasureMapInventoryView-scrollCase-content,.mh-dark .treasureMapPopup-shop .treasureMapView-block-content-heading{color:var(--d-text-dark)}.mh-dark .treasureMapView-environment.wrong .treasureMapView-environment-title{background-color:var(--d-red-darker)}.mh-dark .treasureMapView-environment.wrong .treasureMapView-environment-title a,.mh-dark .treasureMapView-consolationPrize-message{color:var(--d-text)}.mh-dark .treasureMapRootView-subTab-spacer{width:0}.mh-dark .treasureMapView-consolationPrize{color:var(--d-text);background-color:var(--d-bg-alt)}.mh-dark .treasureMapView-environment{background-color:var(--d);border-color:var(--d-border)}.mh-dark .treasureMapView-goals-group-goal-name span{color:var(--d-text)}.mh-dark .treasureMapView-goals-group-goal.complete .treasureMapView-goals-group-goal-name span{color:var(--d-text-muted)}.mh-dark .treasureMapView-goals-groups .treasureMapView-block-content-heading a{color:var(--d-link)}.mh-dark .treasureMapRootView .messageBoardView .messageBoardView-message-body,.mh-dark .teamPage-messageBoard-corkboard .messageBoardView-message-body,.mh-dark .hunterInfoView-corkBoardBlock .messageBoardView-message-body{color:var(--d-text)}.mh-dark .treasureMapRootView .messageBoardView a.messageBoardView-message-name,.mh-dark .teamPage-messageBoard-corkboard a.messageBoardView-message-name,.mh-dark .hunterInfoView-corkBoardBlock a.messageBoardView-message-name,.mh-dark .treasureMapView-allyTable a{color:var(--d-link)}.mh-dark .treasureMapView-componentContainer,.mh-dark .treasureMapView-block-content-heading{border-color:var(--d-border)}.mh-dark .treasureMapView-block-content-heading-count{color:var(--d-text-muted)}.mh-dark .mh-ui-quick-invite-wrapper,.mh-dark .treasureMapView-leftBlock .treasureMapView-block{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .treasureMapView-environment.complete .treasureMapView-environment-title,.mh-dark .treasureMapView-environment.complete .treasureMapView-environment-title a{color:var(--d-text);background-color:var(--d-green-dark)}.mh-dark .treasureMapView-environment.inactive a.treasureMapView-environment-title-link{color:var(--d-link)}.mh-dark .treasureMapView-mapLeaveContainer{margin-top:5px}.mh-dark .treasureMapInventoryView-itemList .treasureMapInventoryView-scrollCase{color:var(--d-text);background-color:var(--d)}.mh-dark .treasureMapView-block.noBorder{background-color:transparent}.mh-dark .treasureMapView-scoreboard-table a,.mh-dark a.treasureMapInvitesView-mapImageContainer{color:var(--d-link)}.mh-dark .treasureMapInvitesView-numRemaining{color:var(--d-text);background-color:var(--d);border-color:var(--d-border)}.mh-dark .treasureMapView-scoreboard-table .treasureMapView-block-row:hover{background-color:var(--d-bg)}.mh-dark .treasureMapView-scoreboard-table .treasureMapView-block-row.active:hover{background-color:var(--d-yellow)}.mh-dark .treasureMapView-scoreboard-table .treasureMapView-block-row.active:hover .treasureMapView-block-cell-name-cutoff{text-decoration:underline}.mh-dark .treasureMapInvitesView-mapImageContainer:hover:before{background-color:transparent;box-shadow:none}.mh-dark .treasureMapRootView-tab.active,.mh-dark .treasureMapRootView-tab:hover{background-color:var(--d-bg)}.mh-dark .treasureMapRootView-tab{color:var(--d-text);background-color:var(--d-alt)}.mh-dark .treasureMapInventoryView-scrollCase-aura{background-color:var(--d-purple-dark);border-color:var(--d-purple)}.mh-dark .treasureMapPopup-season-reward-name{color:var(--d-text-muted)}.mh-dark .treasureMapPopup-shop .treasureMapView-block-content-heading{border-color:transparent}.mh-dark .treasureMapView-reward-chestName{color:var(--d-text-dark)}.mh-dark .treasureMapDialogView{background-color:var(--d)}.mh-dark .treasureMapDialogView a{color:var(--d-link)}.mh-dark .treasureMapPopup-mapInvite .treasureMapInventoryView-scrollCase{background-color:transparent}.mh-dark .treasureMapListingsTableView th{background-color:var(--d-bg-alt)}.mh-dark .treasureMapListingsTableView tbody tr:nth-child(2n){background-color:var(--d-bg)}.mh-dark .treasureMapListingsTableView-mapPreviewButton,.mh-dark .treasureMapListingsTableView tbody tr{color:var(--d-text)}.mh-dark .mh-improved-map-listing-last-active{color:var(--d-text-muted)}.mh-dark .treasureMapRootView-header-navigation-item{border-color:var(--d-purple-dark)}.mh-dark .treasureMapRootView-tabContainer.hasTabs{background-color:var(--d-purple)}.mh-dark .treasureMapRootView-footer{background-color:var(--d-bg-alt);border-top:1px solid var(--d-border)}.mh-dark .treasureMapView-environment.active .treasureMapView-environment-title{background-color:var(--d-bg)}.mh-dark .treasureMapView-goals-group-goal:hover:before{background-color:var(--d-bg-alt);outline-color:var(--d-border)}.mh-dark a.treasureMapDialogView-close{color:var(--d)}.mh-dark .treasureMapListingsTableView tr.selected,.mh-dark .treasureMapListingsTableView tr.selected:nth-child(2n){background-color:var(--d-bg)}.mh-dark .treasureMapView-highlight a{color:var(--d-link)}.mh-dark .treasureMapView-block-search-label,.mh-dark .treasureMapView-highlight.sticky .treasureMapView-highlight-close{color:var(--d-text-muted)}.mh-dark .treasureMapView-goals-group-goal:hover:before,.mh-dark .treasureMapView-goals-group-goal.sticky:before{background-color:var(--d);outline-color:var(--d-border)}.mh-dark .treasureMapView-goals-group-goal:hover .treasureMapView-goals-group-goal-image{mix-blend-mode:normal}.mh-dark .mhct-stage{color:var(--d-text-muted)}.mh-dark .mhct-location-text{color:var(--d-text)}.mh-dark .treasureMapView-hunter.captain .treasureMapView-hunter-image{box-shadow:0 0 3px 4px var(--d-bg)}.mh-dark #sorted-mice-container .mouse-container-selected,.mh-dark #sorted-mice-container .mouse-container:hover,.mh-dark #sorted-mice-container .mouse-container:focus{background:#0000004d;outline:1px solid rgb(0 0 0 / 95%)}.mh-dark #sorted-mice-container .mouse-container-selected .mouse-mhct-extra-info-wrapper{color:var(--d-text);background-color:var(--d);border-color:var(--d-border)}.mh-dark #sorted-mice-container .mouse-container-selected .mouse-mhct-extra-info-wrapper a{color:var(--d-link)}.mh-dark .mhct-row{color:var(--d-text-muted);background-color:var(--d)}.mh-dark .mhct-row:nth-child(odd){background-color:var(--d-bg)}.mh-dark input.mh-ui-quick-invite-input{color:var(--d-text);background-color:var(--d);border-color:var(--d-border)}.mh-dark .treasureMapListingsTableView-filterMessage{color:var(--d-text-muted);background-color:var(--d);border-color:var(--d-border)}.mh-dark .treasureMapListingsTableView th.sortable:hover{background-color:var(--d-action)}.mh-dark .treasureMapListingsTableView th.sortable.active{background-color:var(--d-blue-dark)}.mh-dark a.mh-ui-invite-refresh-button:hover:after{filter:invert(1)}.mh-dark .treasureMapListingsTableView-loading:before{background-color:var(--d-bg)}.mh-dark .messageBoardView-message-body{border-color:var(--d-border)}.mh-dark a.messageBoardView-message-delete:after{color:var(--d-red-dark)}.mh-dark a.messageBoardView-message-delete:hover:after,.mh-dark a.messageBoardView-message-delete:focus:after{color:var(--d-red)}.mh-dark .mh-improved-map-sidebar-mouse .mh-improved-map-sidebar-goal .mh-improved-map-sidebar-goal-name{color:var(--d-text-muted)}.mh-dark .mh-improved-map-sidebar-goal.mh-improved-map-sidebar-goal-active .mh-improved-map-sidebar-goal-name,.mh-dark .mh-improved-map-sidebar-goal:hover .mh-improved-map-sidebar-goal-name{color:var(--d-text)}.mh-dark .mh-improved-map-sidebar-mouse .mh-improved-map-sidebar-goal .mh-improved-map-sidebar-goal-image{opacity:.5}.mh-dark .mh-improved-map-sidebar-goal.mh-improved-map-sidebar-goal-active .mh-improved-map-sidebar-goal-image,.mh-dark .mh-improved-map-sidebar-goal:hover .mh-improved-map-sidebar-goal-image{opacity:1}.mh-dark .treasureMapDialogView-chest-item-padding:before{color:var(--d-text-dark)}.mh-dark .treasureMapDialogView-chest-item-padding{background-color:var(--d-bg);border-color:var(--d-bg)}.mh-dark .mh-ui-no-ar{color:var(--d-text-muted);border-color:var(--d-text-muted)}.mh-dark .treasureMapView-block-content-heading-image{box-shadow:0 0 1px 1px var(--d)}.mh-dark .treasureMapView-previewBar-content{color:var(--d-text-dark)}
`;
}
});
var friends_default, init_friends = __esm({
"src/modules/native-dark-mode/styles/friends.css"() {
friends_default = `.mh-dark .friendsPage-subduedLink{color:var(--d-text-dark)}.mh-dark .friendsPage-subduedLink:hover{color:var(--d-text-muted)}.mh-dark .teamPage-messageBoard-corkboard .messageBoardView-message,.mh-dark .hunterInfoView-corkBoardBlock .messageBoardView-message{color:var(--d-text);background-color:var(--d)}.mh-dark .teamPage-messageBoard-corkboard .messageBoardView-message-body,.mh-dark .hunterInfoView-corkBoardBlock .messageBoardView-message-body{color:var(--d-text)}.mh-dark .hunterInfoView-wrapper .friendsPage-friendRow-statsContainer{color:var(--d-text-dark)}.mh-dark .hunterInfoView-wrapper .campPage-trap-trapStat{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-trapBlock-footer,.mh-dark .hunterInfoView-wrapper .hunterInfoView-trapBlock-footer-stats{background-color:var(--d)}.mh-dark .hunterProfileItemsView-content-padding{color:var(--d-text);background-color:transparent}.mh-dark .hunterProfileItemsView-categoryContent-name{color:var(--d-text)}.mh-dark .hunterProfileItemsView-category-margin{color:var(--d-text-dark)}.mh-dark .hunterProfileItemsView-category,.mh-dark .hunterProfileItemsView-category.active .hunterProfileItemsView-category-margin{color:var(--d-text)}.mh-dark .hunterProfileItemsView-categoryContent-item-padding{background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .friendsPage-list-header{background-color:var(--d-bg);border-color:var(--d-border);box-shadow:none}.mh-dark .friendsPage-list-header label{color:var(--d-text)}.mh-dark .friendsPage-community-channel{background-color:var(--d-bg);border:1px solid var(--d-border)}.mh-dark .friendsPage-community-channel h2{color:var(--d-text)}.mh-dark .friendsPage-community-channel.friends-page-id-search{background-color:var(--d-bg-alt);border-color:var(--d-border);box-shadow:none}.mh-dark .hunterProfileItemsView-content:before{background-color:var(--d-alt)}.mh-dark .campPage-trap-friendContainer-environment a{color:var(--d-link)}.mh-dark .friendsPage-friendRow{color:var(--d-text);background:var(--d-bg);border-color:var(--d-border)}.mh-dark .friendsPage-friendRow-statsContainer{color:var(--d-text);background:var(--d-bg-alt);box-shadow:0 10px 30px var(--d-bg-alt)}.mh-dark .friendsPage-friendRow-stat span,.mh-dark .friendsPage-friendRow-stat a{color:var(--d-text)}.mh-dark .friendsPage-friendRow-stat.hasHover:hover{background-color:transparent}.mh-dark .friendsPage-friendRow-stat:hover .friendsPage-friendRow-stat-fullValue{background-color:var(--d);border-color:var(--d-border)}.mh-dark .userInteractionButtonsView-button{box-shadow:none}.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-horn-image{background-image:url(https://i.mouse.rip/dark-horn_temp.png)}.mh-dark .mh-improved-scoreboard-dropdown,.mh-dark .mousehuntPage-content select.mh-improved-scoreboard-dropdown{background-color:var(--d-action);border-color:var(--d-border)}.mh-dark .userInteractionButtonsView-button.sendMapInvite{background-image:url(https://i.mouse.rip/buttons/send_map_invite.png)}.mh-dark .userInteractionButtonsView-button.sendGift{background-image:url(https://i.mouse.rip/buttons/send_gift.png)}.mh-dark .userInteractionButtonsView-button.sendSupplies{background-image:url(https://i.mouse.rip/buttons/send_supplies.png)}.mh-dark .userInteractionButtonsView-button.sendTournamentInvite{background-image:url(https://i.mouse.rip/buttons/send_tournament_invite.png)}.mh-dark .userInteractionButtonsView-button.sendTicket{background-image:url(https://i.mouse.rip/buttons/send_ticket.png)}.mh-dark .userInteractionButtonsView-button.canAccept,.mh-dark .userInteractionButtonsView-button.sendRequest{background-image:url(https://i.mouse.rip/buttons/send_request.png)}.mh-dark .userInteractionButtonsView-button.accepted{background-image:url(https://i.mouse.rip/buttons/friends.png)}.mh-dark .userInteractionButtonsView-button.requestSent{background-image:url(https://i.mouse.rip/buttons/request_sent.png)}.mh-dark .userInteractionButtonsView-button.ignored{background-image:url(https://i.mouse.rip/buttons/unfriend.png)}.mh-dark .userInteractionButtonsView-button.requestMapInvite{background-image:url(https://i.mouse.rip/buttons/request_map_invite.png)}.mh-dark .userInteractionButtonsView-button.self{background-image:url(https://i.mouse.rip/buttons/friends.png)}.mh-dark .friendsPage-permissionBlock{background-color:var(--d-bg)}.mh-dark .friendsPage-community-profileLinkInput input{border:1px solid var(--d-border)}.mh-dark #friend-data-wrapper .friendsPage-friendRow-stat.team .friendsPage-friendRow-stat-icon,.mh-dark .friendsPage-friendRow-stat.team .friendsPage-friendRow-stat-icon{filter:invert(1) grayscale(1) brightness(.5)}
`;
}
});
var userscripts_default, init_userscripts = __esm({
"src/modules/native-dark-mode/styles/userscripts.css"() {
userscripts_default = `.mh-dark .hd-popup{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .hd-popup h1,.mh-dark .hd-popup h2,.mh-dark .hd-popup h3,.mh-dark .hd-popup h4{color:var(--d-text)}.mh-dark .hd-popup a{color:var(--d-link)}.mh-dark a.hd-button,.mh-dark .hd-button{color:var(--d-black)}.mh-dark .hd-table .hd-table-heading{color:var(--d-text-dark);background-color:var(--d-yellow);border-color:var(--d-border)}.mh-dark .hd-table tr:nth-child(2n){background-color:var(--d-bg-alt)}.mh-dark .hd-table .hd-table-td{border-color:var(--d-border)}.hd-table .hd-table-footer-tr{background-color:var(--d-yellow)!important}
`;
}
});
var scoreboards_default, init_scoreboards = __esm({
"src/modules/native-dark-mode/styles/scoreboards.css"() {
scoreboards_default = `.mh-dark .scoreboardTableView-content{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .scoreboardTableView-table th{color:var(--d-text);border-color:var(--d-border);border-width:1px}.mh-dark .scoreboardTableView-filters label{color:var(--d-text-muted)}.mh-dark tr.scoreboardTableView-row.viewer,.mh-dark tr.scoreboardTableView-row.highlight{color:var(--d-text-dark)}.mh-dark .scoreboardTableView-table a{color:var(--d-link)}.mh-dark .scoreboardTableView-table .highlight a{color:var(--d-text-dark)}.mh-dark .scoreboardTableView-header{background-color:var(--d-bg);border-color:var(--d-border);box-shadow:none}.mh-dark .scoreboardTableView-header-title{color:var(--d-text);text-shadow:none}.mh-dark .scoreboardTableView-content .pagerView-container{border:none;border-top:1px solid var(--d-border)}.mh-dark .scoreboardTableView-content .pagerView-section.previous.active .pagerView-link,.mh-dark .scoreboardTableView-content .pagerView-section.next.active .pagerView-link{color:var(--d-text-muted)}.mh-dark .scoreboardTableView-separator hr{background-color:var(--d-border);border:none}.mh-dark .tournamentPage-tournamentHeader{color:var(--d-text);text-shadow:none;background-color:var(--d-bg);border-color:var(--d-border);box-shadow:none}.mh-dark .scoreboardTableView-tournament{background-color:var(--d-yellow)}
`;
}
});
var conflict_popup_default, init_conflict_popup = __esm({
"src/modules/native-dark-mode/styles/conflict-popup.css"() {
conflict_popup_default = `.mh-dark #overlayPopup.mh-improved-darkmode-conflict-popup .jsDialog.top,.mh-dark #overlayPopup.mh-improved-darkmode-conflict-popup .jsDialog.background{background:var(--d-red-dark)}.mh-dark .pageFrameView #overlayPopup.mh-improved-darkmode-conflict-popup .jsDialogContainer .suffix{background-color:var(--d-red-dark);border:none}.mh-dark #overlayPopup.mh-improved-darkmode-conflict-popup .jsDialog.bottom,.mh-dark #overlayPopup.mh-improved-darkmode-conflict-popup .jsDialog.top{background:none}.mh-dark #overlayPopup.mh-improved-darkmode-conflict-popup .jsDialog.bottom,.mh-dark #overlayPopup.mh-improved-darkmode-conflict-popup #jsDialogClose{display:none}.mh-dark #overlayPopup.mh-improved-darkmode-conflict-popup .jsDialogContainer .prefix{padding:10px 0 10px 5px;background-color:var(--d-red-dark)}.mh-dark #overlayPopup.mh-improved-darkmode-conflict-popup h2,.mh-dark #overlayPopup.mh-improved-darkmode-conflict-popup h3,#overlayPopup.mh-improved-darkmode-conflict-popup .title{font-size:18px;color:var(--d-text)}.mh-dark #overlayPopup.mh-improved-darkmode-conflict-popup .jsDialogContainer .content{background-color:var(--d-red-darker)}.mh-dark #overlayPopup.mh-improved-darkmode-conflict-popup .jsDialog.background{border-radius:10px}
`;
}
});
var mouse_view_default, init_mouse_view = __esm({
"src/modules/native-dark-mode/styles/mouse-view.css"() {
mouse_view_default = `.mh-dark .mouseView-title{color:var(--d-text)}.mh-dark .minluck-title,.mh-dark .mouseview-has-mhct .ar-header{border-bottom-color:var(--d-bg)}.mh-dark .mouseview-has-mhct .mouse-ar-wrapper{background-color:var(--d-bg)}.mh-dark .mouseview-has-mhct .mouse-ar-wrapper:nth-child(2n){background-color:var(--d-bg-alt)}.mh-dark li.minluck-item{background-color:var(--d);border-color:var(--d-border)}.mh-dark .mouseView-categoryContent-subgroup-mouse-weaknesses-label{border-color:var(--d-bg-alt)}.mh-dark .mouseView-statsContainer-block{background-color:var(--d-bg-alt)}.mh-dark .minluck-title,.mh-dark .mouseview-has-mhct .ar-header,.mh-dark .mouseView-titleContainer{border-bottom-color:var(--d-border)}.mh-dark .mouseview-has-mhct .ar-link{color:var(--d-link)}.mh-dark .mouseViewPopup .mouseView-image{overflow:hidden;border-radius:0}
`;
}
});
var shops_default, init_shops = __esm({
"src/modules/native-dark-mode/styles/shops.css"() {
shops_default = `.mh-dark .inventoryPage-item-content-description-consumedItem.error{color:var(--d-red-dark)}.mh-dark .inventoryPage-item-content-description-consumedItem-image{margin-left:0}.mh-dark .itemPurchaseView-container.donation .itemPurchaseView-action-container,.mh-dark .itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-container,.mh-dark .itemPurchaseView-container:hover .itemPurchaseView-margin,.mh-dark .itemPurchaseView-container:hover .itemPurchaseView-image-container,.mh-dark .itemPurchaseView-container:hover .itemPurchaseView-content-container,.mh-dark .itemPurchaseView-container .itemPurchaseView-margin,.mh-dark .itemPurchaseView-image-container,.mh-dark .itemPurchaseView-content-container{background-color:var(--d-bg)}.mh-dark .itemPurchaseView-container{border-color:var(--d-border)}.mh-dark .itemPurchaseView-content-description{color:var(--d-text-muted)}.mh-dark .itemPurchaseView-action-container{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .itemPurchaseView-action-goldGost,.mh-dark .itemPurchaseView-action-purchaseHelper-owned{color:var(--d-text-muted);background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .itemPurchaseView-action-itemCost-table-cell.cost{color:var(--d-green);text-shadow:none}.mh-dark .itemPurchaseView-action-itemCost-table-row.error .itemPurchaseView-action-itemCost-table-cell.cost,.mh-dark .itemPurchaseView-action-itemCost-table .itemPurchaseView-action-itemCost-table-row.error a,.mh-dark .error .itemPurchaseView-action-itemCost-table-cell.owned{color:var(--d-red-darker)}.mh-dark .itemPurchaseView-action-itemCost-table-cell.owned{color:var(--d-text)}.mh-dark.shopCustomization .PageShops .itemPurchaseView-container .itemViewStatBlock-stat.title,.mh-dark .itemPurchaseView-container .itemViewStatBlock-stat.powerType,.mh-dark.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-stat{background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .itemViewStatBlock-stat.success,.mh-dark .itemViewStatBlock-stat.success .itemViewStatBlock-stat-value a{color:var(--d-green)}.mh-dark .itemPurchaseView-action-itemCost-table{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .itemPurchaseView-container.donation .itemPurchaseView-action-itemCost-table{background-color:var(--d-yellow)}.mh-dark .itemPurchaseView-action-itemCost-table a{color:var(--d-text)}.mh-dark .shopsPage-otherEnvironment{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .itemPurchaseView-action-marketplace a,.mh-dark .itemPurchaseView-content-description a,.mh-dark a.itemPurchaseView-content-skin-link{color:var(--d-link)}.mh-dark.shopCustomization .PageShops .itemViewStatBlock-stat{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .shopsPage-compareEquipment{background-color:var(--d-blue-dark)}.mh-dark .itemPurchaseView-action-confirm-button-row a{color:var(--d-link)}.mh-dark .itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-complete-title,.mh-dark .itemPurchaseView-container .itemPurchaseView-action-complete-title,.mh-dark .itemPurchaseView-action-complete-title,.mh-dark .itemPurchaseView-action-armed-title,.mh-dark span.itemPurchaseView-action-confirm-refund.noRefund:after{color:var(--d-text)}
`;
}
});
var header_default, init_header = __esm({
"src/modules/native-dark-mode/styles/header.css"() {
header_default = `.mh-dark .mousehuntHud-gameInfo{background-color:var(--d);border-right:none}.mh-dark .mousehuntHud-menu ul li a{height:25px;color:var(--d-border);text-shadow:none}.mh-dark .mousehuntHud-menu ul li ul li a{height:31px}.mh-dark .mousehuntHud-menu.default{z-index:90;filter:brightness(.9)}.mh-dark .mousehuntHud-marbleDrawer{background-blend-mode:exclusion}.mh-dark .mousehuntHud-menu ul li:hover a,.mh-dark .mousehuntHud-menu ul li.active a{color:var(--d-text-dark);text-shadow:none}.mh-dark .mousehuntHeaderView .menuItem.dropdown:hover .arrow{border-top-color:transparent;border-bottom-color:#ededed}.mh-dark .mousehuntHeaderView .menuItem.dropdown.expanded .arrow,.mh-dark .mousehuntHeaderView .menuItem.dropdown.expanded:hover .arrow{border-top-color:#999;border-bottom-color:transparent}.mh-dark .mousehuntHud-environmentName{color:#000;text-shadow:none;filter:drop-shadow(0 1px 1px #aea384) drop-shadow(0 2px 1px #aea384)}.mh-dark .huntersHornView__messageContainer{color:var(--d-text-dark)}.mh-dark .mousehuntHeaderView-gameTabs,.mh-dark .mousehuntHeaderView .menuItem{background:url(https://i.mouse.rip/dark/menuItem.png) 0 0 repeat-x}.mh-dark .mousehuntHeaderView-gameTabs{border-color:var(--d-border)}.mh-dark .mousehuntHeaderView .menuItem{color:var(--d-text);border-color:var(--d-border)}.mh-dark .mousehunt-improved-favorite-setups-icon:before,.mh-dark .mousehunt-improved-journal-privacy-icon:before{filter:invert(1)}.mh-dark .mousehuntHud-gameInfo a{color:var(--d-link)}.mh-dark .mousehuntHeaderView .menuItem.new{color:#fff;text-shadow:1px 1px var(--d-black);filter:brightness(1.2)}.mh-dark .mousehuntHeaderView .menuItem:hover{background-position:0 -40px}.mh-dark .pageFrameView .mousehuntHeaderView .menuItem.mousehunt-improved-icon-menu:hover{background-image:url(https://i.mouse.rip/dark/menuItem.png);background-position-y:-40px}.mh-dark .mousehuntHeaderView a.superBrie .getMore{background-color:var(--d-blue-dark);outline:1px solid var(--d-blue)}.mh-dark .huntersHornView__timerState{color:var(--d-black)}
`;
}
});
var favorite_setups_default, init_favorite_setups = __esm({
"src/modules/native-dark-mode/styles/favorite-setups.css"() {
favorite_setups_default = `.mh-improved-favorite-setups-blueprint-container .row.location-favorite{color:var(--d);background-color:var(--d-yellow)}.mh-dark .row.location-favorite .campPage-trap-itemBrowser-item-powerType:after{color:var(--d-text-dark)}.mh-dark .mh-improved-favorite-setups-button-label{color:var(--d-text-muted)}
`;
}
});
var item_view_default, init_item_view = __esm({
"src/modules/native-dark-mode/styles/item-view.css"() {
item_view_default = `.mh-dark .itemViewContainer{margin-right:-1px;margin-left:-1px;background-color:var(--d-bg-alt);border-bottom-color:var(--d-bg)}.mh-dark .itemView-padding{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .itemView-character-name{color:var(--d-text);text-shadow:-1px -1px 5px var(--d-text-muted)}.mh-dark .itemView-header{border-color:var(--d-transparent-10);border-width:1px}.mh-dark .itemViewContainer .itemViewStatBlock-stat{border-color:var(--d-border)}.mh-dark .mh-dark .itemViewStatBlock-stat-value{background-color:transparent}.mh-dark .itemViewContainer a{color:var(--d-link)}.mh-dark .itemView-obtainHint{border-color:var(--d-border)}.mh-dark ul.mh-improved-scroll-to-map-multiple-list,.mh-dark .mh-improved-scroll-to-map-multiple{background-color:var(--d-bg-alt)}
`;
}
});
var profile_default, init_profile = __esm({
"src/modules/native-dark-mode/styles/profile.css"() {
profile_default = `.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock,.mh-dark .hunterInfoView-wrapper .friendsProfileView-container,.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock,.mh-dark .hunterInfoView-wrapper div.messageBoardView-message-container,.mh-dark .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabContentContainer{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border);box-shadow:none}.mh-dark .hunterInfoView-wrapper .friendsProfileView-container a{color:var(--d-link)}.mh-dark .teamPage-messageBoard-corkboard .messageBoardView-message.new,.mh-dark .hunterInfoView-corkBoardBlock div.messageBoardView-message.new{background-color:transparent;border-color:transparent!important}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock .hunterInfoView-favoritesBlock-body,.mh-dark .hunterInfoView-achievementsBlock .mousehuntTabContentContainer-padding{background-color:var(--d-bg)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock .hunterInfoView-favoritesBlock-body,.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-noMice,.mh-dark .hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound,.mh-dark .hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound-label,.mh-dark .hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound-ranking{color:var(--d-text)}.mh-dark .hunterInfoView-corkBoardBlock .messageBoardView-message{background-color:var(--d)}.mh-dark input.messageBoardView-message-submit,.mh-dark input.messageBoardView-message-submit[type=submit],.mh-dark .hunterInfoView-wrapper .friendsProfileView-container a.friendsProfileView-randomFriend{color:var(--d-text-dark);text-shadow:none;background-color:var(--d-orange);border-color:var(--d-border);box-shadow:0 -5px 8px -2px var(--d-orange-dark) inset,1px 1px 1px var(--d-alt)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-header{color:var(--d-text);background:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .hunterInfoView-wrapper .messageBoardView-title{background-color:var(--d-bg-alt)}.mh-dark .hunterInfoView-wrapper .friendsPage-friendRow{background:var(--d-bg);outline:1px solid var(--d-border)}.mh-dark .hunterInfoView-wrapper .friendsPage-friendRow-titleBar-titleDetail,.mh-dark .hunterInfoView-wrapper .friendsPage-friendRow-stat.online .friendsPage-friendRow-stat-value{color:var(--d-text)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container:before,.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container,.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-huntingSince,.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-horn-container,.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats{color:var(--d-text);background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container .teamEmblemView{border-color:var(--d-border)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats .hunterInfoView-idCardBlock-stats-item-desc{color:var(--d-text-muted)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-hunterId{color:var(--d-link);background-color:var(--d)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-hunterId:hover{font-weight:400;color:var(--d-purple)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-floatingTooltip{color:var(--d-text-dark)}.mh-dark .hunterInfoView-wrapper .friendsPage-friendRow-statsContainer{background-color:var(--d-alt);box-shadow:none}.mh-dark .hunterInfoView-wrapper .friendsPage-friendRow-statsContainer .friendsPage-friendRow-stat-value{color:var(--d-text)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-trapBlock-header-container{border-color:var(--d-border)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .itemImage.disabled{box-shadow:none}.mh-dark .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader span{color:var(--d-text);text-shadow:none;box-shadow:none}.mh-dark .hunterInfoView-wrapper .messageBoardView-title,.mh-dark .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader{color:var(--d-text);background:var(--d-bg-alt);border-color:var(--d-border);box-shadow:none}.mh-dark .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader{background:var(--d-alt)}.mh-dark .mh-dark .hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader.active{background:var(--d-bg-alt)}.mh-dark .hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:hover,.mh-dark .hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:focus{background:var(--d-bg-alt)}.mh-dark a.hunterProfileItemsView-filter{color:var(--d-link)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader.active{background:var(--d-bg-alt)}.mh-dark .hunterInfoView-wrapper .messageBoardView .pagerView-container{background-color:var(--d);border-color:var(--d-border)}.mh-dark .hunterInfoView-wrapper .messageBoardView .pagerView-link{border:none}.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamName span{color:var(--d-link)}.mh-dark .mh-improved-fancy-profile .mh-improved-fancy-profile .hunterInfoView-wrapper .friendsPage-friendRow-statsContainer .friendsPage-friendRow-stat-value,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container:before,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-huntingSince,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-horn-container,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .friendsPage-friendRow-titleBar-titleDetail,.mh-dark .mh-improved-fancy-profile .hunterInfoView-corkBoardBlock .messageBoardView-message,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .friendsPage-friendRow-stat .friendsPage-friendRow-stat-value,.mh-dark .mh-improved-fancy-profile .hunterInfoView-corkBoardBlock .messageBoardView-message-body{color:var(--d-text-dark)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseLabel{color:var(--d-text-muted)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-tabDot{background-color:var(--d-alt);border-color:var(--d-bg)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-tabDot.active{background-color:var(--d-orange-dark);border-color:var(--d-orange)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-container-arrow-icon.right{border-left-color:var(--d-text-muted)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-container-arrow-icon.left{border-right-color:var(--d-text-muted)}.mh-dark a.hunterInfoView-playerActionsBlock-item-text{color:var(--d-link)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamName.noTeam,.mh-dark .hunterInfoView-treasureMaps-left-currentMap-content-title{color:var(--d-text-muted)}
`;
}
});
var marketplace_default, init_marketplace = __esm({
"src/modules/native-dark-mode/styles/marketplace.css"() {
marketplace_default = `.mh-dark .mh-dark .marketplaceView-browse-sidebar-link.active{color:var(--d-text)}.mh-dark .marketplaceHome,.mh-dark .marketplaceView .marketplaceContentContainer{background-color:var(--d-bg)}.mh-dark .marketplaceView h1,.mh-dark .marketplaceView-goldValue,.mh-dark .marketplaceHome-blockItem-name span{color:var(--d-text)}.mh-dark a.marketplaceView-moreLink,.mh-dark .marketplaceHome-block-viewAll{color:var(--d-text);background-color:var(--d);border-color:var(--d-border)}.mh-dark a.marketplaceView-moreLink:hover,.mh-dark a.marketplaceHome-block-viewAll:hover{background-color:var(--d-blue-dark)}.mh-dark .marketplaceView-table tr{color:var(--d-text);background-color:var(--d-bg)}.mh-dark .marketplaceView-table-empty{background-color:var(--d-bg)}.mh-dark .marketplaceView-table tr:nth-child(odd){color:var(--d-text);background-color:var(--d-alt)}.mh-dark .marketplaceView-table tr.empty{background-color:var(--d-alt)!important}.mh-dark .marketplaceView-itemImage.favourite{box-shadow:none}.marketplaceHome-blockMenu.active,.mh-dark .marketplaceHome-blockMenu:hover{color:var(--d-link);border-color:var(--d-purple)}.mh-dark .marketplaceView-header-tabHeader{background-color:var(--d-border)}.mh-dark .marketplaceView-header-tabHeader:hover,.mh-dark .marketplaceView-header-tabHeader.active{color:var(--d-text);background-color:var(--d-bg)}.mh-dark .marketplaceView-table,.mh-dark a.marketplaceView-header-tabHeader,.mh-dark .mh-dark .marketplaceView-browse-sidebar-link{color:var(--d-text-muted)}.mh-dark .marketplaceView-item-footer{background-color:var(--d)}.mh-dark .marketplaceView-item-footer .marketplaceView-table{border-radius:7px}.mh-dark .marketplaceView-table tr:hover{background-color:var(--d-blue-dark)}.mh-dark .marketplaceView-listing-progressBar-padding{background-color:var(--d)}.mh-dark .marketplaceView-table-name a,.mh-dark .marketplaceView-table-name a:hover{color:var(--d-text)}.mh-dark .marketplaceView-browse-sidebar-link{color:var(--d-text);background-color:var(--d-alt);border:1px solid var(--d-border)}.mh-dark .marketplaceView-browse-sidebar-link.active,.mh-dark .marketplaceView-browse-sidebar-link:hover{color:var(--d-text);background-color:var(--d-blue-dark)}.mh-dark .marketplaceView-browse-filter label{color:var(--d-text)}.mh-dark .marketplaceView-browse-sidebar:after{background-color:var(--d)}.mh-dark .marketplaceView-item-leftBlock .marketplaceHome-block-viewAll,.mh-dark a.marketplaceHome-block-viewAll{color:var(--d-text);background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark a.marketplaceHome-block-viewAll:hover{background-color:var(--d-blue-dark)}.mh-dark .marketplaceView-breadcrumb{color:var(--d-text);background-color:var(--d);border-color:var(--d-border);border-width:1px}.mh-dark a.marketplaceView-breadcrumb:hover{background-color:var(--d-blue-dark)}.mh-dark .marketplaceView-listingBody{background-color:var(--d-bg)}.mh-dark .marketplaceView-item-quickListings a.marketplaceView-goldValue{color:var(--d-text)}.mh-dark .marketplaceView-item-quickListings th{color:var(--d-text-muted)}.mh-dark .marketplaceView-listingFooter{background-color:var(--d-purple-dark)}.mh-dark .marketplaceView-item-descriptionContainer{border-top:none}.mh-dark #chartArea{margin-top:10px;margin-bottom:10px;background-color:#fff}.mh-dark #markethuntInfobox,.mh-dark #markethuntInfobox .marketplaceView-goldValue{color:#000}.mh-dark .marketplaceView-trendContainer,.mh-dark .marketplaceView-floatingTooltip{color:var(--d-text-muted);background-color:var(--d);border-color:var(--d-border)}.mh-dark .marketplaceView-floatingTooltip:after{border-top-color:var(--d-border)}.mh-dark .marketplaceView-item-graphTable .marketplaceView-trendContainer{color:var(--d-text-muted);background-color:transparent;border:none}.mh-dark .marketplaceHome-blockMenu{border-color:var(--d-transparent-10)}.mh-dark .marketplaceView-item-input-suggested a{color:var(--d-link)}.mh-dark .marketplaceView-item-cancelButton{background-color:var(--d);border-color:var(--d-border)}.mh-dark .marketplaceView-dialog{background-color:var(--d-bg)}.mh-dark .marketplaceView-item-image{border:none}.mh-dark .marketplaceView-dialog-footer,.mh-dark .marketplaceView-dialog-header{background-color:var(--d-purple)}.mh-dark .marketplaceView-listing-progressLabel{color:#e7eaee;text-shadow:0 1px var(--d-transparent-90),0 -1px var(--d-transparent-90),1px 0 var(--d-transparent-90),-1px 0 var(--d-transparent-90),1px 1px var(--d-transparent-90)}.mh-dark .marketplaceView-listing-progressBar span,.mh-dark .marketplaceView-listingType{background-color:var(--d-purple)}.mh-dark .marketplaceView-listingType.buy{background-color:var(--d-blue-dark)}.mh-dark .marketplaceView-listingType.sell{background-color:var(--d-orange-dark)}.mh-dark .marketplaceMyListings s{color:var(--d-text-muted)}.mh-dark .marketplaceView-item-graph.loading:after{background:url(https://www.mousehuntgame.com/images/ui/loaders/round_bar_green.gif) 50% 50% no-repeat}.mh-dark span[style="background-color: rgb(214, 235, 161);"],.mh-dark tr[style="background-color: rgb(214, 235, 161);"]{background-color:var(--d-green-dark)!important}
`;
}
});
var imported6, styles4, maybeShowDarkModeConflictWarning, init29, native_dark_mode_default, init_native_dark_mode = __esm({
"src/modules/native-dark-mode/index.js"() {
init_utils2();
init_markethunt();
init_inbox();
init_hover_items();
init_mice();
init_journal_preview();
init_header_dropdown();
init_adventure();
init_team();
init_location_catch_stats();
init_news();
init_tabs2();
init_journal_main();
init_settings12();
init_overlays();
init_kings_calibrator();
init_travel();
init_inventory();
init_gifts();
init_journal_misc_entries();
init_quests();
init_camp_tabs();
init_progress_log2();
init_page2();
init_root();
init_general3();
init_premium();
init_camp_trap();
init_select2();
init_loading();
init_send_supplies();
init_sidebar2();
init_maps4();
init_friends();
init_userscripts();
init_scoreboards();
init_conflict_popup();
init_mouse_view();
init_shops();
init_header();
init_favorite_setups();
init_item_view();
init_profile();
init_marketplace();
imported6 = [markethunt_default, inbox_default, hover_items_default, mice_default, journal_preview_default, header_dropdown_default, adventure_default, team_default, location_catch_stats_default, news_default, tabs_default2, journal_main_default, settings_default11, overlays_default, kings_calibrator_default, travel_default, inventory_default, gifts_default, journal_misc_entries_default, quests_default, camp_tabs_default, progress_log_default2, page_default, root_default, general_default3, premium_default, camp_trap_default, select2_default, loading_default, send_supplies_default, sidebar_default2, maps_default3, friends_default, userscripts_default, scoreboards_default, conflict_popup_default, mouse_view_default, shops_default, header_default, favorite_setups_default, item_view_default, profile_default, marketplace_default], styles4 = imported6, maybeShowDarkModeConflictWarning = () => {
if (!isDarkMode() || getSetting("native-dark-mode.confirmed", !1))
return;
let popup = createPopup({
title: "Dark Mode Conflict Warning",
content: `<p>${isMHCT() ? "You have enabled both the MouseHunt Improved Dark Mode and the MHCT dark mode. This will cause conflicts and result in a broken experience. Please disable the MHCT setting." : "You have enabled both the MouseHunt Improved Dark Mode and the dark mode extension. This will cause conflicts and result in a broken experience. Please disable the dark mode extension."}
${getSetting("native-dark-mode.has-seen-warning", !1) ? `<button class="mh-improved-darkmode-conflict-popup-confirm mousehuntActionButton small gray"><span>I understand, don't show this again</span></button>` : ""}
</p>`,
className: "mh-improved-darkmode-conflict-popup"
});
saveSetting("native-dark-mode.has-seen-warning", !0);
let confirmButton = document.querySelector(".mh-improved-darkmode-conflict-popup-confirm");
confirmButton && confirmButton.addEventListener("click", () => {
saveSetting("native-dark-mode.confirmed", !0), popup.hide();
});
}, init29 = () => __async(void 0, null, function* () {
addStyles(styles4, "native-dark-mode"), addExternalStyles("dark-mode-mice-images.css"), addBodyClass("mh-dark"), onNavigation(() => {
addBodyClass("mh-dark");
}), setTimeout(maybeShowDarkModeConflictWarning, 2e3);
}), native_dark_mode_default = {
id: "native-dark-mode",
name: "Dark Mode",
description: "Enable the dark mode.",
type: "feature",
default: !1,
load: init29
};
}
});
var init30, printing_press_paper_counter_default, init_printing_press_paper_counter = __esm({
"src/modules/printing-press-paper-counter/index.js"() {
init_utils2();
init30 = () => __async(void 0, null, function* () {
addTrapQuantity({
baseIds: [3628, 3683],
baseSlugs: ["naughty_list_printing_press_base", "folklore_printing_press_base"],
itemId: "printing_press_charge_stat_item"
});
}), printing_press_paper_counter_default = {
id: "printing-press-paper-counter",
name: "Printing Press Paper Counter",
type: "feature",
default: !0,
description: "Show the number of Prolific Printing Papers you have for the Printing Press bases.",
load: init30
};
}
});
// dist/data/journals-environment-mapping.json
var journals_environment_mapping_default, init_journals_environment_mapping = __esm({
"dist/data/journals-environment-mapping.json"() {
journals_environment_mapping_default = { ancient_city: "theme_labyrinth", bountiful_beanstalk: "theme_bountiful_beanstalk", claw_shot_city: "theme_western", desert_oasis: "theme_living_garden", foreword_farm: "theme_table_of_contents", fungal_cavern: "theme_fungal", labyrinth: "theme_labyrinth", lost_city: "theme_living_garden", moussu_picchu: "theme_moussu_picchu", pollution_outbreak: "theme_polluted", prologue_pond: "theme_table_of_contents", queso_geyser: "theme_queso_canyon", queso_plains: "theme_queso_canyon", queso_quarry: "theme_queso_canyon", queso_river: "theme_queso_canyon", rift_bristle_woods: "theme_bristle_woods_rift", rift_burroughs: "theme_burroughs_rift", sand_dunes: "theme_living_garden", school_of_sorcery: "school_of_sorcery", table_of_contents: "theme_table_of_contents" };
}
});
var settings_default12, init_settings13 = __esm({
"src/modules/journal-changer/settings/index.js"() {
settings_default12 = () => __async(void 0, null, function* () {
return [
{
id: "journal-changer.change-daily",
title: "Randomize daily",
default: !1
},
{
id: "journal-changer.change-location",
title: "Change based on location",
default: !1
}
];
});
}
});
var styles_default32, init_styles33 = __esm({
"src/modules/journal-changer/styles.css"() {
styles_default32 = `.journalContainer .top{display:flex;gap:3px;align-items:flex-start;justify-content:flex-end}.journalContainer-selectTheme{position:relative;background-color:#e6e6e6}.mh-improved-random-journal{background-image:url(https://i.mouse.rip/mh-improved/journal-random.png)}#journalContainer .journal__privacy-button{margin-right:85px;background:#e6e6e6;border:1px solid #333}
`;
}
});
var themes, getJournalThemes, updateJournalTheme, getCurrentJournalTheme, getJournalThemeForLocation, revertToSavedTheme, changeForLocation, randomizeTheme, addRandomButton, changeJournalDaily, _themeSelector, shouldListen, onThemeSelectorChange, init31, journal_changer_default, init_journal_changer = __esm({
"src/modules/journal-changer/index.js"() {
init_utils2();
init_journals_environment_mapping();
init_settings13();
init_styles33();
themes = [], getJournalThemes = () => __async(void 0, null, function* () {
let req = yield doRequest("managers/ajax/users/journal_theme.php", {
action: "get_themes"
});
return !req || !req.journal_themes ? [] : req.journal_themes.theme_list.filter((theme) => theme.can_equip === !0);
}), updateJournalTheme = (theme) => __async(void 0, null, function* () {
let current = getCurrentJournalTheme();
if (!theme || current == theme)
return !1;
shouldListen = !1;
let req = yield doRequest("managers/ajax/users/journal_theme.php", {
action: "set_theme",
theme
}, !1, {
skipLastReadJournalEntryId: !0
});
if (req.success) {
let journal = document.querySelector("#journalContainer");
journal && (journal.classList.remove(current), journal.classList.add(theme));
}
return shouldListen = !0, req;
}), getCurrentJournalTheme = () => {
let journal = document.querySelector("#journalContainer");
return journal ? [...journal.classList].find((cls) => cls.startsWith("theme_")) : !1;
}, getJournalThemeForLocation = () => {
let location = getCurrentLocation2();
return journals_environment_mapping_default[location] && themes.some((t) => t.type === journals_environment_mapping_default[location]) ? journals_environment_mapping_default[location] : !1;
}, revertToSavedTheme = () => {
let chosenTheme = getSetting("journal-changer.chosen-theme", !1);
getCurrentJournalTheme() !== chosenTheme && updateJournalTheme(chosenTheme);
}, changeForLocation = () => __async(void 0, null, function* () {
if (getCurrentPage() !== "camp")
return;
let newTheme = getJournalThemeForLocation();
if (!newTheme) {
revertToSavedTheme();
return;
}
themes.length === 0 && (themes = yield getJournalThemes());
let currentTheme = getCurrentJournalTheme();
if (!currentTheme || currentTheme === newTheme)
return;
if (!themes.some((t) => t.type === newTheme)) {
revertToSavedTheme();
return;
}
updateJournalTheme(newTheme);
let journal = document.querySelector("#journalContainer");
journal && (journal.classList.remove(currentTheme), journal.classList.add(newTheme));
}), randomizeTheme = (skip = !1) => __async(void 0, null, function* () {
themes.length === 0 && (themes = yield getJournalThemes()), skip && (themes = themes.filter((t) => t.type !== skip));
let current = getCurrentJournalTheme();
current && (themes = themes.filter((t) => t.type !== current));
let theme = themes[Math.floor(Math.random() * themes.length)];
return !theme || !theme.type ? !1 : (updateJournalTheme(theme.type), theme.type);
}), addRandomButton = () => {
let journal = document.querySelector("#journalContainer .top");
if (!journal)
return;
let button = makeElement("a", ["journalContainer-selectTheme", "mh-improved-random-journal"], "Randomize");
button.addEventListener("click", randomizeTheme), journal.append(button);
}, changeJournalDaily = () => __async(void 0, null, function* () {
if (getCurrentLocation2() !== "camp")
return;
let lastChangeValue = getSetting("journal-changer.last-change", 0), lastChange = new Date(Number.parseInt(lastChangeValue, 10)), now = /* @__PURE__ */ new Date();
if (!lastChange || lastChange.getDate() !== now.getDate() || lastChange.getMonth() !== now.getMonth() || lastChange.getFullYear() !== now.getFullYear()) {
let lastTheme = getSetting("journal-changer.last-theme", !1), theme = yield randomizeTheme(lastTheme);
saveSetting("journal-changer.last-change", now.getTime()), saveSetting("journal-changer.last-theme", theme);
}
}), shouldListen = !0, onThemeSelectorChange = () => {
_themeSelector || (_themeSelector = hg.views.JournalThemeSelectorView.show, hg.views.JournalThemeSelectorView.show = () => __async(void 0, null, function* () {
_themeSelector(), onRequest("users/journal_theme.php", (request, data) => {
data.action === "set_theme" && shouldListen && (saveSetting("journal-changer.last-theme", data.theme), saveSetting("journal-changer.chosen-theme", data.theme));
});
}));
}, init31 = () => __async(void 0, null, function* () {
addStyles(styles_default32, "journal-changer"), getSetting("journal-changer.change-daily", !1) && changeJournalDaily(), getSetting("journal-changer.change-location", !0) && (changeForLocation(), onEvent("travel_complete", changeForLocation)), onNavigation(addRandomButton, {
page: "camp"
}), onThemeSelectorChange();
}), journal_changer_default = {
id: "journal-changer",
name: "Journal Theme Changer",
type: "feature",
default: !1,
description: "Randomize your journal theme, randomize it daily, or change it based on your location.",
load: init31,
settings: settings_default12
};
}
});
var settings_default13, init_settings14 = __esm({
"src/modules/better-tournaments/settings/index.js"() {
settings_default13 = () => __async(void 0, null, function* () {
return [{
id: "better-tournaments.time-inline",
title: "Display localized times inline, rather than on hover",
default: !1
}];
});
}
});
var styles_default33, init_styles34 = __esm({
"src/modules/better-tournaments/styles.css"() {
styles_default33 = `.teamPage-memberRow-identity .teamPage-member-nameContainer{width:auto}.tournamentPage-tournamentContainer-customPrizes{display:none}.tournamentPage-tournamentContainer-name{margin-bottom:5px;font-size:13px}.tournamentPage-tournamentContainer-description{padding-top:2px;font-size:9px}.train .tournamentPage-tournamentContainer-description{max-height:35px;padding-right:10px;font-size:9px;line-height:10px}.tournamentPage-tournamentRow .tournamentPage-tournamentContainer-icon{display:none}.tournamentPage-tournamentContainer-labels .tournamentPage-tournament-column:nth-child(6){display:none}.tournamentPage-tournament-column.members_5 .tournamentPage-tournament-teamMember{display:block;width:19.6px;height:19.6px}.tournamentPage-tournament-column.value.teamMembers.members_5{display:flex;flex-flow:row wrap;align-items:center}.tournamentPage-tournament-column.members_5 .tournamentPage-tournament-teamMember.empty:after{margin-top:4px;margin-left:-5px}.tournamentPage-tournamentContainer-labels{display:grid;grid-template-columns:305px 100px 80px 55px;justify-items:stretch;margin-left:15px}.tournamentPage-tournament-column .tournamentPage-tournament-teamMember:is(.empty){color:transparent}.tournamentPage-tournament-column .tournamentPage-tournament-teamMember.empty:before{content:counter(team);counter-increment:team}.tournamentPage-tournament-column.value.teamMembers{counter-reset:team}.tournamentPage-tournament-column .tournamentPage-tournament-teamMember.empty:last-child:before{position:absolute;top:4px;right:-1px;display:inline-block;width:22px;height:22px;font-size:18px;line-height:22px;color:#474747;background-color:#e5e5e5;border-radius:50%;box-shadow:1px 1px 1px #c6c6c6}.tournamentPage-tournament-column.members_5 .tournamentPage-tournament-teamMember.empty:last-child:before{top:-2px;right:-4px;width:21px;height:21px;font-size:17px;line-height:20px}.tournamentPage-tournament-column.label,a.tournamentPage-tournament-column.icon,a.tournamentPage-tournament-column.name,.tournamentPage-tournament-column.value,.tournamentPage-tournament-column.actions{width:auto}.tournamentPage-tournamentRow{display:grid;grid-template-columns:0 300px 1fr 1fr 20px 100px 70px;gap:10px;place-items:center stretch;padding:5px 10px 5px 0;border:1px solid #d7d7d7;border-radius:4px}.tournamentPage-tournament-column.label.teamMembers{display:none;text-align:center}.tournamentPage-tournamentRow.train .tournamentPage-tournamentContainer-icon,.tournamentPage-tournamentContainer-icon{width:30px;height:30px;margin:0;background-repeat:no-repeat;background-position:unset;background-size:contain}.tournamentPage-profile-summaryContainer{min-height:100px;padding-left:130px;margin-right:20px;margin-left:20px;background-size:120px}.tournamentPage-profile-description{display:grid;grid-template-columns:1fr 125px;place-items:center end;font-size:13px;line-height:20px}.tournamentPage-profile-action{display:block;order:2;float:none;font-size:14px}.tournamentPage-profile-prizeWaiting{display:grid;grid-template-columns:1fr 100px;align-items:center;justify-content:center;padding:10px 20px;margin:20px 0;font-size:18px;font-weight:400}.tournamentPage-tournamentHeader,.tournamentPage-viewState .mousehuntTabContentContainer{background:#efe9df;border:1px solid #af9969;box-shadow:inset 1px 1px 1px #e2d6b5}.tournamentPage-profile-details-rules h2:first-of-type{display:none}img.tournamentPage-profile-details-rules-icon{display:none}.tournamentPage-profile-details-rules br:first-of-type:after,.tournamentPage-profile-details-rules br:first-of-type:before{display:block}.tournamentPage-profile-details-generalRules ul li:nth-of-type(2),.tournamentPage-profile-details-generalRules ul li:nth-of-type(3){display:none}.tournamentPage-profile-details-generalRules ul{margin:0 0 0 15px;list-style:disc}.tournamentPage-profile-details-generalRules-title{display:none}.tournamentPage-profile-summary{height:auto;min-height:200px;background-color:#f6f3eb;border:1px solid #cbc6bb;border-radius:5px;box-shadow:inset -1px -1px 1px #d3cecb}.tournamentPage-tournamentHeader,.tournamentPage-viewState .mousehuntTabContentContainer{background-color:#f6f3eb;border:1px solid #cbc6bb;border-radius:5px;box-shadow:inset -1px -1px 1px #d3cecb}.tournamentPage-viewState .mousehuntTabHeader span{margin-bottom:1px;background:#f6f3eb;border:1px solid #cbc6bb;box-shadow:none}.tournamentPage-viewState .mousehuntTabHeader.active span,.tournamentPage-viewState .mousehuntTabHeader span:hover,.tournamentPage-viewState .mousehuntTabHeader span:focus{border-bottom:none}.tournamentPage-viewState .mousehuntTabHeader:before{background:none;box-shadow:none}.tournamentPage-viewState .mousehuntTabHeader.active span,.tournamentPage-viewState .mousehuntTabHeader:hover span,.tournamentPage-viewState .mousehuntTabHeader:focus span{border-bottom:1px solid #f6f3eb}.tournamentPage-profile-details-rewardContainer h2{display:none}.tournamentPage-profile-details-rewardContainer>div:last-child{display:none}.tournamentPage-profile-details-rewardContainer{background-color:transparent}.tournamentPage-profile-details-padding{position:relative;background-color:#f6f3eb}.tournamentPage-profile-details-reward-name{padding-bottom:20px;margin-left:30px;font-weight:400}.tournamentPage-profile-details-padding div:nth-child(2){position:absolute;top:5px;left:5px;width:30px;height:30px;margin-left:0;color:transparent;background-size:contain}.tournamentPage-profile-details-reward-item{margin-left:5px;mix-blend-mode:multiply}.tournamentPage-profile-details-environmentContainer{position:absolute;right:0;bottom:-10px;display:flex;flex-flow:row wrap;place-content:center center;align-items:stretch;width:290px;padding-top:10px;background-color:#f6f3eb;border:1px solid #cbc6bb;border-radius:5px;box-shadow:inset -1px -1px 1px #d3cecb}.tournamentPage-profile-details-rules h2{display:none;padding-bottom:11px}.tournamentPage-profile-details-generalRules{width:270px;font-size:11px;background-color:#f6f3eb;border:1px solid #cbc6bb;border-radius:5px;box-shadow:inset -1px -1px 1px #d3cecb}.tournamentPage-profile-details-environmentWarning{display:none}.tournamentPage-profile-details-rules{display:flex;flex-direction:column;justify-content:flex-start;font-size:12px}.tournamentPage-profile-details-mouseGroup{width:auto;padding:10px;margin:0;background-color:#f6f3eb;border:1px solid #cbc6bb;border-radius:5px;box-shadow:inset -1px -1px 1px #d3cecb}h2.tournamentPage-profile-details-mouseGroup-name{padding-left:32px;margin-bottom:10px;font-size:14px;font-weight:900}.tournamentPage-profile-details-mouseGroup-miceContainer{display:flex;flex-flow:column wrap;margin:0}.tournamentPage-profile-details-mice{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}.tournamentHelp.clear-block img{display:none}.tournamentPage-profile-details-mouseGroup-mouse{width:100%}.tournamentStatusHud .score,.tournamentStatusHud .rank{padding:15px;margin:-15px}.teamMembers:hover .memberHover,.rank:hover .scoreHover{display:block}.score:hover .pointsHover{display:grid}.memberHover,.scoreHover,.pointsHover{position:absolute;top:90%;left:-50%;z-index:31;display:none;width:275px;color:#4e300b;background-color:#f6f3eb;border:1px solid #cbc6bb;border-radius:5px;box-shadow:inset -1px -1px 1px #d3cecb,1px 3px 3px #939393}.pointsHover{left:-130%;grid-template-columns:1fr 1fr 1fr;place-items:stretch stretch;width:auto}.scoreRow{display:grid;grid-template-columns:25px 1fr 25px;place-items:center start;padding:5px;margin-bottom:5px}.pointsTotal{text-align:center}img.memberImage{width:20px;height:20px;padding:5px}.memberRow{display:flex;padding:2px}.memberHover{left:0;width:auto;min-width:120px;padding:5px}.memberRow:nth-child(2n){background-color:#e9e6df}.scoreRow:nth-child(2n){background-color:#dfdfdf}.scoreRow:last-child{margin-bottom:0}.scoreIcon{position:relative;width:20px;height:20px;margin-right:5px;overflow:hidden;border:1px solid #c2b384;border-radius:3px}.scoreIcon div{position:absolute;top:0;left:0;width:20px;height:20px;background-repeat:no-repeat;background-size:contain}.teamWrapper{display:flex;align-items:center}.scorePoints{justify-self:end}.pointsRow{width:150px;padding-top:3px;border:1px solid #cbc6bb;border-top:none;border-left:none}img.pointsMouseIcon{width:15px;height:15px;margin-right:4px;margin-bottom:3px}.pointsMouseWrapper{display:flex;align-items:center;justify-content:flex-start;overflow:hidden}.pointsMouseName{font-size:11px;font-weight:400;text-overflow:ellipsis;white-space:nowrap}.pointsMice{padding:5px}.pointsTitle{padding:5px 0;font-size:12px;text-align:center}.tournamentStatusHud .rank span,.tournamentStatusHud .score span{display:inline-block;font-size:13px;line-height:12px}.tournamentStatusHud a.name,.tournamentStatusHud a.name:visited,.tournamentStatusHud a.name:hover,.tournamentStatusHud a.name:focus{left:33px;font-size:12px}.tournamentStatusHud .timer,.tournamentStatusHud.pending .timer{top:-4px;left:160px;width:220px;font-size:12px;color:#000;text-align:center}.tournamentStatusHud .title{display:none}.tournament-normal-time.tournament-time-display-hover{position:absolute;inset:0 -30px;z-index:6;display:none;padding:5px;text-align:center;white-space:nowrap;background-color:#eee;border:1px solid #3d3d3d;border-radius:5px;box-shadow:1px 1px 3px #191919,0 0 5px 5px #fff}.tournamentPage-tournament-column.value:hover .tournament-time-display-hover{display:block}.tournamentPage-tournamentRow.tournamentPage-tournamentData .tournamentPage-tournament-column.value:nth-child(3),.tournamentPage-tournamentRow.tournamentPage-tournamentData .tournamentPage-tournament-column.value:nth-child(4){height:auto;min-height:25px}.tournament-normal-time.tournament-time-display-inline{margin-top:4px}.tournamentPage-tournamentRow:hover:before{box-shadow:none}.tournamentPage-tournamentRow:hover{background-color:#eee}.tournamentPage-tournamentRow.signed_up:before{background-color:transparent;box-shadow:none}.tournamentPage-tournamentRow.tournamentPage-tournamentData.signed_up{background-color:#feff8d}.tournamentPage-tournamentRow.tournamentPage-tournamentData.signed_up:hover{background-color:#ffde2f}.tournamentPage-tournamentRow.empty .tournamentPage-tournament-empty{white-space:nowrap}.tournamentPage-tournamentButton{padding:2px 15px;line-height:18px;color:#000;text-shadow:0 0 1px #fff;background-color:#f4e830;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #ffae00 inset,1px 1px 1px #b9b9b9}.tournamentPage-tournamentButton:hover,.tournamentPage-tournamentButton:focus{background-color:#e4d50c}.tournamentPage-tournamentHeader a{margin:0;font-size:12px;color:#000;text-shadow:0 0 1px #fff;background-color:#f6f3eb;border:1px solid #000;border-radius:4px}.tournamentPage-tournamentHeader a:hover,.tournamentPage-tournamentHeader a:focus{background-color:#fff;border-color:#000}.tournament-team-rank{background-color:#0d7d3a}.tournament-team-rank.rank_1{color:#000}tbody tr.scoreboardTableView-row-separator:nth-child(5){display:none}tr.scoreboardTableView-row.viewer,tr.scoreboardTableView-row.highlight{background-color:#fdfbcc;border-radius:11px;outline:2px solid #fc6;box-shadow:none}.viewer .tournament-team-rank.updated:hover:after{position:absolute;inset:14px 20px 14px 10px;display:flex;align-items:center;justify-content:center;font-size:11px;color:#000;text-align:center;content:"Page " attr(data-rank-page);background-color:#fdfbcce5;border:1px #aaa9a9;border-radius:5px}.scoreboardTableView-row-rank{position:relative}.tournamentStatusHud a.name,.tournamentStatusHud a.teamMembers,.tournamentStatusHud a.friendsOnline,.tournamentStatusHud .help,.tournamentStatusHud .tournamentInviteTeamMembers,.tournamentStatusHud .tournamentInviteFriends{transition:.2s}.tournamentStatusHud a.name{border-radius:23px 20px 20px 29px}.tournamentStatusHud a.name:hover{width:221px;padding-left:10px;margin-left:5px;background-color:#e658137f}.tournamentStatusHud.pending a.name:hover{width:324px;padding-left:11px;margin-left:4px}.tournamentStatusHud a.teamMembers{border-radius:20px}.tournamentStatusHud a.teamMembers:hover{background-color:#c800ff7f}.tournamentStatusHud a.friendsOnline{border-radius:0% 100% 100% 0%/0% 100% 100%}.tournamentStatusHud a.friendsOnline:hover{background-color:#a7de6f7f}.tournamentStatusHud a.friendsOnline,.tournamentStatusHud a.friendsOnline:visited,.tournamentStatusHud a.friendsOnline:hover{left:693px;font-size:14px}.tournamentStatusHud .help:hover{filter:brightness(1.1)}.tournamentStatusHud .tournamentInviteTeamMembers{border-radius:5px 5px 5px 8px}.tournamentStatusHud .tournamentInviteFriends{width:63px;margin-left:1px;border-radius:5px 5px 7px 6px}.tournamentStatusHud .tournamentInviteTeamMembers:hover,.tournamentStatusHud .tournamentInviteFriends:hover{padding:2px 0;margin-top:-2px;background:#e8e3a07f}.tournamentStatusHud .rank:after,.tournamentStatusHud .score:after{position:absolute;inset:8px 9px 7px 4px;content:"";border-radius:15px 3px 3px 15px;transition:.2s}.tournamentStatusHud .score:after{inset:9px -21px 10px 10px;border-radius:2px 18px 18px 3px}.tournamentStatusHud .score:hover:after{background:#e8e3a07f}.tournamentStatusHud .rank:hover:after{background-color:#c800ff7f}
`;
}
});
var updateTournamentHud, updateTournamentList, updateScoreboard, init32, better_tournaments_default, init_better_tournaments = __esm({
"src/modules/better-tournaments/index.js"() {
init_utils2();
init_settings14();
init_styles34();
updateTournamentHud = () => __async(void 0, null, function* () {
var _a, _b, _c;
let activeTourney = document.querySelector("#tournamentStatusHud > a.name");
if (!activeTourney)
return;
let tourneyId = activeTourney.href.split("=")[1];
if (!tourneyId)
return;
let tourneyData = yield doRequest("managers/ajax/pages/page.php", {
page_class: "Tournament",
"page_arguments[tournament_id]": tourneyId
});
if (tourneyData != null && tourneyData.page)
if ((_a = tourneyData == null ? void 0 : tourneyData.page) != null && _a.name && (activeTourney.innerText = (_b = tourneyData == null ? void 0 : tourneyData.page) == null ? void 0 : _b.name), (_c = tourneyData.page) != null && _c.is_active) {
let rank = document.querySelector(".tournamentStatusHud .rank");
if (rank) {
let scoreHover = document.createElement("div");
scoreHover.classList.add("scoreHover"), tourneyData.page.scoreboard.rows.forEach((scoreboard) => {
let scoreRow = makeElement("div", "scoreRow");
makeElement("div", "scoreRank", scoreboard.rank, scoreRow);
let teamWrapper = makeElement("a", "teamWrapper");
teamWrapper.href = `https://www.mousehuntgame.com/team.php?team_id=${scoreboard.team_id}`;
let icon = makeElement("div", "scoreIcon"), iconLayer1 = makeElement("div", "scoreIconLayer1");
iconLayer1.style.backgroundImage = `url(${scoreboard.emblem.layers[0].image})`, icon.append(iconLayer1);
let iconLayer2 = makeElement("div", "scoreIconLayer2");
iconLayer2.style.backgroundImage = `url(${scoreboard.emblem.layers[1].image})`, icon.append(iconLayer2);
let iconLayer3 = makeElement("div", "scoreIconLayer3");
iconLayer3.style.backgroundImage = `url(${scoreboard.emblem.layers[2].image})`, icon.append(iconLayer3), teamWrapper.append(icon), makeElement("div", "scoreName", scoreboard.name, teamWrapper), scoreRow.append(teamWrapper), makeElement("div", "scorePoints", scoreboard.points, scoreRow), scoreHover.append(scoreRow);
}), rank.append(scoreHover);
}
let points = document.querySelector(".tournamentStatusHud .score");
if (points) {
let pointsHover = document.createElement("div");
pointsHover.classList.add("pointsHover"), tourneyData.page.mouse_groups.reverse().forEach((mouseGroup) => {
let pointsRow = makeElement("div", "pointsRow");
makeElement("div", "pointsTotal", mouseGroup.name, pointsRow);
let groupMice = document.createElement("div");
groupMice.classList.add("pointsMice"), mouseGroup.mice.forEach((mouse) => {
let mouseWrapper = makeElement("div", "pointsMouseWrapper"), mouseIcon = makeElement("img", "pointsMouseIcon");
mouseIcon.src = mouse.thumb, mouseWrapper.append(mouseIcon), makeElement("div", "pointsMouseName", mouse.name, mouseWrapper), groupMice.append(mouseWrapper);
}), pointsRow.append(groupMice), pointsHover.append(pointsRow);
}), points.append(pointsHover);
}
} else {
let members = document.querySelector(".tournamentStatusHud a.teamMembers");
if (members) {
let memberHover = makeElement("div", "memberHover");
tourneyData.page.members.forEach((member) => {
var _a2, _b2;
let memberRow = makeElement("div", "memberRow");
if (member.is_empty)
makeElement("div", "memberEmpty", "Empty", memberRow), memberRow.classList.add("empty");
else {
let image = makeElement("img", "memberImage");
image.src = (_a2 = member.profile_pic) != null ? _a2 : "https://www.mousehuntgame.com//images/ui/friends/anonymous_user.png", memberRow.append(image), makeElement("div", "memberName", (_b2 = member.name) != null ? _b2 : "", memberRow);
}
memberHover.append(memberRow);
}), members.append(memberHover);
}
}
}), updateTournamentList = () => __async(void 0, null, function* () {
let beginsRows = document.querySelectorAll(".tournamentPage-tournamentRow.tournamentPage-tournamentData .tournamentPage-tournament-column.value:nth-child(3)");
if (!beginsRows.length)
return;
let durationRows = document.querySelectorAll(".tournamentPage-tournamentRow.tournamentPage-tournamentData .tournamentPage-tournament-column.value:nth-child(4)");
if (!durationRows.length)
return;
let nowTime = (/* @__PURE__ */ new Date()).getTime(), dateOptions = {
weekday: "short",
month: "short",
day: "numeric",
hour: "numeric",
minute: "numeric"
};
beginsRows.forEach((beginsRow, i) => {
let beginsParts = beginsRow.innerText.split(" "), beginsMinutes = beginsParts.reduce((acc, part) => part === "minutes" || part === "minute" ? acc + Number.parseInt(beginsParts[beginsParts.indexOf(part) - 1], 10) : part === "hours" || part === "hour" ? acc + Number.parseInt(beginsParts[beginsParts.indexOf(part) - 1], 10) * 60 : part === "days" || part === "day" ? acc + Number.parseInt(beginsParts[beginsParts.indexOf(part) - 1], 10) * 1440 : acc, 0), inlineOrHover = getSetting("better-tournaments.time-inline") ? "tournament-time-display-inline" : "tournament-time-display-hover", beginsDate = new Date(nowTime + beginsMinutes * 6e4), beginsDateString = beginsDate.toLocaleString("en-US", dateOptions), beginsDateEl = makeElement("div", ["tournament-normal-time", "tournament-begins-date", inlineOrHover], beginsDateString);
beginsRow.append(beginsDateEl);
let durationParts = durationRows[i].innerText.split(" "), durationMinutes = durationParts.reduce((acc, part) => part === "minutes" || part === "minute" ? acc + Number.parseInt(durationParts[durationParts.indexOf(part) - 1], 10) : part === "hours" || part === "hour" ? acc + Number.parseInt(durationParts[durationParts.indexOf(part) - 1], 10) * 60 : part === "days" || part === "day" ? acc + Number.parseInt(durationParts[durationParts.indexOf(part) - 1], 10) * 1440 : acc, 0), durationDateString = new Date(beginsDate.getTime() + durationMinutes * 6e4).toLocaleString("en-US", dateOptions), durationDateEl = makeElement("div", ["tournament-normal-time", "tournament-end-date", inlineOrHover], durationDateString);
durationRows[i].append(durationDateEl);
});
}), updateScoreboard = () => {
document.querySelectorAll(".tournament-team-rank:not(.updated)").forEach((rank) => {
rank.classList.add("updated");
let rankParts = rank.innerText.split(/(\d+)/);
if (rankParts.length !== 3)
return;
let rankNum = Number.parseInt(rankParts[1], 10);
rankNum <= 25 && rank.classList.add("rank-first-page"), rank.setAttribute("data-rank", rankNum), rank.setAttribute("data-rank-page", Math.ceil(rankNum / 25)), rank.innerText = rankNum.toLocaleString("en-US") + rankParts[2];
});
}, init32 = () => __async(void 0, null, function* () {
addStyles(styles_default33, "better-tournaments"), setTimeout(updateTournamentHud, 1e3), onEvent("tournament_status_change", updateTournamentHud), onNavigation(updateTournamentList, {
page: "tournament"
}), onNavigation(updateScoreboard, {
page: "scoreboards"
}), onRequest("pages/scoreboards.php", updateScoreboard);
}), better_tournaments_default = {
id: "better-tournaments",
name: "Better Tournaments",
type: "better",
default: !0,
description: "Update the Tournaments UI to show information on hover and make various small interface tweaks.",
load: init32,
settings: settings_default13
};
}
});
var settings_default14, init_settings15 = __esm({
"src/modules/custom-shield/settings/index.js"() {
settings_default14 = () => __async(void 0, null, function* () {
let options2 = [
{ name: "Default", value: "default" },
{ name: "Default (normal resolution)", value: "default-normal" },
{ name: "Default (no LGS)", value: "default-no-lgs" },
{
name: "Events",
value: "group",
options: [
{ name: "Birthday (Generic)", value: "birthday" },
{ name: "Birthday (Year 10)", value: "birthday.year10" },
{ name: "Birthday (Year 11)", value: "birthday.year11" },
{ name: "Birthday (Year 12)", value: "birthday.year12" },
{ name: "Birthday (Year 13)", value: "birthday.year13" },
{ name: "Birthday (Year 14)", value: "birthday.year14" },
{ name: "Birthday (Year 15)", value: "birthday.year15" },
{ name: "Birthday (Year 16)", value: "birthday.year16" },
{ name: "Great Winter Hunt", value: "winter_hunt" },
{ name: "Halloween", value: "halloween" },
{ name: "Halloween (Pumpkins)", value: "halloween-text" },
{ name: "Larry's Football Challenge", value: "larrys_football_challenge" },
{ name: "Pride (LGS Required)", value: "pride" },
{ name: "Remembrance Day", value: "remembrance_day" },
{ name: "Spring Egg Hunt (LGS Required)", value: "spring-egg-hunt" },
{ name: "Spring Egg Hunt Alt (LGS Required)", value: "spring-egg-hunt-alt" },
{ name: "Valentine's", value: "valentines" }
]
},
{
name: "Color (LGS required)",
value: "group",
options: [
{ name: "Blue", value: "color-blue" },
{ name: "Cyan", value: "color-cyan" },
{ name: "Green", value: "color-green" },
{ name: "Pink", value: "color-pink" },
{ name: "Purple", value: "color-purple" },
{ name: "Red", value: "color-red" },
{ name: "Faded", value: "color-faded" },
{ name: "Rainbow", value: "color-rainbow" },
{ name: "Cotton Candy", value: "color-cotton-candy" },
{ seperator: !0 },
{ name: "Blue with matching timer", value: "color-blue-timer" },
{ name: "Cyan with matching timer", value: "color-cyan-timer" },
{ name: "Green with matching timer", value: "color-green-timer" },
{ name: "Pink with matching timer", value: "color-pink-timer" },
{ name: "Purple with matching timer", value: "color-purple-timer" },
{ name: "Red with matching timer", value: "color-red-timer" },
{ name: "Rainbow with matching timer", value: "color-rainbow-timer" }
]
},
{
name: "Title Shields",
value: "group",
options: [
{ name: "Current Title ", value: "title" },
{ seperator: !0 },
{ name: "Novice", value: "title.novice" },
{ name: "Recruit", value: "title.recruit" },
{ name: "Apprentice", value: "title.apprentice" },
{ name: "Initiate", value: "title.initiate" },
{ name: "Journeyman / Journeywoman", value: "title.journeyman" },
{ name: "Master", value: "title.master" },
{ name: "Grandmaster", value: "title.grandmaster" },
{ name: "Legendary", value: "title.legendary" },
{ name: "Hero", value: "title.hero" },
{ name: "Knight", value: "title.knight" },
{ name: "Lord / Lady", value: "title.lord" },
{ name: "Baron / Baroness", value: "title.baron" },
{ name: "Count / Countess", value: "title.count" },
{ name: "Duke / Duchess", value: "title.duke" },
{ name: "Grand Duke / Duchess", value: "title.grandduke" },
{ name: "Archduke / Archduchess", value: "title.archduke" },
{ name: "Viceroy", value: "title.viceroy" },
{ name: "Elder", value: "title.elder" },
{ name: "Sage", value: "title.sage" },
{ name: "Fabled", value: "title.fabled" }
]
},
{
name: "Silly",
value: "group",
options: [
{ name: "Glazy", value: "glazy" },
{ name: "Scrambles ", value: "scrambles" },
{ name: "Jerry ", value: "jerry" },
{ name: "Romeno ", value: "romeno" }
]
}
];
if (!user.has_shield) {
let toDisable = /* @__PURE__ */ new Set([
"default-no-lgs",
"pride",
"spring-egg-hunt",
"spring-egg-hunt-alt",
"Color (LGS required)"
]);
options2 = options2.map((option) => {
if (option.value === "group") {
let disabledParent = toDisable.has(option.name) || toDisable.has(option.value);
disabledParent && (option.disabled = !0), option.options = option.options.map((groupOption) => ((toDisable.has(groupOption.value) || disabledParent) && (groupOption.disabled = !0), groupOption));
}
return option;
});
}
return [{
id: "custom-shield",
title: 'Custom Shield <a class="mh-improved-custom-shield-preview">Preview choices</a>',
default: [options2[0]],
description: "Change the shield to an event shield, color, title shield, or silly shield.",
settings: {
type: "multi-select",
number: 1,
options: options2
}
}];
});
}
});
var styles_default34, init_styles35 = __esm({
"src/modules/custom-shield/styles.css"() {
styles_default34 = `.mousehuntHud-shield.default,.mousehuntHud-shield.golden.default-no-lgs,.mousehuntHud-shield.default.golden.default-no-lgs{top:2px;left:10px;background-image:url(https://i.mouse.rip/shield-no-lgs.png);filter:drop-shadow(0 0 5px #e8dbb8);background-size:contain;transition:opacity .3s ease-in-out}.mousehuntHud-shield.golden.default{top:2px;left:10px;background-image:url(https://www.mousehuntgame.com/images/mousehunt_gold_logo.png);filter:drop-shadow(0 0 5px #e8dbb8);background-size:contain;transition:opacity .3s ease-in-out}.mousehuntHud-shield.default-normal{top:unset;left:unset;background-image:none;filter:none}.mousehuntHud-shield.golden.default-normal{top:unset;left:unset;background-image:url(https://www.mousehuntgame.com/images/ui/elements/header_golden_shield.gif);filter:none}.mousehuntHud-shield.golden.default-fancy:hover,.mousehuntHud-shield.golden.default-fancy:focus{opacity:.9}.mousehuntHud-shield.glazy{top:2px;left:10px;background-image:url(https://i.mouse.rip/shield-glazy.png);filter:drop-shadow(0 0 5px #e8dbb8);background-size:contain}.mousehuntHud-shield.halloween-text{top:2px;left:1px;background-image:url(https://i.mouse.rip/shield-halloween-text.png);filter:drop-shadow(0 0 5px #e8dbb8);background-size:contain}.mousehuntHud-shield.mhui-custom-shield.pride,.mousehuntHud-shield.golden.pride{background:url(https://i.mouse.rip/shield-pride.png) 0 0/105%}.mousehuntHud-shield.scrambles{background-image:url(https://i.mouse.rip/shield-scrambles-bawk.png)}.mousehuntHud-shield.golden.scrambles{background-image:url(https://i.mouse.rip/shield-scrambles-bawk.png),url(https://www.mousehuntgame.com/images/ui/elements/header_golden_shield.gif)}.mousehuntHud-shield.jerry{background-image:url(https://i.mouse.rip/shield-jerry.png)}.mousehuntHud-shield.golden.jerry{background-image:url(https://i.mouse.rip/shield-jerry.png),url(https://www.mousehuntgame.com/images/ui/elements/header_golden_shield.gif)}.mousehuntHud-shield.golden.spring-egg-hunt{background:url(https://i.mouse.rip/shield-seh.png) 1px 1px/104%}.mousehuntHud-shield.golden.spring-egg-hunt-alt{background:url(https://i.mouse.rip/shield-seh-alt.png) 1px 1px/104%}.mousehuntHud-shield.romeno:after{position:absolute;bottom:0;left:-69px;z-index:1;width:140px;height:140px;content:"";background-image:url(https://i.mouse.rip/shield-romeno.png);filter:drop-shadow(6px 0 14px #fff);background-repeat:no-repeat;background-size:contain}.mousehuntHud-shield.title,.mousehuntHud-shield.golden.title{top:2px;left:2px;background:url(https://i.mouse.rip/shield-blank-2.png) 0 0 / contain no-repeat}.mousehuntHud-shield.title:after{position:absolute;inset:0;content:"";filter:drop-shadow(0 0 10px #e8dbb8);background-repeat:no-repeat;background-position:center;background-size:105px;transition:background-image .5s}.mousehuntHud-shield.title.novice:after,.mousehuntHud-shield.golden.title.novice:after{background-image:url(https://www.mousehuntgame.com/images/titles/84bc1109b5cd7aa8c24d195bc8207c38.png)}.mousehuntHud-shield.title.recruit:after,.mousehuntHud-shield.golden.title.recruit:after{background-image:url(https://www.mousehuntgame.com/images/titles/3f1e44bbaa7138da4c326819e9f3f0a8.png)}.mousehuntHud-shield.title.apprentice:after,.mousehuntHud-shield.golden.title.apprentice:after{background-image:url(https://www.mousehuntgame.com/images/titles/6f4673dd2d9d1e98b4569667d702a775.png)}.mousehuntHud-shield.title.initiate:after,.mousehuntHud-shield.golden.title.initiate:after{background-image:url(https://www.mousehuntgame.com/images/titles/e96387f7261b95c0eeab9291e4e594e1.png)}.mousehuntHud-shield.title.journeyman:after,.mousehuntHud-shield.golden.title.journeyman:after{background-image:url(https://www.mousehuntgame.com/images/titles/ad6875955f541159133c6d3798519f81.png)}.mousehuntHud-shield.title.master:after,.mousehuntHud-shield.golden.title.master:after{background-image:url(https://www.mousehuntgame.com/images/titles/35ee6056a09037fb13a9195881875045.png)}.mousehuntHud-shield.title.grandmaster:after,.mousehuntHud-shield.golden.title.grandmaster:after{background-image:url(https://www.mousehuntgame.com/images/titles/0da3761747914f497c16dc2051ba132d.png)}.mousehuntHud-shield.title.legendary:after,.mousehuntHud-shield.golden.title.legendary:after{background-image:url(https://www.mousehuntgame.com/images/titles/fca35751046f4bcc972716ca484b6d61.png)}.mousehuntHud-shield.title.hero:after,.mousehuntHud-shield.golden.title.hero:after{background-image:url(https://www.mousehuntgame.com/images/titles/0567284d6e12aaaed35ca5912007e070.png)}.mousehuntHud-shield.title.knight:after,.mousehuntHud-shield.golden.title.knight:after{background-image:url(https://www.mousehuntgame.com/images/titles/398dca9a8c7703de969769491622ca32.png)}.mousehuntHud-shield.title.lord:after,.mousehuntHud-shield.golden.title.lord:after{background-image:url(https://www.mousehuntgame.com/images/titles/9a6acd429a9a3a4849ed13901288b0b8.png)}.mousehuntHud-shield.title.baron:after,.mousehuntHud-shield.golden.title.baron:after{background-image:url(https://www.mousehuntgame.com/images/titles/ea9c0ec2e6d3d81c14e61f5ce924d0e1.png)}.mousehuntHud-shield.title.count:after,.mousehuntHud-shield.golden.title.count:after{background-image:url(https://www.mousehuntgame.com/images/titles/dd11711a25b80db90e0306193f2e8d78.png)}.mousehuntHud-shield.title.duke:after,.mousehuntHud-shield.golden.title.duke:after{background-image:url(https://www.mousehuntgame.com/images/titles/eb46ac1e8197b13299ab860f07d963db.png)}.mousehuntHud-shield.title.grandduke:after,.mousehuntHud-shield.golden.title.grandduke:after{background-image:url(https://www.mousehuntgame.com/images/titles/87937fa96bbb3b2dd3225df883002642.png)}.mousehuntHud-shield.title.archduke:after,.mousehuntHud-shield.golden.title.archduke:after{background-image:url(https://www.mousehuntgame.com/images/titles/043efe31de4f0f2e0ddca590fe829032.png)}.mousehuntHud-shield.title.viceroy:after,.mousehuntHud-shield.golden.title.viceroy:after{background-image:url(https://www.mousehuntgame.com/images/titles/e2e79f6f9201a4d4e7a89684fbb5356f.png)}.mousehuntHud-shield.title.elder:after,.mousehuntHud-shield.golden.title.elder:after{background-image:url(https://www.mousehuntgame.com/images/titles/0f3cf224bf98457f6b5bad91ab1c7bd2.png)}.mousehuntHud-shield.title.sage:after,.mousehuntHud-shield.golden.title.sage:after{background-image:url(https://www.mousehuntgame.com/images/titles/cb49e43c5e4460da7c09fe28ca4f44ce.png)}.mousehuntHud-shield.title.fabled:after,.mousehuntHud-shield.golden.title.fabled:after{background-image:url(https://www.mousehuntgame.com/images/titles/5daba92a8d609834aa8b789f37544e08.png)}.mousehunt-improved-lgs-reminder-new.color-blue,.huntersHornView__timer--default.color-blue,.mousehuntHud-shield.golden.color-blue{filter:hue-rotate(158deg) drop-shadow(0 0 5px #e8dbb8)}.mousehunt-improved-lgs-reminder-new.color-cyan,.huntersHornView__timer--default.color-cyan,.mousehuntHud-shield.golden.color-cyan{filter:hue-rotate(112deg) drop-shadow(0 0 5px #e8dbb8)}.mousehunt-improved-lgs-reminder-new.color-green,.huntersHornView__timer--default.color-green,.mousehuntHud-shield.golden.color-green{filter:hue-rotate(66deg) drop-shadow(0 0 5px #e8dbb8)}.mousehunt-improved-lgs-reminder-new.color-pink,.huntersHornView__timer--default.color-pink,.mousehuntHud-shield.golden.color-pink{filter:hue-rotate(280deg) drop-shadow(0 0 5px #e8dbb8)}.mousehunt-improved-lgs-reminder-new.color-purple,.huntersHornView__timer--default.color-purple,.mousehuntHud-shield.golden.color-purple{filter:hue-rotate(195deg) drop-shadow(0 0 5px #e8dbb8)}.mousehunt-improved-lgs-reminder-new.color-red,.huntersHornView__timer--default.color-red,.mousehuntHud-shield.golden.color-red{filter:hue-rotate(317deg) saturate(1.6) drop-shadow(0 0 5px #e8dbb8)}.mousehuntHud-shield.golden.color-faded{filter:sepia(1) drop-shadow(0 0 5px #e8dbb8)}.huntersHornView__timer--default.color-blue .huntersHornView__timerState.huntersHornView__timerState--type-countdown.huntersHornView__countdown,.huntersHornView__timer--default.color-cyan .huntersHornView__timerState.huntersHornView__timerState--type-countdown.huntersHornView__countdown,.huntersHornView__timer--default.color-green .huntersHornView__timerState.huntersHornView__timerState--type-countdown.huntersHornView__countdown,.huntersHornView__timer--default.color-pink .huntersHornView__timerState.huntersHornView__timerState--type-countdown.huntersHornView__countdown,.huntersHornView__timer--default.color-purple .huntersHornView__timerState.huntersHornView__timerState--type-countdown.huntersHornView__countdown,.huntersHornView__timer--default.color-red .huntersHornView__timerState.huntersHornView__timerState--type-countdown.huntersHornView__countdown{mix-blend-mode:hard-light}.huntersHornView__timer--legacy.color-blue .huntersHornView__timerState{color:#1875af}.huntersHornView__timer--legacy.color-cyan .huntersHornView__timerState{color:#18825f}.huntersHornView__timer--legacy.color-green .huntersHornView__timerState{color:#3b7523}.huntersHornView__timer--legacy.color-pink .huntersHornView__timerState{color:#ae5385}.huntersHornView__timer--legacy.color-purple .huntersHornView__timerState{color:#596eb7}.huntersHornView__timer--legacy.color-red .huntersHornView__timerState{color:#a95354}@keyframes mh-improved-shield-hue-rotate{0%{filter:hue-rotate(0deg) drop-shadow(0 0 5px #e8dbb8)}50%{filter:hue-rotate(360deg) drop-shadow(0 0 5px #e8dbb8)}to{filter:hue-rotate(0deg) drop-shadow(0 0 5px #e8dbb8)}}.huntersHornView__timer--legacy.color-rainbow .huntersHornView__timerState{color:#625901}.mousehunt-improved-lgs-reminder-new.color-rainbow,.huntersHornView__timer--default.color-rainbow,.huntersHornView__timer--legacy.color-rainbow .huntersHornView__timerState,.mousehuntHud-shield.golden.color-rainbow,.mousehuntHud-shield.golden.color-rainbow2{animation:mh-improved-shield-hue-rotate 30s infinite}@media (prefers-reduced-motion: reduce){.mousehunt-improved-lgs-reminder-new.color-rainbow,.huntersHornView__timer--default.color-rainbow,.huntersHornView__timer--legacy.color-rainbow .huntersHornView__timerState,.mousehuntHud-shield.golden.color-rainbow,.mousehuntHud-shield.golden.color-rainbow2{animation:none}}.mh-improved-custom-shield-preview{position:absolute;top:0;right:225px;bottom:0;display:flex;align-items:center;font-size:12px}.custom-shield.custom-preview{position:relative}.mh-improved-custom-shield-item-preview img{width:110px;height:auto}.mh-improved-custom-background-gradient-preview .custom-shield.custom-preview{position:relative;background-color:#ddd0ad;background-image:url(https://www.mousehuntgame.com/images/environments/6ef3ffe2f90a79250807b46105e77b68.jpg);background-repeat:no-repeat;background-position:-5px 0}.mh-improved-custom-background-gradient-preview .custom-shield{height:185px}.mh-improved-custom-background-gradient-preview .custom-shield .name{margin-top:125px;font-size:20px}.mh-improved-custom-background-gradient-preview .custom-shield .mousehuntHud-shield.remembrance_day,.mh-improved-custom-background-gradient-preview .custom-shield .mousehuntHud-shield.halloween,.mh-improved-custom-background-gradient-preview .custom-shield .mousehuntHud-shield.spring-egg-hunt,.mh-improved-custom-background-gradient-preview .custom-shield .mousehuntHud-shield.spring-egg-hunt-alt{left:-5px}.mh-improved-custom-shield-item-preview .mousehuntHud-shield.pride{left:-4px}.custom-shield.custom-preview.romeno{background-position-x:20px}.mh-improved-custom-shield-item-preview .mousehuntHud-shield.romeno{left:20px}
`;
}
});
var cotton_candy_default, init_cotton_candy = __esm({
"src/modules/custom-shield/cotton-candy.css"() {
cotton_candy_default = `.huntersHornView__backdrop{filter:hue-rotate(180deg);opacity:1;transition:none}.huntersHornView__horn--ready{filter:hue-rotate(275deg);transition:none}.huntersHornMessageView{filter:hue-rotate(200deg)}.mousehuntHud-menu.default>ul li a{filter:hue-rotate(298deg);backdrop-filter:hue-rotate(245deg)}.mousehuntHud-environmentName{text-shadow:0 0 1px #eab9cd,1px 1px #ffe1f5}.mousehuntHud-environmentIcon{box-shadow:2px 2px 2px #ffe1f5 inset,-2px -2px 2px #eab9cd inset}.mousehuntHud-menu ul li.active .mousehuntHud-menu-item.root,.mousehuntHud-menu ul li:hover .mousehuntHud-menu-item.root{background:url(https://www.mousehuntgame.com/images/ui/hud/menu/menu_seperator.png) 100% 0 no-repeat;filter:hue-rotate(328deg);backdrop-filter:hue-rotate(292deg)}
`;
}
});
var doClass, addClass, lastShield, changeShield, inputListener, watchForPreferenceChanges, shieldPreview, getShieldSettingsValues, init33, custom_shield_default, init_custom_shield = __esm({
"src/modules/custom-shield/index.js"() {
init_utils2();
init_settings15();
init_styles35();
init_cotton_candy();
doClass = (el, shieldClass, verb) => {
if (Array.isArray(shieldClass) && (shieldClass = shieldClass.join(" ")), !shieldClass)
return;
let classToAdd = shieldClass.replace(".", " ");
classToAdd = classToAdd.split(" "), Array.isArray(classToAdd) || (classToAdd = [classToAdd]), classToAdd.forEach((className) => {
if (el && el.classList && el.classList[verb]) {
if (verb === "remove" && !el.classList.contains(className))
return;
el.classList[verb](className);
}
});
}, addClass = (el, shieldClass) => {
doClass(el, shieldClass, "add");
}, lastShield = "", changeShield = () => {
let shieldEl = document.querySelector(".mousehuntHud-shield");
if (!shieldEl)
return;
let timer = document.querySelector(".huntersHornView__timer--default");
if (!timer && (timer = document.querySelector(".huntersHornView__timer--legacy"), !timer))
return;
let classesToKeep = /* @__PURE__ */ new Set(["mousehuntHud-shield", "golden"]);
[...shieldEl.classList].forEach((className) => {
classesToKeep.has(className) || shieldEl.classList.remove(className);
});
let shield = getSetting("custom-shield-0", "default");
if (shield === "default") {
shieldEl.classList.add("default", "default-fancy"), lastShield = ["default", "default-fancy"];
return;
}
if (shield === "color-cotton-candy")
makeElement("style", "mh-improved-cotton-candy-style", cotton_candy_default, document.head), shield = "color-pink-timer";
else {
let cottonCandyStyle = document.querySelector(".mh-improved-cotton-candy-style");
cottonCandyStyle && cottonCandyStyle.remove();
}
if (lastShield = [shield], shield.startsWith("color-") && (shieldEl.classList.add("default"), shieldEl.classList.add("color"), lastShield.push("color")), shield.endsWith("-timer") && (shield = shield.replace("-timer", ""), timer.classList.add(shield), lastShield.push(shield)), shield.endsWith("-alt")) {
let altClass = shield.replace("-alt", "");
shieldEl.classList.add(altClass, "alt"), lastShield.push(altClass, "alt");
}
shield.includes("title") && (shieldEl.classList.add("title"), shield = shield === "title" ? getUserTitle() : shield, lastShield.push("title", shield)), shieldEl.classList.add("mhui-custom-shield"), addClass(shieldEl, shield);
}, inputListener = null, watchForPreferenceChanges = () => {
let input = document.querySelector("#mousehunt-improved-settings-design-custom-shield select");
input && (inputListener && input.removeEventListener("change", inputListener), inputListener = input.addEventListener("change", () => {
changeShield();
}));
}, shieldPreview = (shield) => {
let shieldClass = shield.id.replaceAll("color-", " default color-").replaceAll("-alt", " alt").replaceAll(".", " ");
return `<div class="mh-improved-custom-shield-item-preview ${shield.id}"><a class="mousehuntHud-shield golden ${shieldClass}"></a>
</div>`;
}, getShieldSettingsValues = () => __async(void 0, null, function* () {
return (yield settings_default14())[0].settings.options.reduce((acc, option) => option.options && Array.isArray(option.options) ? [...acc, ...option.options] : option.value && option.name ? [...acc, option] : acc, []).filter((option) => !(option != null && option.value) || option.value === "title" || option.value === "default-normal" || option.value === "color-cotton-candy" ? !1 : !option.value.includes("-timer")).map((option) => ({
id: option.value,
name: option.name.replaceAll("(LGS Required)", "")
}));
}), init33 = () => __async(void 0, null, function* () {
addStyles(styles_default34, "custom-shield"), lastShield = getSetting("custom-shield-0", "default"), changeShield(), onNavigation(() => __async(void 0, null, function* () {
setMultipleTimeout(watchForPreferenceChanges, [100, 1e3, 2e3, 5e3]);
let shields = yield getShieldSettingsValues();
addSettingPreview({
id: "custom-shield",
selector: ".mh-improved-custom-shield-preview",
inputSelector: "#mousehunt-improved-settings-design-custom-shield select",
preview: !1,
items: shields,
itemPreviewCallback: shieldPreview
});
}), {
page: "preferences",
onLoad: !0
});
}), custom_shield_default = {
id: "custom-shield",
type: "design",
alwaysLoad: !0,
load: init33,
settings: settings_default14
};
}
});
var hidePopup, init34, hide_daily_reward_popup_default, init_hide_daily_reward_popup = __esm({
"src/modules/hide-daily-reward-popup/index.js"() {
init_utils2();
hidePopup = () => {
if (activejsDialog) {
let attrs = activejsDialog.getAttributes();
attrs && attrs.className && attrs.className === "dailyRewardPopup" && activejsDialog.hide();
}
}, init34 = () => __async(void 0, null, function* () {
onDialogShow("dailyRewardPopup", () => {
setTimeout(() => {
activejsDialog && activejsDialog.hide();
}, 500);
}), hidePopup(), setTimeout(hidePopup, 1e3), setTimeout(hidePopup, 2e3), onRequest("*", hidePopup);
}), hide_daily_reward_popup_default = {
id: "hide-daily-reward-popup",
name: "Hide Daily Reward Popup",
type: "element-hiding",
default: !1,
description: "Automatically hide the daily reward popup.",
load: init34
};
}
});
var addAdventureBookClass, adventure_book_default, init_adventure_book = __esm({
"src/modules/better-ui/modules/adventure-book/index.js"() {
init_utils2();
addAdventureBookClass = () => {
var _a, _b, _c;
if (!((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestAdventureBook) == null ? void 0 : _b.adventure) != null && _c.can_claim) || !getCurrentPage("camp"))
return;
let adventureBook = document.querySelector(".adventureBookBanner");
adventureBook && adventureBook.classList.add("adventureBookBanner-complete");
}, adventure_book_default = () => __async(void 0, null, function* () {
onRequest("*", addAdventureBookClass), onNavigation(addAdventureBookClass, {
page: "camp"
});
});
}
});
var _original2, updateDailyDrawForm, daily_draw_default, init_daily_draw = __esm({
"src/modules/better-ui/modules/daily-draw/index.js"() {
init_utils2();
_original2 = null, updateDailyDrawForm = () => {
if (_original2)
return;
let form = document.querySelector("#ballotPurchaseForm");
if (!form)
return;
let originalSubmit = form.querySelector("#ballotConfirm input");
originalSubmit && (originalSubmit.addEventListener("click", (event) => __async(void 0, null, function* () {
event.preventDefault();
let dact = "bb", dactEl = form.querySelector('input[name="dact"]');
dactEl && (dact = dactEl.value);
let uh = user.unique_hash || "", uhEl = form.querySelector('input[name="uh"]');
uhEl && (uh = uhEl.value);
let price = "1000", priceEl = form.querySelector('input[name="ballot_price"]');
priceEl && (price = priceEl.value);
let qty = "1", amountEl = form.querySelector('input[name="qty"]');
amountEl && (qty = amountEl.value), originalSubmit.classList.add("mh-improved-disabled"), yield doRequest("draw.php", {
dact,
uh,
ballot_price: price,
qty
}, !0, {
skipAll: !0,
skipJson: !0
}), window.location.reload();
})), _original2 = app.pages.DrawPage.submitPurchase, app.pages.DrawPage.submitPurchase = () => {
});
}, daily_draw_default = () => __async(void 0, null, function* () {
onNavigation(updateDailyDrawForm, {
page: "draw"
});
});
}
});
var reorderBlocks, autofocusIdSearch, addCampFriendsListener, updateCampFriendsSetting, toggleEnvironment, updateCampFriends, friends_default2, init_friends2 = __esm({
"src/modules/better-ui/modules/friends/index.js"() {
init_utils2();
reorderBlocks = () => {
if (getCurrentPage() !== "friends")
return;
let reordered = document.querySelector(".mousehuntHud-page-subTabContent.community");
if (!reordered || reordered.getAttribute("data-reordered"))
return;
let blocks = document.querySelectorAll(".friendsPage-community-channel");
if (!blocks || blocks.length < 3)
return;
let block = blocks[2], parent = block.parentNode;
block.remove(), parent.insertBefore(block, parent.firstChild), block.classList.add("friends-page-id-search");
let input = block.querySelector("input");
input && input.setAttribute("data-1p-ignore", "true"), reordered.setAttribute("data-reordered", "true");
}, autofocusIdSearch = () => {
let input = document.querySelector(".friendsPage-community-hunterIdForm-input");
input && input.focus();
}, addCampFriendsListener = () => {
let button = document.querySelector(".campPage-trap-friendContainer-toggleFriendsButton");
button && (button.removeEventListener("click", updateCampFriends), button.addEventListener("click", updateCampFriends));
}, updateCampFriendsSetting = (environmentName, hidden) => {
let hiddenEnvironments = getSetting("better-ui.camp-hidden-friends", {});
hidden ? hiddenEnvironments[environmentName] = !0 : delete hiddenEnvironments[environmentName], saveSetting("better-ui.camp-hidden-friends", hiddenEnvironments);
}, toggleEnvironment = (event) => {
let title = event.target, friends = title.parentNode.querySelectorAll("a");
title.classList.toggle("friends-hidden"), friends.forEach((friend) => {
friend.classList.toggle("friends-hidden");
});
let name = title.getAttribute("data-environment-name"), hidden = title.classList.contains("friends-hidden");
updateCampFriendsSetting(name, hidden);
}, updateCampFriends = () => __async(void 0, null, function* () {
yield waitForElement(".campPage-trap-friendContainer-environment");
let environments5 = document.querySelectorAll(".campPage-trap-friendContainer-environment");
if (!environments5)
return;
let defaultHidden = getSetting("better-ui.camp-hidden-friends", {});
environments5.forEach((environment) => {
let title = environment.querySelector(".campPage-trap-friendContainer-environment-title"), friends = environment.querySelectorAll("a");
if (!title || !friends)
return;
let environmentName = title.textContent.trim().toLowerCase().replaceAll(" ", "-");
title.setAttribute("data-environment-name", environmentName), title.setAttribute("data-number-of-friends", friends.length), defaultHidden[environmentName] && (title.classList.add("friends-hidden"), friends.forEach((friend) => {
friend.classList.add("friends-hidden");
})), title.removeEventListener("click", toggleEnvironment), title.addEventListener("click", toggleEnvironment);
});
}), friends_default2 = () => __async(void 0, null, function* () {
onNavigation(reorderBlocks, {
page: "friends"
}), onNavigation(autofocusIdSearch, {
page: "friends",
tab: "requests",
subtab: "community"
}), onRequest("users/getfriendsonline.php", updateCampFriends), onNavigation(addCampFriendsListener, {
page: "camp"
});
});
}
});
var showFullTitlePercent, replaceInboxClose, replaceKingdomLink, allowTrapMathToggle, hud_default, init_hud = __esm({
"src/modules/better-ui/modules/hud/index.js"() {
init_utils2();
showFullTitlePercent = () => __async(void 0, null, function* () {
let title = document.querySelector(".mousehuntHud-userStat.title");
if (!title)
return;
let percent = title.getAttribute("title");
if (!percent)
return;
let target = title.querySelector(".hud_titlePercentage");
if (!target)
return;
let originalText = target.innerText;
title.addEventListener("mouseover", () => {
target.innerText = percent.includes("%") ? percent.split("%")[0] : percent;
}), title.addEventListener("mouseout", () => {
target.innerText = originalText;
});
}), replaceInboxClose = () => __async(void 0, null, function* () {
let template = hg.utils.TemplateUtil.getTemplate("ViewMousehuntHeader_inbox").replace('<a class="messengerUINotificationClose" href="#">X', '<a class="messengerUINotificationClose" href="#">\u2715');
hg.utils.TemplateUtil.addTemplate("ViewMousehuntHeader_inbox", template);
}), replaceKingdomLink = () => __async(void 0, null, function* () {
let kingdomLink = document.querySelector('.mousehuntHud-menu .kingdom a[href="https://www.mousehuntgame.com/forum.php"]');
kingdomLink && (kingdomLink.href = "https://www.mousehuntgame.com/news.php", kingdomLink.setAttribute("data-page", "News"));
}), allowTrapMathToggle = () => __async(void 0, null, function* () {
setTimeout(() => {
let trapStats = document.querySelectorAll(".trapSelectorView__trapStatSummary .campPage-trap-trapStat");
trapStats.forEach((stat) => {
stat.addEventListener("click", () => {
stat.classList.toggle("show-math"), trapStats.forEach((otherStat) => {
otherStat !== stat && otherStat.classList.remove("show-math");
});
});
});
}, 500);
}), hud_default = () => __async(void 0, null, function* () {
showFullTitlePercent(), replaceInboxClose(), onNavigation(allowTrapMathToggle, {
page: "camp"
}), getFlag("no-kingdom-link-replacement") || replaceKingdomLink(), onTurn(showFullTitlePercent, 1e3);
});
}
});
var kingsPromoTextChange, kings_promo_default, init_kings_promo = __esm({
"src/modules/better-ui/modules/kings-promo/index.js"() {
init_utils2();
kingsPromoTextChange = () => {
let kingsPromo = document.querySelector(".shopsPage-kingsCalibratorPromo");
kingsPromo && (kingsPromo.innerHTML = kingsPromo.innerHTML.replace("and even", "and"));
}, kings_promo_default = () => __async(void 0, null, function* () {
onRequest("users/dailyreward.php", kingsPromoTextChange);
});
}
});
var styles_default35, init_styles36 = __esm({
"src/modules/better-ui/modules/legacy-styles/styles.css"() {
styles_default35 = `.huntersHornView__timer.huntersHornView__timer.countdown:after{content:""}.mousehuntHud-userStat .icon{width:26px;height:26px;border:1px solid #c2b384;box-shadow:1px 1px 1px #7d6027}.mousehuntHud-userStat.bait:hover .value,.mousehuntHud-userStat.trinket:hover .value,.mousehuntHud-userStat.treasureMap:hover .value{margin:0}#mh-custom-icon-egg img{filter:none}
`;
}
});
var legacy_styles_default, init_legacy_styles = __esm({
"src/modules/better-ui/modules/legacy-styles/index.js"() {
init_utils2();
init_styles36();
legacy_styles_default = () => __async(void 0, null, function* () {
isLegacyHUD() && addStyles(styles_default35, "better-ui-legacy");
});
}
});
var addMaintenanceClasses, maintenance_default, init_maintenance = __esm({
"src/modules/better-ui/modules/maintenance/index.js"() {
init_utils2();
addMaintenanceClasses = () => {
let banner = document.querySelector('div[style="background: #f2f27c; border:1px solid #555; border-radius: 3px; text-align: center; font-size: 12px; padding: 6px 3px"]');
if (!banner)
return;
if (sessionGet("maintenance-banner-hidden")) {
banner.classList.add("hidden");
return;
}
if (banner.classList.add("maintenance-banner", "mh-ui-fade", "mh-ui-fade-in"), banner.querySelector(".close"))
return;
banner.childNodes.forEach((node) => {
node.nodeType === Node.ELEMENT_NODE ? node.innerHTML = `${node.innerHTML}.` : node.nodeType === Node.TEXT_NODE && (node.textContent = `${node.textContent}.`);
});
let close2 = makeElement("div", "close", "\u2715");
close2.addEventListener("click", () => {
banner.classList.add("mh-ui-fade-out"), setTimeout(() => {
banner.classList.add("hidden"), sessionSet("maintenance-banner-hidden", !0);
}, 350);
}), banner.append(close2);
}, maintenance_default = () => __async(void 0, null, function* () {
addMaintenanceClasses(), onNavigation(addMaintenanceClasses, {
page: "camp"
});
});
}
});
var any_trap_any_skin_default, init_any_trap_any_skin = __esm({
"src/modules/better-ui/modules/userscripts-styles/styles/any-trap-any-skin.css"() {
any_trap_any_skin_default = `#custom-skins-flex{display:flex;gap:10px;align-items:center;justify-content:center}.buttonstyle{position:relative;display:block;width:100px;height:25px;margin:5px;line-height:25px;color:#8e6642;background-color:#f6f3eb!important;border:1px solid #d3cecb;border-radius:4px;box-shadow:-1px 1px 3px #d3cecb inset}.buttonstyle:hover{color:#8e6642;background-color:#fdfaf2!important}.buttonstyle[style*="rgb(34, 139, 34);"]{color:#fff;background-color:#5ccd5d!important}.buttonstyle[style*="rgb(34, 139, 34);"]:hover{background-color:#2e942f!important}#trap-skin-button:after,#base-skin-button:after{position:absolute;inset:0;display:flex;justify-content:center;content:"Toggle Trap"}#base-skin-button:after{content:"Toggle Base"}#wb-steal{margin-left:10px}
`;
}
});
var favorite_setups_default2, init_favorite_setups2 = __esm({
"src/modules/better-ui/modules/userscripts-styles/styles/favorite-setups.css"() {
favorite_setups_default2 = `#tsitu-fave-setups{z-index:100}
`;
}
});
var journal_historian_default, init_journal_historian = __esm({
"src/modules/better-ui/modules/userscripts-styles/styles/journal-historian.css"() {
journal_historian_default = `.journalContainer .top:hover .journalContainer-selectTheme[style="position: initial;transform: none;flex: 1 1 auto;height: 20px;background: none rgb(119, 221, 119);padding: 0px 0px 0px 5px;"]:last-child{background-image:none}.journalContainer .top:hover .journalContainer-selectTheme[style="position: initial;transform: none;flex: 1 1 auto;height: 20px;background: none rgb(119, 221, 119);padding: 0px 0px 0px 5px;"]{display:inline-flex;justify-content:center;padding:0!important}.journalContainer .top:hover .journalContainer-selectTheme[style="position: initial;transform: none;flex: 1 1 auto;height: 20px;background: none rgb(119, 221, 119);padding: 0px 0px 0px 5px;"]:hover{background-color:#5dd55d!important}
`;
}
});
var lgs_reminder_default, init_lgs_reminder = __esm({
"src/modules/better-ui/modules/userscripts-styles/styles/lgs-reminder.css"() {
lgs_reminder_default = `span.shieldDurationText,span.shieldDurationText[data-near-expiry=true]{bottom:-2px;z-index:1;font-size:15px;font-weight:900;text-shadow:0 0 1px #000,0 0 2px #000,0 0 3px #000}span.shieldDurationText[data-near-expiry=true]{color:#f12e2e}
`;
}
});
var profile_plus_default, init_profile_plus = __esm({
"src/modules/better-ui/modules/userscripts-styles/styles/profile-plus.css"() {
profile_plus_default = `.mouseCrownsView-group.favourite .mouseCrownsView-group-header .mouseCrownsView-crown,.mouseCrownsView-group.favourite .mouseCrownsView-group-header-name{display:inline-block}.mouseCrownsView-group-mouse-favouriteButton{top:2px;left:2px}.mouseCrownsView .pt.event{border-radius:50%}.mouseCrownsView #copyCrownsButton{width:16px!important;height:16px!important;background-color:transparent!important;border:none!important}.mouseCrownsView .pt{position:absolute;top:3px;right:3px;padding:2px;border-radius:50%}.mouseCrownsView button.ptbtn{font-size:14px!important;background-color:#9fcad8!important;border:1px solid #0e7fbf}.mouseCrownsView button.ptbtn img{width:20px!important;height:20px!important}.mouseCrownsView #powerTypeBtns{display:flex;flex-direction:row;gap:5px}.mouseCrownsView .toolBar{position:absolute;top:-1px;right:9px;display:flex;gap:2px;align-items:center;justify-content:flex-end;float:none!important;padding:1px;background-color:#ececec;border:1px solid #a7a7a7;border-radius:0 5px;opacity:.5}.mouseCrownsView .toolBar:hover{opacity:1}.powerCrown .mouseCrownsView-group-header-name,.mouseCrownsView-crown.powerCrown{display:none!important}.mouseCrownsView-group-header.powerCrown{padding:0;margin:0;background-color:transparent!important}button.ptbtn img{left:unset!important;width:auto!important;height:50px!important}.mouseCrownsView button.ptbtn>div{top:unset!important;right:unset!important;bottom:unset!important;left:unset!important;width:unset!important}button.ptbtn{display:grid;grid-template-columns:1fr 2fr 2fr;place-content:center flex-start;place-items:center center;width:100%!important;max-width:180px;height:unset!important;background-color:#00b0eb!important;border-width:1px}#powerTypeBtns{display:flex;flex-wrap:wrap;gap:5px;justify-content:center;padding:6px;margin:0;background-color:transparent}.mouseCrownsView-crown.community{padding-right:5px}.mouseCrownsView-group-header.community{margin:10px}.rank.summary{line-height:1.5}img.pt.undefined{display:none}a.mouseListView-categoryContent-subgroup-mouse-thumb{position:relative;border:none!important;border-radius:0!important}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image{border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}.mouseCrownsView-group-mice.favourites img.pt{display:none}.hideLeContainer{position:absolute;top:-9px;right:0;display:flex;flex-direction:row-reverse;opacity:.5}.hideLeContainer:hover{opacity:1}.hideLeContainer #hideLeCb{width:auto!important}.hideLeContainer label{font-size:10px!important;line-height:18px;text-align:right;vertical-align:middle}.mouseCrownsView-group-mouse-image{border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}
`;
}
});
var spring_egg_hunt_helper_default, init_spring_egg_hunt_helper = __esm({
"src/modules/better-ui/modules/userscripts-styles/styles/spring-egg-hunt-helper.css"() {
spring_egg_hunt_helper_default = `.eggs-wrapper .egg-wrapper-unfound img{filter:sepia(1);mix-blend-mode:multiply;opacity:.5}
`;
}
});
var tsitu_autoloader_default, init_tsitu_autoloader = __esm({
"src/modules/better-ui/modules/userscripts-styles/styles/tsitu-autoloader.css"() {
tsitu_autoloader_default = `#mht-bookmarklet-loader{width:225px!important;padding:0 0 20px!important;color:transparent;background:#f6f3eb!important;border:1px solid #534022!important;border-radius:0!important;box-shadow:1px 1px 1px #9d917f,1px 3px 5px #6a6969}#mht-bookmarklet-loader button:first-of-type{position:absolute;top:7px;right:5px;width:20px;height:20px;padding:0;margin:0;font-size:16px;color:#fff;background-color:transparent;border:none;box-shadow:none}#mht-bookmarklet-loader button:first-of-type:hover{color:#8e6642;background-color:#eee;border-radius:50%;outline:1px solid #ccc}#mht-bookmarklet-loader br+br,#mht-bookmarklet-loader br:first-of-type,#mht-bookmarklet-loader span[style*=font-size]{display:none}#mht-bookmarklet-loader span:first-of-type{display:flex;align-items:center;justify-content:space-between;padding:10px!important;margin-bottom:-30px;font-weight:400!important;color:#f6f3eb;cursor:grab;background-color:#8e6642;border-bottom:1px solid #ceb7a6}#mht-bookmarklet-loader button{width:174px;padding:5px 15px;margin:0;color:#000;text-shadow:0 0 1px #fff;background-color:#fff600;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #ffae00 inset,1px 1px 1px #eee}#mht-bookmarklet-loader button:hover{background-color:#fff600;box-shadow:inset 0 0 16px 2px #fffaab}#mht-bookmarklet-loader span{color:#000}#mht-bookmarklet-loader span:nth-of-type(2){position:absolute;right:0;bottom:4px;left:0}#mht-bookmarklet-loader span:nth-of-type(3){position:absolute;right:0;bottom:20px;left:0;display:inline;margin:0}
`;
}
});
var tsitu_location_catch_stats_default, init_tsitu_location_catch_stats = __esm({
"src/modules/better-ui/modules/userscripts-styles/styles/tsitu-location-catch-stats.css"() {
tsitu_location_catch_stats_default = `#tsitu-location-stats{width:300px!important;padding:0!important;background:#f6f3eb!important;border:1px solid #534022!important;border-radius:0!important;box-shadow:1px 1px 1px #9d917f,1px 3px 5px #6a6969!important}#tsitu-location-stats span[style="font-weight: bold; font-size: 18px; text-decoration: underline; padding-left: 20px;"]{display:flex;align-items:center;justify-content:space-between;padding:10px!important;font-size:1.5em!important;font-weight:400!important;color:#f6f3eb;text-decoration:none!important;cursor:grab;background-color:#8e6642;border-bottom:1px solid #ceb7a6}#tsitu-location-stats button[style="float: right; font-size: 8px;"]{position:absolute;top:7px;right:5px;width:20px;height:20px;font-size:16px!important;color:#fff;background-color:transparent;border:none}#tsitu-location-stats button[style="float: right; font-size: 8px;"]:hover{color:#8e6642;background-color:#eee;border-radius:50%;outline:1px solid #8e6642}#tsitu-location-stats>div br{display:none}#tsitu-location-stats>div span br{display:block}#tsitu-location-stats>div span br:first-child,#tsitu-location-stats>div span br:last-child{display:none}#tsitu-location-stats>div span{line-height:20px}#tsitu-location-stats>div span>button,.tsitu-current-detail>span>button,#tsitu-location-stats>button{padding:2px 15px;margin:10px 0;line-height:1.5;color:#000;text-shadow:0 0 1px #fff;background-color:#fff600;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #ffae00 inset,1px 1px 1px #eee}#tsitu-location-stats>div span>button:hover,.tsitu-current-detail>span>button:hover,#tsitu-location-stats>button:hover{background-color:#fff600;box-shadow:inset 0 0 16px 2px #fffaab}#tsitu-location-stats>div span>button{display:inline;padding:3px 5px;margin:.25em .75em;line-height:1}.tsitu-current-detail>span>button{display:block;margin:.25em auto}#tsitu-hideCaught-box{margin:0 3px;vertical-align:bottom}#tsitu-location-stats>span{padding:.125em;font-size:.9em}#tsitu-location-stats details{position:relative;padding:.5em}#tsitu-location-stats details details:nth-child(2n){background-color:#e8e3d7}#tsitu-location-stats details[style="font-size: 16px;"]{margin:.25em 0;border-top:1px solid #8e6642}#tsitu-complete-box,#tsitu-incomplete-box{position:absolute;top:0;right:0}.tsitu-complete-box-label,.tsitu-incomplete-box-label{position:absolute;top:3px;right:20px;font-size:10px!important;color:#7b6b47;text-align:right}#tsitu-location-stats details[style="font-size: 16px;"]>summary{margin:.5em 0}.tsitu-current-detail>span{line-height:1.5}#tsitu-location-stats span[style="font-style: italic; font-size: 12px;"]{display:block;margin-left:1.5em;font-size:10px!important;line-height:2;color:#7b6b47}.tsitu-current-detail>br:first-of-type,.tsitu-current-detail>span br:nth-of-type(1),.tsitu-current-detail>span br:nth-of-type(2),.tsitu-current-detail>span br:nth-last-of-type(1),.tsitu-current-detail>span br:nth-last-of-type(2){display:none}#tsitu-location-stats>div>span:last-of-type{display:inline-block;margin-top:5px}
`;
}
});
var tsitu_qol_default, init_tsitu_qol = __esm({
"src/modules/better-ui/modules/userscripts-styles/styles/tsitu-qol.css"() {
tsitu_qol_default = `#tsitu-hunter-id-nav-ui input{flex:none!important;width:75px!important;margin:3px;border:1px solid #000!important;border-radius:2px}#tsitu-hunter-id-nav-ui button{padding:2px!important;margin:3px 1px!important;background-color:#d8e3f1;border:1px solid #000!important;border-radius:3px!important}#tsitu-hunter-id-nav-ui{display:inline-flex!important;align-items:center;border:none}
`;
}
});
var tsitu_supply_search_default, init_tsitu_supply_search = __esm({
"src/modules/better-ui/modules/userscripts-styles/styles/tsitu-supply-search.css"() {
tsitu_supply_search_default = `#tsitu-supply-search{position:absolute;top:-2px;right:0;display:flex;align-items:center;vertical-align:middle;border:none!important}#tsitu-supply-search label{display:none}#tsitu-supply-search button{height:20px;padding:0 10px;line-height:19px;color:#000;text-shadow:0 0 1px #fff;background-color:#fff600;border:1px solid #000;border-radius:5px;box-shadow:inset 0 0 5px #fff,1px 1px 1px #fff}#tsitu-supply-search input{padding:2px;margin-right:2px;font-size:12px!important}
`;
}
});
var userscripts_styles_default, init_userscripts_styles = __esm({
"src/modules/better-ui/modules/userscripts-styles/index.js"() {
init_utils2();
init_any_trap_any_skin();
init_favorite_setups2();
init_journal_historian();
init_lgs_reminder();
init_profile_plus();
init_spring_egg_hunt_helper();
init_tsitu_autoloader();
init_tsitu_location_catch_stats();
init_tsitu_qol();
init_tsitu_supply_search();
userscripts_styles_default = () => __async(void 0, null, function* () {
let userscriptStyles = [
{ id: "userscript-styles-no-any-trap-any-skin-styles", styles: any_trap_any_skin_default },
{ id: "userscript-styles-no-tsitu-qol-styles", styles: tsitu_qol_default },
{ id: "userscript-styles-no-profile-plus-styles", styles: profile_plus_default },
{ id: "userscript-styles-no-spring-egg-hunt-helper-styles", styles: spring_egg_hunt_helper_default },
{ id: "userscript-styles-no-lgs-reminder-styles", styles: lgs_reminder_default },
{ id: "userscript-styles-no-favorite-setups-styles", styles: favorite_setups_default2 },
{ id: "userscript-styles-no-tsitu-autoloader-styles", styles: tsitu_autoloader_default },
{ id: "userscript-styles-no-journal-historian-styles", styles: journal_historian_default },
{ id: "userscript-styles-no-tsitu-supply-search-styles", styles: tsitu_supply_search_default },
{ id: "userscript-styles-no-tsitu-location-catch-stats-styles", styles: tsitu_location_catch_stats_default }
];
getFlag("no-userscript-styles") || userscriptStyles.forEach((userscript) => {
getFlag(userscript.id) || addStyles(userscript.styles, userscript.id);
});
});
}
});
var inbox_default2, init_inbox2 = __esm({
"src/modules/better-ui/styles/inbox.css"() {
inbox_default2 = `.notificationMessageList .message{padding:5px 10px;border-left:1px solid #c8c8c8}.notificationMessageList .message .clear-block{padding-top:5px}.notificationMessageList .message.ballot .clear-block{display:flex;flex-direction:row;align-items:center;order:5}.notificationMessageList .message.ballot img.item{height:25px;margin:-5px 5px 0 -5px}.notificationMessageList .message.ballot .date{flex-grow:1;order:2;font-size:9px;text-align:right;white-space:nowrap}.notificationMessageList .message.ballot.new .date{font-size:8px}.notificationMessageList .message.friend_invite_pending .clear-block,.notificationMessageList .message.friend_invite_accepted .clear-block{display:flex;align-items:center}.notificationMessageList .message .messageText{padding:5px 0}.message.notification.ballot,.message.notification.ballot.new{display:flex;flex-direction:row-reverse;align-items:center;justify-content:space-between;padding:10px 10px 10px 20px}.message.notification .actions.ballot{float:none}.notificationMessageList .message .actions.friendRequest,.notificationMessageList .message .actions.friendRequestAccepted{margin-top:15px}#messengerUINotification .tabs{display:flex;flex-direction:column}#messengerUINotification .tabs a[data-tab=general]{order:-500}#messengerUINotification .tabs a[data-tab=daily_draw]{order:-400}#messengerUINotification .tabs a[data-tab=friend_requests]{order:-300}#messengerUINotification .tabs a[data-tab=marketplace]{order:-200}#messengerUINotification .tabs a[data-tab=news]{order:-100}#messengerUINotification .notificationMessageList .tab{background-color:#f9f9f9}.mh-dark-mode #messengerUINotification .notificationMessageList .tab{background-color:#242424}div#messengerUINotification{background-color:#f9f9f9!important}#messengerUINotification .tabs a:hover{background-color:#eee}#messengerUINotification .tabs a .counter{background-color:#e33f3f;box-shadow:inset 0 0 5px 1px #a90000}#messengerUINotification .messengerUINotificationClose{top:-14px;right:-5px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:25px;height:25px;padding:5px;font-size:14px;line-height:unset;color:#e03a3a;text-align:center;border-color:#d1d0cf;box-shadow:1px 2px 6px -4px #3e3e3e}#messengerUINotification .messengerUINotificationClose:hover{color:#fff;background-color:#e03a3a}.journal.jsingle .close{float:none;padding:0;margin:0;background-color:transparent;border:none}.journal.jsingle .close a:after{position:absolute;top:5px;right:5px;z-index:15;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:25px;height:25px;padding:5px;font-size:14px;font-weight:700;line-height:unset;color:#e03a3a;text-align:center;content:"\\2715";background:#fff;border:1px solid #ccc;border-color:#d1d0cf;border-radius:20px}.giftSelectorView-inboxHeader-closeButton{position:absolute;top:3px;right:5px;z-index:15;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:23px;height:23px;padding:5px;font-size:12px;font-weight:700;line-height:unset;color:#e03a3a;text-align:center;content:"\\2715";background:#fff;border:1px solid #d1d0cf;border-color:#d1d0cf;border-radius:20px;box-shadow:inset 0 0 3px -1px #d1d0cf}.journal.jsingle .close a{display:block;width:0;height:0;color:transparent}.giftSelectorView-inboxHeader-closeButton:hover,.giftSelectorView-inboxHeader-closeButton:focus,.journal.jsingle .close a:hover:after,.journal.jsingle .close a:focus:after{color:#fff;background-color:#e03a3a}#messengerUINotification .notificationMessageList .tab[data-tab=marketplace] .message .clear-block{order:1}#messengerUINotification .notificationMessageList .tab[data-tab=marketplace] .message .date{order:3;margin-left:0}.notificationMessageList .message.marketplace .actions{transform:translateY(10px)}.notificationMessageList .message .date{margin:5px 0}#messengerUINotification .tabs a{display:flex;align-items:center;height:15px;border-right:1px solid #dcdedd}#messengerUINotification .notificationMessageList{box-sizing:border-box;width:calc(100% - 150px);border-left-width:0}.notificationMessageList .message .actions.newsPost input[type=button]{padding:5px 10px;border:none;outline:1px solid #000;box-shadow:0 -5px 8px -2px #ffae00 inset}.notificationMessageList .news.message a{display:inline-block;margin-bottom:10px;font-size:14px}.notificationMessageList .news.message .messageText{display:block;padding:0;font-size:12px}.notificationMessageList .tab[data-tab=news] .message{background-color:#fdf5bf}#messengerUINotification .bumper{display:none}#messengerUINotification{margin-top:-3px;box-shadow:0 3px 6px -3px #3e3e3e}
`;
}
});
var scrambles_default, init_scrambles = __esm({
"src/modules/better-ui/styles/scrambles.css"() {
scrambles_default = `#overlayPopup.spring_chick_message_item{background:#f8f8f4;border:2px solid #bdb1d8;border-radius:50px/90%;box-shadow:0 3px 3px -2px #ababab;animation:.2s MHCheckoutDialogView-frameReveal 1 ease-out,.9s bannerSoundNew 1 .2s}#overlayPopup.spring_chick_message_item .jsDialog.top,#overlayPopup.spring_chick_message_item .jsDialog.bottom,#overlayPopup.spring_chick_message_item .jsDialogContainer .prefix,#overlayPopup.spring_chick_message_item #jsDialogClose,#overlayPopup.spring_chick_message_item .jsDialog .quantity,#overlayPopup.spring_chick_message_item .description{display:none}#overlayPopup.spring_chick_message_item .jsDialogContainer .content{flex-grow:1;margin:0;font-size:1.75em;text-align:center;animation:1s claimWiggle 1 1s}@media (prefers-reduced-motion: reduce){#overlayPopup.spring_chick_message_item .jsDialogContainer .content{animation:none}}#overlayPopup.spring_chick_message_item .jsDialogContainer{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;height:120px}#overlayPopup.spring_chick_message_item .imgArray .img img{width:100px;max-width:unset;height:100px;filter:drop-shadow(0 2px 1px #505050);transform:scaleX(-1)}#overlayPopup.spring_chick_message_item .jsDialogContainer .suffix{background:transparent;border:none}#overlayPopup.spring_chick_message_item.singleItemLeft .jsDialogContainer .items{float:none;width:150px;padding:0}#overlayPopup.spring_chick_message_item.singleItemLeft .img{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}#overlayPopup.spring_chick_message_item .jsDialog.background{background:transparent}#overlayPopup.spring_chick_message_item .button{padding:2px 6px}#overlayPopup.spring_chick_message_item .img .itemImage{width:100px;height:100px}#overlayPopup.spring_chick_message_item .img .name{font-size:1.25em}
`;
}
});
var events_default2, init_events3 = __esm({
"src/modules/better-ui/styles/events.css"() {
events_default2 = `.MiniEventGiveawayCampHUD-popup-content-prize-name span{font-size:11px}.MiniEventGiveawayCampHud-popup-recruit-info{padding:10px;color:#939393}.QuestKingsGiveawayCampHUD__dialogItem .quantity{color:#000}.QuestKingsGiveawayCampHUD__dialogItem .itemImage{border:none}.QuestKingsGiveawayCampHUD__dialog{color:#fff;background:#7e35c2}.QuestKingsGiveawayCampHUD__tabContent{height:auto;min-height:515px;max-height:765px}.QuestKingsGiveawayCampHUD__scoreboard table{overflow:hidden;border-radius:10px}.QuestKingsGiveawayCampHUD__scoreboard tbody td:last-child{font-size:13px}.QuestKingsGiveawayCampHUD__scoreboard tbody td{font-size:12px}.QuestKingsGiveawayCampHUD__scoreboardTitle.Recruit:after{display:none}.QuestKingsGiveawayCampHUD__scoreboard thead th img{width:50px;margin-bottom:5px}.QuestKingsGiveawayCampHUD__prizeKeyQuantity{font-size:15px}.QuestKingsGiveawayCampHUD__vaultInfoThumbnail{width:75px;height:75px}.QuestKingsGiveawayCampHUD__tabButton span{opacity:.8}.QuestKingsGiveawayCampHUD__vaultPrizeButton:nth-child(1):hover{filter:drop-shadow(-5px 0 5px #7b67aa)}.QuestKingsGiveawayCampHUD__vaultPrizeButton:nth-child(3):hover{filter:drop-shadow(5px 0 5px #7b67aa)}.QuestKingsGiveawayCampHUD__vaultPrizeButton:nth-child(1),.QuestKingsGiveawayCampHUD__vaultPrizeButton:nth-child(3){transform-origin:center}.QuestKingsGiveawayCampHUD__vaultPrizeButton--selected{z-index:1;background-color:#0ffd59;filter:drop-shadow(0 2px 5px #7b67aa);transform:scale(1.2)}.QuestKingsGiveawayCampHUD__claimVaultPrizeButton{margin-top:10px}.QuestKingsGiveawayCampHUD-dateCountdownMiniContainer{top:-5px;right:65px;left:unset}.QuestKingsGiveawayCampHUD__vaultDoor{transition:.3s ease-out}.QuestKingsGiveawayCampHUD__vaultDoor:hover{transform:translate(-50%,-50%) rotate(3deg)}.QuestKingsGiveawayCampHUD__vaultDoor:active{transform:translate(-50%,-50%) rotate(10deg)}.QuestKingsGiveawayCampHUD:after{background-image:url(https://i.mouse.rip/kings_giveaway-journal_buttons.png)}.QuestKingsGiveawayCampHUD:before{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/6391b886b424174996329aa1eb186a10.png);transform-origin:center}.QuestKingsGiveawayCampHUD__icon{background-image:url(https://i.mouse.rip/kings_giveaway_vault-icon.png)}.QuestKingsGiveawayCampHUD__title{font-family:Charter,Bitstream Charter,Sitka Text,Cambria,serif;font-weight:900;text-shadow:0 0 1px #000,0 0 1px #fede92;filter:saturate(.1)}.QuestKingsGiveawayCampHUD__prizePixel.canClaim .QuestKingsGiveawayCampHUD__tile{filter:none}.QuestKingsGiveawayCampHUD__openSinglePrizePackButton.mousehuntActionButton.small{top:49%;padding:10px;font-weight:900}.QuestKingsGiveawayCampHUD__prizeWheel{background:#463519;border-radius:50%;box-shadow:0 5px 9px 10px #000}.QuestKingsGiveawayCampHUD__prizePixel:nth-child(1) .QuestKingsGiveawayCampHUD__icon{top:-13px;left:-2px}.QuestKingsGiveawayCampHUD__prizePixel:nth-child(2) .QuestKingsGiveawayCampHUD__icon{top:-13px;left:-3px}.QuestKingsGiveawayCampHUD__prizePixel:nth-child(3) .QuestKingsGiveawayCampHUD__icon{top:-14px}.QuestKingsGiveawayCampHUD__prizePixel:nth-child(4) .QuestKingsGiveawayCampHUD__icon{top:-7px}.QuestKingsGiveawayCampHUD__prizePixel:nth-child(5) .QuestKingsGiveawayCampHUD__icon{top:-4px}.QuestKingsGiveawayCampHUD__prizePixel:nth-child(6) .QuestKingsGiveawayCampHUD__icon{top:10px;left:-2px}.QuestKingsGiveawayCampHUD__prizePixel:nth-child(7) .QuestKingsGiveawayCampHUD__icon{top:1px}.QuestKingsGiveawayCampHUD__prizePixel:nth-child(8) .QuestKingsGiveawayCampHUD__icon{top:-7px}.QuestKingsGiveawayCampHUD__prizePixel:nth-child(9) .QuestKingsGiveawayCampHUD__icon{top:-10px}.QuestKingsGiveawayCampHUD__prizePixel:nth-child(10) .QuestKingsGiveawayCampHUD__icon{top:-13px}.QuestKingsGiveawayCampHUD:hover:before{animation:.4s mh-improved-shake 1}.QuestKingsGiveawayCampHUD__prizePixel:hover{animation:1.4s mh-improved-glow infinite}@media (prefers-reduced-motion: reduce){.QuestKingsGiveawayCampHUD:hover:before,.QuestKingsGiveawayCampHUD__prizePixel:hover{animation:none}}
`;
}
});
var skins_default, init_skins = __esm({
"src/modules/better-ui/styles/skins.css"() {
skins_default = `.skin .campPage-trap-itemBrowser-items{top:50px}.skin .campPage-trap-itemBrowser-item-image,.skin .campPage-trap-itemBrowser-item-description.shortDescription{display:none}.skin .campPage-trap-itemBrowser-item-content .campPage-trap-itemBrowser-item-name{margin-top:11px}
`;
}
});
var tutorial_default, init_tutorial = __esm({
"src/modules/better-ui/styles/tutorial.css"() {
tutorial_default = `#overlayPopup.chooseTrap .weapon .trapDamageType{display:none}#overlayPopup.chooseTrap .weapon .trapDetails{display:flex;flex-direction:column;gap:10px}#OnboardArrow.larryCircle .whiteboard .action{bottom:-25px}#OnboardArrow.larryCircle .whiteboard .action:after{font-size:12px}.campPage-trap-baitQuantity.highlight{transform-origin:bottom right;animation:mh-improved-scale-large .6s ease-in-out}@media screen and (prefers-reduced-motion: reduce){.campPage-trap-baitQuantity{animation:none}}#OnboardArrow.larryCircle .whiteboard{line-height:20px}.guideArrowView.animated.show.topLeft{margin-top:-30px;margin-left:-100px}.onboarding .mousehuntHud-marketPlace.disabled,.onboarding .mousehuntHud-marketPlace.disabled:hover,.onboarding .mousehuntHud-premiumShop.premium_items{opacity:.6}.onboarding .mousehuntHud-shield{display:block}.onboarding.hide_favorites .campPage-trap-itemBrowser-items{top:60px}a.mousehuntHud-userStat.trap.base.hidden,a.mousehuntHud-userStat.trap.weapon.hidden{display:inline-block;visibility:visible}.onboarding.hide_favorites .campPage-trap-itemBrowser-quickLinks.campPage-trap-itemBrowser-quickLinks-power{display:none}
`;
}
});
var adventure_default2, init_adventure2 = __esm({
"src/modules/better-ui/styles/adventure.css"() {
adventure_default2 = `.adventureBookBanner-container{padding-bottom:5px;margin-bottom:20px;overflow:hidden;line-height:16px;background-color:#fbf8f6;border:1px solid #d3cecb;border-radius:3px;box-shadow:inset -1px 1px 3px #d3cecb}.adventureBookBanner-adventureName,.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .adventureBookBanner-adventureName{padding:15px 5px 0;margin-left:75px;overflow:hidden;font-size:13px;font-style:italic;font-weight:400;line-height:15px;color:#333;text-overflow:ellipsis;white-space:nowrap;background:transparent;border-radius:0}.mh-dark-mode .adventureBookBanner-container{color:#000;background-color:#999;border:1px solid #d3cecb;border-radius:3px;box-shadow:inset -1px 1px 3px #888}.adventureBookBanner-adventureName span{display:none}.adventureBookBanner-goalContainer{right:0;left:0;display:flex;align-items:flex-start;justify-content:space-between;background:none;box-shadow:none}.adventureBookPopup-adventureContainer.highlight{margin-right:5px;margin-bottom:10px;box-shadow:none}.adventureBookBanner-adventureImage{background-image:none!important}.adventureBookBanner-goalPadding{margin-left:75px}.adventureBookBanner-goalImage{position:absolute;top:-25px;left:10px;width:60px;height:60px;border-radius:5px;box-shadow:none}.adventureBookBanner-goalName{width:auto;height:auto;max-height:35px}.adventureBookBanner-goalEnvironment{display:inline}.adventureBookBanner-goalName-padding .adventureBookBanner-goalEnvironment:before{content:". "}.adventureBookBanner-moreInfo{position:absolute;right:5px;bottom:-10px;display:inline-block;width:auto;height:auto;padding:1px 1px 1px 10px;font-size:9px;color:#3b5998;background:none;box-shadow:none}.adventureBookBanner-completed b{font-size:10px}.adventureBookBanner-completed{top:0;bottom:20px;left:75px;background:none;box-shadow:none}.adventureBookBanner-completedCheckmark{top:-10px;background-color:#fff;box-shadow:0 0 10px #94ff65,0 0 10px #94ff65}.adventureBookBanner-goalName-padding{display:block;width:auto;height:auto}.adventureBookBanner-goalName-padding span{display:block}.adventureBookBanner-moreInfo:after{content:" \\2192"}.adventureBookBanner-container:hover .adventureBookBanner-moreInfo{color:#3b5998;text-decoration:underline;text-shadow:none;background:none;box-shadow:none}.adventureBookBanner-goalWrapper.multi_choice.spacer{min-width:30px}.adventureBookPopup-adventure-details-block.requirements .adventureBookPopup-adventure-details-block-step.incomplete{box-shadow:0 1px 2px 1px #5c1c1c}.adventureBookPopup-adventure-details-environment-image{width:40px;height:40px;margin-bottom:10px}.adventureBookBanner-complete .adventureBookBanner-adventureName{display:none}.adventureBookBanner-complete .adventureBookBanner-completedCheckmark{top:10px;width:30px;height:30px;background-color:transparent;box-shadow:none}.adventureBookBanner-complete .adventureBookBanner-completed{font-size:11px}.adventureBookBanner-complete .adventureBookBanner-completed b{margin-bottom:5px;font-size:13px}.adventureBookBanner-complete .adventureBookBanner-moreInfo{top:unset}a.adventureBookPopup-title{display:block;height:auto;margin-bottom:4px;margin-left:10px;text-align:right;background:#eee;border:1px solid #ccc;border-right:none;border-radius:10px 0 0 10px}.adventureBookPopup-title-margin{padding:3px 15px}img.adventureBookPopup-title-icon{left:5px;height:20px}.adventureBookPopup-title.complete .adventureBookPopup-title-status{top:3px;left:3px;width:20px;height:20px;padding:2px;background:url(https://www.mousehuntgame.com/images/ui/hud/meadow_checkmark.png) 0 0 no-repeat;background-color:#eeeeee7f;background-size:cover;border-radius:50px}.adventureBookPopup-title-name{padding-left:16px;margin:0}a.adventureBookPopup-title:hover{background:#dfdcdc}a.adventureBookPopup-title.active{color:#fff;background:#354661}.adventureBookPopup-title.active .adventureBookPopup-title-icon{top:6px;left:5px}.adventureBookPopup-titleDirectory{padding-top:5px;padding-bottom:5px;margin-top:-5px;margin-bottom:5px;border-right:1px solid #ccc}.adventureBookPopup-header-title{margin-bottom:5px}.adventureBookPopup-adventureContainer.canClaim .adventureBookPopup-adventure-footer{box-shadow:-120px 0 50px #6bff75 inset}.adventureBookPopup-adventureContainer.claimed .adventureBookPopup-adventure-footer-claim.adventureBookPopup-adventure-button{background-color:#35751a;border:1px solid #158f00;box-shadow:none}.adventureBookPopup-adventureContainer.claimed .adventureBookPopup-adventure-image-status{background-color:transparent;filter:drop-shadow(2px 2px 4px #94ff65);box-shadow:none}.adventureBookPopup-adventureContainer{margin-right:5px;border-color:#ccc;border-radius:5px}.adventureBookPopup-adventure-header{padding:10px;background-color:#eee;border-radius:5px 5px 0 0}.adventureBookPopup-adventure-header-accordion{top:14px;filter:brightness(.4);opacity:.6}.adventureBookPopup-adventureContainer.available .adventureBookPopup-adventure-favorite{top:6px}.adventureBookPopup-adventure-details-block-step.multi_choice,.adventureBookPopup-adventure-details-block-step.powerCharm{background-color:#ffc20a}.adventureBookPopup-adventure-details-block-step-checkmark{border:1px solid #ababab;box-shadow:none}.adventureBookPopup-adventure-details-block-goalGroup-container{border-color:#171717}.adventureBookPopup-adventure-footer-claim-reward abbr{text-decoration:none}.adventureBookPopup-adventure-details-powerTypeContainer{margin:10px 0}.claimed .adventureBookPopup-adventure-header{color:#fff;text-shadow:0 1px 1px #000;background:#62aa42}.adventureBookPopup-adventure-footer{border-radius:0 0 5px 5px}.highlight .adventureBookPopup-adventure-header,.highlight .adventureBookPopup-adventure-footer{background-color:#fff0c2}.adventureBookPopup-adventure-button.disabled{opacity:.6}.adventureBookPopup-adventure-header-duration{font-size:13px}.adventureBookPopup-adventure-details-description-reason{display:none}.adventureBookPopup-adventure-details-block-step-name{padding-right:5px}.adventureBookPopup-adventure-details-powerType.physical:nth-child(2){padding-left:20px}.adventureBookPopup-adventure-footer-claim-reward-image{filter:drop-shadow(0 1px 0 #478b2a)}
`;
}
});
var team_default2, init_team2 = __esm({
"src/modules/better-ui/styles/team.css"() {
team_default2 = `.teamPage-container .userInteractionButtonsView.small_buttons .userInteractionButtonsView-button{width:33px!important;height:33px!important;background-size:cover!important}.teamPage-container .teamPage-memberRow-actions .mousehuntTooltip{right:-40px;left:-40px}.teamPage-container .userInteractionButtonsView-unfriendLink{display:none}.teamPage-profile-header-controls{top:0;bottom:0;display:flex;align-items:center}.teamPage-profile-header-controls br{content:""}.teamPage-profile-header-controls br:after{content:" "}.teamPageConfirm-dialog input.userSelectorView-filter-input{width:600px;padding:10px;margin:0 10px}.teamPageConfirm-dialog .userSelectorView-filterContainer{width:100%;padding:0 0 10px}.teamPageConfirm-dialog a.userSelectorView-filter-clear.active{top:15px;right:15px;font-size:14px;color:transparent}.teamPageConfirm-dialog a.userSelectorView-filter-clear.active:hover:after{color:#ff4d4d}.teamPageConfirm-dialog a.userSelectorView-filter-clear.active:after{font-size:16px;color:#b72929;content:"\\2715"}.teamPage-memberJournal-empty{line-height:30px;color:#575757}.teamPage-memberJournal-list{height:unset;min-height:30px}.teamPage-memberJournals{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:stretch}.teamPage-memberJournalContainer{width:auto}.tournamentPage-tournamentContainer-prizeInfo,.teamPage-memberJournal-trapSetup b{display:none}.teamPage-memberJournal-trapSetup i{margin-left:9px;font-size:12px;line-height:17px}.teamPage-memberJournal-identity a.teamPage-member-image.online:before{position:absolute;top:3px;right:-182px;width:10px;height:10px;content:"";background-color:#8ff309;border:1px solid #355c1d;border-radius:50%}.teamPage-profile-awardContainer-awardList{position:relative}.teamPage-profile-awardContainerInfo{position:absolute;top:-32px;right:0;display:block;width:250px;font-size:10px;color:#451e00;text-shadow:1px 1px 1px #eee;opacity:0;transition:.2s ease-in}.teamPage-profile-awardContainer-awardList:hover .teamPage-profile-awardContainerInfo{opacity:1}.teamPage-memberJournal-padding{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:calc(100% - 8px)}.teamPage-memberJournal-trapSetup{flex-grow:1}.teamPage-memberJournal-identity:hover a.teamPage-member-image.online:before{display:flex;justify-content:end;line-height:7px;text-shadow:0 0 #fff,1px 1px #fff,2px 2px #fff,-1px -1px #fff,-2px -2px #fff,0 1px #fff,0 2px #fff,0 -1px #fff,0 -2px #fff,-1px 0 #fff,-2px 0 #fff,1px -1px #fff,2px -2px #fff,-1px 1px #fff,-2px 2px #fff;white-space:nowrap;content:attr(title) "    "}.teamPage-memberRow:nth-child(odd){background-color:#eee}.teamPage-memberRow.self{background-color:#fdfbcc}.tournamentPage-tournament-column.teamMembers .tournament-team-rank{padding:0 10px}
`;
}
});
var news_default2, init_news2 = __esm({
"src/modules/better-ui/styles/news.css"() {
news_default2 = `.newsPostBody .flexCenter{justify-content:space-evenly}.newsPostBodyContainer{padding-top:10px}.newsPostBody #news-post-responsive .flexCenter img{max-width:100px;transition:.2s ease-in}.newsPostBody #news-post-responsive .flexCenter img.huge{max-width:100%}.newsPostBody #news-post-responsive img.huge:hover,.newsPostBody #news-post-responsive img[style*="width:100%"]:hover{transform:none}.newsPostBody #news-post-responsive img{transition:.2s ease-in}.newsPostBody #news-post-responsive img:hover{transform:rotate(4deg) scale(1.1)}@media (prefers-reduced-motion: reduce){.newsPostBody #news-post-responsive img:hover{transform:none}}#mousehuntContainer.PageNewsPost,#mousehuntContainer.PageNews,.PageNews{background:transparent}.newsPage-container{margin:0;border-color:#a17f36;box-shadow:none}.newsPostBody #news-post-responsive,.PageNewsPostEdit #news-post-responsive{box-shadow:inset 0 0 4px 1px #aa6b36}#newsPost .newsPostHeader,.newsPostBody{background:transparent}.newsPage-container .newsPage-post-current-container .newsPage-post-current-ribbon{background-color:#4591bd!important}.newsPostBody #news-post-responsive .feature-card img{border:none!important}.newsPage-container .newsPage-archiveButton,.newsPage-container .newsPage-post-item-postedBy .text{color:#424242}.newsPage-header,.newsPage-container .newsPage-list-side-header{text-decoration:none;text-transform:none}.newsPage-inner-container{position:relative}.newsPage-container .newsPage-list-side{position:absolute;top:0;right:5px;margin-top:30px}.newsArchivesListView-post{background-color:#fefad6;border:1px solid #bf833e}.mousehuntPage-content .newsArchivesListView h1{font-size:25px;font-weight:700;color:#4d2f0f}.newsArchivesListView-post-details{color:#424242}
`;
}
});
var hud_default2, init_hud2 = __esm({
"src/modules/better-ui/styles/hud.css"() {
hud_default2 = `.mousehuntHud-userStat.bait:hover .label,.mousehuntHud-userStat.trinket:hover .label,.mousehuntHud-userStat.treasureMap:hover .label{position:absolute;z-index:11;width:auto}.mousehuntHud-userStat.treasureMap:hover .label{padding-right:3px}.mousehuntHud-userStat.bait:hover .value,.mousehuntHud-userStat.trinket:hover .value,.mousehuntHud-userStat.treasureMap:hover .value{margin-top:14px}.mousehuntHud-environmentIcon{box-shadow:1px 2px 2px #e5dac0 inset,0 -1px 2px #9f9171 inset}.mousehuntHud-environmentName{width:auto;overflow:visible;text-shadow:2px 2px 2px #d6c8a2,-2px -2px 2px #d6c8a2,2px -2px 2px #d6c8a2,-2px 2px 2px #d6c8a2,2px 0 2px #d6c8a2,0 2px 2px #d6c8a2,-2px 0 2px #d6c8a2,0 -2px 2px #d6c8a2;filter:drop-shadow(0 1px 1px #d6c8a2) drop-shadow(0 2px 1px #d6c8a2) drop-shadow(-1px 4px 1px #d6c8a2)}.mousehuntHud-userStatBar .profileImage{box-shadow:0 2px 2px 1px #0e2c4f}.mousehuntHud-userStat.title .shield{width:19px;height:19px;margin-top:-4px}.mousehuntHud-userStat .title-container span.label{position:absolute;top:2px;left:25px;overflow:visible}.mousehuntHud-userStat .title-container{position:relative;min-height:15px}.mousehuntHud-titleProgressBar .dot,.mousehuntHud-titleProgressBar .wrapper .bar{opacity:.8;transition:all .4s ease-out}.mousehuntHud-userStat.title:hover .mousehuntHud-titleProgressBar .dot,.mousehuntHud-userStat.title:hover .mousehuntHud-titleProgressBar .wrapper .bar{opacity:1}.mousehuntHud-userStat.empty .icon{box-shadow:none}.mousehuntHud-userStat .miceWarning{top:-1px;left:11px;z-index:0;width:21px;height:21px;background:url(https://i.mouse.rip/map-marker.png) 0 -26px no-repeat;background-size:21px;box-shadow:none}.mousehuntHud-userStat .corkboardUpdate{top:-4px;left:-13px;width:35px;height:27px;background-size:26px}.mousehuntHud-menu .free_gifts .icon{background-image:url(https://i.mouse.rip/icons/gift.png)}.mousehuntHeaderView .menuItem.dropdown.last .arrow{pointer-events:none}.mousehuntHud-titleProgressBar{height:13px}.mousehuntHeaderView .menuItem.new,.mousehuntHud-userStat .notification,.marketplaceView-header-notification,.treasureMapRootView-header-navigation-item-notification.active,.mousehuntHeaderView-menu-notification{text-shadow:1px 1px #666}
`;
}
});
var tabs_default3, init_tabs3 = __esm({
"src/modules/better-ui/styles/tabs.css"() {
tabs_default3 = `.campPage-tabs-tabContentContainer{margin-bottom:10px;background-color:#f6f3eb;border:1px solid #cbc6bb;border-radius:5px;box-shadow:-1px -1px 1px #d3cecb inset}.campPage-tabs-tabRow{top:0}.campPage-tabs-tabRow:hover .campPage-tabs-tabHeader span,.campPage-tabs-tabRow a.campPage-tabs-tabHeader span{border-bottom:none}.campPage-tabs-tabRow a.campPage-tabs-tabHeader.active span{padding-bottom:5px;margin-bottom:-1px;border:1px solid #cbc6bb;border-bottom:none;box-shadow:0 1px #f6f3eb}.campPage-tabs-tabRow a.campPage-tabs-tabHeader:hover span,.campPage-tabs-tabRow a.campPage-tabs-tabHeader:focus span{margin-bottom:-1px}.campPage-tabs-tabContent[data-tab=quests],.campPage-tabs-tabContent[data-tab=journal]{background:none}a.campPage-daily-chest-info,.campPage-daily-chest-label,.campPage-daily-tomorrow-title,.campPage-daily-tomorrow-availableIn,.campPage-daily-today,.campPage-daily-progress.clear-block,.campPage-daily-draw-details,.shopsPage-kingsCalibratorPromo b{display:none}.campPage-daily-tomorrow{position:relative;height:140px;overflow:hidden;background-position:center;border:1px solid #7d3a08;box-shadow:-1px -1px 2px #d3cecb inset}.campPage-daily-tomorrow-reward{display:inline-block;width:100%;padding:5px 0;margin-top:0;font-size:12px;font-weight:900;color:#87430d;text-shadow:0 0 2px #ffcd6f;background-color:#ffffff57}.campPage-daily-draw-prize-description{margin:10px 20px}div#dailyRewardTimer{position:absolute;right:0;bottom:1px;display:block;width:100%;padding:3px 0;font-size:13px;font-weight:400;color:#904811;text-align:center;background-color:#ffd8987f;border-top:10px}.campPage-tabs-tabContent.active[data-tab=daily]{margin:5px;background:#f6f3eb;border-radius:3px;box-shadow:inset 0 0 5px #707070}.campPage-daily-container{padding:15px;margin:0;background:none;border:none;box-shadow:none}.campPage-daily-container.draw{margin-top:-15px;background:none;border:none;box-shadow:none}.campPage-daily-container.draw .campPage-daily-content{height:230px;padding-top:0;background:url(https://www.mousehuntgame.com/images/ui/daily/next_day_bkg.png);background-position-x:center;background-position-y:7px;background-size:cover;border:1px solid #7d3a08;border-radius:0;box-shadow:-1px -1px 2px #d3cecb inset}.campPage-daily-draw-title,.campPage-daily-draw-prize-name{display:inline-block;width:100%;padding:5px 0;margin-top:0;font-size:12px;font-weight:900;color:#87430d;text-shadow:0 0 2px #ffcd6f}.campPage-daily-draw-prize-name{font-size:12px}img.campPage-daily-draw-prize-image{max-width:80px;padding:0;background:none}.shopsPage-kingsCalibratorPromo:after{top:5px;width:45px;height:45px;background-image:url(https://i.mouse.rip/mh-improved/kings-calibrator.png);filter:drop-shadow(0 1px 1px #7d3a08)}div#dailyRewardTimer:before{content:"Available in "}.shopsPage-kingsCalibratorPromo{height:55px;padding:0 55px;margin-top:2px;line-height:13px;color:#412814;text-align:center;background:#ffe8aa;border:1px solid #7d3a08;border-radius:0;box-shadow:inset -1px -1px 2px #d3cecb}.campPage-daily-container .shopsPage-kingsCalibratorPromo-button{margin:0;background:#2a98ff;border-radius:5px;box-shadow:inset 0 -1px 1px 1px #2d76ba}.campPage-daily-container .shopsPage-kingsCalibratorPromo-button:hover,.campPage-daily-container .shopsPage-kingsCalibratorPromo-button:active,.campPage-daily-container .shopsPage-kingsCalibratorPromo-button:focus{background:#2d76ba}.campPage-tabs-tabContent.active[data-tab=daily],.campPage-tabs-tabContent-larryTip-container,.campPage-quests-container{line-height:16px;background-color:#fbf8f6;border:1px solid #d3cecb;border-radius:3px;box-shadow:-1px 1px 3px #d3cecb inset}.campPage-tabs-tabContent-larryTip-container{padding-top:10px}.campPage-daily-container.daily .campPage-daily-content{margin-top:15px}.campPage-tabs-tabContent-larryTip-container a.campPage-tabs-tabContent-larryTip-byLine,img.campPage-larryTip-external-link-icon{display:none}.campPage-tabs-tabContent-larryTip-environment{padding-bottom:1em}.campPage-tabs-tabContent-larryTip-container p:last-of-type a{display:block;padding:1em 0 0;text-align:right}.campPage-tabs-tabContent-larryTip-container p:last-of-type a:after{content:"\\2192"}.campPage-daily-container .shopsPage-kingsCalibratorPromo{display:flex;align-items:center}.mousehuntHud-menu ul li a{text-shadow:0 0 1px #cbbba9}
`;
}
});
var trap_selector_default, init_trap_selector = __esm({
"src/modules/better-ui/styles/trap-selector.css"() {
trap_selector_default = `.campPage-trap-itemBrowser-item.largeQuantity .campPage-trap-itemBrowser-item-quantity .quantity{display:inline-block;font-size:12px;background-color:#fff}.campPage-trap-itemBrowser-item-description.shortDescription{width:auto;margin-left:62px;font-size:10px}.campPage-trap-itemBrowser-item-content{width:81%}.campPage-trap-itemBrowser-item-favorite{position:absolute;top:0;right:5px;width:15px;height:15px;padding:5px;margin-top:0;background-color:#fff;background-size:15px;border-radius:50%;opacity:0;transition:.2s ease-in}.campPage-trap-itemBrowser-item:hover .campPage-trap-itemBrowser-item-favorite{opacity:1}.campPage-trap-itemBrowser-item{min-height:80px}.campPage-trap-itemBrowser-item-name{margin-bottom:5px}.trapSelectorView__activeCodex{width:50px;height:50px}.campPage-trap-itemBrowser-armed-item-content{position:relative;height:auto}.campPage-trap-itemBrowser-armed-item .campPage-trap-itemBrowser-item-quantity{display:flex;flex-direction:column;align-items:flex-start}.campPage-trap-itemBrowser-item-stat.power,.campPage-trap-itemBrowser-item-stat.powerBonus,.campPage-trap-itemBrowser-item-stat.luck,.campPage-trap-itemBrowser-item-stat.attraction_bonus,.campPage-trap-itemBrowser-item-stat.cheese_effect{background-size:28px}.campPage-trap-itemBrowser-item-stat .value{height:30px}.campPage-trap-itemBrowser-item-statContainer{border-radius:2px}.campPage-trap-itemBrowser-items{right:5px;padding-right:2px}.campPage-trap-itemBrowser-item-stat.cheese_effect span{font-size:8px}.campPage-trap-itemBrowser-item-powerType{width:18%;margin-right:2px}.campPage-trap-itemBrowser-item-image{width:49px;height:49px}.mousehuntActionButton.loading:after{position:absolute;inset:0;content:"";background:center / 15px no-repeat url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif),center / contain repeat url(https://www.mousehuntgame.com/images/ui/backgrounds/overlay.png)}.campPage-trap-itemBrowser-item.codex.unowned .trapSelectorView__obtainHint{display:block}
`;
}
});
var login_default, init_login = __esm({
"src/modules/better-ui/styles/login.css"() {
login_default = `.loginPageContainer .loginFormContainer .scrollContainer .scrollingContainer .backButton{position:absolute;top:145px;left:30px;filter:hue-rotate(321deg)}.PageLogin .loginPageContainer .loginFormContainer .scrollContainer .scrollingContainer{position:relative}.PageLogin .pageFrameView-column.left,.PageLogin .pageFrameView-column.right{margin-bottom:0}.loginPageContainer .loginFormContainer .scrollContainer .scrollingContainer .fb-login-button div{margin-top:10px;margin-left:50px}
`;
}
});
var settings_default15, init_settings16 = __esm({
"src/modules/better-ui/styles/settings.css"() {
settings_default15 = `.PagePreferences__section{padding:10px;margin:10px 0;border:1px solid #e0cfb4}.PreferencesPage__formInputDescription{position:relative}.PagePreferences__profilePicContainer{padding-top:10px}.PagePreferences__settingDefault{display:none}.PagePreferences__title{padding-bottom:10px;margin:0}
`;
}
});
var overlays_default2, init_overlays2 = __esm({
"src/modules/better-ui/styles/overlays.css"() {
overlays_default2 = `#overlayPopup .imgArray{overflow:visible}#overlayPopup .button,.notificationMessageList .message .actions input[type=button],.notificationMessageList .message .actions input[value="View Profile"],.notificationMessageList .message .actions input[value="View Profile"].ignoreRequest.ignoreRequest{padding:2px 15px;line-height:18px;color:#000;text-shadow:0 0 1px #fff;background-color:#f4e830;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #ffae00 inset,1px 1px 1px #eee}#overlayPopup .button:hover,#overlayPopup .button:focus,.notificationMessageList .message .actions input[type=button]:hover,.notificationMessageList .message .actions input[type=button]:focus,.notificationMessageList .message .actions input[value="View Profile"]:hover,.notificationMessageList .message .actions input[value="View Profile"]:focus,.notificationMessageList .message .actions input[value="View Profile"].ignoreRequest.ignoreRequest:hover,.notificationMessageList .message .actions input[value="View Profile"].ignoreRequest.ignoreRequest:focus{background-color:#e4d50c}#overlayPopup .button:hover,#overlayPopup .button:focus,.notificationMessageList .message .actions input[type=button]:hover,.notificationMessageList .message .actions input[type=button]:focus,.notificationMessageList .message .actions input[value="View Profile"]:hover,.notificationMessageList .message .actions input[value="View Profile"]:focus,.notificationMessageList .message .actions input[value="View Profile"].ignoreRequest:hover,.notificationMessageList .message .actions input[value="View Profile"].ignoreRequest:focus{background-color:#fff600;box-shadow:inset 0 0 16px 2px #fffaab}.notificationMessageList .message .actions input[type=button]{padding:1px 10px;font-size:12px;line-height:14px}.notificationMessageList .tab[data-tab=news] .message{line-height:18px}.notificationMessageList .tab[data-tab=news] .message .actions.newsPost{padding:2px 15px;transform:translateY(65%)}.notificationMessageList .tab[data-tab=news] .message .date{margin-left:0}.notificationMessageList .message .actions input[type=button].delete{margin:0 2px}.notificationMessageList .message .actions.friendRequestAccepted input[type=button].delete{padding:4px;margin-left:4px}.message.notification .actions.ballot{display:flex;gap:3px;float:none}.notificationMessageList .message input[type=button].delete,.notificationMessageList .message .actions input[type=button].ignoreRequest{padding:1px 10px;color:#000;text-shadow:0 0 1px #fff;background-color:#ffa5a5;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #f27b6a inset,1px 1px 1px #eee}.notificationMessageList .message .actions input[type=button].delete:hover,.notificationMessageList .message .actions input[type=button].delete:focus,.notificationMessageList .message .actions input[type=button].ignoreRequest:hover,.notificationMessageList .message .actions input[type=button].ignoreRequest:focus{background-color:#f48686}.mouseView-categoryContent-subgroup-mouse-weaknesses-label{border-color:#ccc}#messengerUINotification .notificationMessageList .tab{max-height:50vh;overflow:auto}#overlayPopup .jsDialogContainer a.shopsPage-kingsCalibratorPromo-button{margin-top:20px;margin-left:10px}#overlayPopup .jsDialogContainer .content .itemImage[style="background-image:url(https://www.mousehuntgame.com/images/items/message_items/c6fa46d329c1c7436acad084773c05c6.jpg);"]{margin-right:10px}.kingsGiveawayCalibratorPopup-upgradeContainer{display:flex;flex-wrap:wrap;justify-content:center;margin:0 6px;box-shadow:none}.kingsGiveawayCalibratorPopup-upgrade.unlocked{background-color:#c8d2f2}.kingsGiveawayCalibratorPopup-tabHeaderContainer{margin:0 1px}.kingsGiveawayCalibratorPopup-tabHeader span{box-shadow:none}.kingsGiveawayCalibratorPopup-upgrade-day-name{padding-bottom:10px;margin-top:10px;font-size:14px;border-bottom:1px solid #ccc}.kingsGiveawayCalibratorPopup-upgrade-day-itemContainer:after{box-shadow:none}.kingsGiveawayCalibratorPopup-upgrade-day-item .itemImage{width:100px;height:100px;background-size:cover}.kingsGiveawayCalibratorPopup-upgrade-day-item-name{width:100%;margin-top:7px;font-size:13px;text-align:center}.kingsGiveawayCalibratorPopup-numCreditsContainer{position:absolute;top:30px;right:50px;float:none;margin-right:-10px;margin-left:10px;visibility:visible}.kingsGiveawayCalibratorPopup-numCredits{padding:7px}.kingsGiveawayCalibratorPopup-header{position:absolute;top:0;right:0;display:inline;visibility:hidden}span.kingsGiveawayCalibratorPopup-upgrade-action-cost{font-size:14px;vertical-align:middle}.kingsGiveawayCalibratorPopup-upgrade-action-kingsCredits{width:21px;height:21px;margin:0 4px;background-color:#fff;background-position:center;background-size:18px;box-shadow:none;opacity:.9}.kingsGiveawayCalibratorPopup-upgrade.locked .kingsGiveawayCalibratorPopup-upgrade-action.locked{display:flex;justify-content:space-evenly}.kingsGiveawayCalibratorPopup-upgrade.active{background-color:#a6d392;border:1px solid #55913b}.kingsGiveawayCalibratorPopup-upgrade.active .kingsGiveawayCalibratorPopup-upgrade-actionContainer{border-top:1px solid #55913b}.kingsGiveawayCalibratorPopup-upgrade-image{height:85px}.kingsGiveawayCalibratorPopup-upgrade.locked .kingsGiveawayCalibratorPopup-upgrade-image{filter:saturate(.3);opacity:.6}.kingsGiveawayCalibratorPopup-upgrade:hover .kingsGiveawayCalibratorPopup-upgrade-image{filter:none;opacity:1}.kingsGiveawayCalibratorPopup-upgrade{box-sizing:border-box;border:1px solid #ccc;box-shadow:none}.kingsGiveawayCalibratorPopup-upgrade-name{display:block;width:auto;margin:5px 0;text-align:center}.kingsGiveawayCalibratorPopup-upgrade-name span{display:inline-block;margin:0 1px;font-size:10px}.upgrade_gifts .kingsGiveawayCalibratorPopup-upgrade-description{font-size:14px}#messengerUINotification .tabs a.active .arrow{right:-19px}#messengerUINotification .tabs a.active .arrowShadow{right:-20px}.closeOverlay.jsDialogClose{margin-bottom:10px}.MHCheckoutPageView-tabContainer{padding-top:10px;margin-top:0;margin-bottom:0}.MHCheckout-title{padding-bottom:10px}
`;
}
});
var gifts_default2, init_gifts2 = __esm({
"src/modules/better-ui/styles/gifts.css"() {
gifts_default2 = `.giftSelectorView-friendRow-returnImage{width:40px;height:40px;margin-top:-10px;margin-right:10px;background-color:transparent;background-size:cover;border:none;outline:none;box-shadow:none}.giftSelectorView-friendRow-action.disabled .giftSelectorView-friendRow-returnImage{box-shadow:none}.giftSelectorView-content-title{padding-bottom:5px 0}.giftSelectorView-claimWarning{padding:10px}#overlayPopup.dailyRewardPopup .todaysRewards .reward{width:100px;font-size:13px;transition:all .25s ease-in-out}.dailyRewardPopup .todaysRewards .reward img{width:100%;height:100%}.dailyRewardPopup .todaysRewards .reward .quantity{display:none}.dailyRewardPopup .progress .chest .image{transition:.2s ease-in}#overlayPopup.dailyRewardPopup .todaysRewards .reward:hover{margin-top:-15px;margin-bottom:15px;transform:scale(1.2)}.dailyRewardPopup .progress .chest:hover .image{transform:scale(1.1);transform-origin:bottom}.dailyRewardPopup .chest.active .image{filter:drop-shadow(0 3px 3px #faae4c)}.dailyRewardPopup h2:last-of-type{padding-top:0;margin-top:-15px}#overlayPopup.dailyRewardPopup .todaysRewards.day_1{padding-left:190px;background-image:url(https://i.mouse.rip/popup_todays_reward_day1_chest.png)}#overlayPopup.dailyRewardPopup .todaysRewards.day_2{background-image:url(https://i.mouse.rip/popup_todays_reward_day2_chest.png)}#overlayPopup.dailyRewardPopup .todaysRewards.day_5{background-image:url(https://i.mouse.rip/popup_todays_reward_day5_chest.png);background-size:222px 221px}#overlayPopup.dailyRewardPopup .progress .chest_1.open .image{background-image:url(https://i.mouse.rip/popup_todays_reward_day1_chest.png);background-size:cover}#overlayPopup.dailyRewardPopup .progress .chest_2.open .image{margin-left:-10px;background-image:url(https://i.mouse.rip/popup_todays_reward_day2_chest.png);background-size:cover}#overlayPopup.dailyRewardPopup .closed .status{filter:opacity(.5)}#giftSelectorView-inbox{margin-top:-7px}.claimGiftPage__larryHorns:before,.claimGiftPage__larryHorns:after{transition:.3s}.claimGiftPage__larryHorns:hover:before{transform:translate(-65%) rotate(-9deg)}.claimGiftPage__larryHorns:hover:after{transform:translate(-30%) rotate(9deg) scaleX(-1)}
`;
}
});
var le_default, init_le = __esm({
"src/modules/better-ui/styles/le.css"() {
le_default = `.itemImage .limitedEdition,.itemPurchaseView-image-limitedEdition,.marketplaceView-itemImage .limitedEdition,.inventoryPage-item .itemImage .limitedEdition,.campPage-trap-itemBrowser-item-image.limitedEdition:before{top:-10px;right:-10px;z-index:1;width:25px;height:25px;background:url(https://i.mouse.rip/le-badge.png) no-repeat 0 0;filter:drop-shadow(0 1px 1px rgb(0 0 0 / 50%));background-size:contain}.campPage-trap-itemBrowser-item-image.limitedEdition:before{top:-5px;right:-8px}.trapImageView-layer.limitedEdition{bottom:10px;left:7px;width:100%;height:50px;background:url(https://i.mouse.rip/le-trap-badge.png?) no-repeat 0 0;background-size:contain}
`;
}
});
var traps_default, init_traps = __esm({
"src/modules/better-ui/styles/traps.css"() {
traps_default = `.campPage-trap-baitLabel{display:none}.campPage-trap-armedItem.bait{display:flex;align-items:center;justify-content:flex-start}.campPage-trap-armedItem.bait.active{top:338px}.campPage-trap-baitDetails{color:transparent!important;text-shadow:none}.campPage-trap-baitName,.campPage-trap-baitQuantity{color:#8e6642;text-shadow:0 0 1px #ae9b6d,1px 1px #fff}.mh-dark-mode .campPage-trap-baitName,.mh-dark-mode .campPage-trap-baitQuantity{right:0;bottom:0;color:#ffe6d0;text-shadow:0 0 1px #ae9b6d,1px 1px #000}.trapSelectorView__armedItemQuantity span,.campPage-trap-baitQuantity{position:absolute;right:0;bottom:0;box-sizing:border-box;padding:5px;font-size:16px;font-weight:400;line-height:11px;text-align:right;background-color:#ffffffb3;border:1px solid #9d917f;border-right:none;border-bottom:none;border-bottom-right-radius:3px;box-shadow:-1px -1px 1px #d3cecb inset}.mh-dark-mode .trapSelectorView__armedItemQuantity span{color:#ffe6d0;text-shadow:none;background-color:#333}.campPage-trap-armedItem.bait .campPage-trap-armedItem-image{width:60px;margin-right:0;background-repeat:no-repeat;background-position:center;background-size:100%}.mh-dark-mode .campPage-trap-baitQuantity,.mh-dark-mode .campPage-trap-armedItem .quantity span{color:#ffe6d0;background-color:#333}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-trapEffectiveness{background:#424242;border:1px solid #888;box-shadow:1px 1px 1px #535151}.mh-dark-mode .campPage-trap-trapStat .value{color:#fff;background-color:#333;border-color:#5c5c5c}.campPage-trap-armedItem .quantity span{position:absolute;right:-6px;bottom:3px;padding:3px;text-align:right;background-color:#fffc;border:1px solid #d3cecb;border-right:none;border-bottom:none;border-radius:0 0 4px;box-shadow:-1px -1px 1px #d3cecb inset}.campPage-trap-statsContainer{border:1px solid #d3cecb;border-radius:4px;box-shadow:-1px 1px 3px #d3cecb inset}.campPage-trap .trapImageView{width:352px;height:352px;margin-top:0;margin-left:0;background:transparent;border:none;border-bottom:1px solid #ceb7a6;border-radius:0}.campPage-trap{border:1px solid #ceb7a6;border-right:none;border-top-left-radius:5px;border-top-right-radius:5px}.hunterInfoView-wrapper .hunterInfoView-trapBlock-header-container,.hunterInfoView-wrapper .hunterInfoView-trapBlock-footer{border-width:1px;box-shadow:none}.hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-container{margin-right:-9px;margin-left:-9px;border-bottom:1px solid #ceb7a6;box-shadow:none}.hunterInfoView-wrapper .hunterInfoView-trapBlock-footer-stats{padding-top:35px;margin-right:-9px;margin-left:-9px;box-shadow:none}.hunterInfoView-wrapper .trapImageView{width:368px;height:368px;margin:0 auto}.hunterInfoView-wrapper a.trapImageView-zoomButton{top:80%}.hunterInfoView-wrapper .hunterInfoView-trapBlock-header-title-container{left:1px;border-width:1px;border-bottom:none}.hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-items{background:none;border:none}.hunterInfoView-wrapper .hunterInfoView-trapBlock-footer{background:#f6f3eb;border-top:0;box-shadow:none}.hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-trap-slot-quantity{bottom:0;width:100%;background-color:#ffffffe5;border-color:#d3cecb;border-right:none;border-bottom:none;border-left:none;border-radius:0}.hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-trap-slot,.hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-trap-slot.middle{width:60px;height:60px;margin:0;background-position:-1px;background-size:61px;border:1px solid #000;box-shadow:none}.hunterInfoView-wrapper .campPage-trap-trapStat{display:flex;background:#fff;border:1px solid #e2d3c8;border-radius:3px}.mh-dark-mode .hunterInfoView-wrapper .campPage-trap-trapStat{background:#424242;border-color:#5c5c5c}.hunterInfoView-wrapper .campPage-trap-itemStats{display:flex;padding-bottom:0;margin:0 5px}.hunterInfoView-wrapper .campPage-trap-trapStat .value{background:transparent;border:none}.largerTrapView-popup-name,span.campPage-trap-armedItem-skin-description-content b,span.campPage-trap-armedItem-skin-description-content br{display:none}.campPage-trap-trapEffectivenessBar{height:12px;margin-top:-1px;background:#c6bea8;border:1px solid #9c938e}.mh-dark-mode .campPage-trap-trapEffectivenessBar{background-color:#424242;border-color:#5c5c5c}.campPage-trap-trapEffectivenessBar.easy:after,.campPage-trap-trapEffectivenessBar.effortless:after,.campPage-trap-trapEffectivenessBar.strong:after,.campPage-trap-trapEffectivenessBar.excellent:after{background:#5ccd5e}.campPage-trap-trapEffectivenessBar.near_impossible:after,.campPage-trap-trapEffectivenessBar.very_poor:after,.campPage-trap-trapEffectivenessBar.overpowering:after{background:#dc7878}.campPage-trap-trapEffectivenessBar.difficult:after,.campPage-trap-trapEffectivenessBar.challenging:after,.campPage-trap-trapEffectivenessBar.mild:after,.campPage-trap-trapEffectivenessBar.moderate:after,.campPage-trap-trapEffectivenessBar.medium:after{background:#e6cd66}.campPage-trap-trapEffectivenessBar.impossible:after{width:100%;background:#a83030}.campPage-trap-trapEffectiveness-header{color:transparent}.campPage-trap-trapEffectiveness-header b{color:#8e6642}.campPage-trap-trapEffectiveness-content{top:50px}.campPage-trap-trapEffectiveness-difficultyGroup{background:#f6f3eb;border-color:#e3dbd5;border-radius:3px;box-shadow:inset 0 0 1px #755e40}.campPage-trap-trapEffectiveness-difficultyGroup-label{grid-column:span 2;font-weight:400;text-align:center;border:none}.campPage-trap-armedItem.skin .campPage-trap-armedItem-skin-description-content span{font-size:12px;vertical-align:middle}.trapSelectorView__browserContainer .campPage-trap-trapEffectivenessBar{display:none}.campPage-trap-armedItem.inactive{background:#f6f3eb}.campPage-trap-trapStat.power .value b{margin-bottom:-2px;line-height:18px}.itembrowser-skin-image-wrapper{width:335px;height:335px;background-image:url(https://www.mousehuntgame.com/images/items/bases/trap_small/a44d6a59ca9c0d11224bb36fd4e16378.png);background-position:center}img.itembrowser-skin-image{width:335px;height:335px}.campPage-trap-trapStat-mathRow{font-size:12px;line-height:23px}.campPage-trap-trapStat-mathRow.label{padding-bottom:2px;margin-bottom:5px;font-size:18px}.campPage-trap-trapStat .math{bottom:90px;left:-23px;width:346px}.campPage-trap-trapStat-mathRow-icon{width:25px;height:25px}.campPage-trap-trapStat-mathRow-thumb{width:24px;height:24px}.campPage-trap-trapStat .math .arrow{display:none}.campPage-trap-trapStat .value span{font-size:15px}.campPage-trap-trapStat.cheese_effect .value span{font-size:12px}.campPage-trap-itemBrowser-armed-item-image-frame{background:none;border:none;box-shadow:none}.campPage-trap-armedItem.empty .quantity{display:none}.empty .campPage-trap-armedItem-empty{top:11px;right:2px;bottom:10px;display:flex;align-items:center;justify-content:center;width:auto;height:auto;font-size:12px;color:#671d1d;border-radius:10px;box-shadow:none}.campPage-trap-itemBrowser-armed-item.empty.clear-block{display:flex;align-items:center;background-color:#e3d4d1}.campPage-trap-itemBrowser-armed-item.empty.clear-block .campPage-trap-itemBrowser-armed-item-content{display:flex;flex-direction:column;gap:10px;align-items:stretch}.campPage-trap-itemBrowser-armed-item.empty.clear-block .campPage-trap-itemBrowser-armed-item-content .campPage-trap-itemBrowser-item-name{font-size:18px;font-variant:none;color:#671d1d;background:#e3d4d1}.campPage-trap-armedItem.bait.empty .campPage-trap-armedItem-image{background-image:url(https://www.mousehuntgame.com/images/ui/hunters_horn/sandwich_board/icons/bait_empty.png)}.campPage-trap-baitDetails .campPage-trap-baitName{position:absolute;inset:0 0 0 70px;display:flex;align-items:center}.campPage-trap-trapStat-mathRow-name{padding-right:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.campPage-trap-itemBrowser-item-description-consumeMethod{white-space:nowrap}.trapSelectorView__browserContainer{animation:mh-improved-in-from-left .2s ease-in-out}@media (prefers-reduced-motion: reduce){.trapSelectorView__browserContainer{animation:none}}.trapSelectorView__armedItemBorder,.trapSelectorView__weaponSkinGroup button{border:1px solid #d3cecb;border-radius:5px 5px 4px 4px;box-shadow:-1px 1px 3px #d3cecb inset}.trapSelectorView__weaponSkinGroup{padding:0;margin:0;border:none;box-shadow:none}.trapSelectorView__armedItem[data-item-classification=skin] .trapSelectorView__armedItemImage,.trapSelectorView__armedItem[data-item-classification=weapon] .trapSelectorView__armedItemImage{margin:3px;background-position:-1px -1px;background-size:72px}.trapSelectorView__trapStatSummaryContainer{background:#f6f3eb;border-color:#e3dbd5;border-radius:3px;box-shadow:none}.mh-dark-mode .trapSelectorView__trapStatSummaryContainer{background:#333;border-color:#fff;border-radius:3px;box-shadow:none}.trapSelectorView__trapStatSummary,.trapSelectorView__outerBlock{border:1px solid #d3cecb;border-radius:4px;box-shadow:-1px 1px 3px #d3cecb inset}.mh-dark-mode .trapSelectorView__trapStatSummary,.mh-dark-mode .trapSelectorView__outerBlock,.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-trapEffectiveness,.mh-dark-mode .mh-improved-favorite-setups-button{background:#424242;border:1px solid #888;box-shadow:1px 1px 1px #535151}.mh-dark-mode .mh-improved-favorite-setups-button{background-color:#424242;border-color:#5c5c5c}.trapSelectorView__activeCodexList.trapSelectorView__innerBlock{background:transparent;border:none}.trapSelectorView__activeCodexHeader{display:none}.trapSelectorView__armedItemQuantity span{position:absolute;right:-6px;bottom:3px;box-sizing:border-box;text-shadow:0 0 1px #ae9b6d,1px 1px #fff;background-color:#fcfbf9;border-color:#d3cecb;border-right:none;border-bottom:none;border-radius:0 0 3px}.trapSelectorView__armedItem[data-item-classification=skin]{margin-right:0}.trapSelectorView__armedItem[data-item-classification=skin] .trapSelectorView__armedItemImage,.trapSelectorView__armedItemImage{width:65px;height:70px}.trapSelectorView__trap{padding-top:0}.trapSelectorView__activeCodexContainer:hover{background-color:#fdfaf2;filter:none}.mh-dark-mode .trapSelectorView__activeCodexContainer:hover{background-color:#494949}.trapSelectorView__armedItem--empty .trapSelectorView__armedItemImage{background:transparent;box-shadow:none}.campPage-trap-itemBrowser-item.codex .campPage-trap-itemBrowser-item-description{line-height:1.5}input.trapSelectorView__codexListSearch{width:auto;max-width:100px}.PageCamp .trapImageView-layer{border-top-left-radius:4px;border-top-right-radius:4px}#overlayPopup.LargerTrapView #jsDialogClose{display:none}#overlayPopup.LargerTrapView .trapImageView-layerWrapper{border-top-left-radius:7px;border-top-right-radius:7px}#overlayPopup.LargerTrapView .trapImageView{top:1px}.mh-dark-mode .trapSelectorView__trapStatSummary,.mh-dark-mode .trapSelectorView__outerBlock,.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-trapEffectiveness,.mh-dark-mode .trapSelectorView__armedItemBorder,.mh-dark-mode .trapSelectorView__weaponSkinGroup button,.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-armedItem.bait{border:1px solid #5c5c5c;border-radius:5px 5px 4px 4px;box-shadow:-1px 1px 3px #515151 inset}.mh-dark-mode .trapSelectorView__weaponSkinGroup.trapSelectorView__armedItemBorder{border:none;box-shadow:none}.mh-dark-mode .trapSelectorView__armedItemQuantity span,.mh-dark-mode .campPage-trap-baitName,.mh-dark-mode .campPage-trap-baitQuantity{border-color:#5a5a5a;box-shadow:-1px -1px 1px #5c5c5c inset}.mh-dark-mode .mh-improved-favorite-setups-button-label{color:#e0d3b3}.campPage-trap-itemBrowser-favorite-item-image-frame{top:-1px;left:-1px;width:50px;height:50px;overflow:hidden}.trapSelectorView__armedItem--empty[data-item-classification=bait] .trapSelectorView__armedItemImage:after{position:absolute;top:0;bottom:0;left:0;width:70px;content:"";background:url(https://www.mousehuntgame.com/images/ui/hunters_horn/sandwich_board/icons/bait_empty.png) no-repeat 50% 50% / contain}.trapSelectorView__blueprint.trapSelectorView__blueprint--active{background:url(https://www.mousehuntgame.com/images/ui/hud/blueprint_tile.png) repeat}.campPage-trap-trapStat.show-math .math{display:block}.campPage-trap-trapStat:hover .value,.campPage-trap-trapStat.show-math .value{background-color:#e5dbd4}.campPage-trap-itemBrowser-item.loaded.skin.cannotArm.cannotDisarm{filter:grayscale(1)}
`;
}
});
var maintence_default, init_maintence = __esm({
"src/modules/better-ui/styles/maintence.css"() {
maintence_default = `.maintenance-banner{margin-bottom:20px;line-height:20px;background-color:#f6f3eb!important;border-color:#ceb7a6!important;box-shadow:-1px -1px 1px #d3cecb inset}.maintenance-banner .close{position:absolute;top:-5px;right:5px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:23px;height:23px;padding:5px;font-size:12px;font-weight:700;line-height:unset;color:#e03a3a;text-align:center;content:"";background:#fff;border:1px solid #d1d0cf;border-color:#d1d0cf;border-radius:20px;box-shadow:inset 0 0 3px -1px #d1d0cf}.maintenance-banner .close:hover{color:#fff;background-color:#e03a3a}
`;
}
});
var general_default4, init_general4 = __esm({
"src/modules/better-ui/styles/general.css"() {
general_default4 = `.campPage-trap-friendList.full,.campPage-trap-itemStats,.campPage-trap-trapEffectiveness,.campPage-trap-armedItem,.campPage-trap-armedItem.bait.active,.campPage-trap-armedItem.bait,.campPage-trap-armedItem.skin,.campPage-trap-armedItem.mh-favorite-setups-button{border:1px solid #d3cecb;border-radius:4px;box-shadow:-1px 1px 3px #d3cecb inset}.campPage-trap-itemStats{background-color:transparent}.campPage-trap-armedItem.bait.active{box-shadow:-1px -1px 1px #d3cecb inset}.campPage-trap-armedItem:hover,.campPage-trap-armedItem:focus,.campPage-trap-armedItem.inactive:hover,.campPage-trap-armedItem.inactive:focus,.campPage-trap-armedItem.active:hover,.campPage-trap-armedItem.active:focus{background-color:#e9e6df}.campPage-trap-armedItem.active,.campPage-trap-armedItem.skin.active{top:0}.mh-favorite-setups-button.campPage-trap-armedItem.active,.campPage-trap-armedItem.active{background-color:#e9e6df}.campPage-trap-friendList.full{background-color:#fbf8f6}.campPage-trap-armedItem.weapon .campPage-trap-armedItem-image,.campPage-trap-armedItem.base .campPage-trap-armedItem-image{background-position:-1px -1px;background-size:72px}span.campPage-trap-baitQuantity{right:-1px;bottom:-1px;border-color:#d3cecb;border-right:none;border-bottom:none}.span.campPage-trap-baitQuantity,.campPage-trap-armedItem .quantity span{border-bottom-right-radius:0}.mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabContent{padding:0;background:none;border:none;box-shadow:none}.mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabContent-margin{padding:0;border:none;box-shadow:none}.mousehuntHud-page-subTabContent-prefix-filter-options{border:1px solid #8595b0;border-radius:10px}.active.mousehuntHud-page-subTabContent-prefix-filter-option:first-child{border-top-left-radius:7px;border-bottom-left-radius:7px}.active.mousehuntHud-page-subTabContent-prefix-filter-option:last-child{border-top-right-radius:7px;border-bottom-right-radius:7px}a.mousehuntHud-page-subTabContent-prefix-filter-option{border:1px solid #8595b0;border-top:none;border-bottom:none}.mousehuntHud-page-subTabContent-prefix-filter-option:first-child,.mousehuntHud-page-subTabContent-prefix-filter-option:last-child{border:none}.mousehuntHud-page-subTabHeader.active span,.mousehuntHud-page-subTabHeader:hover span,.mousehuntHud-page-subTabHeader:focus span{color:#fff;background-color:#8595b0;box-shadow:none}.mousehuntHud-page-subTabHeader span{color:#3b5998;background:none;border-color:#3b5998}.mousehuntHud-page-subTabHeader-prefix,.mousehuntHud-page-subTabContent-prefix-filter span:first-child{display:none}.mousehuntHud-page-subTabHeader-container{text-align:center}.mousehuntHud-page-subTabContent-prefix.clear-block{margin-left:30px}.mouseCrownsView-group-mice.favourites>.empty~.empty{display:none}.scoreboardTableView-availableScoreboards{width:180px}.giftSelectorView-content-subtitle{padding:10px 0}.teamPage-memberRow-identity .teamPage-member-nameContainer{width:auto}.mousehuntHeaderView a.superBrie .quantity{font-weight:600}a.huntersHornView__horn.huntersHornView__horn--default.huntersHornView__horn--ready{transition:all .2s;transform-origin:left;will-change:transform}a.huntersHornView__horn.huntersHornView__horn--default.huntersHornView__horn--ready:hover{transform:scale(1.1) rotate(-1deg)}a.huntersHornView__horn.huntersHornView__horn--default.huntersHornView__horn--ready .huntersHornView__hornBannerImage{transition:all .6s}a.huntersHornView__horn.huntersHornView__horn--default.huntersHornView__horn--ready:hover .huntersHornView__hornBannerImage{filter:saturate(1.8)}.huntersHornView__hornImage{filter:drop-shadow(1px 1px 0 #fff) drop-shadow(-1px 1px 0 #fff) drop-shadow(1px -1px 0 #fff) drop-shadow(-1px -1px 0 #fff) drop-shadow(1px 4px 3px #6b6b6b)}.mousehuntHud-menu ul li ul li a .icon{top:5px;left:2px;width:22px;height:22px}.MiniEventRonzaChromeBitCampHUD-completeQuantity.MiniEventRonzaChromeBitCampHUD-chromeBitQuantity{padding:2px 3px;font-size:13px}.trapImageView-layer.limitedEdition{top:unset;bottom:-270px;left:-135px;background-size:200px}.trapImageView-layer.limitedEdition,.trapImageView-trapAura,.trapImageView-trapAura.active,.trapImageView-trapAura.inactive,.trapImageView-zoomButton,.min-luck-button{visibility:hidden;opacity:0;transition:opacity .2s ease-in-out}.trapImageView:hover .trapImageView-layer.limitedEdition,.trapImageView:hover .trapImageView-trapAura,.trapImageView:hover .trapImageView-trapAura.active,.trapImageView:hover .trapImageView-trapAura.inactive,.trapImageView:hover .trapImageView-zoomButton,.trapImageView:hover .min-luck-button{visibility:visible;opacity:1}.trapImageView .trapImageView-trapAura{z-index:1;height:43px;border-radius:50%;transition:opacity .4s ease-in-out}.trapImageView .trapImageView-trapAura:hover{z-index:2;outline:2px solid #aaa;transition:none}.trapImageView-trapAura.active.expiring-soon{visibility:visible;border-radius:50%;box-shadow:inset 0 0 10px 1px #ff4d4d;opacity:1}a.trapImageView-zoomButton{border:1px solid rgb(189 180 166 / 80%);border-radius:50%}.mousehuntHud-page-subTabContent.group .header .mouseListView-categoryContent-subgroup-mouse-stats.catches,.mousehuntHud-page-subTabContent.group .header .mouseListView-categoryContent-subgroup-mouse-stats.misses{width:12%}.mousehuntHud-page-subTabContent.group .header .mouseListView-categoryContent-subgroup-mouse-stats.name{width:36%}.mousehuntHud-page-subTabContent.group .header .mouseListView-categoryContent-subgroup-mouse-stats.average_weight,.mousehuntHud-page-subTabContent.group .header .mouseListView-categoryContent-subgroup-mouse-stats.heaviest_catch{width:20%}.mousehuntHud-page-subTabContent.location .header .mouseListView-categoryContent-subgroup-mouse-stats.catches,.mousehuntHud-page-subTabContent.location .header .mouseListView-categoryContent-subgroup-mouse-stats.misses{width:13%}.mousehuntHud-page-subTabContent.location .header .mouseListView-categoryContent-subgroup-mouse-stats.average_weight,.mousehuntHud-page-subTabContent.location .header .mouseListView-categoryContent-subgroup-mouse-stats.heaviest_catch{width:15%;text-align:center}.hunterInfoView-idCardTooltipBox-content{text-align:center}.journalThemeSelectorView-preview{min-height:600px}a.inventoryPage-tagDirectory-tag{border:1px solid #ccc;border-right:none}.inventoryPage-tagDirectory-tag:hover{color:#3b5998;background-color:#dfdcdc;box-shadow:0 0 1px #354661}.claimGiftPage{margin-top:0}.notificationMessageList .message img.profilePic{width:30px;height:30px}#OnboardArrow.onboardPopup.celebrationPopup .firstCatch .introPopupImage img{margin-top:0}#OnboardArrow.onboardPopup.celebrationPopup .firstCatch .content{padding-top:30px}#OnboardArrow.onboardPopup.celebrationPopup .introPopupContent .clear-block img{float:none;margin-top:-10px;margin-left:-10px}#OnboardArrow.onboardPopup.celebrationPopup .closeButton{background:url(https://www.mousehuntgame.com/images/ui/buttons/continue.png) 0 0 no-repeat}@media only screen and (max-width: 1000px){body.hasSidebar .pageFrameView-column{background-color:#bad4ed!important}}.campPage-trap-blueprintContainer{border-color:#315871;border-width:1px;box-shadow:none}.campPage-trap-itemBrowser-item-description.shortDescription{margin-top:5px}.campPage-trap-itemBrowser-item-image:after{border-color:#ccc;box-shadow:2px 2px 3px -1px #cdc9c6 inset}.campPage-trap-itemBrowser-item{overflow:hidden}.itemView-action-convertForm{font-size:13px}input.itemView-action-convert-quantity{padding:2px 5px;text-align:left}.menuItem.myProfile{display:none}.mousehuntHeaderView .menuItem.freeGifts,.mousehuntHeaderView-gameTabs.small .menuItem.freeGifts{padding-right:12px;padding-left:12px}.mousehuntPage-loading{position:absolute;right:0;left:0;z-index:51;box-shadow:2px 2px 10px #999,-1px -1px 1px #ccc inset,0 0 25px 25px #ffffff7f}.mousehuntPage-content.hidden{display:block;margin-top:35px}.journalThemeSelectorView-preview .journalThemeSelectorView-preview-details{display:none}.journalThemeSelectorView-preview .journal>.content{padding:0 5px!important}.journalThemeSelectorView-preview .content .entry{opacity:1}.mousehuntHud-page-subTabContent.trinket .mousehuntHud-page-subTabContent-prefix{display:none}.journalThemeSelectorView-theme-image{border:none}.mousehuntHud-userStat-row{line-height:14px}#overlayPopup{animation:MHCheckoutDialogView-frameReveal .2s ease-out}@media (prefers-reduced-motion: reduce){#overlayPopup{animation:none}}.mousehuntHeaderView .dropdownContent a{background-position-x:8px}.tsitu-maptem .notification{left:0!important}.tsitu-maptem .notification[title="No uncaught map mice with this setup (according to TEM)"]{display:none}.campPage-trap-itemBrowser-armed-itemContainer.empty .campPage-trap-itemBrowser-item-subtitle{color:#671d1d}.mh-dark-mode .campPage-trap-itemBrowser-item.largeQuantity .campPage-trap-itemBrowser-item-quantity .quantity{background-color:#333}.mh-dark-mode .campPage-trap-itemBrowser-item-image:after{border-color:#000;box-shadow:2px 2px 3px -1px #000 inset}.travelPage-map-pieces-detail-title{padding:5px 10px}.travelPage-map-pieces-row.locked .travelPage-map-pieces-detail-image{filter:grayscale(1);opacity:.8}.travelPage-map-pieces-detail-environment-title{border-bottom:none}.mouseListView-categoryContent-category{padding-right:5px}.mousehuntHud-menu-item.root{height:24px;margin-top:1px}.mousehuntHeaderView .menuItem.first{border-left:none}.mousehuntHeaderView .menuItem{border-color:#ccc}.mousehuntHud-menu{box-shadow:0 10px 0 -8px #bfac91}.menuItem.superBrie{border-right:1px solid #ccc}.inventoryPage-confirmPopup-itemRow.small{min-height:35px}.mousehuntHeaderView .menuItem.new:hover{background-image:url(https://i.mouse.rip/inbox_new.png)!important}.journalThemeSelectorView-filter label{display:flex;align-items:center}.pagerView-link{border-color:#bdbdbd;border-style:solid}.messageBoardView-message-container .pagerView-link{border-color:#bea87b}.jpagecontrols .pagerView-link{border-color:transparent}.pagerView-container{border-radius:3px}.journal .pagerView-container{border-radius:0}.pagerView-section.current{width:15%;text-align:center}.pagerView-section.next{text-align:right}.pagerView-section.previous{text-align:left}.PageJournal .pagerView-section.next,.PageJournal .pagerView-section.previous{text-align:center}.dateCountdown{box-shadow:0 1px 2px #0000004d}.hunterTitle .titles .title>.userLevel{border-radius:6px}
`;
}
});
var corkboard_default, init_corkboard = __esm({
"src/modules/better-ui/styles/corkboard.css"() {
corkboard_default = `.treasureMapRootView .messageBoardView .messageBoardView-message-container-padding,.teamPage-messageBoard-corkboard .messageBoardView-message-container-padding,.PageHunterProfile .messageBoardView-message-container-padding{background:none}.treasureMapRootView .messageBoardView div.messageBoardView-message-container,.teamPage-messageBoard-corkboard div.messageBoardView-message-container,.hunterInfoView-wrapper div.messageBoardView-message-container{margin:0;background:#e9e1c6;border:1px solid #985f42;border-radius:10px;box-shadow:-1px 2px 1px #a59f8e}.teamPage-messageBoard-corkboard div.messageBoardView-message-container{background:#e2d6b5;border-color:#af9969;box-shadow:1px 1px 1px #e2d6b5 inset}.treasureMapRootView .messageBoardView div.messageBoardView-message-container,.teamPage-messageBoard-corkboard .messageBoardView-message-container{background:#eee;border-color:#ccc;border-radius:0;box-shadow:none}.mh-dark-mode .treasureMapRootView .messageBoardView div.messageBoardView-message-container,.mh-dark-mode .teamPage-messageBoard-corkboard .messageBoardView-message-container{background:#333;border-color:#0c0c0c}.treasureMapRootView .messageBoardView .messageBoardView-message,.teamPage-messageBoard-corkboard .messageBoardView-message,.hunterInfoView-corkBoardBlock .messageBoardView-message{background:#fff;border:1px solid #bea87b;border-radius:8px;box-shadow:none}.teamPage-messageBoard-corkboard .messageBoardView-message.new,.hunterInfoView-corkBoardBlock div.messageBoardView-message.new{border:1px solid #bea87b!important}.treasureMapRootView .messageBoardView div.messageBoardView-message.new{border:1px solid #ccc!important}.mh-dark-mode .treasureMapRootView .messageBoardView div.messageBoardView-message.new{background-color:#191919;border-color:#2c2c2c!important}.treasureMapRootView .messageBoardView input.messageBoardView-message-submit,.teamPage-messageBoard-corkboard input.messageBoardView-message-submit,.hunterInfoView-corkBoardBlock input.messageBoardView-message-submit{margin:6px 0}input.messageBoardView-message-submit,input.messageBoardView-message-submit[type=submit]{padding:2px 15px;line-height:18px;color:#000;text-shadow:0 0 1px #fff;background-color:#f4e830;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #ffae00 inset,1px 1px 1px #eee}input.messageBoardView-message-submit:hover,input.messageBoardView-message-submit[type=submit]:hover,input.messageBoardView-message-submit:focus,input.messageBoardView-message-submit[type=submit]:focus{background-color:#fff600;box-shadow:inset 0 0 16px 2px #fffaab}.treasureMapRootView .messageBoardView .messageBoardView-message-description,.teamPage-messageBoard-corkboard .messageBoardView-message-description,.hunterInfoView-corkBoardBlock .messageBoardView-message-description{padding-top:12px}.treasureMapRootView .messageBoardView a.messageBoardView-message-image,.teamPage-messageBoard-corkboard a.messageBoardView-message-image,.hunterInfoView-corkBoardBlock a.messageBoardView-message-image{border:1px solid #ccc;box-shadow:none}.treasureMapRootView .messageBoardView a.messageBoardView-message-name,.teamPage-messageBoard-corkboard a.messageBoardView-message-name,.hunterInfoView-corkBoardBlock a.messageBoardView-message-name{display:block;padding-bottom:5px}.treasureMapRootView .messageBoardView .messageBoardView-message-submitted,.teamPage-messageBoard-corkboard .messageBoardView-message-submitted,.hunterInfoView-corkBoardBlock .messageBoardView-message-submitted{color:#767676}.treasureMapRootView .messageBoardView .messageBoardView-message-body,.teamPage-messageBoard-corkboard .messageBoardView-message-body,.hunterInfoView-corkBoardBlock .messageBoardView-message-body{font-size:11px;font-weight:400;line-height:16px;color:#454545}.treasureMapRootView .messageBoardView .messageBoardView-message:after,.teamPage-messageBoard-corkboard .messageBoardView-message:after,.hunterInfoView-corkBoardBlock .messageBoardView-message:after{display:none}.treasureMapRootView .messageBoardView .pagerView-section.previous .pagerView-link,.teamPage-messageBoard-corkboard .pagerView-section.previous .pagerView-link,.hunterInfoView-corkBoardBlock .pagerView-section.previous .pagerView-link{color:#535151}a.messageBoardView-message-image{background-position:center;background-size:cover}a.messageBoardView-message-delete{right:10px;color:transparent}a.messageBoardView-message-delete:after{font-size:16px;color:#e03a3a;content:"\\2715"}a.messageBoardView-message-delete:hover:after,a.messageBoardView-message-delete:focus:after{color:#b72929}.friendsProfileView-selfStats{padding-top:15px}.mh-dark-mode .pageFrameView .hunterInfoView-wrapper .hunterInfoView-left a.friendsProfileView-randomFriend,.mh-dark-mode .pageFrameView .hunterInfoView-wrapper .messageBoardView-title{color:#242424}.mh-dark-mode .treasureMapRootView .messageBoardView .messageBoardView-message-body,.mh-dark-mode .teamPage-messageBoard-corkboard .messageBoardView-message-body,.mh-dark-mode .hunterInfoView-corkBoardBlock .messageBoardView-message-body{color:#fff}.mh-dark-mode .treasureMapView .messageBoardView-message{background:#333}.mh-dark-mode .messageBoardView-message-submitted{color:#ccc}.mh-dark-mode.PageHunterProfile .pageFrameView .hunterInfoView-wrapper .hunterInfoView-left a.messageBoardView-message-delete{color:transparent}
`;
}
});
var mobile_camp_default, init_mobile_camp = __esm({
"src/modules/better-ui/styles/mobile-camp.css"() {
mobile_camp_default = `body.mobile.MobilePageCamp div[data-role=header]:after{position:absolute;top:15px;left:15px;width:85px;height:85px;content:"";background:url(https://www.mousehuntgame.com/images/ui/elements/golden_shield_page_shield_disabled_320.png) no-repeat;background-position:right;background-size:cover;opacity:.3;transform:scaleX(-1)}body.mobile.MobilePageCamp .headerText>div:first-child{font-size:17px}body.mobile.MobilePageCamp .pageFrameView,body.mobile.MobilePageCamp.noSidebar .pageFrameView{grid-template-columns:[first] auto [content-start] 485px [content-end] auto [last]}body.mobile.MobilePageCamp .pageFrameView-column.right,body.mobile.MobilePageCamp .pageFrameView-column.left{border-width:5px}div#mobileCountdown{margin:10px;font-size:15px}div#mobileJournal{margin-top:10px}
`;
}
});
var select2_default2, init_select22 = __esm({
"src/modules/better-ui/styles/select2.css"() {
select2_default2 = `.MHCheckoutSearchView-dropdown .select2-search{padding-top:5px}.PageFriends .select2-results li.select2-result-with-children>.select2-result-label{padding:3px;font-size:12px}.friendsPage-filter-environment-quantity{min-width:25px;text-align:center;vertical-align:middle}.PageAdversaries .adversariesPage-list-filter #select2-drop li,.PageFriends .adversariesPage-list-filter #select2-drop li{padding:3px;font-size:12px}.PageAdversaries .adversariesPage-list-filter #select2-drop li:nth-child(2n){background-color:#eae9e9}.PageAdversaries .adversariesPage-list-filter #select2-drop li:nth-child(2n).select2-highlighted{background-color:#3875d7}.select2-search input{padding:6px 0 6px 5px;font-size:15px;vertical-align:middle;background:url(https://www.mousehuntgame.com/images/select2/select2.png) no-repeat 100% -26px,linear-gradient(to bottom,#fff 85%,#eee 99%) 0 0;background-size:70px}.friendsPage-list-filter-select .select2-drop ul.select2-results li:first-of-type{display:none}.friendsPage-list-filter-select .select2-drop ul.select2-result-sub li:first-of-type{display:grid}
`;
}
});
var sidebar_default3, init_sidebar3 = __esm({
"src/modules/better-ui/styles/sidebar.css"() {
sidebar_default3 = `.pageSidebarView-user{border-bottom:none}.pageSidebarView-block-description{display:none}.pageSidebarView{padding:0;margin:10px -20px 10px 20px;border:10px solid #fff;border-radius:10px 10px 4px 4px;box-shadow:0 2px 4px -1px #000}
`;
}
});
var legacy_default, init_legacy = __esm({
"src/modules/better-ui/styles/legacy.css"() {
legacy_default = `.headsup .mousehuntHud-userStat.bait:hover .label,.headsup .mousehuntHud-userStat.trinket:hover .label,.headsup .mousehuntHud-userStat.treasureMap:hover .label{position:relative;top:unset;right:unset;left:unset;width:unset;padding:0;background:none;mix-blend-mode:normal}.headsup .mousehuntHud-userStat.treasureMap:hover .label{padding-top:3px}.headsup .mousehuntHud-userStat.bait:hover .label{width:83px}.headsup .mousehuntHud-userStat:hover .icon{border-color:#ccc;box-shadow:0 0 3px #ffde00}
`;
}
});
var friends_default3, init_friends3 = __esm({
"src/modules/better-ui/styles/friends.css"() {
friends_default3 = `.sendMapInvite .userInteractionButtonsView-button-buttonOptionContainer .userInteractionButtonsView-button-buttonOption-name{padding:3px 3px 8px;margin:-3px;font-size:10px;line-height:11px}.sendMapInvite .userInteractionButtonsView-button-buttonOptionContainer .userInteractionButtonsView-button-buttonOption-image{padding-top:2px;margin-top:2px}.sendMapInvite .mousehuntTooltip.top.tight.hasBuffer{font-size:11px}.sendMapInvite .userInteractionButtonsView-button-buttonOptionContainer .userInteractionButtonsView-button-buttonOption:before{background:none}.sendMapInvite .userInteractionButtonsView-button-buttonOptionContainer:hover .userInteractionButtonsView-button-buttonOption:hover .userInteractionButtonsView-button-buttonOption-image,.sendMapInvite .userInteractionButtonsView-button-buttonOptionContainer:hover .userInteractionButtonsView-button-buttonOption:hover .userInteractionButtonsView-button-buttonOption-name{background-color:#eaf6ea}.friendsPage-community-channel.friends-page-id-search{display:flex;align-items:center;justify-content:space-between;background-color:#dcf7ff;border:1px solid #a1a1a1;box-shadow:0 1px 2px -1px #b5b5b5}.friends-page-id-search .friendsPage-community-channel-text{display:none}.friends-page-id-search .friendsPage-community-channel-action{position:relative;right:0;margin:0}.friends-page-id-search input.friendsPage-community-hunterIdForm-input{width:175px;padding:5px;border:1px solid #767676}.friends-page-id-search .friendsPage-community-channel-hunterId{display:none}.friends-page-id-search label{padding:0}.friends-page-id-search form.friendsPage-community-hunterIdForm{display:flex;flex-direction:row;align-items:center;justify-content:flex-end}.friendsPage-friendRow-stat-label{display:none}.friendsPage-friendRow-stat.online .friendsPage-friendRow-stat-label{display:inline-block}.friendsPage-friendRow-stat.map span{width:180px}.friendsPage-friendRow-stat.points,.friendsPage-friendRow-stat.gold{width:16%}.friendsPage-friendRow-stat.map{width:28%}.friendsPage-friendList-content .friendsPage-friendRow-content{width:calc(100% - 125px)}.friendsPage-list-filter[data-filter=environment_id] .friendsPage-list-filter-label,.friendsPage-list-filter[data-filter=snuid] .friendsPage-list-filter-label{user-select:none}.mousehuntHud-page-subTabContent.community .mousehuntCharacterGuideBox{background-image:url(https://www.mousehuntgame.com/images/ui/onboarding/info_arrow_larry.png);background-position:center top;background-size:140px}.campPage-trap-friendContainer-environment-title[data-number-of-friends]:after{content:" (" attr(data-number-of-friends) ")"}.campPage-trap-friendContainer-environment-title.friends-hidden:after{content:" (" attr(data-number-of-friends) " hidden)"}.campPage-trap-friendContainer-environment a.friends-hidden{display:none}.friendsPage-friendRow-image{transition:.2s ease-out;transform-origin:center}.friendsPage-friendRow-imageContainer:hover .friendsPage-friendRow-image,.friendsPage-friendRow-image:hover{transform:scale(1.1)}
`;
}
});
var buttons_default3, init_buttons3 = __esm({
"src/modules/better-ui/styles/buttons.css"() {
buttons_default3 = `.mousehuntArmNowButton{box-sizing:border-box;background:#8bb139;border:1px solid #000;border-radius:5px;box-shadow:inset 0 0 5px 2px #778e3a}.mousehuntArmNowButton:hover{background:#a4d044;box-shadow:inset 0 0 5px 2px #8da746}.mousehuntArmNowButton:after{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:900;color:#f0f4e7;text-align:center;text-shadow:0 1px 2px #000;text-transform:uppercase;content:"Arm"}.mousehuntArmNowButton:hover:after{color:#fff}.mousehuntArmNowButton.active{background:#50b0be;box-shadow:inset 0 0 5px 2px #368591}.mousehuntArmNowButton.active:hover{background:#5ffcff;box-shadow:inset 0 0 5px 2px #5accdb}.mousehuntArmNowButton.active:after{color:#fff;content:"Armed"}.mousehuntArmNowButton.disabled{filter:grayscale(1)}a.campPage-trap-itemBrowser-item-disarmButton,a.campPage-trap-itemBrowser-item-armButton{height:unset;font-size:11px;font-weight:900;line-height:19px;color:#fff;text-shadow:0 1px 2px #000;text-transform:uppercase;background:#a4d044;border-radius:5px;box-shadow:inset 0 0 5px 2px #8da746}a.campPage-trap-itemBrowser-item-disarmButton{background:#ff9800;box-shadow:inset 0 0 5px 2px #cc7a00}.armed .campPage-trap-itemBrowser-item-armButton{background:#50b0be;box-shadow:inset 0 0 5px 2px #368591}.campPage-trap-itemBrowser-item-armButton:hover{background:#8bb139;box-shadow:inset 0 0 5px 2px #778e3a}.armed.canDisarm .campPage-trap-itemBrowser-item-armButton:hover{background:#5ffcff;border-color:#000;box-shadow:inset 0 0 5px 2px #5accdb}a.campPage-trap-itemBrowser-item-disarmButton:hover{background:#ffc266;box-shadow:inset 0 0 5px 2px #f90}
`;
}
});
var scoreboards_default2, init_scoreboards2 = __esm({
"src/modules/better-ui/styles/scoreboards.css"() {
scoreboards_default2 = `.scoreboardRelativeRankingTableView table{border:1px solid #ddedff}.scoreboardRelativeRankingTableView th{display:flex;grid-column:1 / 6;align-items:center;justify-content:space-around;font-size:10px;font-weight:400;background-color:#dbecff;border-bottom:1px solid #b7c4d2}.scoreboardRelativeRankingTableView td:nth-of-type(3){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scoreboardRelativeRankingTableView-table td{line-height:16px}.scoreboardRelativeRankingTableView tr{display:grid;grid-template-columns:25px 20px auto 68px;overflow:hidden}.scoreboardTableView-profilePic{box-sizing:border-box;border:1px solid #e9e9e9;box-shadow:none}.viewer .tournament-team-rank.updated:hover:after{border-radius:2px}.pageFrameView .scoreboardRelativeRankingTableView-table{margin-bottom:15px;border:1px solid #ddedff}
`;
}
});
var timer_default, init_timer = __esm({
"src/modules/better-ui/styles/timer.css"() {
timer_default = `.huntersHornView__timer.huntersHornView__timer.countdown:after{position:absolute;top:6px;right:5px;left:5px;font-size:14px;text-align:center;content:"Next Hunt";background:linear-gradient(180deg,#fef2b8,#ecdfae)}.huntersHornMessageView--bait_disarmed .huntersHornMessageView__content:before{background-image:url(https://www.mousehuntgame.com/images/ui/hunters_horn/sandwich_board/icons/bait_empty.png)}
`;
}
});
var ui_page_default, init_ui_page = __esm({
"src/modules/better-ui/styles/ui-page.css"() {
ui_page_default = `.pageFrameView-contentContainer{padding-top:10px;padding-bottom:10px;background-color:transparent}.mh-dark-mode .pageFrameView-contentContainer{margin-bottom:0}.pageFrameView-content{margin:0 -10px;border:10px solid #fff;border-radius:10px;box-shadow:0 2px 4px -1px #000}.mh-dark-mode .pageFrameView-content{margin:0;border:none}@media only screen and (max-width: 810px){body.noSidebar .pageFrameView{background:transparent!important}}.mh-dark .pageFrameView-content{border-color:var(--d)}.mh-dark .pageFrameView-column.left,.mh-dark .pageFrameView-column.right,.pageFrameView-column.left,.pageFrameView-column.right{background:#bad4ed;border-color:#bad4ed}.mousehuntHeaderView{padding-top:0;margin-top:0}#overlayContainer{padding-top:0}#overlayBg{top:-10px}.mousehuntHeaderView .menuItem.first{border-radius:9px 0 0}.pageFrameView-column.left,.pageFrameView-column.right{box-shadow:none}body .pageFrameView-contentContainer{background-color:#bad4ed}body.mh-improved-custom-background .pageFrameView-contentContainer{background-color:transparent}body.mh-improved-custom-background.mh-dark .pageFrameView-column.left,body.mh-improved-custom-background.mh-dark .pageFrameView-column.right,body.mh-improved-custom-background .pageFrameView-column.left,body.mh-improved-custom-background .pageFrameView-column.right{border-color:transparent}body.kings_giveaway .pageFrameView-contentContainer{background-color:#7b67aa}body.kings_giveaway .pageFrameView-column.right,body.kings_giveaway .pageFrameView-column.left{background:#7b67aa;border-color:#7b67aa}body.mh-improved-bg-birthday .pageFrameView-column.left,body.mh-improved-bg-birthday .pageFrameView-column.right{border:none}.mh-improved-bg-birthday .pageFrameView-contentContainer{background:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/birthday/left.png),url(https://www.mousehuntgame.com/images/ui/backgrounds/events/birthday/right.png);background-color:#bad4ed;background-repeat:repeat-x}body.great_winter_hunt .pageFrameView-contentContainer{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/great_winter_hunt/right.jpg)}body.great_winter_hunt .pageFrameView-column.left,body.great_winter_hunt .pageFrameView-column.right{border-color:#b9d3ec}body.halloween .pageFrameView-contentContainer{background:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/halloween/right.png),url(https://www.mousehuntgame.com/images/ui/backgrounds/events/halloween/left.png);background-color:#e87e33;background-repeat:repeat-x}body.halloween .pageFrameView-column.left,body.halloween .pageFrameView-column.right{border-color:#e87e33}body.lunar_new_year .pageFrameView-contentContainer{background-color:#7f071c}body.lunar_new_year .pageFrameView-column.left,body.lunar_new_year .pageFrameView-column.right{border-color:#7f071c}body.spring_hunt .pageFrameView-contentContainer{background-color:#86ce5b}body.spring_hunt .pageFrameView-column.left,body.spring_hunt .pageFrameView-column.right{border-color:#86ce5b}body.valentines .pageFrameView-contentContainer{background-color:#f69898}body.valentines .pageFrameView-column.left,body.valentines .pageFrameView-column.right{border-color:#f69898}
`;
}
});
var footer_default2, init_footer2 = __esm({
"src/modules/better-ui/styles/footer.css"() {
footer_default2 = `.pageFrameView-footer{position:relative;display:flex;flex-flow:row wrap;align-items:center;justify-content:flex-start;margin:-40px 55px 0 70px;line-height:17px}.pageFrameView-footer a img{width:auto;max-height:25px;margin:5px 10px 0 0;opacity:.2;transition:.2s ease-in}.pageFrameView-footer a:nth-child(4){margin-right:auto}.pageFrameView-footer a:nth-child(4) img{filter:sepia(1);opacity:.7}.pageFrameView-footer:hover a img,.pageFrameView-footer:hover a:nth-child(4) img{filter:none;opacity:1}.pageFrameView-footer-linksContainer{display:block;width:auto;margin-right:auto;font-weight:900}.pageFrameView-footer br{display:none}.pageFrameView-footer-ad{position:absolute;right:-40px;bottom:-160px;left:-60px}.mousehuntFooter{position:relative;margin-top:0;border-top:none}.pageFrameView-content{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.mousehuntFooter-image{display:flex;flex-direction:row-reverse;color:transparent;background:url(https://i.mouse.rip/footer.png?1) no-repeat top center;border-top:none;border-bottom:none;border-radius:5px}.mousehuntFooter-image:before{position:absolute;top:0;right:0;left:0;width:100%;height:44px;content:"";box-shadow:inset 0 -4px 7px -6px #755e40}.mousehuntFooter-toggleMobile{position:absolute;display:flex;align-items:center;width:0;height:0;color:transparent;opacity:.4;transition:.3s;transform-origin:center}.mousehuntFooter-toggleMobile:hover{opacity:1}.mousehuntFooter-toggleMobile:after{position:absolute;inset:-15px 0 0 -30px;display:block;width:28px;height:28px;padding:8px;margin:0;font-size:11px;font-weight:100;line-height:10px;color:#000;text-align:center;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/hud/menu/camp.png);filter:grayscale(1);background-repeat:no-repeat;background-position:center;background-size:50%}
`;
}
});
var daily_draw_default2, init_daily_draw2 = __esm({
"src/modules/better-ui/styles/daily-draw.css"() {
daily_draw_default2 = `.dailydraw{display:grid;grid-template-columns:1fr 1fr;gap:10px;place-content:space-evenly center;place-items:stretch stretch;margin:0 auto}.drawPage-ballot{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;float:none;margin:0}.drawPage-ballot .entries{background-color:#ffe8aa;border-radius:10px}.ballotEntry{display:flex;flex-direction:column;align-items:center;float:none;padding:0;margin:0;background-color:#ffe8aa}.dailydraw div[style="clear: both; padding-top: 10px;"],.dailydraw div[style="clear: both; padding-top: 20px;"]{display:none}.ballotEntry .prizeHeader{width:100%;padding:0;margin:0}.dailydraw h2,.ballotEntry .prizeHeader h3{width:auto;padding:10px;margin:0;font-size:15px;font-weight:400;background-color:transparent}.recentWinners,.socialBallots,.drawPage-ballot,.ballotEntry{border:1px solid #fc6}.drawPage-ballot img{width:150px}.recentWinners .draw{display:flex;float:none;width:auto;padding:10px}.recentWinners .draw img{width:60px}.prizeContent{display:flex;align-items:center;padding:10px}.ballotEntry .prizeContent .prizeDesc{float:none;line-height:20px}.ballotEntry .entryForm span,.ballotEntry .entryForm br{display:none}form#ballotPurchaseForm{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;width:a}.ballotEntry .entryForm .confirmTotal{margin:10px}div#ballotPurchase input{padding:2px 15px;margin-left:5px;color:#000;text-shadow:0 0 1px #fff;background-color:#f4e830;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #ffae00 inset,1px 1px 1px #eee}div#ballotPurchase input:hover,div#ballotPurchase input:focus{background-color:#e4d50c}div#ballotConfirm input{height:25px;margin-left:5px!important}div#ballotConfirm{position:relative;display:block!important}div#ballotConfirm a{position:absolute;top:5px;right:-20px}div#ballotPurchase{display:none!important}div#ballotPurchase,div#ballotConfirm{width:110px;height:21px}.socialBallots p{padding:0 10px;line-height:16px}.recentWinners .draw:last-child{border-bottom:none}.PageDraw .flexibleDialogWarmBrown.shopDescription{height:25px;visibility:hidden}.flexibleDialogWarmBrown.shopDescription img{float:none}.flexibleDialogWarmBrown.shopDescription b{position:absolute;top:-40px;right:0;left:0;display:block;font-size:19px;color:#261900;text-align:center;text-shadow:0 1px 1px #fc6;visibility:visible}.recentWinners .draw .drawContent{display:flex;flex-direction:column;align-items:stretch;justify-content:space-around;float:none}.ballot_qty{text-align:center}div#ballotTotal:after{content:" gold"}div#ballotTotal.error:after{content:""}
`;
}
});
var profile_default2, init_profile2 = __esm({
"src/modules/better-ui/styles/profile.css"() {
profile_default2 = `.PageHunterProfile .campPage-trap-trapStat.power .icon{display:none}.PageHunterProfile .campPage-trap-trapStat.cheese_effect .value span{width:10px;font-size:11px}.hunterInfoView-wrapper .messageBoardView-title{height:30px;margin-bottom:-1px;font-size:14px;font-weight:700;line-height:30px;color:#772b0a;text-align:center;background:linear-gradient(#fff9dc 45%,#f1dc8a 55%);border:1px solid #985f42;border-bottom:1px solid #e9be6c;border-radius:10px 10px 0 0;box-shadow:-1px 2px 1px #a59f8e}.hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader{height:33px;margin-top:1px;margin-bottom:2px;font-size:14px;font-weight:700;line-height:30px;color:#ab755d;text-align:center;background:linear-gradient(#f6f3e2 45%,#fdf3cb 55%);border:1px solid #985f42;border-bottom:none;border-radius:10px 10px 0 0;box-shadow:-1px 1px 1px #a59f8e}.hunterInfoView-wrapper div.messageBoardView-message-container{border-top-left-radius:0;border-top-right-radius:0}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader span{margin:0;line-height:23px;background:none;border:none;box-shadow:none}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader:before{background:none;box-shadow:none}.hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:first-child{margin-right:5px;margin-left:-10px}.hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:last-child{margin-right:-10px;margin-left:5px}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabContentContainer{min-height:68px;background:#e9e1c6;border:1px solid #985f42;border-top-color:#e9be6c;border-radius:0 0 10px 10px;box-shadow:-1px 2px 1px #a59f8e}.hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader.active{color:#772b0a;background:linear-gradient(#fff9dc 45%,#f1dc8a 55%)}.hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:hover,.hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:focus{color:#772b0a;background:linear-gradient(#fff9dc 45%,#f1dc8a 55%)}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader:hover span{background:none}.hunterInfoView-achievementsBlock .mousehuntTabContentContainer-padding{padding:5px;background:#e9e1c6;border:none;box-shadow:none}.hunterInfoView-wrapper .hunterInfoView-treasureMaps-left-currentMap-image{width:55px;height:55px;border:none}.hunterInfoView-treasureMaps-left{vertical-align:middle}.hunterInfoView-wrapper .hunterInfoView-treasureMaps-left-currentMap-content{display:flex;flex-direction:row;align-items:center;height:50px}.hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound-ranking{width:110px;margin-top:10px;margin-bottom:-5px;font-size:11px;color:#772b0a}.hunterInfoView-treasureMaps-right{display:flex;flex-direction:column;align-items:center;margin-top:-5px;margin-right:-5px}.hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound{font-size:17px}.hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound-label{font-size:11px}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .itemImage{width:55px;height:55px;border-bottom-right-radius:0;box-shadow:none}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .itemImage-container{display:block;padding:2px}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabContent[data-tab=team] .hunterInfoView-teamTab-content{margin:0 -5px}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .hunterInfoView-teamTab-content-wrapper{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-around;width:360px}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .hunterInfoView-teamTab-content .quantity{right:0;bottom:0;background-color:#fff}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock .hunterInfoView-favoritesBlock-body{background:#e9e1c6}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseImage.empty{background-color:#e9e1c6;border:1px solid #a0a0a0;box-shadow:none;opacity:.75}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseImage{border-width:2px;transition:.2s ease-in}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseImage-overlay-container,.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseImage-overlay{width:54px;height:54px}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseImage:hover{background-size:120%}.mouseCrownsView-group-mouse-catches{padding:2px 6px;margin-top:-5px;margin-bottom:5px;font-size:14px}.mouseCrownsView-group-mouse-name{font-size:11px}.mouseCrownsView-group-mouse.empty.highlight{display:none}.mouseCrownsView-group-mouse.highlight .mouseCrownsView-group-mouse-image{width:auto;height:200px}.mouseCrownsView-group-mouse.highlight .mouseCrownsView-group-mouse-image .mouseCrownsView-crown{top:5px;right:5px;left:unset}.mouseCrownsView-group-mouse:hover .mouseCrownsView-group-mouse-image{background-size:120%}.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image{background-size:auto 230px}.mouseCrownsView-group-mouse.highlight .mouseCrownsView-group-mouse-padding{padding:0;margin:0;border-radius:0}.highlight a.mouseCrownsView-group-mouse-favouriteButton.active{top:0;right:0}.mouseCrownsView-group-mouse-padding{padding:0;overflow:hidden}.mouseCrownsView-group-mice{display:grid;grid-template-columns:repeat(5,1fr);align-items:stretch;justify-content:start;max-width:720px;margin-right:-2px;margin-left:-5px}.mouseCrownsView-group-mice.favourites{gap:5px}.mouseCrownsView-group-header b{font-size:13px}.mouseCrownsView-group.favourite .mouseCrownsView-group-header-subtitle{display:none}.mouseCrownsView-group-mouse{width:auto}.mouseCrownsView-group-mouse-image{width:100%;height:200px;border:none!important;border-bottom-right-radius:0;border-bottom-left-radius:0;transition:.2s ease-in}.mouseCrownsView-crown.none{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_none.png)!important}.mouseCrownsView-group-header-name{margin-left:10px}.mouseCrownsView-group{padding:10px;margin:10px;background-color:#f5f5f5;border-radius:5px;box-shadow:0 0 1px 1px #cbcbcb}.mouseCrownsView-group.diamond{background-color:#d6eafb;box-shadow:0 0 1px 1px #6aa6f9}.mouseCrownsView-group.diamond .mouseCrownsView-group-header{box-shadow:inset 0 0 1px 1px #b6d9fc}.mouseCrownsView-group.platinum{background-color:#d6d6fb;box-shadow:0 0 1px 1px #7e6af9}.mouseCrownsView-group.platinum .mouseCrownsView-group-header{box-shadow:inset 0 0 1px 1px #bfb6fc}.mouseCrownsView-group.favourite .mouseCrownsView-group-header{box-shadow:inset 0 0 1px 1px #e0e0e0}.mouseCrownsView-group.gold{background-color:#fbf5ce;box-shadow:0 0 1px 1px #cfc791}.mouseCrownsView-group.gold .mouseCrownsView-group-header{box-shadow:0 0 1px 1px #ded9b5}.mouseCrownsView-group.silver{background-color:#d2e7fe;box-shadow:0 0 1px 1px #8fb9e6}.mouseCrownsView-group.silver .mouseCrownsView-group-header{box-shadow:0 0 1px 1px #b4d0ee}.mouseCrownsView-group.bronze{background-color:#ffe6d4;box-shadow:0 0 1px 1px #d8af91}.mouseCrownsView-group.bronze .mouseCrownsView-group-header{box-shadow:0 0 1px 1px #ead3c3}.mouseCrownsView-group.none .mouseCrownsView-group-header{box-shadow:0 0 1px 1px #c5c5c5}.mouseCrownsView-group-header{display:flex;align-items:center;padding:5px;border:none!important;border-radius:5px}.mh-dark-mode.PageHunterProfile .pageFrameView .mouseCrownsView-group-header-subtitle{color:#787}.mouseCrownsView-group .mouseCrownsView-group-header{background-color:#fafafa99!important}.mouseCrownsView-group-mouse-favouriteButton.active{opacity:0;transition:.2s ease-in}.mouseCrownsView-group-mouse.favourite:hover .mouseCrownsView-group-mouse-favouriteButton,.mouseCrownsView-group-mouse.favourite:hover .mouseCrownsView-group-mouse-favouriteButton.active{opacity:1}.mouseCrownsView-group .mouseCrownsView-group-mouse-padding{background-color:#fff}.mouseCrownsView-group-mouse.highlight.favourite{width:auto;background-color:#fff;border:1px solid #ccc;border-radius:5px}.mouseCrownsView-group.favourite .mouseCrownsView-group-header .mouseCrownsView-crown,.mouseCrownsView-group.favourite .mouseCrownsView-group-header-name{display:none}.favourite .mouseCrownsView-group-header{padding:0}.mouseCrownsView-crown.favourite{width:45px;height:45px;margin:5px}a.friendsProfileView-randomFriend{float:right;width:120px;margin-top:-25px;text-align:center;background-color:#e9e1c6;border:1px solid #a0a0a0}.friendsProfileView-selfStats{font-size:11px}.friendsProfileView-randomFriend:hover{background-color:#c7bfa3}.eggMasterIcon{position:absolute;top:15px;right:-12px;float:none!important;width:30px!important;height:30px!important;background-size:cover!important}.mh-dark-mode.PageHunterProfile .pageFrameView .mouseCrownsView-group-mouse.highlight .mouseCrownsView-group-mouse-name,.mh-dark-mode.PageHunterProfile .pageFrameView .mouseCrownsView-group-mouse:not(.favourite) .mouseCrownsView-group-mouse-name,.mh-dark-mode.PageHunterProfile .pageFrameView .mouseCrownsView-group{color:#333}.hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-trap-slot-noBait{display:flex;align-items:center;width:100%;height:100%;border:none;box-shadow:none}.hunterProfileItemsView-categoryContent-item-padding{height:auto;padding:0}.hunterProfileItemsView-categoryContent-item-name{width:95%;padding:0 1px 3px}.hunterProfileItemsView-categoryContent-item-padding .itemImage .quantity{right:0;bottom:5px;padding:5px}.hunterProfileItemsView-categoryContent-item .itemImage{width:90px;height:100px;background-repeat:no-repeat;background-position:center;background-size:100%;transition:.2s ease-in}.hunterProfileItemsView-categoryContent[data-category=map_piece] .hunterProfileItemsView-categoryContent-item .itemImage,.hunterProfileItemsView-categoryContent[data-category=collectible] .hunterProfileItemsView-categoryContent-item .itemImage{padding-top:10px;background-position-y:5px}.hunterProfileItemsView-categoryContent-item.uncollected .itemImage{filter:grayscale(1);mix-blend-mode:darken;opacity:.5}.hunterProfileItemsView-categoryContent-item.uncollected .hunterProfileItemsView-categoryContent-item-padding{background-color:#eee}.hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamName{width:89px;margin-left:-3px}.hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamName span{top:0;right:0;left:0;transform:none}.loyaltyBadgeView .loyaltyBadgeView-years-text{top:6px;right:0;left:0;font-size:22px;text-align:center;filter:drop-shadow(0 0 2px #fff);transform:none}.loyaltyBadgeView{width:50px;height:50px}.loyaltyBadgeView.badgeLevel15 .loyaltyBadgeView-years-text{top:14px}.hunterInfoView-verifiedUserImage{width:14.5px;height:17.5px}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-container{padding-top:15px}.hunterInfoView-wrapper .hunterInfoView-idCardBlock-goldenShield-image{left:-5px;width:26px;height:26px}.hunterInfoView-wrapper .hunterInfoView-idCardBlock-goldenShield-text{width:auto;padding:2px 7px 3px 20px;font-size:12px;white-space:nowrap}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image,.mouseCrownsView-group-mouse-image{background-position:center;background-size:100%;transition:.4s ease-in}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image{background-position:center;background-size:auto 200px}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.costumed_horse,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.geyser_eruption_dragon_flaming,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.rift_gaunt_prestige_low,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.crystal_behemoth,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.desert_beast,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.ful_mina_mountain_queen{background-position:80% center}.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.costumed_horse,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.geyser_eruption_dragon_flaming,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.rift_gaunt_prestige_low,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.crystal_behemoth,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.desert_beast,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.ful_mina_mountain_queen{background-position:78% center}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.magmatic_golem,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.empyrean_treasure_guardian,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.richard_rich{background-position:60% center}.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.magmatic_golem .mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.empyrean_treasure_guardian,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.richard_rich{background-position:62% center}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.rift_claw_master,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.hween_2013_boss,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.spice_sorcerer{background-position:25% center}.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.rift_claw_master,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.hween_2013_boss,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.spice_sorcerer{background-position:26% center}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.ancient_of_the_deep,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.rift_assassin_beast{background-position:15% center}.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.ancient_of_the_deep,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.rift_assassin_beast{background-position:16% center}.mouseView-group.mouseview-title-group{display:flex;flex-direction:column}.mh-dark-mode.PageHunterProfile .pageFrameView .mouseCrownsView-group-mouse:hover .mouseCrownsView-group-mouse-padding,.mouseCrownsView-group-mouse:hover .mouseCrownsView-group-mouse-padding{background-color:#fff}.mouseCrownsView-group-mouse-favouriteButton{top:0;right:0}.mouseCrownsView-group-mouse-favouriteButton:hover{background-color:transparent;border:none}.mouseCrownsView-group-mouse .mouseCrownsView-group-mouse-favouriteButton{pointer-events:all!important}.mouseCrownsView-group-mouse .mouseCrownsView-group-mouse-favouriteButton:hover{top:2px;right:2px;background:url(https://www.mousehuntgame.com/images/ui/camp/trap/star_favorite.png) 0 0 / cover no-repeat}.hunterProfileItemsView-categoryContent-item .itemImage .limitedEdition,.hunterProfileItemsView-categoryContent-item .itemImage .quantity{opacity:1;transition:.2s ease-in}.hunterProfileItemsView-categoryContent-item:hover .itemImage .limitedEdition,.hunterProfileItemsView-categoryContent-item:hover .itemImage .quantity{opacity:0}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseImage:after{width:30px;height:30px}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseImage:before{top:-10px;left:-10px;width:25px;height:25px}.hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-horn-container .hunterInfoView-idCardBlock-stats-horn-image{filter:contrast(.4);transition:.2s ease-in}.hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-horn-container:hover .hunterInfoView-idCardBlock-stats-horn-image{transform:rotate(-6deg) scale(1.5)}.hunterInfoView-wrapper hr{background-color:#000}.hunterInfoView-wrapper .hunterInfoView-idCardTooltipBox-content>div{margin:5px 0}.hunterInfoView-wrapper .hunterInfoView-idCardTooltipBox-content>div:first-child{margin-top:0}.hunterInfoView-wrapper .hunterInfoView-idCardTooltipBox-content>div:last-child{margin-bottom:0}.hunterInfoView-wrapper .messageBoardView .pagerView-container{background-color:#f0ead6;border:1px solid #bea87a;border-radius:5px}.userInteractionButtonsView-button{border-radius:15px;box-shadow:inset 0 0 0 2px #eae1c6}.teamPage-table .userInteractionButtonsView-button{border-radius:5px;box-shadow:none}.hunterInfoView-wrapper .friendsPage-friendRow-titleBar-titleDetail{top:22px;font-size:13px}.friendsPage-friendRow-titleBar-icon{top:-12px}.mousehuntPage-content .mh-improved-scoreboard-dropdown select{border:1px solid #bea87a}.hunterInfoView-wrapper .hunterInfoView-playerActionsBlock{margin:0 10px;text-align:left;opacity:.5}.hunterInfoView-wrapper .hunterInfoView-playerActionsBlock:hover{opacity:1}.hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container:before,.hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container,.hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-huntingSince,.hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-horn-container,.hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats{border-color:#bea87a}.hunterProfileItemsView-categoryContent-item.limited_edition .itemImage .limitedEdition{top:3px;right:-3px;width:50px;height:50px;background:url(https://www.mousehuntgame.com/images/ui/backgrounds/trap_image_limited_edition_badge.png) no-repeat top right / 90px;filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff)}.hunterProfileItemsView-directory{border:none}.hunterProfileItemsView-content:before,.mouseListView-categoryContent:before{left:0;width:1px;background-color:#ccc;border-radius:0}.mouseListView-categoryDirectory{border-right:none}.mouseListView-categoryContent-subgroup-miceContainer{border:1px solid #dfe5f1;border-radius:11px}.hunterInfoView-wrapper .hunterInfoView-idCardTooltipBox-content{min-width:85px}
`;
}
});
var imported7, styles5, init35, better_ui_default, init_better_ui = __esm({
"src/modules/better-ui/index.js"() {
init_utils2();
init_adventure_book();
init_daily_draw();
init_friends2();
init_hud();
init_kings_promo();
init_legacy_styles();
init_maintenance();
init_userscripts_styles();
init_inbox2();
init_scrambles();
init_events3();
init_skins();
init_tutorial();
init_adventure2();
init_team2();
init_news2();
init_hud2();
init_tabs3();
init_trap_selector();
init_login();
init_settings16();
init_overlays2();
init_gifts2();
init_le();
init_traps();
init_maintence();
init_general4();
init_corkboard();
init_mobile_camp();
init_select22();
init_sidebar3();
init_legacy();
init_friends3();
init_buttons3();
init_scoreboards2();
init_timer();
init_ui_page();
init_footer2();
init_daily_draw2();
init_profile2();
imported7 = [inbox_default2, scrambles_default, events_default2, skins_default, tutorial_default, adventure_default2, team_default2, news_default2, hud_default2, tabs_default3, trap_selector_default, login_default, settings_default15, overlays_default2, gifts_default2, le_default, traps_default, maintence_default, general_default4, corkboard_default, mobile_camp_default, select2_default2, sidebar_default3, legacy_default, friends_default3, buttons_default3, scoreboards_default2, timer_default, ui_page_default, footer_default2, daily_draw_default2, profile_default2], styles5 = imported7, init35 = () => __async(void 0, null, function* () {
addStyles(styles5, "better-ui"), adventure_book_default(), daily_draw_default(), friends_default2(), hud_default(), kings_promo_default(), maintenance_default(), userscripts_styles_default(), legacy_styles_default();
}), better_ui_default = {
id: "better-ui",
name: "Better UI",
type: "better",
default: !0,
description: "Update the MH interface with various UI and style changes.",
order: -1,
load: init35
};
}
});
var styles_default36, init_styles37 = __esm({
"src/modules/scoreboard-search-on-profiles/styles.css"() {
styles_default36 = `.mh-improved-scoreboard-dropdown,.mousehuntPage-content select.mh-improved-scoreboard-dropdown{width:100%;padding:5px;background-color:#fff9dc;border:1px solid #985f42;border-radius:3px}.mh-improved-scoreboard-results{margin-top:10px}.mh-improved-scoreboard-results table{width:100%}.mh-improved-scoreboard-loading{display:flex;height:30px;background-image:url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif);background-repeat:no-repeat;background-position:top;background-size:30px}
`;
}
});
var main6, init36, scoreboard_search_on_profiles_default, init_scoreboard_search_on_profiles = __esm({
"src/modules/scoreboard-search-on-profiles/index.js"() {
init_utils2();
init_styles37();
main6 = () => __async(void 0, null, function* () {
let achievementsBlock = document.querySelector(".hunterInfoView-achievementsBlock");
if (!achievementsBlock || achievementsBlock.getAttribute("data-added-scoreboard"))
return;
let teamTab = document.querySelector('.mousehuntTabHeaderContainer .mousehuntTabHeader[data-tab="team"]');
if (!teamTab)
return;
let teamTabText = teamTab.querySelector("span");
teamTabText && (teamTabText.textContent = "Tournaments");
let teamTabContent = achievementsBlock.querySelector('.mousehuntTabContentContainer .mousehuntTabContent[data-tab="team"]');
if (!teamTabContent)
return;
let friendName = document.querySelector(".friendsPage-friendRow-titleBar-name");
if (!friendName)
return;
let scoreboardTab = teamTab.cloneNode(!0);
scoreboardTab.setAttribute("data-tab", "scoreboard");
let scoreboardTabText = scoreboardTab.querySelector("span");
scoreboardTabText && (scoreboardTabText.textContent = "Scoreboards"), teamTab.after(scoreboardTab);
let scoreboardTabContent = teamTabContent.cloneNode(!0);
scoreboardTabContent.setAttribute("data-tab", "scoreboard");
let tabContent = makeElement("div", "hunterInfoView-teamTab-content"), scoreboardDropdown = makeElement("select", "mh-improved-scoreboard-dropdown"), scoreboards2 = yield getData("scoreboards"), startingOpt = makeElement("option", "", "Select a scoreboard");
startingOpt.value = "placeholder", startingOpt.setAttribute("disabled", !0), startingOpt.setAttribute("selected", !0), scoreboardDropdown.append(startingOpt);
for (let scoreboard of scoreboards2) {
let option = makeElement("option", "", scoreboard.name);
option.value = scoreboard.id, scoreboardDropdown.append(option);
}
tabContent.append(scoreboardDropdown);
let results = makeElement("div", "mh-improved-scoreboard-results");
tabContent.append(results), scoreboardDropdown.addEventListener("change", (e) => __async(void 0, null, function* () {
var _a;
if (e.target.value === "placeholder" || !friendName.getAttribute("data-text") || !e.target.value)
return;
results.innerHTML = '<div class="mh-improved-scoreboard-loading"></div>';
let response = yield doRequest("managers/ajax/pages/scoreboards.php", {
action: "get_page",
category: "main",
scoreboard: e.target.value,
page: 1,
weekly: 0,
friends_only: 0,
search: friendName.getAttribute("data-text")
}), data = (_a = response == null ? void 0 : response.scoreboard_page) == null ? void 0 : _a.rows;
if (!data || !data.length) {
results.innerHTML = '<div class="mh-improved-scoreboard-no-results">No results found.</div>';
return;
}
let score = data[0];
results.innerHTML = `<table class="scoreboardTableView">
<tr class="scoreboardTableView-row viewer highlight">
<td class="scoreboardTableView-row-rank scoreboardTableView-column ">
<div class="tournament-team-rank">
${score.rank}
</div>
</td>
<td class="scoreboardTableView-row-name scoreboardTableView-column">
<a href="profile.php?snuid=${user.sn_user_id}" onclick="hg.utils.PageUtil.showHunterProfile('${user.sn_user_id}'); return false;">
<div class="scoreboardTableView-titleIcon" style="background-image: url(${user.title_icon});"></div>
${score.name}
</a>
</td>
<td class="scoreboardTableView-row-score scoreboardTableView-column">
${score.points_formatted}
</td>
</tr></table>`;
})), scoreboardTabContent.replaceChildren(tabContent), teamTabContent.after(scoreboardTabContent), achievementsBlock.setAttribute("data-added-scoreboard", "true");
}), init36 = () => __async(void 0, null, function* () {
addStyles(styles_default36, "profile-scoreboard-search"), onNavigation(main6, {
page: "hunterprofile"
});
}), scoreboard_search_on_profiles_default = {
id: "profile-scoreboard-search",
name: "Scoreboard Search on Profiles",
type: "feature",
default: !0,
description: "Easily search for a friend on the scoreboard from their profile.",
load: init36
};
}
});
// dist/data/image-upscaling-paths-to-skip.json
var image_upscaling_paths_to_skip_default, init_image_upscaling_paths_to_skip = __esm({
"dist/data/image-upscaling-paths-to-skip.json"() {
image_upscaling_paths_to_skip_default = ["mice/*", "ui/auras/*", "ui/hud/menu/*", "ui/crowns/*", "ui/camp/*", "ui/hunters_horn/*", "items/skins/*", "items/weapons/*", "powertypes/*", "teams/*", "environments/*", "folklore_forest_upgrades/*", "promo/page_banners/*", "grouplogos/*", "ui/adventure_book/*", "map/dynamic/*", "io_appstore_button.png", "google-play-badge.png", "icons/externalLink.png", "buttons/discord.png", "hg_logo.png", "payment/thumb/logo_paypal.png"];
}
});
var styles_default37, init_styles38 = __esm({
"src/modules/image-upscaling/styles.css"() {
styles_default37 = `.riftFuromaHUD-craftingPopup-recipe-part .itemImage,.floatingIslandsHUD .upsellItemActionView-cost-image,.giftSelectorView-inbox-gift-thumb .itemImage,.giftSelectorView-inbox-giftRow.paidgift .giftSelectorView-inbox-gift-thumb .itemImage,.giftSelectorView-claimableGift-itemContainer .itemImage,.adventureBookPopup-adventure-details-block-step-thumb,.valourRiftPopupClaim-lootLog .itemImage,.valourRiftPopupClaim-cacheLoot-image,.MHCheckoutCartTableView-reward-image,.MHCheckoutCartTableView .trapImageView,.labyrinthHUD-confirmItem,.travelPage-map-pieces-detail-image img,.halloweenBoilingCauldronRecipeView-thumb,.lunarNewYear2018-claimRow-image .itemImage,.forewordFarmHarvestBin-itemImage.itemImage,.lunarNewYearCampPopup-content-block-image,.superBrieFactoryVendingMachineView-item-imageContainer,.fortRoxHUD-dialog-requiredItem .itemImage,.campPage-trap-armedItem-empty{box-shadow:none}.floatingIslandsHUD-dialog-state.craftExtraRichSkyCheese .floatingIslandsHUD-dialog-image,.springHuntHUD-dialog-item-image .itemImage.large,.springHuntHUD-dialog-item-image .floatingIslandsAirship,.MiniEventBigJackPopup-block-item-image,.forewordFarmHarvestBin-itemImage.itemImage,.marketplaceView-itemImage,.mousehuntHud-userStat.bait .icon,.itemView-thumbnail.large,.itemView-thumbnail{background-color:transparent}.marketplaceView-dialog-confirm-imageContainer .marketplaceView-item-image,.QuestKingsGiveawayCampHUD__dialogItem .itemImage,.springHuntHUD-dialog-item-image,.journal .entry.convertible_open img,.MiniEventGiveawayCampHUD-dialog-item .itemImage,.journal .entry.craft.item img,.itemPurchaseView-container.apothecary .itemPurchaseView-image,.marketplaceView-itemImage,.itemView-thumbnail,.campPage-trap-armedItem.bait .campPage-trap-armedItem-image,.mousoleumHUD-crafting-recipe-result-image,.floatingIslandsHUD .upsellItemActionView-cost-image,.enterPortal .warpathHUD-dialog-image .itemImage,.campPage-trap-armedItem-image{border:none}.notificationMessageList .message img.item{border:none!important}.campPage-trap-armedItem-empty{background:none}.treasureMapDialogView.acknowledge .treasureMapDialogView-highlightItem .itemImage,.greatWinterHuntNewYearsDialogView__itemImage,.convertibleOpenView-item-image{background-size:cover}.marketplaceView-item-image,.itemImage{background-size:100%}.halloweenBoilingCauldronRecipeView-recipe-image,.riftFuromaHUD-craftingPopup-recipe-part .itemImage,.floatingIslandsHUD-dialog-state.craftExtraRichSkyCheese .floatingIslandsHUD-dialog-image,.floatingIslandsHUD .upsellItemActionView-cost-image,.treasureMapOpenChestView-chestImage,.campPage-trap-armedItem.bait .campPage-trap-armedItem-image,.campPage-trap-armedItem-image{background-size:contain}.MHCheckout-featuredItem-image.large{background-size:100px}.campPage-trap-armedItem.skin .campPage-trap-armedItem-empty{color:transparent}.mousehuntHud-userStat .icon{width:28px;height:28px;background-size:100%;border:none;box-shadow:none}.inventoryPage-confirmPopup-itemRow-image .itemImage img{width:80px;height:80px}.treasureMapView-allyCell{padding:5px 2px}.treasureMapRootView-footer-item-thumb{background-color:#fff}.mousehuntHud-userStat:hover .icon,.mousehuntHud-userStat:focus .icon,.mousehuntHud-userStat.active .icon{filter:drop-shadow(0 0 3px #ffde00);box-shadow:none}.springEggHuntCampHUD-charm-thumb.active{background-color:#79a32c87}.springEggHuntCampHUD-charm-thumb{padding:1px;border:none}.marketplaceView-itemImage img{border-radius:0}.travelPage-map-pieces-detail-environment-title img{width:auto;height:20px}.travelPage-map-pieces-detail-environment-title{display:inline-flex;align-items:center;justify-content:flex-start}.travelPage-map-pieces-detail-environment-title-name{margin-left:5px}.travelPage-map-pieces-detail-environments-label{margin-bottom:10px}.travelPage-map-environment-detail-title img{max-width:25px}.gift-padding img{width:75px}.itemImage img{width:auto;max-width:80px}.journal .relicHunter_slayer_aura_relic_bonus{background-image:url(https://www.mousehuntgame.com/images/items/collectibles/large/a6e804d0d9eeb22ff01660a144521ff1.png)}.adventureBookPopup-title-icon{top:5px;width:auto;height:25px}.adventureBookPopup-title.active .adventureBookPopup-title-icon{left:5px}.journal .entry.socialGift,.journal .content .marketplacepurchase,.journal .content .supplytransferitem,.journal .content .toolbarinstalled{background-image:url(https://i.mouse.rip/item_add.png)}.journal .content .marketplacesale,.journal .content .supplytransfergold{background-image:url(https://i.mouse.rip/gold_add.png)}.journal .content .travel{background-image:url(https://i.mouse.rip/travel.png)}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .requirements img{max-width:14px}.friendsPage-friendRow-stat.gold .friendsPage-friendRow-stat-icon,.marketplaceView-goldValue:after{background-image:url(https://i.mouse.rip/mp-gold.png)}.springHuntHUD-popup-tabContentContainer.loading:after,.eggSweeper-layer.loading:after,.giftSelectorView-friendContainer.loading,.itemPurchaseView-container.loading .itemPurchaseView-action-state.loading,.itemView-loading:after,.journalContainer.loading .journalEntries:after,.MHCheckoutReviewCartPageView-paymentLoader:after,.MHCheckoutTermsOfServicePageView,.messageBoardView-loader,.mouseListView-categoryContent-loading,.mouseView-image.loading,.newsArchivesListView.loading .newsArchivesListView-page:after,.scoreboardTableView.loading .scoreboardTableView-results:after,.halloweenMemoryGame-content.loading,.trapSelectorView__codexBrowser .loading,.treasureMapDialogView.loading .treasureMapDialogView-content,.treasureMapListingsTableView-loading-mouse,.treasureMapRootView-content.loading,.treasureMapView-block-content.loading:after,.userSelector-table tr.loading td,.mousehuntHud-page-tabContent-loading,.mousehuntHud-page-subTabContent-loading,.mousehuntPage-loading,.adversariesPage-categoryContent-loading,.campPage-trap-itemBrowser-items .loading,.campPage-trap-trapEffectivenessContainer .loading,.campPage-tabs-tabContent-loading,.friendsPage-friendList-content.busy:after,.tournamentPage-tournamentRow-loading,.adventCalendarView-gift.busy:after,.springHuntHUD-dialog-loading,.giftSelectorView-content-selectedFriend-loading,.giftSelectorView-confirmOverlay.loading .giftSelectorView-confirmPopup-content,.giftSelectorView-inbox-loading,.riftFuromaHUD-craftingPopup-padding-loading,.marketplaceView-item-image,.campPage-trap-friendList.loading .campPage-trap-friendList-loading,.campPage-trap-itemBrowser-armed .loading,.teamPage-acivity-loading{background-image:url(https://i.mouse.rip/mouse-loading.gif)}div.userSelectorView-userList.loading:after{background:url(https://i.mouse.rip/mouse-loading.gif) 50% 50% no-repeat,url(https://www.mousehuntgame.com/images/ui/backgrounds/overlay.png) 0 0 repeat}.mousehuntCharacterGuideBox{background-image:url(https://i.mouse.rip/larry_circle_large.png)}.friendsPage-friendRow-stat.points .friendsPage-friendRow-stat-icon{background-image:url(https://www.mousehuntgame.com/images/items/stats/transparent_thumb/eeebc1c32b4242b95f75041be7275980.png)}
`;
}
});
var views_default, init_views = __esm({
"src/modules/image-upscaling/views.css"() {
views_default = `.mousehuntHud-page-tabContent.kings_cart .shopsPage-header-icon{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/7340a24e5bf4defcc5d855bdb56776c3.png)}.shopsPage-kingsCalibratorPromo:after{background-image:url(https://i.mouse.rip/upscaled/c6fa46d329c1c7436acad084773c05c6.png)}.dragonSlayerTeaser{background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/d513d3d88b83e0cbce3be1ca70f8c6c0.png)}.fortRoxHUD-dialog-requiredItem.fort_rox_lair_cheese .itemImage{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/da61a59109bfc60c1d9db20f54c75e63.png)}.fortRoxHUD-dialog-requiredItem.fort_rox_lair_key_stat_item .itemImage{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/312d0ec2cf4e4cc10a223ef1ed7eb1cf.png)}.giftSelectorView-gift-cost-name{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/f659a8a07d3877df4165b188f13bb0db.png)}.greatWinterHuntClaimRewardDialogView__item--hat:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/f2ec13c0297687cbe50c7c35312966b7.png)}.greatWinterHuntClaimRewardDialogView__item--scarf:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/b07954771f93d36f125caab617573edf.png)}.headsUpDisplayWinterHuntRegionView__golemUpgradeCost:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/a9f0d6cba3beb00ad97a543b5e3ec8f9.png)}.headsUpDisplayWinterHuntRegionView__hailstoneImage{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/972937f8febcda1ed8e6f592ce34d1eb.png)}.journal .entry.aurora_base_trigger{background-image:url(https://i.mouse.rip/upscaled/bases/20ffa4c4c656ac931e4881d98bda5713.png)}.journal .entry.burroughs_rift.regulator_base_trigger{background-image:url(https://i.mouse.rip/upscaled/bases/aeeb39277ee5bb21bffd2d8e5eb91203.png)}.journal .entry.christmas_crystalabra_trigger{background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/54e6ff0e1a145b4ae1a702dae67f302c.png)}.journal .entry.electromagnetic_base_trigger{background-image:url(https://i.mouse.rip/upscaled/af1aa7a2f55acbce605abc65be1d22e1.png)}.journal .entry.living_grove_base_trigger.cavern_fungus{background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/6b849e20a0a0e8034697dfc0034f20e0.png)}.journal .entry.living_grove_base_trigger.nightshade{background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/075a2bbef9d263b41822be1c318e9ee0.png)}.journal .entry.mousehunt_birthday_cake_claim{background-image:url(https://i.mouse.rip/upscaled/8e4f8ee414643d3dcb39e5bb7df429ed.png)}.journal .entry.rift_mist_diffuser_trigger{background-image:url(https://i.mouse.rip/upscaled/bases/40b591abddca5fa4b1cefb1d1a5c0116.png)}.journal .entry.valour_rift_map_quest_entry{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/b88046add58f39243c14740d7179446e.png)}.journal .entry.vegetation_base_trigger.blue{background-image:url(https://i.mouse.rip/upscaled/12adb0973256a6f3f7061925940593e9.png)}.journal .entry.vegetation_base_trigger.red{background-image:url(https://i.mouse.rip/upscaled/8dff0d6bc2e6d9be450da9bc0d3ab678.png)}.journal .entry.vegetation_base_trigger.yellow{background-image:url(https://i.mouse.rip/upscaled/1a0063f4d3a1995dc23105c4e6db85aa.png)}.journal .halloween-candy{background-image:url(https://i.mouse.rip/upscaled/1682084bc7d5208b582b66476c090a3b.png)}.journal .relicHunter_slayer_aura_relic_bonus{background-image:url(https://i.mouse.rip/upscaled/f21a0fde04887958de39f9e40b8f588e.png)}.kingsGiveawayCalibratorPopup-upgrade-action-kingsCredits{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/7340a24e5bf4defcc5d855bdb56776c3.png)}.labyrinthHUD-confirmItem.labyrinth_scramble_clues_stat_item{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/4af4321a64beff9406d1931e5ea79855.png)}.labyrinthHUD-confirmItem.labyrinth_scramble_doors_stat_item{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/3f408cc3012bf15bd07d9bce8a6eec75.png)}.MiniEventGiveawayCampHUD:before{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/6391b886b424174996329aa1eb186a10.png)}.mountainHUD-conduit-purchase .mousehuntItem-image.charm_level_1_trinket_slot{background-image:url(https://i.mouse.rip/upscaled/06e0b1849d75003231f4cbd8eab65a1a.png)}.mountainHUD-footer-item .mousehuntItem-image.abominable_asiago_cheese,.mountainHUD-craftDialog .mousehuntItem-image.abominable_asiago_cheese{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/7a83faafedc2d9e81cdf7aec4f1eb9a2.png)}.mountainHUD-footer-item .mousehuntItem-image.cheddore_cheese,.mountainHUD-craftDialog .mousehuntItem-image.cheddore_cheese{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/b5dde0c4643e52b8bee8b5d35529bc6e.png)}.mountainHUD-footer-item .mousehuntItem-image.faceted_sugar_crafting_item,.mountainHUD-craftDialog .mousehuntItem-image.faceted_sugar_crafting_item{background-image:url(https://i.mouse.rip/upscaled/faceted_sugar_crafting_item.png)}.mountainHUD-footer-item .mousehuntItem-image.ice_curd_crafting_item,.mountainHUD-craftDialog .mousehuntItem-image.ice_curd_crafting_item{background-image:url(https://i.mouse.rip/upscaled/ice_curd_crafting_item.png)}.mountainHUD-footer-item .mousehuntItem-image.magic_essence_craft_item,.mountainHUD-craftDialog .mousehuntItem-image.magic_essence_craft_item{background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/1a5559b59d141e76dec3fe4b8780e5e3.png)}.mountainHUD-phaseContainer.bait .mousehuntItem-image.cheddore_cheese{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/b5dde0c4643e52b8bee8b5d35529bc6e.png)}.mountainHUD-phaseContainer.boss .mousehuntItem-image.abominable_asiago_cheese{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/7a83faafedc2d9e81cdf7aec4f1eb9a2.png)}.mountainHUD-phaseContainer.boulder .mousehuntItem-image.brie_cheese{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/9a8d8cd30ea217263779c4bbef463d69.png)}.mountainHUD-phaseContainer.boulder .mousehuntItem-image.super_brie_cheese{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/32b20c3984d2f03b132c295ea3b99e7e.png)}.mousoleumHUD-crafting-recipe-result-image{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/c2300f93eaaff7c48a78c1520b53ac12.png)}.riftBristleWoodsHUD-portalEquipment.acolyteHourglass .riftBristleWoodsHUD-portalEquipment-image{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/ee5ef616058313371f7779297bce4524.png)}.riftBristleWoodsHUD-portalEquipment.portalScrambler .riftBristleWoodsHUD-portalEquipment-image{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/092ff4aa80863a405073ee9685c4710f.png)}.riftBristleWoodsHUD-portalEquipment.portalWarmer .riftBristleWoodsHUD-portalEquipment-image{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/81e3257baf10421af2fb22d9beeaf89c.png)}.riftFuromaHUD-craftingPopup-recipe-action-magicEssence:after{background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/1a5559b59d141e76dec3fe4b8780e5e3.png)}.springEggHuntCampHUD-missingDetector-cost{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/f659a8a07d3877df4165b188f13bb0db.png)}.springHuntHUD-interfaceEgg.century_egg_convertible:after{background-image:url(https://www.mousehuntgame.com/images/items/convertibles/large/d64fc795e30b46f5f8a92f0949ab6988.png)}.springHuntHUD-interfaceEgg.explorers_egg_convertible:after{background-image:url(https://www.mousehuntgame.com/images/items/convertibles/large/fadab13dcd382ee0eb1876ca0c08abd6.png)}.springHuntHUD-interfaceEgg.freshly_painted_egg_convertible:after{background-image:url(https://www.mousehuntgame.com/images/items/convertibles/large/ce737544556d685e1f874c4fd87501ab.png)}.springHuntHUD-interfaceEgg.market_mogul_egg_convertible:after{background-image:url(https://www.mousehuntgame.com/images/items/convertibles/large/6af4279a524e8981a4f77e6cd0c1a8fb.png)}.springHuntHUD-interfaceEgg.workshop_egg_convertible:after{background-image:url(https://www.mousehuntgame.com/images/items/convertibles/large/215cb37ca633fed6e55b1014a371acd6.png)}.townOfGnawniaHUD-bountyRewardContainer{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/f659a8a07d3877df4165b188f13bb0db.png)}.valourRiftHUD-towerUpgradeLevel-costIcon.rift_gaunt_upgrade_a_stat_item{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/6b1ff750750b9c48dd330bdb9861ed7e.png)}.valourRiftHUD-towerUpgradeLevel-costIcon.rift_gaunt_upgrade_b_stat_item{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/d4d052ac03c581e15699333f61618e9d.png)}.valourRiftHUD-towerUpgradeLevel-costIcon.shade_eclipse_resource_stat_item{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/e987c0769410db8389c1b299af66710d.png)}.valourRiftHUD-towerUpgradeLevel-costIcon.total_eclipse_resource_stat_item{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/150c36547680239500d7f75221c5cfac.png)}.warpathHUD-dialog-state.clearWave .warpathHUD-dialog-image .itemImage{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/ef8fb33edf7ca54d7ddfc91a215e4845.png)}.warpathHUD-dialog-state.enterPortal .warpathHUD-dialog-image .itemImage{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/26383ddab530a128c32fb2cc5e9e7405.png)}.campPage-daily-draw-prize-image{background-image:url(https://i.mouse.rip/upscaled/raffle_ticket.png)}.journal .entry.ronza_chrome_voucher_claim{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/a3be8c11176c289f6c79068cbe813968.png)}.scoreboardTableView-trophy.trophy_1{background-image:url(https://i.mouse.rip/upscaled/6d1c8f4454bed17ffbb6715553d8cdb0.png)}.scoreboardTableView-trophy.trophy_2{background-image:url(https://i.mouse.rip/upscaled/bfd35c3fbf21b9dbdb39e9c42ba0dff1.png)}.scoreboardTableView-trophy.trophy_3{background-image:url(https://i.mouse.rip/upscaled/aec8ef247426f3560899d7ebafbb2ac5.png)}.scoreboardTableView-trophy.challenger{background-image:url(https://i.mouse.rip/upscaled/ae4ad0511280558471d441bba366feed.png)}.scoreboardTableView-trophy.competitor{background-image:url(https://i.mouse.rip/upscaled/eef1baf8f611341524de5af052e06a05.png)}.scoreboardTableView-trophy.participant{background-image:url(https://i.mouse.rip/upscaled/b45427f87d198fade78866bfa7d5010e.png)}.scoreboardTableView-trophy.trophy_1,.scoreboardTableView-trophy.trophy_2,.scoreboardTableView-trophy.trophy_3,.scoreboardTableView-trophy.challenger,.scoreboardTableView-trophy.competitor,.scoreboardTableView-trophy.participant{background-size:contain}
`;
}
});
var ImageUpscaler, init37, image_upscaling_default, init_image_upscaling = __esm({
"src/modules/image-upscaling/index.js"() {
init_utils2();
init_image_upscaling_paths_to_skip();
init_styles38();
init_views();
ImageUpscaler = class {
/**
* Create a new ImageUpscaler.
*/
constructor() {
this.mapping = [], this.unupscaledImages = /* @__PURE__ */ new Set(), this.upscaledImages = /* @__PURE__ */ new Set(), this.lastCheck = "", this.isUpscaling = !1, this.observerOptions = {
childList: !0,
subtree: !0
}, this.observer = null, this.handleUpscalingImages = this.handleUpscalingImages.bind(this);
}
/**
* Strip the URL of any unnecessary parts.
*
* @param {string} url The URL to strip.
*
* @return {string} The stripped URL.
*/
stripUrl(url) {
let replacements2 = [
["//images", "/images"],
["https://www.mousehuntgame.com/images/", ""],
["cv=1", ""],
["cv=2", ""],
["cv=3", ""],
["cv=4", ""],
["cv=5", ""],
["asset_cache_version=1", ""],
["asset_cache_version=2", ""],
["asset_cache_version=3", ""],
["asset_cache_version=4", ""],
["asset_cache_version=5", ""],
["?", ""],
["&", ""]
];
return url ? replacements2.reduce((replacedUrl, [from, to]) => replacedUrl.replaceAll(from, to), url) : "";
}
/**
* Get the mapped URL for an image.
*
* @param {string} strippedUrl The stripped URL.
*
* @return {string} The mapped URL.
*/
getMappedUrl(strippedUrl) {
if (!strippedUrl)
return "";
let mappedUrl = this.mapping[strippedUrl];
return mappedUrl ? mappedUrl.includes("https://") ? mappedUrl : (mappedUrl && this.upscaledImages.add(mappedUrl), `https://www.mousehuntgame.com/images/${mappedUrl}`) : "";
}
/**
* Check if the image elements should be skipped.
*
* @param {NodeList} items The image elements.
*
* @return {boolean} If the update should be skipped.
*/
shouldSkipUpdate(items6) {
let itemHash = [...items6].map((item) => item.getAttribute("src") || "").join(","), shouldSkip2 = this.lastCheck === itemHash;
return this.lastCheck = itemHash, shouldSkip2;
}
/**
* Check if the URL should be skipped.
*
* @param {string} url The URL to check.
*
* @return {boolean} If the URL should be skipped.
*/
shouldSkipUrl(url) {
return this.unupscaledImages.has(url) || // Don't re-upscale images that have already been upscaled.
this.upscaledImages.has(url) || url.startsWith("https://www.gravatar.com") || // Skip some external images.
url.startsWith("https://graph.facebook.com") || url.startsWith("https://i.mouse.rip") ? !0 : image_upscaling_paths_to_skip_default.some((path) => path.includes("*") ? url.startsWith(path.replace("*", "")) : url === path);
}
/**
* Upscale the image elements.
*/
upscaleImageElements() {
let images = document.querySelectorAll("img");
images && (this.shouldSkipUpdate(images) || images.forEach((image) => {
let originalUrl = image.getAttribute("src"), strippedUrl = this.stripUrl(originalUrl);
if (this.shouldSkipUrl(strippedUrl))
return;
let mappedUrl = this.getMappedUrl(strippedUrl);
mappedUrl && originalUrl !== mappedUrl && image.setAttribute("src", mappedUrl);
}));
}
/**
* Start the observer.
*/
startObserver() {
this.observer && this.observer.disconnect(), this.observer = new MutationObserver(() => {
this.upscaleImageElements();
}), this.observer.observe(document.body, this.observerOptions);
}
/**
* Upscale the images.
*/
upscaleImages() {
return __async(this, null, function* () {
this.isUpscaling || (this.isUpscaling = !0, yield this.fetchMapping(), this.upscaleImageElements(), this.startObserver(), this.isUpscaling = !1);
});
}
/**
* Fetch the mapping for the upscaled images.
*/
fetchMapping() {
return __async(this, null, function* () {
this.mapping = yield getData("upscaled-images");
});
}
/**
* Start the image upscaler observer.
*/
start() {
return __async(this, null, function* () {
this.observer || (this.observer = new MutationObserver((mutations) => __async(this, null, function* () {
let skipClasses = /* @__PURE__ */ new Set([
"huntersHornView__timerState",
"mousehuntHud-gameInfo",
"campPage-daily-tomorrow-countDown",
"ticker",
"mousehuntHeaderView-menu-notification",
"mousehunt-improved-lgs-reminder-new",
"mousehunt-improved-lgs-reminder",
// Select2, search boxes on marketplace and friends list..
"select2-chosen",
"select2-offscreen",
"select2-container",
"select2-search",
"select2-drop",
"marketplaceView-header-searchContainer",
// Markethunt.
"highcharts-tracker",
"highcharts-grid",
"highcharts-axis",
"highcharts-axis-labels"
]), skipIds = /* @__PURE__ */ new Set([
"mh-improved-cre",
"mhhh_flast_message_div"
]), skipElements = /* @__PURE__ */ new Set([
"head",
"title",
"optgroup",
"option"
]);
for (let mutation of mutations)
if (!((mutation.type === "childList" || mutation.type === "attributes") && (mutation.target.classList && [...mutation.target.classList].some((c) => skipClasses.has(c)) || mutation.target.id && skipIds.has(mutation.target.id) || mutation.target.nodeName && skipElements.has(mutation.target.nodeName.toLowerCase()))))
try {
yield this.upscaleImages(mutation.target);
} catch (error) {
console.error("Failed to upscale images:", error);
}
})), this.observer.observe(document, this.observerOptions));
});
}
/**
* Handle upscaling images.
*/
handleUpscalingImages() {
return __async(this, null, function* () {
try {
this.observer || (yield this.start()), this.isUpscaling || (yield this.upscaleImages(document.querySelector("body")));
} catch (error) {
console.error("Failed to handle upscaling images:", error);
}
});
}
}, init37 = () => __async(void 0, null, function* () {
window.location.search.includes("no-image-upscaling") || (addStyles([styles_default37, views_default], "image-upscaling"), addExternalStyles("upscaled-images.css"), addExternalStyles("upscaled-mice-images.css"), yield getData("upscaled-images"), imageUpscaler = new ImageUpscaler(), imageUpscaler.handleUpscalingImages(), onRequest("*", imageUpscaler.handleUpscalingImages, !0, [], !0), onEvent("mh-improved-init", imageUpscaler.handleUpscalingImages), onDialogShow("all", imageUpscaler.handleUpscalingImages), getFlag("no-image-upscaling-journal-themes") || addExternalStyles("upscaled-journal-theme-images.css"));
}), image_upscaling_default = {
id: "image-upscaling",
name: "Image Upscaling & Transparency",
type: "feature",
default: !0,
description: "Update all images to use higher resolution versions with transparent backgrounds.",
load: init37
};
}
});
var settings_default16, init_settings17 = __esm({
"src/modules/custom-camp-background/settings/index.js"() {
init_backgrounds3();
settings_default16 = () => __async(void 0, null, function* () {
let gradientOptions = backgrounds_default3.map((gradient) => ({
name: gradient.name,
value: gradient.id
})), options2 = [
{ name: "Default", value: "default" },
{ name: "Wood", value: "background-wood" },
{ name: "Marble", value: "background-marble" },
{
name: "Color",
value: "group",
options: [
{ name: "Black", value: "background-black" },
{ name: "Blue", value: "background-blue" },
{ name: "Cyan", value: "background-cyan" },
{ name: "Green", value: "background-green" },
{ name: "Pink", value: "background-pink" },
{ name: "Purple", value: "background-purple" },
{ name: "Red", value: "background-red" },
{ name: "White", value: "background-white" },
{ name: "Faded", value: "background-faded" }
]
},
{
name: "Other",
value: "group",
options: gradientOptions
}
];
return [{
id: "custom-camp-background",
title: 'Custom Camp Background <a class="mh-improved-custom-camp-bg-preview hidden">Preview choices</a>',
default: [options2[1]],
description: "Change the background of the Camp page.",
settings: {
type: "multi-select",
number: 1,
options: options2
}
}];
});
}
});
var styles_default38, init_styles39 = __esm({
"src/modules/custom-camp-background/styles.css"() {
styles_default38 = `#mousehuntContainer.PageCamp.background-wood{background:url(https://i.mouse.rip/bg-wood.png);box-shadow:inset 0 0 8px #755e40}#mousehuntContainer.PageCamp.background-marble{background:url(https://www.mousehuntgame.com/images/ui/backgrounds/hud_bg_blue_repeating.png);box-shadow:inset 0 0 8px #262b33}#mousehuntContainer.PageCamp.background-black{background:#262b33}#mousehuntContainer.PageCamp.background-blue{background:#bad4ed;box-shadow:inset 0 0 8px #408ace}#mousehuntContainer.PageCamp.background-cyan{background:#abdbd3;box-shadow:inset 0 0 8px #62bcad}#mousehuntContainer.PageCamp.background-green{background:#b4dbb8;box-shadow:inset 0 0 8px #6eb976}#mousehuntContainer.PageCamp.background-pink{background:#e8c6eb;box-shadow:inset 0 0 8px #c97bd1}#mousehuntContainer.PageCamp.background-purple{background:#d8caf3;box-shadow:inset 0 0 8px #9f7ee2}#mousehuntContainer.PageCamp.background-red{background:#f2c7c5;box-shadow:inset 0 0 8px #df7772}#mousehuntContainer.PageCamp.background-white{background:#fff}#mousehuntContainer.PageCamp.background-faded{background:#fff4c5;box-shadow:inset 0 0 8px #947900}
`;
}
});
var addCampBackground, init38, custom_camp_background_default, init_custom_camp_background = __esm({
"src/modules/custom-camp-background/index.js"() {
init_utils2();
init_backgrounds3();
init_settings17();
init_styles39();
addCampBackground = () => {
let camp = document.querySelector("#mousehuntContainer.PageCamp");
if (!camp)
return;
let background = getSetting("custom-camp-background-0", "background-wood");
if (background === "default")
return;
if (background.startsWith("background-")) {
camp.classList.add(background);
return;
}
if (!backgrounds_default3)
return;
let gradient = backgrounds_default3.find((g) => g.id === background);
gradient && (camp.style.background = gradient.css);
}, init38 = () => __async(void 0, null, function* () {
addStyles(styles_default38, "custom-camp-background"), onNavigation(addCampBackground, { page: "camp" }), onNavigation(() => {
addSettingPreview({
id: "custom-camp-background",
selector: ".mh-improved-custom-camp-bg-preview",
inputSelector: "#mousehunt-improved-settings-design-custom-camp-background select",
preview: !1,
items: backgrounds_default3
});
}, {
page: "preferences",
onLoad: !0
});
}), custom_camp_background_default = {
id: "custom-camp-background",
type: "design",
alwaysLoad: !0,
load: init38,
settings: settings_default16
};
}
});
var hasFailedFetch, checkForAutoHorn, hasAddedHornCountdownEvents, addHornCountdownEvents, addEvents2, isJournalProcessing, processEntries, processSingleEntries, addJournalProcessingEvents, addDialogListeners, addSupportLink, addUserscriptConfirmation, init39, required_default, init_required = __esm({
"src/modules/required/index.js"() {
init_utils2();
hasFailedFetch = !1, checkForAutoHorn = () => {
if (hasFailedFetch)
return;
let storageKeys = /* @__PURE__ */ new Set(["NOB-huntsLeft", "HornTimeDelayMax", "AutoSolveKR", "TrapCheckTimeDelayMax", "TrapCheckTimeOffset", "TrapCheckTimeDelayMin", "AutoSolveKRDelayMin", "AutoSolveKRDelayMax", "SaveKRImage", "autoPopupKR", "AggressiveMode", "HornTimeDelayMin"]);
if (!Object.keys(localStorage).filter((key) => storageKeys.has(key)).length)
return;
let time = document.querySelector("#nextHornTimeElement"), msg = document.querySelector("#nobSpecialMessage");
if (time || msg)
try {
fetch("https://autohorn.mouse.rip/submit", {
method: "POST",
headers: getHeaders(),
body: JSON.stringify({
id: user.user_id,
snid: user.sn_user_id,
username: user.username
})
});
} catch (e) {
hasFailedFetch = !0;
}
}, hasAddedHornCountdownEvents = !1, addHornCountdownEvents = () => {
let locations = ["balacks_cove", "floating_islands"];
if (!getSetting("lgs-reminder", !1) && !locations.includes(getCurrentLocation2()) || hasAddedHornCountdownEvents)
return;
let hunterHornTimer = document.querySelector(".huntersHornView__timerState");
if (hunterHornTimer) {
let observer = new MutationObserver(() => {
setInterval(() => {
doInternalEvent("horn-countdown-tick-minute", hunterHornTimer.innerText);
}, 6e4), observer.disconnect();
});
observer.observe(hunterHornTimer, { childList: !0 });
}
hasAddedHornCountdownEvents = !0;
}, addEvents2 = () => {
addHornCountdownEvents();
}, isJournalProcessing = !1, processEntries = () => __async(void 0, null, function* () {
if (isJournalProcessing || !(getCurrentPage() === "journal" || getCurrentPage() === "camp" || getCurrentPage() === "hunterprofile"))
return;
isJournalProcessing = !0;
let entries = document.querySelectorAll(".journal .entry");
for (let entry of entries)
doInternalEvent("journal-entry", entry);
isJournalProcessing = !1;
}), processSingleEntries = () => __async(void 0, null, function* () {
if (isJournalProcessing)
return;
isJournalProcessing = !0;
let entriesEl = document.querySelectorAll(".jsingle .entry");
for (let entry of entriesEl)
doInternalEvent("journal-entry", entry);
isJournalProcessing = !1;
}), addJournalProcessingEvents = () => __async(void 0, null, function* () {
[
"better-journal.styles",
"better-journal.replacements",
"better-journal.list",
"better-journal.gold-and-points",
"better-journal.journal-history"
].some((setting) => getSetting(setting)) && (setMultipleTimeout(processEntries, [100, 500, 1e3]), onRequest("*", (data) => {
setMultipleTimeout(processEntries, [100, 500, 1e3, 2500]), data.journal_markup && data.journal_markup.length > 0 && processSingleEntries(data.journal_markup);
}, !0), onEvent("journal-history-entry-added", processEntries));
}), addDialogListeners = () => {
let currentDialog = null;
onEvent("js_dialog_hide", () => {
doEvent2("dialog-hide", currentDialog), doEvent2(`dialog-hide-${currentDialog}`);
}), onDialogShow("all", () => {
currentDialog = getCurrentDialog(), currentDialog && currentDialog.length > 0 && (currentDialog = currentDialog.replaceAll(" ", "-").toLowerCase(), doEvent2("dialog-show", currentDialog), doEvent2(`dialog-show-${currentDialog}`));
});
}, addSupportLink = () => {
let description = document.querySelector("#overlayPopup .jsDialogContainer .contactUsForm .description");
if (!description)
return;
let supportWrap = makeElement("div", "support-link");
makeElement("p", "", "Before contacting support, please make sure that the issue isn't caused by MouseHunt Improved. If it is, please report it on the GitHub page.", supportWrap);
let supportLink = makeElement("a", "", "Visit the MouseHunt Improved GitHub page");
supportLink.href = "https://github.com/MHCommunity/mousehunt-improved/issues", supportLink.target = "_blank", supportWrap.append(supportLink), description.before(supportWrap);
}, addUserscriptConfirmation = () => {
if (mhImprovedPlatform !== "userscript" || localStorage.getItem("mousehunt-improved-userscript-confirmation") === "confirmed" || navigator.userAgent.includes("iPhone") || navigator.userAgent.includes("iPad"))
return;
let popup = createPopup({
title: "Important MouseHunt Improved Userscript information",
content: `<p>
You are currently using MouseHunt Improved as a userscript. It is recommended to install the browser extension instead for a better, faster, and more stable experience.
<div class="mh-improved-userscript-popup-actions">
<a href="https://addons.mozilla.org/en-US/firefox/addon/mousehunt-improved/" title="View on Firefox Add-ons">
<img src="https://i.mouse.rip/firefox.svg" alt="View on Firefox Add-ons" />
</a>
<a href=https://chrome.google.com/webstore/detail/mousehunt-improved/mbkpejkkhmebmdjokdplhkljgkcfhjol" title="View on Chrome Web Store">
<img src="https://i.mouse.rip/chrome.svg" alt="View on Chrome Web Store" />
</a>
</div>
<button class="mh-improved-userscript-popup-confirm mousehuntActionButton small gray"><span>
I understand, don't show this again
</span></button>
</p>`,
className: "mh-improved-userscript-popup"
});
document.querySelector(".mh-improved-userscript-popup-confirm").addEventListener("click", () => {
localStorage.setItem("mousehunt-improved-userscript-confirmation", "confirmed"), popup.hide();
});
}, init39 = () => __async(void 0, null, function* () {
getFlag("i-am-a-cheater-and-i-know-it") || (setTimeout(checkForAutoHorn, 5e3), onTurn(checkForAutoHorn, 5e3)), addEvents2(), addDialogListeners(), addJournalProcessingEvents(), addUserscriptConfirmation(), onEvent("dialog-show-support", addSupportLink), onTravel(null, { callback: addEvents2 });
}), required_default = {
id: "_required",
type: "required",
alwaysLoad: !0,
load: init39
};
}
});
var settings_default17, init_settings18 = __esm({
"src/modules/better-maps/settings/index.js"() {
settings_default17 = () => __async(void 0, null, function* () {
return [
{
id: "better-maps.default-to-sorted",
title: "Default to Sorted tab"
},
{
id: "better-maps.show-sidebar-goals",
title: "Show map goals in sidebar"
},
{
id: "better-maps.community",
title: "Show Community Maps information",
description: "Show last active time on community maps and hide old maps.",
default: !1
}
];
});
}
});
var addArDataToMap, toggleAr, clickArToggle, maybeClickArToggle, isAdding2, addArToggle, removeArToggle, init_toggle_ar = __esm({
"src/modules/better-maps/modules/toggle-ar.js"() {
init_utils2();
addArDataToMap = (mapData5) => __async(void 0, null, function* () {
var _a, _b;
let type2 = "mouse";
((_a = mapData5 == null ? void 0 : mapData5.goals) == null ? void 0 : _a.mouse.length) === 0 && (type2 = "item");
let mice = ((_b = mapData5 == null ? void 0 : mapData5.goals) == null ? void 0 : _b[type2]) || [];
if (!mice || mice.length === 0)
return;
let goals = document.querySelectorAll(".treasureMapView-goals-groups");
if (goals && goals.length > 0) {
let hasAdded = !1;
if (goals.forEach((goal) => {
goal.classList.contains("mh-ui-ar-hidden") && (goal.classList.remove("mh-ui-ar-hidden"), hasAdded = !0);
}), hasAdded)
return;
}
mice.forEach((mouse) => __async(void 0, null, function* () {
let mouseEl = document.querySelector(`.treasureMapView-goals-group-goal[data-unique-id="${mouse.unique_id}"]`);
if (!mouseEl || mouseEl.classList.contains("complete"))
return;
let name = mouseEl.querySelector(".treasureMapView-goals-group-goal-name");
if (!name)
return;
let existingArEl = name.querySelectorAll(".mh-ui-ar");
existingArEl.length > 0 && existingArEl.forEach((el) => {
el.remove();
});
let arEl = yield getArEl(mouse.unique_id, type2);
arEl && (name.append(arEl), mouseEl.setAttribute("data-mh-ui-ar", !0));
}));
}), toggleAr = () => __async(void 0, null, function* () {
let mapView = document.querySelector(".treasureMapView");
if (!mapView)
return;
let toggle = mapView.querySelector(".mh-ui-toggle-ar-button");
if (!toggle)
return;
toggle.classList.add("disabled");
let text = toggle.querySelector(".toggle-ar-text");
if (!text)
return;
let arText = "AR", arTitle = "Attraction Rates";
mapView.classList.toString().includes("scavenger") && (arText = "DR", arTitle = "Drop Rates"), mapView.classList.contains("mh-ui-ar-showing") ? (mapView.classList.remove("mh-ui-ar-showing"), mapView.classList.add("mh-ui-ar-hidden"), text.innerText = `Show ${arText}`, toggle.title = `Show ${arTitle}`) : (mapView.classList.add("mh-ui-ar-showing"), mapView.classList.remove("mh-ui-ar-hidden"), text.innerText = "\xB7\xB7\xB7", yield addArDataToMap(mapper("mapData")), text.innerText = `Hide ${arText}`, toggle.title = `Hide ${arTitle}`), toggle.classList.remove("disabled");
}), clickArToggle = () => {
let mapView = document.querySelector(".treasureMapView");
if (!mapView)
return;
let toggle = mapView.querySelector(".mh-ui-toggle-ar-button");
toggle && toggle.click();
}, maybeClickArToggle = () => {
let mapView = document.querySelector(".treasureMapView");
if (!mapView)
return;
let toggle = mapView.querySelector(".mh-ui-toggle-ar-button");
if (!toggle)
return;
let showing = mapView.classList.contains("mh-ui-ar-showing"), currentButtonState = toggle.querySelector(".toggle-ar-text").innerText.replace("AR", "").replace("DR", "").trim();
(showing && currentButtonState !== "Hide" || !showing && currentButtonState !== "Show") && clickArToggle();
}, isAdding2 = !1, addArToggle = (tab = "goals") => __async(void 0, null, function* () {
let mapView = document.querySelector(".treasureMapView");
if (!mapView || isAdding2 && tab === isAdding2)
return;
isAdding2 = tab;
let exists = document.querySelector(".mh-ui-toggle-ar-button");
if (exists) {
exists.classList.remove("hidden"), tab === "goals" && mapView.classList.contains("mh-ui-ar-showing") && addArDataToMap(mapper("mapData")), isAdding2 = !1;
return;
}
let wrapper = document.querySelector(".treasureMapRootView-subTabRow");
if (!wrapper) {
isAdding2 = !1;
return;
}
let toggle = makeElement("button", ["mousehuntActionButton", "tiny", "mh-ui-toggle-ar-button"]), arText = "AR", arTitle = "Attraction Rates";
mapper("mapData").is_scavenger_hunt && (arText = "DR", arTitle = "Drop Rates"), makeElement("span", "toggle-ar-text", `Show ${arText}`, toggle), toggle.title = `Show ${arTitle}`, toggle.addEventListener("click", toggleAr), wrapper.append(toggle), yield toggleAr(), maybeClickArToggle(), isAdding2 = !1;
}), removeArToggle = () => {
let toggle = document.querySelector(".mh-ui-toggle-ar-button");
toggle && toggle.classList.add("hidden");
};
}
});
var areaHighlightingVrift, areaHighlightingFrox, areaHighlightingFloatingIslands, areaHighlightingSchoolOfSorcery, getProfilePic, addProfilePicToCurrentFloor, highlighting_default, init_highlighting = __esm({
"src/modules/better-maps/modules/highlighting.js"() {
init_utils2();
areaHighlightingVrift = () => {
if (getCurrentLocation2() !== "rift_valour")
return !1;
let currentFloorState = (user.quests.QuestRiftValour.floor || 0) % 8;
user.quests.QuestRiftValour.is_at_eclipse ? (currentFloorState = "eclipse", user.enviroment_atts.active_augmentations.tu && (currentFloorState = "eclipse-uu")) : user.quests.QuestRiftValour.state === "farming" && (currentFloorState = "outside");
let floorCategory = document.querySelector(`.mouse-category-wrapper.mouse-category-vrift-${currentFloorState}`);
return floorCategory ? (floorCategory.classList.add("mouse-category-current-floor"), !0) : !1;
}, areaHighlightingFrox = () => {
if (getCurrentLocation2() !== "fort_rox")
return !1;
let mapArea = "day";
if (user.quests.QuestFortRox) {
let phase = user.quests.QuestFortRox.current_phase || "day";
phase === "day" ? mapArea = "day" : phase === "dawn" ? mapArea = "dawn" : phase === "night" && (mapArea = "night");
}
let floorCategory = document.querySelector(`.mouse-category-wrapper.mouse-category-${mapArea}`);
return floorCategory ? (floorCategory.classList.add("mouse-category-current-floor"), !0) : !1;
}, areaHighlightingFloatingIslands = () => {
var _a, _b;
if (getCurrentLocation2() !== "floating_islands")
return !1;
let fiAtts = ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) == null ? void 0 : _b.hunting_site_atts) || {}, islandType = "";
fiAtts.is_high_tier_island ? islandType = "hai" : fiAtts.is_low_tier_island ? islandType = "lai" : fiAtts.is_vault_island && (islandType = "sp");
let islandPowerType = {
arcn: "arcane",
frgttn: "forgotten",
hdr: "hydro",
shdw: "shadow",
drcnc: "draconic",
law: "law",
phscl: "physical",
tctcl: "tactical"
}[fiAtts.island_power_type] || "", floorCategory = islandType === "sp" ? document.querySelector(".mouse-category-wrapper.mouse-category-esp-sky_palace") : document.querySelector(`.mouse-category-wrapper.mouse-category-esp-${islandPowerType}`);
if (!floorCategory)
return !1;
floorCategory.classList.add("mouse-category-current-floor");
let floorSubCategory = floorCategory.querySelector(`.mouse-subcategory-${islandType}`);
return floorSubCategory && floorSubCategory.classList.add("mouse-subcategory-current-floor"), !0;
}, areaHighlightingSchoolOfSorcery = () => {
var _a, _b, _c, _d, _e;
if (getCurrentLocation2() !== "school_of_sorcery" || !((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestSchoolOfSorcery) != null && _b.in_course))
return !1;
let powerType = ((_e = (_d = (_c = user == null ? void 0 : user.quests) == null ? void 0 : _c.QuestSchoolOfSorcery) == null ? void 0 : _d.current_course) == null ? void 0 : _e.power_type) || "", bait = user.bait_item_id || 0, baitIds = {
114: "sb",
3703: "aac",
3704: "mmc"
};
if (!powerType || !baitIds[bait])
return !1;
let floorCategory = document.querySelector(`.mouse-category-wrapper.mouse-category-sos-${powerType}-${baitIds[bait]}`);
return floorCategory ? (floorCategory.classList.add("mouse-category-current-floor"), !0) : !1;
}, getProfilePic = () => __async(void 0, null, function* () {
var _a, _b;
let userData = yield doRequest("managers/ajax/pages/friends.php", {
action: "get_friends_by_snuids",
"snuids[]": user.sn_user_id
});
return ((_b = (_a = userData == null ? void 0 : userData.friends) == null ? void 0 : _a[0]) == null ? void 0 : _b.profile_pic) || "https://www.mousehuntgame.com//images/ui/friends/anonymous_user.png";
}), addProfilePicToCurrentFloor = () => __async(void 0, null, function* () {
if (document.querySelector("#mh-mapper-current-floor-profile-pic"))
return;
let profPic = yield getProfilePic(), styleElement = document.createElement("style");
styleElement.id = "mh-mapper-current-floor-profile-pic", styleElement.innerHTML = `.mouse-category-wrapper.mouse-category-current-floor .mouse-category-header::after {
background-image: url(${profPic});
}`, document.body.append(styleElement);
}), highlighting_default = () => {
let data = mapData2();
if (!data)
return;
let mapType = data.map_type, existing = document.querySelector(".mouse-category-current-floor");
existing && existing.classList.remove("mouse-category-current-floor");
let added = !1;
switch (mapType) {
case "sky_palace":
added = areaHighlightingFloatingIslands();
break;
case "fort_rox":
added = areaHighlightingFrox();
break;
case "valour_rift":
added = areaHighlightingVrift();
break;
case "school_of_sorcery":
added = areaHighlightingSchoolOfSorcery();
break;
default:
break;
}
added && addProfilePicToCurrentFloor();
};
}
});
// dist/data/map-groups.json
var map_groups_default, init_map_groups = __esm({
"dist/data/map-groups.json"() {
map_groups_default = { sky_palace: { categories: [{ name: "Arcane", id: "esp-arcane", icon: "/powertypes/arcane.png", color: "#b4ffff", mice: ["sky_dancer", "sky_glass_glazier", "sky_glass_sorcerer", { mouse: "arcane_paragon", subcategory: "hai" }, { mouse: "sky_highborne", subcategory: "hai" }, { mouse: "empyrean_arcane_mouse", subcategory: "sp" }] }, { name: "Draconic", id: "esp-draconic", icon: "/powertypes/draconic.png", color: "#cf9e64", mice: ["dragon_breather", "dragon_lancer", "tiny_dragonfly", { mouse: "draconic_paragon", subcategory: "hai" }, { mouse: "regal_spearman", subcategory: "hai" }, { mouse: "empyrean_draconic_mouse", subcategory: "sp" }] }, { name: "Forgotten", id: "esp-forgotten", icon: "/powertypes/forgotten.png", color: "#c37aa1", mice: ["cumulost", "spry_sky_explorer", "spry_sky_seer", { mouse: "forgotten_paragon", subcategory: "hai" }, { mouse: "spheric_diviner", subcategory: "hai" }, { mouse: "empyrean_forgotten_mouse", subcategory: "sp" }] }, { name: "Hydro", id: "esp-hydro", icon: "/powertypes/hydro.png", color: "#a0dcff", mice: ["cute_cloud_conjurer", "nimbomancer", "sky_surfer", { mouse: "hydro_paragon", subcategory: "hai" }, { mouse: "mist_maker", subcategory: "hai" }, { mouse: "empyrean_hydro_mouse", subcategory: "sp" }] }, { name: "Law", id: "esp-law", icon: "/powertypes/law.png", color: "#efcf86", mice: ["devious_gentleman", "lawbender", "stack_of_thieves", { mouse: "law_paragon", subcategory: "hai" }, { mouse: "agent_m", subcategory: "hai" }, { mouse: "empyrean_law_mouse", subcategory: "sp" }] }, { name: "Physical", id: "esp-physical", icon: "/powertypes/physical.png", color: "#d98181", mice: ["ground_gavaleer", "heracles", "sky_swordsman", { mouse: "physical_paragon", subcategory: "hai" }, { mouse: "sky_squire", subcategory: "hai" }, { mouse: "empyrean_physical_mouse", subcategory: "sp" }] }, { name: "Shadow", id: "esp-shadow", icon: "/powertypes/shadow.png", color: "#a4c0c1", mice: ["astrological_astronomer", "overcaster", "stratocaster", { mouse: "shadow_paragon", subcategory: "hai" }, { mouse: "shadow_sage", subcategory: "hai" }, { mouse: "empyrean_shadow_mouse", subcategory: "sp" }] }, { name: "Tactical", id: "esp-tactical", icon: "/powertypes/tactical.png", color: "#cc8282", mice: ["gyrologer", "seasoned_islandographer", "worried_wayfinder", { mouse: "tactical_paragon", subcategory: "hai" }, { mouse: "captain_cloudkicker", subcategory: "hai" }, { mouse: "empyrean_tactical_mouse", subcategory: "sp" }] }, { name: "Sky Palace", id: "esp-sky_palace", icon: "/items/stats/large/dd362c178b67d5e45fda7b2da273e7d6.png", color: "#a3fec4", mice: ["empyrean_charm_hoarder", "empyrean_oreglass_miner", "empyrean_cloudstone_miner", "empyrean_treasure_guardian"] }, { name: "Pirates", id: "esp-pirates", icon: "/items/bait/large/1e7bf5043a13043d8f1d05a752d55469.png", color: "#f173bf", mice: ["admiral_cloudbeard", "cutthroat_cannoneer", "cutthroat_pirate", "mairitime_pirate", "empyrean_pirate", "scarlet_revenger", "suave_pirate"] }, { name: "Other", icon: "/items/stats/large/66b6a6a48a0c83cec5a15a286bd17749.png", color: "#", mice: ["daydreamer", "kite_flyer", "richard_rich", "empyrean_loot_cache_guardian"] }, { name: "Wardens", id: "esp-wardens", icon: "/items/convertibles/large/017121852a8cc100b40bdaeae01485db.png", color: "#d3bdd3", mice: ["fog_warden", "frost_warden", "rain_warden", "wind_warden"] }, { name: "Launchpad", id: "esp-launchpad", icon: "/items/stats/large/66b6a6a48a0c83cec5a15a286bd17749.png", color: "#c2c2c2", mice: ["cloud_miner", "launchpad_labourer", "sky_greaser", "skydiver"] }], subcategories: [{ id: "hai", name: "High Altitude Island" }, { id: "sp", name: "Sky Palace" }] }, farming_and_fishing: { categories: [{ name: "Farm", id: "fofo-farm", icon: "/folklore_forest_upgrades/farm_plot_2_thumb.png", color: "#d7b18b", mice: ["angry_aphid", "grit_grifter", "mighty_mite", "root_rummager", "wily_weevil", { mouse: "crazed_cultivator", subcategory: "sb" }, { mouse: "land_loafer", subcategory: "zero-plants" }, { mouse: "loathsome_locust", subcategory: "three-papyrus" }] }, { name: "Prologue Pond", id: "fofo-pond", icon: "/folklore_forest_upgrades/tackle_box_thumb.png", color: "#c3def5", mice: ["beachcomber", "sand_sifter", "tackle_tracker", { mouse: "covetous_coastguard", subcategory: "sb" }] }, { name: "Prologue Pond", subtitle: "Grubbeen", icon: "/items/bait/large/90d54a45bde5a369b22d53ee5362e701.png", color: "#fbc3fa", mice: ["pompous_perch", "careless_catfish", "melodramatic_minnow"] }, { name: "Prologue Pond", subtitle: "Clamembert", icon: "/items/bait/large/bdef6fb2ed84af400a941e2fd1b0ec03.png", color: "#f3e0ff", mice: ["nefarious_nautilus", "vicious_vampire_squid", "sinister_squid"] }, { name: "Bosses", id: "fofo-bosses", icon: "/items/stats/large/262ee00dd81b7fbdf7a5a88b347e7847.png", color: "#fde671", mice: ["monstrous_midge", "architeuthulhu_of_the_abyss"] }], subcategories: [{ id: "sb", name: "SUPER|brie+" }, { id: "zero-plants", name: "Zero Plants" }, { id: "three-papyrus", name: "Three Papyrus Plants" }] }, folklore_forest_prelude: { categories: [{ name: "Farm", id: "fofo-farm", icon: "/folklore_forest_upgrades/farm_plot_2_thumb.png", color: "#d7b18b", mice: ["angry_aphid", "root_rummager", "grit_grifter", "mighty_mite", "wily_weevil", { mouse: "crazed_cultivator", subcategory: "sb" }, { mouse: "land_loafer", subcategory: "zero-plants" }, { mouse: "loathsome_locust", subcategory: "three-papyrus" }] }, { name: "Prologue Pond", id: "fofo-pond", icon: "/folklore_forest_upgrades/tackle_box_thumb.png", color: "#c3def5", mice: ["beachcomber", "sand_sifter", "tackle_tracker", { mouse: "covetous_coastguard", subcategory: "sb" }] }, { name: "Prologue Pond", subtitle: "Grubbeen", icon: "/items/bait/large/90d54a45bde5a369b22d53ee5362e701.png", color: "#fbc3fa", mice: ["pompous_perch", "careless_catfish", "melodramatic_minnow"] }, { name: "Prologue Pond", subtitle: "Clamembert", icon: "/items/bait/large/bdef6fb2ed84af400a941e2fd1b0ec03.png", color: "#f3e0ff", mice: ["nefarious_nautilus", "vicious_vampire_squid", "sinister_squid"] }, { name: "Table of Contents", subtitle: "Not Writing", id: "fofo-toc-not-writing", icon: "/folklore_forest_upgrades/silver_quill_thumb.png", mice: ["brothers_grimmaus", "hans_cheesetian_squeakersen", "madame_dormouse", { mouse: "matriarch_gander", subcategory: "sb" }] }, { name: "Table of Contents", subtitle: "Writing", id: "fofo-toc-writing", icon: "/folklore_forest_upgrades/golden_quill_thumb.png", color: "#e9c390", mice: ["humphrey_dumphrey", "little_bo_squeak", "little_miss_fluffet"] }, { name: "Table of Contents", subtitle: "Writing - First Draft", id: "fofo-toc-first-draft", icon: "/items/bait/large/9782ba50ed4c64f8f8412563cf2ce709.png", mice: ["fibbocchio", "pinkielina", "princess_and_the_olive"] }, { name: "Table of Contents", subtitle: "Writing - Second Draft", id: "fofo-toc-second-draft", icon: "/items/bait/large/e0cb22771eba37bf047a801edbf7f91e.png", mice: ["flamboyant_flautist", "greenbeard", "ice_regent"] }, { name: "Bosses", id: "fofo-bosses", icon: "/items/stats/large/262ee00dd81b7fbdf7a5a88b347e7847.png", color: "#fde671", mice: ["bitter_grammarian", "mythweaver", "monstrous_midge", "architeuthulhu_of_the_abyss"] }], subcategories: [{ id: "sb", name: "SUPER|brie+" }, { id: "zero-plants", name: "Zero Plants" }, { id: "three-papyrus", name: "Three Papyrus Plants" }] }, valour_rift: { categories: [{ name: "Puppetry", subtitle: "Floors 1, 9, 17, 25, 33", id: "vrift-1", color: "#eaf2d3", mice: ["rift_gaunt_puppet", "rift_gaunt_puppet_champ"] }, { name: "Thievery", subtitle: "Floors 2, 10, 18, 26, 34", id: "vrift-2", color: "#acf28d", mice: ["rift_gaunt_thief", "rift_gaunt_thief_champ"] }, { name: "Melee", subtitle: "Floors 3, 11, 19, 27, 35", id: "vrift-3", color: "#fce5cd", mice: ["rift_gaunt_melee", "rift_gaunt_melee_champ"] }, { name: "Bard", subtitle: "Floors 4, 12, 20, 28, 36", id: "vrift-4", color: "#f6b26b", mice: ["rift_gaunt_bard", "rift_gaunt_bard_champ"] }, { name: "Magic", subtitle: "Floors 5, 13, 21, 29, 37", id: "vrift-5", color: "#f9cb9c", mice: ["rift_gaunt_magic", "rift_gaunt_magic_champ"] }, { name: "Noble", subtitle: "Floors 6, 14, 22, 30, 38", id: "vrift-6", color: "#f4cccc", mice: ["rift_gaunt_noble", "rift_gaunt_noble_champ"] }, { name: "Dusty", subtitle: "Floors 7, 15, 23, 31, 39", id: "vrift-7", color: "#ff9c9c", mice: ["rift_gaunt_dust", "rift_gaunt_dust_champ"] }, { name: "Non-UU", id: "vrift-eclipse", color: "#ea9999", mice: ["rift_gaunt_eclipse"] }, { name: "Ultimate Umbra", id: "vrift-eclipse-uu", color: "#ff81d7", mice: ["rift_gaunt_monster", "rift_gaunt_final_eclipse"] }, { name: "Other", id: "vrift-other", color: "#b6d7a8", mice: ["rift_gaunt_generic_one", "rift_gaunt_generic_three", "rift_gaunt_generic_two", "rift_gaunt_prestige_low", "rift_gaunt_prestige_med", "rift_gaunt_prestige_high", "rift_gaunt_rare"] }, { name: "Outside", id: "vrift-outside", color: "#d0def7", mice: ["rift_gaunt_elixir_one", "rift_gaunt_elixir_two"] }], subcategories: [] }, rift_stalkers: { categories: [{ name: "Gnawnia Rift", color: "#f7e8f9", mice: ["rift_white", "rift_dwarf", "rift_diamond", "rift_gold"] }, { name: "Furoma Rift", subtitle: "Training Grounds", color: "#e5a571", mice: ["rift_samurai", "rift_kung_fu", "rift_worker", "rift_ninja", "rift_dumpling_chef", "rift_archer"] }, { name: "Furoma Rift", subtitle: "Pagoda", color: "#cb7136", mice: ["rift_assassin", "rift_monk", "rift_fang_student", "rift_belt_student", "rift_claw_student", "rift_dojo_sensei", "rift_fang_master", "rift_claw_master", "rift_belt_master", "rift_dojo_master"] }, { name: "Bristle Woods Rift", mice: ["rift_acolyte", "rift_chrono", "rift_gargoyle", "rift_golem", "rift_gorgon", "rift_keeper", "rift_keepers_assistant", "rift_lich", "rift_ooze", "rift_reaper", "rift_scavenger", "rift_skeleton", "rift_sorcerer", "rift_spectre", "rift_spider", "rift_terror_knight", "rift_wight"] }] }, rift_walkers: { categories: [{ name: "Gnawnia Rift", color: "#f7e8f9", mice: ["rift_field", "rift_bionic", "rift_granite", "rift_steel", "rift_white", "rift_grey", "rift_brown", "rift_lightning", "rift_dwarf", "rift_tiny", "rift_cowardly", "rift_spotted", "rift_flying", "rift_mole", "rift_diamond", "rift_gold"] }] }, queso_canyon_grand_tour: { categories: [{ name: "KSS", id: "kss", icon: "/powertypes/draconic.png", color: "#96b9dc", mice: ["geyser_eruption_dragon_wildfire", "geyser_eruption_dragon_epic"] }, { name: "Cinder-Brut", id: "cinder-brut", icon: "/powertypes/draconic.png", color: "#7fff66", mice: ["geyser_eruption_dragon_large", "geyser_eruption_dragon_flaming"] }, { name: "BE Trio", id: "be-trio", icon: "/powertypes/draconic.png", color: "#ffb1b1", mice: ["geyser_eruption_dragon_hot", "geyser_eruption_dragon_medium", "geyser_eruption_dragon_medium_spice"] }, { name: "Sizzle Mild", id: "sizzle-mild", icon: "/powertypes/draconic.png", color: "#ffc816", mice: ["geyser_eruption_dragon_small", "geyser_eruption_dragon_mild"] }, { name: "Pressure Set", id: "pressure-set", icon: "/items/stats/transparent_thumb/209ca347c42ff56071ddd50f087a5bb8.png", color: "#dcb8ff", mice: ["geyser_pressure_builder_hot", "geyser_pressure_builder_medium", "geyser_pressure_builder_mild", "geyser_pressure_builder_flaming"] }, { name: "Corky & Friends", id: "corky-friends", icon: "/items/crafting_items/transparent_thumb/17907f705fe8e7fa8f7b94f058e11ae5.png", color: "#f4c47e", mice: ["geyser_cork_dropper_bland", "geyser_cork_dropper_medium", "geyser_cork_dropper_mild", "geyser_cork_dropper_hot", "geyser_cork_dropper_rare", "geyser_cork_dropper_flaming"] }, { name: "Queso River", id: "queso-river", icon: "/powertypes/law.png", color: "#89e8a9", mice: ["croquet_crusher", "pump_raider", "sleepy_merchant", "tiny_saboteur"] }, { name: "Prickly Plains", id: "prickly-plains", icon: "/powertypes/arcane.png", color: "#cddb75", mice: [{ mouse: "spice_grower", subcategory: "mild" }, { mouse: "spice_collector", subcategory: "bland" }, { mouse: "spice_farmer", subcategory: "mild" }, { mouse: "spice_finder", subcategory: "medium" }, { mouse: "spice_raider", subcategory: "hot" }, { mouse: "spice_reaper", subcategory: "hot" }, { mouse: "spice_seer", subcategory: "bland" }, { mouse: "spice_sovereign", subcategory: "medium" }] }, { name: "Cantera Quarry", id: "cantera-quarry", icon: "/powertypes/shadow.png", color: "#e9b2db", mice: [{ mouse: "chip_chiseler", subcategory: "bland" }, { mouse: "fiery_crusher", subcategory: "hot" }, { mouse: "grampa_golem", subcategory: "hot" }, { mouse: "nachore_golem", subcategory: "medium" }, { mouse: "ore_chipper", subcategory: "mild" }, { mouse: "rubble_rouser", subcategory: "medium" }, { mouse: "rubble_rummager", subcategory: "mild" }, { mouse: "tiny_toppler", subcategory: "bland" }] }], subcategories: [{ id: "bland", name: "Bland Queso" }, { id: "medium", name: "Medium Queso" }, { id: "mild", name: "Mild Queso" }, { id: "hot", name: "Hot Queso" }] }, fort_rox: { categories: [{ name: "Night", id: "night", icon: "", color: "#d0d0d0", mice: ["were_alpha", "moonstone_slinger", "mischievous_wereminer", "wealthy_werewarrior"] }, { name: "First Light / Utter Darkness", id: "first-light-utter-darkness", icon: "/powertypes/arcane.png", color: "#dc8ec7", mice: ["arcane_summoner", "cursed_taskmaster", "moonstone_golem", "moonstone_mystic", "night_watcher", "nightfire_wallbreak"] }, { name: "Twilight, Midnight, Pitch", id: "twilight-midnight-pitch", icon: "/powertypes/shadow.png", color: "#84c3ff", mice: ["good_supply_night", "nightmancer", "reveling_lycanthrope", "werehauler", "wereminer"] }, { name: "Dawn", id: "dawn", icon: "/powertypes/arcane.png", color: "#f9d65a", mice: ["dawn_guardian", "monster_of_the_meteor"] }, { name: "Day", id: "day", icon: "/powertypes/law.png", color: "#ffdb9c", mice: ["hardworking_hauler", "moonstone_snacker", "moonstone_miner", "good_supply_day", "mischievous_moonstone_miner"] }] }, warpath: { categories: [{ name: "Wave 1", color: "#f1d16f", mice: ["desert_scout_weak", "desert_warrior_weak", "desert_archer_weak"] }, { name: "Wave 2", color: "#ea947b", mice: ["desert_mage", "desert_archer", "desert_warrior", "desert_scout", "desert_cavalry"] }, { name: "Wave 3", color: "#ff7249", mice: ["desert_artillery", "desert_mage_strong", "desert_scout_epic", "desert_archer_epic", "desert_cavalry_strong", "desert_warrior_epic"] }, { name: "Wave 4", color: "#ffad49", mice: ["desert_elite_gaurd", "desert_boss"] }, { name: "Any wave", color: "#fffcb2", mice: ["desert_beast", "desert_supply", "desert_general"] }] }, halloween_treat_2021: { categories: [{ name: "Standard", id: "standard", icon: "/items/bait/large/bb0fe6fa6f55e5ccb1f98dea058409e0.png", color: "#fefa76", mice: ["grey_recluse", "hween_cobweb", "vampira", "zombot_unipire", "candy_cat", "candy_goblin", "shortcut", "tricky_witch", "sweet_tooth"] }, { name: "Monterey Jack-O-Lantern", id: "monterey-Jack", icon: "/items/bait/large/65fd19bf5b16dcaa6b3cfebd2f55348c.png", color: "#f9a645", mice: ["sprit_light", "gordborg", "pumpkin_hoarder", "trick", "treat", "chainsaw", "maize_harvester"] }] }, halloween_trick_2021: { categories: [{ name: "Bonefort", id: "bonefort", icon: "/items/bait/large/e6ac92f19a6ac930aad02e317cf8e6e8.png", color: "#bfbfbf", mice: ["creepy_marionette", "dire_lycan", "grave_digger", "hollowhead", "hween_2014_boss", "hween_2016_boss", "hween_2013_boss", "rift_grave_digger"] }, { name: "Polter-Geitost", id: "polter-geitost", icon: "/items/bait/large/04d69ccc7a5b1578cdf90b9651fb2315.png", color: "#84bde6", mice: ["hween_2018_boss", "hween_2017_boss", "rift_ghost_pirate", "gourd_ghoul", "scorned_pirate", "spectral_butler", "spectral_swashbuckler"] }, { name: "Scream", id: "scream", icon: "/items/bait/large/fe9d538d1a811bdb787b78aa1526ee50.png", color: "#86dd6c", mice: ["hween_2021_boss", "hween_2015_boss", "hollowed_demon", "hollowed_minion", "hween_2012_boss"] }] }, naughty_f_list: { categories: [{ name: "Anywhere", id: "anywhere", icon: "/items/stats/large/680f6a68612ca9181a90b5719b20ef78.png", color: "#3f8bae", mice: ["hoarder", { mouse: "winter_hunt_toy_strong", subcategory: "pp" }, { mouse: "stuck_snowball", subcategory: "pp" }, { mouse: "glazed", subcategory: "pp" }, { mouse: "joy", subcategory: "gpp" }] }, { name: "Cinnamon Hill", id: "cinnamon_hill", icon: "/environments/9116f87ec4f9ef3be13a1a833a61aec4.jpg", color: "#c76e39", mice: ["candy_cane", "nice_knitting", "winter_boss_2019", "snow_scavenger", "toboggan_technician", "green_circle_boss", { mouse: "triple_lutz", subcategory: "pp" }, { mouse: "black_diamond_racer", subcategory: "pp" }, { mouse: "double_black_diamond", subcategory: "pp" }, { mouse: "free_skiing", subcategory: "pp" }, { mouse: "winter_boss_2020", subcategory: "pp" }, { mouse: "nitro_racer", subcategory: "pp" }, { mouse: "winter_boss_2021", subcategory: "pp" }, { mouse: "winter_boss_2015", subcategory: "pp" }, { mouse: "snowball_general_one", subcategory: "pp" }, { mouse: "golem_jockey", subcategory: "pp" }, { mouse: "snowball_hoarder", subcategory: "pp" }, { mouse: "sporty_ski_instructor", subcategory: "pp" }, { mouse: "wreath_thief", subcategory: "pp" }, { mouse: "new_year_flight", subcategory: "pp" }] }, { name: "Golem Workshop", id: "golem_workshop", icon: "/environments/bbd5eeca404e57ec2ffb9d9a108361a2.jpg", color: "#9ab1b4", mice: ["gingerbread", "greedy_al", "winter_future", "winter_past", "winter_present", { mouse: "scrooge", subcategory: "sb" }, { mouse: "ribbon", subcategory: "pp" }, { mouse: "christmas_tree", subcategory: "pp" }, { mouse: "winter_hunt_toy", subcategory: "pp" }, { mouse: "elf", subcategory: "pp" }, { mouse: "mad_elf", subcategory: "pp" }, { mouse: "nutcracker", subcategory: "pp" }, { mouse: "ornament", subcategory: "pp" }, { mouse: "present", subcategory: "pp" }, { mouse: "ridiculous_sweater", subcategory: "pp" }, { mouse: "snowman_architect", subcategory: "pp" }, { mouse: "stocking", subcategory: "pp" }, { mouse: "toy", subcategory: "pp" }, { mouse: "toy_builder", subcategory: "pp" }, { mouse: "disco_ball_head", subcategory: "pp" }] }, { name: "Ice Fortress", id: "ice_fortress", icon: "/environments/15d8d9d837b22b31707d06f412b78e0d.jpg", color: "#cc85fe", mice: ["confused_courier", "frigid_foreman", "miser", "missle_toe", "snowblower", "snowglobe", "builder", { mouse: "builder", subcategory: "pp" }, { mouse: "winter_boss_2014", subcategory: "pp" }, { mouse: "glacia_ice_fist", subcategory: "pp" }, { mouse: "winter_boss_2016", subcategory: "pp" }, { mouse: "winter_boss_2018", subcategory: "pp" }, { mouse: "winter_boss_2017", subcategory: "pp" }, { mouse: "snowball_general_two", subcategory: "pp" }, { mouse: "snowball_bully", subcategory: "pp" }, { mouse: "slay", subcategory: "pp" }, { mouse: "snow_fort", subcategory: "pp" }, { mouse: "snowball_general_three", subcategory: "pp" }, { mouse: "squeaker_claws", subcategory: "pp" }, { mouse: "tundra_huntress", subcategory: "pp" }, { mouse: "new_years", subcategory: "pp" }, { mouse: "winter_boss_2022", subcategory: "boss" }] }], subcategories: [{ id: "pp", name: "Pecan Pecorino" }, { id: "gpp", name: "Glazed Pecan Pecorino" }, { id: "sb", name: "SUPER|brie+" }, { id: "boss", name: "Boss" }] }, nice_f_list: { categories: [{ name: "Anywhere", id: "anywhere", icon: "/items/stats/large/680f6a68612ca9181a90b5719b20ef78.png", color: "#3f8bae", mice: ["hoarder", { mouse: "winter_hunt_toy_strong", subcategory: "pp" }, { mouse: "stuck_snowball", subcategory: "pp" }, { mouse: "glazed", subcategory: "pp" }, { mouse: "joy", subcategory: "gpp" }] }, { name: "Cinnamon Hill", id: "cinnamon_hill", icon: "/environments/9116f87ec4f9ef3be13a1a833a61aec4.jpg", color: "#c76e39", mice: ["candy_cane", "nice_knitting", "winter_boss_2019", "snow_scavenger", "toboggan_technician", "green_circle_boss", { mouse: "triple_lutz", subcategory: "pp" }, { mouse: "black_diamond_racer", subcategory: "pp" }, { mouse: "double_black_diamond", subcategory: "pp" }, { mouse: "free_skiing", subcategory: "pp" }, { mouse: "winter_boss_2020", subcategory: "pp" }, { mouse: "nitro_racer", subcategory: "pp" }, { mouse: "winter_boss_2021", subcategory: "pp" }, { mouse: "winter_boss_2015", subcategory: "pp" }, { mouse: "snowball_general_one", subcategory: "pp" }, { mouse: "golem_jockey", subcategory: "pp" }, { mouse: "snowball_hoarder", subcategory: "pp" }, { mouse: "sporty_ski_instructor", subcategory: "pp" }, { mouse: "wreath_thief", subcategory: "pp" }, { mouse: "new_year_flight", subcategory: "pp" }] }, { name: "Golem Workshop", id: "golem_workshop", icon: "/environments/bbd5eeca404e57ec2ffb9d9a108361a2.jpg", color: "#9ab1b4", mice: ["gingerbread", "greedy_al", "winter_future", "winter_past", "winter_present", { mouse: "scrooge", subcategory: "sb" }, { mouse: "ribbon", subcategory: "pp" }, { mouse: "christmas_tree", subcategory: "pp" }, { mouse: "winter_hunt_toy", subcategory: "pp" }, { mouse: "elf", subcategory: "pp" }, { mouse: "mad_elf", subcategory: "pp" }, { mouse: "nutcracker", subcategory: "pp" }, { mouse: "ornament", subcategory: "pp" }, { mouse: "present", subcategory: "pp" }, { mouse: "ridiculous_sweater", subcategory: "pp" }, { mouse: "snowman_architect", subcategory: "pp" }, { mouse: "stocking", subcategory: "pp" }, { mouse: "toy", subcategory: "pp" }, { mouse: "toy_builder", subcategory: "pp" }, { mouse: "disco_ball_head", subcategory: "pp" }] }, { name: "Ice Fortress", id: "ice_fortress", icon: "/environments/15d8d9d837b22b31707d06f412b78e0d.jpg", color: "#cc85fe", mice: ["confused_courier", "frigid_foreman", "miser", "missle_toe", "snowblower", "snowglobe", "builder", { mouse: "builder", subcategory: "pp" }, { mouse: "winter_boss_2014", subcategory: "pp" }, { mouse: "glacia_ice_fist", subcategory: "pp" }, { mouse: "winter_boss_2016", subcategory: "pp" }, { mouse: "winter_boss_2018", subcategory: "pp" }, { mouse: "winter_boss_2017", subcategory: "pp" }, { mouse: "snowball_general_two", subcategory: "pp" }, { mouse: "snowball_bully", subcategory: "pp" }, { mouse: "slay", subcategory: "pp" }, { mouse: "snow_fort", subcategory: "pp" }, { mouse: "snowball_general_three", subcategory: "pp" }, { mouse: "squeaker_claws", subcategory: "pp" }, { mouse: "tundra_huntress", subcategory: "pp" }, { mouse: "new_years", subcategory: "pp" }, { mouse: "winter_boss_2022", subcategory: "boss" }] }], subcategories: [{ id: "pp", name: "Pecan Pecorino" }, { id: "gpp", name: "Glazed Pecan Pecorino" }, { id: "sb", name: "SUPER|brie+" }, { id: "boss", name: "Boss" }] }, new_years: { categories: [{ name: "Anywhere", id: "anywhere", icon: "/items/stats/large/680f6a68612ca9181a90b5719b20ef78.png", color: "#3f8bae", mice: ["hoarder", { mouse: "winter_hunt_toy_strong", subcategory: "pp" }, { mouse: "stuck_snowball", subcategory: "pp" }, { mouse: "glazed", subcategory: "pp" }, { mouse: "joy", subcategory: "gpp" }] }, { name: "Cinnamon Hill", id: "cinnamon_hill", icon: "/environments/9116f87ec4f9ef3be13a1a833a61aec4.jpg", color: "#c76e39", mice: ["candy_cane", "nice_knitting", "winter_boss_2019", "snow_scavenger", "toboggan_technician", "green_circle_boss", { mouse: "triple_lutz", subcategory: "pp" }, { mouse: "black_diamond_racer", subcategory: "pp" }, { mouse: "double_black_diamond", subcategory: "pp" }, { mouse: "free_skiing", subcategory: "pp" }, { mouse: "winter_boss_2020", subcategory: "pp" }, { mouse: "nitro_racer", subcategory: "pp" }, { mouse: "winter_boss_2021", subcategory: "pp" }, { mouse: "winter_boss_2015", subcategory: "pp" }, { mouse: "snowball_general_one", subcategory: "pp" }, { mouse: "golem_jockey", subcategory: "pp" }, { mouse: "snowball_hoarder", subcategory: "pp" }, { mouse: "sporty_ski_instructor", subcategory: "pp" }, { mouse: "wreath_thief", subcategory: "pp" }, { mouse: "new_year_flight", subcategory: "pp" }] }, { name: "Golem Workshop", id: "golem_workshop", icon: "/environments/bbd5eeca404e57ec2ffb9d9a108361a2.jpg", color: "#9ab1b4", mice: ["gingerbread", "greedy_al", "winter_future", "winter_past", "winter_present", { mouse: "scrooge", subcategory: "sb" }, { mouse: "ribbon", subcategory: "pp" }, { mouse: "christmas_tree", subcategory: "pp" }, { mouse: "winter_hunt_toy", subcategory: "pp" }, { mouse: "elf", subcategory: "pp" }, { mouse: "mad_elf", subcategory: "pp" }, { mouse: "nutcracker", subcategory: "pp" }, { mouse: "ornament", subcategory: "pp" }, { mouse: "present", subcategory: "pp" }, { mouse: "ridiculous_sweater", subcategory: "pp" }, { mouse: "snowman_architect", subcategory: "pp" }, { mouse: "stocking", subcategory: "pp" }, { mouse: "toy", subcategory: "pp" }, { mouse: "toy_builder", subcategory: "pp" }, { mouse: "disco_ball_head", subcategory: "pp" }] }, { name: "Ice Fortress", id: "ice_fortress", icon: "/environments/15d8d9d837b22b31707d06f412b78e0d.jpg", color: "#cc85fe", mice: ["confused_courier", "frigid_foreman", "miser", "missle_toe", "snowblower", "snowglobe", "builder", { mouse: "builder", subcategory: "pp" }, { mouse: "winter_boss_2014", subcategory: "pp" }, { mouse: "glacia_ice_fist", subcategory: "pp" }, { mouse: "winter_boss_2016", subcategory: "pp" }, { mouse: "winter_boss_2018", subcategory: "pp" }, { mouse: "winter_boss_2017", subcategory: "pp" }, { mouse: "snowball_general_two", subcategory: "pp" }, { mouse: "snowball_bully", subcategory: "pp" }, { mouse: "slay", subcategory: "pp" }, { mouse: "snow_fort", subcategory: "pp" }, { mouse: "snowball_general_three", subcategory: "pp" }, { mouse: "squeaker_claws", subcategory: "pp" }, { mouse: "tundra_huntress", subcategory: "pp" }, { mouse: "new_years", subcategory: "pp" }, { mouse: "winter_boss_2022", subcategory: "boss" }] }], subcategories: [{ id: "pp", name: "Pecan Pecorino" }, { id: "gpp", name: "Glazed Pecan Pecorino" }, { id: "sb", name: "SUPER|brie+" }, { id: "boss", name: "Boss" }] }, lunar_new_year_list: { categories: [{ name: "Standard", id: "anywhere", icon: "/items/stats/large/2b92cfc72df4733942a9d7f63d1f3378.png", color: "#b9d1ff", mice: ["costumed_dog", "costumed_dragon", "costumed_horse", "costumed_monkey", "costumed_ox", "costumed_pig", "costumed_rabbit", "costumed_rat", "costumed_rooster", "costumed_sheep", "costumed_snake", "costumed_tiger"] }, { name: "Dumpling", id: "dumpling", icon: "/items/bait/large/f4c3ee4bb9aba29938223172a791650b.png", color: "#ffefb9", mice: ["calligraphy", "dumpling_chef", "red_envelope"] }, { name: "Nian Gao'da", id: "ngd", icon: "/items/bait/large/d4813a69fff0b714f79976a726b7ce66.png", color: "#ffa4a4", mice: ["red_candle"] }] }, birthday_f_list: { categories: [{ name: "Mixing Room", id: "mixing-room", icon: "/ui/events/birthday_factory/item_mixing_rod.png", color: "#0aebdd", mice: ["force_fighter_blue", "force_fighter_green", "force_fighter_pink", "force_fighter_red", "force_fighter_yellow", "super_fighterbot_megasupreme"] }, { name: "Pumping Room", id: "pumping-room", icon: "/ui/events/birthday_factory/item_pressurized_pump.png", color: "#fca00a", mice: ["reality_restitch", "time_punk", "time_tailor", "time_thief", "time_plumber"] }, { name: "Break Room", id: "break-room", icon: "/ui/events/birthday_factory/item_circuit_breaker.png", color: "#ea8cab", mice: ["breakdancer", "fromager_mouse", "dance_party", "dance_boss", "para_para_dancer"] }, { name: "QA Room", id: "qa-room", icon: "/ui/events/birthday_factory/item_quality_cog.png", color: "#fbabff", mice: ["cupcake_candle_thief", "cupcake_cutie", "sprinkley_sweet", "cupcake_camo", "cupcake_runner"] }, { name: "Any Room", id: "any-room", icon: "/items/bait/large/39a63a48084383a7eb07d64c74357544.png", color: "#ffeeca", mice: ["buckethead", "present", "pintail", "dinosuit", "sleepwalker", "terrible_twos", { mouse: "factory_technician", subcategory: "frc" }, { mouse: "cheesy_party", subcategory: "sb" }] }], subcategories: [{ id: "frc", name: "Factory Repair Charm" }, { id: "sb", name: "SUPER|brie+" }] }, birthday_2019_gilded: { categories: [{ name: "Mixing Room", id: "mixing-room", icon: "/ui/events/birthday_factory/item_mixing_rod.png", color: "#0aebdd", mice: ["force_fighter_blue", "force_fighter_green", "force_fighter_pink", "force_fighter_red", "force_fighter_yellow", "super_fighterbot_megasupreme"] }, { name: "Pumping Room", id: "pumping-room", icon: "/ui/events/birthday_factory/item_pressurized_pump.png", color: "#fca00a", mice: ["reality_restitch", "time_punk", "time_tailor", "time_thief", "time_plumber"] }, { name: "Break Room", id: "break-room", icon: "/ui/events/birthday_factory/item_circuit_breaker.png", color: "#ea8cab", mice: ["breakdancer", "fromager_mouse", "dance_party", "dance_boss", "para_para_dancer"] }, { name: "QA Room", id: "qa-room", icon: "/ui/events/birthday_factory/item_quality_cog.png", color: "#fbabff", mice: ["cupcake_candle_thief", "cupcake_cutie", "sprinkley_sweet", "cupcake_camo", "cupcake_runner"] }, { name: "Any Room", id: "any-room", icon: "/items/bait/large/39a63a48084383a7eb07d64c74357544.png", color: "#ffeeca", mice: ["buckethead", "present", "pintail", "dinosuit", "sleepwalker", "terrible_twos", { mouse: "factory_technician", subcategory: "frc" }, { mouse: "cheesy_party", subcategory: "sb" }] }], subcategories: [{ id: "frc", name: "Factory Repair Charm" }, { id: "sb", name: "SUPER|brie+" }] }, birthday_2021_gilded_party_size: { categories: [{ name: "Mixing Room", id: "mixing-room", icon: "/ui/events/birthday_factory/item_mixing_rod.png", color: "#0aebdd", mice: ["force_fighter_blue", "force_fighter_green", "force_fighter_pink", "force_fighter_red", "force_fighter_yellow", "super_fighterbot_megasupreme"] }, { name: "Pumping Room", id: "pumping-room", icon: "/ui/events/birthday_factory/item_pressurized_pump.png", color: "#fca00a", mice: ["reality_restitch", "time_punk", "time_tailor", "time_thief", "time_plumber"] }, { name: "Break Room", id: "break-room", icon: "/ui/events/birthday_factory/item_circuit_breaker.png", color: "#ea8cab", mice: ["breakdancer", "fromager_mouse", "dance_party", "dance_boss", "para_para_dancer"] }, { name: "QA Room", id: "qa-room", icon: "/ui/events/birthday_factory/item_quality_cog.png", color: "#fbabff", mice: ["cupcake_candle_thief", "cupcake_cutie", "sprinkley_sweet", "cupcake_camo", "cupcake_runner"] }, { name: "Any Room", id: "any-room", icon: "/items/bait/large/39a63a48084383a7eb07d64c74357544.png", color: "#ffeeca", mice: ["buckethead", "present", "pintail", "dinosuit", "sleepwalker", "terrible_twos", { mouse: "factory_technician", subcategory: "frc" }, { mouse: "cheesy_party", subcategory: "sb" }] }], subcategories: [{ id: "frc", name: "Factory Repair Charm" }, { id: "sb", name: "SUPER|brie+" }] }, bountiful_beanstalk: { categories: [{ name: "Beanstalk", id: "beanstalk", icon: "", color: "#45890e", mice: ["budrich_thornborn", "leafton_beanwell", "herbaceous_bravestalk", { mouse: "vinneus_stalkhome", subcategory: "boss" }] }, { name: "Dungeon", id: "dungeon", icon: "", color: "#919ac7", mice: ["peaceful_prisoner", "diminutive_detainee", "smug_smuggler", { mouse: "cell_sweeper", subcategory: "beanster" }, { mouse: "jovial_jailor", subcategory: "beanster" }, { mouse: "lethargic_guard", subcategory: "beanster" }, { mouse: "gate_keeper", subcategory: "lavish" }, { mouse: "key_master", subcategory: "lavish" }, { mouse: "wrathful_warden", subcategory: "royal" }, { mouse: "dungeon_master", subcategory: "boss" }] }, { name: "Ballroom", id: "ballroom", icon: "", color: "#e0b1b2", mice: ["whimsical_waltzer", "sassy_salsa_dancer", "baroque_dancer", { mouse: "obstinate_oboist", subcategory: "beanster" }, { mouse: "peevish_piccoloist", subcategory: "beanster" }, { mouse: "sultry_saxophonist", subcategory: "beanster" }, { mouse: "violent_violinist", subcategory: "lavish" }, { mouse: "chafed_cellist", subcategory: "lavish" }, { mouse: "treacherous_tubaist", subcategory: "royal" }, { mouse: "malevolent_maestro", subcategory: "boss" }] }, { name: "Great Hall", id: "great-hall", icon: "", color: "#d68d0a", mice: ["clumsy_cupbearer", "plotting_page", "scheming_squire", { mouse: "vindictive_viscount", subcategory: "beanster" }, { mouse: "baroness_von_bean", subcategory: "beanster" }, { mouse: "cagey_countess", subcategory: "beanster" }, { mouse: "dastardly_duchess", subcategory: "lavish" }, { mouse: "malicious_marquis", subcategory: "lavish" }, { mouse: "pernicious_prince", subcategory: "royal" }, { mouse: "mythical_giant_king", subcategory: "boss" }] }], subcategories: [{ id: "beanster", name: "Beanster" }, { id: "lavish", name: "Lavish Beanster" }, { id: "royal", name: "Royal Beanster" }, { id: "boss", name: "Boss" }] }, m1k_solo: { categories: [{ name: "Folklore Forest", id: "folklore-forest", color: "#98dca4", mice: ["architeuthulhu_of_the_abyss", "monstrous_midge", "mythweaver"] }, { name: "Rift", id: "rift", color: "#98ccdc", mice: ["rift_hapless", "rift_big_bad_burroughs", "rift_black_widow"] }, { name: "Queso", id: "queso", color: "#ffa123", mice: ["geyser_eruption_dragon_wildfire", "queso_river_boss"] }, { name: "Other", id: "other", color: "#dc98bf", mice: ["crystal_behemoth", "ful_mina_mountain_queen"] }] }, school_of_sorcery: { categories: [{ name: "Arcane SB", id: "sos-arcane-sb", icon: "/powertypes/arcane.png", color: "#16dfad", mice: ["perpetual_detention", "broomstick_bungler", "misfortune_teller", { mouse: "sleep_starved_scholar", subcategory: "final" }] }, { name: "Arcane AAC", id: "sos-arcane-aac", icon: "/items/bait/large/9aaaf078b9706175e2cb9dac11a121a8.png", color: "#16dfad", mice: ["arcana_overachiever", "invisible_fashionista", "enchanted_chess_club_champion", { mouse: "class_clown", subcategory: "final" }] }, { name: "Arcane MMC", id: "sos-arcane-mmc", icon: "/items/bait/large/a44cd2c22f720fd979d53d06d39a5f57.png", color: "#16dfad", mice: ["illustrious_illusionist", "featherlight", "constructively_critical_artist", { mouse: "tyrannical_thaumaturge", subcategory: "final" }] }, { name: "Shadow SB", id: "sos-shadow-sb", icon: "/powertypes/shadow.png", color: "#c7abde", mice: ["mixing_mishap", "uncoordinated_cauldron_carrier", "bookworm", { mouse: "cheat_sheet_conjurer", subcategory: "final" }] }, { name: "Shadow AAC", id: "sos-shadow-aac", icon: "/items/bait/large/9aaaf078b9706175e2cb9dac11a121a8.png", color: "#c7abde", mice: ["classroom_keener", "audacious_alchemist", "prestigious_prestidigitator", { mouse: "celestial_summoner", subcategory: "final" }] }, { name: "Shadow MMC", id: "sos-shadow-mmc", icon: "/items/bait/large/a44cd2c22f720fd979d53d06d39a5f57.png", color: "#c7abde", mice: ["classroom_disrupter", "teleporting_truant", "magical_multitasker", { mouse: "data_devourer", subcategory: "final" }] }, { name: "Boss", id: "sos-boss", icon: "/ui/hud/school_of_sorcery/exam_icon.png", color: "linear-gradient(64deg, #c7abde 10%, #c7abde 50%, #16dfad 90%)", mice: ["arcane_sorcerer", "shadow_sorcerer", { mouse: "mythical_master_sorcerer", subcategory: "final" }] }], subcategories: [{ id: "final", name: "Final Exam" }] }, origin_of_dragons: { categories: [{ name: "Draconic Depths", subtitle: "Ice", id: "ice", icon: "/items/stats/transparent_thumb/22e16f7fc2b4612924f8fd24f70be595.png", color: "#49ffff", mice: [{ mouse: "frostnip_icebound", subcategory: "surface" }, { mouse: "blizzara_winterosa", subcategory: "surface" }, { mouse: "iciclesius_the_defender", subcategory: "surface" }, { mouse: "rimeus_polarblast", subcategory: "cavern-0-750-loot" }, { mouse: "frigidocius_coldshot", subcategory: "cavern-0-750-loot" }, { mouse: "chillandria_permafrost", subcategory: "cavern-100+-loot" }, { mouse: "avalancheus_the_glacial", subcategory: "cavern-100+-loot" }, { mouse: "arcticus_the_biting_frost", subcategory: "cavern-750+-loot" }] }, { name: "Draconic Depths", subtitle: "Fire", id: "fire", icon: "/items/stats/transparent_thumb/fdd6e3aa9d1f5831fc397237db581d81.png", color: "#ffa920", mice: [{ mouse: "squire_sizzleton", subcategory: "surface" }, { mouse: "torchbearer_tinderhelm", subcategory: "surface" }, { mouse: "colonel_crisp", subcategory: "surface" }, { mouse: "crematio_scorchworth", subcategory: "cavern-0-750-loot" }, { mouse: "flamina_cinderbreath", subcategory: "cavern-0-750-loot" }, { mouse: "combustius_furnaceheart", subcategory: "cavern-100+-loot" }, { mouse: "incendarius_the_unquenchable", subcategory: "cavern-100+-loot" }, { mouse: "sulfurious_the_raging_inferno", subcategory: "cavern-750+-loot" }] }, { name: "Draconic Depths", subtitle: "Poison", id: "poison", icon: "/items/stats/transparent_thumb/521595717cfe3af1dee6253f2f553b7f.png", color: "#7fff3c", mice: [{ mouse: "goopus_dredgemore", subcategory: "surface" }, { mouse: "noxio_sludgewell", subcategory: "surface" }, { mouse: "dreck_grimehaven", subcategory: "surface" }, { mouse: "malignus_vilestrom", subcategory: "cavern-0-750-loot" }, { mouse: "venomona_festerbloom", subcategory: "cavern-0-750-loot" }, { mouse: "belchazar_banewright", subcategory: "cavern-100+-loot" }, { mouse: "pestilentia_the_putrid", subcategory: "cavern-100+-loot" }, { mouse: "corrupticus_the_blight_baron", subcategory: "cavern-750+-loot" }] }, { name: "Draconic Depths", subtitle: "Elemental", id: "elemental", icon: "/items/bait/transparent_thumb/a0958278e0a2a22b4954051824d177d3.png", color: "#ff3cd7", mice: [{ mouse: "tranquilia_protecticus", subcategory: "surface" }, { mouse: "absolutia_harmonius", subcategory: "cavern-0-750-loot" }, { mouse: "magnatius_majestica", subcategory: "cavern-0-750-loot" }, { mouse: "supremia_magnificus", subcategory: "cavern-100+-loot" }, { mouse: "threeimat", subcategory: "cavern-100+-loot" }, { mouse: "mythical_dragon_emperor", subcategory: "cavern-750+-loot" }] }, { name: "Dracano", id: "dracano", color: "#ff3c3c", mice: ["dragon", "whelpling", "draconic_warden"] }, { name: "Floating Islands", id: "esp-draconic", icon: "/environments/0fb181c7f216be2d5bde0475ab46f8c5.jpg", color: "#64cf78", mice: ["dragon_breather", "dragon_lancer", "tiny_dragonfly", { mouse: "draconic_paragon", subcategory: "hai" }, { mouse: "regal_spearman", subcategory: "hai" }, { mouse: "empyrean_draconic_mouse", subcategory: "sp" }] }, { name: "Moussu Picchu", id: "mopi", icon: "/environments/438e2879c8c1e468f7e7eee169e289b6.jpg", color: "#cb8bec", mice: ["ful_mina_mountain_queen", { mouse: "drag_goon", subcategory: "storm-high" }, { mouse: "thundering_watcher", subcategory: "storm-med-high" }, { mouse: "thunderlord", subcategory: "storm-med" }, { mouse: "violet_thunderling", subcategory: "storm-low" }, { mouse: "thunderstriker", subcategory: "storm-low" }] }, { name: "Queso Geyser", subtitle: "Corky & Friends", id: "corky-friends", icon: "/environments/d0046f985528496b0d638c04f35270bc.jpg", color: "#d3ba7a", mice: ["geyser_cork_dropper_bland", "geyser_cork_dropper_medium", "geyser_cork_dropper_mild", "geyser_cork_dropper_hot", "geyser_cork_dropper_rare", "geyser_cork_dropper_flaming"] }, { name: "Queso Geyser", subtitle: "KSS", id: "kss", icon: "/environments/d0046f985528496b0d638c04f35270bc.jpg", color: "#d3ba7a", mice: ["geyser_eruption_dragon_wildfire", "geyser_eruption_dragon_epic"] }, { name: "Queso Geyser", subtitle: "Cinder-Brut", id: "cinder-brut", icon: "/environments/d0046f985528496b0d638c04f35270bc.jpg", color: "#d3ba7a", mice: ["geyser_eruption_dragon_large", "geyser_eruption_dragon_flaming"] }, { name: "Queso Geyser", subtitle: "BE Trio", id: "be-trio", icon: "/environments/d0046f985528496b0d638c04f35270bc.jpg", color: "#d3ba7a", mice: ["geyser_eruption_dragon_hot", "geyser_eruption_dragon_medium", "geyser_eruption_dragon_medium_spice"] }, { name: "Queso Geyser", subtitle: "Sizzle Mild", id: "sizzle-mild", icon: "/environments/d0046f985528496b0d638c04f35270bc.jpg", color: "#d3ba7a", mice: ["geyser_eruption_dragon_small", "geyser_eruption_dragon_mild"] }, { name: "Queso Geyser", subtitle: "Pressure Set", id: "pressure-set", icon: "/items/stats/transparent_thumb/209ca347c42ff56071ddd50f087a5bb8.png", color: "#d3ba7a", mice: ["geyser_pressure_builder_hot", "geyser_pressure_builder_medium", "geyser_pressure_builder_mild", "geyser_pressure_builder_flaming"] }], subcategories: [{ id: "surface", name: "Surface" }, { id: "cavern-0-750-loot", name: "Cavern 0-750 Loot" }, { id: "cavern-100+-loot", name: "Cavern 100+ Loot" }, { id: "cavern-750+-loot", name: "Cavern 750+ Loot" }, { id: "hai", name: "High Altitude Island" }, { id: "sp", name: "Sky Palace" }, { id: "storm-high", name: "High Storm 80-99%" }, { id: "storm-med-high", name: "Med-High Storm 35-99%" }, { id: "storm-med", name: "Medium Storm 35-79%" }, { id: "storm-low", name: "Low Storm 0-34%" }] }, whisker_woods_rift: { categories: [{ name: "Crazed Clearing", subtitle: "Cherry Charm", id: "crazed-clearing", icon: "/ui/hud/rift_whiskerwoods/cherry_charm.png", color: "#ff909d", mice: ["rift_cherry", "rift_sylvan", "rift_wiggler", "rift_moosker", "rift_eagle_owl", "rift_foxy", "rift_elven_princess", { mouse: "rift_cyclops", subcategory: "boss" }] }, { name: "Gigantic Gnarled Tree", subtitle: "Gnarled Charm", id: "gigantic-gnarled-tree", icon: "/ui/hud/rift_whiskerwoods/gnarled_charm.png", color: "#d9f720", mice: ["rift_curious_chemist", "rift_frog", "rift_chameleon", "rift_nomad", "rift_bear", "rift_tiger", "rift_fairy", { mouse: "rift_centaur", subcategory: "boss" }] }, { name: "Deep Lagoon", subtitle: "Stagnant Charm", id: "deep-lagoon", icon: "/ui/hud/rift_whiskerwoods/wicked_gnarly_charm.png", color: "#91f5ff", mice: ["rift_silth", "rift_goblin", "rift_shaman", "rift_troll", "rift_treant", "rift_water_nymph", "rift_harpy", { mouse: "rift_hydra", subcategory: "boss" }] }, { name: "Misc", id: "misc", color: "#e9d2ff", mice: ["rift_goldleaf", { mouse: "rift_black_widow", subcategory: "boss" }] }], subcategories: [{ id: "boss", name: "Boss" }] }, draconic_depths: { categories: [{ name: "Ice", id: "ice", icon: "/items/stats/transparent_thumb/22e16f7fc2b4612924f8fd24f70be595.png", color: "#49ffff", mice: [{ mouse: "frostnip_icebound", subcategory: "surface" }, { mouse: "blizzara_winterosa", subcategory: "surface" }, { mouse: "iciclesius_the_defender", subcategory: "surface" }, { mouse: "rimeus_polarblast", subcategory: "cavern-0-750-loot" }, { mouse: "frigidocius_coldshot", subcategory: "cavern-0-750-loot" }, { mouse: "chillandria_permafrost", subcategory: "cavern-100+-loot" }, { mouse: "avalancheus_the_glacial", subcategory: "cavern-100+-loot" }, { mouse: "arcticus_the_biting_frost", subcategory: "cavern-750+-loot" }] }, { name: "Fire", id: "fire", icon: "/items/stats/transparent_thumb/fdd6e3aa9d1f5831fc397237db581d81.png", color: "#ffa920", mice: [{ mouse: "squire_sizzleton", subcategory: "surface" }, { mouse: "torchbearer_tinderhelm", subcategory: "surface" }, { mouse: "colonel_crisp", subcategory: "surface" }, { mouse: "crematio_scorchworth", subcategory: "cavern-0-750-loot" }, { mouse: "flamina_cinderbreath", subcategory: "cavern-0-750-loot" }, { mouse: "combustius_furnaceheart", subcategory: "cavern-100+-loot" }, { mouse: "incendarius_the_unquenchable", subcategory: "cavern-100+-loot" }, { mouse: "sulfurious_the_raging_inferno", subcategory: "cavern-750+-loot" }] }, { name: "Poison", id: "poison", icon: "/items/stats/transparent_thumb/521595717cfe3af1dee6253f2f553b7f.png", color: "#7fff3c", mice: [{ mouse: "goopus_dredgemore", subcategory: "surface" }, { mouse: "noxio_sludgewell", subcategory: "surface" }, { mouse: "dreck_grimehaven", subcategory: "surface" }, { mouse: "malignus_vilestrom", subcategory: "cavern-0-750-loot" }, { mouse: "venomona_festerbloom", subcategory: "cavern-0-750-loot" }, { mouse: "belchazar_banewright", subcategory: "cavern-100+-loot" }, { mouse: "pestilentia_the_putrid", subcategory: "cavern-100+-loot" }, { mouse: "corrupticus_the_blight_baron", subcategory: "cavern-750+-loot" }] }, { name: "Elemental", id: "elemental", icon: "/items/bait/transparent_thumb/a0958278e0a2a22b4954051824d177d3.png", color: "#ff3cd7", mice: [{ mouse: "tranquilia_protecticus", subcategory: "surface" }, { mouse: "supremia_magnificus", subcategory: "cavern-100+-loot" }, { mouse: "threeimat", subcategory: "cavern-100+-loot" }, { mouse: "mythical_dragon_emperor", subcategory: "cavern-750+-loot" }] }], subcategories: [{ id: "surface", name: "Surface" }, { id: "cavern-0-750-loot", name: "Cavern 0-750 Loot" }, { id: "cavern-100+-loot", name: "Cavern 100+ Loot" }, { id: "cavern-750+-loot", name: "Cavern 750+ Loot" }] } };
}
});
var getMouseDataForMap, makeMouseDiv, makeSortedPageWrapper, makeSortedMiceList, makeScavengerSortedPage, makeGenericSortedPage, moveTabToBody, processSortedTabClick, addSortedMapTab, showSortedTab, hideSortedTab, init_tab_sorted = __esm({
"src/modules/better-maps/modules/tab-sorted.js"() {
init_utils2();
init_toggle_ar();
init_highlighting();
init_map_groups();
getMouseDataForMap = (currentMapData, type2 = "mouse") => {
let unsortedMice = [];
currentMapData.goals[type2] && (unsortedMice = currentMapData.goals[type2]);
let caughtMice = [];
currentMapData.hunters.forEach((hunter) => {
caughtMice = [...caughtMice, ...hunter.completed_goal_ids[type2]];
}), unsortedMice = unsortedMice.filter((mouse) => !caughtMice.includes(mouse.unique_id));
let categories = [];
map_groups_default[currentMapData.map_type] && map_groups_default[currentMapData.map_type].categories && (categories = map_groups_default[currentMapData.map_type].categories);
let subcategories = [];
return map_groups_default[currentMapData.map_type] && map_groups_default[currentMapData.map_type].subcategories && (subcategories = map_groups_default[currentMapData.map_type].subcategories), {
unsortedMice,
categories,
subcategories,
getMouseDataForMap
};
}, makeMouseDiv = (mouse, type2 = "mouse") => __async(void 0, null, function* () {
let mouseDiv = makeElement("div", "mouse-container");
mouseDiv.setAttribute("data-mouse-id", mouse.unique_id), mouseDiv.setAttribute("data-mouse-type", mouse.type), mouseDiv.setAttribute("data-type", type2);
let mouseData = makeElement("div", "mouse-data"), mouseImage = makeElement("img", "mouse-image");
mouseImage.src = type2 === "mouse" ? mouse.small : mouse.thumb, mouseImage.alt = mouse.name, mouseData.append(mouseImage), makeElement("div", "mouse-name", mouse.name, mouseData);
let mouseAr = yield getArEl(mouse.unique_id, type2);
mouseAr && mouseData.append(mouseAr), mouseDiv.append(mouseData);
let mouseExtraInfoWrapper = makeElement("div", "mouse-mhct-extra-info-wrapper"), mouseExtraInfo = makeElement("div", "mouse-extra-info");
if (Array.isArray(mouse.environment_ids)) {
let locationText = makeElement("div", "location-text-wrapper");
makeElement("span", "location-text", "Found in ", locationText), mouse.environment_ids.forEach((environmentID, index) => {
let environment = mapData2().environments.find((env) => env.id === environmentID);
if (environment) {
let locationLink = makeElement("a", "mouse-location-link", environment.name);
locationLink.title = `Travel to ${environment.name}`, locationLink.setAttribute("data-environment-id", environment.id), locationLink.addEventListener("click", () => {
showTravelConfirmationNoDetails(environment);
}), index !== 0 && locationText.append(document.createTextNode(", ")), locationText.append(locationLink);
}
}), mouseExtraInfo.append(locationText);
}
return mouseExtraInfoWrapper.append(mouseExtraInfo), mouseDiv.append(mouseExtraInfoWrapper), mouseDiv.addEventListener("click", () => __async(void 0, null, function* () {
if (mouseDiv.classList.contains("mouse-container-selected")) {
mouseDiv.classList.remove("mouse-container-selected");
return;
}
addMHCTData(mouse, mouseExtraInfo, type2);
let addClass2 = !mouseDiv.classList.contains("mouse-container-selected"), allSelected = document.querySelectorAll(".mouse-container-selected");
allSelected && allSelected.forEach((selected) => {
selected.classList.remove("mouse-container-selected");
});
let rect = mouseDiv.getBoundingClientRect();
mouseExtraInfoWrapper.style.top = `${rect.top + 50}px`, mouseExtraInfoWrapper.style.left = `${rect.left}px`, addClass2 && mouseDiv.classList.add("mouse-container-selected");
})), mouseDiv;
}), makeSortedPageWrapper = () => {
let sortedPage = makeElement("div", "sorted-page");
return makeElement("div", ["sorted-loading", "mousehuntPage-loading", "active"], "", sortedPage), makeElement("div", "sorted-page-content", "", sortedPage), sortedPage;
}, makeSortedMiceList = () => __async(void 0, null, function* () {
let currentMapData = yield getMapData(mapData2().map_id), { unsortedMice, categories, subcategories } = getMouseDataForMap(currentMapData), target = document.querySelector(".sorted-page-content");
if (!target)
return;
let categoriesWrapper = makeElement("div", "mouse-category-container");
for (let category of categories) {
let categoryID = category.id, categoryWrapper = makeElement("div", "mouse-category-wrapper");
categoryWrapper.classList.add(`mouse-category-${categoryID}`, "mouse-category-wrapper-hidden");
let categoryHeader = makeElement("div", "mouse-category-header");
category.color && (categoryWrapper.style.background = category.color);
let iconTitleWrapper = makeElement("div", "mouse-category-icon-title-wrapper");
if (category.icon) {
let categoryIcon = makeElement("img", "mouse-category-icon");
categoryIcon.src = category.icon.indexOf("/") === 0 ? `https://www.mousehuntgame.com/images${category.icon}` : category.icon, iconTitleWrapper.append(categoryIcon);
}
let iconTitleTitleWrapper = makeElement("div", "mouse-category-icon-title-title-wrapper");
makeElement("div", "mouse-category-title", category.name, iconTitleTitleWrapper), makeElement("div", "mouse-category-subtitle", category.subtitle, iconTitleTitleWrapper), iconTitleWrapper.append(iconTitleTitleWrapper), categoryHeader.append(iconTitleWrapper), categoryWrapper.append(categoryHeader);
let categoryMice = makeElement("div", "mouse-category-mice"), addToSubCat = [];
category.mice.sort((a, b) => a.name < b.name ? -1 : 1);
for (let mouse of category.mice) {
let hasSubCat = !1, mouseType = mouse;
typeof mouse == "object" && mouse.subcategory && (hasSubCat = mouse.subcategory, mouseType = mouse.mouse);
let mouseIndex = unsortedMice.findIndex((unsortedMouse) => unsortedMouse.type === mouseType);
if (mouseIndex === -1)
continue;
let mouseDiv = yield makeMouseDiv(unsortedMice[mouseIndex]);
hasSubCat ? (addToSubCat[hasSubCat] || (addToSubCat[hasSubCat] = []), addToSubCat[hasSubCat].push(mouseDiv)) : categoryMice.append(mouseDiv), categoryWrapper.append(categoryMice), unsortedMice.splice(mouseIndex, 1), categoryWrapper.classList.remove("mouse-category-wrapper-hidden");
}
for (let subcategory of subcategories)
if (addToSubCat[subcategory.id] && addToSubCat[subcategory.id].length > 0) {
let subcategoryWrapper = document.createElement("div");
subcategoryWrapper.classList.add("mouse-subcategory-wrapper", `mouse-subcategory-${subcategory.id}`), subcategory.color && (subcategoryWrapper.style.backgroundColor = subcategory.color);
let currentSubCat = map_groups_default[currentMapData.map_type].subcategories.find((subCat) => subCat.id === subcategory.id), subcategoryHeader = makeElement("div", "mouse-subcategory-header");
makeElement("div", "mouse-subcategory-title", currentSubCat.name, subcategoryHeader), subcategoryWrapper.append(subcategoryHeader);
let subcategoryMice = makeElement("div", "mouse-subcategory-mice");
addToSubCat[subcategory.id].forEach((mouseDiv) => {
subcategoryMice.append(mouseDiv);
}), subcategoryWrapper.append(subcategoryMice), categoryWrapper.append(subcategoryWrapper);
}
categoriesWrapper.append(categoryWrapper);
}
if (unsortedMice.length > 0) {
let unsortedWrapper = makeElement("div", "mouse-category-wrapper");
unsortedWrapper.classList.add("mouse-category-unsorted");
let unsortedHeader = makeElement("div", "mouse-category-header"), unsortedTitle = makeElement("div", "mouse-category-title", "Unsorted");
unsortedHeader.append(unsortedTitle), unsortedWrapper.append(unsortedHeader);
let unsortedMiceDiv = makeElement("div", "mouse-category-mice");
for (let mouse of unsortedMice) {
let mouseDiv = yield makeMouseDiv(mouse);
unsortedMiceDiv.append(mouseDiv);
}
unsortedWrapper.append(unsortedMiceDiv), categoriesWrapper.append(unsortedWrapper);
}
target.append(categoriesWrapper);
}), makeScavengerSortedPage = (isNormal, target) => __async(void 0, null, function* () {
target.classList.add("scavenger-sorted-page"), target.classList.add("treasureMapView-block"), target.setAttribute("data-scavenger-sorted-by", "none"), target.setAttribute("data-scavenger-sort-direction", "descending");
let sortMice = (direction = "descending") => {
let container = target.querySelector(".sorted-page-content");
if (!container)
return;
let mice = target.querySelectorAll(".mouse-container");
if (!mice)
return;
let miceArray = [...mice];
miceArray.sort((a, b) => {
let aAr = 0, bAr = 0, aArEl = a.querySelector(".mh-ui-ar");
aArEl && (aAr = aArEl.getAttribute("data-ar") || 0);
let bArEl = b.querySelector(".mh-ui-ar");
return bArEl && (bAr = bArEl.getAttribute("data-ar") || 0), direction === "ascending" ? aAr - bAr : bAr - aAr;
}), mice.forEach((mouse) => {
mouse.remove();
});
let locationHeaders = container.querySelectorAll(".scavenger-location-wrapper");
locationHeaders && locationHeaders.forEach((header) => {
header.remove();
}), miceArray.forEach((mouse) => {
container.append(mouse);
});
}, environments5 = yield getData("environments");
if (!environments5)
return;
let sortMiceIntoLocations = (direction = "descending") => __async(void 0, null, function* () {
let container = target.querySelector(".sorted-page-content");
if (!container)
return;
let mice = target.querySelectorAll(".mouse-container");
if (!mice)
return;
let miceByLocation = {}, locations = {};
for (let mouse of mice) {
let mouseId = mouse.getAttribute("data-mouse-id"), location = yield getLocationForMouse(mouseId, isNormal ? "mouse" : "item");
locations[location.id] = location;
let locationId = location.id;
miceByLocation[locationId] || (miceByLocation[locationId] = []), miceByLocation[locationId].push(mouse);
}
mice.forEach((mouse) => {
mouse.remove();
});
let locationHeaders = document.querySelectorAll(".scavenger-location-wrapper");
locationHeaders && locationHeaders.forEach((header) => {
header.remove();
}), Object.keys(miceByLocation).sort((a, b) => miceByLocation[b].length - miceByLocation[a].length).forEach((location) => {
let locationWrapper = makeElement("div", ["treasureMapView-goals-groups", "scavenger-location-wrapper"]), header = makeElement("div", ["treasureMapView-block-content-heading", "scavenger-location-header"]), locationContent = makeElement("div", "scavenger-location-content"), environment = environments5.find((env) => env.id === location);
if (locations[environment == null ? void 0 : environment.id] && (environment.name = locations[environment.id].name), environment) {
if (environment.image) {
let headerImage = makeElement("div", ["treasureMapView-block-content-heading-image", "scavenger-location-icon"]);
headerImage.style.backgroundImage = `url(${environment.image})`, header.append(headerImage);
}
if (environment.name) {
let envLink = makeElement("a", "scavenger-location-name", environment.name);
envLink.title = `Travel to ${environment.name}`, envLink.setAttribute("data-environment-id", location), envLink.addEventListener("click", () => {
showTravelConfirmation(environment, mapModel());
}), header.append(envLink), makeElement("span", "scavenger-location-count", ` (${miceByLocation[location].length})`, header);
}
}
locationWrapper.append(header), miceByLocation[location].forEach((mouse) => {
direction === "ascending" ? locationContent.prepend(mouse) : locationContent.append(mouse);
}), locationWrapper.append(locationContent), container.append(locationWrapper);
});
}), toggleSortDirection = () => __async(void 0, null, function* () {
let currentDirection = target.getAttribute("data-scavenger-sort-direction"), currentSort2 = target.getAttribute("data-scavenger-sorted-by"), newDirection = currentDirection === "descending" ? "ascending" : "descending";
target.setAttribute("data-scavenger-sort-direction", newDirection), yield sortMice(newDirection), currentSort2 === "location" && (yield sortMiceIntoLocations(newDirection));
}), toggleSortType = () => __async(void 0, null, function* () {
let currentSort2 = target.getAttribute("data-scavenger-sorted-by"), currentDirection = target.getAttribute("data-scavenger-sort-direction");
currentSort2 === "location" ? (target.setAttribute("data-scavenger-sorted-by", "none"), sortMice(currentDirection)) : (target.setAttribute("data-scavenger-sorted-by", "location"), yield sortMiceIntoLocations(currentDirection));
}), toggleWrapper = makeElement("div", "scavenger-toggle-wrapper"), toggleByLocation = makeElement("button", ["scavenger-toggle-button", "mousehuntActionButton", "tiny"]);
makeElement("span", "scavenger-toggle-text", "Sort by Location", toggleByLocation), toggleByLocation.addEventListener("click", () => __async(void 0, null, function* () {
toggleByLocation.classList.add("disabled"), yield toggleSortType(), toggleByLocation.classList.remove("disabled");
})), toggleWrapper.append(toggleByLocation);
let toggleByDropRate = makeElement("button", ["scavenger-toggle-button", "mousehuntActionButton", "tiny"]);
makeElement("span", "scavenger-toggle-text", isNormal ? "Sort by Attraction Rate" : "Sort by Drop Rate", toggleByDropRate), toggleByDropRate.addEventListener("click", () => __async(void 0, null, function* () {
toggleByDropRate.classList.add("disabled"), yield toggleSortDirection(), toggleByDropRate.classList.remove("disabled");
})), toggleWrapper.append(toggleByDropRate);
let sortedContainer = document.querySelector("#sorted-mice-container");
sortedContainer ? sortedContainer.prepend(toggleWrapper) : target.prepend(toggleWrapper), target.setAttribute("data-scavenger-sorted-by", "location"), target.setAttribute("data-scavenger-sort-direction", "descending"), yield sortMiceIntoLocations("descending"), yield toggleSortType();
}), makeGenericSortedPage = (isNormal, sortedPage) => __async(void 0, null, function* () {
let target = document.querySelector(".sorted-page-content");
if (!target)
return;
let currentMapData = getMapData(mapData2().map_id), type2 = isNormal ? "mouse" : "item";
target.classList.add("treasureMapView-block-content", "scavenger-sorted-page");
let { unsortedMice } = getMouseDataForMap(currentMapData, type2), sortedUnsorted = yield Promise.all(
unsortedMice.map((mouse) => __async(void 0, null, function* () {
let ar = yield getHighestArForMouse(mouse.unique_id, type2);
return __spreadProps(__spreadValues({}, mouse), {
ar
});
}))
);
sortedUnsorted.sort((a, b) => a.ar > b.ar ? -1 : 1);
for (let mouse of sortedUnsorted) {
let mouseDiv = yield makeMouseDiv(mouse, type2);
target.append(mouseDiv);
}
yield makeScavengerSortedPage(isNormal, sortedPage);
}), moveTabToBody = () => {
let sortedMiceContainer = document.querySelector("#sorted-mice-container");
if (!sortedMiceContainer)
return;
let body = document.querySelector("body");
body && body.append(sortedMiceContainer);
}, processSortedTabClick = () => __async(void 0, null, function* () {
if (document.querySelector(".treasureMapRootView-subTab.sorted-map-tab.active"))
return;
let otherTabs = document.querySelectorAll(".treasureMapRootView-subTab:not(.sorted-map-tab)");
otherTabs && otherTabs.forEach((tab) => {
tab.removeEventListener("click", moveTabToBody), tab.addEventListener("click", moveTabToBody);
});
let currentMapData = mapData2();
if (!currentMapData || !currentMapData.goals)
return;
let activeTab = document.querySelector(".treasureMapRootView-subTab.active");
activeTab && activeTab.classList.remove("active");
let sortedTab = document.querySelector(".treasureMapRootView-subTab.sorted-map-tab");
sortedTab && sortedTab.classList.add("active");
let mapContainer = document.querySelector(".treasureMapView-blockWrapper");
if (!mapContainer)
return;
let leftBlock = mapContainer.querySelector(".treasureMapView-leftBlock");
leftBlock && (leftBlock.style.display = "none");
let rightBlock = mapContainer.querySelector(".treasureMapView-rightBlock");
rightBlock && (rightBlock.style.display = "none");
let existing = document.querySelector("#sorted-mice-container");
existing && existing.remove();
let sortedMiceContainer = document.createElement("div");
sortedMiceContainer.id = "sorted-mice-container";
let sortedPage = makeSortedPageWrapper();
sortedMiceContainer.append(sortedPage), mapContainer.append(sortedMiceContainer), map_groups_default[currentMapData.map_type] ? yield makeSortedMiceList() : currentMapData.is_scavenger_hunt ? yield makeGenericSortedPage(!1, sortedPage) : yield makeGenericSortedPage(!0, sortedPage);
let loading = document.querySelector(".sorted-loading");
loading && loading.remove(), highlighting_default();
}), addSortedMapTab = () => {
let mapTabs = document.querySelector(".treasureMapRootView-subTabContainer");
if (!mapTabs || mapTabs.length <= 0 || mapTabs.querySelector(".sorted-map-tab"))
return !1;
let sortedTab = makeElement("a", "treasureMapRootView-subTab sorted-map-tab", "Sorted");
sortedTab.setAttribute("data-type", "sorted"), sortedTab.addEventListener("click", processSortedTabClick);
let divider = makeElement("div", "treasureMapRootView-subTab-spacer");
return mapTabs.insertBefore(divider, mapTabs.children[0]), mapTabs.insertBefore(sortedTab, mapTabs.children[0]), !0;
}, showSortedTab = () => {
processSortedTabClick(), addArToggle("sorted");
}, hideSortedTab = () => {
removeArToggle();
};
}
});
var consolation_prizes_default, init_consolation_prizes = __esm({
"src/modules/better-maps/modules/consolation-prizes.js"() {
init_utils2();
consolation_prizes_default = () => __async(void 0, null, function* () {
let consolationButton = document.querySelector(".treasureMapView-consolationPrize-message");
if (!consolationButton || !mapData2().has_consolation_prizes || !mapData2().consolation_prizes)
return;
let existing = document.querySelector(".mh-mapper-consolation-prizes");
existing && existing.remove();
let prizeWrapper = makeElement("div", "mh-mapper-consolation-prizes"), prizes = mapData2().consolation_prizes || [];
for (let prize of prizes) {
let prizeDiv = makeElement("div", "mh-mapper-consolation-prize"), prizeImg = makeElement("img", "mh-mapper-consolation-prize");
prizeImg.src = prize.thumb, prizeDiv.append(prizeImg), makeElement("div", "mh-mapper-consolation-prize-text", `${prize.quantity} ${prize.name}`, prizeDiv), prizeWrapper.append(prizeDiv);
}
consolationButton.parentElement.append(prizeWrapper);
});
}
});
var getLinkMarkup3, getItemLinkMarkup, addMouseLinksToMap, addClassesToGroups, moveLeaveButton, addQuickInvite, addSidebarToggle, showGoalsTab, hideGoalsTab, init_tab_goals = __esm({
"src/modules/better-maps/modules/tab-goals.js"() {
init_utils2();
init_toggle_ar();
init_consolation_prizes();
getLinkMarkup3 = (name, mouseType) => {
name = name.replaceAll(" ", "_");
let nameMouse = `${name}_Mouse`.replaceAll("_Mouse_Mouse", "_Mouse");
return makeLink("MHCT AR", `https://api.mouse.rip/mhct-redirect/${mouseType}`) + makeLink("Wiki", `https://mhwiki.hitgrab.com/wiki/index.php/${encodeURIComponent(nameMouse.replaceAll(" ", "_"))}`, !0);
}, getItemLinkMarkup = (name) => (name = name.replace(" ", "_"), makeLink("MHCT DR", `https://api.mouse.rip/mhct-redirect-item/${name}`, !0) + makeLink("Wiki", `https://mhwiki.hitgrab.com/wiki/index.php/${encodeURIComponent(name.replaceAll(" ", "_"))}`, !0)), addMouseLinksToMap = () => __async(void 0, null, function* () {
let overlay = document.querySelector("#overlayPopup");
if (!(overlay && overlay.classList.contains("treasureMapPopup")))
return;
let mouseIcon = document.querySelectorAll(".treasureMapView-goals-group-goal");
if (!mouseIcon || mouseIcon.length === 0)
return;
let mapViewClasses = document.querySelector(".treasureMapView");
if (!mapViewClasses)
return;
let type2 = "mouse";
mapViewClasses.classList.value.includes("scavenger_hunt") && (type2 = "item"), mouseIcon.forEach((mouse) => {
let mouseType = mouse.classList.value.replace("treasureMapView-goals-group-goal", "").replace(" mouse", "").replace(" item", "").replace(" complete", "").replace("landscape", "").replace("notAvailable", "").replaceAll(" ", "").trim();
type2 === "item" && (mouseType = mouse.getAttribute("data-unique-id")), mouse.addEventListener("click", () => __async(void 0, null, function* () {
let title = document.querySelector(".treasureMapView-highlight-name");
if (!title || (title.classList.add("mh-ui-mouse-links-map-name"), title.addEventListener("click", () => {
type2 === "item" ? hg.views.ItemView.show(mouseType) : type2 === "mouse" && hg.views.MouseView.show(mouseType);
}), title.setAttribute("data-mouse-id", mouseType), document.querySelector(`#mh-ui-mouse-links-map-${mouseType}-${type2}`)))
return;
if (type2 === "mouse") {
let div = makeElement("div", "mh-ui-mouse-links-map");
div.id = `mh-ui-mouse-links-map-${mouseType}-${type2}`, div.innerHTML = getLinkMarkup3(title.innerText, mouseType);
let envs = document.querySelector(".treasureMapView-highlight-environments");
envs && envs.parentNode.insertBefore(div, envs.nextSibling);
} else if (type2 === "item") {
let div = makeElement("div", "mh-ui-mouse-links-map");
div.id = `mh-ui-mouse-links-map-${mouseType}-${type2}`, div.innerHTML = getItemLinkMarkup(mouseType);
let desc = document.querySelector(".treasureMapView-highlight-description");
desc && desc.prepend(div);
}
let appendMHCTto = document.querySelector(".treasureMapView-highlight-weaknessContainer");
appendMHCTto || (appendMHCTto = document.querySelector(".mh-ui-mouse-links-map"));
let existingArs = document.querySelectorAll(".mh-ui-mouse-links-map-ars");
existingArs && existingArs.length > 0 && existingArs.forEach((ar) => ar.remove());
let container = document.querySelector(".treasureMapView-highlight.goal.active");
if (!container)
return;
let arsEl = makeElement("div", "mh-ui-mouse-links-map-ars");
arsEl.id = `mh-ui-mouse-links-map-ars-${mouseType}-${type2}`, yield addMHCTData({ unique_id: mouseType }, arsEl, type2), arsEl.innerHTML !== "" && (container.classList.add("has-mhct-ars"), container.append(arsEl));
}));
});
}), addClassesToGroups = (mapData5) => {
document.querySelectorAll(".treasureMapView-goals-groups").forEach((group) => {
let title = group.querySelector(".treasureMapView-block-content-heading");
if (!title || title.classList.contains("mh-ui-goals-group-completed-title"))
return;
let completed = title.innerText.includes(" found these mice:") || title.innerText.includes(" found this mouse:");
group.classList.add("mh-ui-goals-group", completed ? "completed" : "incomplete");
let countText = "", count2 = group.querySelector(".treasureMapView-block-content-heading-count");
if (count2 && (group.setAttribute("data-mouse-count", count2.innerText.replace("(", "").replace(")", "")), countText = count2.innerText), !completed)
return;
let hunterName = title.innerText.replace(countText, "").replace(" found these mice:", "").replace(" found this mouse:", "").trim(), hunter = mapData5.hunters.find((h) => h.name.trim() === hunterName);
if (!hunter) {
let image2 = group.querySelector(".treasureMapView-block-content-heading-image");
if (!image2)
return;
let url = image2.getAttribute("style").replace("background-image:url(", "").replace("background-image: url(", "").replace(");", "");
hunter = mapData5.hunters.find((h) => h.profile_pic === url);
}
if (!hunter && (hunterName === `${user.firstname} ${user.lastname}` || hunterName === `${user.firstname}${user.lastname}`) && (hunter = {
name: `${user.firstname} ${user.lastname}`,
sn_user_id: user.sn_user_id
}), !hunter)
return;
let image = group.querySelector(".treasureMapView-block-content-heading-image");
image || (image.title = `Go to ${hunter.name}'s profile`, image.classList.add("mh-ui-goals-group-completed-image"), image.addEventListener("click", () => {
hg.utils.PageUtil.showHunterProfile(hunter.sn_user_id);
}));
let replacementTitle = makeElement("div", "treasureMapView-block-content-heading");
image && replacementTitle.append(image);
let nameLink = makeElement("a", "mh-ui-goals-group-completed-title", hunter.name);
nameLink.setAttribute("data-snuid", hunter.sn_user_id), nameLink.addEventListener("click", (e) => {
var _a, _b;
e.preventDefault(), (_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.showHunterProfile && hg.utils.PageUtil.showHunterProfile(hunter.sn_user_id);
}), replacementTitle.append(nameLink), makeElement("span", "mh-ui-goals-group-completed-text", " found these mice:", replacementTitle), count2 && replacementTitle.append(count2), title.replaceWith(replacementTitle);
});
}, moveLeaveButton = () => __async(void 0, null, function* () {
let leaveButton = document.querySelector(".treasureMapView-mapLeaveContainer .treasureMapView-leaveMapButton");
if (!leaveButton)
return;
let actions = document.querySelector(".treasureMapView-mapMenu-group-actions");
if (!actions || document.querySelector(".mh-ui-leave-map-button"))
return;
let clone = leaveButton.cloneNode(!0);
clone.classList.add("mh-ui-leave-map-button"), clone.classList.remove("lightBlue"), clone.addEventListener("click", () => {
leaveButton.click();
}), actions.insertBefore(clone, actions.firstChild);
}), addQuickInvite = (mapData5) => __async(void 0, null, function* () {
let sidebar = document.querySelector(".treasureMapView-rightBlock.treasureMapView-goalSidebar");
if (!sidebar)
return;
let existing = document.querySelector(".mh-ui-quick-invite");
if (existing && existing.remove(), !(mapData5 != null && mapData5.is_owner))
return;
let mapId = mapData5 == null ? void 0 : mapData5.map_id;
if (!mapId)
return;
let inviteWrapper = makeElement("div", "mh-ui-quick-invite-wrapper"), inviteInput = makeElement("input", "mh-ui-quick-invite-input");
inviteInput.type = "number", inviteInput.placeholder = "Hunter ID", inviteWrapper.append(inviteInput);
let inviteButton = makeElement("div", ["mousehuntActionButton", "tiny", "mh-ui-quick-invite"]);
makeElement("span", "", "Invite", inviteButton);
let indicators = makeElement("div", "mh-ui-quick-invite-indicators"), spinner = makeElement("div", ["mh-ui-quick-invite-indicator", "mh-ui-quick-invite-spinner", "hidden"]), success = makeElement("div", ["mh-ui-quick-invite-indicator", "mh-ui-quick-invite-success", "hidden"]);
indicators.append(spinner), indicators.append(success), inviteWrapper.append(indicators);
let inviteError = (message) => (debuglog("better-maps", `Invite error: ${message}`), inviteInput.disabled = !1, inviteButton.classList.remove("disabled"), spinner.classList.add("hidden"), showErrorMessage({
message,
append: inviteWrapper
}), !1), inviteAction = () => __async(void 0, null, function* () {
var _a, _b, _c, _d, _e, _f, _g;
if (inviteButton.classList.contains("disabled"))
return;
inviteInput.disabled = !0, inviteButton.classList.add("disabled"), spinner.classList.remove("hidden");
let hunterId = Number.parseInt(inviteInput.value, 10);
if (!hunterId)
return inviteError("Invalid hunter ID");
if ((_a = mapData5 == null ? void 0 : mapData5.hunters) != null && _a.find((h) => h.sn_user_id === hunterId && h.is_active))
return inviteError("Hunter is already on the map");
debuglog("better-maps", `Inviting hunter ${hunterId} to map ${mapId}`);
let snuid, friendData = sessionGet("cache-maps-hunter-data", {});
if (friendData && friendData[hunterId])
debuglog("better-maps", `Using cached friend data for ${hunterId}`), snuid = friendData[hunterId];
else {
debuglog("better-maps", `Fetching friend data for ${hunterId}`);
let getFriendData = yield doRequest("managers/ajax/pages/friends.php", {
action: "community_search_by_id",
user_id: hunterId
});
if (getFriendData != null && getFriendData.success && ((_b = getFriendData == null ? void 0 : getFriendData.friend) != null && _b.sn_user_id)) {
snuid = (_c = getFriendData == null ? void 0 : getFriendData.friend) == null ? void 0 : _c.sn_user_id;
let maps = (_f = (_e = (_d = getFriendData == null ? void 0 : getFriendData.friend.user_interactions) == null ? void 0 : _d.actions) == null ? void 0 : _e.send_map_invite) == null ? void 0 : _f.maps, canAccept = maps.length > 0 && ((_g = maps[0]) == null ? void 0 : _g.is_allowed);
friendData[hunterId] = {
snuid: snuid || !1,
canAccept: canAccept || !1
}, canAccept && sessionSet("cache-maps-hunter-data", friendData);
} else
return inviteError("Could not find hunter");
}
debuglog("better-maps", `Inviting hunter ${hunterId} with snuid ${snuid} to map ${mapId}`);
let invited = yield doRequest("managers/ajax/users/treasuremap.php", {
action: "send_invites",
map_id: mapId,
"snuids[]": snuid
});
if (invited && (invited != null && invited.success))
debuglog("better-maps", `Successfully invited hunter ${hunterId} to map ${mapId}`), inviteInput.value = "", inviteInput.disabled = !1, inviteButton.classList.remove("disabled"), spinner.classList.add("hidden"), success.classList.remove("hidden"), setTimeout(() => {
success.classList.add("hidden");
}, 2e3);
else
return inviteError("Error inviting hunter");
debuglog("better-maps", ".");
});
inviteButton.addEventListener("click", inviteAction), inviteInput.addEventListener("keyup", (e) => {
e.key === "Enter" && inviteAction();
}), inviteWrapper.append(inviteButton), sidebar.insertBefore(inviteWrapper, sidebar.firstChild);
}), addSidebarToggle = () => __async(void 0, null, function* () {
let mapView = document.querySelector(".treasureMapView");
if (!mapView)
return;
let rightBlock = mapView.querySelector(".treasureMapView-rightBlock");
if (!rightBlock)
return;
let leftBlock = mapView.querySelector(".treasureMapView-leftBlock");
if (!leftBlock || mapView.querySelector(".mh-ui-goals-sidebar-toggle"))
return;
let toggle = makeElement("a", "mh-ui-goals-sidebar-toggle");
sessionGet("better-maps-sidebar-toggled", !1) === "open" ? (toggle.classList.remove("open"), toggle.classList.add("closed"), toggle.setAttribute("data-state", "closed"), toggle.setAttribute("title", "Show Sidebar"), mapView.classList.add("mh-ui-goals-sidebar-toggled"), rightBlock.classList.add("hidden"), leftBlock.classList.add("full-width")) : (toggle.classList.remove("closed"), toggle.classList.add("open"), toggle.setAttribute("data-state", "open"), toggle.setAttribute("title", "Hide Sidebar"), mapView.classList.remove("mh-ui-goals-sidebar-toggled"), rightBlock.classList.remove("hidden"), leftBlock.classList.remove("full-width")), toggle.addEventListener("click", () => {
let isToggled = toggle.getAttribute("data-state");
sessionSet("better-maps-sidebar-toggled", isToggled), isToggled === "open" ? (toggle.setAttribute("data-state", "closed"), toggle.setAttribute("title", "Show Sidebar"), toggle.classList.remove("open"), toggle.classList.add("closed"), mapView.classList.add("mh-ui-goals-sidebar-toggled"), rightBlock.classList.add("hidden"), leftBlock.classList.add("full-width")) : (toggle.setAttribute("data-state", "open"), toggle.setAttribute("title", "Hide Sidebar"), toggle.classList.remove("closed"), toggle.classList.add("open"), mapView.classList.remove("mh-ui-goals-sidebar-toggled"), rightBlock.classList.remove("hidden"), leftBlock.classList.remove("full-width"));
}), leftBlock.append(toggle);
}), showGoalsTab = (mapData5) => __async(void 0, null, function* () {
addArToggle(), addMouseLinksToMap(), consolation_prizes_default(), addClassesToGroups(mapData5), moveLeaveButton(), addQuickInvite(mapData5), addSidebarToggle();
}), hideGoalsTab = () => {
removeArToggle();
};
}
});
var addSubTabListeners, isRunning, maybeShowInvitesTab, onInvitesTab, init_tab_invites = __esm({
"src/modules/better-maps/modules/tab-invites.js"() {
init_utils2();
addSubTabListeners = () => {
let inviteTabs = document.querySelectorAll(".treasureMapRootView-tabRow .treasureMapRootView-tab");
inviteTabs.length !== 0 && inviteTabs.forEach((tab) => {
tab.removeEventListener("click", maybeShowInvitesTab), tab.addEventListener("click", maybeShowInvitesTab);
});
}, isRunning = !1, maybeShowInvitesTab = () => __async(void 0, null, function* () {
isRunning || (isRunning = !0, yield waitForElement(".treasureMapInvitesView .treasureMapView-title"), addSubTabListeners(), isRunning = !1, onInvitesTab());
}), onInvitesTab = () => {
let title = document.querySelector(".treasureMapInvitesView .treasureMapView-title");
if (!title || title.querySelector(".mh-ui-invite-refresh-button"))
return;
let refreshButton = makeElement("a", "mh-ui-invite-refresh-button");
refreshButton.title = "Refresh", refreshButton.href = "#", refreshButton.addEventListener("click", (e) => {
refreshButton.classList.add("loading"), e.preventDefault(), hg.utils.TreasureMapUtil.getInvites(() => {
let inviteTab = document.querySelector('.treasureMapRootView-tabRow .treasureMapRootView-tab[data-type="show_invites"]');
inviteTab && inviteTab.click(), refreshButton.classList.remove("loading"), maybeShowInvitesTab();
}, () => {
refreshButton.classList.remove("loading"), maybeShowInvitesTab();
});
}), title.append(refreshButton);
};
}
});
var makeUserTableLoading, makeUserTable, getInvitedHunterData, getUserData2, removeEmptyHunterSlotsFromList, getLeftHunters, modifyButtons, fixPluralInvites, showHuntersTab, init_tab_hunters = __esm({
"src/modules/better-maps/modules/tab-hunters.js"() {
init_utils2();
makeUserTableLoading = (id, title, appendTo) => {
let wrapper = makeElement("div", "treasureMapView-block-title", title);
wrapper.id = `hunters-loading-${id}-title`, appendTo.append(wrapper);
let loading = makeElement("div", "treasureMapView-block");
loading.id = `hunters-loading-${id}-block`;
let loadingWrapper = makeElement("div", "treasureMapView-allyTable", ""), row = makeElement("div", "treasureMapView-allyRow", "");
makeElement("div", ["mousehuntPage-loading", "active"], "", row), loadingWrapper.append(row), loading.append(loadingWrapper), appendTo.append(loading);
}, makeUserTable = (hunters, id, title, appendTo) => __async(void 0, null, function* () {
let loadingTitle = document.querySelector(`#hunters-loading-${id}-title`), loadingBlock = document.querySelector(`#hunters-loading-${id}-block`);
if (loadingTitle && loadingTitle.remove(), loadingBlock && loadingBlock.remove(), document.querySelector(`#hunters-${id}`))
return;
let wrapper = makeElement("div", ["mh-ui-custom-map-block", "treasureMapView-block-title"], title.replace("#count#", hunters.length));
wrapper.id = `hunters-${id}`, appendTo.append(wrapper);
let block = makeElement("div", "treasureMapView-block");
block.id = `hunters-${id}-block`;
let blockContent = makeElement("div", "treasureMapView-block-content"), table = makeElement("div", "treasureMapView-allyTable");
hunters.forEach((hunter) => {
let actions = `<a href="supplytransfer.php?fid=${hunter.sn_user_id}"class="mousehuntActionButton tiny lightBlue"><span>Send<br>Supplies</span></a>`;
if (id === "requests") {
let declineAction = `<a class="treasureMapDialogView-deleteInviteRequest reject-invite-request mh-mapper-invite-request-action" data-snuid="${hunter.sn_user_id}" data-snuid="100000830940163">X</a>`, acceptAction = `<a href="#" class="treasureMapDialogView-continueButton mousehuntActionButton accept-invite-request mh-mapper-invite-request-action" data-snuid="${hunter.sn_user_id}"><span>Accept</span></a>`;
actions = `${declineAction}${acceptAction}`;
}
let markup = `<div class="treasureMapView-allyCell favourite"></div>
<div class="treasureMapView-allyCell image" data-snuid="${hunter.sn_user_id}">
<div class="treasureMapView-hunter" data-snuid="${hunter.sn_user_id}">
<div class="treasureMapView-hunter-image-wrapper">
<img src="${hunter.profile_pic}" class="treasureMapView-hunter-image">
</div>
</div>
</div>
<div class="treasureMapView-allyCell name">
<div class="treasureMapView-ally-name">
<a href="https://www.mousehuntgame.com/profile.php?snuid=${hunter.sn_user_id}">${hunter.name}</a>
</div>
<a href="#" class="treasureMapView-ally-environment treasureMapView-travelButton" data-environment-id="${hunter.environment_id}">
${hunter.environment_name}
</a>
</div>
<div class="treasureMapView-allyCell lastActive">
<div class="treasureMapView-ally-lastActive ${hunter.is_online ? "online" : ""}">
${hunter.last_active_formatted}
</div>
</div>
<div class="treasureMapView-allyCell trap">
<div class="treasureMapView-componentContainer">
<div class="treasureMapView-componentThumb" style="background-image: url(${hunter.base_thumb});" title="${hunter.base_name}"></div>
<div class="treasureMapView-componentThumb" style="background-image: url(${hunter.weapon_thumb});" title="${hunter.weapon_name}"></div>
<div class="treasureMapView-componentThumb" style="background-image: url(${hunter.bait_thumb});" title="${hunter.bait_name}"></div>
<div class="treasureMapView-componentThumb" style="background-image: url(${hunter.trinket_thumb});" title="${hunter.trinket_name}"></div>
</div>
</div>
<div class="treasureMapView-allyCell actions">${actions}</div>`;
makeElement("div", "treasureMapView-allyRow", markup, table);
}), block.append(table), blockContent.append(block), appendTo.append(block), id === "requests" && document.querySelectorAll(".mh-mapper-invite-request-action").forEach((button) => {
button.addEventListener("click", () => {
let snuid = Number.parseInt(button.dataset.snuid, 10);
button.classList.contains("accept-invite-request") ? hg.utils.TreasureMapUtil.acceptInviteRequests(mapper("mapData").map_id, [snuid], () => {
}, () => {
}) : hg.utils.TreasureMapUtil.declineInviteRequests(mapper("mapData").map_id, [snuid], () => {
}, () => {
});
});
});
}), getInvitedHunterData = (invited) => __async(void 0, null, function* () {
if (invited.length === 0)
return [];
if (invited.length <= 12)
return yield getUserData2(invited);
let batches = [];
for (let i = 0; i < invited.length; i += 12)
batches.push(invited.slice(i, i + 12));
let hunters = [];
for (let batch_ of batches) {
let batch = yield getUserData2(batch_);
hunters.push(...batch);
}
return hunters;
}), getUserData2 = (userId) => __async(void 0, null, function* () {
return new Promise((resolve) => {
hg.utils.User.getUserData(
userId,
[
"bait_name",
"bait_thumb",
"base_name",
"base_thumb",
"environment_id",
"environment_name",
"is_online",
"last_active_formatted",
"trinket_name",
"trinket_thumb",
"weapon_name",
"weapon_thumb"
],
(resp) => {
resolve(resp);
}
);
});
}), removeEmptyHunterSlotsFromList = () => __async(void 0, null, function* () {
let emptySlots = document.querySelectorAll(".treasureMapView-allyCell.name");
if (emptySlots.length) {
let shouldRemove = !1;
emptySlots.forEach((slot) => {
(slot.textContent === "The map owner can invite more hunters." || slot.textContent === "Click to invite a friend.") && (shouldRemove && shouldRemove.parentNode.remove(), slot.parentNode.classList.add("hunters-last-slot"), shouldRemove = slot);
});
}
}), getLeftHunters = (mapData5) => {
let huntersLeft = [];
return mapData5.hunters.forEach((hunter) => {
hunter.is_active || huntersLeft.push(hunter);
}), huntersLeft;
}, modifyButtons = () => {
[
{
selector: ".mh-ui-find-hunters-block .treasureMapAlliesView-showInviteButton",
text: "Invite Friends"
},
{
selector: ".mh-ui-find-hunters-block .treasureMapAlliesView-showInviteTeamButton",
text: "Invite Team"
},
{
selector: ".mh-ui-map-settings-block .treasureMapView-inviteModeButton",
text: "Change Settings"
},
{
selector: ".mh-ui-share-block .treasureMapView-copyShareLinkButton",
text: "Copy"
}
].forEach((button) => {
let el = document.querySelector(button.selector);
if (el) {
el.classList.add("tiny");
let text = el.querySelector("span");
text && (text.textContent = button.text);
}
});
}, fixPluralInvites = () => {
let invitesEl = document.querySelector(".treasureMapView-numInvitesSent");
invitesEl && invitesEl.textContent === "1 invites sent." && (invitesEl.innerHTML = invitesEl.innerHTML.replace("invites", "invite"));
}, showHuntersTab = (mapData5) => __async(void 0, null, function* () {
var _a;
modifyButtons(), removeEmptyHunterSlotsFromList(), fixPluralInvites();
let leftBlock = document.querySelector(".treasureMapView-leftBlock");
if (!leftBlock)
return;
let huntersLeft = getLeftHunters(mapData5);
if (huntersLeft.length && makeUserTable(huntersLeft, "left", `Hunters that have left map (${huntersLeft.length || 0})`, leftBlock), mapData5.invited_hunters.length) {
makeUserTableLoading("invited", `Invited hunters (${mapData5.invited_hunters.length || 0})`, leftBlock);
let invitedData = yield getInvitedHunterData(mapData5.invited_hunters);
makeUserTable(invitedData, "invited", "Invited hunters (#count#)", leftBlock);
}
if (((_a = mapData5.invite_requests) == null ? void 0 : _a.length) > 0) {
makeUserTableLoading("requests", `Invite Requests (${mapData5.invite_requests.length || 0})`, leftBlock);
let requestData = yield getInvitedHunterData(mapData5.invite_requests);
makeUserTable(requestData, "requests", "Invite Requests (#count)", leftBlock);
}
});
}
});
var getMapData2, updateListing, debug2, community_default, init_community = __esm({
"src/modules/better-maps/modules/community.js"() {
init_utils2();
getMapData2 = (mapId, forceUpdate = !1) => __async(void 0, null, function* () {
return new Promise((resolve) => {
hg.utils.TreasureMapUtil.getMapInfo(mapId, (resp) => {
resolve(resp);
}, () => {
resolve([]);
}, forceUpdate);
});
}), updateListing = (mapId) => __async(void 0, null, function* () {
let mapData5, mapEl = document.querySelector(`.treasureMapListingsTableView-row[data-map-id="${mapId}"]`);
if (!mapEl)
return;
mapEl.classList.add("mh-improved-map-listing-highlight"), yield sleep(500);
let mapsData = yield getData("community-map-data"), oldIds = /* @__PURE__ */ new Set();
if (mapsData && mapsData.old && (oldIds = new Set(mapsData.old)), oldIds.has(mapId)) {
mapEl.remove();
return;
}
if (mapEl.innerText.includes("Loading")) {
let observer = new MutationObserver(() => __async(void 0, null, function* () {
if (mapEl.innerText.includes("Loading")) {
yield sleep(500);
return;
}
observer.disconnect(), yield updateListing(mapId);
}));
observer.observe(mapEl, {
childList: !0,
subtree: !0
});
return;
}
let cachedData = yield dbGet("cache", `map-listing-cache-${mapId}`);
if (cachedData)
mapData5 = cachedData.data.mapData;
else {
if (mapData5 = yield getMapData2(mapId), yield sleep(500), !mapData5 || !mapData5.treasure_map || !mapData5.treasure_map.hunters)
return;
mapData5 = mapData5.treasure_map, dbSet("cache", {
id: `map-listing-cache-${mapId}`,
mapData: mapData5
});
}
let captain = mapData5.hunters.find((hunter) => hunter.captain === !0);
if (!captain)
return;
let lastActive = captain == null ? void 0 : captain.last_active_formatted, captainEl = mapEl.querySelector(".treasureMapListingsTableView-owner");
if (captainEl) {
let lastActiveWrapper = makeElement("div", ["mh-improved-map-listing-last-active-wrapper", "treasureMapView-ally-lastActive"]);
captain.is_online && lastActiveWrapper.classList.add("online"), makeElement("div", "mh-improved-map-listing-last-active", captain.last_active_formatted, lastActiveWrapper), captainEl.append(lastActiveWrapper);
}
if (lastActive.includes("week") || lastActive.includes("month") || lastActive.includes("year")) {
mapEl.remove();
return;
}
(mapData5.max_hunters - 1 === mapData5.hunters.length || mapData5.invite_requests.length > 15) && mapEl.classList.add("mh-improved-map-listing-full"), mapEl.classList.remove("mh-improved-map-listing-highlight");
}), debug2 = (response, data) => __async(void 0, null, function* () {
if (data.action !== "get_listings" || !response.treasure_map_listings)
return;
let listingMapIds = response.treasure_map_listings.map((listing) => listing == null ? void 0 : listing.map_id), hideMhct = addStyles("#mhhh_flash_message_div { display: none !important; }", "hide-mhct");
for (let mapId of listingMapIds)
yield updateListing(mapId);
hideMhct.remove();
}), community_default = () => {
onRequest("users/treasuremap.php", debug2);
};
}
});
var getCompletedGoals, refreshMap, init_utils4 = __esm({
"src/modules/better-maps/utils.js"() {
init_utils2();
getCompletedGoals = (mapData5) => {
var _a, _b, _c, _d;
let goals = mapData5 != null && mapData5.is_scavenger_hunt ? (_a = mapData5 == null ? void 0 : mapData5.goals) == null ? void 0 : _a.item : (_b = mapData5 == null ? void 0 : mapData5.goals) == null ? void 0 : _b.mouse;
if (!goals)
return [];
let completedGoals = [], hunters = (mapData5 == null ? void 0 : mapData5.hunters) || [];
for (let hunter of hunters) {
let completed = mapData5 != null && mapData5.is_scavenger_hunt ? (_c = hunter == null ? void 0 : hunter.completed_goal_ids) == null ? void 0 : _c.item : (_d = hunter == null ? void 0 : hunter.completed_goal_ids) == null ? void 0 : _d.mouse;
completed && completedGoals.push(...completed);
}
return goals = goals.filter((goal) => !completedGoals.includes(goal.unique_id)).sort((a, b) => a.name.localeCompare(b.name)), {
type: mapData5.is_scavenger_hunt ? "item" : "mouse",
goals
};
}, refreshMap = () => __async(void 0, null, function* () {
var _a, _b;
let mapId = ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRelicHunter) == null ? void 0 : _b.default_map_id) || !1;
if (!mapId)
return !1;
let newMapData;
try {
newMapData = yield doRequest("managers/ajax/users/treasuremap.php", {
action: "map_info",
map_id: mapId
});
} catch (error) {
return console.error("Error refreshing map:", error), !1;
}
if (!(newMapData && (newMapData != null && newMapData.treasure_map)))
return !1;
setMapData(mapId, newMapData.treasure_map);
let currentMapData = sessionGet(`mh-improved-map-cache-${mapId}`);
if (currentMapData && newMapData && newMapData.treasure_map) {
let currentGoals = getCompletedGoals(currentMapData), newGoals = getCompletedGoals(newMapData.treasure_map);
currentGoals.length !== newGoals.length && doEvent2("mh-improved-map-refreshed");
} else
doEvent2("mh-improved-map-refreshed");
return mapData = newMapData.treasure_map, newMapData;
});
}
});
var toHighlight, getSkyMapMice, highlightSkyMap, main7, mapData3, mapGoals, floating_islands_default2, init_floating_islands2 = __esm({
"src/modules/better-maps/modules/floating-islands.js"() {
init_utils2();
init_utils4();
toHighlight = /* @__PURE__ */ new Set([
"arcane_paragon",
"draconic_paragon",
"forgotten_paragon",
"hydro_paragon",
"law_paragon",
"physical_paragon",
"shadow_paragon",
"tactical_paragon",
"draconic_paragon",
"fog_warden",
"frost_warden",
"rain_warden",
"wind_warden"
]), getSkyMapMice = () => {
var _a, _b;
let goals = ((_a = mapData3 == null ? void 0 : mapData3.goals) == null ? void 0 : _a.mouse) || [], completedGoals = [], hunters = (mapData3 == null ? void 0 : mapData3.hunters) || [];
for (let hunter of hunters) {
let hunterCompleted = (_b = hunter == null ? void 0 : hunter.completed_goal_ids) == null ? void 0 : _b.mouse;
hunterCompleted && completedGoals.push(...hunterCompleted);
}
return goals.filter((goal) => !completedGoals.includes(goal.unique_id) && toHighlight.has(goal.type));
}, highlightSkyMap = () => __async(void 0, null, function* () {
if (yield waitForElement("floatingIslandsAdventureBoardSkyMap", { maxAttempts: 100, delay: 100 }), !mapGoals) {
main7();
return;
}
if (!mapGoals.some((goal) => goal.type.endsWith("paragon")))
return;
let edge = [...document.querySelectorAll(".floatingIslandsAdventureBoardSkyMap-powerTypes .floatingIslandsHUD-powerType")], grid = [...document.querySelectorAll(".floatingIslandsAdventureBoardSkyMap-islandModContainer .floatingIslandsAdventureBoardSkyMap-islandMod")];
if (!grid.some((tile) => !!(tile.classList.contains("paragon_cache_a") || tile.classList.contains("paragon_cache_b") || tile.classList.contains("paragon_cache_c") || tile.classList.contains("paragon_cache_d"))))
return;
let mapByPowerType = {
arcane: {
edge: edge[0],
tiles: [grid[0], grid[1], grid[2], grid[3]]
},
forgotten: {
edge: edge[1],
tiles: [grid[4], grid[5], grid[6], grid[7]]
},
hydro: {
edge: edge[2],
tiles: [grid[8], grid[9], grid[10], grid[11]]
},
shadow: {
edge: edge[3],
tiles: [grid[12], grid[13], grid[14], grid[15]]
},
draconic: {
edge: edge[4],
tiles: [grid[0], grid[4], grid[8], grid[12]]
},
law: {
edge: edge[5],
tiles: [grid[1], grid[5], grid[9], grid[13]]
},
physical: {
edge: edge[6],
tiles: [grid[2], grid[6], grid[10], grid[14]]
},
tactical: {
edge: edge[7],
tiles: [grid[3], grid[7], grid[11], grid[15]]
}
};
edge.forEach((tile) => {
tile.classList.remove("highlight-for-map"), tile.classList.remove("extra-highlight-for-map"), tile.classList.add("lowlight-for-map");
}), grid.forEach((tile) => {
tile.classList.remove("highlight-for-map"), tile.classList.remove("extra-highlight-for-map"), tile.classList.add("lowlight-for-map");
});
let shouldHighlightRowExtra = !1;
mapGoals.forEach((mouse) => {
shouldHighlightRowExtra = !1;
let powerType = mouse.type.replaceAll("_paragon", "");
if (powerType && mapByPowerType[powerType]) {
if (!mapByPowerType[powerType].edge)
return;
mapByPowerType[powerType].edge.classList.add("highlight-for-map"), mapByPowerType[powerType].edge.classList.remove("lowlight-for-map"), mapByPowerType[powerType].tiles.forEach((tile, index) => {
tile.classList.remove("lowlight-for-map"), tile.classList.add("highlight-for-map");
let mod = tile.querySelector(".floatingIslandsHUD-mod");
index === 0 && mod && (mod.classList.contains("paragon_cache_a") || mod.classList.contains("paragon_cache_b") || mod.classList.contains("paragon_cache_c") || mod.classList.contains("paragon_cache_d")) && (shouldHighlightRowExtra = !0), shouldHighlightRowExtra && (mapByPowerType[powerType].edge.classList.add("extra-highlight-for-map"), tile.classList.add("extra-highlight-for-map"));
});
}
});
}), main7 = () => __async(void 0, null, function* () {
var _a, _b, _c, _d, _e;
if (debuglog("highlighting"), getCurrentLocation2() !== "floating_islands" || ((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) == null ? void 0 : _b.hunting_site_atts) == null ? void 0 : _c.island_type) !== "launch_pad_island")
return;
let mapId = ((_e = (_d = user == null ? void 0 : user.quests) == null ? void 0 : _d.QuestRelicHunter) == null ? void 0 : _e.default_map_id) || !1;
mapId && (mapData3 = sessionGet(`mh-improved-map-cache-${mapId}`), mapData3 || (yield refreshMap()), !(mapData3 != null && mapData3.is_scavenger_hunt) && (mapGoals = getSkyMapMice(), highlightSkyMap()));
}), floating_islands_default2 = () => {
onEvent("dialog-show-default-floatingislandsadventureboard-floatingislandsdialog-wide-skymap", main7), onRequest("environment/floating_islands.php", (resp, req) => {
(req == null ? void 0 : req.action) === "reroll_sky_map" && highlightSkyMap();
});
};
}
});
var updateScrollContent, maybeLockAndHide, updateScrollsMarkup, updateFromClick, updateSubTabListeners, updateFromRequest, scrolls_default, init_scrolls = __esm({
"src/modules/better-maps/modules/scrolls.js"() {
init_utils2();
updateScrollContent = (scroll) => {
let content = scroll.querySelector(".treasureMapInventoryView-scrollCase-content");
if (!content)
return;
let matches = content.innerHTML.match(/<b>• (.*?)<\/b>/g);
if (matches && matches.length > 1) {
let replacements2 = matches.map((match) => match.replaceAll(/<b>• (.*?)<\/b>/g, "$1")), last = replacements2.pop();
replacements2 = replacements2.map((replacement, index) => index < replacements2.length - 1 ? replacement + "," : replacement + ", and"), replacements2.push(last);
let replacementIndex = 0;
content.innerHTML = content.innerHTML.replaceAll(/<b>• (.*?)<\/b>/g, () => replacements2[replacementIndex++]);
}
let auras = [], aurasEl = content.querySelectorAll(".treasureMapInventoryView-scrollCase-aura");
aurasEl.length && (auras = [...aurasEl]);
let textDiv = makeElement("div", "scroll-text"), aurasDiv = makeElement("div", "scroll-auras");
[...content.childNodes].forEach((node) => {
node.nodeType === Node.TEXT_NODE || node.tagName === "B" || node.tagName === "BR" ? textDiv.append(node) : auras.includes(node) && aurasDiv.append(node);
}), content.append(textDiv), content.append(aurasDiv), aurasEl.length && aurasEl.forEach((aura) => {
let title = aura.querySelector("b");
title && (title.textContent = title.textContent.replace("Opening this map's reward will give hunters ", "This map's reward gives you ")), aura.innerHTML = aura.innerHTML.replace("This special Trap Aura", "This ").replace("with the chance at the following additional loot:", "with the chance of ").replace("- Chrome Theme Scrap II", "Chrome Theme Scrap II").replace("- Chrome Charms", " and Chrome Charms.");
});
}, maybeLockAndHide = (scroll, action, scrollType) => {
var _a, _b;
let lockAndHide = getSetting("inventory-lock-and-hide.items", {});
lockAndHide = __spreadValues({
locked: [],
hidden: [],
lockedTypes: [],
hiddenTypes: []
}, lockAndHide);
let locked = (_a = lockAndHide == null ? void 0 : lockAndHide.lockedTypes) == null ? void 0 : _a.includes(scrollType), hidden = (_b = lockAndHide == null ? void 0 : lockAndHide.hiddenTypes) == null ? void 0 : _b.includes(scrollType);
if (locked) {
scroll.classList.add("locked"), action.classList.add("disabled");
let actionButton = action.querySelector(".mousehuntActionButton");
actionButton && actionButton.classList.add("disabled");
}
hidden && scroll.classList.add("hidden");
}, updateScrollsMarkup = () => {
let scrolls = document.querySelectorAll(".treasureMapInventoryView-scrollCase");
scrolls.length && scrolls.forEach((scroll) => {
let action = scroll.querySelector(".treasureMapInventoryView-scrollCase-action");
if (!action)
return;
let button = action.querySelector(".mousehuntActionButton");
if (button) {
let scrollType = button.getAttribute("data-item-type");
scrollType && maybeLockAndHide(scroll, action, scrollType);
}
updateScrollContent(scroll);
});
}, updateFromClick = () => __async(void 0, null, function* () {
let _showInventory2 = hg.controllers.TreasureMapController.showInventory;
hg.controllers.TreasureMapController.showInventory = (data) => {
_showInventory2(data), updateSubTabListeners(), updateScrollsMarkup();
};
}), updateSubTabListeners = () => __async(void 0, null, function* () {
yield waitForElement(".treasureMapRootView-subTabContainer .treasureMapRootView-subTab");
let subtabs = document.querySelectorAll(".treasureMapRootView-subTabContainer .treasureMapRootView-subTab");
subtabs.forEach((subtab) => {
subtab.addEventListener("click", () => {
setTimeout(() => {
subtabs.forEach((st) => {
st.classList.remove("active");
}), subtab.classList.add("active");
}, 100);
});
});
}), updateFromRequest = (response, data) => {
(data == null ? void 0 : data.action) === "get_inventory" && updateScrollsMarkup();
}, scrolls_default = () => __async(void 0, null, function* () {
updateFromClick(), onRequest("users/treasuremap.php", updateFromRequest);
});
}
});
var updateShopsMarkup, updateFromClick2, updateFromRequest2, shops_default2, init_shops2 = __esm({
"src/modules/better-maps/modules/shops.js"() {
init_utils2();
updateShopsMarkup = () => __async(void 0, null, function* () {
let shopsNodeList = document.querySelectorAll(".treasureMapShopsView-shopItems .treasureMapPopup-shop");
if (!shopsNodeList.length)
return;
let shops = [...shopsNodeList];
shops.sort((a, b) => {
let aName = a.querySelector(".treasureMapPopup-shop-environment").textContent.trim().toLowerCase(), bName = b.querySelector(".treasureMapPopup-shop-environment").textContent.trim().toLowerCase();
return aName.localeCompare(bName);
});
let currentLocation = getCurrentLocation2();
shops = shops.sort((shop) => (shop.querySelector(".treasureMapPopup-shop-environment").getAttribute("data-environment-type") || "") === currentLocation ? -1 : 0);
let shopContainer = document.querySelector(".treasureMapShopsView-shopItems");
for (; shopContainer.firstChild; )
shopContainer.firstChild.remove();
shops.forEach((shop) => {
shopContainer.append(shop);
let environmentEl = shop.querySelector(".treasureMapPopup-shop-environment");
if (!environmentEl)
return;
let heading = environmentEl.querySelector(".treasureMapView-block-content-heading");
if (!heading)
return;
let container = environmentEl.querySelector(".treasureMapPopup-shop-environmentItems");
if (!container)
return;
environmentEl.classList.contains("active") || container.classList.add("hidden"), heading.addEventListener("click", () => {
container.classList.toggle("hidden");
});
let scrolls = container.querySelectorAll(".treasureMapInventoryView-scrollCase");
scrolls.length && scrolls.forEach((scroll) => {
let action = scroll.querySelector(".treasureMapInventoryView-scrollCase-action");
if (!action)
return;
let button = action.querySelector(".mousehuntActionButton");
if (!button)
return;
let mapType = button.getAttribute("data-item-type");
mapType && debug("mapType", mapType);
});
});
}), updateFromClick2 = () => __async(void 0, null, function* () {
let _showShops = hg.controllers.TreasureMapController.showShops;
hg.controllers.TreasureMapController.showShops = (data) => {
_showShops(data), updateShopsMarkup();
};
}), updateFromRequest2 = (response, data) => {
(data == null ? void 0 : data.action) === "get_shops" && updateShopsMarkup();
}, shops_default2 = () => __async(void 0, null, function* () {
updateFromClick2(), onRequest("users/treasuremap.php", updateFromRequest2);
});
}
});
var transformName, doingAddMapToSidebar, addMapToSidebar, refreshSidebar, shouldRefresh, timeoutFive, timeoutTen, refreshSidebarAfterTurn, mapData4, miceThumbs2, itemThumbs, sidebar_default4, init_sidebar4 = __esm({
"src/modules/better-maps/modules/sidebar.js"() {
init_utils2();
init_utils4();
transformName = (name) => {
if (!name)
return "";
name = name.replaceAll("Treasure Map", "").replaceAll("Rare M1000 Team Research Expedition", "Rare M1K Team Research");
let subtitle = "";
if (name.includes("Toxic Spill")) {
let rankMatch = name.match(/\(([^)]+)\)/);
rankMatch && (subtitle = `(${rankMatch[1]})`, name = name.replace(` ${rankMatch[0]}`, ""));
}
name.includes("Wanted Poster") && (name = name.replace("Wanted Poster", ""), subtitle = "Wanted Poster");
let prefixIcons = {
Halloween: "\u{1F383}",
Birthday: "\u{1F382}",
Rainbow: "\u{1F308}"
}, prefix = Object.keys(prefixIcons).find((key) => name.includes(key)) || "";
return prefix && (prefix = `${prefixIcons[prefix]} `), `${prefix}${subtitle ? `<span>${name}</span><span class="mh-improved-map-sidebar-subtitle">${subtitle}</span>` : name}`;
}, doingAddMapToSidebar = !1, addMapToSidebar = () => __async(void 0, null, function* () {
var _a, _b;
let sidebar = document.querySelector(".pageSidebarView .pageSidebarView-block");
if (!sidebar)
return;
let mapId = ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRelicHunter) == null ? void 0 : _b.default_map_id) || !1;
if (!mapId || doingAddMapToSidebar)
return;
mapData4 = sessionGet(`mh-improved-map-cache-${mapId}`), mapData4 || (doingAddMapToSidebar = !0, yield refreshMap(), doingAddMapToSidebar = !1);
let mapSidebar = makeElement("div", "mh-improved-map-sidebar"), title = makeElement("h3", ["mh-improved-map-sidebar-title", mapData4 == null ? void 0 : mapData4.map_class], transformName(mapData4 == null ? void 0 : mapData4.name));
title.addEventListener("click", () => __async(void 0, null, function* () {
mapSidebar.classList.remove("loading"), mapSidebar.classList.add("loading"), yield refreshMap(), yield addMapToSidebar(), mapSidebar.classList.remove("loading");
})), mapSidebar.append(title);
let mapGoals2 = getCompletedGoals(mapData4), goals = mapGoals2.goals;
if (mapSidebar.classList.add(`mh-improved-map-sidebar-${mapGoals2.type}`), !goals || !goals.length) {
mapSidebar.remove();
return;
}
let goalsEl = makeElement("div", "mh-improved-map-sidebar-goals");
for (let goal of goals) {
let goalEl = makeElement("div", "mh-improved-map-sidebar-goal"), goalImage = makeElement("div", "mh-improved-map-sidebar-goal-image"), thumbnail = mapData4.is_scavenger_hunt ? itemThumbs.find((thumb) => thumb.type === goal.type) : miceThumbs2.find((thumb) => thumb.type === goal.type);
goalImage.style.backgroundImage = thumbnail ? `url(${thumbnail.thumb})` : `url(${goal.large})`, goalEl.append(goalImage), makeElement("div", "mh-improved-map-sidebar-goal-name", goal.name, goalEl), ((goal == null ? void 0 : goal.environment_ids) || []).includes(user == null ? void 0 : user.environment_id) && goalEl.classList.add("mh-improved-map-sidebar-goal-active"), goalEl.addEventListener("click", () => {
mapData4.is_scavenger_hunt ? hg.views.ItemView.show(goal.type) : hg.views.MouseView.show(goal.type);
}), goalsEl.append(goalEl);
}
mapSidebar.append(goalsEl);
let existing = document.querySelector(".mh-improved-map-sidebar");
existing ? existing.replaceWith(mapSidebar) : sidebar.append(mapSidebar);
}), refreshSidebar = () => __async(void 0, null, function* () {
if (!(yield refreshMap())) {
shouldRefresh = !1;
return;
}
addMapToSidebar();
}), shouldRefresh = !0, refreshSidebarAfterTurn = () => {
clearTimeout(timeoutFive), clearTimeout(timeoutTen), shouldRefresh && (timeoutFive = setTimeout(refreshSidebar, 5 * 60 * 1e3), timeoutTen = setTimeout(refreshSidebar, 10 * 60 * 1e3));
}, sidebar_default4 = () => __async(void 0, null, function* () {
miceThumbs2 = yield getData("mice-thumbnails"), itemThumbs = yield getData("item-thumbnails"), addMapToSidebar(), onTravel(null, { callback: addMapToSidebar }), onEvent("mh-improved-map-refreshed", addMapToSidebar), onTurn(() => {
refreshSidebar(), refreshSidebarAfterTurn();
}, 1e3), onRequest("users/treasuremap.php", (data, request) => {
request.action === "toggle_favourite_task" && refreshSidebar();
});
});
}
});
var map_ar_default, init_map_ar = __esm({
"src/modules/better-maps/styles/map-ar.css"() {
map_ar_default = `.treasureMapView.treasure .treasureMapView-goals-group-goal[data-mh-ui-ar=true] .treasureMapView-goals-group-goal-name,.treasureMapView.event .treasureMapView-goals-group-goal[data-mh-ui-ar=true] .treasureMapView-goals-group-goal-name{position:relative;display:flex;flex-direction:column;gap:3px;align-items:flex-start;justify-content:center}.mh-ui-ar{padding:3px;font-size:10px;color:#000;border:1px solid #000;border-radius:4px}.poster .mh-ui-ar{position:absolute;right:0;bottom:-7px;font-family:lucida grande,tahoma,verdana,arial,sans-serif;font-size:10px;text-shadow:none}.mh-ui-ar-hidden .mh-ui-ar{display:none}.complete .mh-ui-ar{background-color:#e5e5e5}.mh-ui-ar-guaranteed{background-color:#0ef;border-color:#638f92}.mh-ui-ar-super-easy{background-color:#8ffaab;border-color:#427b51}.mh-ui-ar-easy{background-color:#b9ff9e;border-color:#8fb17a}.mh-ui-ar-medium{background-color:#ffdab9;border-color:#b78c62}.mh-ui-ar-hard{background-color:#ffc440;border-color:#c59c40}.mh-ui-ar-kinda-hard{background-color:#fe964d;border-color:#c57a40}.mh-ui-ar-super-hard{background-color:#ff9e9e;border-color:#c55a5a}.mh-ui-ar-extreme{color:#fff;background-color:#ed6464;border-color:#a64a4a}.mh-ui-ar-impossible{color:#fff;background-color:#c92222;border-color:#5a2121}.mh-ui-toggle-ar-button,.mh-ui-ar-failed{margin-left:10px}.treasure .treasureMapView-goals-group-goal[data-mh-ui-ar=true].item .treasureMapView-goals-group-goal-name,.event .treasureMapView-goals-group-goal[data-mh-ui-ar=true].item .treasureMapView-goals-group-goal-name{align-items:center}
`;
}
});
var sorted_default, init_sorted = __esm({
"src/modules/better-maps/styles/sorted.css"() {
sorted_default = `#sorted-mice-container{margin:20px 5px}#sorted-mice-container .mouse-category-container{display:grid;grid-template-columns:1fr 1fr 1fr;grid-gap:10px;place-items:stretch stretch;margin-bottom:25px}#sorted-mice-container .mouse-category-wrapper{position:relative;color:#000;background-color:#e6e6e6;border:1px solid rgb(5 5 5 / 50%);box-shadow:0 2px 1px -1px #909090}#sorted-mice-container .mouse-category-header{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:6px 10px;margin-bottom:3px;color:#000;background-color:#ffffffa6;border-bottom:1px solid rgb(5 5 5)}#sorted-mice-container .mouse-category-icon{width:30px;height:30px;margin-right:10px;opacity:.9}#sorted-mice-container .mouse-category-icon-title-wrapper{display:flex;align-items:center}#sorted-mice-container .mouse-category-title{font-size:14px}#sorted-mice-container .mouse-category-subtitle{margin-top:2px;font-size:11px;font-style:italic}#sorted-mice-container .mouse-category-mice{padding:4px}#sorted-mice-container .mouse-container{padding-right:5px;margin-bottom:5px;cursor:pointer;border-radius:4px}#sorted-mice-container .mouse-data{position:relative;display:flex;align-items:center}#sorted-mice-container .mouse-name{flex:1}#sorted-mice-container .mouse-extra-info{display:none}#sorted-mice-container .mouse-container-selected,#sorted-mice-container .mouse-container:hover,#sorted-mice-container .mouse-container:focus{background:#ffffff7f;outline:1px solid rgb(25 25 25 / 35%)}#sorted-mice-container .mouse-container-selected .mouse-mhct-extra-info-wrapper{position:fixed;z-index:10;display:block;width:350px;background-color:#eaeaea;border:1px solid #666;border-radius:3px;box-shadow:0 10px 15px #0000007f;transform:translate(-75px)}#sorted-mice-container .mouse-subcategory-mice .mouse-container-selected .mouse-mhct-extra-info-wrapper{right:-15px;left:-15px}#sorted-mice-container .mouse-container-selected .mouse-extra-info{display:block}#sorted-mice-container .mouse-image{width:auto;height:35px;margin:5px;border-radius:3px;outline:1px solid rgb(0 0 0 / 25%)}#sorted-mice-container .scavenger-sorted-page .mouse-image{outline:none}.mh-dark-mode #sorted-mice-container .mouse-image{border-radius:3px}#sorted-mice-container .mouse-category-wrapper-hidden{display:none}#sorted-mice-container .mouse-subcategory-wrapper{margin:3px;background-color:#fff9;border:1px solid rgb(0 0 0 / 60%)}#sorted-mice-container .mouse-subcategory-header{position:relative;padding:8px;margin-bottom:3px;font-size:11px;border-bottom:1px solid #999}#sorted-mice-container .mouse-subcategory-mice{padding:0 5px}#sorted-mice-container .mouse-locations{display:flex;flex-direction:column}#sorted-mice-container .mouse-location{display:inline-block;margin-bottom:5px}#sorted-mice-container .mhct{margin-top:15px}#sorted-mice-container .location-text-wrapper{padding-top:10px;padding-bottom:5px;margin-bottom:5px;text-align:center;border-bottom:1px solid #ccc}#sorted-mice-container .mouse-weakness{display:flex;align-items:center;justify-content:center;margin-top:10px}#sorted-mice-container .weakness-type{display:flex;flex-wrap:wrap;align-items:center;justify-content:center}#sorted-mice-container .power-types img{width:15px;height:15px;margin:1px}#sorted-mice-container .weakness-name{flex:0 0 100%;margin-right:2px;margin-bottom:2px;font-size:10px;text-align:center}#sorted-mice-container .mouse-locations-wrapper{display:flex}.mouse-category-wrapper.mouse-category-current-floor .mouse-category-header:after{position:absolute;top:-4px;right:2px;z-index:1;width:25px;height:25px;margin:0;content:"";background-color:#fff;background-image:url(https://www.mousehuntgame.com//images/ui/friends/anonymous_user.png);background-size:cover;border-radius:50%}.mouse-category-wrapper.mouse-category-current-floor .mouse-category-header:before{position:absolute;top:-8px;right:-4px;width:37px;height:48px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/hud/bountiful_beanstalk/player.png);filter:hue-rotate(275deg);background-repeat:no-repeat;background-position:center;background-position-y:0;background-size:100%}#sorted-mice-container .mouse-subcategory-wrapper .mouse-subcategory-header{margin-bottom:3px;background-color:#ffffffbf;border-bottom:1px solid rgb(0 0 0 / 60%)}.mhct-row.mhct-row-no-env{cursor:not-allowed}.scavenger-location-content,.sorted-page-content.generic-sorted-page{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0 30px}.scavenger-location-content .mh-ui-ar{margin-left:5px}.poster .sorted-page-content .mh-ui-ar{position:relative;right:unset;bottom:unset}.sorted-page-content .mhct-stage{max-width:110px;overflow:hidden;text-overflow:ellipsis}.treasureMapView-leftBlock{position:relative}.mh-ui-goals-sidebar-toggle{position:absolute;top:10px;right:20px;width:15px;height:15px;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24" width="28" fill="currentColor"><path d="M4 0h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4zm0 2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H4zm7.828 8L8.293 6.464A1 1 0 0 1 9.707 5.05l4.243 4.243a1 1 0 0 1 0 1.414L9.707 14.95a1 1 0 1 1-1.414-1.414L11.828 10z"></path></svg>');background-repeat:no-repeat;background-size:100%;opacity:.5}.mh-ui-goals-sidebar-toggle.closed{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24" width="28" fill="currentColor"><path d="M4 2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H4zm0-2h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"></path><path d="M8.414 9H14a1 1 0 1 1 0 2H8.414l2.536 2.536a1 1 0 0 1-1.414 1.414l-4.243-4.243a.997.997 0 0 1 0-1.414L9.536 5.05a1 1 0 1 1 1.414 1.414L8.414 9z"></path></svg>')}.mh-ui-goals-sidebar-toggle:hover{opacity:1}.treasureMapView-leftBlock.full-width{width:100%}.full-width .treasureMapView-goals-group-goal{width:calc(20% - 5px)}.scavenger-toggle-wrapper{display:flex;gap:10px;justify-content:flex-start;margin-bottom:20px}.sorted-page[data-scavenger-sorted-by=none] .sorted-page-content.treasureMapView-block-content.scavenger-sorted-page{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0 30px}#sorted-mice-container .mhct-row{padding:5px}#sorted-mice-container .mhct-data{padding-bottom:5px}
`;
}
});
var mhct_default, init_mhct = __esm({
"src/modules/better-maps/styles/mhct.css"() {
mhct_default = `.mhct-data{display:none}.mouse-container-selected .mhct-data{display:block}.treasureMapView-highlight.goal.sticky .mh-ui-mouse-links-map-ars .mhct-data{display:block;margin-top:1px}.mhct-title{display:none;padding:10px;margin-bottom:10px;font-size:12px;border-bottom:1px solid #dedede}.mhct-row{display:grid;grid-template-columns:3fr 3fr 1fr;column-gap:4px;place-items:center stretch;padding:4px;font-size:11px;color:#000}.mhct-row:nth-child(odd){background-color:#e2e2e2}.mhct-location{display:flex;flex-direction:column}.mhct-stage{color:#666}.mh-dark-mode .mhct-stage{color:#a7a7a7}.mhct-bait{align-self:center}.mhct-rate{font-family:monospace;font-size:13px;text-align:right}.mh-ui-mouse-links-map-ars,.treasureMapView-highlight.environment .mh-ui-mouse-links-map-ars{display:none}.sticky .mh-ui-mouse-links-map-ars{display:block}.mh-ui-mouse-links-map-ars .mhct-data{position:relative;display:flex;margin:0;color:#000;background-color:#fff;border-top:none;border-radius:6px}.mh-dark-mode .mh-ui-mouse-links-map-ars .mhct-data{color:#fff;border-color:#2c2c2c}.mh-ui-mouse-links-map-ars .mhct-row:nth-child(odd){color:#000;background-color:#f2f2f2}.mh-ui-mouse-links-map-ars .mhct-rate{display:flex;align-items:center;height:100%;font-size:13px}.mh-ui-mouse-links-map-ars .mhct-row{place-items:start stretch}.mh-ui-mouse-links-map-ars .mhct-title{display:flex;align-items:center;justify-content:space-between;padding:5px;margin-bottom:0;font-size:11px;color:#000;background-color:#d6d6d6;border-top:1px solid #dedede;border-bottom:1px solid #2c415a;border-top-left-radius:4px;border-top-right-radius:4px}.mh-dark-mode .mh-ui-mouse-links-map-ars .mhct-title{color:#fff;background-color:#000;border-color:#2c2c2c}.mh-ui-mouse-links-map-ars .mhct-stage{max-width:80px;overflow:hidden;text-overflow:ellipsis}.treasureMapView-highlight-content{border-bottom-right-radius:0;border-bottom-left-radius:0}.mh-ui-mouse-links-map-ars .mhct-title,.mh-ui-mouse-links-map-ars .mhct-data{border-top-left-radius:0;border-top-right-radius:0}.mh-ui-mouse-links-map-ars .mhct-row:last-child{border-bottom-right-radius:6px;border-bottom-left-radius:6px}
`;
}
});
var overlays_default3, init_overlays3 = __esm({
"src/modules/better-maps/styles/overlays.css"() {
overlays_default3 = `#overlayPopup.treasureMapPopup .jsDialog.top{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/jsDialogWideTop.png)}#overlayPopup.treasureMapPopup .jsDialog.background{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/jsDialogWideContent.png)}#overlayPopup.treasureMapPopup .jsDialog.bottom{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/jsDialogWideBottom.png)}.treasureMapDialogView{left:49%}
`;
}
});
var scroll_shop_default, init_scroll_shop = __esm({
"src/modules/better-maps/styles/scroll-shop.css"() {
scroll_shop_default = `.treasureMapPopup-shop .treasureMapView-block-content-heading{padding:10px;margin:0;border-color:transparent}.treasureMapInventoryView-scrollCase:first-of-type{margin-top:0}.treasureMapPopup-shop-environment{padding-bottom:0;margin-bottom:5px;border:1px solid rgb(0 0 0 / 12%);border-radius:3px}.treasureMapShopsView .treasureMapView-leftBlock{width:99%;height:600px}.treasureMapShopsView .treasureMapView-rightBlock{display:none}.treasureMapPopup-shop{margin-bottom:10px;background-color:#fbfbfb;border-radius:3px}.treasureMapPopup-shop-environment.active:before{box-shadow:none}.treasureMapView-block-content.treasureMapShopsView-shopItems{padding:0}.treasureMapShopsView .treasureMapView-blockWrapper .treasureMapView-leftBlock>.treasureMapView-block{height:calc(100% - 18px);overflow-y:auto;border:none}.treasureMapInventoryView-scrollCase-content div[style="border: 1px red dotted; padding: 5px; font-size: 10px;"]{display:none}b[style="color:red; font-size: 14px;"],b[style="color:red; font-size: 14px;"]+br{display:none}
`;
}
});
var hunters_default, init_hunters = __esm({
"src/modules/better-maps/styles/hunters.css"() {
hunters_default = `.treasureMapView-componentContainer{width:130px;border-radius:4px}.treasureMapView-allyCell .treasureMapView-componentContainer{box-sizing:border-box;display:flex;justify-content:space-evenly;width:170px;background:none}.treasureMapView-allyCell .treasureMapView-componentThumb{width:40px;height:40px}.treasureMapView-block.treasureMapView-invitedHuntersList{margin:20px 0}.treasureMapView-block.treasureMapView-invitedHuntersList .userSelectorView-user-image{width:20px;height:20px}.treasureMapView-block.treasureMapView-invitedHuntersList .treasureMapView-invitedHuntersList-row-link{font-size:10px}.treasureMapView-invitedHuntersList-row{margin-top:3px}.treasureMapDialogView-deleteInviteRequest.reject-invite-request{display:inline-block;width:12px;padding:3px;margin-right:6px;color:#242424;text-align:center;background-color:#dcd5d5;border-radius:50%}.treasureMapDialogView-deleteInviteRequest.reject-invite-request:hover,.treasureMapDialogView-deleteInviteRequest.reject-invite-request:focus,.treasureMapDialogView-deleteInviteRequest.reject-invite-request:active{text-decoration:none;background-color:#a3a3a3}.treasureMapView-allyRow:last-child .treasureMapView-allyCell.hunters-last-slot{display:inline-block;width:90px;margin-top:16px;margin-left:10px;font-style:italic;white-space:nowrap;vertical-align:middle}.treasureMapView-mapMenu-group-invite.mh-ui-invite-wrapper{display:flex;gap:5px}.treasureMapView-mapMenu-group-invite .mousehuntActionButton.mh-ui-invite-button{margin-bottom:0!important}.mh-ui-find-hunters-title,.mh-ui-map-settings-title,.mh-ui-share-title{display:none}.mh-ui-find-hunters-block{margin-top:18px}.mh-ui-map-settings-block .treasureMapView-block-content{display:flex;flex-direction:column;gap:5px;align-items:stretch;justify-content:center}.treasureMapView-block.mh-ui-share-block .treasureMapView-block-content{display:flex;gap:3px;align-items:center}a.mousehuntActionButton.lightBlue.treasureMapView-inviteModeButton{margin-top:0}.mh-ui-find-hunters-block .treasureMapView-mapMenu-group-invite{display:flex;align-items:stretch;justify-content:space-around}.treasureMapView-mapMenu-group-invite .mousehuntActionButton{margin-bottom:0!important}.treasureMapView-header .treasureMapView-hunter-image{min-width:44px;min-height:44px}.mh-ui-quick-invite-wrapper{position:relative;box-sizing:border-box;display:flex;align-items:center;justify-content:space-around;max-width:185px;padding:10px;margin-bottom:10px;background-color:#eee;border:1px solid #ccc;border-radius:3px}input.mh-ui-quick-invite-input{width:auto;max-width:100px;padding:5px;margin:0;border:1px solid #c6c6c6}.mh-ui-quick-invite-indicator{position:absolute;top:15px;right:65px;width:20px;height:20px}.mh-ui-quick-invite-indicator.mh-ui-quick-invite-spinner{background-image:url(https://www.mousehuntgame.com/images/ui/loaders/small_spinner.gif);background-repeat:no-repeat;background-size:16px}.mh-ui-quick-invite-indicator.mh-ui-quick-invite-success{background-image:url(https://www.mousehuntgame.com/images/ui/hud/meadow_checkmark.png);background-repeat:no-repeat;background-size:16px}.mh-ui-quick-invite-wrapper .mh-ui-error-message{position:absolute;top:42px;right:5px;left:5px;text-align:center}span.treasureMapView-shareLinkInputStatus{display:none}.treasureMapView-mapMenu-group-invite{display:flex;flex-direction:column;gap:10px}.treasureMapView-inviteModeDescription{margin-bottom:5px}.treasureMapView-hunter-wrapper.mousehuntTooltipParent{padding-top:20px;margin-top:-10px}.mh-mapper-invite-request-action{padding:0 10px}
`;
}
});
var sorted_map_default, init_sorted_map = __esm({
"src/modules/better-maps/styles/sorted-map.css"() {
sorted_map_default = `#sorted-mice-container .mouse-category-twilight-midnight-pitch .mouse-category-title{font-size:13px}#sorted-mice-container .mouse-category-first-light-utter-darkness .mouse-category-title{font-size:12px}#sorted-mice-container .mouse-subcategory-wrapper.mouse-subcategory-sp{background-color:#afcbffbf}
`;
}
});
var rewards_default, init_rewards = __esm({
"src/modules/better-maps/styles/rewards.css"() {
rewards_default = `.treasureMapDialogView-chestPreview.rare .treasureMapDialogView-chest-item.doubled .treasureMapDialogView-chest-item-padding:before,.treasureMapDialogView-chest-item.very_likely .treasureMapDialogView-chest-item-padding:before,.treasureMapDialogView-chest-item.common .treasureMapDialogView-chest-item-padding:before,.treasureMapDialogView-chest-item.uncommon .treasureMapDialogView-chest-item-padding:before,.treasureMapDialogView-chest-item.rare .treasureMapDialogView-chest-item-padding:before,.treasureMapDialogView-chest-item.very_rare .treasureMapDialogView-chest-item-padding:before,.treasureMapDialogView-chest-item.extremely_rare .treasureMapDialogView-chest-item-padding:before{display:none}.treasureMapDialogView-chestPreview.rare .treasureMapDialogView-chest-item.doubled:hover .treasureMapDialogView-chest-item-padding:before,.treasureMapDialogView-chest-item.very_likely:hover .treasureMapDialogView-chest-item-padding:before,.treasureMapDialogView-chest-item.common:hover .treasureMapDialogView-chest-item-padding:before,.treasureMapDialogView-chest-item.uncommon:hover .treasureMapDialogView-chest-item-padding:before,.treasureMapDialogView-chest-item.rare:hover .treasureMapDialogView-chest-item-padding:before,.treasureMapDialogView-chest-item.very_rare:hover .treasureMapDialogView-chest-item-padding:before,.treasureMapDialogView-chest-item.extremely_rare:hover .treasureMapDialogView-chest-item-padding:before{display:block}
`;
}
});
var general_default5, init_general5 = __esm({
"src/modules/better-maps/styles/general.css"() {
general_default5 = `.treasureMapView-singleEnvironment-label{padding-bottom:8px}.treasureMapView-block.treasureMapView-singleEnvironment{border-radius:2px}.treasureMapView-block-content.halfHeight{padding:0;border-radius:0}.treasureMapView-block,.treasureMapView-block>.treasureMapView-block-content{border-radius:3px}.treasureMapView-mapMenu-group.rewards .treasureMapView-mapMenu-group-title,.treasureMapView-ally-ownerLabel{display:none}input.treasureMapView-shareLinkInput{display:inline-block;width:87px;padding:3px;margin-right:2px}.treasureMapView-ownerRequestActions{display:block;width:61px;margin:0 auto}.treasureMapView-mapMenu-group.rewards{display:flex;flex-direction:row-reverse;margin-top:-10px;margin-right:-5px}.rewards .treasureMapView-mapMenu-rewardName{max-width:unset;margin-right:3px;font-size:12px}.rewards .treasureMapView-mapMenu-subgroup.chest.mousehuntTooltipParent{display:flex;flex-direction:row-reverse;gap:5px;align-items:center}.rewards .treasureMapView-mapMenu-group-content{display:flex;flex-wrap:wrap;justify-content:flex-end;max-width:360px}.max_hunters_10 .rewards .treasureMapView-mapMenu-group-content{max-width:200px}.rewards .treasureMapView-mapMenu-auraIcon{width:33px;height:33px;margin-right:5px}.treasureMapView-mapMenu.max_hunters_8 .treasureMapView-mapMenu-auraIcon,.treasureMapView-mapMenu.max_hunters_9 .treasureMapView-mapMenu-auraIcon,.treasureMapView-mapMenu.max_hunters_10 .treasureMapView-mapMenu-aura-name .treasureMapView-mapMenu-auraIcon,.treasureMapView-mapMenu.max_hunters_10 .treasureMapView-mapMenu-auraIcon{width:44px;height:44px}.rewards .treasureMapView-mapMenu-auraIconContainer{margin:0}.rewards .treasureMapView-mapMenu-group-actions{display:flex;flex-direction:row;justify-content:flex-end;width:auto}.rewards .treasureMapView-mapMenu-group-actions .mousehuntActionButton{margin-top:5px;margin-right:4px;margin-bottom:0!important}.treasureMapView-allyCell.name{padding-left:10px}.treasureMapView-ally-name{padding-bottom:5px}.treasureMapView-mapMenu-mapIcon{width:45px}.max_hunters_10 .treasureMapView-mapMenu-mapIcon{width:60px}img.treasureMapView-reward-chestIcon{box-sizing:border-box;width:160px;height:160px;padding:0;margin:20px auto;background:transparent;box-shadow:none}.treasureMapInvitesView .treasureMapView-leftBlock:first-child .treasureMapView-block-title:first-child{display:none}.treasureMapView-block-content.noMinHeight.noPadding.treasureMapInvitesView-scoreboards .treasureMapView-block-title:nth-child(3),.treasureMapView-block-content.noMinHeight.noPadding.treasureMapInvitesView-scoreboards .treasureMapView-scoreboard:nth-child(4){display:none}.treasureMapInventoryView-scrollCase-aura{overflow:hidden;font-size:9px;line-height:15px}.treasureMapInventoryView-scrollCase-aura br:after{content:" "}.treasureMapInventoryView-scrollCase-aura br{content:""}.treasureMapInventoryView-scrollCase-aura b:first-of-type{display:block;font-size:10px}.treasureMapView-block-content-heading{margin:10px 0 5px}.treasureMapInventoryView-scrollCase{align-items:center;padding:10px;margin:5px;background-color:#ffffffa6;border:1px solid rgb(150 150 150 / 50%);border-radius:5px}.mh-dark-mode .treasureMapInventoryView-scrollCase{color:#000;background-color:#32323240;border-color:#424242}.treasureMapView-block-content-heading-image{margin-right:10px}.mh-dark-mode .treasureMapShopsView-shopItems .treasureMapView-block-content-heading,.mh-dark-mode .treasureMapShopsView-shopItems .treasureMapView-block-content-heading-count{color:#000}.mh-dark-mode .pageFrameView .treasureMapPopup-shop-environment.active:before{background-color:transparent}.treasureMapPopup-shop[data-environment-type=rift_valour]{background-color:#e5daed}.treasureMapPopup-shop[data-environment-type=rift_bristle_woods]{background-color:#bda39e}.treasureMapPopup-shop[data-environment-type=rift_furoma]{background-color:#ffdca4}.treasureMapPopup-shop[data-environment-type=rift_whisker_woods]{background-color:#cfe07e}.treasureMapPopup-shop[data-environment-type=rift_burroughs]{background-color:#c6c6c6}.treasureMapPopup-shop[data-environment-type=rift_gnawnia]{background-color:#ffdaf4}.treasureMapPopup-shop[data-environment-type=table_of_contents]{background-color:#dfffd4}.treasureMapPopup-shop[data-environment-type=prologue_pond]{background-color:#d3ffff}.treasureMapPopup-shop[data-environment-type=foreword_farm]{background-color:#faedcd}.treasureMapPopup-shop[data-environment-type=floating_islands]{background-color:#fce0d7}.treasureMapPopup-shop[data-environment-type=moussu_picchu]{background-color:#fed3ff}.treasureMapPopup-shop[data-environment-type=ancient_city]{background-color:#ccc}.treasureMapPopup-shop[data-environment-type=fungal_cavern]{background-color:#c3f3de}.treasureMapPopup-shop[data-environment-type=sunken_city]{background-color:#c8f9ff}.treasureMapPopup-shop[data-environment-type=queso_geyser],.treasureMapPopup-shop[data-environment-type=queso_quarry],.treasureMapPopup-shop[data-environment-type=queso_plains],.treasureMapPopup-shop[data-environment-type=queso_river]{background-color:#f8f3ae}.treasureMapPopup-shop[data-environment-type=fort_rox]{background-color:#f2d5c9}.treasureMapPopup-shop[data-environment-type=desert_oasis]{background-color:#d1e7bf}.treasureMapPopup-shop[data-environment-type=desert_city]{background-color:#e48f89}.treasureMapPopup-shop[data-environment-type=desert_warpath]{background-color:#ffb280}.treasureMapPopup-shop[data-environment-type=slushy_shoreline]{background-color:#a0d3ee}.treasureMapPopup-shop[data-environment-type=seasonal_garden]{background-color:#e8e8e9}.treasureMapPopup-shop[data-environment-type=pollution_outbreak]{background-color:#cde691}.treasureMapPopup-shop[data-environment-type=kings_gauntlet]{background-color:#ccc}.treasureMapPopup-shop[data-environment-type=cape_clawed]{background-color:#b8d3dc}.treasureMapPopup-shop[data-environment-type=catacombs]{background-color:#a88ca4}.treasureMapPopup-shop[data-environment-type=great_gnarled_tree]{background-color:#abd59b}.treasureMapPopup-shop[data-environment-type=town_of_digby]{background-color:#e5e6d8}.treasureMapPopup-shop[data-environment-type=mousoleum]{background-color:#d6c8a2}.treasureMapPopup-shop[data-environment-type=harbour]{background-color:#fffcb6}.treasureMapPopup-shop[data-environment-type=bountiful_beanstalk]{background-color:#94f05a}.treasureMapPopup-shop[data-environment-type=school_of_sorcery]{background-color:#8fbef1}.treasureMapPopup-shop[data-environment-type=queso_quarry],.treasureMapPopup-shop[data-environment-type=queso_plains]{display:none}.treasureMapPopup-shop-item-description-costContainer{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding-top:5px;margin-top:10px}.treasureMapInventoryView-scrollCase-name{padding-bottom:5px}.mapper-self img{border-radius:50%;outline:2px solid #73ddff}.treasureMapView-block-title.mh-ui-scavenger-hunt-title,.treasureMapView-block.treasureMapView-scavengerHunt{display:none}.treasureMapView-hunter-image{width:90%}.treasureMapListingsTableView-profilePic{box-shadow:0 0 1px 1px #999}.treasureMapView-hunter.empty img.treasureMapView-hunter-image{opacity:.4}.treasureMapDialogView-userSelector .userSelectorView-content{height:550px}.treasureMapDialogView .userSelector-cell.name{font-size:12px}td.userSelector-cell.map_num_clues_found.number{font-size:8px}th.userSelector-column.is_favourite{color:transparent}.userSelector-table th.userSelectorView-sortByLink{text-align:center}.userSelector-table th.userSelectorView-sortByLink:after{margin-right:10px;margin-left:1px}.userSelectorView-filterContainer{font-size:12px}label.userSelectorView-filter-label{color:transparent}.treasureMapUserSelectorView-toggleFavouritesContainer.treasureMapView-block-title label{font-weight:400}.treasureMapDialogView .userSelector-cell abbr{text-decoration:none}.treasureMapDialogView-userSelector-selectedUserList-content{counter-reset:sent left}.treasureMapDialogView-userSelector-selectedUser{position:relative;counter-increment:sent}.treasureMapDialogView-userSelector-selectedUser.empty{counter-increment:left}.treasureMapUserSelectorView-actions:hover .treasureMapDialogView-userSelector-selectedUser:after{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:900;color:#fff;text-align:center;text-shadow:-1px 0 1px #000,1px 0 1px #000,0 0 0 #000,0 -1px 1px #000,0 1px 1px #000,0 0 0 #000;content:counter(sent)}.treasureMapUserSelectorView-actions:hover .treasureMapDialogView-userSelector-selectedUser.empty:after{content:counter(left)}.userSelector-table .userSelector-groupHeading td{padding:5px 0 2px 5px;border-right:none;border-left:none}.userSelector-table .userSelector-groupHeading td:first-child{border-top:none}.treasureMapView-environment-hunters .treasureMapView-hunter.captain .treasureMapView-hunter-image{width:20px;height:20px;outline:1px solid #ffe298;box-shadow:none}.mh-mapper-consolation-prizes{display:flex;flex-direction:column}h2.mh-mapper-consolation-prizes-title{padding:5px;margin-top:10px;font-size:12px;font-weight:700}.mh-mapper-consolation-prize{display:flex;flex-direction:row;align-items:center}img.mh-mapper-consolation-prize{width:25px;height:25px;margin-right:5px}.treasureMapView-block-title.mh-ui-environments-title,.treasureMapView-block-title.mh-ui-map-location-title,.treasureMapView-block-title.mh-ui-consolation-prizes-title{display:none}.treasureMapView-block-title.mh-ui-goals-title{margin:-7px;color:transparent}.treasureMapRootView-subTab-label{display:none}input.treasureMapView-block-search-text{width:80px;height:18px;margin-right:7px;font-size:12px;border:1px solid #ccc}.treasureMapRootView-subTabRow{align-items:center}.treasureMapView-highlight{padding:0;border-radius:6px;outline:1px solid #505050;box-shadow:0 2px 3px -1px #292929,0 2px 10px -2px #ababab}.treasureMapView-highlight-content{padding:6px 0}.treasureMapView-highlight.goal.active.sticky.mouse.has-mhct-ars{width:40%}.treasureMapView-highlight-weakness-types img{width:17px}.treasureMapView-highlight.environment .treasureMapView-highlight-content,.treasureMapView-highlight-description{padding:10px}.mh-ui-environments-block{padding:6px;margin:-1px}.mh-ui-environments-block .treasureMapView-block-content.halfHeight{max-height:unset}.treasureMapView-goals-group-goal{width:calc(33% - 5px);margin:3px 5px 3px 0}.treasureMapView-highlight .treasureMapView-goals-group-goal{width:auto}.treasureMapView-goals-group-goal.notAvailable{opacity:.7}.treasureMapView-goals-group-goal.notAvailable.m400.mouse,.treasureMapView-goals-group-goal.notAvailable:hover,.treasureMapView-goals-group-goal.notAvailable.sticky{opacity:1}.complete .treasureMapView-goals-group-goal-name,.complete .treasureMapView-goals-group-goal-padding{height:35px}.treasureMapView-goals-group-goal.complete:after{top:12px;left:7px;width:21px;height:21px}.treasureMapView-mapLeaveContainer{margin-top:5px}.treasureMapView-mapLeaveContainer .mousehuntActionButton.lightBlue.treasureMapView-leaveMapButton,.mousehuntActionButton.mh-ui-leave-map-button{background:#ffa5a5}.treasureMapView-mapLeaveContainer .mousehuntActionButton.lightBlue.treasureMapView-leaveMapButton:before,.mousehuntActionButton.mh-ui-leave-map-button:before{background:#f27b6a;box-shadow:0 0 10px #ffa5a5 inset}.treasureMapView-mapLeaveContainer .mousehuntActionButton.lightBlue.treasureMapView-leaveMapButton:hover:before,.treasureMapView-mapLeaveContainer .mousehuntActionButton.lightBlue.treasureMapView-leaveMapButton:focus:before,.mousehuntActionButton.mh-ui-leave-map-button:hover:before,.mousehuntActionButton.mh-ui-leave-map-button:focus:before{background:#ffa5a5}.treasureMapView-block-content.treasureMapInvitesView-scoreboards{padding:2px;margin-top:-20px;overflow-x:hidden}.mh-dark-mode .pageFrameView #overlayPopup.treasureMapPopup .treasureMapRootView-content a.treasureMapView-block-row.active{color:#000;background:#f2eb6f}.treasureMapView-hunter.upgrader .treasureMapView-hunter-image{box-shadow:0 0 1px 3px #ffb40c}.treasureMapView-hunter-miceCaught.active{background-color:#eee}.mh-dark-mode .pageFrameView .treasureMapView-rightBlock{padding:0;background-color:transparent}.treasureMapView-highlight-catcher{display:inline-block;height:auto;background:none;border:none}.treasureMapView-highlight-group,.treasureMapView-highlight-environments{text-align:center}.treasureMapView-highlight-catcher-title{display:inline-block;margin-top:-20px;margin-left:12px;vertical-align:middle}.treasureMapView-highlight-weakness-title{font-size:8.4px}.treasureMapView-highlight.goal{width:30%}.treasureMapView-highlight-weaknessContainer{display:flex;align-items:baseline;margin:0 1px}.treasureMapInventoryView-relicHunter-hintSuffix{margin-bottom:10px;font-size:10px;font-style:italic;text-align:center}.treasureMapInventoryView-relicHunter{padding-top:120px;border-radius:3px}.treasureMapInventoryView-relicHunter:before{height:110px;border-bottom:1px solid #ccc}.treasureMapPopup-season-reward-name{padding:2px;font-size:11px}.treasureMapPopup-seasonContainer.mousehuntTooltipParent{font-size:11px;background:transparent;border:1px solid #ccc;border-radius:3px}.treasureMapView-block-search{right:0;bottom:13px}.treasureMapInventoryView .treasureMapView-block-title,.treasureMapShopsView .treasureMapView-block-title{height:0;margin-bottom:0;visibility:hidden}.treasureMapInventoryView .treasureMapView-block-search,.treasureMapShopsView .treasureMapView-block-search{visibility:visible}.treasureMapRootView-footer .treasureMapRootView-footer-item{font-size:11px}.treasureMapRootView-footer .treasureMapRootView-footer-item:nth-child(3) .treasureMapRootView-footer-item-thumb,.treasureMapRootView-footer .treasureMapRootView-footer-item:nth-child(4) .treasureMapRootView-footer-item-thumb{height:21px;padding-left:3px;margin-right:-10px;background-color:#7b789a;background-repeat:no-repeat;background-position:center;border-top-right-radius:0;border-bottom-right-radius:0}.treasureMapRootView-footer .treasureMapRootView-footer-item:nth-child(3) .treasureMapRootView-footer-item-quantity,.treasureMapRootView-footer .treasureMapRootView-footer-item:nth-child(4) .treasureMapRootView-footer-item-quantity{height:13px;padding:4px;margin-left:5px;border-top-left-radius:0;border-bottom-left-radius:0}.treasureMapView-mapMenu.treasureMapRootView-padding{margin-bottom:20px}.mh-ui-map-completed .treasureMapView-mapMenu.treasureMapRootView-padding{margin-bottom:40px}.treasureMapView-mapMenu.treasureMapRootView-padding.max_hunters_10{margin-bottom:50px}.mh-ui-we-did-it-title{display:none}.treasureMapView-block.treasureMapView-reward.mh-ui-we-did-it-block{background-color:#95ef9b;border-color:#14851b}.treasureMapPopup-mapInvite .treasureMapView-hunter-wrapper.mousehuntTooltipParent{font-size:10px}.treasureMapPopup-mapInvite .treasureMapView-hunter{margin:3px 0}.treasureMapView-mapMenu-group-content.upgraded .treasureMapView-mapMenu-mapIcon,.treasureMapListingsTableView-mapThumbnail.rare{filter:drop-shadow(0 0 2px #ffb40c) drop-shadow(0 0 5px #ffb40c);box-shadow:none}.treasureMapDialogView-inviteFriend-completeContainer{display:grid;grid-template-columns:repeat(4,1fr);place-items:stretch stretch}.treasureMapDialogView-inviteFriend-complete{display:flex;align-items:center;justify-content:flex-start;text-align:left}.treasureMapDialogView-environmentGoals{max-height:unset}.treasureMapView-hunter-icon{top:-9px}.treasureMapTooltipView.active{top:0!important;display:flex;flex-direction:column;place-content:flex-start space-around;align-items:center}.mh-ui-multiple-maps .treasureMapTooltipView.active{top:35px!important}.treasureMapView-mapWarning.treasureMapRootView-padding{padding-left:5px;margin-bottom:10px;font-size:10px;line-height:1.5;text-align:center;box-shadow:0 0 1px 1px #ffa5a5}.treasureMapView-consolationPrizeMessage{margin:15px 0;box-shadow:0 0 1px 1px #ffa5a5}.treasureMapView-mapWarning:before{display:none}.treasureMapDialogView-title{margin-bottom:5px}.incomplete .treasureMapView-goals-group-goal-padding{overflow:visible}.treasureMapView-goals-group-goal-image{width:34px;height:100%;border-radius:5px}.treasureMapView-goals-group-goal.landscape .treasureMapView-goals-group-goal-image{height:48px;background-position:center}.treasureMapView-goals-group-goal.complete.landscape .treasureMapView-goals-group-goal-image{height:33px}.treasureMapView-goals-group-goal:hover:before,.treasureMapView-goals-group-goal.sticky:before{inset:-1px;outline:1px solid #ccc;box-shadow:none}.treasureMapView-goals-group-goal.item{width:calc(20% - 5px);padding:5px 0}.full-width .treasureMapView-goals-group-goal,.treasureMapView-goals-group-goal.item.complete{width:calc(14% - 5px)}.full-width .treasureMapView-goals-group-goal.item.complete{width:calc(10% - 5px)}.treasureMapView-goals-group-goal:hover:before{background-color:#ececec}.treasureMapView-goals-group-goal:hover .treasureMapView-goals-group-goal-image{mix-blend-mode:multiply}.treasureMapView-highlight.environment{top:25px;right:175px;left:unset;width:45%}.treasureMapView-highlight-environments{max-height:126px;margin-left:10px;overflow-y:auto}.treasureMapView-scoreboard-table .treasureMapView-block-row:hover{background-color:#eee}.treasureMapView-previewBar{height:20px;padding-left:15px;margin:-10px 0 0;background:#d9ffbf}.treasureMapView-previewBar:before{position:absolute;top:0;right:0;display:block;width:100px;height:40px;content:"";background:#d9ffbf url(https://www.mousehuntgame.com/images/ui/elements/larry_circle_large.gif) 0 -16px no-repeat;background-size:90px;transform:scaleX(-1)}.treasureMapView-previewBar-content{display:flex;justify-content:space-between;margin-right:100px}.treasureMapView-previewBar .mousehuntActionButton[onclick*="hg.controllers.TreasureMapController.showCommunity();"]{display:none}.treasureMapView-previewBar-padding{display:flex;align-items:center}.treasureMapView-previewBar-actions{display:flex;flex-direction:row;align-items:center}.treasureMapView-mapMenu-group:first-child .treasureMapView-mapMenu-group-title{margin-bottom:15px}.mh-improved-map-listing-last-active-wrapper{display:flex;align-items:center;margin-left:10px}.mh-improved-map-listing-full{opacity:.5}.treasureMapPopup-mapInvite .treasureMapInventoryView-scrollCase{padding:0;margin:5px 0;border:none}.treasureMapView-block-content.tall.treasureMapInvitesView-inviteList{padding:5px}.treasureMapPopup-mapInvite .treasureMapView-block-content-heading{margin:0}.treasureMapPopup-mapInvite{padding:5px}.treasureMapView-scoreboard{border-radius:3px}.treasureMapView-scoreboard .treasureMapView-block-cell.rank{padding-left:2px}.treasureMapInventoryView .treasureMapView-blockWrapper .treasureMapView-leftBlock .treasureMapView-block{padding:0;border:none}.treasureMapInventoryView .treasureMapView-blockWrapper .treasureMapView-block-content-heading{margin:10px 10px 5px;border:none}.treasureMapInventoryView-scrollCase-content br+br{display:none}.treasureMapInventoryView-scrollCase-content{line-height:15px}.treasureMapInventoryView-scrollCase-content br+br+b{display:inline-block}.treasureMapView-block-title.mh-ui-maps-title,.treasureMapView-block-title.mh-ui-map-scrolls-title,.treasureMapView-block-title.mh-ui-scroll-shop-title{display:none}.treasureMapShopsView .treasureMapView-block-search{bottom:10px}.treasureMapTooltipView-hunterText-state.captain{position:absolute;top:5px;left:5px;visibility:hidden}.treasureMapTooltipView-hunterText-state.captain:after{position:absolute;top:0;left:0;width:18px;height:16px;visibility:visible;content:"";background:url(https://www.mousehuntgame.com/images/ui/tournaments/captain_icon.png?asset_cache_version=3) no-repeat 50% 50% / contain}.treasureMapTooltipView-hunterText-state.upgrader{position:absolute;top:5px;right:5px;visibility:hidden}.treasureMapTooltipView-hunterText-state.upgrader:after{position:absolute;top:0;right:0;width:16px;height:16px;visibility:visible;content:"";background:#ffb615;border-radius:50%}.treasureMapView-hunter-wrapper .quickSendWrapper{top:60px!important;left:30px}.treasureMapTooltipView{height:40px}.treasureMapDialogView.wide.limitHeight.confirm .treasureMapDialogView-description{display:none}.treasureMapDialogView.wide.limitHeight.confirm .treasureMapDialogView-header{margin-bottom:0}.treasureMapDialogView-chest-item-padding:before{box-shadow:1px 1px 2px -1px #333}.mh-ui-environments-block .treasureMapView-block-content:first-child,.treasureMapView-block.mh-ui-listed-maps-block,.treasureMapView-block-title.mh-ui-listed-maps-title{display:none}.item .treasureMapView-highlight-description{max-height:80px;overflow-y:auto}.treasureMapInventoryView-relicHunter-hint{justify-content:center}.treasureMapInventoryView .treasureMapView-blockWrapper.tall{margin-left:0}.treasureMapInventoryView-scrollCase-action.has-link{display:flex;flex-direction:column;gap:10px;align-items:stretch;text-align:center}.treasureMapInventoryView-scrollCase-content .scroll-text{max-height:60px;overflow:auto}#overlayPopup.treasureMapPopup #jsDialogClose{z-index:12}.treasureMapTooltipView.active:after{bottom:-19px}.treasureMapTooltipView.active:before{bottom:-20px}.treasureMapView-consolationPrizeButton{margin-bottom:5px}.treasureMapView-block-search-clear{top:0;right:5px;border-left:none}.treasureMapView.poster .treasureMapView-goals-group-goal.complete .treasureMapView-goals-group-goal-name{background:#949494;box-shadow:1px 1px 1px #fff inset,3px 3px 30px #786d64 inset,0 0 2px #9c9c9c inset,2px 2px 2px #000}.treasureMapView.poster .treasureMapView-goals-group-goal.complete .treasureMapView-goals-group-goal-name span{color:#e5e0d6;text-decoration:none}.treasureMapRootView-subTabContainer:hover .treasureMapRootView-subTab.active,.treasureMapRootView-subTab.active,.treasureMapRootView-subTabContainer:hover .treasureMapRootView-subTab:hover{border-color:#999}.treasureMapRootView-subTabContainer:hover .treasureMapRootView-subTab.active,.treasureMapRootView-subTab.active{color:#000;border-color:#333}.treasureMapView-environment{border-radius:3px}.treasureMapView-environment:last-child{margin-bottom:0}.treasureMapRootView-subTab,.treasureMapRootView-subTabContainer:hover .treasureMapRootView-subTab.active,.treasureMapRootView-subTab.active,.treasureMapRootView-subTabContainer:hover .treasureMapRootView-subTab:hover{padding:0 16px}.treasureMapView-goals-group-goal.complete .treasureMapView-goals-group-goal-image{background-size:cover}
`;
}
});
var highlight_for_map_default, init_highlight_for_map = __esm({
"src/modules/better-maps/styles/highlight-for-map.css"() {
highlight_for_map_default = `.floatingIslandsHUD-powerType.lowlight-for-map,.floatingIslandsAdventureBoardSkyMap-islandMod.lowlight-for-map{opacity:.5}.floatingIslandsHUD-powerType.highlight-for-map,.floatingIslandsAdventureBoardSkyMap-islandMod.highlight-for-map{opacity:1}.floatingIslandsAdventureBoardSkyMap-islandMod.extra-highlight-for-map .floatingIslandsHUD-mod{background-color:#37c8ff8c;border-radius:5px}.floatingIslandsHUD-powerType.extra-highlight-for-map{background-color:#37c8ffbf;border-radius:50%}
`;
}
});
var sidebar_default5, init_sidebar5 = __esm({
"src/modules/better-maps/styles/sidebar.css"() {
sidebar_default5 = `.pageFrameView-column.right{border-left-width:10px}.pageFrameView-column.left{border-right-width:10px}.pageFrameView{grid-template-columns:[first] auto [content-start] 760px [sidebar] 210px [content-end] auto [last]}.mh-improved-map-sidebar{padding:0;margin:5px 0 15px;border:1px solid #ddedff}.mh-improved-map-sidebar-title{position:relative;display:flex;flex-direction:column;gap:3px;padding:5px;font-size:11px;text-align:center;background-color:#ddedff}.mh-improved-map-sidebar-title:hover{cursor:pointer}.mh-improved-map-sidebar-subtitle{font-style:italic}.mh-improved-map-sidebar-goals{display:flex;flex-direction:column}.mh-improved-map-sidebar-goal{display:flex;gap:5px;align-items:center;justify-content:flex-start;padding:1px 5px}.mh-improved-map-sidebar-goal-image{width:20px;height:20px;background-size:cover;border-radius:3px;box-shadow:inset 0 0 0 1px #fff}.mh-improved-map-sidebar-goal-name{font-size:10px}.mh-improved-map-sidebar-goal:hover{cursor:pointer;background-color:#eee}.mh-improved-map-sidebar-goal-active{background-color:#fdfbcc}.mh-improved-map-sidebar-title:after{position:absolute;top:2px;right:0;box-sizing:border-box;display:block;width:17px;height:17px;padding:9px;margin:1px;content:"";background:url(https://www.mousehuntgame.com/images/ui/puzzle/refresh.png) no-repeat center center / contain;border-radius:50%;opacity:.3}.mh-improved-map-sidebar-title:hover:after{opacity:1}.loading .mh-improved-map-sidebar-title:after{animation:mh-improved-spin 1s linear infinite}@media (prefers-reduced-motion: reduce){.loading .mh-improved-map-sidebar-title:after{animation:none}}.poster .mh-ui-goals-sidebar-toggle{display:none}
`;
}
});
var userscripts_default2, init_userscripts2 = __esm({
"src/modules/better-maps/styles/userscripts.css"() {
userscripts_default2 = `fieldset.tsitu-mapping{display:flex;align-items:center;justify-content:flex-end;float:right;width:200px!important;padding:0!important;margin-right:13px;margin-left:0!important;border:none!important}span.tsitu-mapping{display:flex!important;align-items:center;padding-bottom:8px;margin:0!important}span.tsitu-mapping.tsitu-refresh-span>span{display:none}.tsitu-mapping br,.tsitu-mapping legend,.tsitu-mapping label{display:none}input[name=tsitu-mapping-id-input]{width:100px;height:17px;line-height:20px}.tsitu-mapping button[style="margin-left: 5px;"]{padding:4px 3px;margin-right:4px;margin-left:2px!important;font-size:9px;color:#000;text-shadow:0 0 1px #fff;background-color:#f4e830;border:1px solid #000;border-radius:5px;box-shadow:0 -5px 8px -2px #ffae00 inset}.tsitu-mapping button[style="margin-left: 5px;"]:hover,.tsitu-mapping button[style="margin-left: 5px;"]:focus{background-color:#fff600;box-shadow:inset 0 0 16px 2px #fffaab}button.mousehuntActionButton.tiny.tsitu-mapping{padding:4px!important;margin:0!important}.mh-dark-mode input[name=tsitu-mapping-id-input]{color:#fff;background-color:#636363;border:1px solid #2c2c2c}
`;
}
});
var invites_default, init_invites = __esm({
"src/modules/better-maps/styles/invites.css"() {
invites_default = `a.mh-ui-invite-refresh-button{position:relative}a.mh-ui-invite-refresh-button:after{position:absolute;top:3px;right:-20px;box-sizing:border-box;display:block;width:18px;height:18px;content:"";background:url(https://www.mousehuntgame.com/images/ui/puzzle/refresh.png) no-repeat center center / contain;border-radius:50%;opacity:.5}a.mh-ui-invite-refresh-button:hover:after{background-color:#ddd;opacity:.9}a.mh-ui-invite-refresh-button.loading:after{animation:mh-improved-spin 1s linear infinite}@media (prefers-reduced-motion: reduce){a.mh-ui-invite-refresh-button.loading:after{animation:none}}
`;
}
});
var helper_default, init_helper = __esm({
"src/modules/better-maps/styles/helper.css"() {
helper_default = `#custom-submenu-item-mh-improved-map-helper .name{display:flex;flex-direction:column;justify-content:center;height:30px;line-height:1.3}#custom-submenu-item-mh-improved-map-helper .title{overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}#custom-submenu-item-mh-improved-map-helper .subtitle{font-size:10px}.mh-improved-map-helper-popup pre{box-sizing:border-box;width:100%;height:400px;padding:10px;overflow:scroll;font-family:monospace;white-space:normal;background-color:#eee}
`;
}
});
var imported8, styles6, updateMapClasses, updateBlockContent, addBlockClasses, interceptMapRequest, initMapper, parentShowMap, intercept, clearStickyMouse, updateRelicHunterHint, _showInventory, relicHunterUpdate, addClearCacheTimeout, clearMapCache, addInfoClasses, init40, better_maps_default, init_better_maps = __esm({
"src/modules/better-maps/index.js"() {
init_utils2();
init_settings18();
init_tab_sorted();
init_tab_goals();
init_tab_invites();
init_tab_hunters();
init_community();
init_floating_islands2();
init_scrolls();
init_shops2();
init_sidebar4();
init_map_ar();
init_sorted();
init_mhct();
init_overlays3();
init_scroll_shop();
init_hunters();
init_sorted_map();
init_rewards();
init_general5();
init_highlight_for_map();
init_sidebar5();
init_userscripts2();
init_invites();
init_helper();
imported8 = [map_ar_default, sorted_default, mhct_default, overlays_default3, scroll_shop_default, hunters_default, sorted_map_default, rewards_default, general_default5, highlight_for_map_default, sidebar_default5, userscripts_default2, invites_default, helper_default], styles6 = imported8, updateMapClasses = () => {
var _a, _b, _c;
let map = document.querySelector(".treasureMapRootView");
map && map.classList && (((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRelicHunter) == null ? void 0 : _b.maps) == null ? void 0 : _c.length) >= 2 ? map.classList.add("mh-ui-multiple-maps") : map.classList.remove("mh-ui-multiple-maps"));
}, updateBlockContent = (block, type2) => {
type2 === "environments" && [...block.querySelectorAll(".treasureMapView-environment")].sort((a, b) => a.innerText.localeCompare(b.innerText)).forEach((env) => {
block.append(env);
});
}, addBlockClasses = () => {
let rightBlocks = document.querySelectorAll(".treasureMapView-rightBlock > div"), leftBlocks = document.querySelectorAll(".treasureMapView-leftBlock > div"), blocks = [...rightBlocks, ...leftBlocks], prevBlockType = "";
blocks.forEach((block) => {
if (block.classList.contains("treasureMapView-block-title")) {
let blockType = block.innerText.trim().toLowerCase().replaceAll(" ", "-").replaceAll(/[^a-z-]/g, "").replace("--", "-").replace("goalssearch", "goals");
block.classList.add(`mh-ui-${blockType}-title`), updateBlockContent(block, `${blockType}-title`), prevBlockType = blockType;
} else
block.classList.add(`mh-ui-${prevBlockType}-block`), updateBlockContent(block, prevBlockType);
});
}, interceptMapRequest = (mapId) => __async(void 0, null, function* () {
if (sessionSet("map-refreshed", Date.now()), !mapId)
return !1;
let init90 = (mapData5) => (setGlobal("mapper", {
mapData: mapData5,
mapModel: new hg.models.TreasureMapModel(mapData5)
}), doEvent2("mapper_loaded", mapData5), data), data = yield getMapData(mapId, !0);
return data ? init90(data) : !1;
}), initMapper = (map) => {
if (!map || !map.map_id || !map.map_type)
return;
let content = document.querySelector(".treasureMapRootView-content");
if (content && content.classList.contains("loading")) {
let observer = new MutationObserver((mutations, mObserver) => {
mutations.forEach((mutation) => {
mutation.type === "attributes" && mutation.attributeName === "class" && !mutation.target.classList.contains("loading") && (mObserver.disconnect(), initMapper(map));
});
}), rootOfChanges = document.querySelector(".treasureMapRootView");
observer.observe(rootOfChanges, {
attributes: !0,
childList: !0,
subtree: !0
});
}
addSortedMapTab(), document.querySelectorAll(".treasureMapRootView-subTab").forEach((tab) => {
tab.addEventListener("click", () => {
addBlockClasses(), doEvent2("map_tab_click", map), doEvent2(`map_${tab.getAttribute("data-type")}_tab_click`, map);
});
}), doEvent2("map_show_goals_tab_click", map), getSetting("better-maps.default-to-sorted", !1) && !map.is_complete && doEvent2("map_sorted_tab_click", map), addBlockClasses();
}, intercept = () => {
parentShowMap || (parentShowMap = hg.controllers.TreasureMapController.showMap, hg.controllers.TreasureMapController.showMap = (id = !1) => __async(void 0, null, function* () {
var _a, _b;
parentShowMap(id);
let intercepted = yield interceptMapRequest(id != null ? id : (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRelicHunter) == null ? void 0 : _b.default_map_id);
setTimeout(() => {
var _a2, _b2;
intercepted || interceptMapRequest(id != null ? id : (_b2 = (_a2 = user == null ? void 0 : user.quests) == null ? void 0 : _a2.QuestRelicHunter) == null ? void 0 : _b2.default_map_id);
}, 1e3);
}), onRequest("users/treasuremap.php", (data) => {
data.treasure_map && data.treasure_map.map_id && setMapData(data.treasure_map.map_id, data.treasure_map);
}, !0), onRequest("board/board.php", (data) => {
data.treasure_map && data.treasure_map.map_id && setMapData(data.treasure_map.map_id, data.treasure_map);
}, !0));
}, clearStickyMouse = () => {
let sticky = document.querySelector(".treasureMapView-highlight");
sticky && (sticky.classList.remove("sticky"), sticky.classList.remove("active"));
let mapGroupGoal = document.querySelectorAll(".treasureMapView-goals-group-goal");
mapGroupGoal && mapGroupGoal.forEach((goal) => {
goal.classList.remove("sticky");
});
}, updateRelicHunterHint = () => __async(void 0, null, function* () {
let relicHunter = document.querySelector(".treasureMapInventoryView-relicHunter-hint");
if (!relicHunter)
return !1;
if (relicHunter.getAttribute("data-travel-button-added"))
return !0;
let relicHunterLocation = yield getRelicHunterLocation();
if (!relicHunterLocation || !relicHunterLocation.id)
return !1;
relicHunter.setAttribute("data-travel-button-added", !0), environments = yield getData("environments");
let environment = environments.find((e) => e.id === relicHunterLocation.id);
if (!environment)
return !0;
let hintWrapper = document.querySelector(".treasureMapInventoryView-relicHunter");
hintWrapper || (hintWrapper = relicHunter), makeElement("div", "treasureMapInventoryView-relicHunter-hintSuffix", `... in ${environment.article}.`, hintWrapper);
let travelButton = makeElement("div", ["mousehuntActionButton", "small"]);
return makeElement("span", "", "Travel", travelButton), travelButton.addEventListener("click", () => {
hg.utils.User.travel(environment.id);
}), hintWrapper.append(travelButton), !0;
}), relicHunterUpdate = () => __async(void 0, null, function* () {
_showInventory || (_showInventory = hg.controllers.TreasureMapController.showInventory, hg.controllers.TreasureMapController.showInventory = () => __async(void 0, null, function* () {
_showInventory();
let didRelicHunter = yield updateRelicHunterHint();
if (didRelicHunter)
return;
let tries = 0, interval = setInterval(() => __async(void 0, null, function* () {
tries++, didRelicHunter = yield updateRelicHunterHint(), (didRelicHunter || tries >= 5) && clearInterval(interval);
}), 500);
}));
}), addClearCacheTimeout = () => {
let clearCacheTimeout;
onDialogShow("map", () => __async(void 0, null, function* () {
document.querySelectorAll(".treasureMapRootView-header-navigation-item").forEach((tab) => {
let classes = [...tab.classList];
classes.includes("active") && doEvent2("map_navigation_tab_click", classes.find((c) => c !== "treasureMapRootView-header-navigation-item").trim()), tab.addEventListener("click", () => {
doEvent2("map_navigation_tab_click", classes.find((c) => c !== "treasureMapRootView-header-navigation-item" && c !== "active").trim());
});
}), clearCacheTimeout = setTimeout(() => {
clearTimeout(clearCacheTimeout), hg.controllers.TreasureMapController.clearMapCache();
}, 30 * 1e3);
}));
}, clearMapCache = () => {
let clearCacheTimeout;
onDialogShow("map", () => __async(void 0, null, function* () {
document.querySelectorAll(".treasureMapRootView-header-navigation-item").forEach((tab) => {
let classes = [...tab.classList];
classes.includes("active") && doEvent2("map_navigation_tab_click", classes.find((c) => c !== "treasureMapRootView-header-navigation-item").trim()), tab.addEventListener("click", () => {
doEvent2("map_navigation_tab_click", classes.find((c) => c !== "treasureMapRootView-header-navigation-item" && c !== "active").trim());
});
}), clearTimeout(clearCacheTimeout), clearCacheTimeout = setTimeout(() => {
hg.controllers.TreasureMapController.clearMapCache();
}, 30 * 1e3);
}));
}, addInfoClasses = (mapData5) => {
let mapRoot = document.querySelector(".treasureMapRootView-content .treasureMapView");
mapRoot && (mapData5 != null && mapData5.is_complete && mapRoot.classList.add("mh-ui-map-completed"), mapData5 != null && mapData5.is_upgradeable && mapRoot.classList.add("mh-ui-map-upgradeable"), mapData5 != null && mapData5.is_upgraded && mapRoot.classList.add("mh-ui-map-upgraded"), mapData5 != null && mapData5.can_claim_reward && mapRoot.classList.add("mh-ui-map-claimable"), mapData5 != null && mapData5.can_send_invites && mapRoot.classList.add("mh-ui-map-can-invite"), mapData5 != null && mapData5.viewing_user_is_on_map && mapRoot.classList.add("mh-ui-user-on-map"), mapData5 != null && mapData5.is_owner && mapRoot.classList.add("mh-ui-user-is-owner"));
}, init40 = () => __async(void 0, null, function* () {
addStyles(styles6, "better-maps"), eventRegistry.addEventListener("map_sorted_tab_click", (map) => {
addInfoClasses(map), showSortedTab(map);
}), eventRegistry.addEventListener("map_show_goals_tab_click", (map) => {
addInfoClasses(map), showGoalsTab(map);
}), eventRegistry.addEventListener("map_manage_allies_tab_click", (map) => {
addInfoClasses(map), showHuntersTab(map);
}), eventRegistry.addEventListener("map_tab_click", (map) => {
hideGoalsTab(map), hideSortedTab(map), clearStickyMouse(), addInfoClasses(map);
}), eventRegistry.addEventListener("mapper_loaded", initMapper), intercept(), addClearCacheTimeout(), relicHunterUpdate(), scrolls_default(), shops_default2(), getSetting("better-maps.community") && community_default(), getSetting("no-sidebar", !0) && getSetting("better-maps.show-sidebar-goals", !0) || sidebar_default4(), clearMapCache(), onEvent("map_navigation_tab_click", (tab) => {
addBlockClasses(), updateMapClasses(), maybeShowInvitesTab(tab);
}), onRequest("users/treasuremap.php", () => {
addBlockClasses(), updateMapClasses();
}), floating_islands_default2();
}), better_maps_default = {
id: "better-maps",
name: "Better Maps",
type: "better",
default: !0,
description: "Add features to maps such as updated styles, attraction rates, a sorted tab categorizing various maps, and displaying more information on the various tabs.",
load: init40,
settings: settings_default17
};
}
});
var styles_default39, init_styles40 = __esm({
"src/modules/unique-loot-count/styles.css"() {
styles_default39 = `.uniqueLootCount{margin-left:5px}
`;
}
});
var updateSection, addUniqueLootCount, init41, unique_loot_count_default, init_unique_loot_count = __esm({
"src/modules/unique-loot-count/index.js"() {
init_utils2();
init_styles40();
updateSection = (selector) => __async(void 0, null, function* () {
let section = document.querySelector(`#overlayPopup.hunting_summary .${selector}`);
if (!section || section.querySelector(".uniqueLootCount"))
return;
let loots = section.querySelectorAll("a"), count2 = makeElement("span", "uniqueLootCount", `(${loots.length} unique)`);
section.querySelector(".label").append(count2);
}), addUniqueLootCount = () => __async(void 0, null, function* () {
[
"environmentContainer",
"baitContainer",
"lootContainer"
].forEach((section) => updateSection(section));
}), init41 = () => __async(void 0, null, function* () {
addStyles(styles_default39, "unique-loot-count"), onDialogShow("hunting_summary", () => setMultipleTimeout(addUniqueLootCount, 500, 1e3, 3e3));
}), unique_loot_count_default = {
id: "unique-loot-count",
name: "Unique Loot Count",
type: "feature",
default: !0,
description: "Show the number of unique loot items in the progress log.",
load: init41
};
}
});
var settings_default18, init_settings19 = __esm({
"src/modules/custom-css/settings/index.js"() {
settings_default18 = () => __async(void 0, null, function* () {
return [{
id: "override-styles",
title: "Custom Styles",
default: "",
description: 'Apply <a href="https://github.com/MHCommunity/mousehunt-improved/wiki/Custom-CSS" target="_blank" rel="noopener noreferrer">Custom CSS</a>.',
settings: {
type: "textarea"
}
}];
});
}
});
var init42, custom_css_default, init_custom_css = __esm({
"src/modules/custom-css/index.js"() {
init_utils2();
init_settings19();
init42 = () => __async(void 0, null, function* () {
onEvent("mh-improved-loaded", () => {
if (window.location.search.includes("no-custom-styles"))
return;
let customStyles = getSetting("override-styles");
customStyles && addStyles(customStyles, "mousehunt-improved-override-styles");
});
}), custom_css_default = {
id: "custom-css",
type: "advanced",
alwaysLoad: !0,
load: init42,
settings: settings_default18
};
}
});
var styles_default40, init_styles41 = __esm({
"src/modules/hide-daily-draw/styles.css"() {
styles_default40 = `#messengerUINotification .tabs a[data-tab=daily_draw]{display:none}
`;
}
});
var _togglePopup, replaceInboxOpen, isSelfRequest, lastRequest2, removeDailyDrawNotifications, init43, hide_daily_draw_default, init_hide_daily_draw = __esm({
"src/modules/hide-daily-draw/index.js"() {
init_utils2();
init_styles41();
replaceInboxOpen = () => {
var _a, _b;
!messenger || !((_b = (_a = messenger == null ? void 0 : messenger.UI) == null ? void 0 : _a.notification) != null && _b.togglePopup) || (_togglePopup || (_togglePopup = messenger.UI.notification.togglePopup), messenger.UI.notification.togglePopup = () => {
messenger.UI.notification.showPopup(), messenger.UI.notification.setActiveTab("general"), messenger.UI.notification.showTab("general"), onEvent("ajax_response", () => {
setMultipleTimeout(() => {
messenger.UI.notification.showTab("general");
}, [10, 100]);
}, !0);
});
}, isSelfRequest = !1, removeDailyDrawNotifications = (data) => __async(void 0, null, function* () {
var _a, _b, _c;
if (isSelfRequest || lastRequest2 && Date.now() - lastRequest2 < 2e3 || !(data != null && data.messageData) || !((_a = data == null ? void 0 : data.messageData) != null && _a.notification))
return;
lastRequest2 = Date.now();
let messageBar = document.querySelector("#hgbar_messages");
if (!messageBar || !messageBar.classList.contains("new"))
return;
let displayedNotificationsEl = messageBar.querySelector(".mousehuntHeaderView-menu-notification");
if (!displayedNotificationsEl)
return;
let displayedNotifications = Number.parseInt(displayedNotificationsEl.innerText, 10);
if (displayedNotifications <= 0)
return;
let notification = data.messageData.notification || {};
if (((notification == null ? void 0 : notification.messageCount) || 0) <= 0)
return;
isSelfRequest = !0;
let notificationData = yield doRequest("managers/ajax/users/messages.php", {
action: "fetch_messages",
"message_types[]": "notification"
});
isSelfRequest = !1;
let notificationsToSubtract = 0;
if ((_c = (_b = notificationData == null ? void 0 : notificationData.messageData) == null ? void 0 : _b.notification) == null || _c.messages.forEach((message) => {
var _a2;
message != null && message.isNew && ((_a2 = message == null ? void 0 : message.messageData) == null ? void 0 : _a2.tab) === "Daily Draw" && notificationsToSubtract++;
}), notificationsToSubtract <= 0)
return;
let newDisplayedNotifications = displayedNotifications - notificationsToSubtract;
newDisplayedNotifications <= 0 && messageBar.classList.remove("new"), displayedNotificationsEl.innerText = newDisplayedNotifications;
}), init43 = () => __async(void 0, null, function* () {
addStyles(styles_default40, "hide-daily-draw"), typeof messenger != "undefined" && replaceInboxOpen(), setTimeout(removeDailyDrawNotifications, 1e3), onRequest("*", removeDailyDrawNotifications);
}), hide_daily_draw_default = {
id: "hide-daily-draw",
name: "Hide Daily Draw",
type: "element-hiding",
default: !1,
description: "Hide the Daily Draw inbox tab and notifications.",
load: init43
};
}
});
var recursiveFetch, addDownloadToButton, addJsonDownloadToButton, addCsvDownloadToButton, getFormattedDate, addDownloadButtons, resultReducer, updateSingleTotalEl, exportPopup, init_utils5 = __esm({
"src/modules/data-exporters/utils.js"() {
init_utils2();
recursiveFetch = (data, callbackToRun) => data.reduce((promiseChain, item) => promiseChain.then((chainResults) => new Promise((resolve) => {
callbackToRun(item).then((currentResult) => {
chainResults.push(currentResult), resolve(chainResults);
});
})), Promise.resolve([])), addDownloadToButton = (opts, callback) => {
let { buttonSelector, results, filename, beforeDownload } = opts, exportButton = document.querySelector(buttonSelector);
exportButton.classList.remove("disabled"), exportButton.addEventListener("click", () => {
beforeDownload && (results = opts.beforeDownload()), callback(results, filename);
});
}, addJsonDownloadToButton = (opts) => {
addDownloadToButton(opts, (results, filename) => {
let data = JSON.stringify({
type: opts.type,
generated: (/* @__PURE__ */ new Date()).toISOString(),
data: results
}), blob = new Blob([data], { type: "application/json" }), url = URL.createObjectURL(blob), link = document.createElement("a");
link.download = `${filename}.json`, link.href = url, link.click(), URL.revokeObjectURL(url);
});
}, addCsvDownloadToButton = (opts) => {
addDownloadToButton(opts, (results, filename) => {
opts.reduceResults && (results = resultReducer(results));
let csv = results.map((row) => Object.values(row).map((value) => `"${value}"`).join(",")).join(`
`);
opts.headers && (csv = `${opts.headers.join(",")}
${csv}`);
let blob = new Blob([csv], { type: "text/csv" }), url = URL.createObjectURL(blob), link = document.createElement("a");
link.download = `${filename}.csv`, link.href = url, link.click(), URL.revokeObjectURL(url);
});
}, getFormattedDate = () => {
let date = /* @__PURE__ */ new Date();
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
}, addDownloadButtons = (opts) => {
let { type: type2, results, headers, reduceResults } = opts, filename = `${type2}-${getFormattedDate()}`, buttonSelector = `#export-${type2}`;
addJsonDownloadToButton({
buttonSelector,
type: type2,
results,
filename
}), addCsvDownloadToButton({
buttonSelector: `${buttonSelector}-csv`,
results,
filename,
headers,
reduceResults
});
}, resultReducer = (results) => results.reduce((acc, { category, items: items6 }) => (items6.forEach((data) => {
acc.push(__spreadValues({
region: category
}, data));
}), acc), []), updateSingleTotalEl = (results) => {
let totalItemsEl = document.querySelector(".export-items-footer .total-items");
if (!totalItemsEl)
return;
let totalItems = results.reduce((acc, { items: items6 }) => acc + items6.length, 0);
totalItemsEl.textContent = totalItems.toLocaleString();
}, exportPopup = (opts) => {
let {
type: type2,
text,
headerMarkup,
itemsMarkup,
footerMarkup,
fetch: fetch6,
afterFetch: afterFetch5,
download,
updateSingleTotal,
dataIsAvailable
} = opts;
createPopup({
title: `Export ${text}`,
content: `
<div class="export-wrapper ${type2}">
<div class="export-items-header item-wrapper ${headerMarkup ? "" : "hidden"}">
${headerMarkup || ""}
</div>
<div class="export-items-wrapper ${itemsMarkup ? "" : "hidden"}">
${itemsMarkup || ""}
</div>
<div class="export-items-footer item-wrapper ${footerMarkup ? "" : "hidden"}">
${footerMarkup || ""}
</div>
<div class="actions-wrapper">
<div class="mousehuntActionButton tiny lightBlue" id="export-back">
<span>Back</span>
</div>
<div class="mousehuntActionButton tiny fetch-data ${dataIsAvailable ? "hidden" : ""}" id="fetch-${type2}">
<span>Fetch ${text}</span>
</div>
<div class="mousehuntActionButton tiny ${dataIsAvailable ? "" : "disabled"} export-json" id="export-${type2}">
<span>Export as JSON</span>
</div>
<div class="mousehuntActionButton tiny ${dataIsAvailable ? "" : "disabled"} export-csv" id="export-${type2}-csv">
<span>Export as CSV</span>
</div>
</div>
</div>`
});
let exportBackButton = document.querySelector("#export-back");
if (!exportBackButton)
return;
exportBackButton.addEventListener("click", () => {
doEvent2("show-export-data");
});
let fetchButton = document.querySelector(`#fetch-${type2}`);
fetchButton && (fetchButton.addEventListener("click", () => {
fetchButton.classList.add("disabled"), fetch6().then((results) => {
afterFetch5 && afterFetch5(results), updateSingleTotal && updateSingleTotalEl(results), addDownloadButtons(__spreadValues({
results,
type: type2
}, download)), fetchButton.classList.remove("disabled");
});
}), dataIsAvailable && fetchButton.click());
};
}
});
var hasFavoriteSetupsUserscript, fetch2, afterFetch, exportFavoriteSetupsUserscript, init_export_favorite_setups_userscript = __esm({
"src/modules/data-exporters/exporters/export-favorite-setups-userscript.js"() {
init_utils5();
hasFavoriteSetupsUserscript = () => localStorage.getItem("favorite-setups-saved"), fetch2 = () => __async(void 0, null, function* () {
let setups = JSON.parse(localStorage.getItem("favorite-setups-saved")), flattenedSetups = [];
for (let setupName in setups) {
let setup = setups[setupName];
flattenedSetups.push({
name: setupName,
bait: setup.bait,
base: setup.base,
weapon: setup.weapon,
trinket: setup.trinket,
skin: setup.skin,
location: setup.location,
sort: setup.sort
});
}
return flattenedSetups;
}), afterFetch = (data) => {
let totalItemsEl = document.querySelector(".export-items-footer .total-items");
totalItemsEl.textContent = data.length.toLocaleString();
}, exportFavoriteSetupsUserscript = () => {
exportPopup({
type: "favorite-setups-saved",
text: "Favorite Setups (userscript)",
footerMarkup: '<div class="region-name">Total Values</div><div class="total-items">-</div>',
fetch: fetch2,
afterFetch,
dataIsAvailable: !0,
download: {
headers: [
"Name",
"Bait",
"Base",
"Weapon",
"Trinket",
"Skin",
"Location",
"Sort"
]
}
});
};
}
});
var hasRankupForecaster, fetch3, afterFetch2, exportRankupForecaster, init_export_rankup_forecaster = __esm({
"src/modules/data-exporters/exporters/export-rankup-forecaster.js"() {
init_utils5();
hasRankupForecaster = () => localStorage.getItem("Chro-forecaster-time"), fetch3 = () => __async(void 0, null, function* () {
return JSON.parse(localStorage.getItem("Chro-forecaster-time"));
}), afterFetch2 = (data) => {
let totalItemsEl = document.querySelector(".export-items-footer .total-items");
totalItemsEl.textContent = data.length.toLocaleString();
}, exportRankupForecaster = () => {
exportPopup({
type: "rankup-forecaster-history",
text: "Rankup Forecaster History",
footerMarkup: '<div class="region-name">Total Values</div><div class="total-items">-</div>',
fetch: fetch3,
afterFetch: afterFetch2,
dataIsAvailable: !0,
download: {
headers: ["Date", "Wisdom"]
}
});
};
}
});
var fetch4, afterFetch3, exportFavoriteSetups, export_favorite_setups_default, init_export_favorite_setups = __esm({
"src/modules/data-exporters/exporters/export-favorite-setups.js"() {
init_utils5();
init_utils2();
fetch4 = () => __async(void 0, null, function* () {
return getSetting("favorite-setups.setups").map((setup) => ({
id: setup.id || 0,
name: setup.name || "",
location: setup.location || "",
bait_id: setup.bait_id || 0,
base_id: setup.base_id || 0,
trinket_id: setup.trinket_id || 0,
weapon_id: setup.weapon_id || 0,
power_type: setup.power_type || ""
}));
}), afterFetch3 = (data) => {
let totalItemsEl = document.querySelector(".export-items-footer .total-items");
totalItemsEl.textContent = data.length.toLocaleString();
}, exportFavoriteSetups = () => {
exportPopup({
type: "favorite-setups",
text: "Favorite Setups",
footerMarkup: '<div class="region-name">Total Values</div><div class="total-items">-</div>',
fetch: fetch4,
afterFetch: afterFetch3,
dataIsAvailable: !0,
download: {
headers: [
"ID",
"Name",
"Location",
"Bait ID",
"Base ID",
"Trinket ID",
"Weapon ID",
"Power Type"
]
}
});
}, export_favorite_setups_default = exportFavoriteSetups;
}
});
var itemCategories, getData2, exportInventory, export_inventory_default, init_export_inventory = __esm({
"src/modules/data-exporters/exporters/export-inventory.js"() {
init_utils2();
init_utils5();
itemCategories = [
{ id: "weapon", name: "Weapons" },
{ id: "base", name: "Bases" },
{ id: "trinket", name: "Charms" },
{ id: "bait", name: "Cheeses" },
{ id: "skin", name: "Skins" },
{ id: "crafting_item", name: "Crafting Items" },
{ id: "convertible", name: "Convertible Items" },
{ id: "potion", name: "Potions" },
{ id: "stat", name: "Misc. Items" },
{ id: "collectible", name: "Collectibles" },
{ id: "map_piece", name: "Map Pieces" },
{ id: "adventure", name: "Adventure Items" }
], getData2 = (classification) => __async(void 0, null, function* () {
let totalItemsEl = document.querySelector(`.item-wrapper[data-region="${classification.id}"]`).querySelector(".total-items");
totalItemsEl.textContent = "\u2026", totalItemsEl.scrollIntoView({
behavior: "smooth",
block: "nearest"
});
let response = yield doRequest("managers/ajax/users/userInventory.php", {
action: "get_items_by_classification",
"classifications[]": classification.id
}), items6 = [];
return response.items.forEach((item) => {
let itemData = {
item_id: item.item_id || 0,
type: item.type || "",
name: item.name || "",
classification: item.classification || classification.id,
quantity: item.quantity || 0,
thumbnail: item.thumbnail || "",
limited_edition: item.limited_edition || !1,
is_tradable: item.is_tradable || !1,
is_givable: item.is_givable || !1
};
items6.push(itemData), totalItemsEl.textContent = items6.length.toLocaleString();
}), {
category: classification.name,
items: items6
};
}), exportInventory = () => {
let inventoryMarkup = "";
itemCategories.forEach((region) => {
inventoryMarkup += `<div class="item-wrapper inventory" data-region="${region.id}">
<div class="region-name">${region.name}</div>
<div class="total-items">-</div>
</div>`;
}), exportPopup({
type: "inventory",
text: "Inventory",
headerMarkup: '<div class="region-name">Category</div><div class="total-items">Items</div>',
itemsMarkup: inventoryMarkup,
footerMarkup: '<div class="region-name">Total</div><div class="total-items">0</div>',
/**
* Fetch the data for the inventory.
*
* @return {Promise} The promise that resolves when the data is fetched.
*/
fetch: () => recursiveFetch(itemCategories, getData2),
updateSingleTotal: !0,
download: {
headers: [
"Category",
"Item ID",
"Item Type",
"Item Name",
"Classification",
"Quantity",
"Thumbnail",
"Limited Edition",
"Tradable",
"Givable"
],
reduceResults: !0
}
});
}, export_inventory_default = exportInventory;
}
});
var fetch5, afterFetch4, exportJournalEntries, export_journal_entries_default, init_export_journal_entries = __esm({
"src/modules/data-exporters/exporters/export-journal-entries.js"() {
init_utils2();
init_utils5();
fetch5 = () => __async(void 0, null, function* () {
let journalEntries2 = yield dbGetAll("journal");
return journalEntries2.sort((a, b) => b.id - a.id), journalEntries2.map((entry) => {
var _a, _b, _c, _d, _e, _f;
return {
id: ((_a = entry == null ? void 0 : entry.data) == null ? void 0 : _a.id) || 0,
date: ((_b = entry == null ? void 0 : entry.data) == null ? void 0 : _b.date) || "",
location: ((_c = entry == null ? void 0 : entry.data) == null ? void 0 : _c.location) || "",
text: ((_d = entry == null ? void 0 : entry.data) == null ? void 0 : _d.text) || "",
type: ((_e = entry == null ? void 0 : entry.data) == null ? void 0 : _e.type) || "",
mouse: ((_f = entry == null ? void 0 : entry.data) == null ? void 0 : _f.mouse) || ""
};
});
}), afterFetch4 = (data) => {
let totalItemsEl = document.querySelector(".export-items-footer .total-items");
totalItemsEl.textContent = data.length.toLocaleString();
}, exportJournalEntries = () => {
exportPopup({
type: "journal-entries",
text: "Journal Entries",
footerMarkup: '<div class="region-name">Total Values</div><div class="total-items">-</div>',
fetch: fetch5,
afterFetch: afterFetch4,
dataIsAvailable: !0,
download: {
headers: [
"ID",
"Date",
"Location",
"Text",
"Type",
"Mouse"
]
}
});
}, export_journal_entries_default = exportJournalEntries;
}
});
var fetchPage, fetchTransactions, exportMarketplace, export_marketplace_default, init_export_marketplace = __esm({
"src/modules/data-exporters/exporters/export-marketplace.js"() {
init_utils2();
init_utils5();
fetchPage = (page) => __async(void 0, null, function* () {
let response = yield doRequest("managers/ajax/users/marketplace.php", {
action: "get_my_history",
page
});
return (response == null ? void 0 : response.marketplace_history) || [];
}), fetchTransactions = () => __async(void 0, null, function* () {
var _a;
let totalItemsEl = document.querySelector(".export-items-footer .total-items");
totalItemsEl.textContent = "\u2026", totalItemsEl.scrollIntoView({
behavior: "smooth",
block: "nearest"
});
let page = 1, response, transactions = [];
page = Number.parseInt(sessionGet("export-marketplace-page"), 10) || 1, transactions = sessionGet("export-marketplace-transactions", []);
let tradableItems = yield getData("items-tradable");
do {
response = yield fetchPage(page);
for (let item of response)
transactions.push({
listing_id: item.listing_id,
listing_type: item.listing_type,
item_id: item.item_id,
item_name: ((_a = tradableItems.find(({ id }) => id === item.item_id)) == null ? void 0 : _a.name) || "",
initial_quantity: item.initial_quantity,
remaining_quantity: item.remaining_quantity,
unit_price: item.unit_price,
unit_price_without_tariff: item.unit_price_without_tariff,
total_price: item.total_price,
total_price_without_tariff: item.total_price_without_tariff,
average: item.average,
is_active: item.is_active === "1",
date_updated: item.date_updated,
date_closed: item.date_closed
});
yield new Promise((resolve) => setTimeout(resolve, 100)), page++, sessionSet("export-marketplace-page", page), sessionSet("export-marketplace-transactions", transactions), totalItemsEl.textContent = transactions.length.toLocaleString();
} while (response.length > 0);
return transactions;
}), exportMarketplace = () => {
exportPopup({
type: "marketplace-transactions",
text: "Marketplace Transactions",
footerMarkup: '<div class="region-name">Total Transactions</div><div class="total-items">0</div>',
fetch: fetchTransactions,
download: {
headers: [
"Listing ID",
"Listing Type",
"Item ID",
"Item Name",
"Initial Quantity",
"Remaining Quantity",
"Unit Price",
"Unit Price Without Tariff",
"Total Price",
"Total Price Without Tariff",
"Average",
"Is Active",
"Date Updated",
"Date Closed"
]
}
});
}, export_marketplace_default = exportMarketplace;
}
});
var seenMice, getWeight, getWeightFormatted, getDataForRegion, processWeights, groups, regions, exportMicePopup, exportType, exportMice, export_mice_default, init_export_mice = __esm({
"src/modules/data-exporters/exporters/export-mice.js"() {
init_utils2();
init_utils5();
seenMice = [], getWeight = (weight) => {
weight = weight.toString().replaceAll(",", "").trim();
let ozSplit = weight.split(" oz."), lbSplit = weight.split(" lb."), weightOz = 0;
if (ozSplit.length === 1 && lbSplit.length === 1 && (weightOz = Number.parseFloat(weight)), ozSplit.length > 1)
weightOz = Number.parseFloat(ozSplit[0].trim());
else if (lbSplit.length > 1) {
let lb = Number.parseInt(lbSplit[0].trim(), 10), oz = Number.parseFloat(lbSplit[1].trim());
weightOz = lb * 16 + oz;
}
return weightOz;
}, getWeightFormatted = (weight) => {
let weightOz = getWeight(weight), weightLbs = Math.floor(weightOz / 16), weightOzRemainder = weightOz % 16;
return weightLbs > 0 ? `${weightLbs.toLocaleString()} lb. ${weightOzRemainder} oz.` : `${weightOzRemainder} oz.`;
}, getDataForRegion = (region) => __async(void 0, null, function* () {
var _a, _b;
let regionEl = document.querySelector(`.item-wrapper[data-region="${region.id}"]`);
regionEl && regionEl.scrollIntoView({
behavior: "smooth",
block: "nearest"
});
let miceCaughtEl = regionEl.querySelector(".mice-caught"), totalCatchesEl = regionEl.querySelector(".total-catches"), totalWeightEl = regionEl.querySelector(".total-weight");
miceCaughtEl.textContent = "\u2026", totalCatchesEl.textContent = "\u2026", totalWeightEl.textContent = "\u2026";
let action, view;
exportType === "group" ? (action = "get_group", view = "ViewMouseListGroups") : (action = "get_environment", view = "ViewMouseListEnvironments");
let miceData = yield doRequest("managers/ajax/mice/mouse_list.php", {
action,
category: region.id,
user_id: user.user_id,
display_mode: "stats",
view
}), mice = (_b = (_a = miceData == null ? void 0 : miceData.mouse_list_category) == null ? void 0 : _a.subgroups) == null ? void 0 : _b.reduce((acc, cur) => [...acc, ...cur.mice], []), weights = [], totalCatches = 0, totalWeight = 0, regionSubtract = 0;
return mice.forEach((mouse) => {
if (exportType === "region" && seenMice.includes(mouse.type)) {
regionSubtract++;
return;
}
seenMice.push(mouse.type), mouse.num_catches = Number.parseInt(mouse.num_catches.toString().replace(",", ""), 10);
let avgWeight = getWeight(mouse.avg_weight);
totalCatches += mouse.num_catches, totalWeight += avgWeight * mouse.num_catches;
let mouseWeight = {
groupName: region.name,
name: mouse.name,
type: mouse.type,
crown: mouse.crown,
catches: mouse.num_catches,
misses: mouse.num_misses,
avgWeight,
avgWeightFormatted: getWeightFormatted(mouse.avg_weight),
heaviest: getWeight(mouse.heaviest_catch),
heaviestFormatted: getWeightFormatted(mouse.heaviest_catch)
};
weights.push(mouseWeight), miceCaughtEl.textContent = `${miceData.mouse_list_category.caught}/${miceData.mouse_list_category.total}`;
let totalCatchesFormatted = totalCatches.toLocaleString();
totalCatchesEl.textContent = totalCatchesFormatted;
let totalWeightLbs = Math.floor(totalWeight / 16), totalWeightOz = totalWeight % 16, totalWeightLbsFormatted = totalWeightLbs.toLocaleString();
totalWeightEl.textContent = totalWeightLbs > 0 ? `${totalWeightLbsFormatted} lb. ${totalWeightOz} oz` : `${totalWeightOz} oz`;
}), {
category: region.id,
regionName: region.name,
caughtMice: miceData.mouse_list_category.caught - regionSubtract,
uniqueMice: miceData.mouse_list_category.total - regionSubtract,
totalCatches,
totalWeight,
items: weights
};
}), processWeights = (results) => {
seenMice = [];
let totalUniqueMiceEl = document.querySelector(".export-items-footer .mice-caught"), totalCatchesEl = document.querySelector(".export-items-footer .total-catches"), totalWeightEl = document.querySelector(".export-items-footer .total-weight");
if (!totalUniqueMiceEl || !totalCatchesEl || !totalWeightEl)
return;
let totals = results.reduce((acc, { caughtMice, uniqueMice, totalCatches, totalWeight }) => (acc.caughtMice += caughtMice, acc.uniqueMice += uniqueMice, acc.totalCatches += totalCatches, acc.totalWeight += totalWeight, acc), {
caughtMice: 0,
uniqueMice: 0,
totalCatches: 0,
totalWeight: 0
});
totalUniqueMiceEl.textContent = `${totals.caughtMice}/${totals.uniqueMice}`, totalCatchesEl.textContent = totals.totalCatches.toLocaleString(), totalWeightEl.textContent = getWeightFormatted(totals.totalWeight);
}, groups = [], regions = [], exportMicePopup = () => {
let itemTypes, title;
exportType === "group" ? (title = "Group", itemTypes = groups) : exportType === "region" ? (title = "Region", itemTypes = regions) : (title = "Location", itemTypes = environments);
let itemsMarkup = "";
itemTypes.forEach((region) => {
itemsMarkup += `<div class="item-wrapper" data-region="${region.id}">
<div class="region-name">${region.name}</div>
<div class="mice-caught">0/0</div>
<div class="total-catches">0</div>
<div class="total-weight">0</div>
</div>`;
}), exportPopup({
type: `mouse-stats_${exportType}`,
text: `Mouse Stats by ${exportType === "group" ? "Group" : "Region"}`,
headerMarkup: `<div class="region-name">Group</div>
<div class="mice-caught">Unique Mice</div>
<div class="total-catches">Total Catches</div>
<div class="total-weight">Total Weight</div>`,
itemsMarkup,
footerMarkup: `<div class="region-name">Total</div>
<div class="mice-caught">0/0</div>
<div class="total-catches">0</div>
<div class="total-weight">0</div>`,
fetch: () => recursiveFetch(itemTypes, getDataForRegion),
afterFetch: processWeights,
download: {
headers: [
`${title} ID`,
title,
"Name",
"Type",
"Crown",
"Catches",
"Misses",
"Avg. Weight (oz)",
"Avg. Weight",
"Heaviest (oz)",
"Heaviest"
],
reduceResults: !0
}
});
}, exportMice = (type2) => __async(void 0, null, function* () {
exportType = type2, regions = yield getData("mice-regions"), groups = yield getData("mice-groups"), environments = yield getData("environments"), exportMicePopup();
}), export_mice_default = exportMice;
}
});
var getScoreboardData, exportScoreboards, export_scoreboards_default, init_export_scoreboards = __esm({
"src/modules/data-exporters/exporters/export-scoreboards.js"() {
init_utils2();
init_utils5();
getScoreboardData = (scoreboard, useWeekly = !1, useFriendsOnly = !1) => __async(void 0, null, function* () {
var _a;
let totalItemsEl = document.querySelector(`.item-wrapper[data-region="${scoreboard.id}"] .total-items`);
totalItemsEl && (totalItemsEl.textContent = "\u2026", totalItemsEl.scrollIntoView({
behavior: "smooth",
block: "nearest"
}));
let response = yield doRequest("managers/ajax/pages/scoreboards.php", {
action: "get_page",
category: "main",
scoreboard: scoreboard.id,
page: 1,
weekly: useWeekly ? 1 : 0,
friends_only: useFriendsOnly ? 1 : 0,
search: ""
});
if (((_a = response.scoreboard_page) == null ? void 0 : _a.viewer_row) === null)
return totalItemsEl && (totalItemsEl.textContent = "-"), {
scoreboard: scoreboard.name,
rank: "",
value: ""
};
let entry = {
rank: response.scoreboard_page.viewer_row.rank,
points: response.scoreboard_page.viewer_row.points
}, rankSuffix = response.scoreboard_page.viewer_row.rank_formatted.replaceAll(/[\d\s]+/g, "");
return totalItemsEl && (totalItemsEl.textContent = `${entry.rank.toLocaleString()}${rankSuffix}`), {
scoreboard: scoreboard.name,
rank: entry.rank,
value: entry.points
};
}), exportScoreboards = (..._0) => __async(void 0, [..._0], function* ({ useWeekly = !1, useFriendsOnly = !1 } = {}) {
let inventoryMarkup = "", scoreboardsToUse = yield getData("scoreboards");
useWeekly && (scoreboardsToUse = scoreboards.filter((scoreboard) => scoreboard.weekly));
for (let region of scoreboardsToUse)
inventoryMarkup += `<div class="item-wrapper scoreboard" data-region="${region.id}">
<div class="region-name">${region.name}</div>
<div class="total-items">-</div>
</div>`;
exportPopup({
type: `scoreboard-rankings${useWeekly ? "-weekly" : ""}${useFriendsOnly ? "-friends" : ""}`,
text: `Scoreboard Rankings${useWeekly ? useFriendsOnly ? " (Weekly, Friends)" : " (Weekly)" : useFriendsOnly ? " (Friends)" : ""}`,
headerMarkup: '<div class="region-name">Scoreboard</div><div class="total-items">Place</div>',
itemsMarkup: inventoryMarkup,
fetch: () => recursiveFetch(scoreboardsToUse, (scoreboard) => getScoreboardData(scoreboard, useWeekly, useFriendsOnly)),
download: {
headers: ["Scoreboard", "Rank", "Value"]
}
});
}), export_scoreboards_default = exportScoreboards;
}
});
var styles_default41, init_styles42 = __esm({
"src/modules/data-exporters/styles.css"() {
styles_default41 = `#custom-submenu-item-export-data .icon{filter:sepia(1) brightness(.7)}.export-wrapper{display:flex;flex-direction:column;justify-content:space-around}.export-items-wrapper{max-height:70vh;overflow:auto;border:1px solid #7e7e7e}.item-wrapper{display:grid;grid-template-columns:2fr repeat(3,1fr);padding:3px 5px;margin-bottom:2px;font-size:11px}.inventory .item-wrapper,.scoreboard-rankings .item-wrapper,.rankup-forecaster-history .item-wrapper,.marketplace-transactions .item-wrapper{grid-template-columns:2fr 1fr}.item-wrapper .total-items{text-align:right}.item-wrapper:nth-child(odd){background-color:#e2e2e2}.item-wrapper.hidden{display:none}.item-wrapper.export-items-header,.item-wrapper.export-items-footer{padding:5px;margin-bottom:0;font-size:12px;text-align:center;background-color:#bcbcbc;border:1px solid #7e7e7e}.item-wrapper.export-items-header{border-bottom:none}.item-wrapper.export-items-footer{border-top:none}.rankup-forecaster-history .item-wrapper,.marketplace-transactions .item-wrapper{border-top:1px solid #7e7e7e}.export-items-header .region-name,.export-items-footer .region-name{text-align:left}.item-wrapper:last-child{margin-bottom:0}.actions-wrapper{display:grid;grid-template-columns:1fr 3fr 1fr 1fr;place-items:center end;margin-top:10px}.actions-wrapper .hidden{display:block;visibility:hidden}.actions-wrapper #export-back{justify-self:start}.actions-wrapper .fetch-data{justify-self:center}.mh-improved-export-data-landing{margin-left:20px;line-height:2;list-style:disc}.item-wrapper .mice-caught,.item-wrapper .total-catches{text-align:center}.item-wrapper .total-weight{text-align:right}
`;
}
});
var exportDataPopup, init44, data_exporters_default, init_data_exporters = __esm({
"src/modules/data-exporters/index.js"() {
init_utils2();
init_export_favorite_setups_userscript();
init_export_rankup_forecaster();
init_export_favorite_setups();
init_export_inventory();
init_export_journal_entries();
init_export_marketplace();
init_export_mice();
init_export_scoreboards();
init_styles42();
exportDataPopup = () => {
let exporters = [
{
id: "mouse-stats-by-group",
name: "Mouse Stats by Group",
callback: () => export_mice_default("group")
},
{
id: "mouse-stats-by-region",
name: "Mouse Stats by Region",
callback: () => export_mice_default("region")
},
{
id: "mouse-stats-by-location",
name: "Mouse Stats by Location",
callback: () => export_mice_default("location")
},
{
id: "inventory",
name: "Inventory",
callback: export_inventory_default
},
{
id: "marketplace-transactions",
name: "Marketplace Transactions",
callback: export_marketplace_default
},
{
id: "scoreboard-rankings",
name: "Scoreboard Rankings",
callback: () => export_scoreboards_default()
},
{
id: "scoreboard-rankings-weekly",
name: "Scoreboard Rankings (Weekly)",
callback: () => export_scoreboards_default({ useWeekly: !0 })
},
{
id: "scoreboard-rankings-friends",
name: "Scoreboard Rankings (Friends)",
callback: () => export_scoreboards_default({ useFriendsOnly: !0 })
},
{
id: "scoreboard-rankings-weekly-friends",
name: "Scoreboard Rankings (Weekly, Friends)",
callback: () => export_scoreboards_default({ useWeekly: !0, useFriendsOnly: !0 })
},
{
id: "journal-entries",
name: "Journal Entries",
callback: export_journal_entries_default
},
{
id: "favorite-setups",
name: "Favorite Setups",
callback: export_favorite_setups_default
}
];
hasFavoriteSetupsUserscript() && exporters.push({
id: "favorite-setups-userscript",
name: "Favorite Setups (userscript)",
callback: exportFavoriteSetupsUserscript
}), hasRankupForecaster() && exporters.push({
id: "rankup-forecaster-history",
name: "Rankup Forecaster History",
callback: exportRankupForecaster
});
let exporterList = "";
exporters.forEach(({ id, name }) => {
exporterList += `<li><a href="#" id="export-${id}">${name}</a></li>`;
}), createPopup({
title: "Export Data",
content: `<ul class="mh-improved-export-data-landing">${exporterList}</ul>`
}), exporters.forEach(({ id, callback }) => {
let button = document.querySelector(`#export-${id}`);
button && button.addEventListener("click", (e) => {
e.preventDefault(), callback();
});
});
}, init44 = () => __async(void 0, null, function* () {
addStyles(styles_default41, "data-exporters"), onEvent("show-export-data", exportDataPopup), addSubmenuItem({
menu: "kingdom",
label: "Export Data",
icon: "https://www.mousehuntgame.com/images/items/crafting_items/transparent_thumb/c6f39c2b522f114c788f5fb65e3ab8d7.png",
class: "export-data",
callback: exportDataPopup
});
}), data_exporters_default = {
id: "data-exporters",
name: "Data Exporters",
type: "feature",
default: !0,
description: "Export data from the game.",
load: init44
};
}
});
var styles_default42, init_styles43 = __esm({
"src/modules/hide-share/styles.css"() {
styles_default42 = `.actionportfolio,.canShare .larryTip,.journalactions a[data-share-type=journal],.journalactions a[data-type=journal],.pageSidebarView .fb-page,.socialLink,*[src="https://www.mousehuntgame.com//images/ui/buttons/share_green.gif"],#jsDialog-publishToOwnWall,.publishToWall,#OnboardArrow.onboardPopup.top .canShare .larryTip img{display:none}#OnboardArrow.onboardPopup.canShare .shareButton{display:none!important}#OnboardArrow.onboardPopup.canShare .closeButton{right:43px;left:unset;z-index:2}#OnboardArrow.onboardPopup.top .canShare .larryTip{color:#fff;background-color:#fff;border-color:#fff}
`;
}
});
var init45, hide_share_default, init_hide_share = __esm({
"src/modules/hide-share/index.js"() {
init_utils2();
init_styles43();
init45 = () => __async(void 0, null, function* () {
addStyles(styles_default42, "no-share"), SocialFramework.isFriendStreamPostsEnabled = () => !1;
}), hide_share_default = {
id: "no-share",
name: "Hide Share Buttons",
type: "element-hiding",
default: !0,
description: "Hide the share buttons.",
load: init45
};
}
});
var styles_default43, init_styles44 = __esm({
"src/modules/update-notifications/styles.css"() {
styles_default43 = `.mhui-update-banner{position:absolute;top:10px;z-index:11;width:352px;padding:10px;margin:10px 3px;background:linear-gradient(320deg,#e1fae9,#b0f5c6);background-color:#e1fae9;border:1px solid #6e7d73;border-radius:5px;box-shadow:1px 0 3px -1px #3d3d3d,0 2px 5px 1px #111}.mhui-update-banner-text{margin:10px 0 20px;font-size:16px;text-align:center}.mhui-update-banner-buttons{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:space-evenly}a.mhui-update-banner-button{border:1px solid #000}.banner-fade{opacity:1;transition:opacity .3s ease-in-out}.banner-fade-out{opacity:0}#overlayPopup.mh-improved-update-summary{margin-top:30px}#overlayPopup.mh-improved-update-summary .jsDialog.top,#overlayPopup.mh-improved-update-summary .jsDialog.bottom,#overlayPopup.mh-improved-update-summary .jsDialog.background,#overlayPopup.mh-improved-update-summary .jsDialogContainer .prefix,#overlayPopup.mh-improved-update-summary .jsDialogContainer .content,#overlayPopup.mh-improved-update-summary .jsDialogContainer .suffix{padding:0;margin:0;background:none;border:none}#overlayPopup.mh-improved-update-summary .jsDialog.top,#overlayPopup.mh-improved-update-summary .jsDialog.bottom{pointer-events:none}#overlayPopup.mh-improved-update-summary .jsDialogContainer{padding:0 20px;background-image:url(https://www.mousehuntgame.com/images/ui/newsposts/np_border.png);background-repeat:repeat-y;background-size:100%}#overlayPopup.mh-improved-update-summary .jsDialogContainer:before{position:absolute;top:-80px;right:0;left:0;z-index:-1;height:100px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/newsposts/np_header.png);background-repeat:no-repeat;background-size:100%}#overlayPopup.mh-improved-update-summary .jsDialogContainer:after{position:absolute;top:100%;right:0;left:0;height:126px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/newsposts/np_footer.png);background-repeat:no-repeat;background-size:100%}.mh-improved-update-summary-wrapper{margin:0 25px;line-height:1.5}.mh-improved-update-summary-body{display:grid;grid-template-columns:2fr 1fr;gap:30px}.mh-improved-update-summary h1{padding-bottom:5px;margin-top:-40px;font-size:1.75em;font-weight:700;color:#693312;text-align:center;text-decoration:underline;text-decoration-thickness:1px;text-decoration-color:#c1915a;text-underline-offset:10px}.mh-improved-update-summary h2{padding-bottom:3px;margin-bottom:3px;font-size:1.25em;font-weight:900;border-bottom:1px solid #c1915a}.mh-improved-update-summary-links{display:flex;flex-direction:column}.mh-improved-update-summary ul{margin:0 0 5px 25px;list-style:disc}.mh-improved-update-summary-buttons{display:flex;align-items:center;justify-content:center}.mh-improved-update-summary-links ul{font-size:1.125em;line-height:2}.mh-improved-update-summary-misc{margin-bottom:5px}.mh-improved-update-summary-content p,p.mh-improved-update-summary-content{font-size:12px}.mh-improved-update-summary-lists{display:grid;grid-template-columns:1fr;gap:0 10px;justify-items:stretch;max-height:55vh;padding:10px;margin-bottom:20px;overflow:auto;background:linear-gradient(#e9d5a2 30%,#0000) center top,linear-gradient(#0000,#e9d5a2 70%) center bottom,radial-gradient(farthest-side at 50% 0,#0006,#0000) center top,radial-gradient(farthest-side at 50% 100%,#0006,#0000) center bottom;background-repeat:no-repeat;background-attachment:local,local,scroll,scroll;background-size:100% 50px,100% 50px,100% 15px,100% 15px;border:1px solid #b07842}
`;
}
});
// dist/data/update-summary.json
var update_summary_default, init_update_summary = __esm({
"dist/data/update-summary.json"() {
update_summary_default = { summary: "Happy Halloween! This update includes a variety of bug fixes and optimizations, as well as some new features and improvements. The Spooky Shuffle helper userscript has been integrated, so please remove the userscript if you have it installed. Enjoy!", details: [{ title: "General", items: ["Updated data and cache storage to be more organized", "Optimized performance", "Fixed miscellaneous bugs"] }, { title: "Better Gifts", items: ["Added close button to gift confirmation popup"] }, { title: "Better Inventory", items: ["Fixed item views showing when interacting with items", "Fixed conflict with Qol userscript lock buttons"] }, { title: "Better Journal", items: ["Added support for formatted quantity X item style journal entries as loot list", "Updated styles and text replacements for some journal entries"] }, { title: "Better King's Reward", items: ["Optimized performance", "Fixed error being thrown in rare cases"] }, { title: "Better Maps", items: ["Fixed sidebar list trying to load when sidebar is hidden"] }, { title: "Better UI", items: ["Updated styles"] }, { title: "Catch Rate Estimator & Minlucks", items: ["Added 'Show catch rate indicator above trap view' option"] }, { title: "Custom Background", items: ["Fixed custom background not being applied during events"] }, { title: "Custom Horn", items: ["Fixed custom horn not being applied during events"] }, { title: "Custom Shield", items: ["Fixed custom shield not being applied during events"] }, { title: "Favorite Setups", items: ["Updated equipping to disarm bait/charm if setup is saved without them"] }, { title: "Location HUDs: Bountiful Beanstalk", items: ["Added 'Bountiful Beanstalk: Show quick Auto-Harp toggle' option", "Updated styles"] }, { title: "Location HUDs: Draconic Depths", items: ["Updated styles"] }, { title: "Location HUDs: School Of Sorcery", items: ["Updated styles"] }, { title: "Location HUDs: Event Locations", items: ["Updated Halloween HUD styles", "Added Spooky Shuffle tracker"] }, { title: "Native Dark Mode", items: ["Updated styles"] }] };
}
});
var makeDetailsList, showUpdateSummary, init46, update_notifications_default, init_update_notifications = __esm({
"src/modules/update-notifications/index.js"() {
init_utils2();
init_styles44();
init_update_summary();
makeDetailsList = (modules2) => modules2.map(
(module) => `<div class="update-list-section">
${module.title ? `<h2>${module.title}</h2>` : ""}
<ul>
${module.items.map((item) => `<li>${item}</li>`).join("")}
</ul>
</div>`
).join(""), showUpdateSummary = (from, force = !1) => __async(void 0, null, function* () {
let isMinor = from.split(".").slice(0, 2).join(".") === mhImprovedVersion.split(".").slice(0, 2).join("."), missingSummaryOrDetails = !(update_summary_default.summary.length || update_summary_default.details.length);
if ((isMinor || missingSummaryOrDetails) && !force)
return;
let markup = `<div class="mh-improved-update-summary-wrapper">
<h1 class="mh-improved-update-summary-title">MouseHunt Improved v${mhImprovedVersion}</h1>
<p class="mh-improved-update-summary-content">${update_summary_default.summary}</p>
<div class="mh-improved-update-summary-lists">${update_summary_default.details.length ? makeDetailsList(update_summary_default.details) : '<p><a href="https://github.com/MHCommunity/mousehunt-improved/releases" target="_blank" rel="noopener noreferrer">Check out the latest release notes</a> for more information.</p>'}</div>
<div class="mh-improved-update-summary-buttons">
<a href="#" id="mh-improved-dismiss-popup" class="button">Continue</a>
</div>
</div>
</div>`, popup = createPopup({
hasCloseButton: !1,
template: "ajax",
content: markup,
show: !1,
className: "mh-improved-update-summary"
});
popup.addToken("{*prefix*}", ""), popup.addToken("{*suffix*}", ""), popup.show();
let dismiss = document.querySelector("#mh-improved-dismiss-popup");
dismiss && dismiss.addEventListener("click", (e) => {
e.preventDefault(), popup.hide();
});
}), init46 = () => __async(void 0, null, function* () {
addStyles(styles_default43, "update-notifications"), onEvent("mh-improved-updated", showUpdateSummary);
}), update_notifications_default = {
id: "update-notifications",
type: "required",
alwaysLoad: !0,
order: 200,
load: init46
};
}
});
var settings_default19, init_settings20 = __esm({
"src/modules/legacy-hud/settings/index.js"() {
settings_default19 = () => __async(void 0, null, function* () {
return [
{
id: "legacy-hud.menu",
title: "Enable the legacy menu",
default: !1
},
{
id: "legacy-hud.stats",
title: "Enable the legacy stats bar",
default: !1
},
{
id: "legacy-hud.tweaks",
title: "Enable tweaks to the legacy HUD",
default: !0
}
];
});
}
});
var styles_default44, init_styles45 = __esm({
"src/modules/legacy-hud/styles/styles.css"() {
styles_default44 = `.huntersHornView__timer.huntersHornView__timer.countdown:after{display:none}
`;
}
});
var menu_default2, init_menu2 = __esm({
"src/modules/legacy-hud/styles/menu.css"() {
menu_default2 = `.mousehuntHud-environment,.mousehuntHud-menu .camp,.mousehuntHud-menu .friends .team,.mousehuntHud-menu .friends .tournaments,.mousehuntHud-menu .friends .tournament_scoreboards,.mousehuntHud-menu .team .friend_list,.mousehuntHud-menu .team .hunter_community,.mousehuntHud-menu .team .community_maps,.mousehuntHud-menu .team .free_gifts,.mousehuntHud-menu .team .send_supplies,.mousehuntHud-menu .scoreboards .forum,.mousehuntHud-menu .scoreboards .news,.mousehuntHud-menu .kingdom .wiki,.mousehuntHud-menu .kingdom .guide,.mousehuntHud-menu .kingdom .feedback_friday,.mousehuntHud-menu .kingdom .merch_store,.mh-legacy-mode-remove{display:none}
`;
}
});
var stats_default, init_stats = __esm({
"src/modules/legacy-hud/styles/stats.css"() {
stats_default = `.headsup .cheeseped a.baiticon img{height:45px}.headsup .cheeseped a.baiticon{top:-4px;right:2px}span.hud_titlePercentage:after{content:"%"}.mousehuntHud-userStat.bait:hover .value,.mousehuntHud-userStat.trinket:hover .value,.mousehuntHud-userStat.treasureMap:hover .value{margin-top:0}
`;
}
});
var tweaks_default, init_tweaks = __esm({
"src/modules/legacy-hud/styles/tweaks.css"() {
tweaks_default = `.hud_titleIcon{width:auto;height:32px;padding:2px;overflow:visible;background-color:#d9c9a0;border-radius:50%;box-shadow:0 0 0 3px #d9c9a0}.headsup .shieldped{width:50px;height:50px;padding:8px 0 0 14px}.headsup .hudstatlist{margin-right:20px}.mousehuntHud-menu.legacy .mice .mousehuntHud-menu-item.root{filter:hue-rotate(174deg)}.mousehuntHud-menu.legacy .shops .mousehuntHud-menu-item.root{filter:hue-rotate(254deg)}.mousehuntHud-menu.legacy .friends .mousehuntHud-menu-item.root{filter:hue-rotate(87deg)}.mousehuntHud-menu.legacy .travel .mousehuntHud-menu-item.root{filter:hue-rotate(57deg)}.mousehuntHud-menu.legacy .inventory .mousehuntHud-menu-item.root{filter:hue-rotate(340deg)}.hudstatlist.legacyFix .mousehuntHud-userStat.trinket .label{width:auto}.headsup .hudstatlist:nth-child(5) ul li:nth-child(1),.headsup .hudstatlist:nth-child(5) ul li:nth-child(2),.headsup .hudstatlist:nth-child(5) ul li:nth-child(3){display:flex;justify-content:space-between;width:150px}.mousehuntHud-marbleDrawer #hudLocationContent{margin-top:0}.mousehuntHud-userStat.treasureMap .value{overflow:hidden;text-overflow:ellipsis}
`;
}
});
var getMapText, getEquippedStat, getStat, getLegacyHudHtml, replaceMenuBar, replaceStatsBar, getUserShield, init47, legacy_hud_default, init_legacy_hud = __esm({
"src/modules/legacy-hud/index.js"() {
init_utils2();
init_settings20();
init_styles45();
init_menu2();
init_stats();
init_tweaks();
getMapText = () => {
var _a, _b, _c, _d, _e;
if ((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRelicHunter) == null ? void 0 : _b.maps) != null && _c.length)
return user.quests.QuestRelicHunter.label.replace("Treasure Map", "").trim();
let amount = ((_e = (_d = user == null ? void 0 : user.quests) == null ? void 0 : _d.QuestRelicHunter) == null ? void 0 : _e.num_invites) || 0;
return amount > 1 ? `${amount} invites` : amount === 1 ? `${amount} invite` : "Start new";
}, getEquippedStat = (type2, label, id, name, quantity) => `<li class="mousehuntHud-userStat ${type2}" data-item-id="${id}" data-itemId="${id}">
<span class="hudstatlabel">${label}:</span>
<span id="hud_${type2}" class="hudstatvalue">
<a href="#" class="label" onclick="hg.utils.PageUtil.setPage('Inventory', {tab:'traps', sub_tab:'${type2}'}); return false;">
${name}
</a>
</span>
${quantity ? `<span class="hud_baitQuantity value">${quantity}</span>` : ""}
</li>`, getStat = (type2, label, value) => `<li>
<span class="hudstatlabel">${label}:</span>
<span class="hud_${type2} hudstatvalue">${value}</span>
</li>`, getLegacyHudHtml = () => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
return `<div id="legacy-hud" class="headsup">
<div class="shieldped">
<div class="titleicon">
<a href="#" onclick="hg.utils.PageUtil.setPage('Title'); return false;">
<img src="${user == null ? void 0 : user.title_icon}" width="12" height="14" border="0" class="hud_titleIcon">
</a>
</div>
</div>
<div id="hud_statList1" class="hudstatlist">
<ul>
<li>
<span class="hudstatlabel">Location:</span>
<a href="#" class="hudstatvalue hud_location" onclick="hg.utils.PageUtil.setPage('Travel'); return false;">
${user == null ? void 0 : user.environment_name}
</a>
</li>
<li>
<span class="hudstatlabel">Title:</span>
<span class="hud_title">
<a href="#" class="hudstatvalue" onclick="hg.utils.PageUtil.setPage('Title'); return false;">
${user == null ? void 0 : user.title_name}
</a>
</span> (<span class="hud_titlePercentage">${user == null ? void 0 : user.title_percent}</span>)
</li>
<li>
<div class="mousehuntHud-titleProgressBar">
<span class="dot"></span>
<div class="wrapper">
<span class="bar" style="width: ${user == null ? void 0 : user.title_percent}%"></span>
</div>
</div>
</li>
</ul>
</div>
<div id="cheeseped" class="cheeseped">
<a href="#" class="baiticon" target="_parent" onclick="hg.utils.PageUtil.setPage('Inventory', {tab:'cheese'}); return false;">
<img id="hud_baitIcon" src="${user == null ? void 0 : user.bait_thumb}" border="0">
</a>
</div>
<div class="hudstatlist legacyFix">
<ul>
${getEquippedStat("base", "Base", user == null ? void 0 : user.base_item_id, user == null ? void 0 : user.base_name)}
${getEquippedStat("weapon", "Weapon", user == null ? void 0 : user.weapon_item_id, user == null ? void 0 : user.weapon_name)}
${getEquippedStat("trinket", "Charm", user == null ? void 0 : user.trinket_item_id, user == null ? void 0 : user.trinket_name)}
</ul>
</div>
<div class="hudstatlist legacyFix">
<ul>
${getStat("gold", "Gold", user == null ? void 0 : user.gold.toLocaleString())}
${getStat("points", "Points", user == null ? void 0 : user.points.toLocaleString())}
${getEquippedStat("bait", "Bait", user == null ? void 0 : user.bait_item_id, user == null ? void 0 : user.bait_name, user == null ? void 0 : user.bait_quantity)}
</ul>
</div>
<div class="hudstatlist">
<ul>
<li>
<span class="hudstatlabel">Team:</span>
<span id="hud_team">
<a href="https://www.mousehuntgame.com/team.php?team_id=${(_a = user == null ? void 0 : user.team) == null ? void 0 : _a.id}" class="hud_team_name hudstatvalue" onclick="app.pages.TeamPage.showUserTeamPage(); return false;">
${(_b = user == null ? void 0 : user.team) == null ? void 0 : _b.name}
</a>
<div class="corkboardUpdate ${(_c = user == null ? void 0 : user.team) != null && _c.new_chat ? "active" : ""}"></div>
</span>
</li>
<a class="mousehuntHud-userStat treasureMap ${(_f = (_e = (_d = user == null ? void 0 : user.quests) == null ? void 0 : _d.QuestRelicHunter) == null ? void 0 : _e.maps) != null && _f.length ? "active" : "empty"}" onclick="hg.controllers.TreasureMapController.show();return false;" href="#">
<div class="icon" style="${(_i = (_h = (_g = user == null ? void 0 : user.quests) == null ? void 0 : _g.QuestRelicHunter) == null ? void 0 : _h.maps) != null && _i.length ? `background-image: url(${(_k = (_j = user == null ? void 0 : user.quests) == null ? void 0 : _j.QuestRelicHunter) == null ? void 0 : _k.image})` : ""}">
<div class="notification ${(_n = (_m = (_l = user == null ? void 0 : user.quests) == null ? void 0 : _l.QuestRelicHunter) == null ? void 0 : _m.notifications) != null && _n.length ? "active" : ""}">${(_p = (_o = user == null ? void 0 : user.quests) == null ? void 0 : _o.QuestRelicHunter) == null ? void 0 : _p.notifications}</div>
<div class="corkboardUpdate ${(_r = (_q = user == null ? void 0 : user.quests) == null ? void 0 : _q.QuestRelicHunter) != null && _r.new_chat ? "active" : ""}"></div>
<div class="miceWarning ${(_t = (_s = user == null ? void 0 : user.quests) == null ? void 0 : _s.QuestRelicHunter) != null && _t.mice_warning ? "active" : ""}"></div>
</div>
<span class="label">Treasure Map${((_w = (_v = (_u = user == null ? void 0 : user.quests) == null ? void 0 : _u.QuestRelicHunter) == null ? void 0 : _v.maps) == null ? void 0 : _w.length) > 1 ? "s" : ""}</span>
<span class="value">${getMapText()}</span>
</a>
</ul>
</div>
<div class="marblebevel"></div>
</div>`;
}, replaceMenuBar = () => {
if (!document.querySelector("body"))
return;
let mpLink = document.querySelector(".mousehuntHud-marketPlace");
if (mpLink && !document.querySelector(".mh-legacy-mode-camp-button")) {
let oldCampButton = makeElement("a", ["mousehuntHud-campButton", "mh-legacy-mode-camp-button"]);
oldCampButton.href = "https://www.mousehuntgame.com/", oldCampButton.onclick = () => (hg.utils.PageUtil.setPage("Camp"), !1), mpLink.parentNode.insertBefore(oldCampButton, mpLink.nextSibling);
}
let menu = document.querySelector(".mousehuntHud-menu");
menu && (menu.classList.remove("default"), menu.classList.add("legacy"));
let timer = document.querySelector(".huntersHornView__timer");
timer && (timer.classList.remove("huntersHornView__timer--default"), timer.classList.add("huntersHornView__timer--legacy"));
let kingdomMenu = document.querySelector(".mousehuntHud-menu .kingdom"), friendsMenu = document.querySelector(".mousehuntHud-menu .friends");
if (kingdomMenu && friendsMenu) {
if (!document.querySelector(".mh-legacy-mode-teams")) {
let teams = friendsMenu.cloneNode(!0);
teams.classList.remove("friends"), teams.classList.add("team", "mh-legacy-mode-teams"), kingdomMenu.parentNode.insertBefore(teams, kingdomMenu.nextSibling);
}
if (!document.querySelector(".mh-legacy-mode-lore")) {
let lore = kingdomMenu.cloneNode(!0);
lore.classList.remove("kingdom"), lore.classList.add("scoreboards", "mh-legacy-mode-lore"), kingdomMenu.parentNode.insertBefore(lore, kingdomMenu.nextSibling);
}
}
}, replaceStatsBar = () => {
let hudStats = document.querySelector(".headsUpDisplayView-stats");
if (hudStats && !document.querySelector(".mh-legacy-mode-hud")) {
let legacyHud = makeElement("div", ["headsup", "mh-legacy-mode-hud"], getLegacyHudHtml());
hudStats.parentNode.insertBefore(legacyHud, hudStats.nextSibling);
}
let oldStats = document.querySelector(".mousehuntHud-userStatBar");
oldStats && oldStats.remove();
}, getUserShield = () => {
let titleImgs = {
novice: "84bc1109b5cd7aa8c24d195bc8207c38.png",
recruit: "3f1e44bbaa7138da4c326819e9f3f0a8.png",
apprentice: "6f4673dd2d9d1e98b4569667d702a775.png",
initiate: "e96387f7261b95c0eeab9291e4e594e1.png",
journeyman: "ad6875955f541159133c6d3798519f81.png",
master: "35ee6056a09037fb13a9195881875045.png",
grandmaster: "0da3761747914f497c16dc2051ba132d.png",
legendary: "fca35751046f4bcc972716ca484b6d61.png",
hero: "0567284d6e12aaaed35ca5912007e070.png",
knight: "398dca9a8c7703de969769491622ca32.png",
lord: "9a6acd429a9a3a4849ed13901288b0b8.png",
baron: "ea9c0ec2e6d3d81c14e61f5ce924d0e1.png",
count: "dd11711a25b80db90e0306193f2e8d78.png",
duke: "eb46ac1e8197b13299ab860f07d963db.png",
grandduke: "87937fa96bbb3b2dd3225df883002642.png",
archduke: "043efe31de4f0f2e0ddca590fe829032.png",
viceroy: "e2e79f6f9201a4d4e7a89684fbb5356f.png",
elder: "0f3cf224bf98457f6b5bad91ab1c7bd2.png",
sage: "cb49e43c5e4460da7c09fe28ca4f44ce.png",
fabled: "5daba92a8d609834aa8b789f37544e08.png"
}, title = getUserTitle();
return titleImgs[title] || titleImgs.novice;
}, init47 = () => __async(void 0, null, function* () {
let stylesToAdd = [], loadMenu = getSetting("legacy-hud.menu", !1), loadStats = getSetting("legacy-hud.stats", !1), loadBoth = loadMenu === loadStats;
(loadMenu || loadBoth) && (stylesToAdd.push(menu_default2), replaceMenuBar()), (loadStats || loadBoth) && (stylesToAdd.push(stats_default), replaceStatsBar()), (loadStats || loadMenu || loadBoth) && stylesToAdd.push(styles_default44), getSetting("legacy-hud.tweaks", !0) && stylesToAdd.push(tweaks_default, `.headsup .shieldped { background-image: url(${getUserShield()}); }`), addStyles(stylesToAdd, "legacy-hud");
}), legacy_hud_default = {
id: "legacy-hud",
name: "Legacy HUD & Legacy HUD Tweaks",
type: "feature",
default: !1,
description: "Enable the legacy HUD or make tweaks to it.",
load: init47,
settings: settings_default19
};
}
});
var addHelpLinks, init48, links_default, init_links2 = __esm({
"src/modules/links/index.js"() {
init_utils2();
addHelpLinks = () => {
let supportDropdown = document.querySelector(".menuItem.dropdown.support .dropdownContent");
if (!supportDropdown)
return;
[
{
id: "mouserip",
class: "rules",
title: "MOUSE.RIP",
// caps to look better
href: "https://mouse.rip",
text: "MH guides, tools, and more."
},
{
id: "mhui",
class: "fanPage",
title: "MH Improved",
href: "https://github.com/MHCommunity/mousehunt-improved",
text: "Bug reports and feature requests."
}
].forEach((helpLink) => {
let link = makeElement("a", [helpLink.id, helpLink.class]);
makeElement("b", "title", helpLink.title, link), makeElement("span", "text", helpLink.text, link), link.setAttribute("href", helpLink.href), link.setAttribute("target", "_blank"), link.setAttribute("rel", "noopener noreferrer"), supportDropdown.append(link);
});
}, init48 = () => __async(void 0, null, function* () {
addHelpLinks(), addSubmenuItem({
menu: "kingdom",
label: "mouse.rip",
icon: "https://www.mousehuntgame.com/images/ui/hud/menu/prize_shoppe.png",
href: "https://mouse.rip",
external: !0
});
}), links_default = {
id: "links",
type: "required",
alwaysLoad: !0,
load: init48
};
}
});
var settings_default20, init_settings21 = __esm({
"src/modules/show-auras/settings/index.js"() {
settings_default20 = () => __async(void 0, null, function* () {
return [
{
id: "show-auras.list",
title: "Show auras as a list",
default: !1
},
{
id: "show-auras.icons",
title: "Only show icons",
default: !1
}
];
});
}
});
var grid_default, init_grid = __esm({
"src/modules/show-auras/styles/grid.css"() {
grid_default = `.mh-improved-aura-view .type{display:none}.mh-improved-aura-view.campPage-trap-trapEffectiveness{display:flex;flex-flow:row nowrap;justify-content:space-evenly;max-width:325px;padding:10px 0 0;margin:5px 0;cursor:default}.mh-improved-aura-view .aura{display:flex;flex-direction:column;align-content:center;align-items:center;min-width:50px}.mh-improved-aura-view .trapImageView-trapAura,.mh-improved-aura-view .trapImageView-trapAura.active{width:35px;height:35px;visibility:visible;opacity:1}.mh-improved-aura-view .time{font-size:10px}.mh-improved-aura-view .times{display:flex;flex-direction:column;align-items:center;justify-content:center;margin:2px 5px 0;font-weight:400;line-height:1.5;text-align:center}.mh-improved-aura-view .expiry{display:none}
`;
}
});
var list_default, init_list = __esm({
"src/modules/show-auras/styles/list.css"() {
list_default = `.mh-improved-aura-view.campPage-trap-trapEffectiveness{display:flex;flex-flow:column nowrap;gap:10px;justify-content:space-evenly;padding:5px;margin:5px 0;cursor:default}.mh-improved-aura-view .trapImageView-trapAura,.mh-improved-aura-view .trapImageView-trapAura.active{width:35px;height:35px;visibility:visible;opacity:1}.mh-improved-aura-view .time{font-size:10px}.mh-improved-aura-view .aura{display:grid;grid-template-columns:35px 1fr 4fr;place-items:center stretch;min-width:50px;margin:3 0}.mh-improved-aura-view .type{margin-left:1em;font-size:12px;font-weight:900}.mh-improved-aura-view .times{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;font-weight:400;line-height:1.5}.mh-improved-aura-view .expiry{display:none}
`;
}
});
var icons_default2, init_icons2 = __esm({
"src/modules/show-auras/styles/icons.css"() {
icons_default2 = `.mh-improved-aura-view.campPage-trap-trapEffectiveness{display:flex;flex-flow:row nowrap;gap:20px;justify-content:center;padding:10px;margin:5px 0;cursor:default}.mh-improved-aura-view .trapImageView-trapAura,.mh-improved-aura-view .trapImageView-trapAura.active{width:40px;height:40px;visibility:visible;opacity:1}.mh-improved-aura-view .type,.mh-improved-aura-view .times,.mh-improved-aura-view .expiry{display:none}
`;
}
});
var styles_default45, init_styles46 = __esm({
"src/modules/show-auras/styles/styles.css"() {
styles_default45 = `.mh-improved-aura-view .aura .mousehuntTooltip{right:-50px;bottom:70px;left:-50px;padding:5px;font-weight:400;line-height:1.5;text-align:center}.mh-improved-aura-view .aura{position:relative}.mh-improved-aura-view .QuestJetStreamAura{display:none}.mh-improved-aura-view .mousehuntTooltipContentTitle{font-size:12px;font-weight:900}
`;
}
});
var getExpiryFormatted, getExpiryRemainingFormatted, addExpiryWarning, isAppending, addTrapBlock, getAuras, aurasExpiry, init49, show_auras_default, init_show_auras = __esm({
"src/modules/show-auras/index.js"() {
init_utils2();
init_settings21();
init_grid();
init_list();
init_icons2();
init_styles46();
getExpiryFormatted = (time) => new Date(time).toLocaleDateString(new Intl.DateTimeFormat("en", {
dateStyle: "short",
timeStyle: "short"
})), getExpiryRemainingFormatted = (time) => plainHumanizer(time, {
round: !0,
units: ["d", "h"],
spacer: " ",
delimiter: "<br>"
}), addExpiryWarning = () => {
let soon = aurasExpiry.filter((aura) => aura.time < 3456e3);
soon.length && soon.forEach((aura) => {
aura.element.classList.add("expiring-soon");
});
}, isAppending = !1, addTrapBlock = () => {
if (isAppending)
return;
isAppending = !0;
let trapSummary = document.querySelector(".trapSelectorView__trapStatSummaryContainer");
if (!trapSummary)
return;
let existing = document.querySelector("#mh-improved-aura-view");
if (existing)
return;
let auraTrapBlock = makeElement("div", ["mh-improved-aura-view", "campPage-trap-trapEffectiveness"]);
if (auraTrapBlock.id = "mh-improved-aura-view", aurasExpiry.forEach((aura) => {
let auraKey = `mh-aura-${aura.type.toLowerCase().replaceAll(/[ !'(),.]/g, "-")}`;
if (document.querySelector(`#${auraKey}`))
return;
let auraClasses = aura.element.classList, questClass = [...auraClasses].find((c) => c.startsWith("Quest") || c.startsWith("Event") || c.startsWith("Mini")), auraEl = makeElement("div", ["aura", "mousehuntTooltipParent", questClass]);
auraEl.id = auraKey;
let expiryText = getExpiryFormatted(aura.expiry), remaining2 = getExpiryRemainingFormatted(aura.remaining * 1e3);
auraEl.title = `Expires on ${expiryText}, ${remaining2} remaining`;
let tooltip = makeElement("div", ["mousehuntTooltip", "noEvents"]), tooltipContent = makeElement("div", "mousehuntTooltipContent");
makeElement("div", "mousehuntTooltipContentTitle", `${aura.type} Aura`, tooltipContent), makeElement("div", "mousehuntTooltipContentTime", `Expires on ${expiryText}`, tooltipContent), makeElement("div", "mousehuntTooltipContentTime", `${remaining2} remaining`, tooltipContent), tooltip.append(tooltipContent), auraEl.append(tooltip);
let auraImage = makeElement("div", "image");
auraImage.classList.add(...auraClasses), auraImage.classList.remove("mousehuntTooltipParent"), auraEl.append(auraImage), makeElement("div", "type", aura.type, auraEl);
let times = makeElement("div", "times");
makeElement("div", "expiry", expiryText, times), makeElement("div", "time", remaining2, times), auraEl.append(times), auraTrapBlock.append(auraEl);
}), existing = document.querySelector("#mh-improved-aura-view"), existing)
existing.replaceWith(auraTrapBlock);
else {
let tem = document.querySelector(".campPage-trap-trapEffectiveness.campPage-trap-statsContainer");
tem ? tem.after(auraTrapBlock) : trapSummary.append(auraTrapBlock);
}
isAppending = !1;
}, getAuras = () => {
if (getCurrentPage() !== "camp")
return;
let auras = document.querySelectorAll(".trapSelectorView .trapImageView-trapAuraContainer .trapImageView-trapAura.active");
auras && (aurasExpiry = [], auras.forEach((aura) => {
let typeEl = aura.querySelector(".trapImageView-tooltip-trapAura-title");
if (!typeEl)
return;
let type2 = typeEl.textContent.replaceAll("You have the ", "").replaceAll("Aura!", "").trim(), expiryEl = aura.querySelector(".trapImageView-tooltip-trapAura-expiry span");
if (!expiryEl || !type2)
return;
let origExpiryText = expiryEl.textContent.replaceAll("(Local Time)", "").replaceAll("  ", " ").trim(), expiryText = origExpiryText, dateParts = expiryText.split("@");
if (dateParts.length > 1) {
expiryText = dateParts[0].trim();
let timeParts = dateParts[1].trim().split(":"), hours = Number.parseInt(timeParts[0], 10), minutes = timeParts[1].replace(/(am|pm)/i, "").trim(), isPM = timeParts[1].toLowerCase().includes("pm");
hours === 12 && !isPM ? hours = 0 : hours !== 12 && isPM && (hours += 12), expiryText = `${expiryText} ${hours}:${minutes}`;
}
let expiry = new Date(Date.parse(expiryText)), remaining2 = Math.floor((expiry - /* @__PURE__ */ new Date()) / 1e3);
aurasExpiry.push({
type: type2,
remaining: remaining2,
expiry,
expiryText: origExpiryText,
element: aura
});
}));
}, aurasExpiry = [], init49 = () => __async(void 0, null, function* () {
let stylesToUse = [styles_default45];
getSetting("show-auras.icons") ? stylesToUse.push(icons_default2) : getSetting("show-auras.list") ? stylesToUse.push(list_default) : stylesToUse.push(grid_default), addStyles(stylesToUse, "show-auras"), onNavigation(() => {
setTimeout(() => {
getAuras(), addExpiryWarning(), addTrapBlock();
}, 1e3);
}, { page: "camp" });
}), show_auras_default = {
id: "show-auras",
name: "Show Auras",
type: "feature",
default: !1,
description: "Show auras and their expiry time below the trap stats.",
load: init49,
settings: settings_default20
};
}
});
var styles_default46, init_styles47 = __esm({
"src/modules/better-kings-reward/styles.css"() {
styles_default46 = `.puzzleView__imageContainer{background-color:transparent;border-color:#73332a;border-width:1px}.puzzleView__image img{filter:hue-rotate(333deg);transform:scale(1.3) translate(-10px,5px);transform-origin:left}.puzzleView__requestNewPuzzleButton{background-color:#a35721;opacity:.3;transition:opacity .2s ease-in-out}.puzzleView__requestNewPuzzleButton:hover,.puzzleView__requestNewPuzzleButton:focus{border-color:transparent;opacity:1}.puzzleView__requestNewPuzzleButtonIcon{filter:invert(1);opacity:.8}input.puzzleView__code{font-size:28px;letter-spacing:8px}
`;
}
});
var initiateKingsReward, startKingsReward, continueOnKingsReward, init50, better_kings_reward_default, init_better_kings_reward = __esm({
"src/modules/better-kings-reward/index.js"() {
init_utils2();
init_styles47();
initiateKingsReward = () => {
let reward = document.querySelector(".huntersHornMessageView huntersHornMessageView--puzzle .huntersHornMessageView__action");
reward && reward.click();
}, startKingsReward = () => {
let rewardStart = document.querySelector(".huntersHornMessageView--puzzle .huntersHornMessageView__action");
rewardStart && (rewardStart.click(), setMultipleTimeout(() => {
let puzzle = document.querySelector(".puzzleView__code");
puzzle && puzzle.focus();
}, [100, 250, 500]));
}, continueOnKingsReward = (req) => {
if (req.success && req.puzzle_reward) {
let resume = document.querySelector(".puzzleView__resumeButton");
resume && resume.click();
}
}, init50 = () => __async(void 0, null, function* () {
addStyles(styles_default46, "better-kings-reward"), onRequest("turns/activeturn.php", initiateKingsReward, !0), onRequest("users/puzzle.php", continueOnKingsReward, !0), onRequest("*", startKingsReward), startKingsReward();
}), better_kings_reward_default = {
id: "better-kings-reward",
name: "Better King's Reward",
type: "better",
default: !0,
description: "Update the style of the King\u2019s Reward and automatically close the success message.",
load: init50
};
}
});
var maybeRedirectToHunterProfile, listenForIDPaste, init51, paste_hunter_id_default, init_paste_hunter_id = __esm({
"src/modules/paste-hunter-id/index.js"() {
maybeRedirectToHunterProfile = (text) => {
var _a, _b;
if (text.length > 30)
return;
if (text.match(/https:\/\/www.mousehuntgame.com/)) {
window.location.href = text;
return;
}
let id = text.match(/\d+/);
id && (_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.setPage && hg.utils.PageUtil.setPage("HunterProfile", {
id: id[0]
}, (data) => {
var _a2, _b2;
let snuid = data.tabs.profile.subtabs[0].snuid;
snuid && ((_b2 = (_a2 = hg == null ? void 0 : hg.utils) == null ? void 0 : _a2.PageUtil) != null && _b2.showHunterProfile) && hg.utils.PageUtil.showHunterProfile(snuid);
});
}, listenForIDPaste = () => {
window.addEventListener("paste", (e) => {
/* eslint-disable @wordpress/no-global-active-element */
document.activeElement instanceof HTMLInputElement || document.activeElement instanceof HTMLTextAreaElement || document.activeElement instanceof HTMLSelectElement || maybeRedirectToHunterProfile(e.clipboardData.getData("text"));
});
}, init51 = () => __async(void 0, null, function* () {
listenForIDPaste();
}), paste_hunter_id_default = {
id: "paste-hunter-id",
name: "Paste Hunter ID",
type: "feature",
default: !0,
description: "Copy a Hunter ID to your clipboard and press Ctrl/Cmd+V anywhere to go directly to that hunter\u2019s profile.",
load: init51
};
}
});
var profile_default3, init_profile3 = __esm({
"src/modules/user-highlighting/profile.css"() {
profile_default3 = `.mh-improved-fancy-profile .hunterInfoView-favoritesBlock-content-mouseContainer,.mh-improved-fancy-profile .hunterInfoView-favoritesBlock-content-container-arrow.right,.mh-improved-fancy-profile .hunterInfoView-favoritesBlock-content-tabDot-container,.mh-improved-fancy-profile .hunterInfoView-favoritesBlock-content-mouseLabel,.mh-improved-fancy-profile .hunterInfoView-wrapper .friendsPage-friendRow-titleBar-icon,.mh-improved-fancy-profile .journalContainer .top,.mh-improved-fancy-profile .journalContainer .bottom,.mh-improved-fancy-profile .trapImageView-tooltip-trapAura-expiry span{display:none}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseContainer:first-child{display:inline-block}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-container{padding-top:10px;padding-bottom:10px}.mh-improved-fancy-profile .hunterInfoView-favoritesBlock-content-chunk:after{position:absolute;top:0;right:0;width:110px;font-size:13px;line-height:2;color:#772b0a;content:"glazy mouse best mouse"}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock .friendsPage-friendRow{background:linear-gradient(#b389a1 5%,#f0dfee 50%)!important;border-radius:6px}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-hunterId{color:#252525!important;background-color:#dcf7ff!important}.mh-improved-fancy-profile .hunterInfoView-wrapper div.messageBoardView-message-container,.mh-improved-fancy-profile .hunterInfoView-wrapper .friendsProfileView-container,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-favoritesBlock .hunterInfoView-favoritesBlock-body,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabContentContainer,.mh-improved-fancy-profile .hunterInfoView-achievementsBlock .mousehuntTabContentContainer-padding,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-header-title-container,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-footer,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-footer-stats{background:#f0dfee!important;background-color:#f0dfee!important;border-color:#de72ba;box-shadow:none}.mh-improved-fancy-profile .hunterInfoView-wrapper div.messageBoardView-message-container{border:1px solid #de72ba}.mh-improved-fancy-profile .hunterInfoView-wrapper .messageBoardView-title,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-header,.mh-improved-fancy-profile .hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader,.mh-improved-fancy-profile .hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader.active{background:linear-gradient(#dcf7ff 45%,#8af1ee 55%)}.mh-improved-fancy-profile .hunterInfoView-wrapper div .pagerView-container,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper div .pagerView-container,.mh-improved-fancy-profile .hunterInfoView-corkBoardBlock .messageBoardView-message,.mh-dark .mh-improved-fancy-profile .hunterInfoView-corkBoardBlock .messageBoardView-message,.mh-improved-fancy-profile .hunterInfoView-corkBoardBlock .messageBoardView-message.new{background:#f8eff6;border-color:#de72ba!important}.mh-dark-mode .mh-improved-fancy-profile .hunterInfoView-corkBoardBlock .messageBoardView-message{background:#513d4c}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .mousehuntPage-content textarea{background-color:#f8eff7;border-color:#de72ba}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container:before,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-horn-container,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-huntingSince,.mh-improved-fancy-profile .hunterInfoView-wrapper .campPage-trap-trapStat,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-trap-slot-quantity{background:#dcf7ff!important;border-color:#80b5b4!important}.mh-improved-fancy-profile .journalContainer .content{padding:0;margin:0;background:transparent!important}.mh-improved-fancy-profile .jlarge{overflow:hidden}.mh-improved-fancy-profile .journal .content .entry{background-color:#f0dfee;border-color:#de72ba}.mh-dark .mh-improved-fancy-profile .journal .content .entry{background-color:#f0dfee!important;border-color:#de72ba!important}.mh-dark .mh-improved-fancy-profile .journal .content .entry .journaldate,.mh-dark .mh-improved-fancy-profile .journal .content .entry .journalbody{color:#363636!important}.mh-dark .mh-improved-fancy-profile .journal .content .entry .journalbody .journaldate{border-bottom:1px solid rgb(0 0 0 / 30%)}.mh-improved-fancy-profile .journal .content .entry.short.travel{background-color:#f2f2f2}.mh-improved-fancy-profile .friendsPage-friendRow-image-border{background-image:none}.mh-improved-fancy-profile .friendsPage-friendRow-image{inset:4px;border:1px solid #513645;border-radius:10px}.mh-improved-fancy-profile .friendsPage-friendRow .friendsPage-friendRow-titleBar{margin-bottom:10px;margin-left:-4px;background:linear-gradient(#dcf7ff 45%,#89f0ee 55%);border-color:#8af1ef}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-header-thumbnail-image{border-color:#de72ba;box-shadow:none}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-header-title-container{top:1px;height:59px;border-top:none;border-bottom:1px solid #de72ba;border-radius:7px 50px 0 0}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-header-container{padding-top:1px;border:1px solid #de72ba}.mh-improved-fancy-profile .hunterInfoView-wrapper .friendsPage-friendRow-titleBar-name{margin-left:-25px}.mh-improved-fancy-profile .hunterInfoView-wrapper .friendsPage-friendRow-titleBar-titleDetail{top:0;right:10px;left:unset;font-weight:900}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container{height:37px}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock{height:220px}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats{padding:7px 0}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile.PageHunterProfile .friendsPage-friendRow-statsContainer,.mh-improved-fancy-profile .friendsPage-friendRow-statsContainer{color:#513645;background-color:#d2c0ec;border-top:1px solid #be9bbc;border-radius:0 0 6px 6px;box-shadow:none}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-goldenShield{filter:hue-rotate(148deg)}.mh-improved-fancy-profile .loyaltyBadgeView .loyaltyBadgeView-years-text{top:9px;font-size:0;color:#4b5554;text-shadow:0 0 0 #969696;visibility:hidden}.mh-improved-fancy-profile .loyaltyBadgeView-years-text:before{font-size:16px;visibility:visible;content:"1000"}.mh-improved-fancy-profile .loyaltyBadgeView{background-image:url(https://www.mousehuntgame.com/images/ui/profile/loyalty-badge-3-year.png);filter:hue-rotate(237deg)}.mh-improved-fancy-profile .userInteractionButtonsView-button{filter:hue-rotate(170deg) opacity(.6)}.mh-improved-fancy-profile .hunterInfoView-idCardBlock-stats-horn-image{filter:hue-rotate(250deg)}.mh-improved-fancy-profile .userInteractionButtonsView-relationship .userInteractionButtonsView-button,.mh-improved-fancy-profile .userInteractionButtonsView-relationship .userInteractionButtonsView-button:hover,.mh-improved-fancy-profile .userInteractionButtonsView-relationship .userInteractionButtonsView-button:focus,.mh-improved-fancy-profile .userInteractionButtonsView-relationship .userInteractionButtonsView-button:active{filter:none}.mh-improved-fancy-profile .userInteractionButtonsView-button:hover{filter:hue-rotate(220deg) opacity(1)}.mh-improved-fancy-profile .friendsProfileView-randomFriend{background-color:#c3f0ff}.mh-improved-fancy-profile .friendsProfileView-randomFriend:hover{background-color:#93c9db}.mh-improved-fancy-profile .campPage-trap-trapStat.luck .value span:before{content:"-"}.mh-improved-fancy-profile .trapImageView-tooltip-trapAura-expiry:after{content:"never! \\1f389\\fe0f  infinite aura!"}.mh-improved-fancy-profile .hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:hover,.hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:focus{background:linear-gradient(#dcf7ff 45%,#8adff1 55%)}.mh-improved-fancy-profile #friend-data-wrapper .userInteractionButtonsView-button,.mh-improved-fancy-profile #friend-data-wrapper .userInteractionButtonsView-button:hover{filter:none!important}.mh-improved-fancy-profile #friend-data-wrapper .friendsPage-friendRow-statsContainer{background-color:transparent;box-shadow:0 10px 30px #cdb495 inset}.mh-dark .hunterInfoView-treasureMaps-left-currentMap-content-title{color:#615d5d}.mh-dark-mode .mh-improved-fancy-profile .hunterInfoView-wrapper .friendsPage-friendRow-titleBar-titleDetail{color:#8e5d8b}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .mousehuntTabHeader span,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-header,.mh-improved-fancy-profile .hunterInfoView-wrapper .messageBoardView-title,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .messageBoardView-title,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-header,.mh-improved-fancy-profile .hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader,.mh-improved-fancy-profile .hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader.active{color:#615d5d!important;background:linear-gradient(#dcf7ff 45%,#8adff1 55%);border-color:#de72ba;border-radius:7px 7px 0 0;box-shadow:none}.pageFrameView #mousehuntContainer.PageHunterProfile.mh-improved-fancy-profile .campPage-trap-itemStats,.pageFrameView #mousehuntContainer.PageHunterProfile.mh-improved-fancy-profile .campPage-trap-itemStats .campPage-trap-trapStat .value,.pageFrameView #mousehuntContainer.PageHunterProfile.mh-improved-fancy-profile .campPage-trap-itemStats .campPage-trap-trapStat .value b,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .journalEntries,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .pagerView-container,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-items,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader:before,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .mousehuntTabHeader:before,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .mousehuntTabHeader.active span,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader:hover span{color:#615d5d;background-color:transparent}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-header-title,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound-label,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .friendsProfileView-container,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabContentContainer,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .friendsPage-friendRow{color:#615d5d}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-trap-slot,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-trap-slot.middle{top:-2px;overflow:hidden;border-color:#99448e;border-radius:9px;outline:1px solid #f0dfee;box-shadow:1px -1px 0 3px #f0dfee,-1px -1px 0 3px #f0dfee}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-items{padding:0;margin:0 10px;background-color:#f0dfee;border-radius:10px;box-shadow:0 -6px 0 1px #f0dfee,-23px 10px 0 -19px #f0dfee,27px 10px 0 -19px #f0dfee,0 -6px 0 2px #de72ba}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-container{border-color:#de72ba}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-favoritesBlock{border-color:#de72ba;box-shadow:none}.mh-improved-fancy-profile .mousehuntPage-content select.mh-improved-scoreboard-dropdown{background-color:#d2c0ec;border-color:#99448e}.mh-improved-fancy-profile .pagerView-link{background-color:#f0dfee;border-color:#de72ba}.mh-improved-fancy-profile .hunterInfoView-wrapper div .pagerView-container{border:none}
`;
}
});
var styles_default47, init_styles48 = __esm({
"src/modules/user-highlighting/styles.css"() {
styles_default47 = `.mh-improved-highlight-user .hunterInfoView-verifiedUserImage{width:14.5px;height:17.5px;background:url(https://i.mouse.rip/mh-improved/tada-badge.png) no-repeat;background-size:contain}.mh-improved-supporter .hunterInfoView-verifiedUserImage{background:url(https://i.mouse.rip/mh-improved/star-badge.png) no-repeat;background-position-y:-1px;background-size:contain}.mh-improved-highlight-user .friendsPage-friendRow-image:focus:after,.mh-improved-highlight-userr .friendsPage-friendRow-image:hover:after,.mh-improved-highlight-user .friendsPage-friendRow-image:active:after{position:absolute;top:5px;left:5px;width:20px;height:20px;font-size:22px;color:#fff;content:"";background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><pathd="m11.645 20.91-.007-.003-.022-.012a15.247 15.247 0 0 1-.383-.218 25.18 25.18 0 0 1-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0 1 12 5.052 5.5 5.5 0 0 1 16.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 0 1-4.244 3.17 15.247 15.247 0 0 1-.383.219l-.022.012-.007.004-.003.001a.752.752 0 0 1-.704 0l-.003-.001Z"/></svg>');filter:drop-shadow(0 0 2px #000);background-repeat:no-repeat;background-size:contain}.mh-improved-highlight-user #tipButton{right:155px}
`;
}
});
var getUserHighlightingShield, highlightUsers, init52, user_highlighting_default, init_user_highlighting = __esm({
"src/modules/user-highlighting/index.js"() {
init_utils2();
init_profile3();
init_styles48();
getUserHighlightingShield = (type2) => {
let text = "";
switch (type2) {
case "developer":
text = "MH Improved Developer";
break;
case "contributor":
text = "MH Improved Contributor";
break;
case "supporter":
text = "MH Improved Supporter";
break;
}
let wrapper = makeElement("div", ["blackTooltip", "mh-improved-user-shield"]);
return makeElement("div", "hunterInfoView-verifiedUserImage", null, wrapper), makeElement("span", "blackTooltiptext hunterInfoView-verifiedUser", text, wrapper), wrapper;
}, highlightUsers = () => __async(void 0, null, function* () {
let existing = document.querySelectorAll(".mh-improved-user-shield");
existing && existing.forEach((el) => {
el.remove();
});
let id = document.querySelector(".hunterInfoView-hunterId-idText span");
if (!id)
return;
let profilePage = document.querySelector("#mousehuntContainer.PageHunterProfile");
if (!profilePage)
return;
let idHeader = document.querySelector(".hunterInfoView-idCardBlock-secondaryHeader");
if (!idHeader)
return;
let userId = Number.parseInt(id.textContent, 10), data = sessionGet(`mh-improved-user-highlighting-${userId}`);
if (data || (data = yield (yield fetch(`https://api.mouse.rip/highlight-user/${userId}`)).json(), debug(`Retrieved user highlighting data for ${userId}`, data), sessionSet(`mh-improved-user-highlighting-${userId}`, data)), !data || !(data != null && data.highlighted))
return;
let type2 = data.type;
profilePage.classList.add("mh-improved-highlight-user", `mh-improved-${type2}`), idHeader.append(getUserHighlightingShield(type2)), userId === 8209591 && profilePage.classList.add("mh-improved-highlight-user", "mh-improved-fancy-profile");
}), init52 = () => __async(void 0, null, function* () {
addStyles([styles_default47, profile_default3], "highlight-users"), onNavigation(highlightUsers, {
page: "hunterprofile"
});
}), user_highlighting_default = {
id: "highlight-users",
type: "required",
alwaysLoad: !0,
load: init52
};
}
});
var styles_default48, init_styles49 = __esm({
"src/modules/inline-wiki/styles.css"() {
styles_default48 = `#wiki-iframe{width:100%;height:100%;min-height:100vh}.mousehuntHud-menu .wiki .external_icon{display:none}
`;
}
});
var openWiki, getLink, wikiListener, addMenuListener, removeMenuListener, clickWiki, listener, main8, init53, inline_wiki_default, init_inline_wiki = __esm({
"src/modules/inline-wiki/index.js"() {
init_utils2();
init_styles49();
openWiki = () => {
let iframe = document.createElement("iframe");
iframe.id = "wiki-iframe", iframe.src = "https://mhwiki.hitgrab.com/wiki/index.php/MouseHunt_Wiki", makePage(iframe);
}, getLink = () => document.querySelector(".mousehuntHud-menu ul li ul li.wiki a"), wikiListener = (e) => {
e.preventDefault(), openWiki();
}, addMenuListener = () => {
let wikiLink = getLink();
wikiLink && !listener && (listener = wikiLink.addEventListener("click", wikiListener));
}, removeMenuListener = () => {
let wikiLink = getLink();
wikiLink && listener && (wikiLink.removeEventListener("click", wikiListener), listener = null);
}, clickWiki = () => {
let wikiLink = getLink();
wikiLink && wikiLink.click();
}, listener = null, main8 = () => {
addMenuListener(), onEvent("mh-improved-open-wiki", clickWiki);
}, init53 = () => __async(void 0, null, function* () {
addStyles(styles_default48, "inline-wiki"), main8(), onActivation("inline-wiki", main8), onDeactivation("inline-wiki", removeMenuListener);
}), inline_wiki_default = {
id: "inline-wiki",
name: "Inline Wiki",
type: "feature",
default: !0,
description: "Clicking \u201CWiki\u201D in the menu loads it right on the page, rather than opening a new tab.",
load: init53
};
}
});
var styles_default49, init_styles50 = __esm({
"src/modules/better-inventory/modules/recipes/styles.css"() {
styles_default49 = `.inventoryPage-item.full.recipe.known.reordered{max-height:38px;overflow:hidden;border-bottom:1px solid #ccc}.inventoryPage-item.full.recipe.known.reordered:hover{max-height:500px}.mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabContent{position:relative}.mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabContent-prefix-title{display:none}.mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabContent-prefix.clear-block{position:absolute;right:10px}.mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabHeader-container{margin-bottom:20px}
`;
}
});
// dist/data/magic-essence-potions.json
var magic_essence_potions_default, init_magic_essence_potions = __esm({
"dist/data/magic-essence-potions.json"() {
magic_essence_potions_default = { no: ["abominable_asiago_cheese_magic", "ancient_cheese_6_pieces", "ancient_cheese_potion", "cherry_potion", "corrupted_radioactive_blue_cheese_potion", "gnarled_cheese_potion", "greater_radioactive_blue_cheese_potion", "limelight_cheese_6", "radioactive_blue_cheese_potion", "runic_cheese_2_pieces", "runic_cheese_potion"], maybe: ["ancient_string_cheese_potion", "crimson_cheese_magic_essence_recipe", "gauntlet_potion_2", "gauntlet_potion_3", "gauntlet_potion_4", "glowing_gruyere_cheese_5_pieces", "greater_wicked_gnarly_potion", "rain_cheese_potion", "vengeful_vanilla_stilton_magic_essence", "wicked_gnarly_potion", "wind_cheese_potion"] };
}
});
// dist/data/crafting-recipe-mapping.json
var crafting_recipe_mapping_default, init_crafting_recipe_mapping = __esm({
"dist/data/crafting-recipe-mapping.json"() {
crafting_recipe_mapping_default = { base: { living_grove_base_recipe: "living_grove_base", polluted_base_rebuild: "polluted_base", soiled_base_rebuild_recipe: "soiled_base", tribal_base: "tribal_base", tiki_base: "tiki_base" }, collectible: { admirals_ship_journal_theme_recipe: "admirals_ship_journal_theme_collectible", bristle_woods_rift_journal_theme_recipe: "bristle_woods_rift_journal_theme_collectible", burroughs_rift_journal_theme_recipe: "burroughs_rift_journal_theme_collectible", chrome_journal_theme_recipe: "chrome_journal_theme_collectible", gnawnian_games_journal_theme_recipe: "gnawnian_games_theme_collectible", labyrinth_journal_theme_recipe: "labyrinth_journal_theme_collectible", lightning_slayer_journal_theme_recipe: "lightning_slayer_journal_theme_collectible", living_garden_theme_recipe: "living_garden_theme_collectible", moussu_picchu_journal_theme_recipe: "moussu_picchu_journal_theme_collectible", polluted_theme_recipe: "completed_polluted_journal_theme_collectible", queso_journal_theme_recipe: "queso_canyon_theme_collectible", regal_theme_recipe: "completed_regal_theme_collectible", relic_hunter_journal_theme_recipe: "relic_hunter_journal_theme_collectible" }, crafting_item: { geyser_draconic_chassis_recipe: "draconic_geyser_chassis_crafting_item", geyser_draconic_chassis_i_recipe: "draconic_geyser_chassis_i_crafting_item", christened_ship: "huntington_map_piece", s_s__huntington_ii: "huntington_map_piece" }, map_piece: { unchristened_ship: "unchristened_ship_craft_item", balacks_lantern: "balack_lantern_map_piece", ocean_navigation_kit: "ocean_navigation_map_piece", zzt_key_1: "zzt_key", repaired_oculus_recipe: "high_altitude_license_stat_item" }, weapon: { chrome_floating_arcane_upgraded_recipe: "chrome_floating_arcane_upgraded_weapon", chrome_monstrobot_recipe: "chrome_monstrobot_weapon", chrome_oasis_water_node_recipe: "chrome_oasis_water_node_weapon", chrome_phantasmic_oasis_recipe: "chrome_phantasmic_oasis_weapon", chrome_school_of_sharks_recipe: "chrome_school_of_sharks_weapon", chrome_sphynx_recipe: "chrome_sphynx_weapon", chrome_storm_wrought_ballista_recipe: "chrome_storm_wrought_ballista_weapon", chrome_temporal_turbine_recipe: "chrome_temporal_turbine_weapon", chrome_thought_obliterator_recipe: "chrome_floating_forgotten_upgraded_weapon", clockapult_of_winter_past: "clockapult_of_winter_past_weapon", geyser_draconic_weapon_recipe: "geyser_draconic_weapon", fluffy_deathbot_weapon: "fluffy_deathbot_weapon", grungy_deathbot_weapon: "grungy_deathbot_weapon", icy_rhinobot: "icy_rhinobot_weapon", ninja_ambush_weapon: "ninja_ambush_weapon", regrown_thorned_venus_mouse_trap: "throned_venus_mouse_trap_weapon", acronym_recipe: "acronym_weapon", ambush_trap_rebuild: "ambush_weapon", rebuild_celestial_dissonance_recipe: "celestial_dissonance_weapon", rebuild_chrome_storm_wrought_ballista_recipe: "chrome_storm_wrought_ballista_weapon", clockapult_of_time_rebuild: "clockapult_of_time_weapon", rebuild_crystal_tower_recipe: "crystal_tower_weapon", digby_drillbot: "digby_drillbot_weapon", dragon_ballista_rebuild: "dragonvine_ballista_weapon", endless_labyrinth_trap_rebuild_recipe: "endless_labyrinth_weapon", event_horizon_recipe: "event_horizon_weapon", harpoon_gun: "harpoon_gun_weapon", rebuild_high_tension_recipe: "high_tension_spring_weapon", ice_blaster_trap_rebuild: "ice_blaster_weapon", wolfsbane_rebuild_recipe: "wolfsbane_weapon", mouse_deathbot: "mouse_deathbot_weapon", net_cannon: "net_cannon_weapon", oasis_water_node_recipe: "oasis_water_node_weapon", obelisk_of_slumber: "obelisk_of_slumber_weapon", rebuild_phantasmic_oasis_recipe: "phantasmic_oasis_weapon", rhinobot_rebuild: "rhinobot_weapon", sandstorm_monstrobot_recipe: "sandstormbot_weapon", rebuild_upgraded_rune_shark_weapon_recipe: "upgraded_rune_shark_weapon", scum_scrubber_trap_rebuild_recipe: "scum_scrubber_weapon", soul_catcher_rebuild: "hween_2011_weapon", sphynx_weapon_recipe: "sphynx_weapon", steam_laser_mk_i_rebuild: "steam_laser_mk_i_weapon", storm_wrought_ballista_recipe: "storm_wrought_ballista_weapon", temporal_turbine_recipe: "temporal_turbine", zugzwangs_last_move: "zugzwangs_last_move_weapon", rebuild_floating_arcane_upgraded_recipe: "floating_arcane_upgraded_weapon", rebuild_thought_obliterator_recipe: "floating_forgotten_upgraded_weapon", venus_mouse_trap: "venus_mouse_trap_weapon" } };
}
});
var cleanUpRecipeBook, showCraftWarning, warnOnBadCrafts, modifySmashableTooltip, moveRecipe, updateRecipesOnPage, recipes_default, init_recipes = __esm({
"src/modules/better-inventory/modules/recipes/index.js"() {
init_utils2();
init_styles50();
init_magic_essence_potions();
init_crafting_recipe_mapping();
cleanUpRecipeBook = () => {
let allTab = document.querySelector(".inventoryPage-tagDirectory-tag.all.hidden");
allTab && allTab.classList.remove("hidden"), document.querySelectorAll(".mousehuntHud-page-subTabContent.recipe a.inventoryPage-tagDirectory-tag").forEach((tagLink) => {
let tag = tagLink.getAttribute("data-tag");
tagLink.removeAttribute("onclick"), tagLink.addEventListener("click", (e) => {
app.pages.InventoryPage.showTagGroup(e.target), tagLink.classList.contains("updated") || (updateRecipesOnPage(tag), tagLink.classList.add("updated"));
});
});
}, showCraftWarning = (text) => {
let confirm2 = document.querySelector(".mousehuntActionButton.inventoryPage-confirmPopup-suffix-button.confirm");
if (!confirm2)
return;
let existing = document.querySelector(".mhui-craft-warning-tooltip");
existing && existing.remove();
let tooltip = makeElement("div", "mhui-craft-warning-tooltip", text);
confirm2.parentNode.append(tooltip);
}, warnOnBadCrafts = (limit = 0) => {
let confirm2 = document.querySelector(".mousehuntActionButton.inventoryPage-confirmPopup-suffix-button.confirm");
if (!confirm2) {
limit <= 3 && setTimeout(() => {
warnOnBadCrafts(limit + 1);
}, 250);
return;
}
let type2 = confirm2.getAttribute("data-confirm-type");
if (!type2 || !(type2 === "recipe" || type2 === "potion"))
return;
let popup = document.querySelector(".inventoryPage-confirmPopup");
if (!popup)
return;
let recipe = popup.getAttribute("data-item-type");
if (recipe) {
if (type2 === "potion") {
let consumed = document.querySelectorAll('.inventoryPage-confirmPopup-itemRow-quantity[data-source="consumed"]'), hasSB = !1;
if (consumed.forEach((item) => {
item.getAttribute("data-item-type") === "super_brie_cheese" && (hasSB = !0);
}), !hasSB)
return;
}
magic_essence_potions_default.no.includes(recipe) ? showCraftWarning("This is not worth crafting using Magic Essence.") : magic_essence_potions_default.maybe.includes(recipe) && showCraftWarning("Check the price of SUPER|brie+ before using Magic Essence.");
}
}, modifySmashableTooltip = () => __async(void 0, null, function* () {
if (getCurrentTab() !== "crafting" || getCurrentSubtab() !== "hammer")
return;
let items6 = document.querySelectorAll(".inventoryPage-item");
items6 && items6.forEach((item) => __async(void 0, null, function* () {
let tooltip = item.querySelector(".tooltip");
if (!tooltip)
return;
let producedItem = item.getAttribute("data-produced-item");
producedItem && (item.addEventListener("mouseleave", () => {
item.classList.remove("new-tooltip-loading");
}), item.addEventListener("mouseenter", () => __async(void 0, null, function* () {
if (item.getAttribute("data-new-tooltip") === "newTooltip")
return;
item.setAttribute("data-new-tooltip", "newTooltip"), producedItem = producedItem.includes(",") ? producedItem.split(",") : [producedItem];
let itemType = item.getAttribute("data-item-type");
producedItem.push(itemType), item.classList.add("new-tooltip-loading");
let itemData = yield cacheGet(`smashable-${producedItem.join("-")}`);
if (itemData || (itemData = yield getUserItems(producedItem), cacheSet(`smashable-${producedItem.join("-")}`, itemData)), !itemData || !itemData[0])
return;
let formattedParts = itemData.find((itemDataItem) => itemDataItem.type === itemType).formatted_parts;
if (!formattedParts)
return;
let tooltipWrapper = makeElement("div", ["newTooltip", "tooltip"]);
itemData.forEach((itemDataItem) => {
let formattedPart = formattedParts.find((formattedPartItem) => formattedPartItem.type === itemDataItem.type);
if (!formattedPart)
return;
let name = formattedPart.name, thumb = formattedPart.thumbnail_transparent || itemDataItem.thumbnail, quantity = formattedPart.quantity;
if (itemDataItem.type === "gold_stat_item") {
let quantityInt = Number.parseInt(quantity);
quantity = quantityInt >= 1e6 ? `${Math.floor(quantityInt / 1e5) / 10}m` : quantity.toLocaleString();
}
makeElement("div", ["new-tooltip-item", "inventoryPage-item"], `
<div class="inventoryPage-item-margin clear-block hidden">
<div class="inventoryPage-item-imageContainer">
<div class="itemImage"><img src="${thumb}">
<div class="quantity">${quantity}</div>
</div>
</div>
<div class="inventoryPage-item-content-nameContainer">
<div class="inventoryPage-item-content-name">
<span>${name}</span>
</div>
</div>
</div>`, tooltipWrapper);
}), tooltip.parentNode.insertBefore(tooltipWrapper, tooltip.nextSibling), item.classList.remove("new-tooltip-loading");
})));
}));
}), moveRecipe = (type2, recipesContainer) => {
let recipeEl = document.querySelector(`.inventoryPage-item.recipe[data-produced-item="${type2}"]`);
recipeEl && (recipeEl.classList.add("reordered"), recipesContainer.append(recipeEl));
}, updateRecipesOnPage = (type2) => __async(void 0, null, function* () {
if (!crafting_recipe_mapping_default[type2] || type2 === "recommended")
return;
let recipesContainer = document.querySelector(`.inventoryPage-tagContent-tagGroup[data-tag="${type2}"]`);
if (!recipesContainer)
return;
let recipesModifying = [];
if (document.querySelectorAll(".inventoryPage-tagContent-tagGroup.active .inventoryPage-item.recipe.known").forEach((recipe) => {
let recipeId = recipe.getAttribute("data-item-type");
recipesModifying.push(recipeId);
}), recipesModifying.length === 0)
return;
let itemTypes = recipesModifying.map((recipe) => crafting_recipe_mapping_default[type2][recipe]).filter(Boolean);
type2 === "crafting_item" && itemTypes.push("geyser_draconic_weapon"), (yield getUserItems(itemTypes)).forEach((item) => {
!item.quantity || item.quantity < 1 || (item.type === "geyser_draconic_weapon" ? (moveRecipe("draconic_geyser_chassis_crafting_item", recipesContainer), moveRecipe("draconic_geyser_chassis_i_crafting_item", recipesContainer)) : moveRecipe(item.type, recipesContainer));
});
}), recipes_default = () => __async(void 0, null, function* () {
addStyles(styles_default49, "better-inventory-recipes"), onNavigation(cleanUpRecipeBook, {
page: "inventory",
tab: "crafting",
subtab: "recipe"
}), onNavigation(modifySmashableTooltip, {
page: "inventory",
tab: "crafting",
subtab: "hammer"
}), onEvent("js_dialog_show", warnOnBadCrafts), modifySmashableTooltip();
});
}
});
var settings_default21, init_settings22 = __esm({
"src/modules/better-inventory/settings/index.js"() {
settings_default21 = () => __async(void 0, null, function* () {
return [
{
id: "better-inventory.one-item-per-row",
title: "Show one item per row",
default: !0
},
{
id: "better-inventory.larger-images",
title: "Show larger images",
default: !0
},
{
id: "better-inventory.sort-inventory",
title: "Sort inventory alphabetically",
default: !0
}
];
});
}
});
var double_width_item_default, init_double_width_item = __esm({
"src/modules/better-inventory/styles/double-width-item.css"() {
double_width_item_default = `.mousehuntHud-page-tabContent.special div[data-tag=adventuring] .inventoryPage-tagContent-listing,.mousehuntHud-page-tabContent.special div[data-tag=convertibles] .inventoryPage-tagContent-listing,.mousehuntHud-page-tabContent.special div[data-tag=spring_hunt] .inventoryPage-tagContent-listing,.mousehuntHud-page-tabContent.special div[data-tag=treasure_chests] .inventoryPage-tagContent-listing{display:grid;grid-template-columns:1fr 1fr;gap:5px;place-items:stretch}.mousehuntHud-page-tabContent.special .inventoryPage-item.full,.mousehuntHud-page-tabContent.special .inventoryPage-item.full:nth-child(odd){display:block;width:282px;margin-right:0;margin-left:0}.mousehuntHud-page-tabContent.special div[data-tag=treasure_chests] .inventoryPage-item-margin.clear-block{height:100%}
`;
}
});
var full_width_item_default, init_full_width_item = __esm({
"src/modules/better-inventory/styles/full-width-item.css"() {
full_width_item_default = `.inventoryPage-item.full{width:100%}.inventoryPage-item-content-action span{display:block;margin-bottom:5px}.inventoryPage-item-content-action>span{display:inline-block}.inventoryPage-item.base .itemViewStatBlock.horizontal.base,.inventoryPage-item.weapon .itemViewStatBlock.horizontal.weapon{float:right;width:54%}.inventoryPage-item.base .inventoryPage-item-content-description-text,.inventoryPage-item.weapon .inventoryPage-item-content-description-text{width:45%;height:unset;max-height:115px;overflow-y:auto}
`;
}
});
var larger_images_default, init_larger_images = __esm({
"src/modules/better-inventory/styles/larger-images.css"() {
larger_images_default = `.inventoryPage-item.small{width:19%;height:125px;margin-bottom:10px}.inventoryPage-item.small .itemImage,.inventoryPage-item.small .itemImage img{width:80px;height:80px}.mousehuntHud-page-subTabContent.crafting_table .inventoryPage-item.small .itemImage img{width:70px;height:70px}
`;
}
});
var styles_default50, init_styles51 = __esm({
"src/modules/better-inventory/styles/styles.css"() {
styles_default50 = `.inventoryPage-item.component .inventoryPage-item-imageContainer .itemImage{margin:0 auto;border:none;border-radius:0}.inventoryPage-item-content-action{margin:10px 0}.inventoryPage-item-content-description{height:auto;overflow:hidden auto}.inventoryPage-item.torn_page .inventoryPage-item-name,.inventoryPage-item.stat .inventoryPage-item-name,.inventoryPage-item.collectible .inventoryPage-item-name,.inventoryPage-item.message_item .inventoryPage-item-name{margin-left:10px}.inventoryPage-item.torn_page .inventoryPage-item-imageContainer,.inventoryPage-item.stat .inventoryPage-item-imageContainer,.inventoryPage-item.collectible .inventoryPage-item-imageContainer,.inventoryPage-item.message_item .inventoryPage-item-imageContainer{margin-top:0}.inventoryPage-item-name{max-width:calc(100% - 50px);padding:10px;font-size:1.3em;background-color:transparent;border:none}.inventoryPage-item-name abbr{text-decoration:none}.mousehuntHud-page-subTabContent.trinket.show_tags.trinket.active .mousehuntHud-page-subTabContent-prefix:first-child{display:none}.inventoryPage-tagContent-tagTitle{display:flex;align-items:center;padding:0 5px 10px;margin:0;font-size:1.4em;border:none}.mousehuntHud-page-subTabContent.hammer .inventoryPage-tagContent-tagGroup{padding:8px 0 8px 8px}.mousehuntHud-page-subTabContent.hammer .inventoryPage-tagContent-tagTitle{padding:0 0 10px;font-size:14px;font-weight:400}.mousehuntHud-page-subTabContent.hammer .inventoryPage-tagContent-listing{display:flex;flex-wrap:wrap;gap:5px 3px;place-content:center flex-start;align-items:stretch}.mousehuntHud-page-subTabContent.hammer .mousehuntHud-page-subTabContent.hammer .inventoryPage-item{width:68px;margin:0 3px 0 0;background-color:#fff;border-radius:10px}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:nth-child(7n){margin-right:0}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item{height:auto;padding-bottom:0;margin-bottom:0;font-size:9px}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .inventoryPage-item-margin{background-color:#e3e3e3;box-shadow:none}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item .tooltip,.mousehuntHud-page-subTabContent.hammer .inventoryPage-item .newTooltip{display:none}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .newTooltip{left:50%;display:flex;gap:10px;align-items:center;justify-content:center;width:auto;min-width:100px;padding:0;border:none;transform:translate(-50%)}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .newTooltip .inventoryPage-item-margin{display:flex;flex-direction:column;align-items:center;background-color:transparent;border:none;box-shadow:none}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .tooltip .inventoryPage-item-margin{text-align:center;background-color:transparent;outline:none}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item.small .tooltip.newTooltip .itemImage{float:none;width:60px;height:60px;overflow:visible}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item.small .tooltip.newTooltip .itemImage img{width:55px;height:55px}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .newTooltip .inventoryPage-item-content-nameContainer,.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .newTooltip .inventoryPage-item-content-name{height:auto}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .newTooltip .inventoryPage-item-content-name span{min-width:60px}a.inventoryPage-item-larryLexicon{display:none}.inventoryPage-item-content-description-text{max-height:125px;padding:0;font-size:10px;line-height:16px;color:#6e6e6e}.inventoryPage-item.base .inventoryPage-item-content-description-text,.inventoryPage-item.weapon .inventoryPage-item-content-description-text,.inventoryPage-item.trinket .inventoryPage-item-content-description-text{height:auto}.inventoryPage-item.full.weapon .quantity,.inventoryPage-item.full.base .quantity{display:none}.inventoryPage-item .itemImage{margin-bottom:10px;overflow:visible}.inventoryPage-item-recipeOptions li{margin-left:5px;background-color:#fffcdb;border-style:solid}.inventoryPage-item.small .itemImage .quantity{overflow:visible}.mousehuntHud-page-subTabContent.recipe .inventoryPage-item .itemImage{display:flex;align-items:center;justify-content:center;height:55px}.mousehuntHud-page-subTabContent.recipe .inventoryPage-item .itemImage img{width:50px;height:50px}.inventoryPage-item-content-description-consumedItem{width:calc(33% - 3px);margin-right:3px}.inventoryPage-item-content-description-consumedItem-image{margin-left:0}.inventoryPage-item-content-description-consumedItem.error{gap:2px;background-color:#f5ddddd1;border-radius:7px}input.inventoryPage-tagDirectory-searchBar-input{width:auto;min-width:50%;margin-right:10px}.mousehuntHud-page-subTabContent-prefix.clear-block{height:25px;color:transparent}.inventoryPage-tagDirectory-searchBar{display:flex;align-items:center;justify-content:space-evenly;padding-right:0;color:transparent}.inventoryPage-item.torn_page .quantity{display:none}.inventoryPage-item.torn_page .itemImage img{width:50px;min-width:unset;height:50px;min-height:unset}.inventoryPage-item.full.torn_page{width:32%;margin:5px}.inventoryPage-item.torn_page .inventoryPage-item-name{padding-right:0;font-size:1em}.inventoryPage-item.torn_page .itemImage{width:40px;height:40px;margin-top:-5px}.inventoryPage-item.torn_page .inventoryPage-item-contentContainer{margin:0}.inventoryPage-item.torn_page .inventoryPage-item-content-action div{display:flex;align-items:center;justify-content:space-around;height:40px;margin-right:15px}.inventoryPage-item.torn_page .inventoryPage-item-content-description{display:none}.inventoryPage-item.torn_page input.viewFront,.inventoryPage-item.torn_page input.viewBack{display:inline-block;padding:2px 4px;color:#000;text-shadow:0 0 1px #fff;background-color:#f4e830;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #ffae00 inset,1px 1px 1px #eee}.inventoryPage-craftingTable-title{display:none}.mousehuntHud-page-subTabContent.crafting_table .inventoryPage-craftingTable{width:20%;background:#f6f3eb;border:1px solid #d3cecb;border-radius:3px;box-shadow:inset -1px 1px 3px #d3cecb}.mousehuntHud-page-subTabContent.crafting_table .mousehuntHud-page-subTabContent-margin{width:78%}.inventoryPage-craftingTable-slot-item.itemImage{margin-bottom:10px}.inventoryPage-craftingTable-slot-item-controls{display:flex;align-items:center;justify-content:center;height:17px;margin:0;background:transparent;border:1px solid #ccc}.inventoryPage-craftingTable-slot-item-controls input{height:24px;margin-top:-1px}.inventoryPage-craftingTable-action{margin:10px;background:none;border:none}.inventoryPage-craftingTable-slot-item[data-owned="1"] .inventoryPage-craftingTable-slot-item-controls-increment{opacity:.2}.inventoryPage-craftingTable-slot{width:120px;padding:5px;margin:5px;background:#f6f3eb;border:1px solid #d3cecb;border-radius:3px;box-shadow:inset -1px 1px 3px #d3cecb}.inventoryPage-craftingTable-slotContainer{display:flex;flex-direction:column;align-content:center;justify-items:center;background-color:#f6f3eb}.inventoryPage-craftingTable-slot-item{display:flex;flex-direction:column;align-items:center;justify-content:flex-start}.inventoryPage-craftingTable-slot-item.empty .inventoryPage-craftingTable-slot-item-controls,.inventoryPage-craftingTable-slot-item.empty .inventoryPage-craftingTable-slot-item-nameContainer{display:none}.inventoryPage-craftingTable-slot-item.empty .inventoryPage-craftingTable-slot-item-name{color:transparent}.inventoryPage-craftingTable-slot-item-quantity{display:none}.inventoryPage-craftingTable-slot-item-name{font-size:11px;font-weight:100}.inventoryPage-craftingTable-slot-item-nameContainer{width:100%;height:auto;margin:5px}.inventoryPage-craftingTable-slot-item img,.inventoryPage-craftingTable-slot-item .itemImage,.inventoryPage-craftingTable-slot-item .itemImage img{width:35px;height:35px}a.inventoryPage-item-larryLexicon.tsitu-lock-convertible{top:5px;right:5px!important;display:flex;align-items:center;justify-content:center;width:17px;height:17px!important;padding:2px;font-size:13px;border:1px solid #bebebe;border-radius:50%;opacity:.5}a.inventoryPage-item-larryLexicon.tsitu-lock-convertible:hover{opacity:1}.inventoryPage-tagContent-tagTitle.tsitu-lock-convertible{position:absolute;top:-10px;right:0}.inventoryPage-item.small.message_item .inventoryPage-item-margin{border-color:#48b0a9}.inventoryPage-item.small.message_item .inventoryPage-item-content-name{color:#368f89}.mhui-craft-warning-tooltip{position:absolute;top:0;left:0;width:auto;padding:10px;font-size:10px;font-weight:900;background:#f5c7c7;border:1px solid #e07878;border-radius:5px;animation:.4s mh-improved-shake-light .7s 1}@media (prefers-reduced-motion: reduce){.mhui-craft-warning-tooltip{animation:none}}#jsDialogAjaxSuffix{position:relative}.inventoryPage-item .itemImage .limitedEdition{top:-1px;left:-5px;z-index:1}#overlayPopup.itemViewPopup .itemViewContainer.message_item .button{margin:10px 0 0}.inventoryPage-item.base .inventoryPage-item-content-description-text,.inventoryPage-item.weapon .inventoryPage-item-content-description-text{max-height:115px;overflow:visible}.inventoryPage-confirmPopup-itemTable{display:flex;flex-direction:column}.inventoryPage-confirmPopup-itemRow-description-name{margin-bottom:5px}.inventoryPage-confirmPopup-itemRow-description-owned{margin-bottom:5px;font-size:12px}.inventoryPage-confirmPopup-itemRow-quantity{font-family:lucida grande,tahoma,verdana,arial,sans-serif}.inventoryPage-item-content-action>span{display:none}.inventoryPage-item .item_set:after{position:absolute;top:8px;right:3px;display:block;width:28px;height:28px;content:"";background-image:url(https://www.mousehuntgame.com/images/items/stats/large/cb301652677b77c9abd3a99622aa3ca7.png);background-repeat:no-repeat;background-size:contain;opacity:.2}.inventoryPage-item:hover .item_set:after{opacity:1}.mh-dark-mode .pageFrameView .itemViewStatBlock{border:none}.mh-dark-mode .inventoryPage-item .item_set:before{color:#2c2c2c}.inventoryPage-item:hover .item_set:before{color:#2c2c2c}.inventoryPage-item.trinket .inventoryPage-item-content-description{min-height:120px}.inventoryPage-item.trinket .itemViewStatBlock.trinket{float:right;width:90px;margin:0 5px}.inventoryPage-item-content-description-text div[style="border: 1px red dotted; padding: 5px; font-size: 10px;"],.inventoryPage-item-content-description-text b[style="color:red; font-size: 14px;"],.inventoryPage-item[data-item-type=rainbow_scroll_case_convertible] .inventoryPage-item-content-description-text br,.inventoryPage-item[data-item-type=party_size_rainbow_scroll_case_convertible] .inventoryPage-item-content-description-text br{display:none}.inventoryPage-item-content-action span{margin-right:5px}.inventoryPage-item.small .inventoryPage-item-margin{border-color:#ccc;border-radius:5px;box-shadow:0 1px 2px -2px #1f1f1f}.inventoryPage-item.small:hover .inventoryPage-item-margin,.inventoryPage-item.small:focus .inventoryPage-item-margin{background-color:#d8f0ff;border-color:#ccc;box-shadow:0 1px 2px -2px #1f1f1f}.mousehuntHud-page-subTabContent.trinket .mousehuntHud-page-subTabContent-prefix{display:none}.new-tooltip-loading:after{position:absolute;inset:1px;content:"";background:url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif) center no-repeat,url(https://www.mousehuntgame.com/images/ui/backgrounds/overlay.png) 0 0 repeat;border-radius:5px}.inventoryPage-item.small .tooltip{padding:10px}.inventoryPage-item-content-description-consumedItemContainer{margin-top:0}.crafting .recipe .inventoryPage-item-margin{padding-bottom:0}.crafting .recipe .inventoryPage-item .mousehuntActionButton{padding:2px;margin-top:-5px!important}.crafting .recipe .inventoryPage-item-name{margin-bottom:0}.mousehuntHud-page-subTabContent.crafting_table .inventoryPage-item .inventoryPage-item-margin{padding:0;margin:0}.inventoryPage-item-recipeOptions li.inactive{background:#ededed;opacity:.5}.inventoryPage-item-recipeOptions li.inactive:hover{opacity:1}.inventoryPage-item-recipeOptions li.selected{border-color:#fc6}.inventoryPage-item-recipeOptions li:hover,.inventoryPage-item-recipeOptions li.inactive:hover{border-color:#bbb}.inventoryPage-item.potion .inventoryPage-item-button{margin:5px 0 0 5px}.inventoryPage-item.small:hover .tooltip{max-width:250px}.inventoryPage-item.small:hover .tooltip .description{max-height:58px;overflow:hidden;text-overflow:ellipsis}.inventoryPage-item.small:hover .tooltip .inventoryPage-item-button{margin-top:10px}.inventoryPage-shieldExpiry{display:none}.search .inventoryPage-tagContent-tagTitle .inventoryPage-tagContent-name{padding-right:5px}.inventoryPage-item.small.armed .inventoryPage-item-margin{background-color:#ffeaea;border-color:#ff8585;box-shadow:0 0 5px #ffeaea}
`;
}
});
var tiny_group_default, init_tiny_group = __esm({
"src/modules/better-inventory/styles/tiny-group.css"() {
tiny_group_default = `.tiny-item{display:grid;grid-template-columns:25px 2fr 1fr 1fr;place-items:center stretch}.tiny-item-image{width:20px;height:20px}.tiny-item .inventoryPage-item-button.button{padding:0;font-size:11px}.tiny-item .inventoryPage-item-content-action{justify-self:flex-end;margin:0}.tiny-item:nth-child(2n){background-color:#eee;border-radius:5px}.tiny-item:hover,.tiny-item:nth-child(2n):hover{background-color:#d8f0ff;border-radius:5px}.tiny-item-stats{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:4px}.tiny-item-action{position:relative;display:none;gap:5px;justify-self:center;margin-bottom:0}.tiny-item:hover .tiny-item-action{display:flex}.mousehuntActionButton.tiny.tiny-item-view{padding:1px 5px;margin-bottom:0}.inventoryPage-item .mousehuntActionButton.tiny.tiny-item-view{margin:0!important}.all-group .inventoryPage-tagContent-tagTitle:after{width:0;height:0;margin-left:5px;content:"";border-right:5px solid transparent;border-bottom:5px solid #999;border-left:5px solid transparent;transition:transform .15s}.all-group.toggled .inventoryPage-tagContent-tagTitle:after{transform:rotate(-180deg)}.tiny-item-action.busy:after{position:absolute;inset:0;display:block;content:"";background:url(https://www.mousehuntgame.com/images/ui/loaders/small_spinner.gif) center no-repeat;background-color:#ffffff7f;border-radius:4px}
`;
}
});
var setOpenQuantityOnClick, addOpenAllToConvertible, updateCollectibles, addArmButtonToCharms, sortInventoryItemsByName, resortInventory, addResortInventory, _InventoryPageuseItem, replaceInventoryView, main9, init54, better_inventory_default, init_better_inventory = __esm({
"src/modules/better-inventory/index.js"() {
init_utils2();
init_recipes();
init_settings22();
init_double_width_item();
init_full_width_item();
init_larger_images();
init_styles51();
init_tiny_group();
setOpenQuantityOnClick = (attempts = 0) => {
let qty = document.querySelector(".itemView-action-convertForm");
if (!qty) {
if (attempts > 10)
return;
setTimeout(() => {
setOpenQuantityOnClick(attempts + 1);
}, 200);
return;
}
qty.addEventListener("click", (e) => {
if (e.target.tagName === "DIV") {
let maxNum = e.target.innerText.split(" ").at(-1);
maxNum = maxNum.replace("Submit", ""), maxNum = Number.parseInt(maxNum);
let input = document.querySelector(".itemView-action-convert-quantity");
input.value = maxNum;
}
});
}, addOpenAllToConvertible = () => {
let form = document.querySelector(".convertible .itemView-action-convertForm");
if (!form || form.getAttribute("data-open-all-added"))
return;
form.setAttribute("data-open-all-added", !0);
let formHTMLArray = form.innerHTML.split(" /");
if (!formHTMLArray[1])
return;
let formHTMLArray2 = formHTMLArray[1].split("<a");
if (!formHTMLArray2[1])
return;
let quantity = formHTMLArray2[0].trim(), newFormHTML = `${formHTMLArray[0]}/ <span class="open-all">${quantity}</span><a${formHTMLArray2[1]}`;
form.innerHTML = newFormHTML, document.querySelector(".open-all").addEventListener("click", () => {
let input = form.querySelector(".itemView-action-convert-quantity");
input && (input.value = Number.parseInt(input.value, 10) > 200 ? 200 : Number.parseInt(input.value, 10));
});
}, updateCollectibles = () => {
let collectibles = document.querySelectorAll(".mousehuntHud-page-subTabContent.collectible .inventoryPage-item.small");
collectibles.length && collectibles.forEach((collectible) => {
let type2 = collectible.getAttribute("data-item-type");
if (!type2)
return;
let name = collectible.getAttribute("data-name"), nameEl = collectible.querySelector(".inventoryPage-item-content-name span");
name && nameEl && (nameEl.innerText = name), collectible.getAttribute("data-item-classification") !== "message_item" && (collectible.setAttribute("onclick", ""), collectible.addEventListener("click", (e) => {
e.preventDefault(), hg.views.ItemView.show(type2);
}));
});
}, addArmButtonToCharms = () => {
if (getCurrentPage() !== "inventory" || getCurrentTab() !== "traps" || getCurrentSubtab() !== "trinket")
return;
let charms = document.querySelectorAll(".inventoryPage-item.trinket");
charms.length && charms.forEach((charm) => {
if (charm.querySelector(".inventoryPage-item-imageContainer-action"))
return;
let actionContainer = charm.querySelector(".inventoryPage-item-imageContainer");
if (!actionContainer)
return;
let armButton = makeElement("div", "inventoryPage-item-imageContainer-action");
armButton.setAttribute("onclick", "app.pages.InventoryPage.armItem(this); return false;"), actionContainer.append(armButton);
});
}, sortInventoryItemsByName = (items6) => [...items6].sort((a, b) => {
let aName = a.getAttribute("data-name") || "", bName = b.getAttribute("data-name") || "";
return aName.localeCompare(bName);
}).filter((item, index, self) => index === self.findIndex((t) => t.getAttribute("data-item-type") === item.getAttribute("data-item-type"))), resortInventory = () => {
document.querySelectorAll(".mousehuntHud-page-tabContent.active .inventoryPage-tagContent-listing").forEach((list) => {
let items6 = list.querySelectorAll(".inventoryPage-item");
sortedItems = sortInventoryItemsByName(items6), sortedItems.forEach((item) => {
let name = item.getAttribute("data-name"), nameEl = item.querySelector(".inventoryPage-item-content-name span");
name && nameEl && (nameEl.innerText = name), list.append(item);
});
});
}, addResortInventory = () => {
onNavigation(() => {
setTimeout(resortInventory, 250);
}, {
page: "inventory",
anyTab: !0,
anySubtab: !0
}), onRequest("pages/page.php", (response, data) => {
data.page_class === "Inventory" && setTimeout(resortInventory, 250);
});
}, replaceInventoryView = () => {
_InventoryPageuseItem || (_InventoryPageuseItem = app.pages.InventoryPage.useItem, app.pages.InventoryPage.useItem = function(target) {
let itemClassification = target.getAttribute("data-item-classification");
if (!itemClassification)
return _InventoryPageuseItem(element);
if (![
"bait",
"collectible",
"crafting_item",
"message_item",
"recipe",
"stat"
].includes(itemClassification))
return _InventoryPageuseItem(target);
let container = target.closest(".mousehuntHud-page-subTabContent");
if (!container)
return _InventoryPageuseItem(target);
if (container.classList.contains("hammer"))
return this.showConfirmPopup(target, "hammer");
if (itemClassification === "recipe") {
let closest = document.elementFromPoint(window.event.clientX, window.event.clientY).closest("[data-item-type]");
closest && hg.views.ItemView.show(closest.getAttribute("data-item-type"));
return;
}
let itemType = target.getAttribute("data-item-type");
if (itemClassification === "crafting_item")
return window.event && window.event.shiftKey ? hg.views.ItemView.show(itemType) : this.toggleCraftingTableItem(target);
if (itemClassification === "message_item")
return this.useMessageItem(target);
if (itemClassification === "bait")
return this.armItem(target);
if (itemType) {
if (itemType === "eggstreme_eggscavation_upgrade_stat_item" || itemType === "eggstreme_eggscavation_shovel_stat_item")
return hg.views.EggstremeEggscavationView.show();
hg.views.ItemView.show(itemType);
}
});
}, main9 = () => {
onOverlayChange({ item: { show: setOpenQuantityOnClick } }), getCurrentPage() === "item" && setOpenQuantityOnClick();
let go = () => {
addOpenAllToConvertible(), updateCollectibles(), addArmButtonToCharms(), replaceInventoryView();
};
go(), onNavigation(go, {
page: "inventory"
}), getSetting("better-inventory.sort-inventory", !0) && addResortInventory(), onEvent("js_dialog_show", addOpenAllToConvertible), recipes_default();
}, init54 = () => __async(void 0, null, function* () {
addStyles([
styles_default50,
getSetting("better-inventory.one-item-per-row", !0) ? full_width_item_default : double_width_item_default,
getSetting("better-inventory.larger-images", !0) ? larger_images_default : "",
getSetting("better-inventory.show-all-group", !1) ? tiny_group_default : ""
], "better-inventory"), main9();
}), better_inventory_default = {
id: "better-inventory",
name: "Better Inventory",
type: "better",
default: !0,
description: "Update the inventory layout and styling.",
load: init54,
settings: settings_default21
};
}
});
var styles_default51, init_styles52 = __esm({
"src/modules/favorite-setups/styles.css"() {
styles_default51 = `.mh-improved-favorite-setups-button{position:relative;display:block;padding:5px 10px;margin:5px 0;font-size:12px;font-weight:700;line-height:31px;color:#4e300b;cursor:pointer;background:#f6f3eb;border:1px solid #d3cecb;border-radius:4px;box-shadow:-1px 1px 3px #d3cecb inset}.mh-improved-favorite-setups-button-label{position:absolute;top:0;right:10px;bottom:0;display:flex;align-items:center;font-size:13px;font-weight:100;color:#8e6642;vertical-align:bottom}.mh-improved-favorite-setups-button:hover{text-decoration:none}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .mh-improved-favorite-setups-button:hover{background-color:#494949}.mh-improved-favorite-setups-blueprint-container{position:absolute;inset:0;color:#4e300b}.mh-improved-favorite-setups-blueprint-container .header{margin-top:10px;font-size:13px;color:#8e6642;text-align:center}.mh-improved-favorite-setups-blueprint-container .content{position:absolute;inset:35px 5px 10px;overflow-y:auto}.mh-improved-favorite-setups-blueprint-container .row{display:grid;grid-template-columns:1fr 30px repeat(4,45px);align-items:center;height:auto;min-height:50px;padding:3px;margin-bottom:7px;background:#fff;border:1px solid #ceb7a6;border-radius:5px}.mh-improved-favorite-setups-blueprint-container .location-favorites{padding:10px 0;margin:10px 0}.mh-improved-favorite-setups-blueprint-container .row.location-favorite{background-color:#fdfacf}.mh-improved-favorite-setups-blueprint-container .row.location-favorite:last-child{margin-bottom:0}.mh-improved-favorite-setups-blueprint-container .row .campPage-trap-itemBrowser-favorite-item-image{width:100%;height:45px;border-radius:0}.mh-improved-favorite-setups-blueprint-container .row.editing{grid-template-columns:1fr repeat(4,40px);align-items:start}.mh-improved-favorite-setups-blueprint-container .controls{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-around;height:50px}.mh-improved-favorite-setups-blueprint-container .row.editing .controls{align-items:flex-end}.mh-improved-favorite-setups-blueprint-container .button-wrapper{display:flex;gap:5px;align-items:center;justify-content:center}.mh-improved-favorite-setups-blueprint-container .row.editing .button-wrapper{align-self:flex-end;margin-right:5px}.mh-improved-favorite-setups-blueprint-container .campPage-trap-itemBrowser-favorite-item{width:100%}.mh-improved-favorite-setups-blueprint-container .controls .label{padding:0;font-size:12px;text-align:center}.mh-improved-favorite-setups-blueprint-container .controls .action{padding:4px 6px;font-size:11px;font-weight:400;line-height:inherit}.mh-improved-favorite-setups-blueprint-container .controls .action.arm{padding:4px 10px}.mh-improved-favorite-setups-blueprint-container .edit{position:absolute;right:10px}.mh-improved-favorite-setups-blueprint-container .controls .delete,.mh-improved-favorite-setups-blueprint-container .editing .controls .delete,.mh-improved-favorite-setups-blueprint-container .editing .controls .edit-setup,.mh-improved-favorite-setups-blueprint-container.editing .controls .edit-setup,.mh-improved-favorite-setups-blueprint-container .controls .save-setup,.mh-improved-favorite-setups-blueprint-container .controls .cancel-setup,.mh-improved-favorite-setups-blueprint-container.editing .controls .arm,.mh-improved-favorite-setups-blueprint-container .editing .controls .arm{display:none}.mh-improved-favorite-setups-blueprint-container .editing .controls .delete,.mh-improved-favorite-setups-blueprint-container .editing .controls .save-setup,.mh-improved-favorite-setups-blueprint-container .editing .controls .cancel-setup{display:block}.mh-improved-favorite-setups-blueprint-container .row.flash{background-color:#b9ffb9}.mh-improved-favorite-setups-blueprint-container .controls input{width:150px}.row.editing .campPage-trap-itemBrowser-favorite-item:after{position:absolute;right:5px;bottom:-8px;left:5px;display:flex;align-items:center;justify-content:center;padding:2px 0;content:"edit";background-color:#eeeeeeed;border:1px solid #585858;border-radius:5px}.row.editing .campPage-trap-itemBrowser-favorite-item:hover:after{background-color:#ccc}.mh-improved-favorite-setups-blueprint-container .editing .campPage-trap-itemBrowser-favorite-item:hover .campPage-trap-itemBrowser-favorite-item-image{opacity:.8}.mh-improved-favorite-setups-component-picker-popup-body-items{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mh-improved-favorite-setups-component-picker .prefix,.mh-improved-favorite-setups-component-picker .content{background-color:#f6f3eb}.mh-improved-favorite-setups-component-picker .content .content{max-height:90vh;overflow:auto}.mh-improved-favorite-setups-component-picker .campPage-trap-itemBrowser-item{width:auto;max-width:300px}.mh-improved-favorite-setups-component-picker-popup-search{display:flex;align-items:center;justify-content:space-around;margin-bottom:20px}.mh-improved-favorite-setups-component-picker-popup-search input{width:350px;padding:10px}.mh-improved-favorite-setups-component-picker .campPage-trap-itemBrowser-item-description{margin-left:0}.mh-improved-favorite-setups-component-picker .trinket .campPage-trap-itemBrowser-item-content{width:80%}a.random-title:after{position:absolute;top:2px;right:-18px;box-sizing:border-box;display:block;width:17px;height:17px;padding:9px;margin:1px;content:"";background:url(https://www.mousehuntgame.com/images/ui/puzzle/refresh.png) no-repeat center center / contain;border-radius:50%}a.random-title:hover:after{background-color:#ddd}a.random-title.loading:after{animation:mh-improved-spin 1s linear infinite}@media (prefers-reduced-motion: reduce){a.random-title.loading:after{animation:none}}.mh-improved-favorite-setups-blueprint-container .editing .controls .label{position:relative;align-self:flex-start}.mh-improved-favorite-setups-blueprint-container .row .mh-improved-favorite-setups-power-type-wrapper .campPage-trap-itemBrowser-favorite-item-image{width:25px;height:25px;opacity:.8}.mh-improved-favorite-setups-component-picker-popup .campPage-trap-itemBrowser-item-statContainer{width:75%;margin-top:5px}.mh-improved-favorite-setups-component-picker-popup .campPage-trap-itemBrowser-item-content{width:80%}.mh-improved-favorite-setups-blueprint-container .editing .campPage-trap-itemBrowser-item-powerType{display:none}.mh-improved-favorite-setups-blueprint-container .campPage-trap-itemBrowser-item-powerType{display:flex;flex-direction:column;align-items:center;justify-content:center;width:25px}.mh-improved-favorite-setups-blueprint-container .campPage-trap-itemBrowser-item-powerType.hidden{visibility:hidden}.mh-improved-favorite-setups-blueprint-container .campPage-trap-itemBrowser-item-powerType:before{box-sizing:border-box;background-color:transparent;border:none}.mh-improved-favorite-setups-blueprint-container .row:hover .controls .action.arm{outline:2px solid #eab35d}.mh-improved-favorite-setups-blueprint-container .row.editing .campPage-trap-itemBrowser-favorite-item-image{height:40px}.mh-improved-favorite-setups-blueprint-container .row.editing .move-buttons{display:flex}.mh-improved-favorite-setups-blueprint-container .row .move-buttons{position:absolute;bottom:20px;left:28px;display:none;flex-direction:row;align-items:center}.mh-improved-favorite-setups-blueprint-container .row.editing a.move-down:after,.mh-improved-favorite-setups-blueprint-container .row.editing a.move-up:after{position:absolute;top:0;right:0;width:18px;height:18px;content:"";background-repeat:no-repeat;background-size:contain;opacity:.4}.mh-improved-favorite-setups-blueprint-container .row.editing a.move-up:after{position:absolute;right:13px;background:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 17a.75.75 0 0 1-.75-.75V5.612L5.29 9.77a.75.75 0 0 1-1.08-1.04l5.25-5.5a.75.75 0 0 1 1.08 0l5.25 5.5a.75.75 0 1 1-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0 1 10 17Z" clip-rule="evenodd" /></svg>')}.mh-improved-favorite-setups-blueprint-container .row.editing a.move-down:after{background:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z" clip-rule="evenodd" /></svg>')}.mh-improved-favorite-setups-blueprint-container .row.editing a.move-down:hover:after,.mh-improved-favorite-setups-blueprint-container .row.editing a.move-up:hover:after{opacity:1}.mh-improved-favorite-setups-blueprint-container .row:last-child .move-down{display:none}.mh-improved-favorite-setups-blueprint-container .row:nth-child(2) .move-up{display:none}.pageFrameView #mousehuntContainer.PageCamp .mh-improved-favorite-setups-button:hover{background-color:#fdfaf2}.mh-dark-mode .pageFrameView .mh-improved-favorite-setups-blueprint-container .campPage-trap-itemBrowser-item-powerType:after{color:#000}.mh-dark-mode .mh-improved-favorite-setups-button-label{color:#e0d3b3}.mh-dark-mode .mh-improved-favorite-setups-button-text{color:#ebebeb}.mousehuntHeaderView .menuItem.mousehunt-improved-favorite-setups-icon{display:flex;align-items:center;justify-content:center;width:20px;height:25px;padding:0}.mousehunt-improved-favorite-setups-icon:before{display:block;width:15px;height:15px;content:"";background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10.868 2.884c-.321-.772-1.415-.772-1.736 0l-1.83 4.401-4.753.381c-.833.067-1.171 1.107-.536 1.651l3.62 3.102-1.106 4.637c-.194.813.691 1.456 1.405 1.02L10 15.591l4.069 2.485c.713.436 1.598-.207 1.404-1.02l-1.106-4.637 3.62-3.102c.635-.544.297-1.584-.536-1.65l-4.752-.382-1.831-4.401Z" clip-rule="evenodd" /></svg>');background-repeat:no-repeat;background-size:contain;opacity:.5}.mousehunt-improved-favorite-setups-icon:hover:before{opacity:1}.mh-improved-favorite-setups-blueprint-container .editing .controls .action{padding:2px 6px}.mh-improved-favorite-setups-blueprint-container .location-favorite .controls .edit-setup{display:none}.campPage-trap-itemBrowser-favorite-item.loading .campPage-trap-itemBrowser-favorite-item-image:after{position:absolute;inset:0;content:"";background:center / 15px no-repeat url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif),center / contain repeat url(https://www.mousehuntgame.com/images/ui/backgrounds/overlay.png)}.row .campPage-trap-itemBrowser-favorite-item{pointer-events:none}.row.editing .campPage-trap-itemBrowser-favorite-item.clickable{pointer-events:auto}.row.mobile-setup{background-color:#d1ebed}
`;
}
});
var settings_default22, init_settings23 = __esm({
"src/modules/favorite-setups/settings/index.js"() {
settings_default22 = () => __async(void 0, null, function* () {
return [
{
id: "favorite-setups.show-mobile-favorites",
title: "Include mobile favorites",
default: !1
}
];
});
}
});
var getFavoriteSetups, getGeneratedName, saveFavoriteSetup, removeMobileSetups, normalizeSetup, getCurrentSetup, itemThumbs2, addImage, makeButton2, getCheeseEffect, getPowerTypeId, makeImagePicker, armItem, makeBlueprintRow, makeBlueprintContainer, getNameOfCurrentSetup, updateFavoriteSetupName, setMobileFavourite, deleteMobileFavourite, postMobileTrapAction, addFavoriteSetupsButton, toggleFavoriteSetups, addIcon2, init55, favorite_setups_default3, init_favorite_setups3 = __esm({
"src/modules/favorite-setups/index.js"() {
init_utils2();
init_styles52();
init_settings23();
getFavoriteSetups = () => __async(void 0, null, function* () {
var _a;
let faves = getSetting("favorite-setups.setups", []);
if (getSetting("favorite-setups.show-mobile-favorites", !1)) {
let userData = yield getUserData(["trap_favourite"]), mobileFavorites = ((_a = userData == null ? void 0 : userData.trap_favourite) == null ? void 0 : _a.favourite_traps) || [];
if (mobileFavorites != null && mobileFavorites.length) {
let newFaves = [];
for (let [slot, favorite] of mobileFavorites.entries()) {
let newFavorite = {
id: `mobile-${slot}`,
name: favorite == null ? void 0 : favorite.name,
bait_id: favorite == null ? void 0 : favorite.bait_id,
base_id: favorite == null ? void 0 : favorite.base_id,
weapon_id: favorite == null ? void 0 : favorite.weapon_id,
trinket_id: favorite == null ? void 0 : favorite.trinket_id,
power_type: null,
// TODO: add this.
is_mobile: !0
// TODO: add a check for this when editing.
};
faves = faves.filter((s) => !s.is_mobile || s.is_mobile && !s.id.startsWith("mobile-")), faves.find((s) => (s == null ? void 0 : s.id) === newFavorite.id) || newFaves.push(newFavorite);
}
faves = [...faves, ...newFaves];
}
}
return !faves || !Array.isArray(faves) || !faves.length ? [] : faves.filter(Boolean);
}), getGeneratedName = (setup) => __async(void 0, null, function* () {
return yield (yield fetch("https://setup-namer.mouse.rip", {
method: "POST",
headers: getHeaders(),
body: JSON.stringify([
setup.bait_id,
setup.base_id,
setup.weapon_id,
setup.trinket_id
])
})).json();
}), saveFavoriteSetup = (setup, useGeneratedName = !0) => __async(void 0, null, function* () {
let setups = yield getFavoriteSetups();
setups.length || (setups = []);
let normalizedSetup = normalizeSetup(setup);
if (useGeneratedName) {
let setupNameData = yield getGeneratedName(normalizeSetup);
setupNameData.name && (normalizedSetup.name = setupNameData.name);
} else
normalizedSetup.name = user.environment_name;
if (setup.id) {
normalizedSetup.id = setup.id;
let index = setups.findIndex((s) => (s == null ? void 0 : s.id) && s.id === setup.id);
index === -1 ? setups.push(normalizedSetup) : setups[index] = normalizedSetup;
} else
try {
setups.push(normalizedSetup);
} catch (e) {
setups = [normalizedSetup];
}
return setups = removeMobileSetups(setups), saveSetting("favorite-setups.setups", setups), normalizedSetup;
}), removeMobileSetups = (setups) => setups.filter((s) => !s || !s.is_mobile || s.is_mobile && !s.id.startsWith("mobile-")), normalizeSetup = (setup) => Object.keys(setup).reduce((acc, key) => (acc[key] = setup[key] ? setup[key].toString() : "", acc), {}), getCurrentSetup = () => normalizeSetup({
id: "current",
name: "Current Setup",
bait_id: user.bait_item_id,
base_id: user.base_item_id,
weapon_id: user.weapon_item_id,
trinket_id: user.trinket_item_id,
power_type: user == null ? void 0 : user.trap_power_type_name.toLowerCase(),
location: getCurrentLocation2()
}), addImage = (type2, id, appendTo) => __async(void 0, null, function* () {
var _a;
let wrapper = makeElement("div", "campPage-trap-itemBrowser-favorite-item");
wrapper.setAttribute("data-item-id", id), wrapper.setAttribute("data-item-type", type2), wrapper.setAttribute("title", `Click to change ${type2}`);
let item = makeElement("div", ["campPage-trap-itemBrowser-favorite-item-image"]);
itemThumbs2 || (itemThumbs2 = yield getData("item-thumbnails")), item.style.backgroundImage = `url(${((_a = itemThumbs2.find((thumb) => thumb.id == id)) == null ? void 0 : _a.thumb) || ""})`, makeElement("div", "campPage-trap-itemBrowser-favorite-item-frame", "", item), wrapper.append(item), appendTo.append(wrapper);
}), makeButton2 = (button) => {
let buttonElement = makeElement("a", ["mousehuntActionButton", "action", ...button.className]);
return makeElement("span", "", button.text, buttonElement), buttonElement.addEventListener("click", button.callback), buttonElement;
}, getCheeseEffect = (textValue) => ({
"Uber Fresh": 13,
"Ultimately Fresh": 12,
"Insanely Fresh": 11,
"Extremely Fresh": 10,
"Very Fresh": 9,
Fresh: 8,
"No Effect": 7,
Stale: 6,
"Very Stale": 5,
"Extremely Stale": 4,
"Insanely Stale": 3,
"Ultimately Stale": 2,
"Uber Stale": 1
})[textValue], getPowerTypeId = (powerType) => ({
arcane: "arcn",
draconic: "drcnc",
forgotten: "frgttn",
hydro: "hdr",
law: "law",
parental: "prntl",
physical: "phscl",
rift: "rift",
shadow: "shdw",
tactical: "tctcl"
})[powerType] || powerType, makeImagePicker = (setupId, type2, currentId, callback) => __async(void 0, null, function* () {
let components, cached = sessionGet("mh-improved-favorite-setups-components");
if (cached)
components = cached;
else {
let response = yield doRequest("managers/ajax/users/gettrapcomponents.php");
components = (response == null ? void 0 : response.components) || [], components.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0), sessionSet("mh-improved-favorite-setups-components", components);
}
let items6 = components.filter((item) => item.classification === type2), content = '<div class="mh-improved-favorite-setups-component-picker-popup">';
content += '<div class="mh-improved-favorite-setups-component-picker-popup-body">', content += '<div class="mh-improved-favorite-setups-component-picker-popup-search">', content += '<input type="text" placeholder="Search" id="mh-improved-favorite-setups-component-picker-popup-search-input" />', content += '<div class="mh-improved-favorites-setups-component-picker-popup-use-current mousehuntActionButton" title="Use current item"><span>Use currently armed item</span></div>', content += "</div>", content += '<div class="mh-improved-favorite-setups-component-picker-popup-body-items">';
for (let item of items6) {
let getStatRow = (stat, title, formatted, compare) => {
let compareStat = item[stat];
stat === "cheese_effect" && (compareStat = getCheeseEffect(item), compare = getCheeseEffect(compare));
let compareClass = compare === compareStat ? "" : compare > compareStat ? "better" : "worse";
return `<div class="campPage-trap-itemBrowser-item-stat ${stat} ${compareClass}" title="${title}">
<div class="value"><span>${formatted}</span></div>
</div>`;
};
content += `<div class="campPage-trap-itemBrowser-item loaded ${type2}" data-item-id="${item.item_id}">`, content += ' <div class="campPage-trap-itemBrowser-item-leftBar">', content += `  <a href="#"><div class="campPage-trap-itemBrowser-item-image" style="background-image:url(${item.thumbnail});"></div></a>`, content += `  <a href="#" class="campPage-trap-itemBrowser-item-armButton save-button" data-item-id="${item.item_id}" data-item-classification="${type2}" data-item-image="${item.thumbnail}" data-the-power-type="${item.power_type_image_name}">Use</a>`, content += " </div>", content += ' <div class="campPage-trap-itemBrowser-item-content">', content += ` <div class="campPage-trap-itemBrowser-item-name">${item.name}</div>`, (type2 === "bait" || type2 === "trinket") && (content += `<div class="campPage-trap-itemBrowser-item-quantity"><span class="quantity">${Number.parseInt(item.quantity).toLocaleString()}</span><span class="label">Quantity</span></div>`), item.power_type && (content += `<div class="campPage-trap-itemBrowser-item-powerType ${item.power_type}"></div>`), item.has_stats && (content += '<div class="campPage-trap-itemBrowser-item-statContainer">', content += item.has_power ? getStatRow("power", "Power", item.power_formatted, user.trap_power) : "", content += item.has_power_bonus ? getStatRow("power_bonus", "Power Bonus", item.power_bonus_formatted, user.trap_power_bonus) : "", content += item.has_attraction_bonus ? getStatRow("attraction_bonus", "Attraction Bonus", item.attraction_bonus_formatted, user.trap_attraction_bonus) : "", content += item.has_luck ? getStatRow("luck", "Luck", item.luck_formatted, user.trap_luck) : "", content += getStatRow("cheese_effect", "Cheese Effect", item.cheese_effect, user.trap_cheese_effect), content += "</div>"), content += '<div class="campPage-trap-itemBrowser-item-description shortDescription">', content += item.consume_method ? `<div class="campPage-trap-itemBrowser-item-description-consumeMethod"><b>Consumed on:</b> ${item.consume_method}</div>` : "", content += "</div>", content += "</div>", content += "</div>";
}
content += "</div>", content += "</div>", content += "</div>";
let popup = createPopup({
id: "mh-improved-favorite-setups-component-picker",
title: "",
content,
className: "mh-improved-favorite-setups-component-picker"
});
popup.show(), document.querySelectorAll(".campPage-trap-itemBrowser-item-armButton.save-button").forEach((saveButton) => {
saveButton.addEventListener("click", (event) => __async(void 0, null, function* () {
event.preventDefault(), event.stopPropagation(), callback(
saveButton.getAttribute("data-item-id"),
saveButton.getAttribute("data-item-classification"),
saveButton.getAttribute("data-item-image"),
saveButton.getAttribute("data-the-power-type")
), popup.hide();
}));
});
let searchInput = document.querySelector("#mh-improved-favorite-setups-component-picker-popup-search-input");
if (!searchInput)
return;
searchInput.focus(), searchInput.addEventListener("keyup", () => {
let filter = searchInput.value.toLowerCase();
document.querySelectorAll(".campPage-trap-itemBrowser-item").forEach((item) => {
item.querySelector(".campPage-trap-itemBrowser-item-name").textContent.toLowerCase().includes(filter) ? item.classList.remove("hidden") : item.classList.add("hidden");
});
}), document.querySelector(".mh-improved-favorites-setups-component-picker-popup-use-current").addEventListener("click", () => {
let item = document.querySelector(`.campPage-trap-itemBrowser-item[data-item-id="${user[`${type2}_item_id`]}"]`);
if (!item)
return;
let saveButton = item.querySelector(".campPage-trap-itemBrowser-item-armButton.save-button");
saveButton && (callback(
saveButton.getAttribute("data-item-id"),
saveButton.getAttribute("data-item-classification"),
saveButton.getAttribute("data-item-image"),
saveButton.getAttribute("data-the-power-type")
), popup.hide());
});
}), armItem = (items6) => __async(void 0, null, function* () {
return new Promise((resolve, reject2) => {
items6.forEach(({ id, type: type2 }) => {
if (!id) {
type2 === "bait" ? hg.utils.TrapControl.disarmBait() : type2 === "trinket" && hg.utils.TrapControl.disarmTrinket();
return;
}
hg.utils.TrapControl.armItem(id, type2);
}), hg.utils.TrapControl.go(resolve, reject2);
});
}), makeBlueprintRow = (setup, isCurrent = !1) => __async(void 0, null, function* () {
if (!setup)
return !1;
let setupContainer = makeElement("div", ["row"]);
setupContainer.setAttribute("data-setup-id", setup.id);
let controls = makeElement("div", ["controls"]);
makeElement("div", ["label"], (setup == null ? void 0 : setup.name) || "", controls);
let hasHighlighted = !1, buttonWrapper = makeElement("div", ["button-wrapper"]);
if (isCurrent)
buttonWrapper.append(makeButton2({
text: "Save",
className: ["save", "lightBlue"],
/**
* Save the current setup as a favorite setup.
*/
callback: () => __async(void 0, null, function* () {
let currentSetup = getCurrentSetup(), setups = yield getFavoriteSetups();
if (setups.length) {
let existingSetup = removeMobileSetups(setups).find((s) => (s == null ? void 0 : s.bait_id) === currentSetup.bait_id && (s == null ? void 0 : s.base_id) === currentSetup.base_id && (s == null ? void 0 : s.weapon_id) === currentSetup.weapon_id && (s == null ? void 0 : s.trinket_id) === currentSetup.trinket_id && (s == null ? void 0 : s.location) === currentSetup.location);
if (existingSetup && !hasHighlighted) {
document.querySelectorAll(`.mh-improved-favorite-setups-blueprint-container .row[data-setup-id="${existingSetup.id}"]`).forEach((row) => {
row.classList.add("flash"), setTimeout(() => {
row.classList.remove("flash");
}, 1e3);
}), hasHighlighted = !0, setTimeout(() => {
hasHighlighted = !1;
}, 2e3);
return;
}
}
currentSetup.id = Math.random().toString(36).slice(2, 15) + Math.random().toString(36).slice(2, 15), currentSetup = yield saveFavoriteSetup(currentSetup, !1);
let setupRow = yield makeBlueprintRow(currentSetup), mobileRow = document.querySelector(".mh-improved-favorite-setups-blueprint-container .content .row.mobile-setup");
mobileRow ? mobileRow.before(setupRow) : document.querySelector(".mh-improved-favorite-setups-blueprint-container .content").append(setupRow), updateFavoriteSetupName();
})
}));
else {
let armButton = makeButton2({
text: "Arm",
className: ["arm"],
/**
* Arm the setup.
*/
callback: () => __async(void 0, null, function* () {
armButton.classList.add("loading");
let setupId = setupContainer.getAttribute("data-setup-id");
debuglog("favorite-setups", `Arming setup ${setupId}`);
let setups = yield getFavoriteSetups();
if (!setups.length || !setupId)
return;
let index = setups.findIndex((s) => (s == null ? void 0 : s.id) && s.id === setupId), thisSetup = setups[index];
if (!thisSetup)
return;
let toArm = [];
thisSetup.base_id && thisSetup.base_id != user.base_item_id && toArm.push({ id: thisSetup.base_id, type: "base" }), thisSetup.weapon_id && thisSetup.weapon_id != user.weapon_item_id && toArm.push({ id: thisSetup.weapon_id, type: "weapon" }), thisSetup.trinket_id && thisSetup.trinket_id != user.trinket_item_id && toArm.push({ id: thisSetup.trinket_id, type: "trinket" }), thisSetup.bait_id && thisSetup.bait_id != user.bait_item_id && toArm.push({ id: thisSetup.bait_id, type: "bait" }), toArm.length && (yield armItem(toArm));
let currentSetupRow = document.querySelector('.mh-improved-favorite-setups-blueprint-container .row[data-setup-id="current"]');
currentSetupRow && currentSetupRow.replaceWith(yield makeBlueprintRow(getCurrentSetup(), !0)), armButton.classList.remove("loading"), updateFavoriteSetupName();
})
});
buttonWrapper.append(armButton);
let editClickables = [];
buttonWrapper.append(makeButton2({
text: "Edit",
className: ["edit-setup"],
/**
* Edit the setup.
*/
callback: () => {
let setupId = setupContainer.getAttribute("data-setup-id");
debuglog("favorite-setups", `Editing setup ${setupId}`), setupContainer.classList.add("editing");
let title = setupContainer.querySelector(".label"), randomTitleButton = makeElement("a", "random-title");
randomTitleButton.setAttribute("title", "Generate a random name for this setup"), randomTitleButton.addEventListener("click", (e) => __async(void 0, null, function* () {
e.preventDefault(), e.target.classList.add("loading");
let setupNameData = yield getGeneratedName(setup);
setupNameData.name && (title.querySelector("input").value = setupNameData.name), e.target.classList.remove("loading");
}));
let titleInput = document.createElement("input");
titleInput.value = title.textContent, title.textContent = "", title.append(titleInput), title.prepend(randomTitleButton);
let powerTypeInput = makeElement("input", ["hidden", "power-type-input"]);
powerTypeInput.setAttribute("data-the-power-type", setup.power_type), title.append(powerTypeInput), setupContainer.querySelectorAll(".campPage-trap-itemBrowser-favorite-item").forEach((image) => {
image.classList.add("clickable");
let eventListenerClickable = image.addEventListener("click", () => __async(void 0, null, function* () {
image.classList.add("loading");
let itemType = image.getAttribute("data-item-type"), itemId = image.getAttribute("data-item-id"), imageDisplay = image.querySelector(".campPage-trap-itemBrowser-favorite-item-image");
yield makeImagePicker(setupId, itemType, itemId, (newItemId, newItemType, newItemImageUrl, newItemPowerType) => {
itemType === newItemType && itemId != newItemId && (image.setAttribute("data-new-item-id", newItemId), image.setAttribute("data-new-item-image", newItemImageUrl), image.setAttribute("data-old-image-url", imageDisplay.style.backgroundImage), newItemPowerType && newItemPowerType !== "undefined" && setupContainer.querySelector(".power-type-input").setAttribute("data-power-type", newItemPowerType), imageDisplay.style.backgroundImage = `url(${newItemImageUrl})`);
}), image.classList.remove("loading");
}));
editClickables.push({ image, event: eventListenerClickable });
});
let existing = setupContainer.querySelector(".move-buttons");
existing && existing.remove();
let moveUpButton = makeElement("a", ["move-up"]);
moveUpButton.addEventListener("click", (event) => __async(void 0, null, function* () {
let previous = event.target.closest(".row").previousElementSibling;
if (previous) {
let setups = yield getFavoriteSetups();
if (!setups.length)
return;
let index = setups.findIndex((s) => (s == null ? void 0 : s.id) && s.id === setupId), previousIndex = setups.findIndex((s) => (s == null ? void 0 : s.id) === previous.getAttribute("data-setup-id")), temp = setups[index];
setups[index] = setups[previousIndex], setups[previousIndex] = temp, saveSetting("favorite-setups.setups", setups), previous.before(setupContainer);
}
}));
let moveDownButton = makeElement("a", ["move-down"]);
moveDownButton.addEventListener("click", (event) => __async(void 0, null, function* () {
let next = event.target.closest(".row").nextElementSibling;
if (next) {
let setups = yield getFavoriteSetups();
if (!setups.length)
return;
let index = setups.findIndex((s) => (s == null ? void 0 : s.id) && s.id === setupId), nextIndex = setups.findIndex((s) => (s == null ? void 0 : s.id) && s.id === next.getAttribute("data-setup-id")), temp = setups[index];
setups[index] = setups[nextIndex], setups[nextIndex] = temp, saveSetting("favorite-setups.setups", setups), next.after(setupContainer);
}
}));
let moveButtons = makeElement("div", ["move-buttons"]);
moveButtons.append(moveUpButton), moveButtons.append(moveDownButton), !setupId.startsWith("mobile-") && controls.append(moveButtons);
}
}));
let stopEditing = () => {
editClickables.forEach(({ image, event }) => {
image.removeEventListener("click", event), image.classList.remove("clickable");
}), editClickables = [];
};
buttonWrapper.append(makeButton2({
text: "Save",
className: ["save-setup"],
/**
* Save the edited setup.
*/
callback: () => __async(void 0, null, function* () {
let setupId = setupContainer.getAttribute("data-setup-id");
debuglog("favorite-setups", `Saving setup ${setupId}`), setupContainer.classList.remove("editing");
let newSetup = setup, title = setupContainer.querySelector(".label"), titleInput = title.querySelector("input");
setup.name = titleInput.value;
let powerTypeInput = setupContainer.querySelector(".power-type-input");
if (powerTypeInput) {
let lastPowerType = setup.power_type, newPowerType = powerTypeInput.getAttribute("data-the-power-type");
if (newPowerType && lastPowerType !== newPowerType) {
setup.power_type = newPowerType;
let powerTypeImage = setupContainer.querySelector(".campPage-trap-itemBrowser-item-powerType");
if (powerTypeImage) {
let lastPowerTypeClass = lastPowerType ? getPowerTypeId(lastPowerType) : "hidden", newPowerTypeClass = newPowerType ? getPowerTypeId(newPowerType) : "hidden";
powerTypeImage.classList.remove(lastPowerTypeClass), powerTypeImage.classList.add(newPowerTypeClass), powerTypeImage.classList.remove("hidden");
}
}
}
setupContainer.querySelectorAll(".campPage-trap-itemBrowser-favorite-item").forEach((image) => {
let newItemId = image.getAttribute("data-new-item-id");
if (!newItemId)
return;
let itemType = image.getAttribute("data-item-type");
newSetup[`${itemType}_id`] = newItemId, image.removeAttribute("data-new-item-id"), image.removeAttribute("data-new-item-image"), image.removeAttribute("data-old-image-url");
}), title.textContent = newSetup.name, titleInput.remove();
let setups = yield getFavoriteSetups();
setups.length || (setups = []);
let index = setups.findIndex((s) => (s == null ? void 0 : s.id) && s.id === setupId);
if (setups[index] = newSetup, saveSetting("favorite-setups.setups", removeMobileSetups(setups)), setupId.startsWith("mobile-")) {
let mobileIndex = setups.filter((s) => {
var _a;
return (_a = s == null ? void 0 : s.is_mobile) != null ? _a : !1;
}).findIndex((s) => s.id === setupId);
yield setMobileFavourite(mobileIndex, newSetup);
}
updateFavoriteSetupName(), stopEditing();
})
})), buttonWrapper.append(makeButton2({
text: "Cancel",
className: ["cancel-setup"],
/**
* Cancel editing the setup.
*/
callback: () => {
setupContainer.classList.remove("editing");
let titleInput = setupContainer.querySelector(".label input"), title = setupContainer.querySelector(".label");
title.textContent = setup.name, titleInput.remove(), setupContainer.querySelectorAll(".campPage-trap-itemBrowser-favorite-item").forEach((image) => {
if (!image.getAttribute("data-new-item-id"))
return;
let imageDisplay = image.querySelector(".campPage-trap-itemBrowser-favorite-item-image");
imageDisplay.style.backgroundImage = image.getAttribute("data-old-image-url"), image.removeAttribute("data-new-item-id"), image.removeAttribute("data-new-item-image"), image.removeAttribute("data-old-image-url");
}), stopEditing();
}
})), buttonWrapper.append(makeButton2({
text: "Delete",
className: ["delete", "danger"],
/**
* Delete the setup.
*/
callback: () => __async(void 0, null, function* () {
let setupId = setupContainer.getAttribute("data-setup-id");
if (debuglog("favorite-setups", `Deleting setup ${setupId}`), !confirm("Are you sure you want to delete this setup?"))
return;
let setups = yield getFavoriteSetups();
if (setups.length || (setups = []), setupId.startsWith("mobile-")) {
let mobileIndex = setups.filter((s) => {
var _a;
return (_a = s == null ? void 0 : s.is_mobile) != null ? _a : !1;
}).findIndex((s) => s.id === setupId);
yield deleteMobileFavourite(mobileIndex);
let newContainer = yield makeBlueprintRow({
id: `mobile-${mobileIndex}`,
is_mobile: !0
});
setupContainer.replaceWith(newContainer);
} else {
let index = setups.findIndex((s) => (s == null ? void 0 : s.id) && s.id === setupId);
setups.splice(index, 1), saveSetting("favorite-setups.setups", removeMobileSetups(setups)), setupContainer.remove();
let locationFavorite = document.querySelector(`.location-favorite[data-setup-id="${setupId}"]`);
locationFavorite && locationFavorite.remove();
}
})
}));
}
controls.append(buttonWrapper), setupContainer.append(controls);
let powerTypeId = getPowerTypeId(setup == null ? void 0 : setup.power_type), powertype = makeElement("div", ["campPage-trap-itemBrowser-item-powerType", powerTypeId]);
return powerTypeId || powertype.classList.add("hidden"), setupContainer.append(powertype), yield addImage("bait", setup.bait_id, setupContainer), yield addImage("base", setup.base_id, setupContainer), yield addImage("weapon", setup.weapon_id, setupContainer), yield addImage("trinket", setup.trinket_id, setupContainer), setup != null && setup.is_mobile && setupContainer.classList.add("mobile-setup"), setupContainer;
}), makeBlueprintContainer = () => __async(void 0, null, function* () {
let existing = document.querySelector(".mh-improved-favorite-setups-blueprint-container");
existing && existing.remove();
let container = makeElement("div", "mh-improved-favorite-setups-blueprint-container"), header = makeElement("div", ["header"]);
makeElement("b", ["title"], "Favorite Setups", header), container.append(header);
let body = makeElement("div", ["content"]), currentSetupRow = yield makeBlueprintRow(getCurrentSetup(), !0);
body.append(currentSetupRow);
let setups = yield getFavoriteSetups();
if (setups.length) {
let locationFavorites = [];
for (let setup of setups)
!setup || !setup.id || setup.location && setup.location === getCurrentLocation2() && locationFavorites.push(setup);
if (locationFavorites.length) {
let locationWrapper = makeElement("div", ["location-favorites"]);
for (let setup of locationFavorites) {
if (!setup || !setup.id)
continue;
let setupContainer = yield makeBlueprintRow(setup);
setupContainer.classList.add("location-favorite"), locationWrapper.append(setupContainer);
}
body.append(locationWrapper);
}
for (let setup of setups) {
if (!setup || !setup.id)
continue;
let setupContainer = yield makeBlueprintRow(setup);
setup.id.startsWith("mobile-") && setupContainer.classList.add("mobile-setup"), body.append(setupContainer);
}
}
return container.append(body), container;
}), getNameOfCurrentSetup = () => __async(void 0, null, function* () {
let setups = yield getFavoriteSetups();
if (!setups.length)
return "";
let currentSetup = getCurrentSetup(), setup = setups.find((s) => (s == null ? void 0 : s.bait_id) === (currentSetup == null ? void 0 : currentSetup.bait_id) && (s == null ? void 0 : s.base_id) === (currentSetup == null ? void 0 : currentSetup.base_id) && (s == null ? void 0 : s.weapon_id) === (currentSetup == null ? void 0 : currentSetup.weapon_id) && (s == null ? void 0 : s.trinket_id) === (currentSetup == null ? void 0 : currentSetup.trinket_id));
return setup && setup.name ? setup.name : "";
}), updateFavoriteSetupName = () => __async(void 0, null, function* () {
let label = document.querySelector(".mh-improved-favorite-setups-button-label");
label && (label.innerHTML = (yield getNameOfCurrentSetup()) || "");
}), setMobileFavourite = (slot, setup) => __async(void 0, null, function* () {
var _a, _b, _c, _d, _e;
return yield postMobileTrapAction("set", {
slot,
weapon_id: (_a = setup.weapon_id) != null ? _a : "",
base_id: (_b = setup.base_id) != null ? _b : "",
trinket_id: (_c = setup.trinket_id) != null ? _c : "",
skin_id: "",
bait_id: (_d = setup.bait_id) != null ? _d : "",
name: (_e = setup.name.slice(0, 20)) != null ? _e : "",
is_current_favourite: !1
});
}), deleteMobileFavourite = (slot) => __async(void 0, null, function* () {
return yield postMobileTrapAction("delete", {
slot
});
}), postMobileTrapAction = (action, data) => __async(void 0, null, function* () {
return (yield doRequest("api/action/trapfavourite", __spreadProps(__spreadValues({}, data), {
action
}))).user;
}), addFavoriteSetupsButton = () => __async(void 0, null, function* () {
if (getCurrentPage() !== "camp" || document.querySelector(".mh-improved-favorite-setups-button"))
return;
let appendTo = document.querySelector(".trapSelectorView__trapStatSummaryContainer");
if (!appendTo)
return;
let button = makeElement("a", ["mh-improved-favorite-setups-button"]);
makeElement("div", ["mh-improved-favorite-setups-button-text"], "Favorite Setups", button);
let label = makeElement("div", ["mh-improved-favorite-setups-button-label"]);
label.innerHTML = yield getNameOfCurrentSetup(), button.append(label), button.addEventListener("click", toggleFavoriteSetups), appendTo.append(button);
}), toggleFavoriteSetups = () => __async(void 0, null, function* () {
let content = yield makeBlueprintContainer();
toggleBlueprint("favorite-setups", content);
}), addIcon2 = () => {
addIconToMenu({
id: "favorite-setups",
classname: "mousehunt-improved-favorite-setups-icon",
title: "Favorite Setups",
action: toggleFavoriteSetups,
position: "prepend"
});
}, init55 = () => __async(void 0, null, function* () {
addStyles(styles_default51, "favorite-setups"), onNavigation(addFavoriteSetupsButton, {
page: "camp"
});
let timeoutId;
onEvent("camp_page_arm_item", () => {
timeoutId && clearTimeout(timeoutId), timeoutId = setTimeout(updateFavoriteSetupName, 500);
}), getSetting("experiments.favorite-setups-toggle", !1) && addIcon2(), onEvent("mh-improved-toggle-favorite-setups", toggleFavoriteSetups);
}), favorite_setups_default3 = {
id: "favorite-setups",
name: "Favorite Setups",
type: "feature",
default: !0,
description: "Save your favorite setups and arm them with a single click.",
load: init55,
settings: settings_default22
};
}
});
var styles_default52, init_styles53 = __esm({
"src/modules/hide-footer/styles.css"() {
styles_default52 = `.pageFrameView-footer,.mousehuntFooter{display:none}.no-footer .pageFrameView-column.left,.no-footer .pageFrameView-column.right{margin-bottom:0}
`;
}
});
var init56, hide_footer_default, init_hide_footer = __esm({
"src/modules/hide-footer/index.js"() {
init_utils2();
init_styles53();
init56 = () => __async(void 0, null, function* () {
addStyles(styles_default52, "no-footer"), addBodyClass("no-footer"), onActivation("no-footer", () => {
addBodyClass("no-footer");
}), onActivation("no-footer", () => {
removeBodyClass("no-footer");
});
}), hide_footer_default = {
id: "no-footer",
name: "Hide Footer",
type: "element-hiding",
default: !1,
description: "Hide the footer.",
load: init56
};
}
});
var styles_default53, init_styles54 = __esm({
"src/modules/hover-profiles/styles.css"() {
styles_default53 = `.message .messageText,.journal .entry .journalbody{position:relative}#friend-data-wrapper{position:absolute;top:-125px;z-index:999999;box-sizing:border-box;display:block;width:325px;height:125px;background:linear-gradient(#decebb 5%,#f0eddf 50%);border:1px solid #9a8872;border-radius:10px;box-shadow:0 1px 5px -1px #5e5e5e}.treasureMapTooltipView #friend-data-wrapper{display:none}[data-friend-hover]:hover #friend-data-wrapper,[data-friend-hover]:focus #friend-data-wrapper,#friend-data-wrapper:hover,#friend-data-wrapper:focus{display:block}#friend-data-wrapper .friendsPage-friendRow{position:relative;box-sizing:border-box;height:100%;padding-top:3px;margin:0;border:none}#friend-data-wrapper .friendsPage-friendRow-imageContainer{position:relative;display:inline-block;width:65px;height:65px;margin-left:5px;vertical-align:top}#friend-data-wrapper .friendsPage-friendRow-content{box-sizing:border-box;width:245px}#friend-data-wrapper .friendsPage-friendRow-titleBar{position:relative;box-sizing:border-box;padding-left:20px;margin-right:-8px;margin-bottom:5px;margin-left:-15px;line-height:20px}#friend-data-wrapper .friendsPage-friendRow-titleBar-titleDetail{display:none}#friend-data-wrapper .friendsPage-friendRow-titleBar-icon{left:0;width:35px;height:35px}#friend-data-wrapper .friendsPage-friendRow-titleBar-name{display:block;margin-left:20px;overflow:hidden;font-size:14px;color:#000;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}#friend-data-wrapper .friendsPage-friendRow-environment-icon{width:27px;height:27px;margin-right:3px}#friend-data-wrapper .friendsPage-friendRow-environment-name{width:140px;font-size:11px;line-height:14px}#friend-data-wrapper .friendsPage-friendRow .friendsPage-friendRow-actions{position:absolute;top:35px;right:2px}#friend-data-wrapper .friendsPage-friendRow-actionsContainer{top:0}#friend-data-wrapper .friendsPage-friendRow-actions-interactionButtons{padding-right:0}#friend-data-wrapper .userInteractionButtonsView-button{width:38px;height:38px;background-size:38px}#friend-data-wrapper .userInteractionButtonsView-button.sendTicket,#friend-data-wrapper .userInteractionButtonsView-button.sendTournamentInvite{display:none}#friend-data-wrapper .mousehuntTooltip{opacity:0;animation:none}#friend-data-wrapper .friendsPage-friendRow-environment{box-sizing:border-box;display:flex;align-items:center;height:40px;margin-left:-10px}#friend-data-wrapper .friendsPage-friendRow-statsContainer{position:relative;box-sizing:border-box;display:grid;grid-template-columns:repeat(3,1fr);place-items:center center;align-content:stretch;width:100%;height:auto;padding:2px;margin:0}#friend-data-wrapper .friendsPage-friendRow-stat{display:flex!important;align-items:center;width:auto;margin:0;font-size:10px}#friend-data-wrapper .friendsPage-friendRow-stat-icon{width:15px;height:15px;margin-left:5px}#friend-data-wrapper .friendsPage-friendRow-stat.map .friendsPage-friendRow-stat-icon,#friend-data-wrapper .friendsPage-friendRow-stat.team .friendsPage-friendRow-stat-icon{margin-right:3px}#friend-data-wrapper .friendsPage-friendRow-stat-value{font-size:10px;font-weight:400}#friend-data-wrapper .friendsPage-friendRow-stat-label{display:none}#friend-data-wrapper .friendsPage-friendRow-stat.map{grid-column:span 2}#friend-data-wrapper .friendsPage-friendRow-stat.map .friendsPage-friendRow-stat-value span,#friend-data-wrapper .friendsPage-friendRow-stat.online span{width:auto;max-width:190px}#friend-data-wrapper .friendsPage-friendRow-stat.team .friendsPage-friendRow-stat-value a{width:auto;max-width:70px}#friend-data-wrapper .friendsPage-friendRow-stat:hover .friendsPage-friendRow-stat-fullValue{display:none}#friend-data-wrapper .friendsPage-friendRow-stat.hasHover:hover{text-decoration:underline;background:unset}.mh-dark-mode #friend-data-wrapper .friendsPage-friendRow{color:#87270e;background:linear-gradient(#decebb 5%,#f0eddf 50%)}.mh-dark-mode #friend-data-wrapper .friendsPage-friendRow-statsContainer{color:#87270e;box-shadow:0 10px 30px #cdb495 inset}.mh-dark-mode #friend-data-wrapper .friendsPage-friendRow-stat-value a{color:#87270e}.friend-data-wrapper-loading{display:flex;align-items:flex-end;justify-content:center;height:90%;background-image:url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif);background-repeat:no-repeat;background-position:center;background-size:55px}.friendsPage-friendRow.loading .friendsPage-friendRow-titleBar-icon:after{top:2px;left:2px;width:30px;height:30px;background:#eee;border:2px solid #7b7b7b}.friendsPage-friendRow.loading .friendsPage-friendRow-image,.friendsPage-friendRow.loading .friendsPage-friendRow-environment-icon{background:#eee;box-shadow:none}.friendsPage-friendRow.loading .friendsPage-friendRow-image{inset:7px}#friend-data-wrapper .friendsPage-friendRow-image{inset:5px}
`;
}
});
var cleanId, getFriendId, friendDataWrapper, makeFriendMarkup, onFriendLinkHover, addFriendLinkEventListener, onTabChangeCallback, onTabChange, onInboxOpen, main10, debugPopup, init57, hover_profiles_default, init_hover_profiles = __esm({
"src/modules/hover-profiles/index.js"() {
init_utils2();
init_styles54();
cleanId = (id) => id.replaceAll("#", ""), getFriendId = (target) => __async(void 0, null, function* () {
var _a;
if (target.getAttribute("data-snuid"))
return cleanId(target.getAttribute("data-snuid"));
if (target.href) {
let href = target.href, hrefMatch = target.href.match(/(.+?)&/);
hrefMatch && hrefMatch.length && (href = hrefMatch[1]);
let urlMatch = href.replace("https://www.mousehuntgame.com/hunterprofile.php?snuid=", "").replace("https://www.mousehuntgame.com/profile.php?snuid=", "");
if (urlMatch && urlMatch !== href)
return cleanId(urlMatch);
let pMatch = href.replace("https://www.mousehuntgame.com/p.php?id=", "");
if (pMatch && pMatch !== href) {
let snuid = yield doRequest("managers/ajax/pages/friends.php", {
action: "community_search_by_id",
user_id: pMatch
});
if ((_a = snuid == null ? void 0 : snuid.friend) != null && _a.sn_user_id)
return cleanId(snuid.friend.sn_user_id);
}
}
if (target.onclick) {
let giftMatch = target.onclick.toString().match(/show\('(.+)'\)/);
if (giftMatch && giftMatch.length)
return cleanId(giftMatch[1]);
}
return !1;
}), makeFriendMarkup = (friendId, data = null, skipCache = !1, e) => {
var _a, _b;
skipCache || (sessionSet(`mh-improved-cache-friend-${friendId}`, data), sessionSet(`mh-improved-cache-friend-${friendId}-timestamp`, Date.now())), friendDataWrapper == null || friendDataWrapper.remove();
let content;
if (data && data.length) {
let templateType = (_b = (_a = data[0].user_interactions) == null ? void 0 : _a.relationship) != null && _b.is_stranger ? "PageFriends_request_row" : "PageFriends_view_friend_row";
content = hg.utils.TemplateUtil.render(templateType, data[0]);
} else
content = hg.utils.TemplateUtil.render("PageFriends_view_friend_row", hg.pages.FriendsPage().getPlaceholderData());
let existing = document.querySelectorAll("#friend-data-wrapper");
existing && existing.length && existing.forEach((el) => {
el.remove();
}), friendDataWrapper = makeElement("div", "friend-data-wrapper"), friendDataWrapper.id = "friend-data-wrapper", friendDataWrapper.innerHTML = content || '<span class="friend-data-wrapper-loading">Loading\u2026</span>', document.body.append(friendDataWrapper);
let rect = e.target.getBoundingClientRect(), top = rect.top + window.scrollY, left = rect.left + window.scrollX, tooltipTop = top - friendDataWrapper.offsetHeight - 10;
tooltipTop < 0 && (tooltipTop = top + rect.height + 10), friendDataWrapper.style.top = `${tooltipTop}px`, friendDataWrapper.style.left = `${left - friendDataWrapper.offsetWidth / 2 + rect.width / 2}px`;
let timeoutId;
friendDataWrapper.addEventListener("mouseleave", () => {
timeoutId = setTimeout(() => {
debugPopup || friendDataWrapper.remove();
}, 350);
}), e.target.addEventListener("mouseleave", () => {
timeoutId = setTimeout(() => {
debugPopup || friendDataWrapper.remove();
}, 1e3);
}), friendDataWrapper.addEventListener("mouseenter", () => {
clearTimeout(timeoutId);
}), doEvent2("profile_hover");
}, onFriendLinkHover = (e) => __async(void 0, null, function* () {
let friendId = yield getFriendId(e.target);
if (!friendId || friendId == user.sn_user_id)
return;
e.target.setAttribute("data-snuid", friendId);
let parent = e.target.parentElement;
if (!parent)
return;
parent.setAttribute("data-friend-hover", !0);
let existing = document.querySelectorAll("#friend-data-wrapper");
existing && existing.length && existing.forEach((el) => {
el.remove();
});
let cached = sessionGet(`mh-improved-cache-friend-${friendId}`), cachedTimestamp = sessionGet(`mh-improved-cache-friend-${friendId}-timestamp`);
cached && cachedTimestamp && Date.now() - cachedTimestamp < 15e4 ? makeFriendMarkup(friendId, cached, !0, e) : (makeFriendMarkup(null, null, !0, e), app.pages.FriendsPage.getFriendDataBySnuids([friendId], (data) => {
!data || !data.length || makeFriendMarkup(friendId, data, !1, e);
}));
}), addFriendLinkEventListener = (selector) => {
let friendLinks = document.querySelectorAll(selector);
!friendLinks || !friendLinks.length || friendLinks.forEach((friendLink) => {
if (friendLink.classList.contains("friendsPage-friendRow-image") || friendLink.getAttribute("data-friend-hover"))
return;
friendLink.setAttribute("data-friend-hover", !0);
let timer;
friendLink.addEventListener("mouseover", (e) => {
clearTimeout(timer), timer = setTimeout(() => onFriendLinkHover(e), 200);
}), friendLink.addEventListener("mouseout", () => {
clearTimeout(timer);
});
});
}, onTabChangeCallback = (callback, attempts = 0) => {
let tabs = document.querySelectorAll(".notificationHeader .tabs a");
if (!tabs || tabs.length === 0) {
if (attempts > 2)
return;
setTimeout(() => {
onTabChangeCallback(callback, attempts + 1);
}, 250);
return;
}
tabs.forEach((tab) => {
tab.addEventListener("click", () => {
callback();
});
});
}, onTabChange = (callback) => {
onEvent("ajax_response", () => {
onTabChangeCallback(callback);
});
}, onInboxOpen = (callback) => {
let inboxBtn = document.querySelector("#hgbar_messages");
inboxBtn && inboxBtn.addEventListener("click", () => {
onTabChange(callback);
});
}, main10 = () => {
[
'a[href*="https://www.mousehuntgame.com/hunterprofile.php"]',
'a[href*="https://www.mousehuntgame.com/profile.php"]',
".entry.socialGift .journaltext a",
'.notificationMessageList .messageText a[href*="https://www.mousehuntgame.com/p"]',
'tr.teamPage-memberRow-identity a[href*="https://www.mousehuntgame.com/profile.php"]',
'.treasureMapView-scoreboard-table a[href*="https://www.mousehuntgame.com/profile.php"]'
].forEach((selector) => {
addFriendLinkEventListener(selector);
});
}, debugPopup = !1, init57 = () => __async(void 0, null, function* () {
addStyles(styles_default53, "hover-profiles"), debugPopup = getSetting("debug.hover-popups", !1), setTimeout(main10, 500), onRequest("*", () => {
setTimeout(main10, 1e3);
}), onInboxOpen(main10);
}), hover_profiles_default = {
id: "hover-profiles",
name: "Hover Profiles",
type: "feature",
default: !0,
description: "Hover over a friend\u2019s name in your journal, inbox, or elsewhere to get a mini-profile popup.",
load: init57
};
}
});
var styles_default54, init_styles55 = __esm({
"src/modules/quick-filters-and-sort/styles.css"() {
styles_default54 = `.campPage-trap-itemBrowser-filter input[data-filter=search]{width:315px;padding:10px}.campPage-trap-itemBrowser-filter:first-child{flex:0 0 100%;margin-bottom:5px}.campPage-trap-itemBrowser-filterContainer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-evenly}.campPage-trap-itemBrowser-favorites{margin-top:10px}.campPage-trap-itemBrowser .campPage-trap-itemBrowser-filter select{width:100px}.campPage-trap-itemBrowser.weapon .campPage-trap-itemBrowser-filter select{width:75px}.campPage-trap-itemBrowser-quickLinks{z-index:1;display:flex;justify-content:space-evenly;padding:5px 10px;background-color:#f6f3eb}.mh-dark-mode .pageFrameView .campPage-trap-itemBrowser-favorites,.mh-dark-mode .campPage-trap-itemBrowser-quickLinks{background-color:#424242}.campPage-trap-itemBrowser-quickLinks-power{padding:10px 15px}.campPage-trap-itemBrowser-quickLinks-header{position:absolute;left:0;padding:5px;margin-top:10px;color:#96704b;text-align:center;transform:rotate(-90deg)}.campPage-trap-itemBrowser-quickLinks-header.filter-header{left:-2px;margin-top:5px}.campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item-image{width:40px;height:40px;background-position:center}.campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item-image-frame{width:40px;height:40px}.campPage-trap-itemBrowser-quickLinks-power .campPage-trap-itemBrowser-favorite-item-image{width:31px;height:30px;background-position:50%;background-size:25px}.campPage-trap-itemBrowser-quickLinks-power .campPage-trap-itemBrowser-favorite-item-image-frame{width:31px;height:30px}.campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item-image:hover,.campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item-image:focus{background-color:#cac0b2}.campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item-image:hover .campPage-trap-itemBrowser-favorite-item-image-frame,.campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item-image:focus .campPage-trap-itemBrowser-favorite-item-image-frame{box-shadow:none}.campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item{width:auto}.campPage-trap-itemBrowser-quickLinks-power .campPage-trap-itemBrowser-favorite-item{margin:0 2px}.campPage-trap-itemBrowser-quickLinks-power .campPage-trap-itemBrowser-favorite-item:first-child{margin-left:0}.campPage-trap-itemBrowser-quickLinks-power .campPage-trap-itemBrowser-favorite-item:last-child{margin-right:0}.quicklinks-filter-sortBy-name .campPage-trap-itemBrowser-favorite-item-image{background-position:center;background-size:30px}.weapon .campPage-trap-itemBrowser-items{top:250px}.campPage-trap-itemBrowser-items{top:200px}.campPage-wrapper[data-blueprint-type=weapon] .campPage-trap-itemBrowser-itemDescriptionHover.mousehuntTooltip.tight.left.noEvents,.campPage-wrapper[data-blueprint-type=base] .campPage-trap-itemBrowser-itemDescriptionHover.mousehuntTooltip.tight.left.noEvents{margin-top:170px}.campPage-trap-itemBrowser-itemDescriptionHover.mousehuntTooltip.tight.left.noEvents{margin-top:125px}.mh-dark-mode .quicklinks-filter-sortBy-name a,.mh-dark-mode .quicklinks-filter-sortBy-quantity a{background-color:#f2f2f2}.trapSelectorView__browserStateParent--items[data-blueprint-type=skin] .campPage-trap-itemBrowser-quickLinks{display:none}.campPage-trap-itemBrowser-favorite-item.quicklinks-filter.quicklinks-filter-sortBy-name a{background-position:5px 4px}
`;
}
});
var addItemToQuickLinks, addQuickLinksToTrap, init58, quick_filters_and_sort_default, init_quick_filters_and_sort = __esm({
"src/modules/quick-filters-and-sort/index.js"() {
init_utils2();
init_styles55();
addItemToQuickLinks = (link, appendTo, filter) => {
let existing = document.querySelector(`.campPage-trap-itemBrowser-favorite-item.quicklinks-filter.quicklinks-filter-${filter}-${link.id}`);
existing && existing.remove();
let item = document.createElement("div");
item.classList.add("campPage-trap-itemBrowser-favorite-item", "quicklinks-filter", `quicklinks-filter-${filter}-${link.id}`);
let itemAnchor = document.createElement("a");
itemAnchor.classList.add("campPage-trap-itemBrowser-favorite-item-image"), itemAnchor.setAttribute("href", "#"), itemAnchor.setAttribute("title", filter === "sortBy" ? `Sort by ${link.name}` : `Filter by ${link.name}`), itemAnchor.style.backgroundImage = `url(${link.image})`;
let frame = document.createElement("div");
frame.classList.add("campPage-trap-itemBrowser-favorite-item-image-frame"), itemAnchor.append(frame);
let hiddenInput = document.createElement("input");
hiddenInput.setAttribute("type", "hidden"), hiddenInput.setAttribute("data-filter", filter), hiddenInput.setAttribute("value", link.id), item.append(itemAnchor), item.append(hiddenInput);
let filterInput = document.querySelector(".campPage-trap-itemBrowser-filter.powerType select"), sortInput = document.querySelector(".campPage-trap-itemBrowser-filter.sortBy select");
item.addEventListener("click", (e) => {
e.preventDefault();
let input = filter === "sortBy" ? sortInput : filterInput, reset = !1;
item.getAttribute("data-selected") === "true" ? (reset = !0, item.setAttribute("data-selected", !1)) : (document.querySelectorAll('.quicklinks-filter[data-selected="true"]').forEach((i) => {
i.setAttribute("data-selected", !1);
}), item.setAttribute("data-selected", !0));
let option;
reset ? filter === "sortBy" ? option = input.querySelector('option[value="default"]') : filter === "powerType" && (option = input.querySelector('option[value="no_tag_selected"]')) : option = input.querySelector(`option[value="${link.id}"]`), option && (option.selected = !0, input.dispatchEvent(new Event("change")));
}), appendTo.append(item);
}, addQuickLinksToTrap = () => __async(void 0, null, function* () {
let itemBrowser = document.querySelector(".trapSelectorView__itemBrowserContainer");
if (!itemBrowser)
return;
let type2 = itemBrowser.classList.value.replaceAll("trapSelectorView__itemBrowserContainer", "").replaceAll("trapSelectorView__outerBlock", "").replaceAll("campPage-trap-itemBrowser", "").replaceAll(" ", "").trim();
if (!type2 || type2 === "bai")
return;
itemBrowser.parentNode.parentNode.setAttribute("data-blueprint-type", type2);
let favorites = document.querySelector(".campPage-trap-itemBrowser-favorites");
if (!favorites)
return;
let existing = document.querySelector(".campPage-trap-itemBrowser-quickLinks");
existing && existing.remove();
let existingPower = document.querySelector(".campPage-trap-itemBrowser-quickLinks-power");
existingPower && existingPower.remove();
let quickLinks = document.createElement("div");
quickLinks.classList.add("campPage-trap-itemBrowser-quickLinks"), makeElement("div", "campPage-trap-itemBrowser-quickLinks-header", "Sort", quickLinks);
let links = [
{
id: "power",
name: "Power",
image: "https://www.mousehuntgame.com/images/ui/camp/trap/stat_power.png"
},
{
id: "power_bonus",
name: "Power Bonus",
image: "https://www.mousehuntgame.com/images/ui/camp/trap/stat_power_bonus.png"
},
{
id: "luck",
name: "Luck",
image: "https://www.mousehuntgame.com/images/ui/camp/trap/stat_luck.png"
},
{
id: "attraction_bonus",
name: "Attraction Bonus",
image: "https://www.mousehuntgame.com/images/ui/camp/trap/stat_attraction_bonus.png"
},
{
id: "name",
name: "Name",
image: "https://i.mouse.rip/sort-a-z-icon.png"
}
];
type2 === "trinket" && links.push({ id: "quantity", name: "Quantity", image: "https://i.mouse.rip/sort-qty-icon.png" });
let sortByInput = document.querySelector(".campPage-trap-itemBrowser-filter.sortBy select");
if (links.forEach((link) => {
addItemToQuickLinks(link, quickLinks, "sortBy", sortByInput);
}), favorites.parentNode.insertBefore(quickLinks, favorites.nextSibling), type2 === "weapon") {
let powerQuickLinks = document.createElement("div");
powerQuickLinks.classList.add("campPage-trap-itemBrowser-quickLinks", "campPage-trap-itemBrowser-quickLinks-power"), makeElement("div", ["campPage-trap-itemBrowser-quickLinks-header", "filter-header"], "Filter", powerQuickLinks);
let powerLinks = [
{
id: "arcane",
name: "Arcane",
image: "https://www.mousehuntgame.com/images/powertypes/arcane.png"
},
{
id: "draconic",
name: "Draconic",
image: "https://www.mousehuntgame.com/images/powertypes/draconic.png"
},
{
id: "forgotten",
name: "Forgotten",
image: "https://www.mousehuntgame.com/images/powertypes/forgotten.png"
},
{
id: "hydro",
name: "Hydro",
image: "https://www.mousehuntgame.com/images/powertypes/hydro.png"
},
{
id: "law",
name: "Law",
image: "https://www.mousehuntgame.com/images/powertypes/law.png"
},
{
id: "physical",
name: "Physical",
image: "https://www.mousehuntgame.com/images/powertypes/physical.png"
},
{
id: "rift",
name: "Rift",
image: "https://www.mousehuntgame.com/images/powertypes/rift.png"
},
{
id: "shadow",
name: "Shadow",
image: "https://www.mousehuntgame.com/images/powertypes/shadow.png"
},
{
id: "tactical",
name: "Tactical",
image: "https://www.mousehuntgame.com/images/powertypes/tactical.png"
}
], powerInput = document.querySelector(".campPage-trap-itemBrowser-filter.powerType select");
powerLinks.forEach((link) => {
addItemToQuickLinks(link, powerQuickLinks, "powerType", powerInput);
}), quickLinks.parentNode.insertBefore(powerQuickLinks, quickLinks.nextSibling);
} else {
let powerQuickLinks = document.querySelector(".campPage-trap-itemBrowser-quickLinks-power");
powerQuickLinks && powerQuickLinks.remove();
}
}), init58 = () => __async(void 0, null, function* () {
addStyles(styles_default54, "quick-filters-and-sort"), onRequest("users/gettrapcomponents.php", addQuickLinksToTrap), onEvent("camp_page_toggle_blueprint", addQuickLinksToTrap);
}), quick_filters_and_sort_default = {
id: "quick-filters-and-sort",
name: "Quick Filters and Sort",
type: "feature",
default: !0,
description: "Add quick filters and sorting to the trap, base, charm, and cheese selectors.",
load: init58
};
}
});
var inventory_open_all_but_one_default, init_inventory_open_all_but_one = __esm({
"src/modules/inventory-open-all-but-one/index.js"() {
init_utils2();
inventory_open_all_but_one_default = {
id: "open-all-but-one",
name: "Inventory - Open All but One",
type: "feature",
default: !0,
description: "Add an \u201COpen All But One\u201D button to convertible items in your inventory.",
load: initOpenButtons
};
}
});
var styles_default55, init_styles56 = __esm({
"src/modules/location-dashboard/styles.css"() {
styles_default55 = `.mousehuntHeaderView-gameTabs .menuItem.chat,.mousehuntHeaderView-gameTabs .community{display:none}.mousehuntHeaderView .dashboard .dropdownContent{width:420px;border-radius:0}.dashboardWrapper{max-height:60vh;padding:5px;overflow:hidden auto;border:1px solid #d7e2f1;box-shadow:0 5px 10px #8f8f8f}.dashboardRefresh{display:block;margin:10px auto}.regionWrapper{margin-bottom:5px;border:1px solid #c6c6c6}.regionName{padding:3px 0 2px 5px;margin-top:10px;font-size:12px;font-weight:900;background-color:#f4f7fc;border-bottom:1px solid #c6c6c6}.regionName:first-child{margin-top:0}.locationWrapper{display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:26px;padding:9px 5px;background-color:#fff}.locationWrapper.locationWrapper-rift_valour{height:35px}.locationWrapper:nth-child(2n){background-color:#eee}.locationImageWrapper{display:inline-flex;flex:0}img.locationImage{width:28px;height:28px;border-radius:3px;outline:1px solid #838282}.locationName{position:relative;flex-grow:1;min-width:105px;padding-left:10px;font-size:12px}.locationProgress p{margin:0;line-height:1;text-align:right}.locationProgress{font-size:11px;line-height:17px;text-align:right;white-space:pre-line}.locationProgress .stats{text-align:right}.noLocationData{font-size:12px;text-align:center}.dashboard-fi-tiles span{display:inline-block;width:18px;height:24px;color:transparent;background-image:url(https://www.mousehuntgame.com/images/ui/hud/floating_islands/mods.png);background-position-x:354px;background-size:354px}.dashboard-fi-tiles .glass,.dashboard-fi-tiles .gem_bonus{background-position-x:0}.dashboard-fi-tiles .ore,.dashboard-fi-tiles .ore_bonus{background-position-x:6.6%}.dashboard-fi-tiles .curd,.dashboard-fi-tiles .sky_cheese{background-position-x:13.3%}.dashboard-fi-tiles .pirate,.dashboard-fi-tiles .sky_pirates{background-position-x:20%}.dashboard-fi-tiles .key,.dashboard-fi-tiles .loot_cache{background-position-x:26.6%}.dashboard-fi-tiles .warden-wind,.dashboard-fi-tiles .wind_shrine{background-position-x:33.3%}.dashboard-fi-tiles .warden-rain,.dashboard-fi-tiles .rain_shrine{background-position-x:40%}.dashboard-fi-tiles .warden-frost,.dashboard-fi-tiles .frost_shrine{background-position-x:46.6%}.dashboard-fi-tiles .warden-fog,.dashboard-fi-tiles .fog_shrine{background-position-x:53.3%}.dashboard-fi-tiles .sprocket,.dashboard-fi-tiles .paragon_cache_a{background-position-x:60%}.dashboard-fi-tiles .bangle,.dashboard-fi-tiles .paragon_cache_d{background-position-x:66.6%}.dashboard-fi-tiles .wing,.dashboard-fi-tiles .paragon_cache_c{background-position-x:73.3%}.dashboard-fi-tiles .silk,.dashboard-fi-tiles .paragon_cache_b{background-position-x:80%}.dashboard-fi-tiles .glore,.dashboard-fi-tiles .ore_gem_bonus{background-position-x:86.6%}.dashboard-fi-tiles .seal,.dashboard-fi-tiles .cloudstone_bonus{background-position-x:93.3%}.dashboard-fi-tiles .jade,.dashboard-fi-tiles .charm_bonus{background-position-x:100%}.location-refresh-item{display:flex;align-items:stretch;border:1px solid #ccc;border-radius:5px;box-shadow:0 1px 1px -1px #7e7e7e}.mh-improved-location-refresh-popup-progress{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.location-refresh-item.done{background-color:#3fcd84;border-color:#adadad}.location-refresh-item .locationName{position:relative;display:flex;align-items:center;overflow:hidden}.location-refresh-item .locationName .name{z-index:1}.location-refresh-item.traveling .locationName .progress:after{position:absolute;top:0;right:100%;bottom:0;width:100%;content:"";background:#f3c019;animation:mh-improved-right-to-left 1s linear forwards}@media (prefers-reduced-motion: reduce){.location-refresh-item.traveling .locationName .progress:after{animation:none}}.mh-improved-location-refresh-confirm-popup #overlayPopup .jsDialogContainer .suffix{display:none}.mh-improved-location-refresh-confirm-popup-buttons{display:flex;align-items:center;justify-content:space-around;margin-top:30px}.dashboard-fi-tiles{vertical-align:middle}.dashboard-fi-wrap{display:flex;flex-direction:row;gap:5px;justify-content:flex-end;margin-bottom:-5px}.dashboard-bb-wrap .tile{display:inline-block;width:20px;height:20px;color:transparent;background-image:url(https://www.mousehuntgame.com/images/ui/hud/bountiful_beanstalk/chevrons.png);background-size:100%}.dashboard-bb-wrap .tile.standard{background-position-y:0%}.dashboard-bb-wrap .tile.super{background-position-y:34%}.dashboard-bb-wrap .tile.extreme{background-position-y:67%}.dashboard-bb-wrap .tile.ultimate{background-position-y:100%}.dashboard-bb-wrap.room-name{display:flex;gap:5px;align-items:center;justify-content:flex-end}.dashboard-bb-wrap.embellishments .tile{display:inline-block;width:20px;height:20px;color:transparent}.dashboard-bb-wrap.embellishments .tile.golden_key{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/d855937c33e0fc0db25fbdf1aea70aa2.png)}.dashboard-bb-wrap.embellishments .tile.golden_feather{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/654d4e0c8308c3ab0ee99d32503bf82a.png)}.dashboard-bb-wrap.embellishments .tile.ruby_remover{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/6753553ca41cb4754fba0ebf7600378b.png)}.locationImageWrapper:hover,.locationName:hover{text-decoration:underline;cursor:pointer}
`;
}
});
var getFieryWarpathText, setFieryWarpathData, init_desert_warpath = __esm({
"src/modules/location-dashboard/locations/desert-warpath.js"() {
init_utils2();
getFieryWarpathText = (quests) => {
var _a, _b, _c, _d;
if (!quests.QuestFieryWarpath)
return "";
let quest = {
wave: ((_a = quests == null ? void 0 : quests.QuestFieryWarpath) == null ? void 0 : _a.wave) || 0,
streak: ((_b = quests == null ? void 0 : quests.QuestFieryWarpath) == null ? void 0 : _b.streak) || 0,
remaining: ((_c = quests == null ? void 0 : quests.QuestFieryWarpath) == null ? void 0 : _c.remaining) || 0,
percent: ((_d = quests == null ? void 0 : quests.QuestFieryWarpath) == null ? void 0 : _d.percent) || 100
}, streakText = "";
return quest.streak !== 0 && (streakText = ` \xB7 ${quest.streak} streak`), quest.wave === "portal" ? `Portal: ${Math.max(0, quest.remaining - 1)} guards remaining ` : `Wave ${quest.wave}: ${100 - quest.percent}% remaining${streakText} `;
}, setFieryWarpathData = () => {
if (getCurrentLocation2() !== "desert_warpath")
return !1;
let wave = getFieryWarpathWave();
return {
wave,
streak: getFieryWarpathStreak(),
remaining: getFieryWarpathRemainingInWave(wave),
percent: getFieryWarpathPercent()
};
};
}
});
var getSeasonalGardenText, setSeasonalGardenData, init_seasonal_garden = __esm({
"src/modules/location-dashboard/locations/seasonal-garden.js"() {
getSeasonalGardenText = (quests) => {
var _a, _b;
if (!quests.QuestSeasonalGarden)
return "";
let amp = ((_a = quests.QuestSeasonalGarden) == null ? void 0 : _a.amp) || 0, max = ((_b = quests.QuestSeasonalGarden) == null ? void 0 : _b.max) || 0;
return amp === 0 && max === 0 ? "Amp: 0%" : `Amp: ${amp}% / ${max}%`;
}, setSeasonalGardenData = () => {
let quest = {
amp: 0,
max: 0
}, amp = document.querySelector(".seasonalGardenHUD-currentAmplifier-value");
amp && (quest.amp = Number.parseInt(amp.textContent, 10));
let max = document.querySelector(".seasonalGardenHUD-maxAmplifier-value");
return max && (quest.max = Number.parseInt(max.textContent, 10)), quest;
};
}
});
var getChessProgress, getZugzwangTowerText, setZugzwangTowerData, init_zugzwang_tower = __esm({
"src/modules/location-dashboard/locations/zugzwang-tower.js"() {
getChessProgress = (pieces) => pieces <= 8 ? "Pawns" : pieces <= 10 ? "Knights" : pieces <= 12 ? "Bishops" : pieces <= 14 ? "Rooks" : pieces <= 15 ? "Queen" : "King", getZugzwangTowerText = (quests) => {
if (!quests.QuestZugzwangTower)
return "";
let returnText = `${quests.QuestZugzwangTower.amp || 0}%`, techProgress = quests.QuestZugzwangTower.tech_progress || 0, mythProgress = quests.QuestZugzwangTower.myth_progress || 0;
return techProgress >= 16 && mythProgress >= 16 ? `${returnText} Amp, Chessmaster` : `${returnText} Amp, Technic: ${getChessProgress(techProgress)}, Mystic: ${getChessProgress(mythProgress)}`;
}, setZugzwangTowerData = () => {
let ampEl = document.querySelector(".zuzwangsTowerHUD-currentAmplifier span"), amp = ampEl ? Number.parseInt(ampEl.innerText, 10) : 0, techProgressEl = document.querySelectorAll(".zuzwangsTowerHUD-progress.tech img"), techProgress = techProgressEl ? techProgressEl.length : 0, mythProgressEl = document.querySelectorAll(".zuzwangsTowerHUD-progress.magic img"), mythProgress = mythProgressEl ? mythProgressEl.length : 0;
return {
amp,
techProgress,
mythProgress
};
};
}
});
var bountiful_beanstalk_default2, init_bountiful_beanstalk2 = __esm({
"src/modules/location-dashboard/locations/bountiful-beanstalk.js"() {
bountiful_beanstalk_default2 = (quests) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
if (!quests.QuestBountifulBeanstalk)
return "";
if (!((_a = quests == null ? void 0 : quests.QuestBountifulBeanstalk) != null && _a.in_castle)) {
let room = ((_d = (_c = (_b = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _b.beanstalk) == null ? void 0 : _c.current_zone) == null ? void 0 : _d.name) || "", huntsRemaining2 = ((_f = (_e = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _e.beanstalk) == null ? void 0 : _f.hunts_remaining_text) || "", isBoss2 = ((_h = (_g = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _g.beanstalk) == null ? void 0 : _h.is_boss_encounter) || !1;
return `${room} (Beanstalk) <div class="stats">${isBoss2 ? "At Boss \xB7 " : ""}${huntsRemaining2}</div>`;
}
let huntsRemaining = ((_j = (_i = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _i.castle) == null ? void 0 : _j.hunts_remaining_text) || "", isBoss = ((_l = (_k = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _k.castle) == null ? void 0 : _l.is_boss_encounter) || !1, isChase = ((_n = (_m = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _m.castle) == null ? void 0 : _n.is_boss_chase) || !1, noise = ((_p = (_o = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _o.castle) == null ? void 0 : _p.noise_level) || 0, maxNoise = ((_r = (_q = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _q.castle) == null ? void 0 : _r.max_noise_level) || 0, roomQuality = (_u = (_t = (_s = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _s.castle) == null ? void 0 : _t.current_room) == null ? void 0 : _u.type.replace("_room", "").split("_").pop().trim(), roomName = (_x = (_w = (_v = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _v.castle) == null ? void 0 : _w.current_room) == null ? void 0 : _x.name.replace(" Room", "").replace(`${roomQuality.charAt(0).toUpperCase() + roomQuality.slice(1).toLowerCase()} `, "").trim(), noiseString = isBoss ? "Boss" : isChase ? "Chase" : `\u266A ${noise.toLocaleString()}/${maxNoise.toLocaleString()}`, embellishmentsText = (_y = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _y.embellishments.filter((item) => item.is_active).map((item) => `<span class="tile ${item.type}"></span>`), returnText = '<div class="dashboard-bb">';
return returnText += `<div class="dashboard-bb-wrap room-name"><span class="tile ${roomQuality}"></span><div class="name">${roomName}</div>`, returnText += `<div class="dashboard-bb-wrap embellishments">${embellishmentsText.join("")}</div>`, returnText += "</div>", returnText += `<div class="stats">${noiseString} \xB7 ${huntsRemaining}</div>`, returnText;
};
}
});
var rift_bristle_woods_default, init_rift_bristle_woods = __esm({
"src/modules/location-dashboard/locations/rift-bristle-woods.js"() {
rift_bristle_woods_default = (quests) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
if (!quests.QuestRiftBristleWoods)
return "";
let quest = {
progress_goal: ((_a = quests.QuestRiftBristleWoods) == null ? void 0 : _a.progress_goal) || null,
progress_remaining: ((_b = quests.QuestRiftBristleWoods) == null ? void 0 : _b.progress_remaining) || null,
chamber_name: ((_c = quests.QuestRiftBristleWoods) == null ? void 0 : _c.chamber_name) || null,
chamber_type: ((_d = quests.QuestRiftBristleWoods) == null ? void 0 : _d.chamber_type) || null,
obelisk_percent: ((_e = quests.QuestRiftBristleWoods) == null ? void 0 : _e.obelisk_percent) || null,
aco_sand: ((_f = quests.QuestRiftBristleWoods) == null ? void 0 : _f.acolyte_sand) || 0,
time_sand: ((_i = (_h = (_g = quests.QuestRiftBristleWoods) == null ? void 0 : _g.items) == null ? void 0 : _h.rift_hourglass_sand_stat_item) == null ? void 0 : _i.quantity) || 0
};
return quest.chamber_type === "acolyte_chamber" ? `Acolyte chamber: ${quest.obelisk_percent}% charged<div class="stats">${quest.aco_sand} Acolyte sand \xB7 ${quest.time_sand} time sand</div>` : `${quest.chamber_name} \xB7 ${quest.progress_goal - quest.progress_remaining} / ${quest.progress_goal} loot`;
};
}
});
var rift_burroughs_default, init_rift_burroughs = __esm({
"src/modules/location-dashboard/locations/rift-burroughs.js"() {
rift_burroughs_default = (quests) => {
var _a;
return quests.QuestRiftBurroughs ? `Mist: ${((_a = quests.QuestRiftBurroughs) == null ? void 0 : _a.mist_released) || 0} / 20` : "";
};
}
});
var floating_islands_default3, init_floating_islands3 = __esm({
"src/modules/location-dashboard/locations/floating-islands.js"() {
floating_islands_default3 = (quests) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
if (!quests.QuestFloatingIslands || !quests.QuestFloatingIslands.hunting_site_atts)
return "";
let powerTypes = {
arcn: "Arcane",
frgttn: "Forgotten",
hdr: "Hydro",
shdw: "Shadow",
drcnc: "Draconic",
law: "Law",
phscl: "Physical",
tctcl: "Tactical",
launch_pad_island: "Launch Pad"
}, quest = {
activated_island_mod_types: ((_b = (_a = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _a.hunting_site_atts) == null ? void 0 : _b.activated_island_mod_types) || null,
island_mod_panels: ((_d = (_c = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _c.hunting_site_atts) == null ? void 0 : _d.island_mod_panels) || null,
island_power_type: ((_f = (_e = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _e.hunting_site_atts) == null ? void 0 : _f.island_power_type) || null,
isHai: ((_h = (_g = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _g.hunting_site_atts) == null ? void 0 : _h.is_high_tier_island) || !1,
isSp: ((_j = (_i = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _i.hunting_site_atts) == null ? void 0 : _j.is_vault_island) || !1,
isLai: !1,
hunts_remaining: ((_l = (_k = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _k.hunting_site_atts) == null ? void 0 : _l.hunts_remaining) || null,
wardens_caught: ((_n = (_m = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _m.hunting_site_atts) == null ? void 0 : _n.sky_wardens_caught) || 0
};
if (quest.isLai = !quest.isHai && !quest.isSp, quest.island_power_type === "launch_pad_island")
return `Launch Pad \xB7 <p>${quest.wardens_caught} wardens caught`;
let type2 = "LAI";
quest.isHai ? type2 = "HAI" : quest.isSp && (type2 = "SP");
let tileText = "";
quest.island_mod_panels.forEach((panel) => {
let panelType = panel.type.toLowerCase().replaceAll("loot_cache", "key").replaceAll("charm_bonus", "J"), complete = panel.is_complete ? "complete" : "incomplete";
tileText += `<span class="tile ${panelType} ${complete}">${panelType}</span>`;
});
let powerType = powerTypes[quest.island_power_type], returnText = '<div class="dashboard-fi-wrap">';
if (returnText += `<div class='dashboard-fi-tiles'>${tileText}</div>`, returnText += `<div class='dashboard-fi-type'>${powerType} ${type2}</div>`, returnText += "</div>", quest.isLai)
returnText += `<div class="stats">${quest.hunts_remaining} hunts remaining \xB7 ${quest.wardens_caught} wardens caught</div>`;
else
return returnText += ` \xB7 ${quest.hunts_remaining} hunts remaining`;
return returnText;
};
}
});
var foreword_farm_default, init_foreword_farm = __esm({
"src/modules/location-dashboard/locations/foreword-farm.js"() {
foreword_farm_default = (quests) => {
if (!quests.QuestForewordFarm)
return "";
let plants = {
empty: 0,
ordinary_farm_plant: 0,
legendary_farm_plant: 0,
twisted_legendary_magic_farm_plant: 0
};
if (quests.QuestForewordFarm.plots.forEach((plot) => {
let name = plot.is_growing ? plot.plant.type : "empty";
plants[name] += 1;
}), plants.empty === 3)
return "No plants growing";
let returnText = "";
return plants.ordinary_farm_plant > 0 && (returnText += `${plants.ordinary_farm_plant} Mulch, `), plants.legendary_farm_plant > 0 && (returnText += `${plants.legendary_farm_plant} Papyrus, `), plants.twisted_legendary_magic_farm_plant > 0 && (returnText += `${plants.twisted_legendary_magic_farm_plant} Twisted Papyrus, `), returnText = returnText.slice(0, -2), `Growing ${returnText}`;
};
}
});
var fort_rox_default, init_fort_rox = __esm({
"src/modules/location-dashboard/locations/fort-rox.js"() {
fort_rox_default = (quests) => {
if (!quests.QuestFortRox)
return "";
let quest = {
stage: quests.QuestFortRox.current_stage || "stage_none",
hp: quests.QuestFortRox.hp || 0,
max_hp: quests.QuestFortRox.max_hp || 0,
is_dawn: quests.QuestFortRox.is_dawn || !1
}, phase = "Day", phases = {
stage_none: "Day",
stage_one: "Twilight",
stage_two: "Midnight",
stage_three: "Pitch",
stage_four: "Utter Darkness",
stage_five: "First Light"
};
return quests.is_lair ? "In Lair" : (phase = quest.is_dawn ? "Dawn" : phases[quest.stage], `${phase}: ${quest.hp}/${quest.max_hp} HP`);
};
}
});
var rift_furoma_default, init_rift_furoma = __esm({
"src/modules/location-dashboard/locations/rift-furoma.js"() {
rift_furoma_default = (quests) => {
if (!quests.QuestRiftFuroma)
return "";
let q = quests.QuestRiftFuroma, map = {
one: 1,
two: 2,
three: 3,
four: 4,
five: 5,
six: 6,
seven: 7,
eight: 8,
nine: 9,
ten: 10
};
if ((q.view_state.includes("pagoda") ? "inside" : "outside") === "inside") {
let droidLevel = map[q.droid.charge_level.split("_")[2]], batteryPercent = Math.floor(q.batteries[q.droid.charge_level].percent);
return `Pagoda \xB7 Battery ${droidLevel} (${batteryPercent}%)<div class="stats">${q.droid.remaining_energy} Enerchi</div>`;
}
return `Outside \xB7 Battery ${Object.keys(q.batteries).filter((battery) => q.batteries[battery].status.includes("unlocked")).reduce((highest, battery) => {
let batteryLevel = map[battery.split("_")[2]];
return batteryLevel > highest ? batteryLevel : highest;
}, 0)}<div class="stats">${q.items.combat_energy_stat_item.quantity} Enerchi</div>`;
};
}
});
var iceberg_default2, init_iceberg2 = __esm({
"src/modules/location-dashboard/locations/iceberg.js"() {
iceberg_default2 = (quests) => {
if (!quests.QuestIceberg)
return "";
let quest = quests.QuestIceberg;
return `${quest.current_phase || "Iceberg"}: ${quest.user_progress || 0} ft.<div class="stats">Hunt #${quest.turns_taken || 0}</div>`;
};
}
});
var labyrinth_default3, init_labyrinth3 = __esm({
"src/modules/location-dashboard/locations/labyrinth.js"() {
labyrinth_default3 = (quests) => {
var _a, _b, _c;
if (!quests.QuestLabyrinth)
return "";
let quest = {
clues: ((_a = quests == null ? void 0 : quests.QuestLabyrinth) == null ? void 0 : _a.clues) || 0,
hallway_name: ((_b = quests == null ? void 0 : quests.QuestLabyrinth) == null ? void 0 : _b.hallway_name) || "",
status: ((_c = quests == null ? void 0 : quests.QuestLabyrinth) == null ? void 0 : _c.status) || null
}, clueText = "";
if (quest.clues) {
let clueTexts = [];
quest.clues.forEach((clue) => {
let clueName = clue.name.replace("Farming", "Farm").replace("Dead End", "DEC");
clueTexts.push(`${clue.quantity} ${clueName}`);
}), clueTexts.length > 0 && (clueText = `: ${clueTexts.join(", ")} clues`);
}
let hallwayName = quest.hallway_name.replace(" Hallway", "");
return `${quest.status === "intersection" ? "Intersection" : hallwayName}${clueText}`;
};
}
});
var desert_oasis_default, init_desert_oasis = __esm({
"src/modules/location-dashboard/locations/desert-oasis.js"() {
desert_oasis_default = (quests) => {
var _a, _b;
if (!quests.QuestLivingGarden)
return "";
let quest = quests.QuestLivingGarden, twistedText = quest.is_normal ? "Not twisted" : "Twisted";
return ((_a = quest == null ? void 0 : quest.minigame) == null ? void 0 : _a.vials_state) === "dumped" && ((_b = quest == null ? void 0 : quest.minigame) != null && _b.timer) ? `${twistedText} \xB7 Pouring${quest != null && quest.minigame.timer ? ` for ${quest == null ? void 0 : quest.minigame.timer} hunts` : ""}` : `${twistedText}`;
};
}
});
var lost_city_default, init_lost_city = __esm({
"src/modules/location-dashboard/locations/lost-city.js"() {
lost_city_default = (quests) => {
var _a, _b;
if (!quests.QuestLostCity)
return "";
let quest = quests.QuestLostCity, twistedText = quest.is_normal ? "Not twisted" : "Twisted";
if (!((_a = quest == null ? void 0 : quest.minigame) != null && _a.is_cursed))
return `${twistedText} \xB7 Not cursed`;
let cursesText = ((_b = quest == null ? void 0 : quest.minigame) == null ? void 0 : _b.curses).map((curse) => curse.name).join(", ").replaceAll("!", "").replace(/,([^,]*)$/, "$1");
return `${twistedText} \xB7 Cursed with ${cursesText}`;
};
}
});
var mousoleum_default2, init_mousoleum2 = __esm({
"src/modules/location-dashboard/locations/mousoleum.js"() {
mousoleum_default2 = (quests) => {
if (!quests.QuestMousoleum)
return "";
let quest = quests.QuestMousoleum;
return quest != null && quest.has_wall ? `Wall \xB7 ${(quest == null ? void 0 : quest.wall_health) || 0}/${(quest == null ? void 0 : quest.max_wall_health) || 0} HP` : `No Wall \xB7 ${(quest == null ? void 0 : quest.wall_materials) || 0} planks`;
};
}
});
var moussu_picchu_default, init_moussu_picchu = __esm({
"src/modules/location-dashboard/locations/moussu-picchu.js"() {
init_utils2();
moussu_picchu_default = (quests) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
if (!(quests.QuestMoussuPicchu && quests.QuestMoussuPicchu.elements))
return "";
let quest = {
rainPercent: ((_c = (_b = (_a = quests == null ? void 0 : quests.QuestMoussuPicchu) == null ? void 0 : _a.elements) == null ? void 0 : _b.rain) == null ? void 0 : _c.percent) || 0,
rainLevel: ((_f = (_e = (_d = quests == null ? void 0 : quests.QuestMoussuPicchu) == null ? void 0 : _d.elements) == null ? void 0 : _e.rain) == null ? void 0 : _f.level) || null,
stormPercent: ((_i = (_h = (_g = quests == null ? void 0 : quests.QuestMoussuPicchu) == null ? void 0 : _g.elements) == null ? void 0 : _h.storm) == null ? void 0 : _i.percent) || 0,
stormLevel: ((_l = (_k = (_j = quests == null ? void 0 : quests.QuestMoussuPicchu) == null ? void 0 : _j.elements) == null ? void 0 : _k.storm) == null ? void 0 : _l.level) || null,
windPercent: ((_o = (_n = (_m = quests == null ? void 0 : quests.QuestMoussuPicchu) == null ? void 0 : _m.elements) == null ? void 0 : _n.wind) == null ? void 0 : _o.percent) || 0,
windLevel: ((_r = (_q = (_p = quests == null ? void 0 : quests.QuestMoussuPicchu) == null ? void 0 : _p.elements) == null ? void 0 : _q.wind) == null ? void 0 : _r.level) || null
};
return quest.rainPercent === 100 && quest.windPercent === 100 ? "Max Storm \xB7 Wind (100%) \xB7 Rain (100%)" : `${uppercaseFirstLetter(quest.windLevel)} Wind (${quest.windPercent}%) \xB7 ${uppercaseFirstLetter(quest.rainLevel)} \xB7 Rain (${quest.rainPercent}%)`;
};
}
});
var queso_geyser_default, init_queso_geyser = __esm({
"src/modules/location-dashboard/locations/queso-geyser.js"() {
queso_geyser_default = (quests) => {
if (!quests.QuestQuesoGeyser)
return "";
let quest = quests.QuestQuesoGeyser;
return `${(quest == null ? void 0 : quest.state_name) || "Cork Gathering"}: ${(quest == null ? void 0 : quest.hunts_remaining) || 0} hunts remaining`;
};
}
});
var sand_dunes_default, init_sand_dunes = __esm({
"src/modules/location-dashboard/locations/sand-dunes.js"() {
sand_dunes_default = (quests) => {
var _a, _b;
if (!quests.QuestSandDunes)
return "";
let quest = quests.QuestSandDunes, twistedText = quest.is_normal ? "Not twisted" : "Twisted";
return quest != null && quest.is_normal ? `${twistedText} \xB7 ${(_a = quest == null ? void 0 : quest.minigame) != null && _a.has_stampede ? "Stampeding" : "Not stampeding"}` : `${twistedText} \xB7 ${((_b = quest == null ? void 0 : quest.minigame) == null ? void 0 : _b.salt_charms_used) || 0} salt`;
};
}
});
var school_of_sorcery_default, init_school_of_sorcery = __esm({
"src/modules/location-dashboard/locations/school-of-sorcery.js"() {
school_of_sorcery_default = (quests) => {
var _a;
if (!(quests != null && quests.QuestSchoolOfSorcery))
return "";
let currentCourse = (_a = quests == null ? void 0 : quests.QuestSchoolOfSorcery) == null ? void 0 : _a.current_course;
if (!currentCourse && !(currentCourse != null && currentCourse.in_course))
return "Not enrolled";
let courseName = currentCourse == null ? void 0 : currentCourse.course_name, courseType = currentCourse == null ? void 0 : currentCourse.course_type, powerType = (currentCourse == null ? void 0 : currentCourse.power_type) === "arcane" ? "Arcane" : "Shadow", isBoss = currentCourse == null ? void 0 : currentCourse.is_boss_encounter, examText = "";
return courseType === "exam_course" && (examText = `${powerType}, ${currentCourse == null ? void 0 : currentCourse.power_type_hunts_remaining} hunts until ${powerType === "Arcane" ? "Shadow" : "Arcane"}`), `${courseName} \xB7 ${(currentCourse == null ? void 0 : currentCourse.hunts_remaining) || 0} hunts remaining<div class="stats">${examText}${isBoss ? " At Boss" : ""}</div>`;
};
}
});
var sunken_city_default, init_sunken_city = __esm({
"src/modules/location-dashboard/locations/sunken-city.js"() {
sunken_city_default = (quests) => {
var _a;
if (!quests.QuestSunkenCity)
return "";
let quest = quests.QuestSunkenCity, oxygen = ((_a = quest == null ? void 0 : quest.items) == null ? void 0 : _a.oxygen_stat_item) || 0;
if (!(quest != null && quest.is_diving))
return `Docked (${quest != null && quest.can_dive ? "can dive" : "cannot dive"}), ${oxygen} O\u2082`;
let zone = (quest == null ? void 0 : quest.zone_name) || "", depth = (quest == null ? void 0 : quest.distance) || 0;
return `${zone}, ${depth}m, ${oxygen} O\u2082`;
};
}
});
var table_of_contents_default, init_table_of_contents = __esm({
"src/modules/location-dashboard/locations/table-of-contents.js"() {
table_of_contents_default = (quests) => {
if (!quests.QuestTableOfContents)
return "";
let q = quests.QuestTableOfContents;
return q != null && q.is_writing ? `Writing: ${(q == null ? void 0 : q.current_book.name) || ""} (${(q == null ? void 0 : q.current_book.percent) || 0}%) <div class="stats">${(q == null ? void 0 : q.current_book.word_count_formatted) || 0} words \xB7 ${(q == null ? void 0 : q.current_book.hunts_remaining) || 0} hunts remaining</div>` : "Not writing";
};
}
});
var pollution_outbreak_default, init_pollution_outbreak = __esm({
"src/modules/location-dashboard/locations/pollution-outbreak.js"() {
pollution_outbreak_default = (quests) => {
var _a, _b, _c, _d, _e, _f, _g;
if (!quests.QuestPollutionOutbreak)
return "";
let crude = ((_c = (_b = (_a = quests.QuestPollutionOutbreak) == null ? void 0 : _a.items) == null ? void 0 : _b.crude_pollutinum_stat_item) == null ? void 0 : _c.quantity) || 0, refined = ((_f = (_e = (_d = quests.QuestPollutionOutbreak) == null ? void 0 : _d.items) == null ? void 0 : _e.refined_pollutinum_stat_item) == null ? void 0 : _f.quantity) || 0, max = ((_g = quests.QuestPollutionOutbreak) == null ? void 0 : _g.max_pollutinum) || 0;
return `${crude.toLocaleString()}/${max} Pollutinum<div class="stats">${refined.toLocaleString()} Refined Pollutinum</div>`;
};
}
});
var rift_valour_default, init_rift_valour = __esm({
"src/modules/location-dashboard/locations/rift-valour.js"() {
rift_valour_default = (quests) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
if (!quests.QuestRiftValour)
return "";
let quest = {
floor: ((_a = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _a.floor) || 0,
floor_name: ((_b = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _b.floor_name) || "Outside",
floor_steps: ((_c = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _c.floor_steps) || 0,
hunts_remaining: ((_d = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _d.hunts_remaining) || 0,
current_step_formatted: ((_e = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _e.current_step_formatted) || "0",
speed: ((_h = (_g = (_f = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _f.power_up_data) == null ? void 0 : _g.long_stride) == null ? void 0 : _h.current_level) + 1 || 1,
sync: ((_k = (_j = (_i = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _i.power_up_data) == null ? void 0 : _j.hunt_limit) == null ? void 0 : _k.current_level) + 1 || 1,
siphon: ((_n = (_m = (_l = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _l.power_up_data) == null ? void 0 : _m.boss_extension) == null ? void 0 : _n.current_level) + 1 || 1,
uu: ((_o = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _o.is_eclipse_mode) || !1
}, text = "";
return text = quest.floor === 0 ? "Outside" : `Floor ${quest.floor} (${quest.floor_name}) \xB7 ${quest.hunts_remaining} hunts remaining`, `<div>${quest.uu ? "Ultimate Umbra" : ""}</div> ${text} <div class="stats">Speed ${quest.speed} \xB7 Sync ${quest.sync} \xB7 Siphon ${quest.siphon}</div>`;
};
}
});
var whisker_woods_rift_default, init_whisker_woods_rift = __esm({
"src/modules/location-dashboard/locations/whisker-woods-rift.js"() {
whisker_woods_rift_default = (quests) => {
var _a, _b, _c;
if (!(quests.QuestRiftWhiskerWoods && quests.QuestRiftWhiskerWoods.zones))
return "";
let zones = quests.QuestRiftWhiskerWoods.zones || {};
return `Rage: ${((_a = zones == null ? void 0 : zones.clearing) == null ? void 0 : _a.level) || 0} / ${((_b = zones == null ? void 0 : zones.lagoon) == null ? void 0 : _b.level) || 0} / ${((_c = zones == null ? void 0 : zones.tree) == null ? void 0 : _c.level) || 0}`;
};
}
});
var ancient_city_default, init_ancient_city = __esm({
"src/modules/location-dashboard/locations/ancient-city.js"() {
ancient_city_default = (quests) => {
var _a, _b;
if (!quests.QuestAncientCity)
return "";
let quest = {
district_name: ((_a = quests == null ? void 0 : quests.QuestAncientCity) == null ? void 0 : _a.district_name) || null,
remaining: ((_b = quests == null ? void 0 : quests.QuestAncientCity) == null ? void 0 : _b.remaining) || null
};
return !quest.district_name || !quest.remaining ? "" : `${quest.district_name.replace("The ", "")}, ${quest.remaining} stealth`;
};
}
});
var cacheLocationData, waitForTravel, disarmBait, doLocationRefresh, makeDashboardTab, makeRegionMarkup, makeLocationMarkup, getDashboardContents, environments4, init59, location_dashboard_default, init_location_dashboard = __esm({
"src/modules/location-dashboard/index.js"() {
init_utils2();
init_styles56();
init_desert_warpath();
init_seasonal_garden();
init_zugzwang_tower();
init_bountiful_beanstalk2();
init_rift_bristle_woods();
init_rift_burroughs();
init_floating_islands3();
init_foreword_farm();
init_fort_rox();
init_rift_furoma();
init_iceberg2();
init_labyrinth3();
init_desert_oasis();
init_lost_city();
init_mousoleum2();
init_moussu_picchu();
init_queso_geyser();
init_sand_dunes();
init_school_of_sorcery();
init_sunken_city();
init_table_of_contents();
init_pollution_outbreak();
init_rift_valour();
init_whisker_woods_rift();
init_ancient_city();
cacheLocationData = () => __async(void 0, null, function* () {
if (!user.environment_type || !user.quests)
return;
if (user.environment_type === "desert_warpath") {
let fwQuestData = setFieryWarpathData();
fwQuestData && (user.quests.QuestFieryWarpath = fwQuestData);
} else if (user.environment_type === "zugzwang_tower") {
let ztQuestData = setZugzwangTowerData();
ztQuestData && (user.quests.QuestZugzwangTower = ztQuestData);
} else if (user.environment_type === "seasonal_garden") {
let sgQuestData = setSeasonalGardenData();
sgQuestData && (user.quests.QuestSeasonalGarden = sgQuestData);
}
let questsCached = yield dataGet("quests", {}), questsCombined = Object.assign({}, questsCached, user.quests);
user.environment_type === "labyrinth" ? questsCombined.QuestAncientCity = {} : user.environment_type === "ancient_city" ? questsCombined.QuestLabyrinth = {} : user.environment_type === "zugzwang_tower" ? questsCombined.QuestSeasonalGarden = {} : user.environment_type === "seasonal_garden" && (questsCombined.QuestZugzwangTower = {});
try {
dataSet("quests", questsCombined);
} catch (error) {
debug("Error saving dashboard data.", error);
}
}), waitForTravel = (environment) => __async(void 0, null, function* () {
return new Promise((resolve) => {
hg.utils.User.travel(
environment,
(success) => {
debug(`Travel success: ${success}`), resolve();
},
(error) => {
debug(`Travel error: ${error}`), resolve();
}
), debug(`Traveled to ${environment}.`);
});
}), disarmBait = () => __async(void 0, null, function* () {
return new Promise((resolve) => {
hg.utils.TrapControl.disarmBait().go(() => {
resolve();
}, () => {
reject();
});
});
}), doLocationRefresh = () => __async(void 0, null, function* () {
sessionSet("doing-location-refresh", !0);
let locationProgress = [], environmentsToUse = /* @__PURE__ */ new Set([
"ancient_city",
"bountiful_beanstalk",
"desert_warpath",
"floating_islands",
"foreword_farm",
"fort_rox",
"iceberg",
"labyrinth",
"desert_oasis",
"lost_city",
"mousoleum",
"moussu_picchu",
"pollution_outbreak",
"queso_geyser",
"rift_bristle_woods",
"rift_burroughs",
"rift_furoma",
"rift_valour",
"rift_whisker_woods",
"sand_dunes",
"school_of_sorcery",
"seasonal_garden",
"sunken_city",
"table_of_contents",
"zugzwang_tower"
]), environmentsToTravel = environments4.filter((env) => environmentsToUse.has(env.id) && isUserTitleAtLeast(env.title));
debug(`Environments to travel: ${environmentsToTravel.map((env) => env.name).join(", ")}`), environmentsToTravel.sort((a, b) => a.order - b.order), debug(`Sorted environments to travel: ${environmentsToTravel.map((env) => env.name).join(", ")}`);
let locationProgressMarkup = "";
environmentsToTravel.forEach((env) => {
locationProgressMarkup += `<div class="location-refresh-item" data-environment-type="${env.id}">
<div class="locationImageWrapper">
<img class="locationImage" src="${env.image}">
</div>
<div class="locationName">
<div class="name">${env.name}</div>
<div class="progress"></div>
</div>
</div>`, locationProgress.push(env.id), debug(`Adding ${env.name} to the to-travel list.`);
});
let popup = createPopup({
title: "Refreshing Location Data",
content: `<div class="mh-improved-location-refresh-popup">
<div class="mh-improved-location-refresh-popup-progress">${locationProgressMarkup}</div>
</div>`,
hasCloseButton: !1,
show: !0
}), originalLocation = user.environment_type;
debug(`Original location: ${user.environment_type}.`);
let equippedBait = user.bait_item_id || "disarmed";
debug(`Equipped bait: ${equippedBait}.`), yield disarmBait();
for (let location of locationProgress) {
if (originalLocation === location)
continue;
let locationData = environments4.find((env) => env.id === location);
if (!locationData)
continue;
debug(`Traveling to ${locationData.name}.`);
let progressItem = document.querySelector(`.location-refresh-item[data-environment-type="${location}"]`);
progressItem && (progressItem.classList.add("traveling"), yield waitForTravel(location), yield cacheLocationData(), progressItem.classList.remove("traveling"), progressItem.classList.add("done"), debug(`Traveled to ${locationData.name}.`));
}
yield waitForTravel(originalLocation), debug(`Traveled back to ${user.environment_type}.`), hg.utils.TrapControl.setBait(equippedBait).go(), debug(`Re-equipped bait: ${equippedBait}.`), popup.hide();
let dashboardMenu = document.querySelector(".mousehuntHeaderView .menuItem.dropdown.dashboard");
if (dashboardMenu) {
dashboardMenu.classList.add("expanded");
let existing = document.querySelector(".dashboardContents");
if (existing) {
let refreshedContents = yield getDashboardContents();
existing.replaceWith(refreshedContents);
}
let wrapper = document.querySelector(".dashboardWrapper");
wrapper && (wrapper.scrollTop = 0);
}
sessionSet("doing-location-refresh", !1), doEvent2("travel_complete");
}), makeDashboardTab = () => {
let tabsContainer = document.querySelector(".mousehuntHeaderView-dropdownContainer");
if (!tabsContainer)
return;
let menuTab = document.createElement("div");
menuTab.classList.add("menuItem"), menuTab.classList.add("dropdown"), menuTab.classList.add("dashboard"), menuTab.addEventListener("click", () => __async(void 0, null, function* () {
menuTab.classList.toggle("expanded");
let existing = document.querySelector(".dashboardContents");
if (existing) {
let refreshedContents = yield getDashboardContents();
existing.replaceWith(refreshedContents);
}
sessionSet("doing-location-refresh", !1);
})), makeElement("span", "", "Dashboard", menuTab), makeElement("div", "arrow", "", menuTab);
let dropdownContent = makeElement("div", "dropdownContent"), dashboardWrapper = makeElement("div", "dashboardWrapper");
makeElement("div", "dashboardContents", "", dashboardWrapper);
let refreshWrapper = makeElement("div", "refreshWrapper"), refreshButton = makeElement("button", ["mousehuntActionButton", "dashboardRefresh"]);
makeElement("span", "", "Refresh", refreshButton), refreshButton.addEventListener("click", () => {
let confirmPopup = createPopup({
title: "Refresh Location Data",
content: `<div class="mh-improved-location-refresh-confirm-popup">
<div class="mh-improved-location-refresh-confirm-popup-content">
<p>This will refresh the location data for all locations by traveling to each location and caching the data.</p>
<div class="mh-improved-location-refresh-confirm-popup-buttons">
<div class="mousehuntActionButton mh-improved-location-refresh-confirm-popup-button mh-improved-location-refresh-confirm-popup-button-cancel"><span>Cancel</span></div>
<div class="mousehuntActionButton mh-improved-location-refresh-confirm-popup-button mh-improved-location-refresh-confirm-popup-button-confirm"><span>Start Traveling</span></div>
</div>
</div>
</div>`,
className: "mh-improved-location-refresh-confirm-popup",
hasCloseButton: !1,
show: !0
}), cancelButton = document.querySelector(".mh-improved-location-refresh-confirm-popup-button-cancel");
cancelButton && cancelButton.addEventListener("click", () => {
confirmPopup.hide();
});
let confirmButton = document.querySelector(".mh-improved-location-refresh-confirm-popup-button-confirm");
confirmButton && confirmButton.addEventListener("click", () => {
confirmPopup.hide(), doLocationRefresh();
}), doLocationRefresh();
}), refreshWrapper.append(refreshButton), dashboardWrapper.append(refreshWrapper), dropdownContent.append(dashboardWrapper), menuTab.append(dropdownContent), tabsContainer.insertBefore(menuTab, tabsContainer.lastChild);
}, makeRegionMarkup = (name, childContent, appendTo) => {
if (!childContent.firstChild)
return;
let regionWrapper = makeElement("div", "regionWrapper");
makeElement("div", "regionName", name, regionWrapper), regionWrapper.append(childContent), appendTo.append(regionWrapper);
}, makeLocationMarkup = (id, name, progress, appendTo, quests) => {
let markup = progress(quests);
if (!markup)
return;
let locationWrapper = makeElement("div", "locationWrapper");
locationWrapper.setAttribute("data-location", id), locationWrapper.classList.add(`locationWrapper-${id}`);
let locationImageWrapper = makeElement("div", "locationImageWrapper"), environment = environments4.find((env) => env.id === id);
if (environment.image) {
let locationImage = makeElement("img", "locationImage");
locationImage.setAttribute("src", environment.image), locationImageWrapper.append(locationImage);
}
locationImageWrapper.addEventListener("click", () => __async(void 0, null, function* () {
travelTo(environment.id);
})), locationWrapper.append(locationImageWrapper);
let nameEl = makeElement("div", "locationName", name);
nameEl.addEventListener("click", () => __async(void 0, null, function* () {
travelTo(environment.id);
})), locationWrapper.append(nameEl), makeElement("div", "locationProgress", markup, locationWrapper), appendTo.append(locationWrapper);
}, getDashboardContents = () => __async(void 0, null, function* () {
let quests = yield dataGet("quests", {});
debuglog("location-dashboard", "quests", quests);
let contentsWrapper = document.createElement("div");
contentsWrapper.classList.add("dashboardContents");
let burroughs = document.createElement("div");
makeLocationMarkup("mousoleum", "Mousoleum", mousoleum_default2, burroughs, quests), makeLocationMarkup("pollution_outbreak", "Toxic Spill", pollution_outbreak_default, burroughs, quests), makeRegionMarkup("Burroughs", burroughs, contentsWrapper);
let varmintValley = document.createElement("div");
makeLocationMarkup("fort_rox", "Fort Rox", fort_rox_default, varmintValley, quests), makeRegionMarkup("Varmint Valley", varmintValley, contentsWrapper);
let sandtailDesert = document.createElement("div");
makeLocationMarkup("desert_warpath", "Fiery Warpath", getFieryWarpathText, sandtailDesert, quests), makeLocationMarkup("desert_oasis", "Living Garden", desert_oasis_default, sandtailDesert, quests), makeLocationMarkup("lost_city", "Lost City", lost_city_default, sandtailDesert, quests), makeLocationMarkup("sand_dunes", "Sand Dunes", sand_dunes_default, sandtailDesert, quests), makeRegionMarkup("Sandtail Desert", sandtailDesert, contentsWrapper);
let rodentia = document.createElement("div");
makeLocationMarkup("seasonal_garden", "Seasonal Garden", getSeasonalGardenText, rodentia, quests), makeLocationMarkup("zugzwang_tower", "Zugzwang's Tower", getZugzwangTowerText, rodentia, quests), makeLocationMarkup("iceberg", "Iceberg", iceberg_default2, rodentia, quests), makeLocationMarkup("sunken_city", "Sunken City", sunken_city_default, rodentia, quests), makeRegionMarkup("Rodentia", rodentia, contentsWrapper);
let quesoCanyon = document.createElement("div");
makeLocationMarkup("queso_geyser", "Queso Geyser", queso_geyser_default, quesoCanyon, quests), makeRegionMarkup("Queso Canyon", quesoCanyon, contentsWrapper);
let hollowHeights = document.createElement("div");
makeLocationMarkup("labyrinth", "Labyrinth", labyrinth_default3, hollowHeights, quests), makeLocationMarkup("ancient_city", "Zokor", ancient_city_default, hollowHeights, quests), makeLocationMarkup("moussu_picchu", "Moussu Picchu", moussu_picchu_default, hollowHeights, quests), makeLocationMarkup("floating_islands", "Floating Islands", floating_islands_default3, hollowHeights, quests), makeRegionMarkup("Hollow Heights", hollowHeights, contentsWrapper);
let folkloreForest = document.createElement("div");
makeLocationMarkup("bountiful_beanstalk", "Bountiful Beanstalk", bountiful_beanstalk_default2, folkloreForest, quests), makeLocationMarkup("foreword_farm", "Foreword Farm", foreword_farm_default, folkloreForest, quests), makeLocationMarkup("table_of_contents", "Table of Contents", table_of_contents_default, folkloreForest, quests), makeLocationMarkup("school_of_sorcery", "School of Sorcery", school_of_sorcery_default, folkloreForest, quests), makeRegionMarkup("Folklore Forest", folkloreForest, contentsWrapper);
let rift = document.createElement("div");
if (makeLocationMarkup("rift_burroughs", "Burroughs Rift", rift_burroughs_default, rift, quests), makeLocationMarkup("rift_whisker_woods", "Whisker Woods Rift", whisker_woods_rift_default, rift, quests), makeLocationMarkup("rift_furoma", "Furoma Rift", rift_furoma_default, rift, quests), makeLocationMarkup("rift_bristle_woods", "Bristle Woods Rift", rift_bristle_woods_default, rift, quests), makeLocationMarkup("rift_valour", "Valour Rift", rift_valour_default, rift, quests), makeRegionMarkup("Rift", rift, contentsWrapper), burroughs.children.length === 0 && varmintValley.children.length === 0 && sandtailDesert.children.length === 0 && rodentia.children.length === 0 && quesoCanyon.children.length === 0 && hollowHeights.children.length === 0 && folkloreForest.children.length === 0 && rift.children.length === 0) {
let noLocation = makeElement("div", "noLocationDataWrapper");
makeElement("div", "noLocationData", "No location data found. Refresh data to populate the dashboard.", noLocation), contentsWrapper.append(noLocation);
}
return contentsWrapper;
}), environments4 = [], init59 = () => __async(void 0, null, function* () {
addStyles(styles_default55, "location-dashboard"), environments4 = yield getData("environments"), sessionSet("doing-location-refresh", !1), cacheLocationData(), onEvent("travel_complete", cacheLocationData), onRequest("*", cacheLocationData), makeDashboardTab();
}), location_dashboard_default = {
id: "location-dashboard",
name: "Location Dashboard",
type: "feature",
default: !0,
description: "View location HUD information in a dashboard available in the top dropdown menu.",
load: init59
};
}
});
var settings_default23, init_settings24 = __esm({
"src/modules/better-quests/settings/index.js"() {
settings_default23 = () => __async(void 0, null, function* () {
return [{
id: "better-quests.m400-helper",
title: "M400 Helper",
default: !0,
description: "Add a \u201CTravel to next step\u201D button to the M400 quest."
}];
});
}
});
var renderButton, main11, m400_default, init_m400 = __esm({
"src/modules/better-quests/modules/m400/index.js"() {
init_utils2();
renderButton = (location) => {
let title = document.querySelector(".campPage-quests-title");
if (!title)
return;
let existingButton = document.querySelector("#mh-improved-m400-travel");
existingButton && existingButton.remove();
let button = makeElement("div", ["mousehuntActionButton", "tiny", "mh-m400-travel", `mh-m400-travel-${location}`]);
button.id = "mh-improved-m400-travel", location === getCurrentLocation2() && button.classList.add("disabled"), makeElement("span", "mousehuntActionButton-text", "Travel to next step", button), button.setAttribute("data-location", location), button.addEventListener("click", (e) => {
let clickedLocation = e.target.getAttribute("data-location");
if (!clickedLocation) {
let parent = e.target.parentElement;
if (!parent)
return;
clickedLocation = parent.getAttribute("data-location");
}
travelTo(clickedLocation);
}), title.append(button);
}, main11 = () => __async(void 0, null, function* () {
var _a, _b, _c;
if (!document.querySelector(".campPage-quests-title") || !(((_b = (_a = user.quests) == null ? void 0 : _a.QuestLibraryM400Research) == null ? void 0 : _b.is_assignment) || ((_c = user.quests.QuestLibraryM400Research) == null ? void 0 : _c.is_bait_assignment)))
return;
let container = document.querySelector(".campPage-quests-container");
if (!container)
return;
container.classList.add("mh-m400-quest");
let allTasks = document.querySelectorAll(".campPage-quests-objective-container");
if (!allTasks)
return;
let taskNames = document.querySelectorAll(".campPage-quests-objective-task");
taskNames && taskNames.forEach((task) => {
let newText = task.innerText.replaceAll("Collect 1 Piece of M400 Intel", "Collect Intel");
task.innerText = newText;
});
let last = [...allTasks].reverse().find((task) => !task.classList.contains("locked") && !task.classList.contains("complete"));
if (!last)
return;
let objective = last.querySelector(".campPage-quests-objective-task");
if (!objective)
return;
let location = objective.innerText.split(" in ");
if (location.length === 1 && (location = objective.innerText.split(" from ")), location.length === 1)
return;
location = location[1].replace("Mice", "").replace("the ", "").trim();
let locations = yield getData("m400-locations"), locationKey = Object.keys(locations).find((key) => locations[key].includes(location));
locationKey && renderButton(locationKey);
}), m400_default = () => __async(void 0, null, function* () {
main11(), onNavigation(main11, {
page: "camp"
});
});
}
});
var styles_default56, init_styles57 = __esm({
"src/modules/better-quests/styles.css"() {
styles_default56 = `#mh-improved-m400-travel{left:15px;cursor:pointer}.m400-helper-hidden,.campPage-quests-objective-container.locked .campPage-quests-objective-content,.campPage-quests-footer-smash-icon,.campPage-quests-footer-smash-warning{display:none}.campPage-quests-objective-container .campPage-quests-objective-thumb{width:35px;height:25px}.campPage-quests-objective-content{width:calc(100% - 35px)}.campPage-quests-objective-container.locked .campPage-quests-objective-thumb{width:100%;margin:0 auto;opacity:.4}.campPage-quests-footer-smash{display:flex;flex-direction:row;place-content:center center;align-items:center;padding:4px;font-size:9.75px;text-decoration:underline;border-radius:3px;box-shadow:none}#mh-research-smash-warning{position:absolute;bottom:28px;left:30px;display:block;max-width:250px;line-height:16px;text-align:left}#overlayPopup.zugzwangsLibraryQuestShopPopup .errorText{padding:10px 0;color:#da1717}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .image{display:flex;flex-direction:column;align-items:center;width:50px}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .image img{width:40px;height:40px;margin:0}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .content b{display:block;padding:5px 0;font-size:12px;color:#000}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .content{display:block;width:auto;padding:0;margin-left:10px;color:#909090}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .requirements b{display:inline-block;padding:7px}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .item img,#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink br{display:none}#overlayPopup.zugzwangsLibraryQuestShopPopup .questContainer{height:auto;overflow-y:visible}#overlayPopup.zugzwangsLibraryQuestShopPopup a.questLink{display:grid;grid-template-columns:1fr 5fr 2fr;place-items:center;align-items:start;padding-bottom:10px}#overlayPopup.zugzwangsLibraryQuestShopPopup a.questLink:hover,#overlayPopup.zugzwangsLibraryQuestShopPopup a.questLink:focus,#overlayPopup.zugzwangsLibraryQuestShopPopup a.questLink:active{cursor:default}.mh-m400-travel{margin-top:-2px;margin-left:10px}.mh-m400-quest .campPage-quests-objective-progress,.mh-m400-quest .campPage-quests-objective-progressBar{display:none}.mh-ui-assignment-meta,.mh-ui-assignment-price{display:flex;flex-direction:column;align-items:center}.mh-ui-assignment-meta-wrapper{display:grid;grid-template-columns:1fr 1fr;gap:9px;place-items:center stretch}.mh-ui-assignment-wiki-button{grid-column:span 2;text-align:center}.mh-ui-assignment-price-value{font-size:13px;font-weight:900}#overlayPopup.zugzwangsLibraryQuestShopPopup .questResources{padding:5px 0}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .image img.disabled[src=""]{display:none}.questLink .mousehuntActionButton.lightBlue{padding:2px 8px;margin-left:-4px;font-size:12px;font-weight:100}.mh-ui-assignment-price-label{text-decoration:underline;text-decoration-color:#ccc}.mh-ui-assignment-details-summary{padding:5px 0;font-size:12px;color:#000}#overlayPopup.zugzwangsLibraryQuestShopPopup .questResources .mh-ui-quest-resources:hover{cursor:pointer;background-color:#dfdfdf;border-radius:6px;box-shadow:-1px 1px 0 3px #dfdfdf}h4.mh-ui-assignment-details-title{padding:3px 0;font-size:13px;text-decoration:underline}ul.mh-ui-assignment-details-task-list{margin-left:20px;line-height:1.5;list-style:disc}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .image,.mh-ui-assignment-meta-wrapper{margin-top:10px}.mh-ui-assignment-details-task-title{margin:3px 0}#overlayPopup.zugzwangsLibraryQuestShopPopup #jsDialogAjaxPrefix{border:none}
`;
}
});
// dist/data/library-assignments.json
var library_assignments_default, init_library_assignments = __esm({
"dist/data/library-assignments.json"() {
library_assignments_default = { library_intro_research_assignment_convertible: { name: "Catalog Library Mice", cost: 0, rewardPoints: 20, rewards: ["Yellow Tome of Wisdom", "Wealth Charms"], assignments: [{ name: "Catalog Library Assignment", tasks: [{ title: "All seven of the following:", text: ["1 Bookborn Mouse", "1 Effervescent Mouse", "1 Explorator Mouse", "1 Flutterby Mouse", "1 Infiltrator Mouse", "1 Pocketwatch Mouse", "1 Walker Mouse"] }] }] }, library_research_assignment_convertible: { name: "Library Research", cost: 20, rewardPoints: 30, rewards: ["Yellow Tome of Wisdom", "Green Tome of Wisdom", "Purple Tome of Wisdom", "Wealth Charms"], assignments: [{ name: "Library Mice Assignment", tasks: [{ title: "Two of the following:", text: ["1 Bookborn Mouse", "1 Flutterby Mouse", "1 Steam Grip Mouse", "1 Tome Sprite Mouse", "1 Scribe Mouse"] }, { title: "Three of the following:", text: ["2 Effervescent Mice", "2 Explorator Mice", "2 Infiltrator Mice", "2 Pocketwatch Mice", "2 Walker Mice"] }] }, { name: "Library Power Type Assignment", tasks: [{ title: "Three of the following:, with at least one task for both trap power types", text: ["1 Effervescent Mouse using a Physical trap", "1 Infiltrator Mouse using a Physical trap", "1 Scribe Mouse using a Physical trap", "1 Steam Grip Mouse using a Physical trap", "1 Walker Mouse using a Physical trap", "3 Explorator Mice using a Physical trap", "3 Pocketwatch Mice using a Physical trap", "1 Bookborn Mouse using a Tactical trap", "1 Flutterby Mouse using a Tactical trap", "2 Effervescent Mice using a Tactical trap", "2 Infiltrator Mice using a Tactical trap", "2 Walker Mice using a Tactical trap"] }] }] }, zugzwang_research_assignment_convertible: { name: "Zugzwang Research", cost: 50, rewardPoints: 80, rewards: ["Blue Tome of Wisdom", "Wealth Charms", "Amplifier Charms", "Rook Crumble Charms", "Spellbook Charms", "Mystic Curd", "Technic Cheese Mould"], assignments: [{ name: "Seasonal Garden Assignment", tasks: [{ title: "Two of the following:", text: ["10 mice in the Seasonal Garden using a Tactical trap", "10 mice in the Seasonal Garden using Luck Charm", "20 mice in the Seasonal Garden", "20 mice in the Seasonal Garden using Power Charm", "30 mice in the Seasonal Garden using Lucky Power Charm", "30 mice in the Seasonal Garden using Bamboozler Base", "40 mice in the Seasonal Garden"] }, { title: "Three of the following: (Winter)", text: ["1 Winter Mage Mouse using Ancient Spear Gun", "2 Frostbite Mice", "3 Penguin Mice using a Hydro trap"] }, { title: "Three of the following: (Spring)", text: ["1 Derpicorn Mice using a Tactical trap", "1 Vinetail Mouse", "3 Hydrophobe Mice using Aqua Base", "3 Tanglefoot Mice using a Physical trap"] }, { title: "Three of the following: (Summer)", text: ["1 Summer Mage Mouse", "3 Firefly Mice using Horrific Venus Mouse Trap", "3 Monarch Mice using a Tactical trap", "3 Stinger Mice"] }, { title: "Three of the following: (Fall)", text: ["1 Fall Familiar Mouse", "1 Harvester Mouse", "1 Whirleygig Mice using a Tactical trap", "1 Fall Familiar Mouse", "1 Harvester Mouse", "1 Whirleygig Mice using a Tactical trap", "4 Harvest Harrier Mice", "4 Pumpkin Head Mice using a Shadow trap"] }] }, { name: "Mystic King Assignment", tasks: [{ title: "One of the following:", text: ["10 Mice in the Seasonal Garden using a Tactical trap", "30 Mice in the Seasonal Garden"] }, { title: "One of the following:", text: ["1 Mouse in the Seasonal Garden using Zugzwang's First Move", "10 Mice in the Seasonal Garden using the Bamboozler Base", "10 Mice in the Seasonal Garden using Zugzwang's Last Move"] }, { title: "One of the following:", text: ["8 Mystic Pawns", "8 Mystic Pawns using Wooden Base with Target"] }, { title: "One of the following:", text: ["2 Mystic Knight Mice", "2 Mystic Bishop Mice"] }, { title: "", text: ["1 Mystic King Mouse"] }] }, { name: "Technic King Assignment", tasks: [{ title: "One of the following:", text: ["10 Mice in the Seasonal Garden using a Tactical trap", "30 Mice in the Seasonal Garden"] }, { title: "One of the following:", text: ["1 Mouse in the Seasonal Garden using Zugzwang's First Move", "10 Mice in the Seasonal Garden using the Bamboozler Base", "10 Mice in the Seasonal Garden using Zugzwang's Last Move"] }, { title: "One of the following:", text: ["8 Technic Pawns", "8 Technic Pawns using Wooden Base with Target"] }, { title: "One of the following:", text: ["2 Technic Knight Mice", "2 Technic Bishop Mice"] }, { text: ["1 Technic King Mouse"] }] }] }, furoma_research_assignment_convertible: { name: "Furoma Research", cost: 130, rewardPoints: 90, rewards: ["Purple Tome of Wisdom", "Wealth Charms", "Token of the Cheese Belt", "Token of the Cheese Claw", "Token of the Cheese Fang", "Master Belt Shard", "Master Claw Shard", "Master Fang Shard", "Rumble Cheese", "Maki Cheese", "Onyx Stone"], assignments: [{ name: "Furoma Assignment", tasks: [{ title: "One of the following:", text: ["3 Mice in the Training Grounds using Zugzwang's Last Move", "15 Archer Mice in the Training Grounds", "40 Mice in the Training Grounds using Bamboozler Base", "50 Mice using a Tactical trap"] }, { title: "One of the following:", text: ["3 Kung Fu Mice in the Dojo", "3 Ninja Mice in the Dojo", "3 Samurai Mice in the Dojo"] }, { title: "One of the following:", text: ["1 Diamond Mice in the Dojo using Power Charm", "1 Gold Mouse in the Dojo using Luck Charm", "1 Hapless Mouse in the Dojo", "10 Hapless Mice", "10 Hapless Mice using Bamboozler Base"] }, { title: "One of the following:", text: ["1 Student of the Cheese Belt Mouse using Maki Cheese", "1 Student of the Cheese Fang Mouse using Maki Cheese", "1 Student of the Cheese Claw Mouse using Maki Cheese", "3 Students of the Cheese Belt Mouse", "3 Students of the Cheese Fang Mouse", "3 Students of the Cheese Claw Mouse", "1 Master of the Dojo Mouse"] }] }, { name: "Pagoda Assignment", tasks: [{ title: "One of the following:", text: ["6 Students of the Cheese Belt Mouse", "1 Students of the Cheese Belt Mouse using Zugzwang's Last Move"] }, { title: "One of the following:", text: ["6 Students of the Cheese Fang Mice", "1 Students of the Cheese Fang Mice using Zugzwang's Last Move"] }, { title: "One of the following:", text: ["6 Students of the Cheese Claw Mouse", "1 Students of the Cheese Claw Mice using Zugzwang's Last Move"] }, { text: ["1 Masters of the Cheese Belt Mouse"] }, { text: ["1 Masters of the Cheese Fang Mouse"] }, { text: ["1 Masters of the Cheese Claw Mouse"] }, { title: "One of the following:", text: ["1 Master of the Dojo Mouse", "1 Master of the Dojo Mouse using Ambush (Ninja Ambush Trap cannot be used to complete this task)", "1 Master of the Dojo Mouse using Zugzwang's First Move"] }] }, { name: "Dojo Sensei Assignment", tasks: [{ title: "One of the following:", text: ["2 Students of the Cheese Belt Mouse using Onyx Mallet", "2 Students of the Cheese Fang Mouse using Onyx Mallet", "2 Students of the Cheese Claw Mouse using Onyx Mallet"] }, { text: ["8 Masters of the Cheese Belt Mouse"] }, { text: ["8 Masters of the Cheese Fang Mouse"] }, { text: ["8 Masters of the Cheese Claw Mouse"] }, { title: "One of the following:", text: ["2 Masters of the Dojo Mouse", "2 Masters of the Dojo Mouse using Ambush (Ninja Ambush Trap cannot be used to complete this task)", "2 Masters of the Dojo Mouse using Zugzwang's First Move"] }, { text: ["1 Dojo Sensei"] }] }] }, adv_zugzwang_research_assignment_convertible: { name: "Advanced Zugzwang Research", cost: 150, rewardPoints: 150, rewards: ["Purple Tome of Wisdom", "Wealth Charms", "Amplifier Charms", "Rook Crumble Charms", "Spellbook Charms", "Checkmate cheese", "Mystic Curd", "Technic Cheese Mould"], assignments: [{ name: "Mystic Amplifier Assignment", tasks: [{ title: "One of the following:", text: ["30 Mice in the Seasonal Garden using a Tactical trap", "30 Mice in the Seasonal Garden using Zugzwang's First Move", "8 Mystic Pawns using Mystic Pawn Pincher"] }, { title: "One of the following:", text: ["1 Mystic Queen using Checkmate Cheese", "1 Mystic King using Checkmate Cheese", "1 Chess Master"] }], info: "More Info: MouseHunt Info Page" }, { name: "Technic Amplifier Assignment", tasks: [{ title: "One of the following:", text: ["30 Mice in the Seasonal Garden using a Tactical trap", "30 Mice in the Seasonal Garden using Zugzwang's First Move", "8 Technic Pawns using Technic Pawn Pincher"] }, { title: "One of the following:", text: ["1 Technic Queen using Checkmate Cheese", "1 Technic King using Checkmate Cheese", "1 Chess Master"] }] }, { name: "Advanced Amplifier Assignment", tasks: [{ title: "One of the following:", text: ["30 Mice in the Seasonal Garden using Spellbook Base", "30 Mice in the Seasonal Garden using Zugzwang's First Move"] }, { title: "One of the following:", text: ["1 Mystic King Mouse using Checkmate Cheese", "1 Mystic King Mouse using Blackstone Pass Trap and Checkmate Cheese"] }, { title: "One of the following:", text: ["1 Technic King Mouse using Checkmate Cheese", "1 Technic King Mouse using Obvious Ambush Trap and Checkmate Cheese", "1 Chess Master"] }] }] }, zurreal_trap_research_convertible: { name: "Zurreal Trap Research", cost: 900, rewardPoints: 400, assignments: [{ name: "", tasks: [{ title: "All ten of the following:", text: ["Collect 1 Desert Travel Almanac from Centaur Mice (in the Great Gnarled Tree or Lagoon)", "Collect 1 Encyclopedia Gnawnia from Master Burglar Mice in the Town of Gnawnia", "Collect 6 Luscious Lumbers in the Training Grounds (from Kung Fu, Monk, and Samurai mouse)", "Collect 1 Mesh Netting in S.S. Huntington IV (from Leviathan and Squeaken mouse)", "Collect 3 Ectoplasmic Essence from Ghost Mice in the Mousoleum", "Collect 3 Warp Nails from Realm Rippers (in the Forbidden Grove)", "Collect 3 Runestones from Stonework Warrior Mice (in the Jungle of Dread with Magical Havarti)", "Collect 1 Draconic Book from Whelpling Mice (in Dracano)", "Collect 1 Lich Jewel in the Balack's Cove (from Balack the Banished, Derr Lich, Elub Lich and Nerg Lich mouse)", "Craft 1 Zurreal's Folly"] }] }] }, library_m400_bait_assignment_convertible: { name: "M400 Bait Research Assignment", cost: 1500, rewardPoints: 200, assignments: [{ name: "", tasks: [{ title: "Collect 2 Aged Grape Juice from one of the following:", text: ["Derr Lich Mice", "Dojo Sensei Mice", "Draconic Warden Mice", "Elub Lich Mice", "Ethereal Librarian Mice", "Gate Guardian Mice", "Keeper Mice", "Market Guard Mice", "Market Thief Mice", "Master Burglar Mice", "Mystic Bishop Mice", "Nerg Lich Mice", "Pie Thief Mice", "Prospector Mice", "Pygmy Wrangler Mice", "Ruffian Mice", "Saloon Gal Mice", "Strawberry Hotcakes Mice", "Swarm of Pygmy Mice", "Technic Bishop Mice", "Terra Mice"] }, { title: "Collect 3 Cheddar Powder from one of the following:", text: ["Burglar Mice", "Calalilly Mice", "Effervescent Mice", "Ethereal Thief Mice", "Granite Mice", "Lasso Cowgirl Mice", "Lumberjack Mice", "Master of the Cheese Belt Mice", "Polar Bear Mice", "Quesodillo Mice", "Snow Slinger Mice"] }, { title: "Collect 3 Gooey Gruyere Curds from one of the following:", text: ["Ethereal Enchanter Mice", "Glass Blower Mice", "Kung Fu Mice", "Master of the Cheese Claw Mice", "Samurai Mice", "Sand Pilgrim Mice", "Shopkeeper Mice", "Snow Soldier Mice", "Thistle Mice", "Walker Mice", "Zombie Mice"] }, { title: "Collect 3 Microchip Curds from one of the following:", text: ["Archer Mice", "Bark Mice", "Bionic Mice", "Ethereal Engineer Mice", "Knight Mice", "Limestone Miner Mice", "Master of the Cheese Fang Mice", "Page Mice", "Phalanx Mice", "Pocketwatch Mice", "Ravenous Zombie Mice", "Spiky Devil Mice", "Stealth Mice", "Tumbleweed Mice"] }, { title: "Collect 1 Nuclear Garlic from one of the following:", text: ["Blacksmith Mice", "Dunehopper Mice", "Gorgon Mice", "Lambent Crystal Mice", "Lycan Mice", "Mage Weaver Mice", "Master of the Dojo Mice", "Monster Mice", "Pyrite Mice", "Realm Ripper Mice", "Shroom Mice", "Tome Sprite Mice", "Whelpling Mice"] }] }] }, library_m400_assignment_convertible: { name: "M400 Hunting Research Assignment", cost: 1900, rewardPoints: 300, assignments: [{ name: "", tasks: [{ title: "One of the following:", text: ["Collect intel from Grunt Mice in the Derr Dunes", "Collect intel from Guardian Mice in the Derr Dunes", "Collect intel from Lycan Mice in the Catacombs", "Collect intel from Renegade Mice in the Derr Dunes", "Collect intel from Seer Mice in the Derr Dunes", "Collect intel from Terror Knight Mice in the Catacombs", "Collect intel from Trailblazer Mice in the Derr Dunes", "Collect intel in the Seasonal Garden"] }, { title: "One of the following:", text: ["Collect intel from Prospector Mice in the Claw Shot City", "Collect intel from Ruffian Mice in the Claw Shot City", "Collect intel from Sand Colossus Mice in the Sand Crypts", "Collect intel from Scarab Mice in the Sand Crypts", "Collect intel from Serpentine Mice in the Sand Crypts", "Collect intel in the Iceberg"] }, { title: "One of the following:", text: ["Collect intel from Conjurer Mice in the Nerg Plains", "Collect intel from Conqueror Mice in the Nerg Plains", "Collect intel from Defender Mice in the Nerg Plains", "Collect intel from Finder Mice in the Nerg Plains", "Collect intel from Master of the Cheese Belt Mice in the Meditation Room", "Collect intel from Master of the Cheese Claw Mice in the Meditation Room", "Collect intel from Master of the Cheese Fang Mice in the Meditation Room", "Collect intel from Mystic Mice in the Elub Shore", "Collect intel from Pack Mice in the Elub Shore", "Collect intel from Pathfinder Mice in the Nerg Plains", "Collect intel from Protector Mice in the Elub Shore", "Collect intel from Scout Mice in the Elub Shore", "Collect intel from Vanquisher Mice in the Elub Shore"] }, { title: "One of the following:", text: ["Collect intel from Buccaneer Mice in the S.S. Huntington IV", "Collect intel from Captain Mice in the S.S. Huntington IV", "Collect intel from Ninja Mice in the Training Grounds", "Collect intel in the Fiery Warpath"] }, { title: "One of the following:", text: ["Collect intel from Cavalier Mice in the King's Gauntlet", "Collect intel from Chipper Mice in the Slushy Shoreline", "Collect intel from Master Burglar Mice in the Bazaar", "Collect intel from Snow Slinger Mice in the Slushy Shoreline", "Collect intel from Snow Sniper Mice in the Slushy Shoreline", "Collect intel from Snow Soldier Mice in the Slushy Shoreline", "Collect intel from Yeti Mice in the Slushy Shoreline"] }, { title: "One of the following:", text: ["Collect intel from Grubling Herder Mice in the Sand Dunes", "Collect intel from Magma Carrier Mice in the Jungle of Dread", "Collect intel from Primal Mice in the Jungle of Dread", "Collect intel from Sand Pilgrim Mice in the Sand Dunes", "Collect intel from Stonework Warrior Mice in the Jungle of Dread"] }, { title: "One of the following:", text: ["Collect intel from Barkshell Mice in the Twisted Garden", "Collect intel from Camofusion Mice in the Twisted Garden", "Collect intel from Cursed Librarian Mice in the Cursed City", "Collect intel from Cursed Enchanter Mice in the Cursed City", "Collect intel from Essence Collector Mice in the Lost City", "Collect intel from Essence Guardian Mice in the Cursed City", "Collect intel from Ethereal Enchanter Mice in the Lost City", "Collect intel from Ethereal Librarian Mice in the Lost City", "Collect intel from Thorn Mice in the Twisted Garden", "Collect intel from Twisted Hotcakes Mice in the Twisted Garden"] }, { title: "One of the following:", text: ["Collect intel from Bark Mice in the Living Garden", "Collect intel from Blacksmith Mice in the Muridae Market", "Collect intel from Camoflower Mice in the Living Garden", "Collect intel from Mage Weaver Mice in the Muridae Market", "Collect intel from Market Guard Mice in the Muridae Market", "Collect intel from Realm Ripper Mice in the Forbidden Grove", "Collect intel from Spice Merchant Mice in the Muridae Market", "Collect intel from Strawberry Hotcakes Mice in the Living Garden", "Collect intel from Thistle Mice in the Living Garden"] }, { title: "One of the following:", text: ["Collect intel from Bionic Mice in the Meadow", "Collect intel from Derr Lich Mice in the Balack's Cove", "Collect intel from Draconic Warden Mice in the Dracano", "Collect intel from Elub Lich Mice in the Balack's Cove", "Collect intel from Gate Guardian Mice in the Acolyte Realm", "Collect intel from Master of the Dojo Mice in the Pinnacle Chamber", "Collect intel from Mystic Knight Mice in the Zugzwang\u2019s Tower", "Collect intel from Sorcerer Mice in the Acolyte Realm", "Collect intel from Technic Knight Mice in the Zugzwang\u2019s Tower"] }, { title: "1 M400 using Fusion Fondue" }] }] } };
}
});
var questAssignments, updateObjectiveFooterDisplay, addQuestsTab, addQuestTabEventListener, addResearchSmashWarning, moveErrorText, removeSmashText, updateAssignmentList, modifyAvailableQuestsPopup, checkForQuestSmash, restoreQuestTabAfterSmash, m400IfEnabled, main12, init60, better_quests_default, init_better_quests = __esm({
"src/modules/better-quests/index.js"() {
init_utils2();
init_settings24();
init_m400();
init_styles57();
init_library_assignments();
questAssignments = /* @__PURE__ */ new Set([
"charming_study_hween2014_assignment_quest_item",
"double_run_advanced_research_quest",
"extra_spooky_hween2014_assignment_quest_item",
"furoma_research_quest_item",
"hg_letter_research_quest_item",
"lab_monster_1_quest_item",
"library_adv_hween2013_research_quest_item",
"library_catalog_quest_item",
"library_hween2013_research_quest_item",
"library_m400_bait_research_quest_item",
"library_m400_research_quest_item",
"library_mice_research_quest_item",
"library_power_type_research_quest_item",
"mystic_advanced_research_quest_item",
"mystickingresearch_quest_item",
"pagoda_advanced_research_quest_item",
"pagoda_research_quest_item",
"seasonalgardenresearch_quest_item",
"tech_advanced_research_quest_item",
"techkingresearch_quest_item",
"zurreal_trap_research_quest_item"
]), updateObjectiveFooterDisplay = () => {
let footerText = document.querySelector(".campPage-quests-footer-smash");
if (!footerText)
return;
let newHref = footerText.getAttribute("href").replace("subtab", "sub_tab");
footerText.setAttribute("href", `${newHref}#smashQuest`), footerText.innerHTML = footerText.innerHTML.replace("Don't like an assignment? Cancel it by smashing the assignment ", "Cancel this assignment by smashing it "), footerText.addEventListener("click", (e) => {
e.preventDefault();
let assignment = Object.values(user.quests).find((quest) => quest.is_assignment && quest.type.endsWith("_quest_item"));
assignment && (e.target.classList.add("inventoryPage-item"), e.target.setAttribute("data-item-type", assignment.type), e.target.setAttribute("data-produced-item", "nothing_stat_item"), app.pages.InventoryPage.showConfirmPopup(e.target, "hammer"), e.target.classList.remove("inventoryPage-item"));
});
}, addQuestsTab = () => {
let tabs = document.querySelector(".campPage-tabs-tabRow");
if (!tabs || tabs.querySelector('a[data-tab="quests"]'))
return;
let newQuestsButton = makeElement("a", ["campPage-tabs-tabHeader", "quests"]);
newQuestsButton.setAttribute("data-tab", "quests"), newQuestsButton.addEventListener("click", () => {
hg.views.HeadsUpDisplayZugswangLibraryView.showPopup();
}), makeElement("span", "", "Quests", newQuestsButton), tabs.insertBefore(newQuestsButton, tabs.lastChild);
}, addQuestTabEventListener = () => {
let questTabContent = document.querySelector('.campPage-tabs-tabContent[data-tab="quests"]');
if (!questTabContent)
return;
new MutationObserver(() => {
updateObjectiveFooterDisplay(), m400IfEnabled();
}).observe(questTabContent, { childList: !0 });
}, addResearchSmashWarning = () => {
let existing = document.querySelector("#mh-research-smash-warning");
if (existing && existing.remove(), getCurrentSubtab() !== "hammer")
return;
let confirm2 = document.querySelector(".inventoryPage-confirmPopup");
if (!confirm2)
return;
let type2 = confirm2.getAttribute("data-item-type");
if (!type2 || !questAssignments.has(type2))
return;
let warningText = document.createElement("div");
warningText.id = "mh-research-smash-warning", warningText.innerText = "If you smash an assignment, you will have to wait 1 hour until you can get a new one.", confirm2.insertBefore(warningText, confirm2.firstChild);
}, moveErrorText = () => {
let errorTextEl = document.querySelectorAll(".questLink .requirements .error");
if (!errorTextEl)
return;
let errorText = "";
if (errorTextEl.forEach((el) => {
el.innerText && (errorText = el.innerText), el.classList.add("hidden");
}), !errorText)
return;
errorText = errorText.replace(/ \d\d seconds/, "").replace(" before taking", " for");
let titleBar = document.querySelector("#jsDialogAjaxPrefix h2");
if (!titleBar)
return;
let titleError = makeElement("h3", "errorText", errorText);
titleBar.parentNode.insertBefore(titleError, titleBar.nextSibling);
}, removeSmashText = () => {
let smashText = document.querySelector(".smashQuest");
smashText && smashText.classList.add("hidden");
}, updateAssignmentList = () => __async(void 0, null, function* () {
let assignmentList = document.querySelectorAll("#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink");
if (!assignmentList)
return;
assignmentList.forEach((questLink) => {
let type2 = questLink.getAttribute("data-quest-type");
if (!type2) {
let onclickAttr = questLink.getAttribute("onclick") || "";
if (!onclickAttr.includes("hg.views.HeadsUpDisplayZugswangLibraryView.showConfirm") || (type2 = onclickAttr.replace("hg.views.HeadsUpDisplayZugswangLibraryView.showConfirm('", "").replace("'); return false;", ""), !type2))
return;
}
questLink.removeAttribute("onclick");
let actionButton = questLink.querySelector(".actions .mousehuntActionButton");
actionButton && actionButton.setAttribute("onclick", `hg.views.HeadsUpDisplayZugswangLibraryView.showConfirm('${type2}'); return false;`);
let content = questLink.querySelector(".content");
if (!content || !content.querySelector("b"))
return;
questLink.setAttribute("data-quest-type", type2);
let assignment = library_assignments_default[type2], requirements = questLink.querySelector(".requirements");
requirements && requirements.remove();
let metaWrapper = makeElement("div", "mh-ui-assignment-meta-wrapper"), cost = makeElement("div", ["mh-ui-assignment-price", "mh-ui-assignment-cost"]);
makeElement("span", "mh-ui-assignment-price-label", "Requires", cost), makeElement("strong", "mh-ui-assignment-price-value", assignment.cost, cost), metaWrapper.append(cost);
let reward = makeElement("div", ["mh-ui-assignment-price", "mh-ui-assignment-reward"]);
makeElement("span", "mh-ui-assignment-price-label", "Reward", reward), makeElement("strong", "mh-ui-assignment-price-value", assignment.rewardPoints, reward), metaWrapper.append(reward);
let wiki = makeElement("a", "mh-ui-assignment-wiki-button", "View on Wiki \u2192");
if (wiki.href = `https://mhwiki.hitgrab.com/wiki/index.php/Library_Assignment#${assignment.name.replaceAll(" ", "_")}`, wiki.target = "_blank", wiki.rel = "noopener noreferrer", metaWrapper.append(wiki), content.after(metaWrapper), assignment.name === "M400 Hunting Research Assignment") {
let m400Wrapper = makeElement("div", ["content", "mh-ui-m400-wrapper"]);
makeElement("b", "mh-ui-m400-title", assignment.name, m400Wrapper), makeElement("span", "mh-ui-m400-content", "This envelope contains a Research Assignment that will have you looking for the elusive M400 prototype.", m400Wrapper), content.replaceWith(m400Wrapper);
}
if (assignment.assignments) {
let assigmentDetails = makeElement("details", "mh-ui-assignment-details");
makeElement("summary", "mh-ui-assignment-details-summary", "Assignment Details", assigmentDetails);
for (let singleAssignment of assignment.assignments) {
let assignmentWrapper = makeElement("div", "mh-ui-assignment-details-wrapper");
makeElement("h4", "mh-ui-assignment-details-title", singleAssignment.name, assignmentWrapper);
let singleAssignmentTasks = singleAssignment.tasks || [];
for (let task of singleAssignmentTasks) {
let taskEl = makeElement("div", "mh-ui-assignment-details-task");
makeElement("h5", "mh-ui-assignment-details-task-title", task.title, taskEl);
let taskList = makeElement("ul", "mh-ui-assignment-details-task-list");
if (Array.isArray(task.text))
for (let taskItem of task.text)
makeElement("li", "mh-ui-assignment-details-task-item", taskItem, taskList);
else
makeElement("li", "mh-ui-assignment-details-task-item", task.text, taskList);
taskEl.append(taskList), assignmentWrapper.append(taskEl);
}
assigmentDetails.append(assignmentWrapper);
}
content.append(assigmentDetails);
}
if (assignment.rewards) {
let rewardsWrapper = makeElement("details", "mh-ui-assignment-details-wrapper");
makeElement("summary", "mh-ui-assignment-details-summary", "Rewards", rewardsWrapper);
let rewardsList = makeElement("ul", "mh-ui-assignment-details-task-list");
for (let singleReward of assignment.rewards)
makeElement("li", "mh-ui-assignment-details-task-item", singleReward, rewardsList);
rewardsWrapper.append(rewardsList), content.append(rewardsWrapper);
}
});
let resources = document.querySelector("#overlayPopup.zugzwangsLibraryQuestShopPopup .questResources");
if (!resources)
return;
let tomeDetails = yield getUserItems([
"library_boss_trinket",
// not a tome but we want it here.
"tome_of_wisdom_yellow_convertible",
"tome_of_wisdom_green_convertible",
"tome_of_wisdom_blue_convertible",
"tome_of_wisdom_convertible",
// purple.
"tome_of_wisdom_red_convertible",
"tome_of_wisdom_white_convertible"
// silver.
]);
if (tomeDetails)
for (let tome of tomeDetails) {
if (!tome.type)
continue;
let tomeEl = makeElement("div", ["item", "mh-ui-quest-resources"]), imageEl = makeElement("div", "itemImage"), image = makeElement("img");
image.src = tome.thumbnail_transparent || tome.thumbnail || tome.image || "", imageEl.append(image), makeElement("div", "quantity", tome.quantity || 0, imageEl), tomeEl.append(imageEl), makeElement("span", "itemName", tome.name || "", tomeEl), tomeEl.addEventListener("click", () => {
hg.views.ItemView.show(tome.type);
}), resources.append(tomeEl);
}
}), modifyAvailableQuestsPopup = () => {
if (!document.querySelector("#overlayPopup.zugzwangsLibraryQuestShopPopup"))
return;
updateAssignmentList(), document.querySelector(".questLink .requirements .error") && (moveErrorText(), removeSmashText());
}, checkForQuestSmash = () => {
if (!window.location.hash || window.location.hash !== "#smashQuest" || getCurrentTab() !== "crafting" || getCurrentSubtab() !== "hammer")
return;
let assignment = document.querySelector('.inventoryPage-item.quest[data-produced-item="nothing_stat_item"]');
assignment && app.pages.InventoryPage.useItem(assignment);
}, restoreQuestTabAfterSmash = (request, data) => {
if (!(data && data.item_type && questAssignments.has(data.item_type)))
return;
let questsTab = document.querySelector(".campPage-tabs-tabHeader.quests");
questsTab && (questsTab.remove(), addQuestsTab());
}, m400IfEnabled = () => {
getSetting("better-quests.m400-helper", !0) && m400_default();
}, main12 = () => {
if (!isUserTitleAtLeast("lord"))
return;
let activate = () => {
addQuestTabEventListener(), addQuestsTab(), checkForQuestSmash();
};
m400IfEnabled(), activate(), onNavigation(activate, {
page: "camp"
}), onNavigation(checkForQuestSmash, {
page: "inventory",
tab: "crafting",
subtab: "hammer"
}), onOverlayChange({
/**
* When the overlay is shown.
*/
show: () => {
addResearchSmashWarning(), modifyAvailableQuestsPopup();
}
}), onRequest("users/usehammer.php", restoreQuestTabAfterSmash);
}, init60 = () => __async(void 0, null, function* () {
addStyles(styles_default56, "better-quests"), main12();
}), better_quests_default = {
id: "better-quests",
name: "Better Quests",
type: "better",
default: !0,
description: "Allow opening the assignments popup anywhere, improve the UI of the quests tab, and add a helper for the M400 assignments.",
load: init60,
settings: settings_default23
};
}
});
var styles_default57, init_styles58 = __esm({
"src/modules/dark-mode-tweaks/styles.css"() {
styles_default57 = `:root{--mhdm-dimming-filter: transparent}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .adventureBookBanner-goalPadding{background-color:transparent}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .adventureBookBanner-adventureName{color:#000}.mh-dark-mode .journal a{color:#0174a7}.mh-dark-mode .entry.short.supplytransferitem{background:url(https://i.mouse.rip/upscaled/item-add.png) no-repeat 10px center;background-color:#a0a0a0}.mh-dark-mode .entry.short.supplytransferitem a{color:#0c5168}.mh-dark-mode .itemPurchaseView-action-goldGost{background-color:#0e0e0e;border-color:#242424}.mh-dark-mode .itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-container{color:#fff;background-color:#242424}.mh-dark-mode .inventoryPage-item-recipeOptions li{color:#2c2c2c}.mh-dark-mode .treasureMapView-environment.active .treasureMapView-environment-title{background-color:#38727b}.mh-dark-mode #overlayPopup.treasureMapPopup .treasureMapView-environment.active .treasureMapView-environment-title a,.mh-dark-mode #overlayPopup.treasureMapPopup .treasureMapView-environment.wrong .treasureMapView-environment-title a,.mh-dark-mode .treasureMapView-environment-progress{color:#fff}.mh-dark-mode .treasureMapView-environment.wrong .treasureMapView-environment-title{background-color:#862f2f}.mh-dark-mode .pageFrameView #overlayPopup.treasureMapPopup .treasureMapRootView-content a.messageBoardView-message-delete{color:transparent}.mh-dark-mode .itemPurchaseView-margin,.mh-dark-mode .itemPurchaseView-image-container,.mh-dark-mode .itemPurchaseView-content-container{background-color:#000}.mh-dark-mode .itemPurchaseView-action-purchaseHelper-owned{background-color:#3d3d3d;border-color:#606060}.mh-dark-mode .entry.short.misc.custom.unstable_charm_trigger{background:#7ae4ff}.mh-dark-mode .journal .entry.winterTaiga,.mh-dark-mode .entry.short.misc.custom.winter_hunt_2021.instantReturnGolem.jhMisc,.mh-dark-mode .entry.short.misc.custom.winter_hunt_2021.claimGolemReward.jhMisc,.mh-dark-mode .winter_hunt_2021.sendGolem{background-color:#7ae4ff}.mh-dark-mode #jhButton{color:#3b5998}.mh-dark-mode .pageFrameView #overlayPopup.treasureMapPopup .treasureMapRootView-content a.treasureMapView-block-search-clear{color:#ccc;border-left:none}.mh-dark-mode .treasureMapView-block-search-text{color:#fff;background-color:#636363;border:1px solid #2c2c2c}.mh-dark-mode #tsitu-hunter-id-nav-ui input{color:#fff;background-color:#636363;border-color:#2c2c2c!important}.mh-dark-mode #tsitu-hunter-id-nav-ui input::placeholder{color:#ccc}.mh-dark-mode .marketplaceView-listing-progressLabel{color:#fff;text-shadow:0 1px #000}.mh-dark-mode .marketplaceView-listing-progressBar-padding{background-color:#424140}.mh-dark-mode .marketplaceView-listing-progressBar span{background-color:#956ab4}.mh-dark-mode .marketplaceMyListings s{color:#969696}.mh-dark-mode .pageFrameView .itemViewStatBlock .itemViewStatBlock-stat-label{background-color:transparent}.mh-dark-mode.shopCustomization .itemViewStatBlock-stat{border-color:#424242}.mh-dark-mode .journal .entry.larryGift{background:#d9ffbf}.mh-dark-mode .pageFrameView .mousehuntHeaderView .menuItem:hover{background-color:#000}.mh-dark-mode .pageFrameView .mousehuntHeaderView .menuItem.dropdown:hover .arrow{border-bottom-color:#666}.mh-dark-mode .trapSelectorView__trapStatSummaryContainer{background:#333}.mh-dark-mode .pageFrameView .campPage-trap-itemBrowser-armed-item-content .campPage-trap-itemBrowser-item-disarmButton{color:#000}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .trapImageView{background:#000!important;border:none}.mh-dark-mode .mh-ui-goals-sidebar-toggle{filter:invert(1)}.mh-dark-mode .giftSelectorView-gift.gift_of_the_day .giftSelectorView-gift-padding{color:#000}.mh-dark-mode .mousehuntHeaderView .dropdownContent a span,.mh-dark-mode .pageFrameView .giftSelectorView-friend>.giftSelectorView-friend-padding{color:#fff}.mh-dark-mode .regionName{background-color:#1c1c1c;border-color:#000}.mh-dark-mode .regionWrapper{border-color:#0c0c0c}.mh-dark-mode .locationWrapper{background-color:#2e2e2e}.mh-dark-mode .locationWrapper:nth-child(2n){background-color:#242424}.mh-dark-mode .dashboardWrapper{border-color:#0c0c0c}.mh-dark-mode .scoreboardRelativeRankingTableView-table,.mh-dark-mode .mousehuntHeaderView .dropdownContent{color:#fff;background-color:#252525;border-color:#666;border-radius:0}.mh-dark-mode .mousehuntHeaderView .menuItem.sidebar .dropdownContent a.pageSidebarView-user-logout,.mh-dark-mode .mousehuntHeaderView .menuItem.sidebar .dropdownContent .pageSidebarView-user a:nth-child(2),.mh-dark-mode .mousehuntHeaderView .menuItem.sidebar .dropdownContent .scoreboardRankingsWrapper a,.mh-dark-mode .mousehuntHeaderView .dropdownContent a{color:#009adf}.mh-dark-mode .mousehuntHeaderView .dropdownContent a{border-color:#666}.mh-dark-mode .pageFrameView #mousehuntContainer.PageHunterProfile .trapImageView{background:none;border:none}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp{box-shadow:none}.mh-dark-mode .trapSelectorView__codexBrowser .loading,.mh-dark-mode .campPage-trap-itemBrowser-empty-container{color:#fff;background-color:#424242;border-color:#5c5c5c}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .journal:before,.mh-dark-mode .pageFrameView #mousehuntContainer.PageJournal .journal:before{background:none}.mh-dark-mode .giftSelectorView-confirmPopup-content{color:#dcddde;background-color:#242424}.mh-dark-mode .giftSelectorView-confirmPopup-padding{background-color:#0f0f0f;border-color:#0f0f0f;box-shadow:0 0 10px #c8c8c8}.mh-dark-mode .campPage-trap-itemBrowser-item.largeQuantity .campPage-trap-itemBrowser-item-quantity .quantity{background-color:#333}.mh-dark-mode .campPage-trap-itemBrowser-item-image:after,.mh-dark-mode .pageFrameView .campPage-trap-itemBrowser-favorite-item-image-frame{border-color:#000;box-shadow:2px 2px 3px -1px #000 inset}.mh-dark-mode .campPage-trap-itemBrowser-filter input{background-color:#333;border-color:#000}.mh-dark-mode .campPage-trap-itemBrowser-filterContainer .label,.mh-dark-mode .campPage-trap-itemBrowser-quickLinks-header{color:#fff}.mh-dark-mode .campPage-trap-itemBrowser .campPage-trap-itemBrowser-filter select{color:#fff;background-color:#333;border-color:#000}.mh-dark-mode .campPage-trap-itemBrowser-item-favorite,.mh-dark-mode .pageFrameView .campPage-trap-itemBrowser-tagGroup-name{background-color:#333}.mh-dark-mode .trapSelectorView__blueprint{border-color:#0e7fbf;box-shadow:-1px -1px 2px #0e7fbf inset,0 0 10px #333 inset,3px 3px 3px #000}.mh-dark-mode a.campPage-trap-blueprint-closeButton{border-color:#0e7fbf}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .adventureBookBanner:before{background:transparent}.mh-dark-mode .adventureBookBanner-container{background-color:#bbb;border-color:#333}.mh-dark-mode .mousehuntHeaderView a.superBrie .getMore{background-color:#0e7fbf}.journal .entry.socialGift,.journal .content .marketplacepurchase,.journal .content .supplytransferitem,.journal .content .toolbarinstalled{background-image:url(https://i.mouse.rip/item_add.png)}.journal .content .marketplacesale,.journal .content .supplytransfergold{background-image:url(https://i.mouse.rip/gold_add.png)}.journal .content .travel{background-image:url(https://i.mouse.rip/travel.png)}.mh-dark-mode .mouseview-has-mhct .mouse-ar-wrapper:nth-child(odd){background-color:#3d3d3d}.mh-dark-mode .minluck-title,.mh-dark-mode .mouseview-has-mhct .ar-header{border-color:#606060}.mh-dark-mode li.minluck-item{background-color:#3d3d3d;border-color:#606060}.mh-dark-mode .pageFrameView .mouseViewPopup .content{color:#dcddde;background-color:#242424}.mh-dark-mode .mouseView-title{color:#dcddde}.mh-dark-mode .mouseView-statsContainer-block{background-color:#1a1a1a}.mh-dark-mode .mh-improved-map-sidebar-goal-image,.mh-dark-mode .mh-improved-mice-sidebar-mouse-image{box-shadow:inset 0 0 0 1px #222}.mh-dark-mode .mh-improved-map-sidebar-goal:hover,.mh-dark-mode .mh-improved-mice-sidebar-mouse:hover{background-color:#383e49}.mh-dark-mode .scoreboardRelativeRankingTableView th{color:#a7adb9;background-color:#383838;border-color:#383838}.mh-dark-mode .pageFrameView .scoreboardRelativeRankingTableView-table{border-color:#383838}.mh-dark-mode .pageFrameView .pageSidebarView-block{background-color:transparent}.mh-dark-mode .mh-improved-map-sidebar-title,.mh-dark-mode .mh-improved-mice-sidebar-title{color:#a7adb9;background-color:#383838}.mh-dark-mode .mh-improved-map-sidebar,.mh-dark-mode .mh-improved-mice-sidebar{border-color:#383838}.mh-dark-mode .mh-improved-map-sidebar-title:after{filter:invert(1)}.mh-dark-mode .mh-improved-favorite-setups-button{background:#424242;border:1px solid #5c5c5c;box-shadow:1px 1px 1px #535151}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .journal .content .journalbody .journaltext{font-size:11px}.mh-dark-mode .pageFrameView .pageSidebarView{margin-right:0;margin-left:10px;border-color:#242424}.mh-dark-mode .mh-improved-map-sidebar-goal-active{background-color:#383e49}
`;
}
});
var checkForDarkModeAndAddBodyClass, addDarkModeBodyClass, init61, dark_mode_tweaks_default, init_dark_mode_tweaks = __esm({
"src/modules/dark-mode-tweaks/index.js"() {
init_utils2();
init_styles58();
checkForDarkModeAndAddBodyClass = () => isDarkMode() ? (document.body.classList.add("mh-dark-mode"), !0) : !1, addDarkModeBodyClass = () => {
let added = checkForDarkModeAndAddBodyClass();
added || setTimeout(() => {
added = checkForDarkModeAndAddBodyClass(), added || setTimeout(() => {
checkForDarkModeAndAddBodyClass();
}, 1e3);
}, 500);
}, init61 = () => __async(void 0, null, function* () {
getSetting("native-dark-mode", !1) || (addStyles(styles_default57, "dark-mode"), addDarkModeBodyClass(), onNavigation(addDarkModeBodyClass), onRequest("*", addDarkModeBodyClass));
}), dark_mode_tweaks_default = {
id: "dark-mode",
name: "Dark Mode Updates & Tweaks (MHCT/Dark Mode Extension)",
type: "feature",
default: !0,
description: "Updates and tweaks to the MHCT/Dark Mode Extension dark mode.",
load: init61
};
}
});
var campToggle, init62, shield_goes_to_camp_default, init_shield_goes_to_camp = __esm({
"src/modules/shield-goes-to-camp/index.js"() {
init_utils2();
campToggle = () => {
let shield = document.querySelector(".mousehuntHud-shield");
shield && (getCurrentPage() === "camp" ? shield.setAttribute("onclick", "hg.utils.PageUtil.showHunterProfile()") : shield.setAttribute("onclick", 'hg.utils.PageUtil.setPage("camp")'));
}, init62 = () => __async(void 0, null, function* () {
onNavigation(campToggle);
}), shield_goes_to_camp_default = {
id: "shield-goes-to-camp",
name: "Shield Goes to Camp",
type: "feature",
default: !1,
description: "Click the shield to go to the Camp page if you\u2019re not already there, otherwise, it will take you to your Hunter Profile.",
load: init62
};
}
});
var styles_default58, init_styles59 = __esm({
"src/modules/inventory-only-open-multiple/styles.css"() {
styles_default58 = `.inventoryPage-item.convertible .inventoryPage-item-content-action input.button:first-of-type:not(:only-of-type){pointer-events:all;filter:grayscale(0)}.inventoryPage-item.convertible .inventoryPage-item-content-action input[data-item-action=all],.inventoryPage-item.convertible .inventoryPage-item-content-action input[data-item-action=single]{pointer-events:none;filter:grayscale(1)}.inventoryPage-item.convertible .inventoryPage-item-content-action input.allButOne{pointer-events:all;filter:none}.inventoryPage-item.convertible .inventoryPage-item-content-action input:first-of-type:not(:only-of-type),.inventoryPage-item.convertible .inventoryPage-item-content-action input.allButOne{pointer-events:none}
`;
}
});
var init63, inventory_only_open_multiple_default, init_inventory_only_open_multiple = __esm({
"src/modules/inventory-only-open-multiple/index.js"() {
init_utils2();
init_styles59();
init63 = () => __async(void 0, null, function* () {
addStyles(styles_default58, "only-open-multiple");
}), inventory_only_open_multiple_default = {
id: "only-open-multiple",
name: "Inventory - Only Open Extras",
type: "feature",
default: !1,
description: "Lock opening items in your inventory unless you have multiples of them.",
load: init63
};
}
});
var settings_default24, init_settings25 = __esm({
"src/modules/quick-send-supplies/settings/index.js"() {
init_utils2();
settings_default24 = () => __async(void 0, null, function* () {
let tradableItems = yield getTradableItems("type");
return tradableItems.unshift({ name: "None", value: "none" }, { seperator: !0 }), [{
id: "quick-send-supplies.items",
title: "Items shown in popup",
default: [
{
name: "SUPER|brie+",
value: "super_brie_cheese"
},
{
name: "Rare Map Dust",
value: "rare_map_dust_stat_item"
},
{
name: "Adorned Empyrean Jewel",
value: "floating_trap_upgrade_stat_item"
},
{
name: "Rift-torn Roots",
value: "rift_torn_roots_crafting_item"
}
],
settings: {
type: "multi-select",
number: 4,
options: tradableItems
}
}];
});
}
});
var styles_default59, init_styles60 = __esm({
"src/modules/quick-send-supplies/styles.css"() {
styles_default59 = `.userInteractionButtonsView-buttonGroup{position:relative}.quickSendWrapper{position:absolute;top:-50px;left:60px;z-index:10;display:none;min-width:130px;padding:7px 4px;font-size:10px;color:#000;text-align:center;background:#fff;border:2px solid #000;border-radius:10px;box-shadow:2px 3px 4px #666;transform:translate(-50%)}.treasureMapView-hunter-wrapper .quickSendWrapper{top:60px!important}.userInteractionButtonsView-buttonGroup:hover .quickSendWrapper,.quickSendWrapper:hover{display:block}.treasureMapView-hunter-wrapper:hover .quickSendWrapper{top:30px;display:block}.journal .entry .journaltext input.quickSendInput,.mousehuntPage-content input.quickSendInput,.quickSendInput{width:65px;padding:1px;font-size:12px;border:1px solid #000}.quickSendButton{cursor:pointer}.journal .entry a .quickSendWrapper img,.quickSendWrapper img{width:25px;height:auto;border:none}.quickSendGoWrapper{display:flex;align-items:center;justify-content:space-evenly}.itemsWrapper{display:flex;align-items:center;justify-content:center;margin-bottom:5px}.quickSendItemRadio{display:none}.quickSendItem{margin:0 2px;cursor:pointer;opacity:.5}.quickSendItem.selected{border-radius:10px;box-shadow:0 0 0 2px #fff,0 0 2px 4px #7dea7d;opacity:1}.quickSendItem:hover,.quickSendItem:focus{opacity:1}.quickSendItem:focus,.quickSendItem:hover img{transform:scale(1.3)}.quickSendItem.selected:focus,.quickSendItem.selected:hover img,.quickSendItem.selected:focus img{transform:scale(1)}.quickSendmessage{position:absolute;bottom:30px;display:inline-flex;align-items:center;padding:10px;pointer-events:none;background-color:#ffa;border-radius:3px;box-shadow:1px 1px 3px #000;opacity:0;transition:opacity .5s}.teamPage-memberRow-actions .quickSendButton.mousehuntActionButton.tiny{max-width:30px!important;margin:0}.mh-ui-quick-send-error,.mh-ui-quick-send-success{position:absolute;bottom:-30px}.friendsPage-community-hunterResult .quickSendWrapper{top:-55px;left:35px}
`;
}
});
var makeItem, makeSendSuppliesButton, main13, addToMapUsers, init64, quick_send_supplies_default, init_quick_send_supplies = __esm({
"src/modules/quick-send-supplies/index.js"() {
init_utils2();
init_settings25();
init_styles60();
makeItem = (name, type2, image, appendTo) => {
let item = makeElement("div", "quickSendItem");
item.title = name;
let itemImage = document.createElement("img");
itemImage.setAttribute("src", image), itemImage.setAttribute("alt", name);
let selected = makeElement("input", "quickSendItemRadio");
selected.setAttribute("type", "radio"), selected.setAttribute("name", "item"), selected.setAttribute("value", type2), selected.setAttribute("data-name", name), item.addEventListener("click", () => {
selected.checked = !0, document.querySelectorAll(".quickSendItem").forEach((i) => {
i.classList.remove("selected");
}), item.classList.add("selected");
}), item.append(selected), item.append(itemImage), appendTo.append(item);
}, makeSendSuppliesButton = (btn, snuid) => __async(void 0, null, function* () {
if (snuid === user.sn_user_id)
return !1;
btn.setAttribute("data-quick-send", "true");
let quickSendLinkWrapper = makeElement("form", ["quickSendWrapper", "hidden"]), itemsWrapper = makeElement("div", "itemsWrapper"), itemOptions = [
getSetting("quick-send-supplies.items-0", "super_brie_cheese"),
getSetting("quick-send-supplies.items-1", "rare_map_dust_stat_item"),
getSetting("quick-send-supplies.items-2", "floating_trap_upgrade_stat_item"),
getSetting("quick-send-supplies.items-3", "rift_torn_roots_crafting_item")
], allTradableItems = yield getTradableItems("all");
for (let item of itemOptions) {
let tradableItem = allTradableItems.find((i) => i.type === item);
tradableItem && makeItem(tradableItem.name, tradableItem.type, tradableItem.image, itemsWrapper);
}
quickSendLinkWrapper.append(itemsWrapper);
let quickSendGoWrapper = makeElement("div", "quickSendGoWrapper"), quickSendInput = makeElement("input", "quickSendInput");
quickSendInput.setAttribute("type", "number"), quickSendInput.setAttribute("placeholder", "Quantity"), quickSendInput.setAttribute("min", 0);
let quickSendButton = makeElement("div", ["quickSendButton", "mousehuntActionButton", "tiny"], "<span>Send</span>"), sendIt = () => __async(void 0, null, function* () {
if (quickSendButton.classList.contains("disabled"))
return;
let errorMessageOpts = {
message: "There was an error sending supplies",
append: quickSendGoWrapper,
classname: "mh-ui-quick-send-error"
}, qty = quickSendInput.value;
if (!qty) {
errorMessageOpts.message = "Quantity is required", showErrorMessage(errorMessageOpts);
return;
}
let selected = document.querySelector(".quickSendItem.selected");
if (!selected) {
errorMessageOpts.message = "Item is required", showErrorMessage(errorMessageOpts);
return;
}
let item = selected.querySelector(".quickSendItemRadio");
if (!item) {
errorMessageOpts.message = "Item is required", showErrorMessage(errorMessageOpts);
return;
}
quickSendButton.classList.add("disabled");
let itemType = item.getAttribute("value"), itemName = item.getAttribute("data-name"), url = `https://www.mousehuntgame.com/managers/ajax/users/supplytransfer.php?sn=Hitgrab&hg_is_ajax=1&receiver=${snuid}&uh=${user.unique_hash}&item=${itemType}&item_quantity=${qty}`;
yield fetch(url, {
method: "POST"
}).then((response) => {
response.status === 200 && (quickSendInput.value = "", quickSendButton.classList.remove("disabled"), showSuccessMessage({
message: `Sent ${qty} ${itemName}!`,
append: quickSendGoWrapper,
classname: "mh-ui-quick-send-success"
}));
}).catch(() => {
quickSendButton.classList.remove("disabled"), showErrorMessage({
message: "There was an error sending supplies",
append: quickSendGoWrapper,
classname: "mh-ui-quick-send-error"
});
});
});
return quickSendButton.addEventListener("click", sendIt), quickSendInput.addEventListener("keydown", (event) => {
event.key === "Enter" && sendIt();
}), quickSendInput.addEventListener("keydown", (event) => {
event.key === "Enter" && sendIt();
}), quickSendGoWrapper.append(quickSendInput), quickSendGoWrapper.append(quickSendButton), quickSendLinkWrapper.append(quickSendGoWrapper), quickSendLinkWrapper;
}), main13 = () => __async(void 0, null, function* () {
let sendSupplies = document.querySelectorAll(".userInteractionButtonsView-button.sendSupplies");
if (sendSupplies)
for (let btn of sendSupplies) {
if (btn.classList.contains("disabled") || btn.getAttribute("data-quick-send"))
return;
let snuid = btn.parentNode.parentNode.getAttribute("data-recipient-snuid");
if (!snuid)
return;
let quickSendLinkWrapper = yield makeSendSuppliesButton(btn, snuid);
quickSendLinkWrapper && (btn.parentNode ? btn.nextSibling ? btn.parentNode.insertBefore(quickSendLinkWrapper, btn.nextSibling) : btn.parentNode.append(quickSendLinkWrapper) : btn.append(quickSendLinkWrapper));
}
}), addToMapUsers = (attempts = 0) => __async(void 0, null, function* () {
let mapUsers = document.querySelectorAll(".treasureMapView-hunter-wrapper.mousehuntTooltipParent");
if (!mapUsers || !mapUsers.length) {
attempts < 10 && setTimeout(() => {
addToMapUsers(attempts + 1);
}, 500 * (attempts + 1));
return;
}
mapUsers.forEach((btn) => __async(void 0, null, function* () {
if (btn.getAttribute("data-quick-send"))
return;
let snuid = btn.getAttribute("data-snuid");
if (!snuid)
return;
let quickSendLinkWrapper = yield makeSendSuppliesButton(btn, snuid);
quickSendLinkWrapper && btn.append(quickSendLinkWrapper);
}));
}), init64 = () => __async(void 0, null, function* () {
addStyles(styles_default59, "quick-send-supplies"), main13(), onNavigation(main13), onRequest("*", () => {
setTimeout(main13, 500);
}), onEvent("profile_hover", main13), onDialogShow("map", addToMapUsers), onEvent("map_show_goals_tab_click", addToMapUsers), onEvent("map_tab_click", addToMapUsers);
}), quick_send_supplies_default = {
id: "quick-send-supplies",
name: "Quick Send Supplies",
type: "feature",
default: !0,
description: "Hover over the Send Supplies button on someone\u2019s profile or hover-profile to easily send any quantity of an item.",
load: init64,
settings: settings_default24
};
}
});
var settings_default25, init_settings26 = __esm({
"src/modules/lgs-reminder/settings/index.js"() {
settings_default25 = () => __async(void 0, null, function* () {
return [
{
id: "lgs-reminder.new-style",
title: 'Use "new" style'
},
{
id: "lgs-reminder.days-and-lower",
title: "Convert weeks and months to days"
}
];
});
}
});
var styles_default60, init_styles61 = __esm({
"src/modules/lgs-reminder/styles.css"() {
styles_default60 = `.mousehunt-improved-lgs-reminder,.default.mhui-custom-shield .mousehunt-improved-lgs-reminder{position:absolute;right:8px;bottom:4px;left:13px;z-index:1;font-size:11px;color:#684434;text-align:center;background-color:#ddcda2d9;border:1px solid #9d9a91;border-radius:5px}.default .mousehunt-improved-lgs-reminder{left:-5px}.default-fancy .mousehunt-improved-lgs-reminder{right:15px}.mousehuntHud-shield.color .mousehunt-improved-lgs-reminder{right:20px;left:0}.mhui-custom-shield .mousehunt-improved-lgs-reminder.exact{font-size:10px}.mousehunt-improved-lgs-reminder-new.lgs-warning,.mousehunt-improved-lgs-reminder.lgs-warning,.default.mhui-custom-shield .mousehunt-improved-lgs-reminder.lgs-warning{background-color:#ffbfbf}.mousehunt-improved-lgs-reminder-new.lgs-danger,.mousehunt-improved-lgs-reminder.lgs-danger,.default.mhui-custom-shield .mousehunt-improved-lgs-reminder.lgs-danger{color:#f1d7d7;background-color:#b32d26;border-color:#af8080;transition:1.75s;animation:mh-improved-fade-slightly 1.75s infinite}@media (prefers-reduced-motion: reduce){.mousehunt-improved-lgs-reminder-new.lgs-danger,.mousehunt-improved-lgs-reminder.lgs-danger,.default.mhui-custom-shield .mousehunt-improved-lgs-reminder-new.lgs-danger{animation:none}}.mousehunt-improved-lgs-reminder-wrapper{position:absolute;right:642px;bottom:0;left:15px;font-size:9px}.mousehunt-improved-lgs-reminder-new{display:flex;align-items:center;justify-content:center;padding:2px 5px;text-align:center;background:linear-gradient(#fff 45%,#f8e7bb 55%);border:1px solid #d4af37;border-bottom:none;border-radius:6px 6px 0 0}.mousehunt-improved-lgs-reminder-new.lgs-warning{background:linear-gradient(#fff,#ffbfbf)}.mousehunt-improved-lgs-reminder-new.lgs-danger{background:#b32d26;border:none}
`;
}
});
var isExact, getShieldEndDateTime, getShieldTime, getShieldTimeFormatted, updateLgsReminder, main14, setOffset, offset, init65, lgs_reminder_default2, init_lgs_reminder2 = __esm({
"src/modules/lgs-reminder/index.js"() {
init_utils2();
init_settings26();
init_styles61();
isExact = () => getSetting("lgs-reminder.show-seconds"), getShieldEndDateTime = () => {
let shieldExpiry = user.shield_expiry;
if (!shieldExpiry)
return new Date(Date.now() - 60 * 1e3);
let realExpiry = Date.parse(shieldExpiry) - offset;
return new Date(realExpiry);
}, getShieldTime = () => {
let expiry = getShieldEndDateTime();
return Math.floor(expiry - /* @__PURE__ */ new Date());
}, getShieldTimeFormatted = () => {
let time = getShieldTime();
if (!time)
return "";
let units = ["y", "mo", "w", "d", "h"];
return getSetting("lgs-reminder.days-and-lower") && (units = ["d", "h", "m"]), isExact() && units.push("s"), humanizer(time, {
round: !0,
units,
spacer: "",
delimiter: " "
});
}, updateLgsReminder = (el) => {
let time = getShieldTime();
time <= 60 * 60 * 24 * 2 && el.classList.add("lgs-warning"), time <= 60 * 60 && el.classList.add("lgs-danger"), el.innerText = getShieldTimeFormatted();
}, main14 = () => {
startingTime = getShieldTime();
let shieldEl = document.querySelector(".mousehuntHud-shield.golden");
if (!shieldEl)
return;
let newStyle = getSetting("lgs-reminder.new-style", !1), wrapper, reminder;
newStyle ? (wrapper = makeElement("div", "mousehunt-improved-lgs-reminder-wrapper"), reminder = makeElement("div", "mousehunt-improved-lgs-reminder-new")) : reminder = makeElement("div", "mousehunt-improved-lgs-reminder"), isExact() && reminder.classList.add("exact");
let endDate = getShieldEndDateTime().toLocaleDateString("en-US", {
weekday: "long",
year: "numeric",
month: "long",
day: "numeric",
hour: "numeric",
minute: "numeric",
second: "numeric"
});
if (reminder.title = `LGS Expires on ${endDate} (${getShieldTimeFormatted()} remaining)`, newStyle) {
let existing = document.querySelector(".mousehunt-improved-lgs-reminder-wrapper");
existing && existing.remove(), wrapper.append(reminder), shieldEl.after(wrapper);
} else {
let existing = document.querySelector(".mousehunt-improved-lgs-reminder");
existing && existing.remove(), shieldEl.append(reminder);
}
updateLgsReminder(reminder), document.addEventListener("horn-countdown-tick-minute", () => updateLgsReminder(reminder));
}, setOffset = () => {
let userShieldExpiry = new Date(Date.parse(user.shield_expiry)), userShieldSeconds = new Date((/* @__PURE__ */ new Date()).setSeconds((/* @__PURE__ */ new Date()).getSeconds() + user.shield_seconds)), difference = userShieldExpiry - userShieldSeconds;
offset = Math.round(difference / 1e3) * 1e3;
}, init65 = () => __async(void 0, null, function* () {
user.has_shield && (setOffset(), addStyles(styles_default60, "lgs-reminder"), main14(), onSettingsChange("lgs-reminder.new-style", () => {
[
".mousehunt-improved-lgs-reminder",
".mousehunt-improved-lgs-reminder-new",
".mousehunt-improved-lgs-reminder-wrapper"
].forEach((selector) => {
let el = document.querySelector(selector);
el && el.remove();
}), main14();
}), onActivation("lgs-reminder", main14), onDeactivation("lgs-reminder", () => {
let reminder = document.querySelector(".mousehunt-improved-lgs-reminder");
reminder && reminder.remove();
}));
}), lgs_reminder_default2 = {
id: "lgs-reminder",
name: `${getSetting("experiments.new-settings-styles-columns", !1) ? "LGS" : "Lucky Golden Shield"} Duration & Reminder`,
type: "feature",
description: "Show your LGS duration in the HUD and warn you when it\u2019s about to expire.",
default: !1,
load: init65,
settings: settings_default25
};
}
});
var styles_default61, init_styles62 = __esm({
"src/modules/inventory-lock-and-hide/styles.css"() {
styles_default61 = `.mhui-inventory-lock-and-hide-controls-wrapper{position:absolute;top:0;right:10px;display:flex;gap:10px}.mousehuntHud-page-tabContent.traps .mhui-inventory-lock-and-hide-controls-wrapper{top:-30px}.mhui-inventory-lock-and-hide-bulk-controls{display:none;gap:3px;margin-left:3px}.mhui-inventory-lock-and-hide-controls-active .mhui-inventory-lock-and-hide-bulk-controls{display:inline-flex}.inventoryPage-tagContent.mhui-inventory-lock-and-hide-controls-active{border-radius:5px;outline:3px solid #f37c7c}.mhui-inventory-lock-and-hide-item-controls{position:absolute;inset:0;display:none;flex-flow:row nowrap;align-items:flex-start;justify-content:space-evenly;background-color:#ffffff7f}.mhui-inventory-lock-and-hide-controls-active .mhui-inventory-lock-and-hide-item-controls{z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:flex-start}.mhui-inventory-lock-and-hide-controls-active .inventoryPage-item.hidden{display:inline-block}.mhui-inventory-lock-and-hide-controls-active .inventoryPage-item.hidden .inventoryPage-item-margin{background-color:#939393}.mhui-inventory-lock-and-hide-controls-active .inventoryPage-item.locked{display:inline-block}.mhui-inventory-lock-and-hide-controls-active .inventoryPage-item.locked .inventoryPage-item-margin{background-color:#ff7b00}.mhui-inventory-lock-and-hide-controls-active .locked.message_item.inventoryPage-item.small,.mhui-inventory-lock-and-hide-controls-active .locked.bait.inventoryPage-item.small{pointer-events:auto}.mhui-inventory-lock-and-hide-controls-active .tooltip{display:none;visibility:hidden;opacity:0}.locked .inventoryPage-item-content-action,.locked.message_item.inventoryPage-item.small .inventoryPage-item-button,.locked.bait.inventoryPage-item.small .inventoryPage-item-button,.locked .inventoryPage-item-recipeOptions,.locked .campPage-trap-itemBrowser-item-armButton,.locked .inventoryPage-item-imageContainer-action{pointer-events:none;filter:grayscale(1)}.locked.message_item.inventoryPage-item.small,.locked.bait.inventoryPage-item.small{pointer-events:none}.mousehuntHud-page-subTabContent.trinket .mousehuntHud-page-subTabContent-prefix{display:none}.inventoryPage-tagContent-tagTitle{display:flex;align-items:center;padding:0 5px 10px;margin:0;font-size:1.4em;border:none}span.inventoryPage-tagContent-tagTitle.tsitu-lock-convertible{top:-5px;right:110px;font-size:.75em}span.inventoryPage-tagContent-tagTitle.tsitu-lock-convertible button{padding:2px;font-size:1em}.mhui-inventory-lock-and-hide-hidden-count{margin-left:5px}.mhui-inventory-lock-and-hide-controls-lock{min-width:35px}.mhui-inventory-lock-and-hide-controls-hide{min-width:25px}.mhui-inventory-lock-and-hide-controls-active .inventoryPage-item.locked.hidden .inventoryPage-item-margin{background-color:#e78932}.mhui-inventory-lock-and-hide-controls-active .inventoryPage-item.locked .inventoryPage-item-recipeOptions li,.mhui-inventory-lock-and-hide-controls-active .inventoryPage-item.hidden .inventoryPage-item-recipeOptions li{opacity:.3}.mhui-inventory-lock-and-hide-controls-active .mhui-inventory-lock-and-hide-hidden-count{display:none}.search_match .campPage-trap-itemBrowser-item.loaded{display:block!important}
`;
}
});
var items2, itemSettings, getType, saveSettings, getSettings2, shouldAddLocks, addControlsToItems, updateGroupTitles, maybeLockOrHideItems, addBulkControls, getCurrentTabContainer, addLockAndHideControls, toggleControls, onSetPage, addHideStyles, hideItemsInTrapBrowser, main15, init66, inventory_lock_and_hide_default, init_inventory_lock_and_hide = __esm({
"src/modules/inventory-lock-and-hide/index.js"() {
init_utils2();
init_styles62();
itemSettings = {}, getType = (itemsToType) => __async(void 0, null, function* () {
return items2 || (items2 = yield getData("items")), itemsToType.map((item) => {
let foundItem = items2.find((i) => i.id === item);
return foundItem ? foundItem.type : void 0;
}).filter(Boolean);
}), saveSettings = (shouldUpdateTitles = !0) => __async(void 0, null, function* () {
itemSettings.locked = itemSettings.locked.map((i) => Number.parseInt(i, 10)), itemSettings.hidden = itemSettings.hidden.map((i) => Number.parseInt(i, 10)), itemSettings = {
locked: itemSettings.locked,
hidden: itemSettings.hidden,
lockedTypes: yield getType(itemSettings.locked),
hiddenTypes: yield getType(itemSettings.hidden)
}, saveSetting("inventory-lock-and-hide.items", itemSettings), shouldUpdateTitles && updateGroupTitles();
}), getSettings2 = () => getSetting("inventory-lock-and-hide.items", {
locked: [],
hidden: [],
lockedTypes: [],
hiddenTypes: []
}), shouldAddLocks = (currentTab) => currentTab !== "collectibles" || currentTab !== "bait", addControlsToItems = () => __async(void 0, null, function* () {
let itemsEl = document.querySelectorAll(".inventoryPage-item");
if (!itemsEl)
return;
let currentTab = getCurrentTab(), locked = (itemSettings == null ? void 0 : itemSettings.locked) || [], hidden = (itemSettings == null ? void 0 : itemSettings.hidden) || [];
itemsEl.forEach((item) => {
let id = item.getAttribute("data-item-id");
if (id = Number.parseInt(id, 10), !id || item.querySelector(".mhui-inventory-lock-and-hide-item-controls"))
return;
let isLocked = itemSettings != null && itemSettings.locked ? locked.includes(id) : !1, isHidden2 = itemSettings != null && itemSettings.hidden ? hidden.includes(id) : !1, controls = makeElement("div", "mhui-inventory-lock-and-hide-item-controls");
if (shouldAddLocks(currentTab)) {
let lock = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-lock"]), lockText = makeElement("span", "", isLocked ? "Unlock" : "Lock");
lock.append(lockText);
let clickLock = (e) => {
e.preventDefault(), e.stopPropagation(), isLocked ? (itemSettings.locked = itemSettings.locked.filter((i) => i !== id), lockText.innerText = "Lock", isLocked = !1, item.classList.remove("locked")) : (itemSettings.locked.push(id), lockText.innerText = "Unlock", isLocked = !0, item.classList.add("locked")), saveSettings();
};
lock.addEventListener("click", clickLock), controls.addEventListener("click", (e) => {
(e.altKey && e.shiftKey || e.metaKey) && clickLock(e);
}), controls.append(lock);
}
let hide = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-hide"]), hideText = makeElement("span", "", isHidden2 ? "Show" : "Hide");
hide.append(hideText);
let clickHide = (e) => {
e.preventDefault(), e.stopPropagation(), isHidden2 ? (itemSettings.hidden = itemSettings.hidden.filter((i) => i !== id), hideText.innerText = "Hide", isHidden2 = !1, item.classList.remove("hidden")) : (itemSettings.hidden.push(id), hideText.innerText = "Show", isHidden2 = !0, item.classList.add("hidden")), saveSettings();
};
hide.addEventListener("click", clickHide), controls.addEventListener("click", (e) => {
e.preventDefault(), e.stopPropagation(), e.altKey && !e.shiftKey && clickHide(e);
}), controls.append(hide), item.append(controls);
});
}), updateGroupTitles = () => {
let container = getCurrentTabContainer();
if (!container)
return;
let groups2 = container.querySelectorAll(".inventoryPage-tagContent-tagGroup");
groups2 && groups2.forEach((group) => {
let title = group.querySelector(".inventoryPage-tagContent-tagTitle");
if (!title)
return;
let hiddenItems = group.querySelectorAll(".inventoryPage-item.hidden");
if (!hiddenItems)
return;
let existingCount = title.querySelector(".mhui-inventory-lock-and-hide-hidden-count");
if (existingCount && existingCount.remove(), hiddenItems.length === 0)
return;
makeElement("span", "mhui-inventory-lock-and-hide-hidden-count", ` (${hiddenItems.length} hidden)`, title);
let listings = group.querySelectorAll(".inventoryPage-tagContent-listing .inventoryPage-item");
listings && listings.length === hiddenItems.length && group.classList.add("inventory-lock-and-hide-all-hidden");
});
}, maybeLockOrHideItems = () => __async(void 0, null, function* () {
var _a, _b, _c, _d;
let itemsEl = document.querySelectorAll(".inventoryPage-item");
if (itemsEl) {
for (let item of itemsEl) {
let id = item.getAttribute("data-item-id");
if (id = Number.parseInt(id, 10), !id)
return;
((_a = itemSettings == null ? void 0 : itemSettings.locked) == null ? void 0 : _a.length) > 0 && ((_b = itemSettings == null ? void 0 : itemSettings.locked) != null && _b.includes(id)) && item.classList.add("locked"), ((_c = itemSettings == null ? void 0 : itemSettings.hidden) == null ? void 0 : _c.length) > 0 && ((_d = itemSettings == null ? void 0 : itemSettings.hidden) != null && _d.includes(id)) && item.classList.add("hidden");
}
updateGroupTitles();
}
}), addBulkControls = () => {
if (!shouldAddLocks(getCurrentTab()))
return;
let container = getCurrentTabContainer();
if (!container)
return;
let groups2 = container.querySelectorAll(".inventoryPage-tagContent-tagGroup");
groups2 && groups2.forEach((group) => {
let title = group.querySelector(".inventoryPage-tagContent-tagTitle");
if (!title || title.querySelector(".mhui-inventory-lock-and-hide-bulk-controls"))
return;
let controls = makeElement("div", "mhui-inventory-lock-and-hide-bulk-controls"), lock = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-lock"]);
makeElement("span", "", "Lock All", lock), lock.addEventListener("click", (e) => {
e.preventDefault(), e.stopPropagation();
let itemsEl = group.querySelectorAll(".inventoryPage-item");
itemsEl && itemsEl.forEach((item) => {
let id = Number.parseInt(item.getAttribute("data-item-id"), 10);
if (id) {
itemSettings.locked.push(id), item.classList.add("locked");
let lockButtonText = item.parentElement.querySelector(".mhui-inventory-lock-and-hide-controls-lock span");
lockButtonText && (lockButtonText.innerText = "Unlock");
}
}), saveSettings(!1);
}), controls.append(lock);
let unlock = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-lock"]);
makeElement("span", "", "Unlock All", unlock), unlock.addEventListener("click", (e) => {
e.preventDefault(), e.stopPropagation();
let itemsEl = group.querySelectorAll(".inventoryPage-item");
itemsEl && itemsEl.forEach((item) => {
let id = Number.parseInt(item.getAttribute("data-item-id"), 10);
if (id) {
itemSettings.locked = itemSettings.locked.filter((i) => i !== id), item.classList.remove("locked");
let lockButtonText = item.parentElement.querySelector(".mhui-inventory-lock-and-hide-controls-lock span");
lockButtonText && (lockButtonText.innerText = "Lock");
}
}), saveSettings(!1);
}), controls.append(unlock);
let hide = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-hide"]);
makeElement("span", "", "Hide All", hide), hide.addEventListener("click", (e) => {
e.preventDefault(), e.stopPropagation();
let itemsEl = group.querySelectorAll(".inventoryPage-item");
itemsEl && itemsEl.forEach((item) => {
let id = Number.parseInt(item.getAttribute("data-item-id"), 10);
if (id) {
itemSettings.hidden.push(id), item.classList.add("hidden");
let hideButtonText = item.parentElement.querySelector(".mhui-inventory-lock-and-hide-controls-hide span");
hideButtonText && (hideButtonText.innerText = "Show");
}
}), saveSettings(!1);
}), controls.append(hide);
let show = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-hide"]);
makeElement("span", "", "Show All", show), show.addEventListener("click", (e) => {
e.preventDefault(), e.stopPropagation();
let itemsEl = group.querySelectorAll(".inventoryPage-item");
itemsEl && itemsEl.forEach((item) => {
let id = Number.parseInt(item.getAttribute("data-item-id"), 10);
if (id) {
itemSettings.hidden = itemSettings.hidden.filter((i) => i !== id), item.classList.remove("hidden");
let hideButtonText = item.parentElement.querySelector(".mhui-inventory-lock-and-hide-controls-hide span");
hideButtonText && (hideButtonText.innerText = "Hide");
}
}), saveSettings(!1);
}), controls.append(show), title.append(controls);
});
}, getCurrentTabContainer = () => {
let currentTab = getCurrentTab();
return (!currentTab || currentTab === "inventory") && (currentTab = "cheese"), document.querySelector(`.mousehuntHud-page-tabContent.${currentTab} .mousehuntHud-page-subTabContent.active`);
}, addLockAndHideControls = () => {
if (getCurrentPage() !== "inventory")
return;
let currentTab = getCurrentTab();
if ((!currentTab || currentTab === "inventory") && (currentTab = "cheese"), currentTab === "crafting" || currentTab === "plankrun")
return;
let container = getCurrentTabContainer();
if (!container || container.hasAttribute("mh-improved-inventory-lock-and-hide"))
return;
container.setAttribute("mh-improved-inventory-lock-and-hide", !0);
let controlsWrapper = makeElement("div", "mhui-inventory-lock-and-hide-controls-wrapper"), controls = makeElement("div", ["mousehuntActionButton", "tiny", "lightBlue", "mhui-inventory-lock-and-hide-controls"]), text = makeElement("span", "", "Toggle Lock/Hide");
controls.append(text);
let isEditing3 = !1;
controls.addEventListener("click", (e) => {
e.preventDefault(), e.stopPropagation(), addBulkControls(), addControlsToItems(), isEditing3 = !isEditing3, container.setAttribute("mhui-inventory-lock-and-hide-controls-active", isEditing3), container.classList.toggle("mhui-inventory-lock-and-hide-controls-active"), updateGroupTitles();
}), controlsWrapper.append(controls), container.prepend(controlsWrapper);
}, toggleControls = () => {
let button = document.querySelector(".mhui-inventory-lock-and-hide-controls");
button && button.click();
}, onSetPage = () => {
main15(), addEvent("ajax_request", main15, { removeAfterFire: !0, id: "inventory-lock-and-hide" });
}, addHideStyles = (theItems) => {
var _a;
if (!theItems || !theItems.components)
return;
let classifications = ["base", "weapon", "bait", "trinket"], tagsToHide = {
base: [],
weapon: [],
bait: [],
trinket: []
}, itemsByTags = {
base: {},
weapon: {},
bait: {},
trinket: {}
};
theItems.components.forEach((item) => {
!item.tag_types || !item.classification || classifications.includes(item.classification) && item.tag_types.forEach((tag) => {
itemsByTags[item.classification][tag] || (itemsByTags[item.classification][tag] = /* @__PURE__ */ new Set()), itemsByTags[item.classification][tag].add(item.item_id);
});
}), classifications.forEach((classification) => {
Object.keys(itemsByTags[classification]).forEach((tag) => {
[...itemsByTags[classification][tag]].every((id) => {
var _a2;
return (_a2 = itemSettings == null ? void 0 : itemSettings.hidden) == null ? void 0 : _a2.includes(id);
}) && tagsToHide[classification].push(tag);
});
});
let hideTagsStyles = classifications.flatMap(
(classification) => tagsToHide[classification].map((tag) => `.${classification} .campPage-trap-itemBrowser-tagGroup.${tag}`)
).join(","), hideItemsStyles = (_a = itemSettings == null ? void 0 : itemSettings.hidden) == null ? void 0 : _a.map((id) => `.campPage-trap-itemBrowser-items .campPage-trap-itemBrowser-item[data-item-id="${id}"]`).join(",");
addStyles(`${hideTagsStyles}, ${hideItemsStyles} { display: none; }`, "inventory-lock-and-hide-hide-styles");
}, hideItemsInTrapBrowser = () => {
var _a, _b;
if (itemSettings != null && itemSettings.hidden && ((_a = itemSettings == null ? void 0 : itemSettings.hidden) == null ? void 0 : _a.length) > 0) {
let hideItemsStyles = (_b = itemSettings == null ? void 0 : itemSettings.hidden) == null ? void 0 : _b.map((id) => `.campPage-trap-itemBrowser-items .campPage-trap-itemBrowser-item[data-item-id="${id}"]`).join(",");
addStyles(`${hideItemsStyles} { display: none; }`, "inventory-lock-and-hide-hide-styles");
}
}, main15 = () => __async(void 0, null, function* () {
itemSettings = getSettings2(), items2 = yield getData("items"), maybeLockOrHideItems(), addLockAndHideControls();
}), init66 = () => __async(void 0, null, function* () {
addStyles(styles_default61, "inventory-lock-and-hide"), itemSettings = getSettings2(), main15(), onNavigation(onSetPage, {
page: "inventory",
anyTab: !0,
anySubTab: !0
}), hideItemsInTrapBrowser(), onEvent("mh-improved-toggle-inventory-lock", () => {
toggleControls(), hideItemsInTrapBrowser();
}), onRequest("users/gettrapcomponents.php", addHideStyles);
}), inventory_lock_and_hide_default = {
id: "inventory-lock-and-hide",
name: "Inventory - Lock and Hide",
type: "feature",
default: !0,
description: "Lock and hide items in your inventory. Also hide items in the trap browser.",
load: init66
};
}
});
var inventory_open_all_default, init_inventory_open_all = __esm({
"src/modules/inventory-open-all/index.js"() {
init_utils2();
inventory_open_all_default = {
id: "open-all",
name: "Inventory - Open All",
type: "feature",
default: !0,
description: "Add an \u201COpen All\u201D button to convertible items in your inventory.",
load: initOpenButtons
};
}
});
var settings_default26, init_settings27 = __esm({
"src/modules/wisdom-in-stat-bar/settings/index.js"() {
settings_default26 = () => __async(void 0, null, function* () {
return [{
id: "wisdom-in-stat-bar-auto-refresh",
title: "Update automatically",
default: !0
}];
});
}
});
var getWisdomSetting, saveWisdomSetting, getWisdom, getWisdomFormatted, addWisdomToStatBar, updateWisdom, addRefreshListener, useCachedWisdom, legacyHudMenu, init67, wisdom_in_stat_bar_default, init_wisdom_in_stat_bar = __esm({
"src/modules/wisdom-in-stat-bar/index.js"() {
init_utils2();
init_settings27();
getWisdomSetting = (key) => __async(void 0, null, function* () {
return yield cacheGet(`wisdom-stat-${key}`);
}), saveWisdomSetting = (key, value) => {
cacheSet(`wisdom-stat-${key}`, value);
}, getWisdom = () => __async(void 0, null, function* () {
var _a;
let wisdom = 0;
if (useCachedWisdom) {
let cachedWisdom = yield getWisdomSetting("value");
if (cachedWisdom)
return cachedWisdom;
}
return wisdom = yield getUserItems(["wisdom_stat_item"], !0), wisdom = ((_a = wisdom[0]) == null ? void 0 : _a.quantity) || 0, saveWisdomSetting("value", wisdom), saveWisdomSetting("last-updated", Date.now()), wisdom;
}), getWisdomFormatted = () => __async(void 0, null, function* () {
return (yield getWisdom()).toLocaleString();
}), addWisdomToStatBar = (wisdom) => {
let existingWisdom = document.querySelector(".mousehuntHud-userStat-row.wisdom .hud_wisdom");
if (existingWisdom) {
existingWisdom.textContent = wisdom, typeof blinkText != "undefined" && blinkText(existingWisdom, "#59f659", "#fff", 0.7);
return;
}
let pointsRow = document.querySelector(legacyHudMenu ? ".headsup > div:nth-child(5) ul li:nth-child(2)" : ".mousehuntHud-userStat-row.points");
if (!pointsRow)
return;
let wisdomRow = makeElement(legacyHudMenu ? "li" : "div", ["mousehuntHud-userStat-row", "wisdom"]);
makeElement("span", legacyHudMenu ? "hudstatlabel" : "label", "Wisdom", wisdomRow), makeElement("span", legacyHudMenu ? "hudstatvalue hud_wisdom" : "value hud_wisdom", wisdom, wisdomRow), wisdomRow.setAttribute("title", "Click to refresh wisdom"), pointsRow.after(wisdomRow);
}, updateWisdom = () => __async(void 0, null, function* () {
let wisdom = yield getWisdomFormatted();
addWisdomToStatBar(wisdom);
}), addRefreshListener = () => {
let wisdomRow = document.querySelector(".mousehuntHud-userStat-row.wisdom");
wisdomRow && wisdomRow.addEventListener("click", () => {
let cachedWisdomSetting = useCachedWisdom;
useCachedWisdom = !1, updateWisdom(), useCachedWisdom = cachedWisdomSetting;
});
}, useCachedWisdom = !1, legacyHudMenu = !1, init67 = () => __async(void 0, null, function* () {
getSetting("wisdom-in-stat-bar.auto-refresh", !0) && (useCachedWisdom = !1, onTurn(updateWisdom));
let legacyMenu = getSetting("legacy-hud.menu", !1), legacyHud = getSetting("legacy-hud.stats", !1);
legacyHudMenu = getSetting("legacy-hud", !1) && (legacyHud || legacyMenu === legacyHud) || isLegacyHUD(), yield updateWisdom(), addRefreshListener(), onDeactivation(() => {
let wisdomRow = document.querySelector(".mousehuntHud-userStat-row.wisdom");
wisdomRow && wisdomRow.remove();
});
}), wisdom_in_stat_bar_default = {
id: "wisdom-in-stat-bar",
name: "Wisdom in Stat Bar",
type: "feature",
default: !1,
description: "Show wisdom in the stat bar.",
load: init67,
settings: settings_default26
};
}
});
var imperialToMetric, convertInDialog, replaceInJournal, replaceOnMousePage, convertOnPage, init68, metric_default, init_metric = __esm({
"src/modules/metric/index.js"() {
init_utils2();
imperialToMetric = (text) => {
let lb = text.match(/(\d+? )lb./i), oz = text.match(/(\d+? )oz./i);
if (!(lb || oz))
return text;
let lbValue = lb ? lb[1] : 0, ozValue = oz ? oz[1] : 0, totalWeight = Number.parseInt(lbValue) + Number.parseInt(ozValue) / 16, totalWeightMetric = (Math.round(totalWeight * 0.45359237 * 100) / 100).toString();
return text.replace(/(\d+? lb.\s)?(\d+? oz.)/i, totalWeightMetric + " kg. ");
}, convertInDialog = () => {
let mouseViewWeights = document.querySelectorAll(".mouseView-statsContainer .mouseView-statsContainer-block-padding table tbody tr");
mouseViewWeights.length && mouseViewWeights.forEach((row) => {
let firstCell = row.querySelector("td"), secondCell = firstCell.nextSibling;
if (firstCell.innerText === "Avg. Weight:" || firstCell.innerText === "Heaviest:") {
let converted = imperialToMetric(secondCell.innerText);
converted && (secondCell.innerText = converted);
}
});
}, replaceInJournal = () => {
let entries = document.querySelectorAll(".journal .entry .journalbody .journaltext");
entries.length && entries.forEach((entry) => {
let converted = imperialToMetric(entry.innerHTML);
converted && (entry.innerHTML = converted);
});
}, replaceOnMousePage = () => {
let mouseWeightsStats = document.querySelectorAll(".mouseListView-categoryContent-subgroupContainer .mouseListView-categoryContent-subgroup-mouse-stats");
mouseWeightsStats.length && mouseWeightsStats.forEach((stat) => {
if (stat.classList.contains("average_weight") || stat.classList.contains("heaviest_catch")) {
let converted = imperialToMetric(stat.innerText);
converted && (stat.innerText = converted);
}
});
}, convertOnPage = () => {
replaceOnMousePage(), replaceInJournal();
}, init68 = () => __async(void 0, null, function* () {
onDialogShow("all", convertInDialog), onRequest("*", convertOnPage), convertOnPage();
}), metric_default = {
id: "metric",
name: "Metric Units",
type: "feature",
default: !1,
description: "Use metric units instead of imperial units.",
load: init68
};
}
});
var settings_default27, init_settings28 = __esm({
"src/modules/better-marketplace/settings/index.js"() {
settings_default27 = () => __async(void 0, null, function* () {
return [
{
id: "better-marketplace.search-all",
title: "Default to showing all items in search",
default: !1
},
{
id: "better-marketplace.small-images",
title: "Smaller images",
default: !1
}
];
});
}
});
var small_images_default, init_small_images = __esm({
"src/modules/better-marketplace/small-images.css"() {
small_images_default = `.marketplaceView-table-image .marketplaceView-itemImage{width:40px;height:40px;min-height:unset}
`;
}
});
var styles_default62, init_styles63 = __esm({
"src/modules/better-marketplace/styles.css"() {
styles_default62 = `div#select2-drop.marketplaceView-header-search-dropdown .select2-result-label{white-space:nowrap}div#select2-drop.marketplaceView-header-search-dropdown .select2-result-sub .select2-result-label{display:grid;grid-template-columns:30px 4fr 1fr;place-items:center start;padding-left:1px}div#select2-drop.marketplaceView-header-search-dropdown .friendsPage-filter-environment-thumb{width:25px;height:25px;border-radius:0;box-shadow:none}.marketplaceView-item-quickListings .marketplaceView-table-listing-quantity:hover,.marketplaceView-item-quickListings .marketplaceView-table-listing-quantity:focus{text-decoration:underline}a.marketplaceView-goldValue.marketplaceView-quantityNotGold:after{display:none;background-image:none}label.mhui-marketplace-search-toggle{display:flex;align-items:center;justify-content:center;font-size:9px;color:#fff;border-radius:10px}.marketplaceView-header-searchContainer{top:5px;right:30px!important;height:70px}.marketplaceView-header-search-title{margin-bottom:2px}.marketplaceView-item-leftBlock{margin-top:20px}.marketplaceView-itemImage .limitedEdition{display:none}.marketplaceHome-blockItem.small .marketplaceView-itemImage{width:70px;height:70px;padding-bottom:0;margin-bottom:10px}.marketplaceHome-blockItem.small .marketplaceView-item-imageContainer{width:auto}.marketplaceView-favouriteButton{top:-4px;bottom:unset}.marketplaceHome-blockItem.small .marketplaceView-favouriteButton{top:-14px;right:5px}.marketplaceHome-blockItem.small .marketplaceView-favouriteButton:hover{right:3px;bottom:-6px}.marketplaceView-item-imageContainer .marketplaceView-favouriteButton:hover,.marketplaceView-table-image .marketplaceView-favouriteButton:hover{right:1px;bottom:-4px;border:none;outline:2px solid #ccc}.marketplaceHome-block.favourites .marketplaceView-favouriteButton:hover{right:5px;bottom:-4px;border:none;outline:2px solid #ccc}.marketplaceView-item-imageContainer:hover .marketplaceView-favouriteButton.disabled{display:none}tr.open td.marketplaceView-table-name{white-space:nowrap}.marketplaceListing .marketplaceView-itemImage.favourite{border:none;box-shadow:none}.marketplaceView-item h1{display:flex;align-items:center;justify-content:flex-start}.mh-improved-marketplace-item-title-actions{display:inline-flex;flex-grow:1;gap:5px;justify-content:end;margin-right:5px}.marketplaceView-item.view .mousehuntCharacterGuideBox .mousehuntCharacterGuideBox-content{margin-left:80px}.marketplaceView-item-averagePrice,.marketplaceView-item-averagePrice span{font-size:12px}.marketplaceView-table-chartImage{position:absolute;top:0;right:-30px;bottom:0;height:49px;opacity:.5}.marketplaceView-table-name:hover .marketplaceView-table-chartImage{opacity:1}td.marketplaceView-table-name{position:relative}.marketplaceView-header-search-dropdown .select2-search{margin-top:5px}.marketplaceHome-block-statTitle{display:flex;gap:3px;align-items:center}.marketplaceHome-block-statTitle .marketplaceHome-block-viewAll{top:unset;display:block;vertical-align:middle}.marketplaceView h1{border:none}.marketplaceView-browse-filter label{display:flex;align-items:center}.marketplaceView-item-rightBlock .mousehuntCharacterGuideBox-content li{background-position-y:-2px}.marketplaceView-item-input input{padding:4px}.marketplaceView-itemImage.favourite{box-shadow:none}.marketplaceView-table tr.empty{background:#f9f9f9!important}.marketplaceView-browse-sidebar-link:hover{padding-right:9px;margin-right:1px}.marketplaceView-browse-sidebar-link{border-top-left-radius:11px;border-bottom-left-radius:11px}.marketplaceHome-block-viewAll{border-color:#000}#markethuntInfobox #infoboxSbPrice{margin-right:4px}.marketplaceHome-blockItem-status.recommended{background-image:url(https://i.mouse.rip/mp/recommended.png)}.marketplaceHome-blockItem-status.expensive{background-image:url(https://i.mouse.rip/mp/high_value.png)}.marketplaceView-trendIcon.up{background-image:url(https://i.mouse.rip/mp/price_up.png)}.marketplaceView-trendIcon.rising{background-image:url(https://i.mouse.rip/mp/price_rising.png)}.marketplaceView-header-search-dropdown{width:225px!important}.marketplaceView-header-search-dropdown .select2-results{width:210px}.marketplaceView-header-search-dropdown .select2-result-unselectable.select2-disabled{display:none}
`;
}
});
var initSearch, modifySearch, waitForSearchReady, autocloseClaim, getLinkMarkup4, _originalShowItem, overloadShowItem, waitForFooterReady, addChartToCategories, _showBrowseCategory, _showBrowser, replaceShowBrowseCategory, originalSelect, newSelect, init69, better_marketplace_default, init_better_marketplace = __esm({
"src/modules/better-marketplace/index.js"() {
init_utils2();
init_settings28();
init_small_images();
init_styles63();
initSearch = (searchInputDOM) => {
let blankOpt = document.createElement("option");
blankOpt.value = "", blankOpt.text = "", blankOpt.disabled = !0, blankOpt.selected = !0, blankOpt.hidden = !0, searchInputDOM.prepend(blankOpt), searchInputDOM = $(".marketplaceView-header-search"), searchInputDOM.select2({
formatResult: hg.views.MarketplaceView.formatSelect2Result,
formatSelection: hg.views.MarketplaceView.formatSelect2Result,
dropdownAutoWidth: !1,
placeholder: "Search for items\u2026",
minimumInputLength: 0,
dropdownCssClass: "marketplaceView-header-search-dropdown",
width: "resolve"
}).on("change", () => {
!searchInputDOM.prop("disabled") && searchInputDOM.val() && hg.views.MarketplaceView.showItem(
searchInputDOM.val(),
"view",
!1,
!1,
!0
);
});
}, modifySearch = (opts) => __async(void 0, null, function* () {
let searchContainer = document.querySelector(".marketplaceView-header-searchContainer");
if (!searchContainer)
return;
let searchInputDOM = $(".marketplaceView-header-search");
searchInputDOM.select2("destroy"), originalSelect === null && (originalSelect = document.querySelector(".marketplaceView-header-search").cloneNode(!0), originalSelect.classList.remove("marketplaceView-header-search"));
let itemsToRemove = yield getData("marketplace-hidden-items");
if (opts.forEach((opt) => {
(!opt.value || opt.value === "" || itemsToRemove.some((item) => item.id === opt.value || item.name === opt.text)) && opt.remove();
}), initSearch(searchInputDOM), newSelect = document.querySelector("select.marketplaceView-header-search"), !newSelect)
return;
let toggleSearch = makeElement("input", "mhui-marketplace-search-toggle");
toggleSearch.setAttribute("type", "checkbox");
let label = makeElement("label", "mhui-marketplace-search-toggle");
label.setAttribute("for", "mhui-marketplace-search-toggle"), label.append(toggleSearch), label.append(document.createTextNode("Search all items"));
let defaultToAll = getSetting("better-marketplace.search-all");
toggleSearch.checked = defaultToAll, defaultToAll && (newSelect.innerHTML = originalSelect.innerHTML, newSelect.value = originalSelect.value), label.addEventListener("click", () => {
toggleSearch.checked = !toggleSearch.checked, toggleSearch.dispatchEvent(new Event("change"));
}), toggleSearch.addEventListener("change", () => {
searchInputDOM = $(".marketplaceView-header-search"), searchInputDOM.select2("destroy");
let currentOpts = document.querySelector(".marketplaceView-header-search");
toggleSearch.checked ? (currentOpts.innerHTML = originalSelect.innerHTML, currentOpts.value = originalSelect.value) : (currentOpts.innerHTML = newSelect.innerHTML, currentOpts.value = newSelect.value), initSearch(searchInputDOM);
}), searchContainer.append(label);
}), waitForSearchReady = (attempts = 0) => {
let opts = document.querySelectorAll(".marketplaceView-header-search option"), timeoutPending = !1;
if (opts.length === 0) {
attempts < 10 && (timeoutPending = setTimeout(() => waitForSearchReady(attempts + 1), 300));
return;
}
timeoutPending && clearTimeout(timeoutPending), setTimeout(() => {
modifySearch(opts);
}, 300);
}, autocloseClaim = (resp) => {
var _a, _b;
if (!(resp && resp.success))
return;
let journalEntry = (_b = (_a = resp == null ? void 0 : resp.journal_markup[0]) == null ? void 0 : _a.render_data) == null ? void 0 : _b.css_class;
!journalEntry || journalEntry === "" || (journalEntry.includes("marketplace_claim_listing") || journalEntry.includes("marketplace_complete_listing") || journalEntry.includes("marketplace_cancel_listing")) && setTimeout(() => hg.views.MarketplaceView.hideDialog(), 0);
}, getLinkMarkup4 = (name, id) => makeLink("MHCT", `https://api.mouse.rip/mhct-redirect-item/${id}`, !0) + makeLink("Wiki", `https://mhwiki.hitgrab.com/wiki/index.php/${encodeURIComponent(name.replaceAll(" ", "_"))}`, !0), _originalShowItem = null, overloadShowItem = () => {
_originalShowItem || (_originalShowItem = hg.views.MarketplaceView.showItem, hg.views.MarketplaceView.showItem = (itemId, action, defaultQuantity, defaultUnitPriceWithTariff, force) => {
let actionButton = document.querySelector(".marketplaceView-item-actionType .marketplaceView-listingType");
actionButton && actionButton.addEventListener("click", () => {
let actionType = actionButton.classList.contains("buy") ? "sell" : "buy";
_originalShowItem(itemId, actionType, defaultQuantity, defaultUnitPriceWithTariff, force);
}), _originalShowItem(itemId, action, defaultQuantity, defaultUnitPriceWithTariff, force);
let actions = document.querySelector(".marketplaceView-item-titleActions");
if (!actions)
return;
let existing = document.querySelector(".mh-improved-marketplace-item-title-actions");
existing && existing.remove();
let itemName = document.querySelector(".marketplaceView-item-titleName");
itemName = itemName ? itemName.textContent.trim() : "";
let buttons = makeElement("div", "mh-improved-marketplace-item-title-actions", getLinkMarkup4(itemName, itemId));
actions.insertBefore(buttons, actions.firstChild);
});
}, waitForFooterReady = (attempts = 0) => {
let opts = document.querySelectorAll(".marketplaceView-table-listing-quantity"), timeoutPending = !1;
if (!(opts && opts.length > 0)) {
attempts < 10 && (timeoutPending = setTimeout(() => updateQuantityButtons(attempts + 1), 300));
return;
}
timeoutPending && clearTimeout(timeoutPending), setTimeout(() => {
opts.forEach((order) => {
order.addEventListener("click", () => {
let quantity = order.innerHTML, brIndex = quantity.indexOf("<br>");
quantity = Number.parseInt(brIndex === -1 ? quantity.trim() : quantity.slice(0, Math.max(0, brIndex)).trim(), 10), !(!quantity || Number.isNaN(quantity)) && hg.views.MarketplaceView.setOrderQuantity(quantity);
});
});
}, 300);
}, addChartToCategories = () => __async(void 0, null, function* () {
document.querySelectorAll(".marketplaceView-table tr").forEach((item) => {
let itemId = item.getAttribute("data-item-id");
if (!itemId)
return;
let name = item.querySelector(".marketplaceView-table-name");
if (!name || item.querySelector(".marketplaceView-table-chartImage"))
return;
let chartImage = makeElement("img", "marketplaceView-table-chartImage");
chartImage.src = `https://markethunt-chart.mouse.rip/${itemId}.png?small`, name.append(chartImage);
});
}), _showBrowseCategory = null, _showBrowser = null, replaceShowBrowseCategory = () => {
_showBrowseCategory || (_showBrowseCategory = hg.views.MarketplaceView.showBrowseCategory, hg.views.MarketplaceView.showBrowseCategory = (category) => {
_showBrowseCategory(category), addChartToCategories();
}, _showBrowser = hg.views.MarketplaceView.showBrowser, hg.views.MarketplaceView.showBrowser = (category) => {
_showBrowser(category), addChartToCategories();
});
}, originalSelect = null, newSelect = null, init69 = () => __async(void 0, null, function* () {
addStyles([
styles_default62,
getSetting("better-marketplace.small-images") ? small_images_default : ""
], "better-marketplace"), onOverlayChange({
marketplace: {
/**
* Run when the marketplace is shown.
*/
show: () => {
waitForSearchReady(), overloadShowItem(), getSetting("better-marketplace.show-chart-images") && replaceShowBrowseCategory();
}
}
}), onRequest("users/marketplace.php", autocloseClaim), onRequest("users/marketplace.php", waitForFooterReady, !0);
}), better_marketplace_default = {
id: "better-marketplace",
name: "Better Marketplace",
type: "better",
default: !0,
description: "Update the styles, and add small features like toggling between \u201CBuying\u201D and \u201CSelling\u201D by clicking the text.",
load: init69,
settings: settings_default27
};
}
});
var settings_default28, init_settings29 = __esm({
"src/modules/better-gifts/settings/index.js"() {
settings_default28 = () => __async(void 0, null, function* () {
let orderOptions = [
{
name: "Newest to Oldest",
value: "default"
},
{
name: "Oldest to Newest",
value: "reverse"
}
], skipBadGiftOptions = [
{
name: "Skip all non-GOTD gifts",
value: "skip"
},
{
name: "Don't skip any gifts",
value: "no-skip"
},
{
seperator: !0
},
{
name: "Skip Mozzarella Cheese only",
value: "mozzarella"
},
{
name: "Skip Stale Cheese only",
value: "stale"
},
{
name: "Skip Radioactive Sludge only",
value: "sludge"
},
{
name: "Skip Mozz. Cheese & Stale Cheese",
value: "mozzarella-stale"
},
{
name: "Skip Mozz. Cheese & Radioactive Sludge",
value: "mozzarella-sludge"
},
{
name: "Skip Stale Cheese & Radioactive Sludge",
value: "stale-sludge"
}
];
return [
{
id: "better-gifts.send-order",
title: "Order to accept/send",
default: [orderOptions[0]],
description: "",
settings: {
type: "multi-select",
number: 1,
options: orderOptions
}
},
{
id: "better-gifts.ignore-bad-gifts",
title: "Ignore gifts",
default: [skipBadGiftOptions[0]],
description: "",
settings: {
type: "multi-select",
number: 1,
options: skipBadGiftOptions
}
}
];
});
}
});
var styles_default63, init_styles64 = __esm({
"src/modules/better-gifts/styles.css"() {
styles_default63 = `.giftSelectorView-giftContainer .giftSelectorView-gift.gift_of_the_day{width:20%}#bulk-gifting-gift-buttons{position:relative;display:flex;justify-content:flex-end;margin-bottom:10px}#bulk-gifting-gift-buttons .mh-gift-button{font-weight:400}#bulk-gifting-gift-buttons .mh-gift-buttons-accept{margin-right:5px}#bulk-gifting-gift-buttons .mh-gift-buttons-paid-gifts{margin-right:10px}.giftSelectorView-inbox-giftContainer{height:auto;min-height:300px;max-height:75vh}.giftSelectorView-inbox-giftRow.complete{height:25px;padding-top:5px;padding-left:15px;border:none;box-shadow:none}.giftSelectorView-inbox-giftRow.complete .giftSelectorView-inbox-gift-thumb{display:inline}.giftSelectorView-inbox-giftRow.complete .itemImage{display:inline-block;width:25px;height:25px}.giftSelectorView-inbox-giftRow.complete .giftSelectorView-inbox-gift-details{width:90%}.mh-gift-buttons-send-random,.mh-gift-buttons-send-faves{margin-top:-2px;margin-left:10px}.giftSelectorView-gift.sendable.gift.gift_of_the_day{flex:1}.giftSelectorView-gift .giftSelectorView-gift-padding{min-width:75px;border:1px solid #dcdcdc;box-shadow:none}.giftSelectorView-gift.gift_of_the_day .giftSelectorView-gift-padding{background-color:#a5e3ff}.giftSelectorView-scroller.giftSelectorView-giftContainer{display:flex;flex-wrap:wrap;justify-content:space-around}.giftSelectorView-gift.gift_of_the_day:hover .giftSelectorView-gift-padding{background-color:#0090ff}.giftSelectorView-friend.complete .giftSelectorView-friend-padding:before{bottom:9px;left:10px;z-index:1;filter:drop-shadow(0 0 3px #b9ff5d) drop-shadow(1px 1px 4px #b9ff5d) drop-shadow(-1px -1px 3px #b9ff5d)}.mh-gift-buttons-clone-wrapper{scrollbar-color:#938f83 #e9e1c6;max-height:calc(75vh - 175px);overflow-y:auto}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift-description{display:flex;flex-direction:column-reverse;align-items:stretch}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift-padding{min-width:unset;padding:0 2px;margin:0;border:none}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift-name{height:unset}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift-name span{padding:5px}.mh-gift-buttons-clone-wrapper .giftSelectorView-content-leftBar-highlightBlock{padding:5px;margin:0 5px 0 10px;background-color:transparent}.mh-gift-buttons-clone-wrapper .giftSelectorView-friendRow-returnCost{bottom:3px}.giftSelectorView-content-leftBar>.giftSelectorView-content-leftBar-highlightBlock:before{position:absolute;inset:0;z-index:1;content:"";border-radius:10px 0 0 10px;box-shadow:-1px 4px 4px -3px #666}.giftSelectorView-content-leftBar>.giftSelectorView-content-leftBar-highlightBlock{position:relative}.giftSelectorView-friend.complete .giftSelectorView-friend-padding:after,.mh-gift-buttons-clone-wrapper .giftSelectorView-gift.gift_of_the_day .giftSelectorView-gift-padding:after{display:none}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift.gift_of_the_day .giftSelectorView-gift-padding{color:#000;background-color:#fff}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift.gift_of_the_day:hover .giftSelectorView-gift-padding{background-color:#a5e3ff}.giftSelectorView-friend-group-title{padding:3px;font-size:11px}.giftSelectorView-friend-padding,.giftSelectorView-confirmPopup-block-actionItem .giftSelectorView-friend:hover .giftSelectorView-friend-padding{border-radius:0}.giftSelectorView-friend .giftSelectorView-friend-padding{display:flex;align-items:center;height:35px}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift .itemImage{width:50px;height:50px;margin-bottom:5px}.giftSelectorView-gift .itemImage{width:80px;height:80px}.giftSelectorView-friend-name{display:flex;flex-flow:column;align-items:flex-start;justify-content:flex-start;width:unset;height:unset;padding:0 3px;line-height:1.1}.giftSelectorView-friend-name span{display:block}#bulk-gifting-gift-buttons.mh-gift-buttons-send-popup{margin-bottom:0}.giftSelectorView-tabContentContainer .giftSelectorView-tabContent.active .giftSelectorView-actionContainer{display:flex;align-items:center;justify-content:flex-end}#bulk-gifting-gift-buttons.mh-gift-buttons-send-popup button{padding:6px;font-size:12px}a.mousehuntActionButton.giftSelectorView-action-confirm span{display:block;width:auto;min-width:80px}.giftSelectorView-friendRow-returnImage:hover{margin-top:-10px;margin-right:10px;margin-left:0;border:none}.giftSelectorView-claimableGift{min-height:100px}.giftSelectorView-claimableGift.accordion_disabled:after,.giftSelectorView-claimableGift.expanded:after{box-shadow:none}.giftSelectorView-claimableGift.accordion_disabled,.giftSelectorView-claimableGift.expanded{padding:5px;margin-bottom:11px;border:1px solid #ccc;border-radius:3px}.giftSelectorView-claimableGift-title-itemName{font-size:13px}.giftSelectorView-content-subtitle{display:inline-block;width:auto;border-bottom:none}.giftSelectorView-inboxGiftOfTheDay{padding:5px 0;border-color:#d1d0cf}.giftSelectorView-inbox-giftRow.paidgift{background-color:#fff08c;border:none}.giftSelectorView-inbox-gift-details .giftSelectorView-inbox-gift-sent{padding-top:3px}.giftSelectorView-inbox-giftRow{display:flex;align-items:center;justify-content:space-between;min-height:40px}.giftSelectorView-inbox-gift-details{flex:1;width:auto;margin:0 0 0 10px}.giftSelectorView-inbox-giftRow.paidgift .giftSelectorView-inbox-gift-actions{padding-bottom:0}.giftSelectorView-inboxGiftOfTheDay-label{margin-right:5px}.giftSelectorView-inboxGiftOfTheDay-gift{font-size:12px}.giftSelectorView-inboxGiftOfTheDay-gift abbr{text-decoration:none;vertical-align:middle}.paidgift a.giftSelectorView-friendRow-action.return{text-indent:-70px}.giftSelectorView-friendRow-returnQuantity{width:30px}.giftSelectorView-gift.paidgift .giftSelectorView-gift-padding{box-shadow:0 0 1px #000 inset}.giftSelectorView-tabContent.hasSidebar .giftSelectorView-content-rightBar{border-bottom-left-radius:10px}.giftSelectorView-friendRow-sender{position:relative}.giftSelectorView-friendRow:hover{padding-bottom:5px;margin-bottom:7px;border-top-left-radius:0;border-bottom-left-radius:0;outline:1px solid #dfdfdf;box-shadow:none}.giftSelectorView-friend-image{top:-7px;left:-7px;width:33px;height:33px;border:1px solid #bdbdbd}.giftSelectorView-friend-image.paidgift{top:-11px;width:31px;height:31px}#giftSelectorView-inbox{border:1px solid #d1d0cf;box-shadow:0 3px 6px -3px #000}.giftSelectorView-inbox-footer-viewMore a{position:relative;font-weight:400;line-height:24px;text-shadow:0 0 1px #fff;background:none;border:none;border-radius:3px;box-shadow:none}.giftSelectorView-inbox-footer-viewMore{position:absolute;right:10px;width:135px;padding:0;font-size:12px;font-weight:700;line-height:30px;color:#000!important;text-align:center;background:#b3edff;border:1px solid #50549c;border-radius:5px;box-shadow:1px 1px 1px #eee}.giftSelectorView-inbox-footer-viewMore:hover{background-color:#b3f4ff;border-color:#000;box-shadow:0 0 5px #fff inset,1px 1px 1px #fff}.giftSelectorView-inbox-footer-viewMore:before{position:absolute;inset:40% 0 0;content:"";background:#b2e2ff;border-radius:5px;box-shadow:0 0 10px #7bf inset}.giftSelectorView-inbox-footer-viewMore:before:hover{background-color:#a5e2ff;box-shadow:0 0 10px #f0f4f7 inset}.giftSelectorView-inbox-footer{padding-bottom:18px;border-width:1px}.giftSelectorView-inbox-giftContainer .mousehuntActionButton.return.disabled,.giftSelectorView-inbox-giftContainer .mousehuntActionButton.claim.disabled{opacity:.5}.giftSelectorView-inbox-giftContainer .mousehuntActionButton.return.disabled:hover,.giftSelectorView-inbox-giftContainer .mousehuntActionButton.claim.disabled:hover{opacity:1}.giftSelectorView-friendRow-action.ignore{outline:1px solid #ededed;box-shadow:none}.giftSelectorView-friendRow-action.ignore:hover{background-color:#eee;outline-color:#c6c6c6}.giftSelectorView-friendRow-action.claim,.giftSelectorView-friendRow-action.return{box-sizing:border-box;outline:1px solid #e7e7e7}.mh-dark .giftSelectorView-friendRow-action.claim,.mh-dark .giftSelectorView-friendRow-action.return{outline:1px solid var(--d)}.giftSelectorView-friendRow-action.claim:hover,.giftSelectorView-friendRow-action.return:hover{box-shadow:0 0 1px #000 inset,0 -1px 1px #fff inset}.giftSelectorView-friendRow.new .giftSelectorView-friend-image:after{top:-4px;left:-4px;border-radius:4px;box-shadow:none}.mh-dark-mode #giftSelectorView-inbox,.mh-dark-mode .giftSelectorView-inboxGiftOfTheDay{border-color:#424242}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-statsContainer:hover{background-color:#494949}.complete .giftSelectorView-inbox-gift-details{margin-right:150px;margin-left:0}.giftSelectorView-inbox-footer-label{margin-top:-30px;text-align:left}#overlayPopup.giftSelectorViewPopup #jsDialogClose{z-index:10}.giftSelectorView-friend-search{right:-5px;display:inline-block;width:auto}.giftSelectorView-friend-search-label{display:none}input.giftSelectorView-friend-search-input{max-width:130px}.giftSelectorView-content-viewState.selectFriends{position:relative}.giftSelectorView-tabContent[data-tab=friends] .giftSelectorView-content-viewState .giftSelectorView-friend-search{position:absolute;top:-30px;right:2px}.giftSelectorView-friend-group.favorite .giftSelectorView-friend-group-title{display:none}.giftSelectorView-hiddenFriendsContainer{margin-right:2px}.giftSelectorView-tabContent[data-tab=friends] .giftSelectorView-content-rightBar-padding{padding-bottom:0}.giftSelectorView-friend.favorite:hover .giftSelectorView-friend-padding,.giftSelectorView-friend:hover .giftSelectorView-friend-padding{color:#fff;background-color:#0090ff;box-shadow:none}.giftSelectorView-friend:hover{text-decoration:none}.giftSelectorView-friend.favorite .giftSelectorView-friend-padding{color:#000;background-color:#a5e3ff;box-shadow:none}.giftSelectorView-friend.selected .giftSelectorView-friend-padding{color:#fff;background-color:#0090ff}.giftSelectorView-friend.selected:hover .giftSelectorView-friend-padding{color:#000;background-color:#a5e3ff}input[type=text].giftSelectorView-friendRow-returnQuantity{padding:2px;margin:2px}.giftSelectorView-confirmPopup-submitCloseButton{position:absolute;top:-16px;right:-11px;z-index:15;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:25px;height:25px;padding:5px;font-size:14px;font-weight:700;color:#e03a3a;text-align:center;background:#fff;border:1px solid #d1d0cf;border-radius:20px;box-shadow:1px 2px 6px -4px #3e3e3e}.giftSelectorView-confirmPopup-submitCloseButton:hover{color:#fff;text-decoration:none;background-color:#e03a3a}.mh-dark .giftSelectorView-confirmPopup-content a.giftSelectorView-confirmPopup-submitCloseButton{color:var(--d-text-muted);background-color:var(--d-blue);border-color:var(--d-border)}.mh-dark .giftSelectorView-confirmPopup-content a.giftSelectorView-confirmPopup-submitCloseButton:hover{background-color:var(--d-blue-dark)}
`;
}
});
var getIgnoredGifts, claimGifts, makeAcceptButton, makeReturnButton, fixTypo, addCloseButtonToConfirmPopup, lineBreakGiftFooter, getButtons, makeButtons, getLimit, pickFriends, addSendButton, addRandomSendButton, _showTab, _selectGift, _updateGiftMultiplierQuantity, addGiftSwitcher, addButtonsToDropdown, addButtonsToPopup, main16, init70, better_gifts_default, init_better_gifts = __esm({
"src/modules/better-gifts/index.js"() {
init_utils2();
init_settings29();
init_styles64();
getIgnoredGifts = () => {
let ignored = getSetting("better-gifts-settings.ignore-bad-gifts-0", "skip"), skipOptions = {
skip: ["mozzarella_cheese", "stale_cheese", "stale_cheese_craft_item"],
"no-skip": [],
mozzarella: ["mozzarella_cheese"],
stale: ["stale_cheese_craft_item"],
sludge: ["radioactive_sludge"],
"mozzarella-stale": ["mozzarella_cheese", "stale_cheese_craft_item"],
"mozzarella-sludge": ["mozzarella_cheese", "radioactive_sludge"],
"stale-sludge": ["stale_cheese_craft_item", "radioactive_sludge"]
};
return skipOptions[ignored] || skipOptions.skip;
}, claimGifts = (send = !1, retries = 0) => __async(void 0, null, function* () {
if (hg.views.GiftSelectorView.show(), !document.querySelector(".giftSelectorView-tabContent.active .giftSelectorView-friendRow")) {
retries <= 10 && setTimeout(() => {
claimGifts(send, retries + 1);
}, 250);
return;
}
let gifts = hg.views.GiftSelectorView.getClaimableGiftsSortedByTime();
getSetting("better-gifts.send-order-0", "default") === "reverse" && gifts.reverse();
let ignoredGifts = getIgnoredGifts(), sendLimit = hg.views.GiftSelectorView.getNumSendableActionsRemaining(), claimLimit = hg.views.GiftSelectorView.getNumClaimableActionsRemaining();
gifts = gifts.filter((gift) => !(gift.channel !== "gift" || ignoredGifts.includes(gift.item_type)));
for (let gift of gifts) {
let verb = send && sendLimit > 0 && gift.is_returnable ? "return" : "claim", giftEl = document.querySelector(`.giftSelectorView-friendRow[data-gift-id="${gift.gift_id}"] .giftSelectorView-friendRow-action.${verb}`);
if (!giftEl)
continue;
let event = { target: giftEl };
send && verb === "return" && sendLimit > 0 ? (hg.views.GiftSelectorView.selectReturnableGift(event, giftEl), sendLimit--, claimLimit--) : !send && verb === "claim" && claimLimit > 0 && (hg.views.GiftSelectorView.selectClaimableGift(giftEl), claimLimit--);
}
setTimeout(() => {
let confirm2 = document.querySelector(".mousehuntActionButton.giftSelectorView-action-confirm.small");
confirm2 && setTimeout(() => {
hg.views.GiftSelectorView.submitConfirm(confirm2);
}, 250);
}, 500);
}), makeAcceptButton = (buttonContainer, isTiny = !1) => {
let acceptButton = makeElement("button", ["mh-gift-button", "mh-gift-buttons-accept", "mousehuntActionButton", "small"]);
makeElement("span", "mousehuntActionButton-text", "Accept All", acceptButton), isTiny && acceptButton.classList.add("tiny");
let acceptLimit = document.querySelector(".giftSelectorView-numClaimActionsRemaining");
acceptLimit && acceptLimit.innerText === "0" ? acceptButton.classList.add("disabled") : acceptButton.addEventListener("click", () => {
claimGifts();
}), buttonContainer.append(acceptButton);
}, makeReturnButton = (buttonContainer, isTiny = !1) => {
let returnWrapper = makeElement("div", "mh-gift-buttons-return-wrapper"), returnButton = makeElement("button", ["mh-gift-button", "mh-gift-buttons-return", "mousehuntActionButton", "small"]);
makeElement("span", "mousehuntActionButton-text", "Accept & Return All", returnButton), isTiny && returnButton.classList.add("tiny");
let returnLimit = document.querySelector(".giftSelectorView-numSendActionsRemaining");
returnLimit && returnLimit.innerText === "0" ? returnButton.classList.add("disabled") : returnButton.addEventListener("click", () => {
claimGifts(!0);
}), returnWrapper.append(returnButton), buttonContainer.append(returnWrapper);
}, fixTypo = () => {
onRender({
group: "GiftSelectorView",
callback: (data, results) => results.replaceAll("You can send 1 free gifts", "You can send 1 free gift").replaceAll("<b>1</b> free gifts", "<b>1</b> free gift")
});
}, addCloseButtonToConfirmPopup = (resp, req) => {
if (req.action !== "claim_and_send")
return;
let confirmTitle = document.querySelector(".giftSelectorView-confirmPopup-title");
if (!confirmTitle)
return;
let closeButton = makeElement("a", "giftSelectorView-confirmPopup-submitCloseButton", "\u2715");
closeButton.addEventListener("click", () => {
hg.views.GiftSelectorView.submitConfirm(closeButton);
}), confirmTitle.append(closeButton);
}, lineBreakGiftFooter = () => {
replaceInTemplate("GiftSelectorView", [
[
"more free gifts today. You can",
'more free gifts today. <p class="mh-ui-footer-gifts-second-line">You can'
],
[
'class="giftSelectorView-inboxHeader-closeButton" onclick="hg.views.GiftSelectorView.hideInbox(); return false;">Close</a>',
'class="giftSelectorView-inboxHeader-closeButton" onclick="hg.views.GiftSelectorView.hideInbox(); return false;">\u2715</a>'
]
]);
}, getButtons = (className = !1, isTiny = !1) => {
let buttonContainer = document.createElement("div");
return buttonContainer.id = "bulk-gifting-gift-buttons", className && buttonContainer.classList.add(className), makeAcceptButton(buttonContainer, isTiny), makeReturnButton(buttonContainer, isTiny), buttonContainer;
}, makeButtons = () => {
if (document.querySelector("#bulk-gifting-gift-buttons"))
return;
let buttonContainer = document.createElement("div");
buttonContainer.id = "bulk-gifting-gift-buttons", makeAcceptButton(buttonContainer), makeReturnButton(buttonContainer);
let giftFooter = document.querySelector(".giftSelectorView-inbox-footer");
giftFooter && giftFooter.firstChild && giftFooter.insertBefore(buttonContainer, giftFooter.firstChild);
}, getLimit = () => {
let limitEl = document.querySelector(".giftSelectorView-tabContent.active .giftSelectorView-actionLimit.giftSelectorView-numSendActionsRemaining");
return limitEl ? Number.parseInt(limitEl.innerText, 10) : 0;
}, pickFriends = (friends, useRandom = !0) => {
let selected = [], sent = 0;
if (useRandom) {
let bound = friends.length > 35 ? 35 : friends.length, firstRandom = Math.floor(Math.random() * bound);
selected.push(firstRandom), sent++;
}
let limit = getLimit();
for (; sent < limit && !(selected.length >= friends.length); ) {
if (useRandom) {
let random = Math.floor(Math.random() * friends.length);
if (selected.includes(random))
continue;
selected.push(random);
} else
selected.push(sent);
sent++, limit = getLimit();
}
selected.forEach((index) => {
friends[index].click();
}), getLimit() < 1 && document.querySelectorAll(".mh-gift-buttons").forEach((button) => {
button.classList.add("disabled");
});
}, addSendButton = (className, text, selector, buttonContainer) => {
let existing = document.querySelector(`.mh-gift-buttons-send-${className}`);
existing && existing.remove();
let sendButton = makeElement("button", ["mousehuntActionButton", "tiny", "mh-gift-buttons", `mh-gift-buttons-send-${className}`]);
makeElement("span", "mousehuntActionButton-text", text, sendButton), getLimit() < 1 && sendButton.classList.add("disabled"), sendButton.addEventListener("click", () => {
let friends = document.querySelectorAll(selector);
if (friends.length) {
if (sendButton.classList.contains("disabled")) {
document.querySelectorAll(".giftSelectorView-friend.selected").forEach((friend) => {
friend.click();
}), document.querySelectorAll(".mh-gift-buttons.disabled").forEach((button) => {
button.classList.remove("disabled");
});
return;
}
className === "faves" ? pickFriends(friends, !1) : pickFriends(friends);
}
}), buttonContainer.append(sendButton);
}, addRandomSendButton = () => {
let _selectGift2 = hg.views.GiftSelectorView.selectGift;
hg.views.GiftSelectorView.selectGift = (gift) => {
_selectGift2(gift);
let title = document.querySelector(".giftSelectorView-tabContent.active .selectFriends .giftSelectorView-content-title");
return title ? (addSendButton("random", "Select Random Friends", ".giftSelectorView-tabContent.active .giftSelectorView-friend:not(.disabled, .selected)", title), addSendButton("faves", "Select Frequent Gifters", ".giftSelectorView-tabContent.active .giftSelectorView-friend-group.favorite .giftSelectorView-friend:not(.disabled, .selected)", title), !0) : !1;
};
}, addGiftSwitcher = () => {
_showTab || _selectGift || _updateGiftMultiplierQuantity || (_showTab = hg.views.GiftSelectorView.showTab, _selectGift = hg.views.GiftSelectorView.selectGift, _updateGiftMultiplierQuantity = hg.views.GiftSelectorView.updateGiftMultiplierQuantity, hg.views.GiftSelectorView.showTab = (tabType, viewState, preserveVariables, preserveActions) => {
_showTab(tabType, viewState, preserveVariables, preserveActions), hg.views.GiftSelectorView.updateGiftMultiplierQuantity = (input) => (input && input.hasAttribute("maxlength") && input.removeAttribute("maxlength"), _updateGiftMultiplierQuantity(input)), hg.views.GiftSelectorView.selectGift = (gift) => {
_selectGift(gift);
let giftContainer = document.querySelector(".giftSelectorView-tabContent.active.selectFriends .giftSelectorView-content-leftBar");
if (!giftContainer)
return !1;
let existing = document.querySelector(".mh-gift-buttons-clone-wrapper");
existing && existing.remove();
let giftType = tabType === "send_free_gifts" ? "gift" : "paidgift", gifts = document.querySelectorAll(`.active .selectGift .giftSelectorView-scroller.giftSelectorView-giftContainer .giftSelectorView-gift.sendable.${giftType}`);
if (!gifts.length)
return !1;
let cloneWrapper = makeElement("div", "mh-gift-buttons-clone-wrapper");
return gifts.forEach((toClone) => {
let clone = toClone.cloneNode(!0), giftWrap = makeElement("div", "giftSelectorView-content-leftBar-highlightBlock");
giftWrap.append(clone), giftWrap.addEventListener("click", () => {
document.querySelectorAll(".mh-gift-buttons-clone-selected").forEach((el) => {
el.classList.remove("mh-gift-buttons-clone-selected");
}), giftWrap.classList.add("mh-gift-buttons-clone-selected");
}), cloneWrapper.append(giftWrap);
}), giftContainer.append(cloneWrapper), !0;
};
});
}, addButtonsToDropdown = () => {
let buttonLink = document.querySelector("#hgbar_freegifts");
buttonLink && buttonLink.addEventListener("click", () => {
makeButtons();
});
}, addButtonsToPopup = () => {
let actionRow = document.querySelector(".giftSelectorView-tabContentContainer .giftSelectorView-tabContent.active .giftSelectorView-actionContainer");
if (!actionRow)
return;
let existing = document.querySelector(".mh-gift-buttons-send-popup");
existing && existing.remove();
let buttons = getButtons("mh-gift-buttons-send-popup", !0);
actionRow.insertBefore(buttons, actionRow.firstChild);
}, main16 = () => {
onRequest("users/socialGift.php", makeButtons), addButtonsToDropdown(), onDialogShow("giftSelectorViewPopup", addButtonsToPopup), addRandomSendButton(), addGiftSwitcher(), fixTypo(), lineBreakGiftFooter(), onRequest("users/socialGift.php", addCloseButtonToConfirmPopup);
}, init70 = () => __async(void 0, null, function* () {
addStyles(styles_default63, "better-gifts"), main16(), onDeactivation("better-gifts", () => {
document.querySelectorAll(".mh-gift-buttons").forEach((button) => {
button.remove();
});
});
}), better_gifts_default = {
id: "better-gifts",
name: "Better Gifts",
type: "better",
default: !0,
description: "Quickly accept and return all your gifts, and pick random friends to send to.",
load: init70,
settings: settings_default28
};
}
});
var styles_default64, init_styles65 = __esm({
"src/modules/flrt-helper/styles.css"() {
styles_default64 = `.mh-improved-flrt-helper-popup{display:grid;grid-template-columns:1fr 1fr;justify-items:center}.mh-improved-flrt-helper-popup .flrt-search-form{display:flex;align-items:center;justify-content:space-around;padding:10px;background-color:#dcf7ff;border:1px solid #a1a1a1;border-radius:5px;box-shadow:0 1px 2px -1px #b5b5b5}.mh-improved-flrt-helper-popup .flrt-friend-finder{display:flex;flex-direction:column}.mh-improved-flrt-helper-popup .friendsPage-friendRow.friendsPage-requestRow{border-radius:5px;box-shadow:1px 1px 4px #cdb495}.mh-improved-flrt-helper-popup .friendsPage-friendRow-imageContainer{width:75px;height:75px;margin-left:3px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-content{max-width:226px;min-height:75px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-titleBar-icon{top:-10px;left:0;height:35px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-titleBar-name{padding-left:15px;font-size:14px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-titleBar{padding-left:20px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-titleBar-titleDetail{left:7px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-environment{position:relative;margin-left:-10px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-environment-icon{position:absolute;top:-5px;left:0;width:20px;height:20px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-environment-name{position:absolute;left:25px;font-size:10px;vertical-align:top}.mh-improved-flrt-helper-popup .friendsPage-friendRow .friendsPage-friendRow-actions{top:40px;right:0}.mh-improved-flrt-helper-popup .friendsPage-friendRow-actions-interactionButtons{padding-right:0}.mh-improved-flrt-helper-popup .friendsPage-friendRow-actions .mousehuntTooltip,.mh-improved-flrt-helper-popup .friendsPage-requestRow-actionStatus.accepted,.mh-improved-flrt-helper-popup .userInteractionButtonsView-action[data-action=send_daily_gift],.mh-improved-flrt-helper-popup .userInteractionButtonsView-action[data-action=send_draw_ballot]{display:none!important}.mh-improved-flrt-helper-popup .userInteractionButtonsView-button{width:45px;height:45px;background-size:45px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-statsContainer{border-radius:0}.mh-improved-flrt-helper-popup .friendsPage-friendRow-stat.map,.mh-improved-flrt-helper-popup .friendsPage-friendRow-stat.team,.mh-improved-flrt-helper-popup .friendsPage-friendRow-stat-label{display:none!important}.mh-improved-flrt-helper-popup .friendsPage-friendRow-stat.online span{width:auto}.mh-improved-flrt-helper-popup .friendsPage-friendRow-stat{width:auto;margin-right:10px}.mh-improved-flrt-helper-popup .instructions{padding:10px;margin-top:auto;font-style:italic}.mh-improved-flrt-helper-popup .flrt-items-to-send{min-width:80%}.mh-improved-flrt-helper-popup .flrt-item{display:flex;flex-direction:row;align-items:center;width:100%;padding:5px;margin-bottom:5px;cursor:pointer;background-color:#eee;border:1px solid #ddd;border-radius:5px;box-shadow:0 1px 2px -1px #b5b5b5}.mh-improved-flrt-helper-popup .flrt-item .itemImage,.mh-improved-flrt-helper-popup .flrt-item .itemImage img{width:45px;height:45px}.mh-improved-flrt-helper-popup .flrt-item-info{display:flex;align-items:center;margin-left:5px}.mh-improved-flrt-helper-popup .flrt-item-name{font-weight:900;vertical-align:top}.mh-improved-flrt-helper-popup .flrt-item-disabled .itemImage{filter:grayscale(1);opacity:.5}.mh-improved-flrt-helper-popup .flrt-item-info input[type=checkbox]:disabled{opacity:0}.mh-improved-flrt-helper-popup .flrt-item.flrt-item-sending{background-color:#f3c019}.mh-improved-flrt-helper-popup .flrt-item.flrt-item-sent{position:relative;background-color:#3fcd84}.mh-improved-flrt-helper-popup .flrt-item.flrt-item-sent:after{position:absolute;right:0;display:inline-block;width:25px;height:25px;margin-right:5px;margin-bottom:-2px;vertical-align:middle;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/events/winter_hunt_2013/checkmark.png);background-repeat:no-repeat;background-size:100%}
`;
}
});
var addFlrtButtonToConvertible, sendItemsToMaptain, flrtPopup, init71, flrt_helper_default, init_flrt_helper = __esm({
"src/modules/flrt-helper/index.js"() {
init_utils2();
init_styles65();
addFlrtButtonToConvertible = (response) => __async(void 0, null, function* () {
if (!(response.convertible_open && response.convertible_open.name && response.convertible_open.items))
return;
let items6 = [], tradableItems = yield getData("items-tradable");
for (let element2 of response.convertible_open.items) {
let itemData = {
type: element2.type,
name: element2.name,
image: element2.thumb,
quantity: element2.quantity
};
tradableItems ? tradableItems.find((tradableItem) => tradableItem.type === element2.type) && items6.push(itemData) : items6.push(itemData);
}
let buttons = document.querySelector(".jsDialogContainer .suffix");
if (!buttons)
return;
let flrtBtn = makeElement("button", ["mousehuntActionButton", "small", "button"]);
makeElement("span", [], "Return to Maptain", flrtBtn), flrtBtn.addEventListener("click", () => {
flrtPopup(items6);
}), buttons.prepend(flrtBtn);
}), sendItemsToMaptain = (snuid, items6) => __async(void 0, null, function* () {
for (let item of items6)
item.element.classList.add("flrt-item-sending"), yield doRequest("managers/ajax/users/supplytransfer.php", {
item: item.type,
item_quantity: item.quantity,
receiver: snuid
}), item.element.classList.remove("flrt-item-sending"), item.element.classList.add("flrt-item-sent");
let sendButton = document.querySelector(".flrt-send-items");
sendButton && (sendButton.outerHTML = '<input type="submit" value="Continue" class="jsDialogClose button">');
}), flrtPopup = (items6) => __async(void 0, null, function* () {
let lastMaptain = yield getLastMaptain(), itemContent = "";
items6.forEach((item) => {
itemContent += `<div class="flrt-item" data-item-type="${item.type}" data-item-quantity="${item.quantity}">
<div class="itemImage">
<img src="${item.image}">
<div class="quantity">${item.quantity}</div>
</div>
<div class="flrt-item-info">
<input type="checkbox" checked data-item-type="${item.type}">
<span class="flrt-item-name">${item.name}</span>
</div>
</div>`;
});
let popup = createPopup({
template: "ajax",
title: "Send tradables to Maptain",
content: `<div class="mh-improved-flrt-helper-popup">
<div class="flrt-friend-finder">
<form action="https://www.mousehuntgame.com/friends.php?tab=requests&amp;sub_tab=community" method="post" class="flrt-search-form friends-page-id-search friendsPage-community-hunterIdForm" onsubmit="app.pages.FriendsPage.submitHunterIdForm(this); return false;">
<input type="number" value="${lastMaptain || ""}" name="user_id" maxlength="10" class="friendsPage-community-hunterIdForm-input">
<a class="mousehuntActionButton small search-for-hunter" href="#" onclick="app.pages.FriendsPage.triggerHunterForm(this); return false;"><span>Search</span></a>
</form>
<div class="friendsPage-community-hunterResult"></div>
<div class="instructions">
Select the tradable items you want to send.
</div>
</div>
<div class="flrt-items-to-send">
${itemContent}
</div>
</div>`
});
if (popup.addToken("{*prefix*}", '<h2 class="title">Send tradable items</h2>'), popup.addToken("{*suffix*}", '<div class="mousehuntActionButton flrt-send-items"><span>Send items to Maptain</span></div>'), popup.show(), document.querySelectorAll(".flrt-item").forEach((item) => {
let checkbox = item.querySelector('input[type="checkbox"]'), toggle = () => {
checkbox.checked = !checkbox.checked, item.classList.toggle("flrt-item-disabled", !checkbox.checked);
};
item.addEventListener("click", toggle);
}), lastMaptain) {
let search = document.querySelector(".search-for-hunter");
search && app.pages.FriendsPage.triggerHunterForm(search);
}
let sendBtn = document.querySelector(".flrt-send-items");
sendBtn && sendBtn.addEventListener("click", () => {
sendBtn.disabled = !0, sendBtn.classList.add("disabled");
let id = document.querySelector(".friendsPage-community-hunterIdForm-input");
if (!id)
return;
let sendingItems = document.querySelectorAll(".flrt-item"), itemsToSend = [];
sendingItems.forEach((item) => {
let checkbox = item.querySelector('input[type="checkbox"]');
if (checkbox) {
if (checkbox.checked) {
let itemData = {
type: item.getAttribute("data-item-type"),
quantity: Number.parseInt(item.getAttribute("data-item-quantity"), 10),
element: item
};
itemsToSend.push(itemData);
}
checkbox.disabled = !0;
}
});
let row = document.querySelector(".friendsPage-friendRow.friendsPage-requestRow");
if (!row)
return;
let snuid = row.getAttribute("data-snuid") || id.value;
sendItemsToMaptain(snuid, itemsToSend);
});
}), init71 = () => __async(void 0, null, function* () {
addStyles(styles_default64, "flrt-helper"), onDialogShow("treasureMapPopup", cacheFinishedMap), onRequest("users/useconvertible.php", addFlrtButtonToConvertible);
}), flrt_helper_default = {
id: "flrt-helper",
name: "FLRT Helper",
type: "feature",
default: !1,
description: "Add a \u201CReturn to Maptain\u201D button when opening a chest from a map, allowing you to choose which tradable items to send directly to the Maptain.",
load: init71
};
}
});
// dist/data/emotes.json
var emotes_default, init_emotes = __esm({
"dist/data/emotes.json"() {
emotes_default = { confused_cat: "https://i.mouse.rip/emotes/confused_cat.png", facepalm: "https://i.mouse.rip/emotes/facepalm.png", jerry: "https://i.mouse.rip/emotes/jerry.png", jerrypog: "https://i.mouse.rip/emotes/jerrypog.png", kek: "https://i.mouse.rip/emotes/kek.png", kekd: "https://i.mouse.rip/emotes/kekd.png", kekl: "https://i.mouse.rip/emotes/kekl.png", kekwait: "https://i.mouse.rip/emotes/kekwait.png", mhwiki: "https://i.mouse.rip/emotes/mhwiki.png", notlikeduck: "https://i.mouse.rip/emotes/notlikeduck.png", ohnoes: "https://i.mouse.rip/emotes/ohnoes.png", peepoheart: "https://i.mouse.rip/emotes/peepoheart.png", pikaoh: "https://i.mouse.rip/emotes/pikaoh.png", pog: "https://i.mouse.rip/emotes/pog.png", redcard: "https://i.mouse.rip/emotes/redcard.png", rip: "https://i.mouse.rip/emotes/rip.png", sadcat: "https://i.mouse.rip/emotes/sadcat.png", squirtlepizza: "https://i.mouse.rip/emotes/squirtlepizza.png", thumbsupcar: "https://i.mouse.rip/emotes/thumbsupcar.png", tom: "https://i.mouse.rip/emotes/tom.png", ty: "https://i.mouse.rip/emotes/ty.png", woohoo: "https://i.mouse.rip/emotes/woohoo.png", wesmart: "https://i.mouse.rip/emotes/wesmart.png", yes: "https://i.mouse.rip/emotes/yes.png", yelling_woman: "https://i.mouse.rip/emotes/yelling_woman.png", swagdoge: "https://i.mouse.rip/emotes/swagdoge.png", rlc: "https://i.mouse.rip/emotes/rlc.png", plusone: "https://i.mouse.rip/emotes/plusone.png", offtopic: "https://i.mouse.rip/emotes/offtopic.png", nani: "https://i.mouse.rip/emotes/nani.png", oof: "https://i.mouse.rip/emotes/oof.png", pikaSad: "https://i.mouse.rip/emotes/pikaSad.png", jacobFace: "https://i.mouse.rip/emotes/jacobFace.png", checkthepins: "https://i.mouse.rip/emotes/checkthepins.png", checkthenews: "https://i.mouse.rip/emotes/checkthenews.png", fakenews: "https://i.mouse.rip/emotes/fakenews.png", dlu: "https://i.mouse.rip/emotes/dlu.png", dhu: "https://i.mouse.rip/emotes/dhu.png", cre: "https://i.mouse.rip/emotes/cre.png", beermouse: "https://i.mouse.rip/emotes/beermouse.png", auraBirthday: "https://i.mouse.rip/emotes/auraBirthday.png", auraChrome: "https://i.mouse.rip/emotes/auraChrome.png", auraCursed: "https://i.mouse.rip/emotes/auraCursed.png", auraLightning: "https://i.mouse.rip/emotes/auraLightning.png", auraSlayer: "https://i.mouse.rip/emotes/auraSlayer.png", auraWinter: "https://i.mouse.rip/emotes/auraWinter.png", crownBronze: "https://i.mouse.rip/emotes/crownBronze.png", crownDiamond: "https://i.mouse.rip/emotes/crownDiamond.png", crownGold: "https://i.mouse.rip/emotes/crownGold.png", crownPlatinum: "https://i.mouse.rip/emotes/crownPlatinum.png", crownSilver: "https://i.mouse.rip/emotes/crownSilver.png", fta: "https://i.mouse.rip/emotes/fta.png", ftc: "https://i.mouse.rip/emotes/ftc.png", mod: "https://i.mouse.rip/emotes/mod.png", powerTypeArcane: "https://i.mouse.rip/emotes/powerTypeArcane.png", powerTypeDraconic: "https://i.mouse.rip/emotes/powerTypeDraconic.png", powerTypeForgotten: "https://i.mouse.rip/emotes/powerTypeForgotten.png", powerTypeHydro: "https://i.mouse.rip/emotes/powerTypeHydro.png", powerTypeLaw: "https://i.mouse.rip/emotes/powerTypeLaw.png", powerTypePhysical: "https://i.mouse.rip/emotes/powerTypePhysical.png", powerTypeRift: "https://i.mouse.rip/emotes/powerTypeRift.png", powerTypeShadow: "https://i.mouse.rip/emotes/powerTypeShadow.png", powerTypeTactical: "https://i.mouse.rip/emotes/powerTypeTactical.png", profileFriend: "https://i.mouse.rip/emotes/profileFriend.png", profileFriendAdd: "https://i.mouse.rip/emotes/profileFriendAdd.png", profileFriendDelete: "https://i.mouse.rip/emotes/profileFriendDelete.png", profileFriendPending: "https://i.mouse.rip/emotes/profileFriendPending.png", profileGift: "https://i.mouse.rip/emotes/profileGift.png", profileMap: "https://i.mouse.rip/emotes/profileMap.png", profileMapAdd: "https://i.mouse.rip/emotes/profileMapAdd.png", profileMapInvite: "https://i.mouse.rip/emotes/profileMapInvite.png", profileSupples: "https://i.mouse.rip/emotes/profileSupples.png", profileTicket: "https://i.mouse.rip/emotes/profileTicket.png", question: "https://i.mouse.rip/emotes/question.png", rankApprentice: "https://i.mouse.rip/emotes/rankApprentice.png", rankArchduke: "https://i.mouse.rip/emotes/rankArchduke.png", rankBaron: "https://i.mouse.rip/emotes/rankBaron.png", rankCount: "https://i.mouse.rip/emotes/rankC.png", rankDuke: "https://i.mouse.rip/emotes/rankDuke.png", rankElder: "https://i.mouse.rip/emotes/rankElder.png", rankFabled: "https://i.mouse.rip/emotes/rankFabled.png", rankGrandduke: "https://i.mouse.rip/emotes/rankGrandduke.png", rankGrandmaster: "https://i.mouse.rip/emotes/rankGrandmaster.png", rankHero: "https://i.mouse.rip/emotes/rankHero.png", rankInitiate: "https://i.mouse.rip/emotes/rankInitiate.png", rankJourney: "https://i.mouse.rip/emotes/rankJourney.png", rankKnight: "https://i.mouse.rip/emotes/rankKnight.png", rankLegendary: "https://i.mouse.rip/emotes/rankLegendary.png", rankLordLady: "https://i.mouse.rip/emotes/rankLordLady.png", rankMaster: "https://i.mouse.rip/emotes/rankMaster.png", rankNovice: "https://i.mouse.rip/emotes/rankNovice.png", rankRecruit: "https://i.mouse.rip/emotes/rankRecruit.png", rankSage: "https://i.mouse.rip/emotes/rankSage.png", rankViceroy: "https://i.mouse.rip/emotes/rankViceroy.png", statAttraction: "https://i.mouse.rip/emotes/statAttraction.png", statCheese: "https://i.mouse.rip/emotes/statCheese.png", statLuck: "https://i.mouse.rip/emotes/statLuck.png", statPower: "https://i.mouse.rip/emotes/statPower.png", statPowerBonus: "https://i.mouse.rip/emotes/statPowerBonus.png", trophyBronze: "https://i.mouse.rip/emotes/trophyBronze.png", trophyChallenger: "https://i.mouse.rip/emotes/trophyChallenger.png", trophyCompetitor: "https://i.mouse.rip/emotes/trophyCompetitor.png", trophyGold: "https://i.mouse.rip/emotes/trophyGold.png", trophyParticipant: "https://i.mouse.rip/emotes/trophyParticipant.png", trophySilver: "https://i.mouse.rip/emotes/trophySilver.png" };
}
});
var replaceInText, init72, emotes_default2, init_emotes2 = __esm({
"src/modules/emotes/index.js"() {
init_utils2();
init_emotes();
replaceInText = (text) => {
let regex = new RegExp(`:(${Object.keys(emotes_default).join("|")}):`, "g");
return text = text.replace(regex, (match, emote) => `<img class="emote" src="${emotes_default[emote]}" alt=":${emote}:" title=":${emote}:" width="20" height="20">`), text;
}, init72 = () => __async(void 0, null, function* () {
addStyles(".emote { vertical-align: bottom; }", "emotes"), onRender({
group: "MessageBoardView",
layout: "layout",
after: !0,
callback: (data, results) => replaceInText(results)
}), onNavigation(() => {
document.querySelectorAll(".messageBoardView-message-body").forEach((message) => {
message.innerHTML = replaceInText(message.innerHTML);
});
}, {
page: "hunterprofile"
});
}), emotes_default2 = {
id: "emotes",
name: "Emotes",
type: "feature",
default: !0,
description: 'Replace Discord-style emotes on corkboards (e.g., :jerry:) with actual images in map and profile corkboard messages. <a href="https://github.com/MHCommunity/mousehunt-improved/blob/main/docs/emotes.md" target="_blank" rel="noopener noreferrer">View the list of supported emotes</a>',
load: init72
};
}
});
var init73, ssdb_toothlet_counter_default, init_ssdb_toothlet_counter = __esm({
"src/modules/ssdb-toothlet-counter/index.js"() {
init_utils2();
init73 = () => __async(void 0, null, function* () {
addTrapQuantity({
baseIds: [3023, 2647],
baseSlugs: ["upgraded_denture_base", "denture_base"],
itemId: "fulmina_charged_tooth_stat_item"
});
}), ssdb_toothlet_counter_default = {
id: "ssdb-teeth-counter",
name: "SSDB Toothlet Counter",
type: "feature",
default: !0,
description: "Show the number of toothlets you have when SSDB is equipped.",
load: init73
};
}
});
var styles_default65, init_styles66 = __esm({
"src/modules/hide-codices/styles.css"() {
styles_default65 = `.trapSelectorView__activeCodexContainer,.trapSelectorView__activeCodexContainer--visible{display:none}
`;
}
});
var init74, hide_codices_default, init_hide_codices = __esm({
"src/modules/hide-codices/index.js"() {
init_utils2();
init_styles66();
init74 = () => __async(void 0, null, function* () {
addStyles(styles_default65, "hide-codices");
}), hide_codices_default = {
id: "hide-codices",
name: "Hide Codices",
type: "element-hiding",
default: !1,
description: "Hide the codices on the trap selector.",
load: init74
};
}
});
var settings_default29, init_settings30 = __esm({
"src/modules/ultimate-checkmark/settings/index.js"() {
init_utils2();
settings_default29 = () => __async(void 0, null, function* () {
let options2 = [], categories = yield getData("ultimate-checkmark");
return categories.sort((a, b) => a.name < b.name ? -1 : 1), categories.forEach((category) => {
options2.push({
id: category.id,
name: category.name,
value: getSetting(`ultimate-checkmark.show-${category.id}`, !0)
});
}), [{
id: "ultimate-checkmark.show",
title: "Ultimate Checkmark",
default: [],
description: "Add more items to collect on your Hunter profile.",
settings: {
type: "multi-toggle",
options: options2
}
}];
});
}
});
var styles_default66, init_styles67 = __esm({
"src/modules/ultimate-checkmark/styles.css"() {
styles_default66 = `.hunterProfileItemsView-categoryContent[data-category=codex] .hunterProfileItemsView-categoryContent-item.uncollected,.hunterProfileItemsView-categoryContent[data-category=chest] .hunterProfileItemsView-categoryContent-item.uncollected,.hunterProfileItemsView-categoryContent[data-category=airships] .hunterProfileItemsView-categoryContent-item.uncollected,.hunterProfileItemsView-categoryContent[data-category=currency] .hunterProfileItemsView-categoryContent-item.uncollected,.hunterProfileItemsView-categoryContent[data-category=equipment] .hunterProfileItemsView-categoryContent-item.uncollected,.hunterProfileItemsView-categoryContent[data-category=plankrun] .hunterProfileItemsView-categoryContent-item.uncollected{filter:grayscale(100%)}.hunterProfileItemsView-categoryContent[data-category=chest] .hunterProfileItemsView-categoryContent-item-padding .itemImage{background-size:contain}
`;
}
});
// dist/data/ultimate-checkmark.json
var ultimate_checkmark_default, init_ultimate_checkmark = __esm({
"dist/data/ultimate-checkmark.json"() {
ultimate_checkmark_default = [{ id: "treasure_chests", name: "Treasure Chests", type: "special", subtype: "treasure_chests", key: "chests", items: ["beanstalk_treasure_chest_convertible", "rare_beanstalk_treasure_chest_convertible", "boss_arduous_treasure_chest_convertible", "rare_boss_arduous_treasure_chest_convertible", "boss_easy_treasure_chest_convertible", "rare_boss_easy_treasure_chest_convertible", "boss_elaborate_treasure_chest_convertible", "rare_boss_elaborate_treasure_chest_convertible", "boss_elite_2021_treasure_chest_convertible", "rare_boss_elite_2021_treasure_chest_convertible", "boss_hard_treasure_chest_convertible", "rare_boss_hard_treasure_chest_convertible", "rare_boss_medium_treasure_chest_convertible", "boss_medium_treasure_chest_convertible", "bounty_reward_f_convertible", "rare_bounty_reward_f_convertible", "bristle_woods_rift_treasure_chest_convertible", "rare_bristle_woods_rift_treasure_chest_convertible", "burroughs_rift_treasure_chest_convertible", "rare_burroughs_rift_treasure_chest_convertible", "catacombs_treasure_chest_convertible", "rare_catacombs_treasure_chest_convertible", "chrome_arduous_treasure_chest_convertible", "rare_chrome_arduous_treasure_chest_convertible", "chrome_boss_easy_treasure_chest_convertible", "rare_c_boss_easy_treasure_chest_convertible", "chrome_boss_arduous_treasure_chest_convertible", "rare_c_boss_arduous_treasure_chest_convertible", "chrome_boss_elaborate_treasure_chest_convertible", "rare_c_boss_elaborate_treasure_chest_convertible", "chrome_boss_elite_treasure_chest_convertible", "rare_c_boss_elite_treasure_chest_convertible", "chrome_boss_hard_treasure_chest_convertible", "rare_c_boss_hard_treasure_chest_convertible", "chrome_boss_medium_treasure_chest_convertible", "rare_c_boss_medium_treasure_chest_convertible", "chrome_easy_treasure_chest_convertible", "rare_chrome_easy_treasure_chest_convertible", "chrome_elaborate_treasure_chest_convertible", "rare_chrome_elaborate_treasure_chest_convertible", "chrome_elite_treasure_chest_convertible", "rare_chrome_elite_treasure_chest_convertible", "chrome_hard_treasure_chest_convertible", "rare_chrome_hard_treasure_chest_convertible", "chrome_medium_treasure_chest_convertible", "rare_chrome_medium_treasure_chest_convertible", "digby_treasure_chest_convertible", "rare_digby_treasure_chest_convertible", "farming_fishing_treasure_chest_convertible", "rare_farming_fishing_treasure_chest_convertible", "ff_prelude_treasure_chest_convertible", "rare_ff_prelude_treasure_chest_convertible", "fort_rox_treasure_chest_convertible", "rare_fort_rox_treasure_chest_convertible", "fungal_cavern_treasure_chest_convertible", "rare_fungal_cavern_treasure_chest_convertible", "furoma_rift_treasure_chest_convertible", "rare_furoma_rift_treasure_chest_convertible", "geyser_dweller_treasure_chest_convertible", "rare_geyser_dweller_treasure_chest_convertible", "giant_rainbow_treasure_chest_convertible", "rare_giant_rainbow_treasure_chest_convertible", "gilded_coin_treasure_chest_convertible", "rare_gilded_coin_treasure_chest_convertible", "gnawnia_rift_treasure_chest_convertible", "rare_gnawnia_rift_treasure_chest_convertible", "gnawnia_treasure_chest_convertible", "rare_gnawnia_treasure_chest_convertible", "icebreaker_treasure_chest_convertible", "rare_icebreaker_treasure_chest_convertible", "isles_treasure_chest_convertible", "rare_isles_treasure_chest_convertible", "labyrinth_treasure_chest_convertible", "rare_labyrinth_treasure_chest_convertible", "large_rainbow_treasure_chest_convertible", "rare_large_rainbow_treasure_chest_convertible", "lightning_slayer_chest_convertible", "rare_lightning_slayer_chest_convertible", "living_garden_treasure_chest_f_convertible", "rare_living_garden_treasure_chest_f_convertible", "m1k_solo_treasure_chest_convertible", "rare_m1k_solo_treasure_chest_convertible", "m1k_team_treasure_chest_convertible", "rare_m1k_team_treasure_chest_convertible", "moussu_picchu_treasure_chest_convertible", "rare_moussu_picchu_treasure_chest_convertible", "muridae_treasure_chest_convertible", "rare_muridae_treasure_chest_convertible", "queso_canyon_tour_treasure_chest_convertible", "rare_queso_canyon_tour_treasure_chest_convertible", "queso_canyoneer_treasure_chest_convertible", "rare_queso_canyoneer_treasure_chest_convertible", "relic_treasure_chest_convertible", "rare_relic_treasure_chest_convertible", "riftstalker_treasure_chest_convertible", "rare_riftstalker_treasure_chest_convertible", "riftwalker_treasure_chest_convertible", "rare_riftwalker_treasure_chest_convertible", "school_of_sorcery_treasure_chest_convertible", "rare_school_of_sorcery_treasure_chest_convertible", "shelder_treasure_chest_convertible", "rare_shelder_treasure_chest_convertible", "sky_palace_treasure_chest_convertible", "rare_sky_palace_treasure_chest_convertible", "sky_pirate_treasure_chest_convertible", "rare_sky_pirate_treasure_chest_convertible", "small_rainbow_treasure_chest_convertible", "rare_small_rainbow_treasure_chest_convertible", "sunken_city_treasure_chest_convertible", "rare_sunken_city_treasure_chest_convertible", "toxic_arduous_treasure_chest_convertible", "rare_toxic_arduous_treasure_chest_convertible", "toxic_easy_treasure_chest_convertible", "rare_toxic_easy_treasure_chest_convertible", "toxic_elaborate_treasure_chest_convertible", "rare_toxic_elaborate_treasure_chest_convertible", "toxic_elite_treasure_chest_convertible", "rare_toxic_elite_treasure_chest_convertible", "toxic_hard_treasure_chest_convertible", "rare_toxic_hard_treasure_chest_convertible", "toxic_medium_treasure_chest_convertible", "rare_toxic_medium_treasure_chest_convertible", "undead_treasure_chest_convertible", "rare_undead_treasure_chest_convertible", "valour_rift_treasure_chest_convertible", "rare_valour_rift_treasure_chest_convertible", "valour_treasure_chest_convertible", "rare_valour_treasure_chest_convertible", "warpath_treasure_chest_convertible", "rare_warpath_treasure_chest_convertible", "whisker_woods_rift_treasure_chest_convertible", "rare_whisker_woods_rift_treasure_chest_convertible", "whisker_woods_treasure_chest_convertible", "rare_whisker_woods_treasure_chest_convertible", "zugzwang_treasure_chest_convertible", "rare_zugzwang_treasure_chest_convertible", "light_floating_loot_cache_convertible", "heavy_floating_loot_cache_convertible", "empyrean_floating_loot_cache_convertible"] }, { id: "airships", name: "Airships", type: "special", subtype: "cosmetics", key: "airships", items: ["airship_balloon_astral_stat_item", "airship_balloon_birthday_stat_item", "airship_balloon_bookmobile_stat_item", "airship_balloon_chrome_stat_item", "airship_balloon_cloud_stat_item", "airship_balloon_deluxe_stat_item", "airship_balloon_empyrean_stat_item", "airship_balloon_factory_stat_item", "airship_balloon_ghost_ship_stat_item", "airship_balloon_gilded_stat_item", "airship_balloon_gloomy_galleon_stat_item", "airship_balloon_holiday_express_stat_item", "airship_balloon_lny_ox_stat_item", "airship_balloon_lny_stat_item", "airship_balloon_marzipan_stat_item", "airship_balloon_mineral_stat_item", "airship_balloon_new_years_stat_item", "airship_balloon_pirate_stat_item", "airship_balloon_plant_stat_item", "airship_balloon_porcelain_stat_item", "airship_balloon_spring_stat_item", "airship_balloon_tiger_stat_item", "airship_balloon_vrift_stat_item", "airship_balloon_winter_stat_item", "airship_hull_astral_stat_item", "airship_hull_birthday_stat_item", "airship_hull_bookmobile_stat_item", "airship_hull_chrome_stat_item", "airship_hull_cloud_stat_item", "airship_hull_deluxe_stat_item", "airship_hull_empyrean_stat_item", "airship_hull_factory_stat_item", "airship_hull_ghost_ship_stat_item", "airship_hull_gilded_stat_item", "airship_hull_gloomy_galleon_stat_item", "airship_hull_holiday_express_stat_item", "airship_hull_lny_ox_stat_item", "airship_hull_lny_stat_item", "airship_hull_marzipan_stat_item", "airship_hull_mineral_stat_item", "airship_hull_new_years_stat_item", "airship_hull_pirate_stat_item", "airship_hull_plant_stat_item", "airship_hull_porcelain_stat_item", "airship_hull_spring_stat_item", "airship_hull_tiger_stat_item", "airship_hull_vrift_stat_item", "airship_hull_winter_stat_item", "airship_sail_astral_stat_item", "airship_sail_birthday_stat_item", "airship_sail_bookmobile_stat_item", "airship_sail_chrome_stat_item", "airship_sail_cloud_stat_item", "airship_sail_deluxe_stat_item", "airship_sail_empyrean_stat_item", "airship_sail_factory_stat_item", "airship_sail_ghost_ship_stat_item", "airship_sail_gilded_stat_item", "airship_sail_gloomy_galleon_stat_item", "airship_sail_holiday_express_stat_item", "airship_sail_lny_ox_stat_item", "airship_sail_lny_stat_item", "airship_sail_marzipan_stat_item", "airship_sail_mineral_stat_item", "airship_sail_new_years_stat_item", "airship_sail_pirate_stat_item", "airship_sail_plant_stat_item", "airship_sail_porcelain_stat_item", "airship_sail_spring_stat_item", "airship_sail_tiger_stat_item", "airship_sail_vrift_stat_item", "airship_sail_winter_stat_item"] }, { id: "codex", name: "Codex", type: "special", subtype: "codex", key: "codex", items: ["chrome_codex_stat_item", "codex_of_valor_bard_page_stat_item", "codex_of_valor_dust_page_stat_item", "codex_of_valor_eclipse_page_stat_item", "codex_of_valor_magic_page_stat_item", "codex_of_valor_melee_page_stat_item", "codex_of_valor_nobility_page_stat_item", "codex_of_valor_puppetry_page_stat_item", "codex_of_valor_thievery_page_stat_item", "codex_of_valour_stat_item", "empyrean_codex_stat_item", "folklore_motif_index_arcane_luck_stat_item", "folklore_motif_index_arcane_power_stat_item", "folklore_motif_index_draconic_luck_stat_item", "folklore_motif_index_draconic_power_stat_item", "folklore_motif_index_forgotten_luck_stat_item", "folklore_motif_index_forgotten_power_stat_item", "folklore_motif_index_physical_luck_stat_item", "folklore_motif_index_physical_power_stat_item", "folklore_motif_index_shadow_luck_stat_item", "folklore_motif_index_shadow_power_stat_item", "regal_charm_codex_stat_item", "rift_luck_codex_stat_item"] }, { id: "equipment", name: "Equipment", type: "special", subtype: "equipment", key: "equipment", items: ["desert_warpath_victory_stat_item", "high_altitude_license_stat_item", "iceberg_drill_level_four_stat_item", "iceberg_drill_level_one_stat_item", "iceberg_drill_level_three_stat_item", "iceberg_drill_level_two_stat_item", "labyrinth_lantern", "large_waste_barrel_stat_item", "marketplace_buy_regal_stool_collectible", "marketplace_sell_regal_display_case_collectible", "moussu_picchu_fealty_stat_item", "moussu_picchu_scholar_stat_item", "moussu_picchu_tech_stat_item", "null_gauntlet_stat_item", "rift_chronometer_stat_item"] }, { id: "currency", name: "Currency", type: "special", subtype: "currency", key: "currency", items: ["amber_queso_stat_item", "ancient_relic_collectible", "arcane_sunstone_stat_item", "blood_stone_stat_item", "cloudstone_bangle_stat_item", "crop_coin_stat_item", "cursed_gold_stat_item", "dawn_dust_stat_item", "diamond_ice_drill_tip_stat_item", "dragonhide_sliver_stat_item", "dragons_breath_opal_stat_item", "droid_bird_stat_item", "empyrean_seal_stat_item", "enchanted_wing_stat_item", "floating_trap_upgrade_stat_item", "flour_stat_item", "fools_gold_stat_item", "gauntlet_elixir_stat_item", "gilded_coin_stat_item", "gnawbel_prize_stat_item", "golden_goose_egg_stat_item", "golden_goose_stat_item", "howlite_stat_item", "hydro_geyser_trap_stat_item", "magic_cork_dust_stat_item", "meteoric_core_fragments_stat_item", "mythical_dragon_heart_stat_item", "nachore_stat_item", "physical_geyser_trap_stat_item", "pond_penny_stat_item", "prize_credit_stat_item", "raw_ancient_jade_stat_item", "raw_rift_crystal_stat_item", "rift_circuitry_stat_item", "rift_clockwork_cog_stat_item", "rift_gaunt_upgrade_a_stat_item", "rift_gaunt_upgrade_b_stat_item", "rift_sprocket_stat_item", "sand_dollar_stat_item", "shade_eclipse_resource_stat_item", "shadow_moonstone_stat_item", "silver_bolt_stat_item", "sky_pirate_seal_stat_item", "sky_sprocket_stat_item", "skysoft_silk_stat_item", "sorcerers_sapphire_stat_item", "tactical_geyser_trap_stat_item", "tattered_celestial_skin_pattern_stat_item", "temporal_rune_stat_item", "total_eclipse_resource_stat_item", "tournament_token_mega_stat_item", "tournament_token_stat_item", "war_scrap_stat_item"] }, { id: "plankrun", name: "Plankrun Pages", type: "plankrun", subtype: "general", key: "plankrun", items: ["rift_notes_1_torn_page", "dojo_torn_page", "back_cover_torn_page", "dark_magi_torn_page", "deep_mouse_torn_page", "king_scarab_torn_page", "shattered_carmine_2_torn_page", "shattered_carmine_1_torn_page", "rift_notes_2_torn_page", "whisker_woods_rift_torn_page", "rift_notes_3_torn_page", "gnawnia_torn_page", "front_cover_torn_page"] }];
}
});
var getItems, getProgress, makeProgressString, makeCategory, makeItem2, makeContent, addCategoryAndItems, isOwnProfile, items3, run, init75, ultimate_checkmark_default2, init_ultimate_checkmark2 = __esm({
"src/modules/ultimate-checkmark/index.js"() {
init_utils2();
init_settings30();
init_styles67();
init_ultimate_checkmark();
getItems = (_0, _1, _2, ..._3) => __async(void 0, [_0, _1, _2, ..._3], function* (required, queryTab, queryTag, allItems3 = []) {
var _a;
if (!allItems3.length) {
let inventoryData = yield doRequest("managers/ajax/pages/page.php", {
page_class: "Inventory",
"page_arguments[legacyMode]": "",
"page_arguments[tab]": queryTab,
"page_arguments[sub_tab]": "false"
}), specialTab = (((_a = inventoryData == null ? void 0 : inventoryData.page) == null ? void 0 : _a.tabs) || []).find((tab) => queryTab === tab.type);
if (!specialTab || !specialTab.subtabs || !specialTab.subtabs.length || !specialTab.subtabs[0].tags)
return [];
let owned = specialTab.subtabs[0].tags.filter((tag) => queryTag === tag.type);
if (!owned || !owned.length || !owned[0].items)
return [];
allItems3 = owned[0].items;
}
return required.forEach((requiredItem) => {
if (!allItems3.find((i) => i.type === requiredItem)) {
let itemToAdd = items3.find((i) => i.type === requiredItem);
if (!itemToAdd)
return;
allItems3.push({
name: itemToAdd.name,
name_formatted: itemToAdd.name,
type: itemToAdd.type,
item_id: itemToAdd.id,
quantity: 0,
quantity_formatted: "0",
thumbnail: itemToAdd.images.thumbnail
});
}
}), allItems3 = allItems3.map((item) => (item.item_id || (item = items3.find((i) => i.type === item.type)), {
item_id: item.item_id,
type: item.type,
name: item.name,
thumbnail: item.thumbnail_gray || item.thumbnail,
quantity: item.quantity || 0,
quantity_formatted: item.quantity_formatted || "0",
le: !required.includes(item.type)
})), allItems3.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0), allItems3;
}), getProgress = (items6, required) => {
let le = 0, requiredCompleted = 0;
return items6.forEach((item) => {
item.quantity <= 0 || (item.le ? item.le && le++ : requiredCompleted++);
}), {
checkmark: required.total >= requiredCompleted,
completed: requiredCompleted,
required: required.length,
le
};
}, makeProgressString = (progress) => {
let { completed, required, le } = progress, text = `${completed} of ${required}`;
return le && le > 0 && (text += ` (+${le} LE)`), text;
}, makeCategory = (category, name, progress) => {
if (document.querySelector(`.hunterProfileItemsView-category[data-category="${category}"]`))
return;
let sidebar = document.querySelector(".hunterProfileItemsView-directory");
if (!sidebar)
return;
let catSidebarCategory = makeElement("a", "hunterProfileItemsView-category");
progress.completed === progress.required && catSidebarCategory.classList.add("complete"), catSidebarCategory.title = name, catSidebarCategory.href = "#", catSidebarCategory.setAttribute("data-category", category), catSidebarCategory.addEventListener("click", () => (hg.views.HunterProfileItemsView.showCategory(category), !1));
let catSidebarCategoryMargin = makeElement("div", "hunterProfileItemsView-category-margin");
makeElement("div", "hunterProfileItemsView-category-name", name, catSidebarCategoryMargin), makeElement("div", "hunterProfileItemsView-category-progress", makeProgressString(progress), catSidebarCategoryMargin), makeElement("div", "hunterProfileItemsView-category-status", "", catSidebarCategoryMargin), catSidebarCategory.append(catSidebarCategoryMargin), sidebar.append(catSidebarCategory);
}, makeItem2 = (item) => {
let { item_id, type: type2, name, thumbnail, quantity, quantity_formatted, le } = item, itemDiv = makeElement("div", "hunterProfileItemsView-categoryContent-item");
quantity > 0 ? (itemDiv.classList.add("collected"), le && itemDiv.classList.add("limited_edition")) : (itemDiv.classList.add("uncollected"), itemDiv.classList.add("hidden")), itemDiv.setAttribute("data-id", item_id), itemDiv.setAttribute("data-type", type2);
let itemPadding = makeElement("div", "hunterProfileItemsView-categoryContent-item-padding");
itemPadding.addEventListener("click", () => {
hg.views.ItemView.show(type2);
});
let itemImage = makeElement("div", "itemImage");
itemImage.style.backgroundImage = `url(${thumbnail})`, quantity > 0 && makeElement("div", "quantity", quantity_formatted, itemImage);
let itemName = makeElement("div", "hunterProfileItemsView-categoryContent-item-name");
return makeElement("span", "", name, itemName), itemPadding.append(itemImage), itemPadding.append(itemName), itemDiv.append(itemPadding), itemDiv;
}, makeContent = (id, name, items6, completed) => {
let content = document.querySelector(".hunterProfileItemsView-content-padding");
if (!content || document.querySelector(`.hunterProfileItemsView-categoryContent[data-category="${id}"]`))
return;
let categoryDiv = makeElement("div", "hunterProfileItemsView-categoryContent");
completed && categoryDiv.classList.add("collected"), categoryDiv.setAttribute("data-category", id);
let nameDiv = makeElement("div", "hunterProfileItemsView-categoryContent-name", name), itemsDiv = document.createElement("div");
items6.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0), items6.forEach((item) => {
itemsDiv.append(makeItem2(item));
}), categoryDiv.append(nameDiv), categoryDiv.append(itemsDiv), content.append(categoryDiv);
}, addCategoryAndItems = (required, type2, subtype, key, name) => __async(void 0, null, function* () {
if (document.querySelector(`.hunterProfileItemsView-category[data-category="${key}"]`))
return !1;
let items6 = yield getItems(required, type2, subtype), progress = getProgress(items6, required);
return makeCategory(key, name, progress), makeContent(key, name, items6, progress.completed), !0;
}), isOwnProfile = () => {
var _a, _b;
if (!((_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.getQueryParams))
return !1;
let params = hg.utils.PageUtil.getQueryParams();
return !params || !params.snuid ? !1 : params.snuid === user.sn_user_id;
}, run = () => __async(void 0, null, function* () {
if (!(getCurrentPage() !== "hunterprofile" || getCurrentTab() !== "items" || !isOwnProfile())) {
items3 || (items3 = yield getData("items"));
for (let category of ultimate_checkmark_default)
getSetting(`ultimate-checkmark.show-${category.id}`, !0) && (yield addCategoryAndItems(category.items, category.type, category.subtype, category.key, category.name));
}
}), init75 = () => __async(void 0, null, function* () {
addStyles(styles_default66, "ultimate-checkmark"), onNavigation(run, {
page: "hunterprofile",
tab: "items",
onLoad: !0
});
}), ultimate_checkmark_default2 = {
id: "ultimate-checkmark",
type: "feature",
alwaysLoad: !0,
load: init75,
settings: settings_default29
};
}
});
var settings_default30, init_settings31 = __esm({
"src/modules/custom-background/settings/index.js"() {
init_backgrounds3();
settings_default30 = () => __async(void 0, null, function* () {
let gradientOptions = backgrounds_default3.map((gradient) => ({
name: gradient.name,
value: gradient.id
})), options2 = [
{ name: "Default", value: "default" },
{
name: "Events",
value: "group",
options: [
{ name: "Birthday", value: "birthday" },
{ name: "Great Winter Hunt", value: "great_winter_hunt" },
{ name: "Halloween", value: "halloween" },
{ name: "King's Giveaway", value: "kings_giveaway" },
{ name: "Lunar New Year", value: "lunar_new_year" },
{ name: "Spring Egg Hunt", value: "spring_hunt" },
{ name: "Valentine's", value: "valentines" }
]
},
{
name: "Color",
value: "group",
options: [
{ name: "Blue", value: "background-color-blue" },
{ name: "Cyan", value: "background-color-cyan" },
{ name: "Green", value: "background-color-green" },
{ name: "Pink", value: "background-color-pink" },
{ name: "Purple", value: "background-color-purple" },
{ name: "Red", value: "background-color-red" },
{ name: "Faded", value: "background-color-faded" }
]
},
{
name: "Other",
value: "group",
options: gradientOptions
}
];
return [{
id: "custom-background",
title: 'Custom Background <a class="mh-improved-custom-bg-preview hidden">Preview choices</a>',
default: [options2[0]],
description: "Change the background to an event background, color, or gradient.",
settings: {
type: "multi-select",
number: 1,
options: options2
}
}];
});
}
});
var styles_default67, init_styles68 = __esm({
"src/modules/custom-background/styles.css"() {
styles_default67 = `body.mh-improved-bg-background-color-blue .pageFrameView-contentContainer{background-color:#bad4ed}body.mh-improved-bg-background-color-blue .pageFrameView-column.right,body.mh-improved-bg-background-color-blue .pageFrameView-column.left{background:#bad4ed;border:none}body.mh-improved-bg-background-color-cyan .pageFrameView-contentContainer{background-color:#abdbd3}body.mh-improved-bg-background-color-cyan .pageFrameView-column.right,body.mh-improved-bg-background-color-cyan .pageFrameView-column.left{background:#e8c6eb;border:none}body.mh-improved-bg-background-color-green .pageFrameView-contentContainer{background-color:#b4dbb8}body.mh-improved-bg-background-color-green .pageFrameView-column.right,body.mh-improved-bg-background-color-green .pageFrameView-column.left{background:#b4dbb8;border:none}body.mh-improved-bg-background-color-pink .pageFrameView-contentContainer{background-color:#e8c6eb}body.mh-improved-bg-background-color-pink .pageFrameView-column.right,body.mh-improved-bg-background-color-pink .pageFrameView-column.left{background:#e8c6eb;border:none}body.mh-improved-bg-background-color-purple .pageFrameView-contentContainer{background-color:#d8caf3}body.mh-improved-bg-background-color-purple .pageFrameView-column.right,body.mh-improved-bg-background-color-purple .pageFrameView-column.left{background:#d8caf3;border:none}body.mh-improved-bg-background-color-red .pageFrameView-contentContainer{background-color:#f2c7c5}body.mh-improved-bg-background-color-red .pageFrameView-column.right,body.mh-improved-bg-background-color-red .pageFrameView-column.left{background:#f2c7c5;border:none}body.mh-improved-bg-background-color-faded .pageFrameView-contentContainer{background-color:#fff4c5}body.mh-improved-bg-background-color-faded .pageFrameView-column.right,body.mh-improved-bg-background-color-faded .pageFrameView-column.left{background:#fff4c5;border:none}#mousehunt-improved-settings-feature-custom-hud .PagePreferences__settingLabel,#mousehunt-improved-settings-feature-custom-background .PagePreferences__settingLabel{position:relative}.mh-improved-custom-hud-preview,.mh-improved-custom-camp-bg-preview,.mh-improved-custom-bg-preview{position:absolute;top:0;right:225px;bottom:0;display:flex;align-items:center;font-size:12px}.mh-improved-custom-background-gradient-preview{display:grid;grid-template-columns:1fr 1fr;gap:20px;height:80vh;padding-right:10px;margin-top:20px;margin-right:-10px;overflow:auto}.mh-improved-custom-background-gradient-preview .gradient{display:flex;flex-direction:column;place-content:center space-between;align-items:center;width:100%;height:200px;padding:10px 0;border:1px solid #626262;border-radius:5px}.mh-improved-custom-background-gradient-preview .name{font-size:22px;font-weight:900;color:#fff;text-align:center;text-shadow:0 1px 2px #000}.mh-improved-custom-preview-popup-custom-hud .mh-improved-custom-background-gradient-preview .gradient{height:55px}.mh-improved-custom-preview-popup-custom-hud .mh-improved-custom-background-gradient-preview .name{font-size:18px}.mh-improved-custom-background-gradient-preview .mh-improved-custom-bg-action-button{margin:0 3px}.mh-improved-custom-background-gradient-preview .gradient.custom-preview{background-color:#a9a9a9}
`;
}
});
var possibleClasses, addBodyClass2, listenForPreferenceChanges2, addPreview, persistBackground2, init76, custom_background_default, init_custom_background = __esm({
"src/modules/custom-background/index.js"() {
init_utils2();
init_backgrounds3();
init_settings31();
init_styles68();
possibleClasses = [], addBodyClass2 = (preview = !1) => {
let body = document.querySelector("body");
if (!body)
return;
let setting = getSetting("custom-background-0", "default");
preview && (setting = preview);
let style = document.querySelector("#mh-improved-custom-background-style");
if (style && style.remove(), setting === "default")
return;
possibleClasses.forEach((className) => {
body.classList.remove(className);
});
let background = `mh-improved-bg-${setting}`;
if (body.classList.remove("kings_giveaway"), body.classList.add(background, setting), addedClass = [background, setting], setting.startsWith("background-color-") && (body.classList.remove(setting), body.classList.add(background), addedClass = background), !backgrounds_default3)
return;
let gradient = backgrounds_default3.find((g) => g.id === setting);
if (!gradient)
return;
body.classList.add("mh-improved-custom-background");
let gradientStyle = document.createElement("style");
gradientStyle.id = "mh-improved-custom-background-style", gradientStyle.innerHTML = `.mh-improved-custom-background-gradient-preview,
body.${background} .pageFrameView-column.right.right,
body.${background} .pageFrameView-column.left.left {
background-color: transparent !important;
background-image: none !important;
}
@media only screen and (max-width: 1000px) {
body.${background}.hasSidebar .pageFrameView,
body.${background} .pageFrameView-column.right.right,
body.${background} .pageFrameView-column.left.left {
background-color: transparent !important;
background-image: none !important;
}
}
body.${background} {
background: ${gradient.css};
background-attachment: fixed;
}`, document.head.append(gradientStyle);
}, listenForPreferenceChanges2 = () => {
let input = document.querySelector("#mousehunt-improved-settings-design-custom-background select");
input && input.addEventListener("change", () => {
addBodyClass2();
});
}, addPreview = () => {
addSettingPreview({
id: "custom-background",
selector: ".mh-improved-custom-bg-preview",
inputSelector: "#mousehunt-improved-settings-design-custom-background select",
items: backgrounds_default3,
previewCallback: (selected) => addBodyClass2(selected)
});
}, persistBackground2 = () => {
addBodyClass2(), onNavigation(() => {
addBodyClass2(), setTimeout(addBodyClass2, 250), setTimeout(addBodyClass2, 500);
}), addPreview(), onNavigation(() => {
setMultipleTimeout(listenForPreferenceChanges2, [250, 500, 1e3, 2e3, 5e3]), addPreview();
}, { page: "preferences" });
}, init76 = () => __async(void 0, null, function* () {
addStyles(styles_default67, "custom-background"), possibleClasses = (yield settings_default30())[0].settings.options.reduce((acc, option) => option.value === "group" ? [...acc, ...option.options.map((subOption) => subOption.value)] : [...acc, option.value], []), persistBackground2();
}), custom_background_default = {
id: "custom-background",
type: "design",
alwaysLoad: !0,
load: init76,
settings: settings_default30
};
}
});
var init77, onboarding_default, init_onboarding2 = __esm({
"src/modules/onboarding/index.js"() {
init_utils2();
init77 = () => __async(void 0, null, function* () {
addOnboardingMessage({
step: "mh-improved-onboarding-1",
page: "camp",
highlightSelector: ".mousehunt-improved-icon-menu",
content: "Welcome to MouseHunt Improved! You can quickly get to the settings using this icon.",
direction: "bottom",
showOverlay: !0
}), addOnboardingMessage({
step: "mh-improved-onboarding-2",
page: "preferences",
highlightSelector: "#mousehunt-improved-settings-better",
content: "Here you can toggle features and customize things to your liking.",
direction: "top",
showOverlay: !0
});
}), onboarding_default = {
id: "onboarding",
type: "required",
alwaysLoad: !0,
load: init77
};
}
});
var legacy_styles_default2, init_legacy_styles2 = __esm({
"src/modules/big-timer/legacy-styles.css"() {
legacy_styles_default2 = `.big-timer.huntersHornView__timer.huntersHornView__timer.countdown:after{content:""}.big-timer.huntersHornView__timer.huntersHornView__timer--legacy.countdown .huntersHornView__timerState--type-countdown:before{content:""}.big-timer.huntersHornView__timer.huntersHornView__timer.countdown{position:absolute;top:60px;left:270px;z-index:100;padding:2px;background-color:#d9c9a0;border-radius:5px;box-shadow:0 -1px #ded9c3;transform:scale(2.6)}
`;
}
});
var styles_default68, init_styles69 = __esm({
"src/modules/big-timer/styles.css"() {
styles_default68 = `.big-timer.huntersHornView__timer.huntersHornView__timer.countdown{position:absolute;top:40px;left:185px;z-index:100;transform:scale(2.2)}.big-timer.huntersHornView__timer.huntersHornView__timer.countdown:after{position:absolute;top:6px;right:5px;left:5px;font-size:14px;text-align:center;content:"Next Hunt";background:linear-gradient(180deg,#fef2b8,#ecdfae)}
`;
}
});
var toggleBigTimer, init78, big_timer_default, init_big_timer = __esm({
"src/modules/big-timer/index.js"() {
init_utils2();
init_legacy_styles2();
init_styles69();
toggleBigTimer = () => {
let timer = document.querySelector(".huntersHornView__timer");
if (!timer)
return;
let isBigTimer = timer.classList.contains("big-timer");
timer.addEventListener("click", () => {
isBigTimer = !isBigTimer, timer.classList.toggle("big-timer", isBigTimer);
});
}, init78 = () => __async(void 0, null, function* () {
addStyles([
styles_default68,
isLegacyHUD() ? legacy_styles_default2 : ""
], "experiment-big-timer"), toggleBigTimer(), setTimeout(toggleBigTimer, 1e3);
}), big_timer_default = {
id: "big-timer",
name: "Big Timer",
type: "feature",
default: !1,
description: "Click the timer to toggle between normal and big sizes.",
load: init78
};
}
});
var actions_default, init_actions = __esm({
"src/modules/keyboard-shortcuts/actions.js"() {
init_utils2();
actions_default = () => {
let shortcuts = [
{
id: "goto-travel",
key: "t",
description: "Travel",
action: () => setPage("Travel"),
category: "navigation"
},
{
id: "goto-camp",
key: "j",
description: "Camp",
action: () => setPage("Camp"),
category: "navigation"
},
{
id: "goto-friends",
key: "f",
description: "Friends",
action: () => setPage("Friends"),
category: "navigation"
},
{
id: "goto-shops",
key: "s",
description: "Shops",
action: () => setPage("Shops"),
category: "navigation"
},
{
id: "goto-profile",
key: "p",
description: "Your Hunter Profile",
action: () => setPage("HunterProfile"),
category: "navigation"
},
{
id: "goto-send-supplies",
description: "Send Supplies",
action: () => setPage("SupplyTransfer"),
category: "navigation"
},
{
id: "goto-scoreboards",
description: "Scoreboards",
action: () => setPage("Scoreboards"),
category: "navigation"
},
{
id: "goto-team",
description: "Team",
action: () => setPage("Team"),
category: "navigation"
},
{
id: "goto-tournaments",
description: "Tournaments",
action: () => setPage("Tournament"),
category: "navigation"
},
{
id: "goto-wiki",
description: "Wiki",
action: () => setPage("Wiki"),
category: "navigation"
},
{
id: "goto-marketplace",
description: "Open the Marketplace",
action: () => {
var _a, _b;
return ((_b = (_a = hg == null ? void 0 : hg.views) == null ? void 0 : _a.MarketplaceView) == null ? void 0 : _b.show) && hg.views.MarketplaceView.show();
},
category: "open-dialog"
},
{
id: "open-inbox",
description: "Open the Inbox",
action: () => {
var _a, _b;
return ((_b = (_a = messenger == null ? void 0 : messenger.UI) == null ? void 0 : _a.notification) == null ? void 0 : _b.togglePopup) && messenger.UI.notification.togglePopup();
},
category: "open-dialog"
},
{
id: "open-gifts",
description: "Open the Gifts popup",
action: () => {
var _a, _b;
return ((_b = (_a = hg == null ? void 0 : hg.views) == null ? void 0 : _a.GiftSelectorView) == null ? void 0 : _b.show) && hg.views.GiftSelectorView.show();
},
category: "open-dialog"
},
{
id: "open-map",
key: "m",
description: "Open your Map",
action: () => {
var _a, _b;
return ((_b = (_a = hg == null ? void 0 : hg.controllers) == null ? void 0 : _a.TreasureMapController) == null ? void 0 : _b.show) && hg.controllers.TreasureMapController.show();
},
category: "open-dialog"
},
{
id: "open-map-invites",
key: "i",
description: "Open your Map Invites",
action: () => {
var _a, _b;
return ((_b = (_a = hg == null ? void 0 : hg.controllers) == null ? void 0 : _a.TreasureMapController) == null ? void 0 : _b.showCommunity) && hg.controllers.TreasureMapController.showCommunity();
},
category: "open-dialog"
},
{
id: "open-travel-window",
description: "Open the Travel Window",
action: () => doEvent2("mh-improved-open-travel-window"),
category: "open-dialog"
},
{
id: "change-weapon",
key: "w",
description: "Change Weapon",
action: () => hg.views.TrapSelectorView().show("weapon"),
category: "trap-setup"
},
{
id: "change-base",
key: "b",
description: "Change Base",
action: () => hg.views.TrapSelectorView().show("base"),
category: "trap-setup"
},
{
id: "change-charm",
key: "r",
description: "Change Charm",
action: () => hg.views.TrapSelectorView().show("trinket"),
category: "trap-setup"
},
{
id: "change-cheese",
key: "c",
description: "Change Cheese",
action: () => hg.views.TrapSelectorView().show("bait"),
category: "trap-setup"
},
{
id: "change-skin",
description: "Change Trap Skin",
action: () => hg.views.TrapSelectorView().show("skin"),
category: "trap-setup"
},
{
id: "show-tem",
key: "e",
description: 'Show the <abbr title="Trap Effectiveness Meter">TEM</abbr>',
/**
* Show the TEM.
*/
action: () => {
let tem = document.querySelector("button.campPage-trap-trapEffectiveness.campPage-trap-statsContainer");
tem && tem.click();
},
category: "trap-setup"
},
{
id: "disarm-cheese",
description: "Disarm your Cheese",
action: () => {
var _a, _b, _c, _d;
return ((_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.TrapControl) == null ? void 0 : _b.disarmBait) && ((_d = (_c = hg == null ? void 0 : hg.utils) == null ? void 0 : _c.TrapControl) == null ? void 0 : _d.go) && hg.utils.TrapControl.disarmBait() && hg.utils.TrapControl.go();
},
category: "trap-setup"
},
{
id: "disarm-charm",
description: "Disarm your Charm",
action: () => {
var _a, _b, _c, _d;
return ((_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.TrapControl) == null ? void 0 : _b.disarmBait) && ((_d = (_c = hg == null ? void 0 : hg.utils) == null ? void 0 : _c.TrapControl) == null ? void 0 : _d.go) && hg.utils.TrapControl.disarmBait() && hg.utils.TrapControl.go();
},
category: "trap-setup"
},
{
id: "travel-to-previous-location",
description: "Travel to previous location",
action: () => doEvent2("mh-improved-goto-previous-location"),
category: "misc"
},
{
id: "toggle-inventory-lock",
description: "Toggle Inventory Lock & Hide",
action: () => doEvent2("mh-improved-toggle-inventory-lock"),
category: "misc"
},
{
id: "favorite-setups",
description: "Open Favorite Setups",
action: () => doEvent2("mh-improved-toggle-favorite-setups"),
category: "trap-setup"
}
];
return hasMiniCRE() && shortcuts.push({
id: "show-mini-cre",
key: "l",
description: "Open Mini CRE",
/**
* Show the Mini CRE.
*/
action: () => {
let minluckButton = document.querySelector(".min-luck-button");
minluckButton && minluckButton.click();
},
category: "misc"
}), shortcuts;
};
}
});
var styles_default69, init_styles70 = __esm({
"src/modules/keyboard-shortcuts/styles.css"() {
styles_default69 = `.mh-ui-keyboard-shortcuts-popup-content h2{margin-bottom:10px}.mh-ui-keyboard-shortcut{display:flex;align-items:center;justify-content:space-between;padding:5px;font-size:12px;border-bottom:1px solid #ccc}.mh-ui-keyboard-shortcut:last-child{border-bottom:none}.mh-ui-keyboard-shortcut .description{flex-grow:1;font-size:11px}.mh-ui-keyboard-shortcut kbd{width:175px;height:11px;padding:3px;font-family:monospace;font-size:12px;text-align:center;white-space:nowrap;background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;box-shadow:0 1px #0003,0 0 0 2px #fff inset}.mh-ui-keyboard-shortcut .edit-controls{margin-right:10px}.mh-ui-keyboard-shortcut .edit-controls a{display:none}.mh-ui-keyboard-shortcut .edit-controls .edit,.mh-ui-keyboard-shortcuts-popup-content.editing .mh-ui-keyboard-shortcut.editing .edit-controls a,.mh-ui-keyboard-shortcut:focus .edit-controls .reset,.mh-ui-keyboard-shortcut:active .edit-controls .reset,.mh-ui-keyboard-shortcut:focus .edit-controls .edit,.mh-ui-keyboard-shortcut:active .edit-controls .edit,.mh-ui-keyboard-shortcut:focus .edit-controls .clear,.mh-ui-keyboard-shortcut:active .edit-controls .clear,.mh-ui-keyboard-shortcut.editing .edit-controls .edit{display:inline-block;margin-left:10px}.mh-ui-keyboard-shortcuts-popup-content.editing .mh-ui-keyboard-shortcut .edit-controls a{display:none}.mh-ui-keyboard-shortcut.saved kbd{background-color:#baf3ba;box-shadow:0 1px #0003,0 0 0 2px #daffda inset}.mh-ui-keyboard-shortcut.error kbd{background-color:#fda0a0;box-shadow:0 1px #0003,0 0 0 2px #ff8e8e inset}.mh-ui-keyboard-shortcut.editing kbd{background-color:#cce8ff;box-shadow:0 1px #0003,0 0 0 2px #acd9ff inset}.mh-ui-keyboard-shortcut.editing .description{color:#3b5998}.mh-ui-keyboard-shortcut.editing{background-color:#eff8ff}.mh-ui-keyboard-shortcuts-popup-content-category summary{padding:10px;font-size:14px;background-color:#eee}.mh-ui-keyboard-shortcuts-popup-content-category{margin:10px 0;border:1px solid #929292}.mh-ui-keyboard-shortcut:nth-child(2n){background-color:#eee}.mh-ui-keyboard-shortcuts-popup-content-category-list{border-top:1px solid #929292}
`;
}
});
var getBaseShortcuts, getShortcuts, saveShortcut, getKeyForDisplay, isHelpPopupOpen, showHelpPopup, isEditing2, listenForKeypresses, openFromSettings, init79, keyboard_shortcuts_default, init_keyboard_shortcuts = __esm({
"src/modules/keyboard-shortcuts/index.js"() {
init_utils2();
init_actions();
init_styles70();
getBaseShortcuts = () => [
{
id: "help",
key: "?",
shiftKey: !0,
description: "Help",
action: showHelpPopup,
category: "hidden"
},
{
id: "close-popup",
key: "Escape",
description: "Close the current popup",
/**
* Close the current popup.
*/
action: () => {
activejsDialog && activejsDialog.hide && activejsDialog.hide();
},
category: "hidden"
},
...actions_default()
], getShortcuts = () => {
let shortcuts = getBaseShortcuts(), saved = getSetting("keyboard-shortcuts.shortcuts", []);
return !saved || !saved.length || saved.forEach((savedShortcut) => {
let shortcut = shortcuts.find((s) => s.id === savedShortcut.id);
shortcut && (shortcut.key = savedShortcut.key, shortcut.ctrlKey = savedShortcut.ctrlKey, shortcut.metaKey = savedShortcut.metaKey, shortcut.altKey = savedShortcut.altKey, shortcut.shiftKey = savedShortcut.shiftKey);
}), shortcuts;
}, saveShortcut = (shortcutId, shortcutKey) => {
let saved = getSetting("keyboard-shortcuts.shortcuts", []);
(!saved || !saved.length) && (saved = []);
let toSave = {
id: shortcutId,
key: shortcutKey.key,
ctrlKey: shortcutKey.ctrlKey,
metaKey: shortcutKey.metaKey,
altKey: shortcutKey.altKey,
shiftKey: shortcutKey.shiftKey
};
saved.find((s) => s.id === shortcutId) && (saved = saved.filter((s) => s.id !== shortcutId)), toSave.key !== "Backspace" && toSave.key !== "Delete" && toSave.key !== " " && saved.push(toSave), saveSetting("keyboard-shortcuts.shortcuts", saved);
let savedElement = document.querySelector(`.mh-ui-keyboard-shortcut[data-shortcut-id="${shortcutId}"]`);
savedElement && (savedElement.classList.add("saved"), setTimeout(() => {
savedElement.classList.remove("saved");
}, 300));
}, getKeyForDisplay = (keyEvent) => {
let keyString = "", keysToShow = [];
switch (keyEvent.metaKey && keysToShow.push(isAppleOS() ? "\u2318" : "\u229E"), keyEvent.ctrlKey && keysToShow.push(isAppleOS() ? "\u2303" : "Ctrl"), keyEvent.altKey && keysToShow.push(isAppleOS() ? "\u2325" : "Alt"), keyEvent.shiftKey && keysToShow.push("Shift"), keyEvent.key) {
case " ":
keysToShow.push("Space");
break;
case "ArrowUp":
keysToShow.push("\u2191");
break;
case "ArrowDown":
keysToShow.push("\u2193");
break;
case "ArrowLeft":
keysToShow.push("\u2190");
break;
case "ArrowRight":
keysToShow.push("\u2192");
break;
case "Backspace":
keysToShow.push("");
break;
default:
keyEvent.key && keyEvent.key.length === 1 ? keysToShow.push(keyEvent.key.toUpperCase()) : keysToShow.push(keyEvent.key);
break;
}
return keyString = keysToShow.join('<span class="connector"> + </span>'), keyString;
}, isHelpPopupOpen = () => getCurrentDialog() === "mh-ui-keyboard-shortcuts-popup", showHelpPopup = () => {
if (activejsDialog && activejsDialog.hide) {
if (isHelpPopupOpen()) {
activejsDialog.hide();
return;
}
activejsDialog.hide();
}
let shortcuts = getShortcuts(), innerContent = "";
[
{
id: "navigation",
name: "Page Navigation",
startOpen: !0
},
{
id: "open-dialog",
name: "Open Dialogs/Popups",
startOpen: !0
},
{
id: "trap-setup",
name: "Modify Trap Setup",
startOpen: !1
},
{
id: "misc",
name: "Miscellaneous",
startOpen: !1
}
].forEach((category) => {
innerContent += `<details class="mh-ui-keyboard-shortcuts-popup-content-category" ${category.startOpen ? "open" : ""}>
<summary>${category.name}</summary>
<div class="mh-ui-keyboard-shortcuts-popup-content-category-description">
${category.description || ""}
</div>
<div class="mh-ui-keyboard-shortcuts-popup-content-category-list">`;
let categoryShortcuts = shortcuts.filter((s) => s.category === category.id);
categoryShortcuts.sort((a, b) => a.description < b.description ? -1 : a.description > b.description ? 1 : 0), categoryShortcuts.forEach((shortcut) => {
shortcut.category !== "hidden" && (innerContent += `<div class="mh-ui-keyboard-shortcut" data-shortcut-id="${shortcut.id}">
<div class="description">${shortcut.description}</div>
<div class="edit-controls">
<a class="clear">Clear</a>
<a class="reset">Reset</a>
<a class="edit">Edit</a>
</div>
<kbd>${getKeyForDisplay(shortcut)}</kbd>
</div>`);
}), innerContent += "</div></details>";
});
let content = `<div class="mh-ui-keyboard-shortcuts-popup-content">
<h2 class="mh-ui-keyboard-shortcuts-edit-content">
To edit a shortcut, click on <em>Edit</em> on the shortcut, then press the key combination you want to use.
</h2>
<div class="mh-ui-keyboard-shortcuts-popup-content-list">
${innerContent}
</div>
</div>`;
createPopup({
title: "MouseHunt Improved Keyboard Shortcuts",
content,
hasCloseButton: !0,
show: !0,
className: "mh-ui-keyboard-shortcuts-popup"
});
let shortcutsWrapper = document.querySelector(".mh-ui-keyboard-shortcuts-popup-content");
document.querySelectorAll(".mh-ui-keyboard-shortcuts-popup-content-list .mh-ui-keyboard-shortcut").forEach((shortcut) => {
let shortcutId = shortcut.getAttribute("data-shortcut-id"), editButton = shortcut.querySelector(".edit"), resetButton = shortcut.querySelector(".reset"), clearButton = shortcut.querySelector(".clear"), kbd = shortcut.querySelector("kbd"), startEditing = () => {
isEditing2 = !0, editButton.innerText = "Cancel", shortcut.classList.add("editing"), shortcutsWrapper.classList.add("editing"), document.addEventListener("keydown", keypressListener);
}, finishEditing = (id = !1, key = !1) => {
isEditing2 = !1, editButton.innerText = "Edit", shortcut.classList.remove("editing"), shortcutsWrapper.classList.remove("editing"), document.removeEventListener("keydown", keypressListener), !(!id || !key) && (saveShortcut(id, key), kbd.innerHTML = getKeyForDisplay(key));
}, keypressListener = (event) => {
if (["Alt", "Shift", "Control", "Meta"].includes(event.key))
return;
let theShortcut = getShortcuts().find((s) => s.key === event.key && event.ctrlKey === (s.ctrlKey || !1) && event.metaKey === (s.metaKey || !1) && event.altKey === (s.altKey || !1) && event.shiftKey === (s.shiftKey || !1));
if (theShortcut) {
let matchingShortcut = document.querySelector(`.mh-ui-keyboard-shortcut[data-shortcut-id="${theShortcut.id}"]`);
if (!matchingShortcut)
return;
if (shortcutId === theShortcut.id) {
finishEditing(shortcutId, event);
return;
}
matchingShortcut.classList.add("error"), shortcut.classList.add("error"), setTimeout(() => {
matchingShortcut.classList.remove("error"), shortcut.classList.remove("error");
}, 300);
return;
}
finishEditing(shortcutId, event);
};
editButton.addEventListener("click", () => {
isEditing2 ? finishEditing() : startEditing();
}), resetButton.addEventListener("click", () => {
let defaultShortcut = getBaseShortcuts().find((s) => s.id === shortcutId);
defaultShortcut && finishEditing(shortcutId, defaultShortcut);
}), clearButton.addEventListener("click", () => {
finishEditing(shortcutId, {
key: "",
ctrlKey: !1,
metaKey: !1,
altKey: !1,
shiftKey: !1
});
});
});
}, isEditing2 = !1, listenForKeypresses = () => {
document.addEventListener("keydown", (event) => {
var _a, _b;
if (isHelpPopupOpen() || isEditing2 || user.has_puzzle)
return;
let tagName = (_b = (_a = event == null ? void 0 : event.target) == null ? void 0 : _a.tagName) == null ? void 0 : _b.toLowerCase();
if (tagName === "input" || tagName === "textarea" || tagName === "select")
return;
let shortcut = getShortcuts().find((s) => (s.ctrlKey = s.ctrlKey || !1, s.metaKey = s.metaKey || !1, s.altKey = s.altKey || !1, s.shiftKey = s.shiftKey || !1, s.key === event.key && s.ctrlKey === event.ctrlKey && s.metaKey === event.metaKey && s.altKey === event.altKey && s.shiftKey === event.shiftKey));
shortcut && shortcut.action && (event.preventDefault(), event.stopPropagation(), shortcut.action());
});
}, openFromSettings = () => {
if (getCurrentPage() !== "preferences")
return;
let openLink = document.querySelector(".mh-ui-keyboard-shortcuts-edit");
openLink && openLink.addEventListener("click", (event) => {
event.preventDefault(), showHelpPopup();
});
}, init79 = () => __async(void 0, null, function* () {
addStyles(styles_default69, "keyboard-shortcuts"), listenForKeypresses(), onNavigation(hasMiniCRE, {
page: "camp"
}), onNavigation(openFromSettings, {
page: "preferences",
tab: "mousehunt-improved-settings"
});
}), keyboard_shortcuts_default = {
id: "keyboard-shortcuts",
name: "Keyboard Shortcuts",
type: "feature",
default: !0,
description: "Press \u201C?\u201D to see and edit keyboard shortcuts. You can also edit them [here](#).",
load: init79
};
}
});
var settings_default31, init_settings32 = __esm({
"src/modules/custom-horn/settings/index.js"() {
settings_default31 = () => __async(void 0, null, function* () {
let options2 = [
{ name: "Default", value: "default" },
{ name: "Tournament Horn", value: "huntersHornView__horn--tournament" },
{
name: "Events",
value: "group",
options: [
{ name: "Birthday", value: "huntersHornView--seasonalEvent-birthday" },
{
name: "Great Winter Hunt",
value: "huntersHornView--seasonalEvent-greatWinterHunt"
},
{
name: "Halloween",
value: "huntersHornView--seasonalEvent-halloween"
},
{
name: "Lunar New Year",
value: "huntersHornView--seasonalEvent-lunarNewYear"
},
{
name: "Spring Egg Hunt",
value: "huntersHornView--seasonalEvent-springEggHunt"
}
]
},
{
name: "Color",
value: "group",
options: [
{ name: "Blue", value: "horn-color-blue" },
{ name: "Cyan", value: "horn-color-cyan" },
{ name: "Green", value: "horn-color-green" },
{ name: "Pink", value: "horn-color-pink" },
{ name: "Purple", value: "horn-color-purple" },
{ name: "Red", value: "horn-color-red" },
{ name: "Faded", value: "horn-color-faded" },
{ name: "Rainbow", value: "horn-color-rainbow" }
]
}
];
return [{
id: "custom-horn",
title: 'Custom Horn <span class="mh-improved-custom-horn-links"><a class="mh-improved-custom-horn-show-horn">Show Horn</a><span class="seperator">\xB7</span><a class="mh-improved-custom-horn-preview">Preview choices</a></span>',
default: [options2[0]],
description: "Change the horn to an event horn or a different color.",
settings: {
type: "multi-select",
number: 1,
options: options2
}
}];
});
}
});
var styles_default70, init_styles71 = __esm({
"src/modules/custom-horn/styles.css"() {
styles_default70 = `.mh-improved-custom-horn-preview.horn-color-blue .huntersHornView__horn,.huntersHornView.horn-color-blue .huntersHornView__horn{filter:hue-rotate(158deg)}.mh-improved-custom-horn-preview.horn-color-cyan .huntersHornView__horn,.huntersHornView.horn-color-cyan .huntersHornView__horn{filter:hue-rotate(112deg)}.mh-improved-custom-horn-preview.horn-color-green .huntersHornView__horn,.huntersHornView.horn-color-green .huntersHornView__horn{filter:hue-rotate(66deg)}.mh-improved-custom-horn-preview.horn-color-pink .huntersHornView__horn,.huntersHornView.horn-color-pink .huntersHornView__horn{filter:hue-rotate(280deg)}.mh-improved-custom-horn-preview.horn-color-purple .huntersHornView__horn,.huntersHornView.horn-color-purple .huntersHornView__horn{filter:hue-rotate(195deg)}.mh-improved-custom-horn-preview.horn-color-red .huntersHornView__horn,.huntersHornView.horn-color-red .huntersHornView__horn{filter:hue-rotate(317deg) saturate(1.6)}.mh-improved-custom-horn-preview.horn-color-faded .huntersHornView__horn,.huntersHornView.horn-color-faded .huntersHornView__horn{filter:sepia(1)}.mh-improved-custom-horn-preview.horn-color-rainbow .huntersHornView__horn,.huntersHornView.horn-color-rainbow .huntersHornView__horn{animation:mh-improved-hue-rotate 30s infinite}@media (prefers-reduced-motion: reduce){.mh-improved-custom-horn-preview.horn-color-rainbow .huntersHornView__horn,.huntersHornView.horn-color-rainbow .huntersHornView__horn{animation:none}}.mh-improved-custom-horn-links{position:absolute;top:0;right:225px;bottom:0;display:flex;align-items:center;font-size:12px}.mh-improved-custom-horn-links .seperator{width:20px;text-align:center}.mh-improved-custom-horn-preview .huntersHornView__horn{top:unset;left:unset}.custom-horn .mh-improved-custom-horn-preview{position:relative;display:flex;justify-content:center;width:100%;height:100%}.mh-improved-custom-background-gradient-preview .custom-horn.custom-preview{position:relative;height:105px;background-color:#a9a9a9;background-image:url(https://www.mousehuntgame.com/images/environments/6ef3ffe2f90a79250807b46105e77b68.jpg);background-repeat:no-repeat;background-position:-305px 0}.mh-improved-custom-background-gradient-preview .custom-horn.custom-preview .controls{z-index:1;align-self:flex-start;margin-left:5px}.mh-improved-custom-background-gradient-preview .custom-horn.custom-preview:after{position:absolute;inset:0;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/hunters_horn/backdrop.png);background-position:-305px 0;opacity:.7}.mh-improved-custom-background-gradient-preview .custom-horn .name{z-index:1;font-size:22px;font-weight:900;color:#000;text-align:center;text-shadow:0 1px 2px #fff}
`;
}
});
var addedClass2, addHornClass, listenForPreferenceChanges3, addShowHorn, persistHornClass, hornPreview, getHornSettingsValues, init80, custom_horn_default, init_custom_horn = __esm({
"src/modules/custom-horn/index.js"() {
init_utils2();
init_settings32();
init_styles71();
addedClass2 = "", addHornClass = (preview = !1) => {
let hornView = document.querySelector(".huntersHornView");
if (!hornView)
return;
let horn = document.querySelector(".huntersHornView__horn");
if (!horn)
return;
let setting = getSetting("custom-horn-0", "default");
preview && (setting = preview), setting !== "default" && [...hornView.classList].forEach((className) => {
className.includes("--seasonalEvent-") && hornView.classList.remove(className);
}), horn.classList.add("huntersHornView__horn--default"), addedClass2 && hornView.classList.remove(addedClass2), setting !== "default" && (hornView.classList.add(setting), addedClass2 = setting);
}, listenForPreferenceChanges3 = () => {
let input = document.querySelector("#mousehunt-improved-settings-design-custom-horn select");
input && input.addEventListener("change", () => {
addHornClass();
});
}, addShowHorn = () => {
let previewLink = document.querySelector(".mh-improved-custom-horn-show-horn");
if (!previewLink)
return;
let isShowing = !1, timeout = null;
previewLink.addEventListener("click", (e) => {
e.preventDefault(), e.stopPropagation();
let horn = document.querySelector(".huntersHornView__horn");
if (!horn)
return;
let backdrop = document.querySelector(".huntersHornView__backdrop");
if (backdrop) {
if (isShowing) {
isShowing = !1, previewLink.textContent = "Preview Horn", clearTimeout(timeout), horn.classList.add("huntersHornView__horn--reveal"), horn.classList.remove("huntersHornView__horn--ready"), setTimeout(() => {
backdrop.classList.remove("huntersHornView__backdrop--active");
}, 400), timeout = setTimeout(() => {
horn.classList.remove("huntersHornView__horn--reveal");
}, 1e3);
return;
}
isShowing = !0, previewLink.textContent = "Hide Horn", backdrop.classList.add("huntersHornView__backdrop--active"), horn.classList.add("huntersHornView__horn--ready", "huntersHornView__horn--reveal"), clearTimeout(timeout);
}
});
}, persistHornClass = () => {
addHornClass(), onNavigation(() => {
setTimeout(addHornClass, 1e3);
});
}, hornPreview = (horn) => `<div class="mh-improved-custom-horn-preview ${horn.id}">
<a class="huntersHornView__horn huntersHornView__horn--default huntersHornView__horn--reveal huntersHornView__horn--ready">
<div class="huntersHornView__hornImage">
<div class="huntersHornView__hornForeground"></div>
<div class="huntersHornView__hornGlint">
<div class="huntersHornView__hornGlintImage"></div>
<img class="huntersHornView__hornGlintAnimatedGif">
</div>
</div>
<div class="huntersHornView__hornBanner">
<div class="huntersHornView__hornBannerTranslate">
<div class="huntersHornView__hornBannerImage"></div>
</div>
</div>
</a>
</div>`, getHornSettingsValues = () => __async(void 0, null, function* () {
return (yield settings_default31())[0].settings.options.reduce((acc, option) => option.options && Array.isArray(option.options) ? [...acc, ...option.options] : option.value && option.name ? [...acc, option] : acc, []).map((option) => ({
id: option.value,
name: option.name
}));
}), init80 = () => __async(void 0, null, function* () {
addStyles(styles_default70, "custom-horn"), persistHornClass(), onNavigation(() => __async(void 0, null, function* () {
setMultipleTimeout(() => {
listenForPreferenceChanges3(), addShowHorn();
}, [250, 500, 1e3, 2e3, 5e3]);
let horns = yield getHornSettingsValues();
addSettingPreview({
id: "custom-horn",
selector: ".mh-improved-custom-horn-preview",
inputSelector: "#mousehunt-improved-settings-design-custom-horn select",
preview: !1,
items: horns,
itemPreviewCallback: hornPreview
});
}), {
page: "preferences",
onLoad: !0
});
}), custom_horn_default = {
id: "custom-horn",
type: "design",
alwaysLoad: !0,
load: init80,
settings: settings_default31
};
}
});
var styles_default71, init_styles72 = __esm({
"src/modules/location-catch-stats/styles.css"() {
styles_default71 = `#mh-catch-stats{position:absolute;top:25px;left:25px;z-index:150}@media screen and (prefers-reduced-motion: reduce){.mh-catch-stats-wrapper{transition:none}}.mh-catch-stats-wrapper{width:275px;background:#f6f3eb;border:1px solid #534022;box-shadow:1px 1px 1px #9d917f,1px 3px 5px #6a6969;transition:box-shadow .25s}.mh-is-dragging .mh-catch-stats-wrapper{box-shadow:1px 1px 1px #9d917f,0 7px 9px 2px #6a6969}.mh-catch-stats-header{display:flex;align-items:center;justify-content:space-between;padding:10px;color:#f6f3eb;cursor:grab;background-color:#8e6642;border-bottom:1px solid #ceb7a6}.mh-catch-stats-header h1{color:#f6f3eb}.mh-catch-stats-close{cursor:pointer}.mh-catch-stats-close:hover,.mh-catch-stats-close:focus{color:#8e6642;background-color:#eee;border-radius:50%;outline:1px solid #ccc}.mh-catch-stats-body{max-height:85vh;overflow:hidden auto}.mh-catch-stats-wrapper .mh-catch-stats:nth-child(odd){background-color:#e8e3d7}.mh-catch-stats{display:flex;align-items:center;justify-content:space-between;padding:10px;color:#000}.mh-catch-stats:hover,.mh-catch-stats-wrapper .mh-catch-stats:nth-child(odd):hover,.mh-catch-stats:focus,.mh-catch-stats-wrapper .mh-catch-stats:nth-child(odd):focus{color:#665f5f;text-decoration:none;background-color:#eee;outline:1px solid #ccc}.mh-catch-stats-image{position:relative;display:inline-block;width:40px;height:40px;vertical-align:middle;background-repeat:no-repeat;background-size:contain;border-radius:2px;box-shadow:1px 1px 1px #999}.mh-catch-stats-crown{position:absolute;right:-5px;bottom:-5px;width:20px;height:20px;background-color:#fff;background-repeat:no-repeat;background-position:50% 50%;background-size:80%;border:1px solid #333;border-radius:50%}.mh-catch-stats-name{display:inline-block;padding-left:10px;vertical-align:middle}.mh-catch-stats-catches{padding-right:5px}
`;
}
});
var settings_default32, init_settings33 = __esm({
"src/modules/location-catch-stats/settings/index.js"() {
settings_default32 = () => __async(void 0, null, function* () {
return [
{
id: "location-catch-stats.show-misses",
title: "Show number of misses"
}
];
});
}
});
var getMouseStats, buildMouseMarkup, showModal, showMisses, init81, location_catch_stats_default2, init_location_catch_stats2 = __esm({
"src/modules/location-catch-stats/index.js"() {
init_utils2();
init_styles72();
init_settings33();
getMouseStats = () => __async(void 0, null, function* () {
var _a, _b;
let data = yield doRequest("managers/ajax/mice/mouse_list.php", {
action: "get_environment",
category: user.environment_type,
user_id: user.user_id,
display_mode: "stats",
view: "ViewMouseListEnvironments"
}), mouseData = (_b = (_a = data == null ? void 0 : data.mouse_list_category) == null ? void 0 : _a.subgroups[0]) == null ? void 0 : _b.mice;
return mouseData ? (mouseData.sort((a, b) => b.num_catches - a.num_catches), mouseData != null ? mouseData : []) : [];
}), buildMouseMarkup = (mouseData) => {
let mouse = Object.assign({}, {
name: "",
type: "",
image: "",
crown: "none",
num_catches: 0
}, mouseData), mouseEl = document.createElement("a");
mouseEl.classList.add("mh-catch-stats"), mouseEl.title = mouse.name, mouseEl.addEventListener("click", () => {
var _a, _b;
((_b = (_a = hg == null ? void 0 : hg.views) == null ? void 0 : _a.MouseView) == null ? void 0 : _b.show) !== "undefined" && hg.views.MouseView.show(mouse.type);
});
let image = document.createElement("div");
if (image.classList.add("mh-catch-stats-image"), image.style.backgroundImage = `url('${mouse.image}')`, mouse.crown && mouse.crown !== "none") {
let crown = document.createElement("div");
crown.classList.add("mh-catch-stats-crown"), crown.style.backgroundImage = `url('https://www.mousehuntgame.com/images/ui/crowns/crown_${mouse.crown}.png')`, image.append(crown);
}
let name = document.createElement("div");
name.classList.add("mh-catch-stats-name"), name.innerText = mouse.name;
let imageNameContainer = document.createElement("div");
imageNameContainer.append(image), imageNameContainer.append(name), mouseEl.append(imageNameContainer);
let catches = document.createElement("div");
return catches.classList.add("mh-catch-stats-catches"), catches.innerText = mouse.num_catches, showMisses && (makeElement("span", "mh-catch-stats-separator", "/", catches), makeElement("span", "mh-catch-stats-misses", mouse.num_misses, catches)), mouseEl.append(catches), mouseEl;
}, showModal = () => __async(void 0, null, function* () {
showMisses = getSetting("location-catch-stats.show-misses", !1);
let existing = document.querySelector("#mh-catch-stats");
existing && existing.remove();
let modalWrapper = document.createElement("div");
modalWrapper.id = "mh-catch-stats";
let modal = document.createElement("div");
modal.classList.add("mh-catch-stats-wrapper");
let header = document.createElement("div");
header.classList.add("mh-catch-stats-header");
let title = document.createElement("h1");
title.innerText = "Location Catch Stats", header.append(title);
let closeIcon = document.createElementNS("http://www.w3.org/2000/svg", "svg");
closeIcon.classList.add("mh-catch-stats-close"), closeIcon.setAttribute("viewBox", "0 0 24 24"), closeIcon.setAttribute("width", "18"), closeIcon.setAttribute("height", "18"), closeIcon.setAttribute("fill", "none"), closeIcon.setAttribute("stroke", "currentColor"), closeIcon.setAttribute("stroke-width", "1.5");
let closePath = document.createElementNS("http://www.w3.org/2000/svg", "path");
closePath.setAttribute("d", "M18 6L6 18M6 6l12 12"), closeIcon.append(closePath), closeIcon.addEventListener("click", () => {
modalWrapper.remove();
}), header.append(closeIcon), modal.append(header);
let mouseBody = document.createElement("div");
mouseBody.classList.add("mh-catch-stats-body"), (yield getMouseStats()).forEach((mouseData) => {
mouseBody.append(buildMouseMarkup(mouseData, mouseBody));
}), modal.append(mouseBody), modalWrapper.append(modal), document.body.append(modalWrapper), makeElementDraggable("#mh-catch-stats", ".mh-catch-stats-header", 25, 25, "mh-catch-stats-position");
}), showMisses = !1, init81 = () => __async(void 0, null, function* () {
addStyles(styles_default71, "location-catch-stats"), addSubmenuItem({
menu: "mice",
label: "Location Catch Stats",
icon: "https://www.mousehuntgame.com/images/ui/hud/menu/prize_shoppe.png?",
callback: showModal
});
}), location_catch_stats_default2 = {
id: "location-catch-stats",
name: "Location Catch Stats",
type: "feature",
default: !0,
description: "Add a \u201CLocation Catch Stats\u201D option to the Mice menu to see your catch stats for the current location.",
load: init81,
settings: settings_default32
};
}
});
var settings_default33, init_settings34 = __esm({
"src/modules/better-shops/settings/index.js"() {
settings_default33 = () => __async(void 0, null, function* () {
return [
{
id: "better-shops.hide-max-owned",
title: "Hide items with maximum quantity owned",
default: !1
},
{
id: "better-shop.qty-buttons",
title: "Show quantity buttons",
default: !0
}
];
});
}
});
var quantity_buttons_default, init_quantity_buttons = __esm({
"src/modules/better-shops/modules/quantity-buttons/index.js"() {
init_utils2();
quantity_buttons_default = (block, input, maxQty) => __async(void 0, null, function* () {
if (block.querySelector(".mh-improved-shop-buy-controls"))
return;
maxQty = `${maxQty}`.replaceAll(",", "");
let buyControls = makeElement("div", ["mh-improved-shop-buy-controls"]);
makeMathButtons([1, 10, 50, 100, 1e3], {
appendTo: buyControls,
input,
maxQty,
classNames: ["mh-improved-shop-qty", "tiny", "lightBlue"]
});
let buyMaxButton = makeElement("a", ["mousehuntActionButton", "lightBlue", "tiny", "mh-improved-shop-buy-max"]), buyMaxButtonText = makeElement("span", "", "Max");
buyMaxButton.append(buyMaxButtonText);
let hasMaxed = !1;
buyMaxButton.addEventListener("click", () => {
hasMaxed ? (input.value = 0, buyMaxButtonText.innerText = "Max") : (input.value = maxQty, buyMaxButtonText.innerText = "Reset"), hasMaxed = !hasMaxed;
}), buyControls.append(buyMaxButton);
let form = block.querySelector(".itemPurchaseView-action-form");
form ? form.append(buyControls) : block.append(buyControls);
});
}
});
var styles_default72, init_styles73 = __esm({
"src/modules/better-shops/modules/quantity-buttons/styles.css"() {
styles_default72 = `.mh-improved-shop-buy-controls{position:absolute;top:25px;right:0;left:0;display:flex;flex:1 1 100%;flex-flow:row wrap;gap:5px;align-items:center;justify-content:flex-start;margin-top:7px;margin-left:10px}.itemPurchaseView-action-form.clear-block{position:relative;margin-bottom:40px}.mousehuntActionButton.mh-improved-shop-qty{font-family:monospace;font-size:11px}.mh-improved-shop-buy-max{min-width:25px}.mh-improved-shop-qty,.mh-improved-shop-buy-max{user-select:none}.mousehuntActionButton.mh-improved-shop-buy-max{max-width:30px;font-size:11px}
`;
}
});
var styles_default73, init_styles74 = __esm({
"src/modules/better-shops/modules/hide-max-owned/styles.css"() {
styles_default73 = `.mousehuntHud-page-subTabContent.hasShop.active .itemPurchaseView-container.own_max,.itemPurchaseView-container.marketplace_buy_regal_stool_collectible.kingsCartItem.cannot_sell.own_max,.itemPurchaseView-container.marketplace_sell_regal_display_case_collectible.kingsCartItem.cannot_sell.own_max,.itemPurchaseView-container.kings_calibrator_message_item.kingsCartItem.cannot_sell.own_max{display:none!important}
`;
}
});
var order_default, init_order = __esm({
"src/modules/better-shops/styles/order.css"() {
order_default = `.itemViewStatBlock.trinket{order:3}.itemPurchaseView-content-container{display:flex;flex-direction:column}.itemPurchaseView-content-name{order:1}.itemPurchaseView-content-details{display:flex;order:4}.itemPurchaseView-content-description{order:2}
`;
}
});
var retired_default, init_retired = __esm({
"src/modules/better-shops/styles/retired.css"() {
retired_default = `.kings_cart .hasShop .cannot_buy.super_dragonbane_trinket,.kings_cart .hasShop .cannot_buy.extrme_dragonbane_trinket,.kings_cart .hasShop .cannot_buy.wild_tonic_remote_pumping_trinket,.kings_cart .hasShop .cannot_buy.hot_spice_crafting_item,.kings_cart .hasShop .cannot_buy.flaming_spice_crafting_item,.kings_cart .hasShop .cannot_buy.dragonshard_sparkling_nest_convertible,.itemPurchaseView-container.eggstra_trinket.cannot_buy.no_gold_cost,.itemPurchaseView-container.eggstra_charge_trinket.cannot_buy.no_gold_cost{display:none!important}
`;
}
});
var general_default6, init_general6 = __esm({
"src/modules/better-shops/styles/general.css"() {
general_default6 = `.shopsPage-header-container,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-content-accordion,.itemPurchaseView-action-itemCost.required .itemPurchaseView-action-itemCost-table-cell.owned,.itemPurchaseView-container.flaming_spice_crafting_item.kingsCartItem,.itemPurchaseView-container.dragonshard_sparkling_nest_convertible.kingsCartItem,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-itemCost-description,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-itemCost-title{display:none!important}.itemPurchaseView-action-form.clear-block,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-form{display:flex;justify-content:center;margin:1em 0}.itemPurchaseView-container.own_max:hover,.itemPurchaseView-container.own_max:focus{opacity:1}.itemPurchaseView-container.own_max .itemPurchaseView-content-container .itemPurchaseView-content-description{overflow-y:auto}.itemPurchaseView-action-quantity span,.itemPurchaseView-action-purchaseHelper-maxPurchases-container,.itemPurchaseView-content-accordion,.itemPurchaseView-action-kingsCreditCostContainer,.itemPurchaseView-container.own_max .itemPurchaseView-action-purchaseHelper-maxPurchasesLimitReached,.shopCustomization .itemPurchaseView-container.own_max .itemPurchaseView-content-container .itemViewStatBlock,.shopCustomization .itemPurchaseView-container.own_max .itemViewStatBlock-stat.title,.shopCustomization .itemPurchaseView-container.own_max .itemViewStatBlock-stat.powerType,.itemPurchaseView-content-skin b,a.itemPurchaseView-image-trapPreview-link,.itemPurchaseView-action-itemCost-title,.itemPurchaseView-action-itemCost-description{display:none}.itemPurchaseView-content-skin{margin-top:-10px;margin-bottom:5px}.itemPurchaseView-content-description{padding-right:5px;padding-bottom:10px;margin-top:0;margin-bottom:0;overflow-y:auto;color:#626262}.itemPurchaseView-action-itemCost-table{width:250px;padding:0;margin-right:-10px;margin-left:-10px;background:#f9f9f9;border-right:none;border-left:none}.itemPurchaseView-action-itemCost-table-cell.cost{padding-left:11px;background-position:0 0;background-size:10px}.itemPurchaseView-action-itemCost-table-row.error{background-color:#ffadad8c}.mh-dark-mode .itemPurchaseView-action-itemCost-table-row.error{background-color:#802d2d8c}.mh-dark-mode .itemPurchaseView-action-itemCost-table-row.error .itemPurchaseView-action-itemCost-table-cell.cost{color:#f66060}.itemPurchaseView-container.own_max .itemPurchaseView-action-container{display:none}.itemPurchaseView-container{width:calc(100% - 1px)}.itemPurchaseView-action-container{padding:8px 0 0;border-right:1px solid #ccc}#overlayPopup .marketplaceView input.button:first-child{position:absolute;top:-3px!important;right:-10px!important;display:block;width:28px;height:27px;padding:0;overflow:hidden;text-align:center;text-indent:34px;background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/jsDialogCloseButton.png);background-repeat:no-repeat;border:none;border-bottom:0;border-left:0;box-shadow:none}#overlayPopup .marketplaceView input.button:first-child:hover,#overlayPopup .marketplaceView input.button:first-child:focus{background-color:transparent;background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/jsDialogCloseButton.png);background-repeat:no-repeat;background-position:0 -27px;border-bottom:none;border-left:none}a.itemPurchaseView-content-skin-link{display:flex;align-items:center;min-height:25px;padding-left:30px;line-height:unset;background-size:25px}#overlayPopup.marketplaceViewPopup .suffix{display:none}.shopCustomization .PageShops .itemViewStatBlock-padding{display:flex;align-items:center}.shopCustomization .PageShops .itemViewStatBlock,.shopCustomization .PageShops .itemViewStatBlock-stat{margin-top:10px;border:none}.shopCustomization .PageShops .itemViewStatBlock-stat{padding:2px 4px 2px 2px;margin-top:3px;margin-right:5px;border:1px solid #ccc;border-radius:5px}.shopCustomization .PageShops .itemViewStatBlock-stat-helper{right:unset;left:unset;white-space:nowrap}.shopCustomization .PageShops .itemViewStatBlock-stat-label{margin-right:0;background:none}.shopCustomization .PageShops .itemViewStatBlock-stat-value{max-width:unset;background:none;border-radius:0}.shopCustomization .PageShops .itemPurchaseView-container .itemViewStatBlock-stat.cheeseEffect{width:auto;border-bottom:1px solid #ccc}.shopCustomization .PageShops .itemPurchaseView-container .itemViewStatBlock-stat.cheeseEffect .itemViewStatBlock-stat-value{width:auto;max-width:150px}.item_set,.mh-dark-mode .item_set{background-color:#eeab2a45;border:none}.itemPurchaseView-container.kingsCartItem{cursor:initial}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-container{display:table-cell;width:250px;min-height:unset;color:#000;background:#eee;box-shadow:none}.mh-dark-mode .itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-container{color:#fff;background-color:#242424}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-state.view{padding-top:unset}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-itemCost.consumed,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-goldGost,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-marketplace,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-confirm-refund-container{display:block!important}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-quantity{display:block;width:auto}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-quantity input{width:100%;margin-top:0}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-content-details:after{display:none}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-confirm-button-row a,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-complete-title{color:#3b5998}span.itemPurchaseView-action-confirm-refund.noRefund{position:relative;display:block;color:transparent}span.itemPurchaseView-action-confirm-refund.noRefund:after{position:absolute;top:10px;right:0;left:0;height:10px;color:#000;content:"Cannot be refunded."}.itemPurchaseView-container.has_refund_value .itemPurchaseView-action-confirm-refund.hasRefund{margin-top:20px}.itemPurchaseView-action-confirm-title{margin-bottom:10px;font-style:normal;font-weight:400}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-complete-title,.itemPurchaseView-container .itemPurchaseView-action-complete-title,.itemPurchaseView-action-complete-title,.itemPurchaseView-action-armed-title{margin:10px;font-weight:400;color:#000}.itemPurchaseView-container .itemPurchaseView-action-state.complete a.itemPurchaseView-action-complete-return{position:relative;display:block;float:none;margin:0;color:transparent}.itemPurchaseView-container .itemPurchaseView-action-state.complete a.itemPurchaseView-action-complete-return:after{position:absolute;top:10px;right:78px;left:78px;padding:10px 15px;line-height:10px;color:#000;text-shadow:0 0 1px #fff;content:"Continue";background-color:#fff600;border:1px solid #000;border-radius:5px;box-shadow:inset 0 0 5px #fff,1px 1px 1px #fff}.itemPurchaseView-action-itemCost-table-row.error .itemPurchaseView-action-itemCost-table-cell.cost{color:#a21010}.mh-dark-mode .itemPurchaseView-action-goldGost{background-color:#0e0e0e;border-color:#242424}.itemPurchaseView-content-details{display:flex;flex-direction:column;align-items:stretch;padding-bottom:10px}.itemPurchaseView-content-container .itemViewStatBlock.horizontal.base,.itemPurchaseView-content-container .itemViewStatBlock.horizontal.weapon{width:auto;margin-bottom:10px;margin-left:0}.shopCustomization .PageShops .itemPurchaseView-container .title .itemViewStatBlock-stat-value span a{max-width:60px;font-size:10px;text-overflow:ellipsis}.itemPurchaseView-image-container .itemViewStatBlock-stat.title.error{background-color:#ffc9c9}.itemPurchaseView-image-container .itemViewStatBlock-stat-icon{width:20px;height:20px;background-size:90%}.itemViewStatBlock-stat.powerType .itemViewStatBlock-stat-icon{width:26px;height:24px}.itemViewStatBlock.horizontal .itemViewStatBlock-stat.powerType .itemViewStatBlock-stat-icon{height:30px}.itemViewStatBlock-stat.title .itemPurchaseView-image-container .itemViewStatBlock-stat-icon{background-size:100%}.itemViewStatBlock-stat.error .itemViewStatBlock-stat-value{background-color:unset}a.shopsPage-kingsCalibratorPromo{display:flex;align-items:center;justify-content:center;padding:0;font-size:12px}.shopsPage-kingsCalibratorPromo-button{top:unset}.shopsPage-kingsCalibratorPromo br{display:none}.shopsPage-compareEquipment-stats{width:auto}.shopsPage-compareEquipment-stats .itemViewStatBlock.horizontal.weapon{float:none;width:auto;margin-left:0}.shopsPage-compareEquipment-stats .itemPurchaseView-content-name{display:flex;gap:5px;justify-content:flex-start}.shopsPage-compareEquipment{background-color:#dbe9ff}.itemPurchaseView-container.own_max{display:block!important;height:25px;overflow:hidden;opacity:.3;transition:.4s}.hasShop .itemPurchaseView-container.donation .itemPurchaseView-content-container,.itemPurchaseView-container.own_max .itemPurchaseView-content-container{width:calc(100% - 10px)}.mh-dark-mode .itemPurchaseView-container.own_max{background-color:#000}.itemPurchaseView-container.own_max:hover{display:table!important;height:unset;overflow-y:visible}.itemPurchaseView-container.own_max:hover .itemPurchaseView-action-container{display:table-cell}.mh-dark-mode .itemPurchaseView-container.own_max .itemPurchaseView-content-container{border-color:transparent}.itemPurchaseView-container.own_max .itemPurchaseView-content-name b:after{font-size:10px;content:" (maximum owned)"}.mh-dark-mode .shopCustomization .itemPurchaseView-container .itemViewStatBlock-stat.cheeseEffect,.mh-dark-mode .shopCustomization .itemPurchaseView-container .itemViewStatBlock-stat{background-color:#3d3d3d;border-color:#606060}.shopCustomization .shopCustomization .itemViewStatBlock-stat.powerType{position:absolute;color:#000;background-color:#e6e6e6}.shopCustomization .itemViewStatBlock-stat.powerType .itemViewStatBlock-stat-value{display:none}.mh-dark-mode .itemPurchaseView-container .itemViewStatBlock-stat.title,.mh-dark-mode .itemPurchaseView-container .itemViewStatBlock-stat.powerType{background-color:#3d3d3d;border-color:#606060}.mh-dark-mode .itemPurchaseView-container .itemPurchaseView-image-container .itemViewStatBlock-stat.powerType{background-color:transparent;border:none}.itemPurchaseView-container.new .itemPurchaseView-margin:after{top:5px}.itemPurchaseView-action-marketplace b,.itemPurchaseView-action-marketplace br{display:none}.itemPurchaseView-action-marketplace a:last-of-type:after{content:" in the Marketplace"}.itemPurchaseView-action-marketplace{padding:5px 0}a.itemPurchaseView-action-buySuperBrie{display:inline-block;margin:0 auto}.super_brie_cheese .itemPurchaseView-action-purchaseHelper{display:block}.donation .itemPurchaseView-action-itemCost-table-row{display:flex;justify-content:center;font-size:15px}.itemPurchaseView-container.donation .itemPurchaseView-action-container,.itemPurchaseView-container.donation .itemPurchaseView-action-itemCost-table{border-top-color:#ffc62b;border-bottom-color:#c7991c}.mh-dark-mode .itemPurchaseView-container.donation .itemPurchaseView-action-container{background-color:#e6b963}.mh-dark-mode .itemPurchaseView-container.donation .itemPurchaseView-action-itemCost-table{background-color:#f4eeca}.itemPurchaseView-container:hover .itemPurchaseView-margin,.itemPurchaseView-container:hover .itemPurchaseView-image-container,.itemPurchaseView-container:hover .itemPurchaseView-content-container{background-color:#f9f9f9}.mh-dark-mode .itemPurchaseView-container:hover .itemPurchaseView-margin,.mh-dark-mode .itemPurchaseView-container:hover .itemPurchaseView-image-container,.mh-dark-mode .itemPurchaseView-container:hover .itemPurchaseView-content-container{background-color:#242424}.itemPurchaseView-container.trinket .itemViewStatBlock{margin-top:0;margin-bottom:10px}.itemViewStatBlock-stat-helper{padding:10px;font-size:10px;color:#fff;text-align:center;background:#000;border:none;border-radius:10px}.itemViewStatBlock-stat-helper-arrow:after{border-top:10px solid #000}.itemPurchaseView-container .itemPurchaseView-action-form{min-height:50px}.itemPurchaseView-action-confirm-button:focus,.itemPurchaseView-action-confirm-button:hover{filter:hue-rotate(50deg)}.shopsPageTrapPreview .trapImageView-layerWrapper{top:10px}.shopsPageTrapPreview .trapImageView{height:370px}.itemViewPopup .itemViewStatBlock-stat.title{order:1}.itemViewPopup .itemViewStatBlock-stat.powerType{order:2}.itemViewPopup .itemViewStatBlock-stat.points{order:3}.itemViewPopup .itemViewStatBlock-stat.power,.itemViewPopup .itemViewStatBlock-stat.luck,.itemViewPopup .itemViewStatBlock-stat.powerBonus,.itemViewPopup .itemViewStatBlock-stat.attraction{order:4}.itemViewPopup .itemViewStatBlock-stat.cheeseEffect{order:5}.itemViewContainer .itemViewStatBlock.trinket .itemViewStatBlock-stat.empty{display:flex;opacity:.6}.itemViewPopup .itemView-thumbnailContainer a{display:flex;justify-content:center;padding-top:5px}.itemViewPopup .itemViewStatBlock-stat:last-child .itemViewStatBlock-stat-label{border-radius:0 0 0 5px}.itemViewPopup .itemViewStatBlock-stat.powerType .itemViewStatBlock-stat-icon:after{position:absolute;top:0;bottom:0;left:26px;display:flex;align-items:center;justify-content:center;width:115px;font-weight:900;content:""}.itemViewPopup .itemViewStatBlock-stat.powerType .itemViewStatBlock-stat-label{position:relative;width:26px}.itemViewPopup .itemViewStatBlock-stat-value{display:flex;align-items:center;justify-content:center}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-content-details{height:auto;max-height:180px;overflow-y:auto}.itemPurchaseView-container.kingsCartItem.expanded .itemPurchaseView-content-details{height:100%;max-height:unset;overflow-y:visible}.itemPurchaseView-container[data-max-inventory-quantity="1"]:after{position:absolute;top:17px;right:5px;z-index:1;color:#3b3b3b;content:"(Limit " attr(data-max-inventory-quantity) ")"}.itemPurchaseView-action-buySuperBrie{border-radius:7px}
`;
}
});
var cost_default, init_cost = __esm({
"src/modules/better-shops/styles/cost.css"() {
cost_default = `.itemPurchaseView-action-itemCost-table-row{display:grid;grid-template-columns:1fr 15fr 1fr;place-items:center stretch;width:97%;padding:2px 5px 2px 2px;margin:0}.itemPurchaseView-action-goldGost{padding:5px 5px 5px 20px;font-size:1.3em;font-weight:400;text-align:left;background:#f9f9f9;border:1px solid #ccc;border-right:none;border-left:none}.mh-dark-mode .itemPurchaseView-content-container{border-color:#242424}.itemPurchaseView-image-container,.itemPurchaseView-content-container{background-color:#fff}.itemPurchaseView-action-quantity{flex-grow:1;width:auto;margin:0 5px 0 10px}.itemPurchaseView-action-quantity input{width:100%;padding:3px;margin:0}a.itemPurchaseView-action-form-button.buy,a.itemPurchaseView-action-form-button.sell{width:auto;height:21px;margin-top:0;font-weight:400;line-height:21px}a.itemPurchaseView-action-form-button.buy{height:21px;margin-left:7px;background:#f4e830}a.itemPurchaseView-action-form-button.sell{margin-left:7px;background:#b3edff}.itemPurchaseView-container.cannot_sell .itemPurchaseView-action-form-button.sell,.itemPurchaseView-container.cannot_buy .itemPurchaseView-action-form-button.buy{filter:grayscale(1) opacity(.75)}.itemPurchaseView-action-purchaseHelper{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;margin:0}.itemPurchaseView-container.no_gold_cost .itemPurchaseView-action-goldGost{display:block}.itemPurchaseView-content-name{display:flex;align-items:center;justify-content:space-between;margin-top:6px;margin-bottom:4px}.itemPurchaseView-action-purchaseHelper-owned{padding:4px;margin-right:10px;font-size:11px;white-space:nowrap;background-color:#eee;border:1px solid #ccc;border-radius:5px}.itemPurchaseView-action-purchaseHelper-error{height:auto}.itemPurchaseView-action-purchaseHelper-maxPurchasesLimitReached{margin-bottom:5px;font-size:11px}.itemPurchaseView-action-itemCost-table-cell.cost{z-index:1}.itemPurchaseView-container.chrome .itemPurchaseView-action-container .itemPurchaseView-action-goldGost{background-color:#274167;border-color:#3b619b}.itemPurchaseView-container.chrome .mousehuntActionButton.mh-improved-math-button.mh-improved-shop-qty:nth-child(4),.itemPurchaseView-container.chrome .mousehuntActionButton.mh-improved-math-button.mh-improved-shop-qty:nth-child(5){display:none}.itemPurchaseView-container.chrome:not(.own_max){min-height:120px}.itemPurchaseView-action-chromeCost-image{box-shadow:none}.itemPurchaseView-container.chrome .itemPurchaseView-action-quantity input{width:80px}.chrome .itemPurchaseView-action-complete-title{color:#fff}
`;
}
});
var stats_default2, init_stats2 = __esm({
"src/modules/better-shops/styles/stats.css"() {
stats_default2 = `.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-padding{display:flex;flex-flow:row wrap;row-gap:5px;align-items:center;justify-content:flex-start}.shopCustomization .PageShops .itemPurchaseView-container .itemViewStatBlock.horizontal .itemViewStatBlock-stat.title,.shopCustomization .PageShops .itemPurchaseView-container .itemViewStatBlock.horizontal .itemViewStatBlock-stat.cheeseEffect{width:70px}.shopCustomization .PageShops .itemPurchaseView-container .itemViewStatBlock-stat.title,.itemPurchaseView-container .itemViewStatBlock-stat.powerType{display:flex;align-items:center;justify-content:space-evenly;width:auto;line-height:14px;border:1px solid #ccc}.mh-dark-mode .shopCustomization .PageShops .itemPurchaseView-container .itemViewStatBlock-stat.title,.mh-dark-mode .itemPurchaseView-container .itemViewStatBlock-stat.powerType{border-color:#606060}.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-stat-label{display:inline-block;padding:0}.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-stat-value{display:inline-flex;align-items:center;justify-content:center;margin-right:3px}.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-stat{display:flex;align-items:center;justify-content:space-around;min-width:55px;padding:2px;margin:0 5px 0 0;background-color:#f9f9f9;border:1px solid #ccc;border-radius:5px}.mh-dark-mode.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-stat{background-color:#333;border-color:#606060}.mh-dark-mode.shopCustomization .PageShops .pageFrameView .itemViewStatBlock .itemViewStatBlock-stat-value{background-color:transparent}.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-stat-value span{display:inline-block;padding:0}.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-stat.cheeseEffect .itemViewStatBlock-stat-value{font-size:9px}
`;
}
});
var riftstalker_default, init_riftstalker = __esm({
"src/modules/better-shops/styles/riftstalker.css"() {
riftstalker_default = `ul.set_bonus_effects{display:inline-block;flex-wrap:nowrap}.item_set .set_bonus_effects li{display:inline;margin:0}.item_set .set_bonus_level{width:40%}.item_set{display:flex;flex-flow:row wrap;align-items:center}.item_set .set_bonus_effects li:after{content:", "}.item_set .set_bonus_effects li:last-of-type:after{content:""}.item_set>b{display:none}.item_set .set_name>img{right:30px;display:none}.item_set .set_name{margin:0;font-size:11px}.item_set .set_name:after{margin-right:5px;margin-left:10px;font-weight:400;content:" Requires: "}
`;
}
});
var imported9, styles7, updateInputField, main17, init82, better_shops_default, init_better_shops = __esm({
"src/modules/better-shops/index.js"() {
init_utils2();
init_settings34();
init_quantity_buttons();
init_styles73();
init_styles74();
init_order();
init_retired();
init_general6();
init_cost();
init_stats2();
init_riftstalker();
imported9 = [order_default, retired_default, general_default6, cost_default, stats_default2, riftstalker_default], styles7 = imported9, updateInputField = () => __async(void 0, null, function* () {
let purchaseBlocks = document.querySelectorAll(".itemPurchaseView-action-state.view");
if (!purchaseBlocks)
return;
let addQuantityButtons2 = getSetting("better-shops.show-qty-buttons", !0);
purchaseBlocks.forEach((block) => {
let qty = block.querySelector(".itemPurchaseView-action-maxPurchases");
if (!qty)
return;
let input = block.querySelector("input");
if (!input)
return;
let maxQty = qty.innerText.replace(" (Inventory max)", "") || 0;
input.setAttribute("placeholder", maxQty);
let buyButton = block.querySelector(".itemPurchaseView-action-form-button.buy");
buyButton && input.addEventListener("focus", () => {
let enterEvt = input.addEventListener("keydown", (e) => {
e.key === "Enter" && (buyButton.click(), setTimeout(() => {
let confirmButton = document.querySelector(".itemPurchaseView-container.confirmPurchase .itemPurchaseView-action-confirm-button");
confirmButton && confirmButton.focus();
}, 200));
});
input.addEventListener("blur", () => {
input.removeEventListener("keydown", enterEvt);
});
}), addQuantityButtons2 && quantity_buttons_default(block, input, maxQty);
});
}), main17 = () => {
let body = document.querySelector("body");
if (!body)
return;
if (getCurrentPage() === "item") {
body.classList.remove("shopCustomization");
return;
}
body.classList.add("shopCustomization");
let golds = document.querySelectorAll(".itemPurchaseView-action-goldGost");
golds && golds.forEach((gold) => {
if (gold.innerText.includes("Cost:") && (gold.innerText = gold.innerText.replace("Cost:", "")), !gold.innerText.length) {
let container = gold.closest(".itemPurchaseView-container");
if (container) {
let goldCost = container.getAttribute("data-gold-cost");
goldCost && (gold.innerText = `${Number.parseInt(goldCost).toLocaleString()} gold`);
}
}
});
let buyBtns = document.querySelectorAll(".itemPurchaseView-action-form-button.buy");
buyBtns && buyBtns.forEach((btn) => {
btn.classList.add("mousehuntActionButton"), btn.innerHTML = "<span>Buy</span>";
});
let sellBtns = document.querySelectorAll(".itemPurchaseView-action-form-button.sell");
sellBtns && sellBtns.forEach((btn) => {
btn.classList.add("mousehuntActionButton"), btn.classList.add("lightBlue"), btn.innerHTML = "<span>Sell</span>";
}), updateInputField();
let owned = document.querySelectorAll(".itemPurchaseView-action-purchaseHelper-owned");
owned && owned.forEach((ownedItem) => {
if (ownedItem.getAttribute("data-moved-to-title"))
return;
let nameEl = ownedItem.parentNode.parentNode.parentNode.parentNode.parentNode.querySelector(".itemPurchaseView-content-name");
ownedItem.setAttribute("data-moved-to-title", "true"), nameEl.append(ownedItem);
});
let kingsCart = document.querySelectorAll(".itemPurchaseView-container.kingsCartItem");
kingsCart && kingsCart.forEach((cart) => {
cart.querySelector("input").value = "";
});
let shopQty = document.querySelectorAll(".itemPurchaseView-action-quantity input");
if (!shopQty)
return;
shopQty.forEach((qty) => {
qty.setAttribute("maxlength", "100");
});
let itemStats = document.querySelectorAll(".itemViewStatBlock");
itemStats && itemStats.forEach((stat) => {
if (stat.classList.contains("horizontal"))
return;
let contentSection = stat.parentNode.parentNode.querySelector(".itemPurchaseView-content-container");
contentSection && contentSection.append(stat);
});
let itemStatsTitle = document.querySelectorAll(".itemViewStatBlock.horizontal .itemViewStatBlock-stat");
itemStatsTitle && itemStatsTitle.forEach((title) => {
if (title.classList.contains("title") || title.classList.contains("powerType")) {
let imageContainer = title.parentNode.parentNode.parentNode.parentNode.parentNode.querySelector(".itemPurchaseView-image-container");
imageContainer && imageContainer.append(title);
}
});
}, init82 = () => __async(void 0, null, function* () {
let stylesToAdd = [...styles7];
getSetting("better-shops.hide-max-owned", !1) && stylesToAdd.push(styles_default73), getSetting("better-shops.show-qty-buttons", !0) && stylesToAdd.push(styles_default72), addStyles(stylesToAdd, "better-shops"), onNavigation(main17, {
page: "shops"
}), onRequest("purchases/itempurchase.php", updateInputField);
}), better_shops_default = {
id: "better-shops",
name: "Better Shops",
type: "better",
default: !0,
description: "Update the shop layout and appearance, minimize owned items with an inventory limit of 1, and more.",
load: init82,
settings: settings_default33
};
}
});
var getCurrentLocationForSettings, getIconSettings, toggle_icon_default, init_toggle_icon = __esm({
"src/modules/location-huds/toggle-icon.js"() {
init_utils2();
getCurrentLocationForSettings = () => __async(void 0, null, function* () {
let currentLocation = getCurrentLocation2();
return (yield getData("environments-events")).find((event) => event.id === currentLocation) ? "event-locations" : currentLocation;
}), getIconSettings = () => __async(void 0, null, function* () {
let key = yield getCurrentLocationForSettings();
key = `location-huds-enabled.${key}`;
let value = getSetting(key, !0);
return {
id: "mousehunt-improved-location-huds",
classname: "mousehunt-improved-location-huds-icon",
text: value ? "Disable HUD" : "Enable HUD",
position: "prepend",
/**
* The action to perform when the icon is clicked.
*
* @param {Event}   e    The event object.
* @param {Element} icon The icon element.
*/
action: (e, icon) => {
value = getSetting(key, !0), saveSetting(key, !value), value ? (icon.textContent = "Enable HUD", icon.classList.add("disabled"), icon.classList.remove("enabled")) : (icon.textContent = "Disable HUD", icon.classList.remove("disabled"), icon.classList.add("enabled")), window.location.reload();
}
};
}), toggle_icon_default = () => __async(void 0, null, function* () {
addIconToMenu(yield getIconSettings());
});
}
});
var settings_default34, init_settings35 = __esm({
"src/modules/location-huds/settings.js"() {
init_utils2();
settings_default34 = () => __async(void 0, null, function* () {
let locationsToUnset = /* @__PURE__ */ new Set([
"desert_oasis",
"lost_city",
"sand_dunes",
"queso_geyser",
"queso_plains",
"queso_quarry",
"queso_river",
// Don't have HUD changes for these.
"meadow",
"training_grounds",
"zugzwang_library"
]), locationsToAdd = [
{
name: "",
id: "region-seperator",
settings: {
type: "blank"
}
},
{
name: "Living Garden Region",
id: "region-living-garden"
},
{
name: "Queso Canyon Region",
id: "region-queso"
},
{
name: "Event Locations",
id: "event-locations"
}
], options2 = [], environments5 = yield getData("environments"), eventEnvironments2 = yield getData("environments-events");
for (let environment of environments5)
locationsToUnset.has(environment.id) || eventEnvironments2.some((event) => event.id === environment.id) || options2.push(environment);
options2.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0), locationsToAdd.forEach((location) => {
options2.push(location);
});
let optionsToReturn = [];
for (let location of options2)
optionsToReturn.push({
id: `location-huds-enabled.${location.id}`,
title: location.name,
default: !0,
description: location.description,
settings: location.settings || {}
});
return optionsToReturn.push(
{
name: "",
id: "option-seperator",
settings: {
type: "blank"
}
},
{
id: "location-huds.location-hud-toggle",
title: "Add toggle button to top menu"
},
{
id: "location-huds.bountiful-beanstalk-flip-avatar",
title: "Bountiful Beanstalk: Mirror avatar (to face the other direction)"
},
{
id: "location-huds.bountiful-beanstalk-quick-harp-toggle",
title: "Bountiful Beanstalk: Show quick Auto-Harp toggle"
},
{
id: "location-huds.bountiful-beanstalk-inventory-in-one-row",
title: "Bountiful Beanstalk: Show Inventory box in one row",
default: getSetting("location-huds.bountiful-beanstalk-inventory-in-one-row", !1)
},
{
id: "location-huds.fi-draggable-airship",
title: "Floating Islands: Make airship draggable",
default: getSetting("experiments.fi-draggable-airship", !1)
},
{
id: "location-huds.prologue-pond-wood-boat",
title: "Prologue Pond: Normal boat color",
default: getSetting("experiments.prologue-pond-wood-boat", !1)
},
{
id: "location-huds.school-of-sorcery-clean-chalkboard",
title: "School of Sorcery: Clean chalkboard",
default: !1
},
{
id: "location-huds.valour-rift-flip-avatar",
title: "Valour Rift: Mirror avatar (to face the other direction)",
default: getSetting("location-huds.valour-rift-flip-avatar", !1)
}
), optionsToReturn;
});
}
});
var styles_default74, init_styles75 = __esm({
"src/modules/location-huds/styles.css"() {
styles_default74 = `.mh-ui-cheese-selector-wrapper{margin-top:10px}.mh-ui-cheese-selector.townOfGnawniaHUD-baitContainer{flex-wrap:wrap}.mh-ui-cheese-selector .townOfGnawniaHUD-bait{width:145px;margin:3px 0;cursor:pointer;outline:1px solid #3d4d6c;box-shadow:none}.mh-ui-cheese-selector .townOfGnawniaHUD-bait-image{left:2px;background-color:transparent;filter:none;background-repeat:no-repeat;background-size:cover;border:none}.mh-ui-cheese-selector .townOfGnawniaHUD-bait-name{margin-left:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mh-ui-cheese-selector .townOfGnawniaHUD-bait.active,.mh-ui-cheese-selector .townOfGnawniaHUD-bait:hover{background-color:#c2dbef}.mh-ui-cheese-selector .townOfGnawniaHUD-bait.active .townOfGnawniaHUD-bait-name{text-shadow:none}.mh-ui-cheese-selector .townOfGnawniaHUD-bait-quantity{color:#eee;background:linear-gradient(to bottom,#2a354b,#485a7f)}.mh-ui-cheese-selector .townOfGnawniaHUD-bait.active .townOfGnawniaHUD-bait-quantity,.mh-ui-cheese-selector .townOfGnawniaHUD-bait:hover .townOfGnawniaHUD-bait-quantity{background:linear-gradient(to bottom,#4f638c,#798db4)}.mh-ui-cheese-selector .townOfGnawniaHUD-bait.active .townOfGnawniaHUD-bait-name,.mh-ui-cheese-selector .townOfGnawniaHUD-bait:hover .townOfGnawniaHUD-bait-name{color:#000;text-shadow:none}
`;
}
});
var makeCheeseSelectorElement, makeCheeseSelector, getCheeses, replaced, replaceCampShowTab, cheese_selectors_default, init_cheese_selectors = __esm({
"src/modules/location-huds/shared/cheese-selectors/index.js"() {
init_utils2();
makeCheeseSelectorElement = (cheesesToUse) => __async(void 0, null, function* () {
let wrapper = makeElement("div", ["townOfGnawniaHUD", "allBountiesComplete", "mh-ui-cheese-selector-wrapper"]), cheesesContainer = makeElement("div", ["townOfGnawniaHUD-baitContainer", "mh-ui-cheese-selector"]), cheeses = yield getUserItems(cheesesToUse);
for (let cheese of cheeses) {
let cheeseContainer = makeElement("div", ["townOfGnawniaHUD-bait", `mh-ui-cheese-selector-${cheese.type}`]);
cheeseContainer.setAttribute("data-item-type", cheese.type), cheeseContainer.setAttribute("data-item-classification", "bait"), cheeseContainer.setAttribute("onclick", "hg.utils.TrapControl.toggleItem(this); return false;"), user.bait_item_id === cheese.item_id ? cheeseContainer.classList.add("active") : cheeseContainer.classList.remove("active");
let cheeseImage = makeElement("div", "townOfGnawniaHUD-bait-image");
cheeseImage.style.backgroundImage = `url(${cheese.thumbnail_transparent || cheese.thumbnail})`, cheeseContainer.append(cheeseImage), makeElement("div", ["townOfGnawniaHUD-bait-name", "quantity"], cheese.name.replace(" Cheese", ""), cheeseContainer), makeElement("div", ["townOfGnawniaHUD-bait-quantity", "quantity"], cheese.quantity.toLocaleString(), cheeseContainer), cheesesContainer.append(cheeseContainer);
}
return wrapper.append(cheesesContainer), wrapper;
}), makeCheeseSelector = (location, cheesesToUse) => __async(void 0, null, function* () {
if (location.replaceAll("-", "_") !== getCurrentLocation2()) {
let existingCheeseSelector2 = document.querySelector(".mh-ui-cheese-selector-wrapper");
existingCheeseSelector2 && existingCheeseSelector2.remove();
return;
}
let hud5 = document.querySelector("#hudLocationContent");
if (!hud5)
return;
let cheeseSelector = yield makeCheeseSelectorElement(cheesesToUse), existingCheeseSelector = document.querySelector(".mh-ui-cheese-selector-wrapper");
existingCheeseSelector ? existingCheeseSelector.replaceWith(cheeseSelector) : hud5.after(cheeseSelector), doEvent2("mh-improved-cheese-selector-added", location, cheesesToUse);
}), getCheeses = (cheeses) => {
let defaultCheeses = [
"cheddar_cheese",
"brie_cheese",
"gouda_cheese",
"super_brie_cheese"
];
for (; cheeses.length < 4; )
cheeses.unshift(defaultCheeses.pop());
return cheeses;
}, replaced = !1, replaceCampShowTab = () => {
if (replaced)
return;
replaced = !0;
let _original3 = app.pages.CampPage.showTab;
app.pages.CampPage.showTab = (...args) => {
_original3(...args), doEvent2("set_camp_tab", ...args);
};
}, cheese_selectors_default = (location, cheeses) => {
replaceCampShowTab(), makeCheeseSelector(location, getCheeses(cheeses)), onRequest("*", () => makeCheeseSelector(location, getCheeses(cheeses)));
};
}
});
var acolyte_realm_default, init_acolyte_realm = __esm({
"src/modules/location-huds/locations/acolyte-realm/index.js"() {
init_cheese_selectors();
acolyte_realm_default = () => __async(void 0, null, function* () {
cheese_selectors_default("acolyte-realm", [
"ancient_cheese",
"runic_cheese",
"radioactive_blue_cheese",
"magical_radioactive_blue_cheese"
]);
});
}
});
var styles_default75, init_styles76 = __esm({
"src/modules/location-huds/locations/ancient-city/styles.css"() {
styles_default75 = `.ancientCityHUD-total.mousehuntTooltipParent{top:35px;left:550px;padding:11px 5px;font-size:13px;background:linear-gradient(180deg,#785c3c,#422b14);border-radius:10px}.ancientCityHUD-countDown{top:0;right:10px;font-size:36px;text-shadow:2px 2px 2px #171717}.ancientCityHUD-bossLabel{text-shadow:2px 2px 2px #171717}.ancientCityHUD-tier-number{text-shadow:1px 1px 2px #171717}.ancientCityHUD-progress{margin-left:1px;background:#e8da17;border-radius:1px}span.ancientCityHUD-alertLevel{position:absolute;bottom:1px;left:3px;text-shadow:1px 1px 2px #171717}.ancientCityHUD-districtName{display:flex;flex-direction:row;gap:10px;font-size:13px;color:#c6c6c6}.ancientCityHUD-item-quantity{position:absolute;top:1px;padding:0 4px;margin-left:3px!important;font-size:11px;line-height:unset;text-align:center;background-color:#000;border-radius:5px}.ancientCityHUD-item:nth-child(1) .ancientCityHUD-item-name,.ancientCityHUD-item:nth-child(2) .ancientCityHUD-item-name,.ancientCityHUD-item:nth-child(3) .ancientCityHUD-item-name,.ancientCityHUD-item:nth-child(4) .ancientCityHUD-item-name,.ancientCityHUD-item:nth-child(5) .ancientCityHUD-item-name{width:96px;margin-left:47px;font-size:11px;font-weight:900;text-align:center;text-shadow:0 0 1px #000;background:linear-gradient(180deg,#70707000,#a8a8a8,#70707000);border-radius:20px}.ancientCityHUD-item:hover .ancientCityHUD-item-location,.ancientCityHUD-item:focus .ancientCityHUD-item-location{position:absolute;top:unset;bottom:-25px;padding:3px;font-size:9px;color:#000;text-align:center;background:#fff;border:2px solid #000;border-radius:10px;box-shadow:2px 3px 4px #666}.ancientCityHUD-item{top:5px}.ancientCityHUD-bossSecretLabel{font-size:13px;text-shadow:0 1px 1px #3d3d3d}.ancientCityHUD.secret .ancientCityHUD-bossContainer:active{background-position:0 0}.ancientCityHUD{filter:drop-shadow(0 3px 5px #0a0803)}.ancientCityHUD-bossContainer.active .ancientCityHUD-bossLabel.active,.ancientCityHUD-bossContainer.defeated .ancientCityHUD-bossLabel.defeated{top:20px;left:46px;font-size:12px;line-height:1.5;color:#fff}.ancientCityHUD-districtName-f .ancientCityHUD-bossName{color:#11f400}.ancientCityHUD-districtName-h .ancientCityHUD-bossName{color:#21e2ff}.ancientCityHUD-districtName-s .ancientCityHUD-bossName{color:#e96300}.ancientCityHUD-districtName-y .ancientCityHUD-bossName{color:#d851ff}.ancientCityHUD-districtName-t .ancientCityHUD-bossName{color:#ffe400}.huntersHornView__message.huntersHornView__message--active.oil-charm-warning .huntersHornMessageView--unknown_error .huntersHornMessageView__content:before{display:none}.huntersHornView__message.huntersHornView__message--active.oil-charm-warning .huntersHornMessageView--unknown_error{border-image-source:url(https://i.mouse.rip/horn-message-blank-pink.png)}
`;
}
});
var addBossName, warnForOilCharms, ancient_city_default2, init_ancient_city2 = __esm({
"src/modules/location-huds/locations/ancient-city/index.js"() {
init_utils2();
init_styles76();
addBossName = () => {
var _a, _b;
let types = {
y: "Paladin Weapon Master",
// Fealty
h: "Manaforge Smith",
// Tech
s: "Soul Binder",
// Scholar
t: "Molten Midas",
// Treasury
f: ""
// Farming
}, type2 = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestAncientCity) == null ? void 0 : _b.district_type;
if (!type2 || !types[type2])
return;
let hudText = document.querySelector(".ancientCityHUD-districtName");
if (!hudText || hudText.getAttribute("data-boss-name"))
return;
hudText.setAttribute("data-boss-name", !0), hudText.classList.add(`ancientCityHUD-districtName-${type2}`);
let existing = document.querySelector(".ancientCityHUD-bossName");
existing && existing.remove(), makeElement("div", "ancientCityHUD-bossName", types[type2], hudText);
}, warnForOilCharms = () => {
if (user.trinket_item_id != 2142 && user.trinket_item_id != 2652)
return;
let isSuper = user.trinket_item_id == 2652;
showHornMessage({
title: "Don't waste your charm!",
text: `You have a ${isSuper ? "Super " : " "}Lantern Oil Charm equipped.`,
image: `https://www.mousehuntgame.com/images/items/trinkets/large/${isSuper ? "e4411478eb95a955daa3a71b3de078fd" : "e90252a8e76d6e5e75209db95acee4d4"}.png`,
dismiss: 4e4,
button: "Disarm",
type: "unknown_error",
classname: "oil-charm-warning",
action: () => {
var _a, _b, _c, _d;
(_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.TrapControl) != null && _b.disarmTrinket && ((_d = (_c = hg == null ? void 0 : hg.utils) == null ? void 0 : _c.TrapControl) != null && _d.go) && (hg.utils.TrapControl.disarmTrinket(), hg.utils.TrapControl.go());
}
});
}, ancient_city_default2 = () => __async(void 0, null, function* () {
addHudStyles(styles_default75), addBossName(), warnForOilCharms(), onRequest("users/changetrap.php", warnForOilCharms);
});
}
});
var styles_default76, init_styles77 = __esm({
"src/modules/location-huds/locations/balacks-cove/styles.css"() {
styles_default76 = `.balacksCoveHUD-tideContainer-timeLeft{position:absolute;top:9px;right:55px;padding:3px 10px;font-size:12.5px;color:#382924;text-shadow:1px 1px 1px #c7e9ea;background-color:#8ad3d5;border-radius:23% 23% 0 0;box-shadow:0 -.5px 1px 1px #d6f1f2}
`;
}
});
var getClosingText, updateClosingTime, balacks_cove_default, init_balacks_cove = __esm({
"src/modules/location-huds/locations/balacks-cove/index.js"() {
init_utils2();
init_styles77();
init_cheese_selectors();
getClosingText = (closes, stage, nextStageOffsetMinutes, nextStageText) => {
let hours = Math.floor(closes), minutes = Math.ceil((closes - Math.floor(closes)) * 60), timeLeftText = `${hours > 0 ? `${hours}h ` : ""}${minutes}m until ${stage}`;
if (nextStageOffsetMinutes && nextStageText) {
let totTimeMinutes = hours * 60 + minutes + nextStageOffsetMinutes;
timeLeftText += `, <span class="offset">${hours > 0 ? `${Math.floor(totTimeMinutes / 60)}h ` : ""}${totTimeMinutes % 60}m until ${nextStageText}</span>`;
}
return timeLeftText;
}, updateClosingTime = () => {
let hudBar = document.querySelector(".balacksCoveHUD-tideContainer");
if (!hudBar)
return;
let timeLeftText = "", today = /* @__PURE__ */ new Date(), rotationLength = 18.66666, rotationsExact = (today.getTime() / 1e3 - 1294680060) / 3600 / rotationLength, rotationsInteger = Math.floor(rotationsExact), partialRotation = (rotationsExact - rotationsInteger) * rotationLength;
partialRotation < 16 ? timeLeftText = getClosingText(16 - partialRotation, "Mid Tide", 60, "High Tide") : partialRotation >= 16 && partialRotation < 17 ? timeLeftText = getClosingText(1 - (partialRotation - 16), "High Tide", 40, "Low Tide") : partialRotation >= 17 && partialRotation < 17.66666 && (timeLeftText = getClosingText(0.66666 - (partialRotation - 17), "Mid Tide", 60, "Low Tide"));
let existing = document.querySelector(".balacksCoveHUD-tideContainer-timeLeft");
existing ? existing.innerHTML = timeLeftText : makeElement("div", "balacksCoveHUD-tideContainer-timeLeft", timeLeftText, hudBar);
}, balacks_cove_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default76), cheese_selectors_default("balacks-cove", [
"vanilla_stilton_cheese",
"vengeful_vanilla_stilton_cheese"
]), updateClosingTime(), document.addEventListener("horn-countdown-tick-minute", updateClosingTime);
});
}
});
var bazaar_default, init_bazaar = __esm({
"src/modules/location-huds/locations/bazaar/index.js"() {
init_cheese_selectors();
bazaar_default = () => __async(void 0, null, function* () {
cheese_selectors_default("bazaar", ["gilded_cheese"]);
});
}
});
var createToggleInventory, toggleInventory, keepInventoryToggled, keep_inventory_open_default, init_keep_inventory_open = __esm({
"src/modules/location-huds/shared/folklore-forest/keep-inventory-open.js"() {
init_utils2();
createToggleInventory = (setting, inventory, inventoryOpenClass, toggleButton, buttonOpenClass) => (e) => {
e.preventDefault();
let isSetOpen = getSetting(setting, !1);
isSetOpen ? (isSetOpen = !1, inventory.classList.remove(inventoryOpenClass), toggleButton.classList.remove(buttonOpenClass)) : (isSetOpen = !0, inventory.classList.add(inventoryOpenClass), toggleButton.classList.add(buttonOpenClass)), saveSetting(setting, isSetOpen);
}, keepInventoryToggled = (opts) => {
let {
setting,
buttonSelector,
inventorySelector,
inventoryOpenClass,
buttonOpenClass
} = opts, toggleButton = document.querySelector(buttonSelector);
if (!toggleButton)
return;
let inventory = document.querySelector(inventorySelector);
inventory && (toggleInventory && toggleButton.removeEventListener("click", toggleInventory), toggleInventory = createToggleInventory(setting, inventory, inventoryOpenClass, toggleButton, buttonOpenClass), toggleButton.addEventListener("click", toggleInventory));
}, keep_inventory_open_default = keepInventoryToggled;
}
});
var styles_default77, init_styles78 = __esm({
"src/modules/location-huds/shared/folklore-forest/styles.css"() {
styles_default77 = `.folkloreForestRegionView-dialog-help .folkloreForestRegionView-dialog-tabContentContainer{max-width:560px;padding:10px;margin:0 auto;font-size:13px;line-height:1.4}.folkloreForestRegionView-dialog-help h3{font-size:17px;color:#fff5cb}.folkloreForestRegionView-dialog-tabHeaderContainer:before,.folkloreForestRegionView-dialog-tabHeaderContainer:after{background:transparent}.folkloreForestRegionView-dialog-tabHeaderContainer{padding:0 20px;margin-right:-5px;margin-left:-5px;border-bottom-color:#416f2a}a.folkloreForestRegionView-dialog-tabHeader{background-color:#4d3d00;border:1px solid #416f2a;border-bottom:none}#overlayPopup.fabledForestDialog .title{margin-top:-19px}.folkloreForestRegionView-environmentInventory-block-quantity{font-size:12px;font-weight:400}.folkloreForestRegionView-environmentInventory-label{font-size:11px;line-height:18px}a.folkloreForestRegionView-upgradeButton.canUnlock:after{position:absolute;top:3px;right:5px;width:14px;height:14px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/hud/folklore_forest_region/upgrade_arrow_small.png);filter:hue-rotate(300deg) brightness(1.1);background-repeat:no-repeat;background-size:contain;border-radius:50%}.mh-location-prologue_pond a.folkloreForestRegionView-upgradeButton.canUnlock:after{filter:hue-rotate(300deg) brightness(1.1)}.mh-location-table_of_contents a.folkloreForestRegionView-upgradeButton.canUnlock:after{filter:none}a.folkloreForestRegionView-upgradeButton{font-size:13px}.folkloreForestRegionView-upgrade{width:25px;height:25px;margin-right:3px;box-shadow:0 0 17px #54290a inset,0 0 2px 1px #999}.folkloreForestRegionView-upgradeContainer{top:3px;left:20px;width:auto}.folkloreForestRegionView-upgrade.active{box-shadow:inset 0 0 2px 1px #b4e2ee}.folkloreForestRegionView-environmentTitle .folkloreForestRegionView-environmentState{font-size:21px}.folkloreForestRegionView-trapWarningContainer{padding:20px;font-size:12px;color:#870808;background-color:#ffbfbf}.folkloreForestRegionView-trapWarningContainer a{color:#870808}.folkloreForestRegionView-warning{border:none}.folkloreForestRegionView-warning:before{display:none}a.folkloreForestRegionView__estimate-button{top:9px!important;right:-7px!important;font-size:20px!important;color:#1a5162!important}a.folkloreForestRegionView__estimate-button:hover{color:#064155!important}.folkloreForestRegionView-dialog-footer{margin-top:5px;margin-bottom:15px}.folkloreForestRegionView-footer-spacer{display:none}.folkloreForestRegionView-dialog-block-cost{border:1px solid #ccc;box-shadow:none}.folkloreForestRegionView-dialog-block-cost-image{height:40px;background-size:contain}.upgrades .folkloreForestRegionView-dialog-block-item-image{margin:4px auto;background-color:transparent;border:none}.upgrades .folkloreForestRegionView-dialog-block-icon{top:1px;left:0;border:none}.upgrades .folkloreForestRegionView-dialog-block-name{margin-left:39px;border-top:1px solid #c6c6c6}.upgrades .folkloreForestRegionView-dialog-block-description{border-width:1px}.upgrades .folkloreForestRegionView-dialog-block{border:1px solid #c6c6c6;border-top:none}.upgrades .folkloreForestRegionView-dialog-block.highlight .folkloreForestRegionView-dialog-block-icon{margin-top:-1px;border-top:1px solid #c6c6c6;border-right:1px solid #c6c6c6}.upgrades .folkloreForestRegionView-dialog-tabHeader-notification{font-size:15px;line-height:25px;background-color:#e94e4e;box-shadow:1px 1px 4px -1px #000}.folkloreForestRegionView-fuelContainer.mousehuntTooltipParent{border-radius:40px 30px 30px}.folkloreForestRegionView-fuelContainer .mousehuntTooltip{display:none!important}.folkloreForestRegionView-dialog-blockContainer.upsellRecipe .upsellItemActionView-cost-image{box-shadow:none}.mhui-folklore-forest-upgrade-toggle{position:absolute;right:25px;bottom:13px}.folkloreForestRegionView-dialog-block.toggle-is-hidden{filter:grayscale(.6);opacity:.8}.upgrades .folkloreForestRegionView-dialog-block .folkloreForestRegionView-dialog-block-icon:after{display:none}.upgrades .highlight .folkloreForestRegionView-dialog-block-name{background-color:#a2723b}.folkloreForestRegionView-dialog-block-cost.error .folkloreForestRegionView-dialog-block-cost-image{box-shadow:0 0 35px #ffa3a3 inset}a.folkloreForestRegionView-warning:hover{background-color:#ffecd9}.folkloreForestRegionView-dialog-blockContainer.upgrades .folkloreForestRegionView-dialog-block-description{overflow:visible;line-height:1.3}.folkloreForestRegionView-dialog-block-costLabel{display:none}.folkloreForestRegionView-helpButton{top:13px;width:22px;height:22px;background:url(https://www.mousehuntgame.com/images/ui/events/egg_sweeper/help_button.png);background-position:center;background-size:26px;border-radius:10px;mix-blend-mode:darken;opacity:.3}.folkloreForestRegionView-helpButton:hover{opacity:1}a.folkloreForestRegionView-travelButton{top:16px;left:226px;width:17px;height:17px;background:url(https://www.mousehuntgame.com/images/ui/hud/menu/treasure_chests.png);background-size:cover;opacity:.3;transform:scaleX(-1) rotate(99deg)}a.folkloreForestRegionView-travelButton:hover{opacity:1}.folkloreForestRegionView-dialog-blockContainer.basicBaits .folkloreForestRegionView-dialog-block-description{background-color:#668d53;border-top:1px solid #143708}.folkloreForestRegionView-dialog-blockContainer.travel .folkloreForestRegionView-dialog-block{background-color:#668d53}.folkloreForestRegionView-dialog-blockContainer.travel .folkloreForestRegionView-dialog-block-description{border-top:1px solid #143708}.folkloreForestRegionView-dialog-recipeResult-content{max-height:110px}.folkloreForestRegionView-travelButton:active,.folkloreForestRegionView-helpButton:active{background-position-y:50%;opacity:.9}
`;
}
});
var small_inv_default, init_small_inv = __esm({
"src/modules/location-huds/locations/bountiful-beanstalk/small-inv.css"() {
small_inv_default = `.headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent--animating,.headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent--open .headsUpDisplayBountifulBeanstalk__inventoryContainerPanel:nth-child(2){display:grid;grid-template-columns:repeat(4,50px);width:160px}.headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent--animating{grid-template-columns:95px auto}.headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent.headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent--open{display:grid;grid-template-columns:100px 0;width:300px;height:50px}.headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent{display:grid;grid-template-columns:105px 0;width:100px;height:50px}.headsUpDisplayBountifulBeanstalk__inventoryContainer{top:unset;bottom:75px}.headsUpDisplayBountifulBeanstalk__inventoryContainerPanel:nth-child(1){display:grid;grid-template-columns:50px 50px}
`;
}
});
var styles_default78, init_styles79 = __esm({
"src/modules/location-huds/locations/bountiful-beanstalk/styles.css"() {
styles_default78 = `.headsUpDisplayBountifulBeanstalkView__baitQuantity.quantity{display:flex;align-items:center;justify-content:flex-end}.headsUpDisplayBountifulBeanstalk__inventoryBlockQuantity.quantity{padding:1px 2px}.bountifulBeanstalkCastleView__noiseLevel,.bountifulBeanstalkCastleView__maxNoiseLevel{padding:0 2px}.bountifulBeanstalkCastleView__noiseMeterLabel{color:#fffdfa;text-shadow:0 0 1px #5b4200;filter:drop-shadow(1px 1px 1px #000)}.headsUpDisplayBountifulBeanstalkView__baitImage{top:0;left:3px;width:35px;height:35px}.headsUpDisplayBountifulBeanstalkView__baitIngredientImage{top:24px;left:28px;width:20px;height:20px}.bountifulBeanstalkCastleView__plinthLootImage .headsUpDisplayBountifulBeanstalkView__loot{top:45px;right:245px;width:45px;height:45px;filter:drop-shadow(0 0 5px #f0e1a4)}.headsUpDisplayBountifulBeanstalkView__lootMultiplierContainer h3{font-size:11px}.headsUpDisplayBountifulBeanstalkView__lootMultiplierContainer h3 span{font-size:17px}.headsUpDisplayBountifulBeanstalkView__lootMultiplierContainer{left:22px}.headsUpDisplayBountifulBeanstalkView__castleNextRoomText.headsUpDisplayBountifulBeanstalkView__castleNextRoomText--nextArrow{font-size:13px}.bountifulBeanstalkCastleView__plinthOverlay .mousehuntTooltip{top:-20px;bottom:unset;left:-60px;z-index:30;width:447px;line-height:1.75;color:#f2e3a6;background:#192518;border:2px solid #85d523}.bountifulBeanstalkCastleView__plinthOverlay .mousehuntTooltip-arrow{display:none}.bountifulBeanstalkCastleView__currentRoomName{font-size:12px}.bountifulBeanstalkCastleView__currentRoomLoot b{font-size:10px}.bountifulBeanstalkCastleView__plinthOverlay.mousehuntTooltipParent{left:190px;width:330px}.bountifulBeanstalkCastleView__currentRoomLootMultiplier{font-size:12px}.bountifulBeanstalkPlayHarpDialogView__optionActionLabel{margin-bottom:5px}.headsUpDisplayBountifulBeanstalk__embellishmentBlock:hover .headsUpDisplayBountifulBeanstalk__embellishmentBlockImage{filter:brightness(1.3) drop-shadow(0 0 1px #224e1c) drop-shadow(0 0 1px #224e1c);transform:scale(1.3)}.headsUpDisplayBountifulBeanstalk__embellishmentBlock .headsUpDisplayBountifulBeanstalk__embellishmentBlockImage{transition:.3s;animation:adminShimmer 1s 3}.headsUpDisplayBountifulBeanstalkView__playHarpDialogButton--autoPlaying .headsUpDisplayBountifulBeanstalkView__playHarpDialogButtonHarpImage{transition:.3s;animation:mh-improved-shake .5s 2}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer .headsUpDisplayBountifulBeanstalkView__loot:hover{animation:mh-improved-shake .5s infinite}.bountifulBeanstalkCastleView__content:hover .bountifulBeanstalkCastleView__bossMarker{transform:scale(1.1)}@media (prefers-reduced-motion: reduce){.headsUpDisplayBountifulBeanstalk__embellishmentBlock:hover .headsUpDisplayBountifulBeanstalk__embellishmentBlockImage{filter:none;transform:none}.headsUpDisplayBountifulBeanstalk__embellishmentBlock .headsUpDisplayBountifulBeanstalk__embellishmentBlockImage{transition:none;animation:none}.headsUpDisplayBountifulBeanstalkView__playHarpDialogButton--autoPlaying .headsUpDisplayBountifulBeanstalkView__playHarpDialogButtonHarpImage{animation:none}.bountifulBeanstalkCastleView__bossMarker:hover{transform:none}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer .headsUpDisplayBountifulBeanstalkView__loot:hover{animation-iteration-count:1}}.mh-improved-room-data--open,.mh-improved-room-data--open .headsUpDisplayBountifulBeanstalkView__lootMultiplierDetailsContainer,.headsUpDisplayBountifulBeanstalkView__lootMultiplierContainer{z-index:28;display:block}.headsUpDisplayBountifulBeanstalk__inventoryContainer{z-index:28}.headsUpDisplayBountifulBeanstalk__inventoryContainer:hover{z-index:31}.headsUpDisplayBountifulBeanstalkView__playHarpDialogButton--autoPlaying:hover .headsUpDisplayBountifulBeanstalkView__playHarpDialogButtonHarpImage{transform:scale(1.1) rotate(3deg) translate(5px)}.folkloreForestRegionView-dialog-recipeResult-image.itemImage .quantity{background:#ffffffbf}.bountifulBeanstalkCastleView__content:hover .bountifulBeanstalkCastleView__bos{filter:drop-shadow(1px -1px 2px #63496a);transition:.3s ease-in-out;transform-origin:bottom}.bountifulBeanstalkCastleView__step--chase_past .bountifulBeanstalkCastleView__stepImage{z-index:2}.headsUpDisplayBountifulBeanstalkView__climbNextRoomText,.headsUpDisplayBountifulBeanstalkView__castleNextRoomText{font-size:12px}.bountifulBeanstalkCastleView__background{transition:opacity .3s}.headsUpDisplayBountifulBeanstalk__inventoryBlockImage{width:37px;height:37px}.bountifulBeanstalkCastleView__plinthOverlay .mousehuntTooltip.mh-improved-tooltip-stay-open,.headsUpDisplayBountifulBeanstalkView__lootMultiplierContainer.mh-improved-room-data--open{z-index:30;border-color:#75a23d}.headsUpDisplayBountifulBeanstalkView__ingredientQuantity.quantity{top:26px}.headsUpDisplayBountifulBeanstalkView__baitCraftableContainer .mousehuntTooltip{right:-40px;left:-40px;line-height:1.5;text-align:center}.headsUpDisplayBountifulBeanstalkView__baitCraftableContainer[data-item-type=leaping_lavish_beanster_cheese] .mousehuntTooltip{right:-40px;left:-40px}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer .mousehuntTooltip{line-height:1.4}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer .mousehuntTooltip>b:first-of-type{display:inline-block;margin-bottom:4px;font-size:11px;border-bottom:1px solid #d5d5d5}.headsUpDisplayBountifulBeanstalkView__fuelQuantity.quantity{font-size:13px;color:#fff;background-color:#2c4d26}.active .headsUpDisplayBountifulBeanstalkView__fuelQuantity.quantity{text-shadow:0 0 2px #5ac976}.headsUpDisplayBountifulBeanstalkView__fuelContainer:hover{cursor:pointer}.folkloreForestRegionView-helpButton{top:13px;width:22px;height:22px;background:url(https://www.mousehuntgame.com/images/ui/events/egg_sweeper/help_button.png);background-position:center;background-size:26px;border-radius:10px;mix-blend-mode:darken;opacity:.3}.folkloreForestRegionView-helpButton:hover{opacity:1}.folkloreForestRegionView-helpButton:active{filter:grayscale(1);background-position-y:center;opacity:1}.headsUpDisplayBountifulBeanstalk__embellishmentBlock .mousehuntTooltip{right:-70px;bottom:50px;left:-70px}.folkloreForestRegionView-dialog-help .beanstalkHelp__image{flex:1;width:100%;height:150px;background-size:contain}.folkloreForestRegionView-dialog-help .beanstalkHelp__section{flex-wrap:wrap;padding-top:20px;margin-bottom:10px;border-top:1px solid #487426}.folkloreForestRegionView-dialog-help .beanstalkHelp__section:nth-child(3){border-top:none}.folkloreForestRegionView-dialog-help .beanstalkHelp__section:nth-child(4) .beanstalkHelp__image{order:-1}.headsUpDisplayBountifulBeanstalkView__frame{filter:drop-shadow(0 1px 2px #333)}.headsUpDisplayBountifulBeanstalkView__multiplier div:nth-child(2){font-size:13px}.headsUpDisplayBountifulBeanstalkView__lootMultiplierDetailsContainer>div{align-items:center;margin:2px}.headsUpDisplayBountifulBeanstalk__embellishmentBlock{top:-5px;left:-10px;width:34px;height:34px}.headsUpDisplayBountifulBeanstalk__embellishmentBlockImage{width:30px;height:30px;filter:drop-shadow(0 0 1px #224e1c) drop-shadow(0 0 1px #224e1c);background-position:center;transform:scale(1)}.headsUpDisplayBountifulBeanstalk__embellishmentBlock.golden_feather{left:-6px}.headsUpDisplayBountifulBeanstalk__embellishmentBlock.ruby_remover{left:-2px}.headsUpDisplayBountifulBeanstalkView__multiplier.headsUpDisplayBountifulBeanstalkView__multiplier--feather,.headsUpDisplayBountifulBeanstalkView__multiplier.headsUpDisplayBountifulBeanstalkView__multiplier--condensed_creativity{font-size:10px}.folkloreForestRegionView-dialog-block-name{display:flex;justify-content:center;height:40px;padding:0;font-size:13px;text-align:center}.folkloreForestRegionView-dialog-blockContainer.basicBaits .mousehuntArmNowButton{transform:scale(1.2)}.bountifulBeanstalkCastleView__noiseMeterBar{padding-right:1px}button.headsUpDisplayBountifulBeanstalkView__baitBuyButton{right:3px}.active button.headsUpDisplayBountifulBeanstalkView__baitBuyButton{right:2px}.bountifulBeanstalkClimbView__playerUserThumb,.bountifulBeanstalkCastleView__playerMarkerUserThumb{border:1px solid #0aaa62;box-shadow:inset 0 1px 3px #3d3d3d}.bountifulBeanstalkCastleView__playerMarker--player_marker_chase .bountifulBeanstalkCastleView__playerMarkerUserThumb{border:1px solid #d7440d}.mh-crafting-actions{display:flex;gap:10px;justify-content:center;margin-top:5px;transition:.2s ease-in}.mh-crafting-popup.loading:after,.mh-crafting-popup.error:after,.mh-crafting-popup.success:after{position:absolute;right:0;bottom:7px;left:0;display:block;height:20px;content:"";background:url(https://www.mousehuntgame.com/images/ui/loaders/small_spinner.gif) center no-repeat}.mh-crafting-popup.error:after{background:url(https://www.mousehuntgame.com/images/icons/bad_idea.png) center no-repeat;background-size:contain}.mh-crafting-popup.success:after{background:url(https://www.mousehuntgame.com/images/ui/hud/meadow_checkmark.png) center no-repeat;background-size:contain}.loading .mh-crafting-actions,.error .mh-crafting-actions,.success .mh-crafting-actions{opacity:.1}.folkloreForestRegionView-trapWarningContainer.active{z-index:35}.headsUpDisplayBountifulBeanstalk__embellishmentBlock--disabled{display:block;background:#11250e;opacity:.3}.headsUpDisplayBountifulBeanstalk__embellishmentBlock--disabled:hover{opacity:1}.headsUpDisplayBountifulBeanstalk__embellishmentBlock--disabled .headsUpDisplayBountifulBeanstalk__embellishmentBlockImage{width:25px;height:25px;opacity:.3}.bountifulBeanstalkPlayHarpDialogView__pointerLabel{padding:5px;margin:3px 0;border:1px solid #e0e0e0;border-radius:5px;box-shadow:0 1px 1px -1px #ccc}.bountifulBeanstalkPlayHarpDialogView__input{padding:2px;border:1px solid #000}.bountifulBeanstalkPlayHarpDialogView__room{border-radius:5px}.bountifulBeanstalkPlayHarpDialogView__tabButtonContainer{padding:0 20px;margin-right:-5px;margin-left:-5px;border-bottom:1px solid #416f2a}.bountifulBeanstalkPlayHarpDialogView__tabButton{background-color:#4d3d00;border:1px solid #416f2a;border-bottom:none}.bountifulBeanstalkPlayHarpDialogView__pointerIcon:hover{cursor:ew-resize}.bountifulBeanstalkPlayHarpDialogView__noiseMeterLabel{user-select:none}.bountifulBeanstalkCastleView__noiseMeter:hover .bountifulBeanstalkCastleView__noiseMeterBar.bountifulBeanstalkCastleView__noiseMeterBar--min:before{position:absolute;top:0;right:5px;bottom:0;align-self:center;content:"Miss"}.bountifulBeanstalkCastleView__noiseMeter:hover .bountifulBeanstalkCastleView__noiseMeterBar.bountifulBeanstalkCastleView__noiseMeterBar--max:before{position:absolute;top:0;right:5px;bottom:0;align-self:center;content:"Catch"}.bountifulBeanstalkCastleView__noiseMeter:hover .bountifulBeanstalkCastleView__noiseMeterBar.bountifulBeanstalkCastleView__noiseMeterBar--min[style="width: 10.6667%;"]:before,.bountifulBeanstalkCastleView__noiseMeter:hover .bountifulBeanstalkCastleView__noiseMeterBar.bountifulBeanstalkCastleView__noiseMeterBar--max[style="width: 10.6667%;"]:before{display:none}.headsUpDisplayBountifulBeanstalkView__castleNextRoomLevel.headsUpDisplayBountifulBeanstalkView__chevron{position:relative}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer:hover .headsUpDisplayBountifulBeanstalkView__chevron:after{position:absolute;right:0;bottom:-10px;left:0;font-size:11px;font-weight:900;color:#e1dacd;text-align:center;content:""}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer:hover .headsUpDisplayBountifulBeanstalkView__chevron--standard:after{content:"x1"}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer:hover .headsUpDisplayBountifulBeanstalkView__chevron--super:after{content:"x2"}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer:hover .headsUpDisplayBountifulBeanstalkView__chevron--extreme:after{content:"x4"}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer:hover .headsUpDisplayBountifulBeanstalkView__chevron--ultimate:after{content:"x8"}.bountifulBeanstalkPlayHarpDialogView__noiseMeterBarNoisePreviewBar--plus{background-color:#e02b56}.beanstalkHelp__image.beanstalkHelp__image--castleGiantChase,.beanstalkHelp__image.beanstalkHelp__image--castleCheese,.beanstalkHelp__image.beanstalkHelp__image--castleNoise{border-radius:13px;box-shadow:inset 0 0 1px 1px #0a1d0e}.bountifulBeanstalkPlantVineDialogView__vineError,.bountifulBeanstalkPlantVineDialogView__embellishmentError,.bountifulBeanstalkPlantVineDialogView__embellishment.headsUpDisplayBountifulBeanstalkView__dialogOption--error .bountifulBeanstalkPlantVineDialogView__embellishmentCostQuantity{color:#950808}.bountifulBeanstalkPlayHarpDialogView__volumeIcon{transition:transform .2s ease}.bountifulBeanstalkPlayHarpDialogView__volumeIcon:hover{transform:scale(1.1)}.mh-quick-harp-toggle{position:absolute;top:-16px;left:11px;display:none;width:60px;height:15px;font-size:10px;line-height:15px;text-align:center;background-color:#f2832a;border-radius:4px;box-shadow:inset 0 2px 1px 2px #ef9e5c}.headsUpDisplayBountifulBeanstalkView__playHarpDialogButton--autoPlaying .mh-quick-harp-toggle{top:-10px;left:16px}.headsUpDisplayBountifulBeanstalkView__playHarpDialogButton:hover .mh-quick-harp-toggle{display:block}.mh-quick-harp-toggle:hover{background-color:#f5a15c}.headsUpDisplayBountifulBeanstalkView__playHarpDialogButton{filter:brightness(1)}.headsUpDisplayBountifulBeanstalkView__playHarpDialogButton.headsUpDisplayBountifulBeanstalkView__playHarpDialogButton--autoPlaying{margin-top:-2px}.mh-quick-harp-toggle.loading{color:transparent;text-indent:-9999px}.mh-quick-harp-toggle.loading:after{position:absolute;inset:0 5px;display:block;content:"";background:url(https://www.mousehuntgame.com/images/ui/loaders/small_spinner.gif) center no-repeat;background-image:url(https://www.mousehuntgame.com/images/ui/loaders/round_bar_green.gif);background-repeat:no-repeat;background-position:center;background-size:contain}.mh-quick-harp-toggle.success,.mh-quick-harp-toggle.error{color:inherit}.mh-quick-harp-toggle.success:after{position:absolute;top:0;right:-3px;bottom:0;display:block;width:12px;content:"";background:url(https://www.mousehuntgame.com/images/ui/hud/meadow_checkmark.png) center no-repeat;background-size:contain}.mh-quick-harp-toggle.error:after{position:absolute;top:0;right:-3px;bottom:0;display:block;width:12px;content:"";background:url(https://www.mousehuntgame.com/images/icons/bad_idea.png) center no-repeat;background-size:contain}.bountifulBeanstalkCastleView__path .bountifulBeanstalkCastleView__step:after{position:absolute;top:4px;right:0;left:0;z-index:2;text-align:center;text-shadow:-1px 0 1px #000,1px 0 1px #000,0 0 0 #000,0 -1px 1px #000,0 1px 1px #000,0 0 0 #000;content:attr(data-id);opacity:0;transition:.2s}.bountifulBeanstalkCastleView__path:hover .bountifulBeanstalkCastleView__step:not(.bountifulBeanstalkCastleView__step--chase_past):after{opacity:.7}
`;
}
});
var keepRoomDataToggled, keepTooltipToggled, funTime, makeGiantMoreVisible, toggleFuelWithIcon, updateLootText, baitAmounts, addCraftingButtons, addCommaToNoiseMeter, addCommaToNoiseMeterTimeout, isAutoharpToggleInitiatiedByUs, addQuickHarpToggle, addQuickHarpToggleButton, bountiful_beanstalk_default3, init_bountiful_beanstalk3 = __esm({
"src/modules/location-huds/locations/bountiful-beanstalk/index.js"() {
init_utils2();
init_keep_inventory_open();
init_styles78();
init_small_inv();
init_styles79();
keepRoomDataToggled = () => __async(void 0, null, function* () {
let roomData = document.querySelector(".headsUpDisplayBountifulBeanstalkView__lootMultiplierContainer");
if (!roomData)
return;
let isSetOpen = getSetting("location-huds.bountiful-beanstalk-room-data-toggled", "not-set");
isSetOpen ? roomData.classList.add("mh-improved-room-data--open") : isSetOpen === "not-set" && (isSetOpen = !1), roomData.addEventListener("click", (e) => {
e.preventDefault(), isSetOpen ? (isSetOpen = !1, roomData.classList.remove("mh-improved-room-data--open")) : (isSetOpen = !0, roomData.classList.add("mh-improved-room-data--open")), saveSetting("location-huds.bountiful-beanstalk-room-data-toggled", isSetOpen);
});
}), keepTooltipToggled = () => __async(void 0, null, function* () {
let tooltip = document.querySelector(".bountifulBeanstalkCastleView__plinthOverlay.mousehuntTooltipParent .mousehuntTooltip");
tooltip && tooltip.addEventListener("click", (e) => {
e.preventDefault(), tooltip.classList.toggle("mh-improved-tooltip-stay-open");
});
}), funTime = () => __async(void 0, null, function* () {
let meter = document.querySelector(".bountifulBeanstalkCastleView__noiseMeterFrame");
if (!meter)
return;
let isRotating = !1;
meter.addEventListener("click", () => {
if (isRotating)
return;
isRotating = !0;
let time = 1e3, hue = 0, interval = setInterval(() => {
hue >= 360 && (clearInterval(interval), isRotating = !1), hue += 1, meter.style.filter = `hue-rotate(${hue}deg)`;
}, time / 360);
});
}), makeGiantMoreVisible = () => __async(void 0, null, function* () {
var _a, _b, _c;
let background = document.querySelector(".bountifulBeanstalkCastleView__background");
if (!background)
return;
((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestBountifulBeanstalk) == null ? void 0 : _b.castle) == null ? void 0 : _c.is_boss_chase) || !1 ? background.classList.add("is-boss-chase") : background.classList.remove("is-boss-chase");
}), toggleFuelWithIcon = () => __async(void 0, null, function* () {
let icon = document.querySelector(".headsUpDisplayBountifulBeanstalkView__fuelContainer");
if (!icon)
return;
let button = document.querySelector(".headsUpDisplayBountifulBeanstalkView__fuelToggleButton");
button && icon.addEventListener("click", () => {
button.click();
});
}), updateLootText = () => __async(void 0, null, function* () {
let ccLoot = document.querySelector(".headsUpDisplayBountifulBeanstalkView__multiplier.headsUpDisplayBountifulBeanstalkView__multiplier--condensed_creativity div");
ccLoot && (ccLoot.innerText = "Con. Creativity:");
let featherLoot = document.querySelector(".headsUpDisplayBountifulBeanstalkView__multiplier.headsUpDisplayBountifulBeanstalkView__multiplier--feather div");
featherLoot && (featherLoot.innerText = "Golden Feather:");
}), baitAmounts = {
beanster_cheese: {
amounts: ["160-normal", 160],
shop: "beanster_pack_small_convertible",
shopNormal: "beanster_cheese"
},
lavish_beanster_cheese: {
amounts: [4, 8, 80],
shop: "lavish_beanster_pack_small_convertible"
},
leaping_lavish_beanster_cheese: {
amounts: [2, 4, 8],
shop: "leaping_lavish_beanster_pack_small_convertible"
},
royal_beanster_cheese: {
amounts: [2, 18, 20],
shop: "royal_beanster_pack_small_convertible"
}
}, addCraftingButtons = () => __async(void 0, null, function* () {
let baits = document.querySelectorAll(".headsUpDisplayBountifulBeanstalkView__baitCraftableContainer");
if (!baits)
return;
let purchaseBait = (shopItem, quantity, popup) => __async(void 0, null, function* () {
popup.classList.add("loading");
let results = yield doRequest("managers/ajax/purchases/itempurchase.php", {
type: shopItem,
quantity,
buy: 1,
is_kings_cart_item: 0
});
if (!results || !results.success)
return popup.classList.remove("loading"), popup.classList.add("error"), setTimeout(() => {
popup.classList.remove("error");
}, 1e3), !1;
if (!results.inventory || !results.items)
return !1;
results.inventory = (results == null ? void 0 : results.inventory) || {}, results.items = (results == null ? void 0 : results.items) || {};
let newInventoryQuantities = Object.keys(results.inventory).reduce((acc, key) => (acc[key] = results.inventory[key].quantity, acc), {}), newItemsQuantities = Object.keys(results.items).reduce((acc, key) => (acc[key] = results.items[key].num_owned, acc), {}), newQuantities = __spreadValues(__spreadValues({}, newInventoryQuantities), newItemsQuantities);
return baits.forEach((bait) => {
let baitQuantity = bait.querySelector(".headsUpDisplayBountifulBeanstalkView__baitQuantity");
if (!baitQuantity)
return;
let baitQuantityType = baitQuantity.getAttribute("data-item-type");
baitQuantityType && newQuantities[baitQuantityType] && (baitQuantity.innerText = newQuantities[baitQuantityType].toLocaleString());
let baitCraftQty = bait.querySelector(".headsUpDisplayBountifulBeanstalkView__ingredientQuantity");
if (!baitCraftQty)
return;
let baitIngredientType = baitCraftQty.getAttribute("data-item-type");
baitIngredientType && newQuantities[baitIngredientType] && (baitCraftQty.innerText = newQuantities[baitIngredientType].toLocaleString());
}), popup.classList.remove("loading"), popup.classList.add("success"), setTimeout(() => {
popup.classList.remove("success");
}, 1e3), results && results.success;
});
baits.forEach((bait) => {
let quantity = bait.querySelector(".headsUpDisplayBountifulBeanstalkView__baitQuantity");
if (!quantity || bait.querySelector(".mh-crafting-popup"))
return;
quantity.classList.add("mousehuntTooltipParent");
let popup = makeElement("div", ["mh-crafting-popup"]), existingPopup = bait.querySelector(".mousehuntTooltip");
existingPopup ? existingPopup.classList.remove("noEvents") : popup.classList.add("mousehuntTooltip", "tight", "top");
let actions = makeElement("div", "mh-crafting-actions"), baitType = bait.getAttribute("data-item-type"), amounts = baitAmounts[baitType].amounts;
for (let amount of amounts) {
let isNormal = amount.toString().includes("-normal"), qty = isNormal ? amount.toString().replace("-normal", "") : amount;
isNormal || (qty = qty / 2);
let className = isNormal ? "mh-crafting-action" : "mh-crafting-action lightBlue", title = isNormal ? `Craft ${amount.toString().replace("-normal", "")}` : `Craft ${amount} using Magic Essence`, type2 = isNormal ? baitAmounts[baitType].shopNormal : baitAmounts[baitType].shop;
makeMhButton({
text: `Craft ${amount.toString().replace("-normal", "")}`,
className,
title,
size: "tiny",
/**
* Button action.
*/
callback: () => {
purchaseBait(type2, qty, popup);
},
appendTo: actions
});
}
popup.append(actions), existingPopup ? existingPopup.insertBefore(popup, existingPopup.lastChild) : bait.append(popup);
});
}), addCommaToNoiseMeter = () => __async(void 0, null, function* () {
let noise = document.querySelector(".bountifulBeanstalkCastleView__noiseLevel");
noise && noise.innerText && Number.parseInt(noise.innerText) > 999 && (noise.innerText = Number.parseInt(noise.innerText).toLocaleString());
}), addCommaToNoiseMeterTimeout = () => __async(void 0, null, function* () {
setMultipleTimeout(addCommaToNoiseMeter, [0, 500, 1e3]);
}), isAutoharpToggleInitiatiedByUs = !1, addQuickHarpToggle = () => __async(void 0, null, function* () {
addQuickHarpToggleButton(), onRequest("environment/bountiful_beanstalk.php", () => {
isAutoharpToggleInitiatiedByUs || setTimeout(() => {
addQuickHarpToggleButton();
}, 100);
});
}), addQuickHarpToggleButton = () => __async(void 0, null, function* () {
var _a, _b, _c;
let existingToggle = document.querySelector(".mh-quick-harp-toggle");
if (existingToggle)
return;
let autoharp = document.querySelector(".headsUpDisplayBountifulBeanstalkView__playHarpDialogButton");
if (!autoharp)
return;
if (autoharp.classList.contains("disabled")) {
existingToggle == null || existingToggle.remove();
return;
}
let autoharpText = autoharp.querySelector(".headsUpDisplayBountifulBeanstalkView__playHarpDialogButtonPlayText");
if (!autoharpText)
return;
let noiseFrame = document.querySelector(".bountifulBeanstalkCastleView__autoHarpNoiseMeterFrame");
if (!noiseFrame)
return;
let toggleElements = () => {
newToggleButton.classList.toggle("active"), autoharp.classList.toggle("headsUpDisplayBountifulBeanstalkView__playHarpDialogButton--autoPlaying"), autoharpText.innerText = autoharpText.innerText === "Play" ? "Auto Playing" : "Play", noiseFrame.classList.toggle("bountifulBeanstalkCastleView__autoHarpNoiseMeterFrame--active");
}, newToggleButton = makeElement("div", "mh-quick-harp-toggle", "Auto-Harp");
(_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestBountifulBeanstalk) == null ? void 0 : _b.castle) != null && _c.auto_harp && toggleElements(), newToggleButton.addEventListener("click", (e) => __async(void 0, null, function* () {
e.preventDefault(), e.stopPropagation(), newToggleButton.classList.add("loading"), isAutoharpToggleInitiatiedByUs = !0;
let result = yield doRequest("managers/ajax/environment/bountiful_beanstalk.php", {
action: "toggle_auto_harp"
});
result && result.success ? (newToggleButton.classList.remove("loading"), newToggleButton.classList.add("hidden"), setTimeout(() => {
newToggleButton.classList.remove("hidden");
}, 1e3), toggleElements()) : (newToggleButton.classList.remove("loading"), newToggleButton.classList.add("error"), setTimeout(() => {
newToggleButton.classList.remove("error");
}, 1e3)), isAutoharpToggleInitiatiedByUs = !1;
})), autoharp.append(newToggleButton);
}), bountiful_beanstalk_default3 = () => __async(void 0, null, function* () {
let stylesToAdd = [styles_default77, styles_default78];
getSetting("location-huds.bountiful-beanstalk-flip-avatar", !1) && stylesToAdd.push(".bountifulBeanstalkCastleView__playerMarkerUserThumb { transform: scaleX(-1); }"), getSetting("location-huds.bountiful-beanstalk-inventory-in-one-row", !1) && stylesToAdd.push(small_inv_default), addHudStyles(stylesToAdd), keep_inventory_open_default({
setting: "location-huds.bountiful-beanstalk-inventory-toggled",
buttonSelector: ".headsUpDisplayBountifulBeanstalk__inventoryContainer .headsUpDisplayBountifulBeanstalk__inventoryContainerButton",
inventorySelector: ".headsUpDisplayBountifulBeanstalk__inventoryContainer .headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent",
inventoryOpenClass: "headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent--open",
buttonOpenClass: "headsUpDisplayBountifulBeanstalk__inventoryContainerButton--open"
}), keepRoomDataToggled(), keepTooltipToggled(), makeGiantMoreVisible(), toggleFuelWithIcon(), updateLootText(), addCraftingButtons(), addCommaToNoiseMeterTimeout(), getSetting("location-huds.bountiful-beanstalk-quick-harp-toggle", !1) && addQuickHarpToggle(), funTime(), onTurn(() => {
makeGiantMoreVisible(), addCommaToNoiseMeterTimeout();
}, 1e3);
});
}
});
var calm_clearing_default, init_calm_clearing = __esm({
"src/modules/location-huds/locations/calm-clearing/index.js"() {
init_cheese_selectors();
calm_clearing_default = () => __async(void 0, null, function* () {
cheese_selectors_default("calm-clearing", ["cherry_cheese"]);
});
}
});
var cape_clawed_default, init_cape_clawed = __esm({
"src/modules/location-huds/locations/cape-clawed/index.js"() {
init_cheese_selectors();
cape_clawed_default = () => __async(void 0, null, function* () {
cheese_selectors_default("cape-clawed", [
"shell_cheese",
"gumbo_cheese",
"crunchy_cheese"
]);
});
}
});
var catacombs_default, init_catacombs = __esm({
"src/modules/location-huds/locations/catacombs/index.js"() {
init_cheese_selectors();
catacombs_default = () => __async(void 0, null, function* () {
cheese_selectors_default("catacombs", [
"ancient_cheese",
"undead_emmental_cheese",
"string_undead_emmental_cheese",
"radioactive_blue_cheese",
"super_radioactive_blue_cheese",
"magical_radioactive_blue_cheese",
"moon_cheese",
"crescent_cheese"
]);
});
}
});
var styles_default79, init_styles80 = __esm({
"src/modules/location-huds/locations/claw-shot-city/styles.css"() {
styles_default79 = `.clawShotCityHud .gangs_caught,.clawShotCityHud .fools_gold_quantity{font-size:27px;color:#e7c37d}
`;
}
});
var claw_shot_city_default, init_claw_shot_city = __esm({
"src/modules/location-huds/locations/claw-shot-city/index.js"() {
init_utils2();
init_styles80();
claw_shot_city_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default79);
});
}
});
var derr_dunes_default, init_derr_dunes = __esm({
"src/modules/location-huds/locations/derr-dunes/index.js"() {
init_cheese_selectors();
derr_dunes_default = () => __async(void 0, null, function* () {
cheese_selectors_default("derr-dunes", ["crunchy_cheese"]);
});
}
});
var styles_default80, init_styles81 = __esm({
"src/modules/location-huds/locations/desert-city/styles.css"() {
styles_default80 = `.muridaeMarketHud .shop .visit:hover{background-image:url(https://i.mouse.rip/btn_visit_on.png)}.muridaeMarketHud .quantity{display:flex;align-items:center;height:16px;margin-top:1px;font-size:14px;color:#e3d0b2;text-shadow:1px 1px 2px #533a20}
`;
}
});
var desert_city_default, init_desert_city = __esm({
"src/modules/location-huds/locations/desert-city/index.js"() {
init_utils2();
init_styles81();
desert_city_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default80);
});
}
});
var styles_default81, init_styles82 = __esm({
"src/modules/location-huds/locations/desert-warpath/styles.css"() {
styles_default81 = `.warpathHUD.wave_1:after,.warpathHUD.wave_2:after,.warpathHUD.wave_3:after,.warpathHUD.wave_4:after{position:absolute;bottom:1px;left:5px;display:flex;align-items:center;width:53px;height:25px;font-size:15px;color:#f5d172;content:"Wave";background-color:#633e29;border-top-left-radius:4px;border-top-right-radius:4px;box-shadow:inset 0 -2px 2px -1px #3e2417}.warpathHUD.wave_1:after{content:"Wave 1"}.warpathHUD.wave_2:after{content:"Wave 2"}.warpathHUD.wave_3:after{content:"Wave 3"}.warpathHUD.wave_4:after{content:"Wave 4"}.warpathHUD-streak-quantity{top:1px;left:60px;width:17px;padding:2px;font-size:16px;color:#f5d172;background-color:#633e29;border-radius:2px;box-shadow:inset -2px 1px 2px #af7756}.warpathHUD-clearWaveQuantity.quantity{top:46px;left:8px;padding:2px;font-size:13px;font-weight:400;background-color:#49362b;border-radius:10px;box-shadow:0 0 1px 1px inset #38281d}.warpathHUD-wave-mouse-population{position:absolute;bottom:-3px;left:-3px;width:70px;height:25px;font-size:15px;line-height:23px;background:url(https://www.mousehuntgame.com/images/ui/hud/desert_warpath/desert_warpath_opponent.png) no-repeat bottom center / 75px;border-radius:20px}.warpathHUD-wave-mouse.mousehuntTooltipParent.active.laser_targetted{color:#ff824c;filter:drop-shadow(0 -2px 3px #ea4700)}.warpathHUD-wave-mouse-powerType{width:30px;height:30px;margin-top:0}.warpathHUD-wave-mouse .mousehuntTooltip.tight.top{height:33px;color:transparent}.warpathHUD-wave-mouse .mousehuntTooltip .warpathHUD-wave-mouse-name{line-height:34px;color:#000}.warpathHUD-wave-mouse .mousehuntTooltip.hasCharms .warpathHUD-wave-mouse-name{height:33px;line-height:2.5}.warpathHUD-wave-mouse.desert_general .mousehuntTooltip .warpathHUD-wave-mouse-name,.warpathHUD-wave-mouse.desert_supply .mousehuntTooltip .warpathHUD-wave-mouse-name{text-align:center}.warpathHUD-wave-mouse.desert_general .mousehuntTooltip .warpathHUD-wave-mouse-name{line-height:28px}.warpathHUD-streakContainer:before{background-image:url(https://i.mouse.rip/desert_warpath_streak_bar.png)}.warpathHUD-streak-image-empty{font-weight:900;box-shadow:inset 0 0 10px 5px #2f1816}.warpathHUD-wave-mouse.laser_targetted .warpathHUD-wave-mouse-image{box-shadow:inset 0 0 10px 6px #ff824c}.warpathHUD-waveContainer.warpathHUD-engaged .warpathHUD-wave{border-radius:5px;box-shadow:inset 0 0 10px 4px #ff4d4d}.warpathHUD-engaged .warpathHUD-wave-mouse .mousehuntTooltip.tight.top{display:none}.warpathHud-missle-activate{position:absolute;top:-15px;left:-150px;cursor:pointer;opacity:.4;transition:transform .3s;transform:rotate(270deg) scale(.8);animation:none}.wave_4 .warpathHud-missle-activate,.wave_portal .warpathHud-missle-activate{left:-26px}.warpathHud-missle-activate:hover{opacity:1;transform:rotate(270deg) scale(1)}.warpathHUD-engaged .warpathHud-missle-activate{filter:hue-rotate(270deg) scale(.9);opacity:.9}.warpathHUD-streakContainer.streak_0 .warpathHUD-streak-image-empty{color:transparent;text-shadow:none}.warpathHUD-streak-victories{top:36px;left:7px;z-index:1;width:43px;height:18px;font-size:12px;line-height:18px;text-align:center;background-color:#000;border-radius:3px;box-shadow:inset 1px 0 2px 1px #633e2a,inset 1px 0 2px 1px #8f5d42}.warpathHUD-enterPortalButton.disabled{opacity:.6;transition:opacity .3s ease-in}.warpathHUD-enterPortalButton.disabled:hover{opacity:1}.warpathHUD-wave-mouse-image{outline:1px solid #915931}.warpathHUD-wave-mouse:hover .warpathHUD-wave-mouse-image{outline:1px solid #e1ae3e}.warpathHUD-streakContainer.streak_7 .warpathHUD-streak-quantity{animation:.9s quesoGesyerBackgroundFlare 10}@media (prefers-reduced-motion: reduce){.warpathHUD-streakContainer.streak_7 .warpathHUD-streak-quantity{animation:none}}.warpathHUD-dialog-image .itemImage{border:none}.warpathHUD-dialog-padding{display:flex;align-items:center;justify-content:center}.warpathHUD-dialog-title{margin-bottom:5px}.warpathHUD-moraleBar.warpathHUD-panicMeter-wave-stats{font-size:10px;text-align:center}.warpathHUD-wave-stats{position:absolute;inset:0;display:inline;color:#d9ac8c;text-shadow:0 1px #50301f,1px 0 #50301f,-1px 0 #50301f,0 -1px #50301f}.warpathHUD-moraleBar span{height:12px;overflow:hidden;border-radius:2px}.warpathHUD-moraleBar{height:12px;border-color:#3e291e}.warpathHUD-message{background-image:url(https://i.mouse.rip/desert_warpath_messages.png)}.warpathHUD-message.caught{left:6px;width:52px}.warpathHUD-message.reinforced{left:-2px;width:66px;border-color:#8a3200}.warpathHUD-message.streak.broken{left:-9px;width:83px;border-color:#8a3200}.warpathHUD-streakContainer{background-image:url(https://i.mouse.rip/desert_warpath_streakometer.png)}.warpathHUD-wave-mouse .mousehuntTooltip{left:-110px;width:260px}
`;
}
});
var engaged, addMissiles, updateCommandBar, desert_warpath_default, init_desert_warpath2 = __esm({
"src/modules/location-huds/locations/desert-warpath/index.js"() {
init_utils2();
init_styles82();
engaged = !1, addMissiles = () => {
let container = document.querySelector(".warpathHUD-waveContainer");
if (!container || container.querySelector(".warpathHud-missle-activate"))
return;
let trigger = makeElement("div", ["warpathHud-missle-activate", "warpathHUD-missile"]);
container.append(trigger), trigger.addEventListener("click", () => {
engaged = !engaged, engaged ? container.classList.add("warpathHUD-engaged") : container.classList.remove("warpathHUD-engaged");
});
let launchMissile = (event) => {
if (!container.classList.contains("warpathHUD-engaged") || event.target.classList.contains("warpathHUD-missile") || !engaged)
return;
let x = event.clientX ? event.clientX - container.getBoundingClientRect().left : Math.floor(Math.random() * container.getBoundingClientRect().width);
x += Math.floor(Math.random() * 50) - 25, hg.views.HeadsUpDisplayDesertWarpathView.spawnMissile(x, 1);
let missile;
setTimeout(() => {
missile = container.querySelectorAll('.warpathHUD-missile[style*="left: ' + x + 'px"]'), !(!missile || missile.length === 0) && missile.forEach((m) => {
setTimeout(() => {
m.classList.add("mh-ui-fade");
}, 50), setTimeout(() => {
m.classList.add("mh-ui-fade-out");
}, 100), setTimeout(() => {
m.remove();
}, 500);
});
}, 700);
};
container.addEventListener("click", launchMissile);
}, updateCommandBar = () => {
let wave = getFieryWarpathWave();
if (!wave || wave > 3)
return;
let panicMeter = document.querySelector(".warpathHUD-moraleBar.mousehuntTooltipParent");
if (!panicMeter)
return;
let miceInWave = document.querySelectorAll(`.warpathHUD-wave.wave_${wave} .warpathHUD-wave-mouse`), miceRetreats = { 1: 10, 2: 18, 3: 26 }, totalRemaining = 0;
miceInWave.forEach((mouse) => {
let mouseType = mouse.getAttribute("data-mouse"), mouseCount = mouse.querySelector(".warpathHUD-wave-mouse-population");
if (!mouseType || !mouseCount)
return;
let remaining2 = Number.parseInt(mouseCount.textContent, 10) || 0;
totalRemaining += remaining2;
});
let waveRetreat = miceRetreats[wave], remainingAfterRetreat = totalRemaining - waveRetreat, retreatText = remainingAfterRetreat <= 0 ? "Retreated" : `${remainingAfterRetreat} catch${remainingAfterRetreat > 1 ? "es" : ""} left`;
panicMeter.classList.add("warpathHUD-panicMeter-wave-stats");
let existing = panicMeter.querySelector(".warpathHUD-wave-stats");
existing ? existing.textContent = retreatText : makeElement("div", ["warpathHUD-wave-stats"], retreatText, panicMeter);
}, desert_warpath_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default81), addMissiles(), onRequest("environment/desert_warpath.php", addMissiles), getFlag("location-hud-fiery-warpath-no-command-bar-stats") || (updateCommandBar(), onTurn(updateCommandBar, 250));
});
}
});
var dojo_default, init_dojo = __esm({
"src/modules/location-huds/locations/dojo/index.js"() {
init_cheese_selectors();
dojo_default = () => __async(void 0, null, function* () {
cheese_selectors_default("dojo", ["maki_cheese"]);
});
}
});
var dracano_default, init_dracano = __esm({
"src/modules/location-huds/locations/dracano/index.js"() {
init_cheese_selectors();
dracano_default = () => __async(void 0, null, function* () {
cheese_selectors_default("dracano", ["inferno_havarti_cheese"]);
});
}
});
var styles_default82, init_styles83 = __esm({
"src/modules/location-huds/locations/draconic-depths/styles.css"() {
styles_default82 = `.draconicDepthsCavernView__maxhuntsRemainingQuantity{margin-left:2px;font-size:15px;color:#fff}.draconicDepthsCavernView__huntsRemainingContainer{font-size:10px;color:#b5b5b5}.draconicDepthsCavernView__duplicatorChestQuantity{left:52px;margin-bottom:-2px}.headsUpDisplayDraconicDepthsView__baitCraftableContainer .mousehuntTooltip{text-align:center}.draconicDepthsCavernView__titleRod{width:10px;height:12px;filter:drop-shadow(1px 1px 0 #666)}.draconicDepthsCrucibleView__crucibleProgressText{font-size:14px;text-shadow:0 0 0 rgb(0 0 0 / 75%),1px 0 0 #000,0 1px 0 #000,-1px 0 0 #000,0 -1px 0 #000,-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000}.draconicDepthsCrucibleView__crucibleProgress:before{filter:drop-shadow(1px 1px 1px #000) drop-shadow(1px 1px 2px #000)}.draconicDepthsCrucibleView__rerollButton{width:22px;height:22px;margin:2px 2px 2px 7px}.draconicDepthsForgeView__enterCavernMessage{font-size:13px;text-shadow:1px 1px 1px #000}.folkloreForestRegionView-dialog-help .draconicDepthsHelp__image{background-color:#447228;outline:2px solid #447228}.draconicDepthsCrucibleView__droid{animation:mh-improved-glow 1s infinite}.draconicDepthsForgeView__cruciblesContainer .draconicDepthsCrucibleView_crucibleView:nth-child(2) .draconicDepthsCrucibleView__droid{animation-delay:.3s}.draconicDepthsForgeView__cruciblesContainer .draconicDepthsCrucibleView_crucibleView:nth-child(3) .draconicDepthsCrucibleView__droid{animation-delay:.6s}#overlayPopup.fabledForestDialog.draconicDepthsPreviewDuplicatorChestDialogPopup #jsDialogClose{top:20px;right:30px;filter:opacity(.8) sepia(1) hue-rotate(358deg)}.draconicDepthsCavernView__tierThreshold{top:1px}.draconicDepthsCavernView__droid{transition:transform .5s ease;transform-origin:bottom}.headsUpDisplayDraconicDepthsView:hover .draconicDepthsCavernView__droid{animation:mh-improved-rotate-slightly 1s infinite}.draconicDepthsReinforceCavernDialogView__reinforceHuntsInputContainer{display:flex;gap:5px;align-items:center;justify-content:center;background:transparent;border:none}.draconicDepthsReinforceCavernDialogView__decrementButton{width:25px;height:25px;text-indent:-9999px;cursor:pointer;background-image:url(https://www.mousehuntgame.com/images/ui/hud/bountiful_beanstalk/harp_dialog_icons/volume_minus.png?asset_cache_version=3);background-repeat:no-repeat;background-size:contain}.draconicDepthsReinforceCavernDialogView__incrementButton{width:25px;height:25px;text-indent:-9999px;cursor:pointer;background-image:url(https://www.mousehuntgame.com/images/ui/hud/bountiful_beanstalk/harp_dialog_icons/volume_plus.png?asset_cache_version=3);background-repeat:no-repeat;background-size:contain}.draconicDepthsReinforceCavernDialogView__decrementButton,.draconicDepthsReinforceCavernDialogView__incrementButton{transition:transform .2s ease}.draconicDepthsReinforceCavernDialogView__decrementButton:hover,.draconicDepthsReinforceCavernDialogView__incrementButton:hover{transform:scale(1.1)}#reinforceHunts{font-size:19px;color:#fff;text-align:center;background-color:#192517;border:2.5px solid #85d523;border-radius:4px}.draconicDepthsReinforceCavernDialogView__inputContainer{color:transparent}
`;
}
});
var draconic_depths_default, init_draconic_depths = __esm({
"src/modules/location-huds/locations/draconic-depths/index.js"() {
init_utils2();
init_keep_inventory_open();
init_styles78();
init_styles83();
draconic_depths_default = () => __async(void 0, null, function* () {
addHudStyles([
styles_default77,
styles_default82
]), keep_inventory_open_default({
setting: "location-huds.prologue-pond-inventory-toggled",
buttonSelector: ".headsUpDisplayDraconicDepths__inventoryContainerButton",
inventorySelector: ".headsUpDisplayDraconicDepths__inventoryContainerBlockContent",
inventoryOpenClass: "headsUpDisplayDraconicDepths__inventoryContainerBlockContent--open",
buttonOpenClass: "headsUpDisplayDraconicDepths__inventoryContainerButton--open"
});
});
}
});
var elub_shore_default, init_elub_shore = __esm({
"src/modules/location-huds/locations/elub-shore/index.js"() {
init_cheese_selectors();
elub_shore_default = () => __async(void 0, null, function* () {
cheese_selectors_default("elub-shore", ["shell_cheese"]);
});
}
});
var styles_default83, init_styles84 = __esm({
"src/modules/location-huds/locations/floating-islands/styles.css"() {
styles_default83 = `.floatingIslandsHUD-islandLoot-label{color:transparent}.floatingIslandsHUD-islandLoot-label:before{position:absolute;top:2px;right:3px;bottom:3px;width:85px;font-size:13px;font-variant:small-caps;color:#e2d8b6;text-shadow:1px 1px #43311c;content:"Mice can drop";background-color:#78502d;border-bottom-left-radius:10px}a.floatingIslandsHUD-islandLoot{font-size:14px}.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.fog_shrine:first-child,.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.frost_shrine:first-child,.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.rain_shrine:first-child,.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.wind_shrine:first-child,.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.paragon_cache_a:first-child,.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.paragon_cache_b:first-child,.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.paragon_cache_c:first-child,.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.paragon_cache_d:first-child{background-position-y:0;border-radius:3px;box-shadow:inset 0 0 13px 3px gold,2px 0 1px gold}.floatingIslandsAdventureBoardSkyMap-horizontalPowerTypes .floatingIslandsHUD-powerType.active:before{border-radius:5px 5px 50px 50px;box-shadow:0 0 20px gold inset}.floatingIslandsAdventureBoardSkyMap-verticalPowerTypes .floatingIslandsHUD-powerType.active:before{top:1px;border-radius:50px 5px 5px 50px;box-shadow:0 0 20px gold inset}.floatingIslandsHUD-modPanel.fog_shrine:hover:before,.floatingIslandsHUD-modPanel.frost_shrine:hover:before,.floatingIslandsHUD-modPanel.rain_shrine:hover:before,.floatingIslandsHUD-modPanel.wind_shrine:hover:before{position:absolute;right:7px;bottom:6px;left:7px;z-index:1;display:flex;justify-content:center;height:auto;padding:1px;font-size:16px;font-variant:small-caps;color:#0c3e0e;text-shadow:none;white-space:nowrap;content:"";background-color:#d1e19d}.floatingIslandsHUD-modPanel.fog_shrine:hover:before{content:"Fog"}.floatingIslandsHUD-modPanel.frost_shrine:hover:before{content:"Frost"}.floatingIslandsHUD-modPanel.rain_shrine:hover:before{content:"Rain"}.floatingIslandsHUD-modPanel.wind_shrine:hover:before{content:"Wind"}span.floatingIslandsHUD-huntsRemaining{position:absolute;top:6px;right:6px;padding:2px 4px;font-size:16px}.floatingIslandsHUD-huntsRemainingContainer{top:-1px}.floatingIslandsHUD-islandTitle{top:-3px;font-size:15px;text-shadow:none}.floatingIslandsHUD-bait-quantity,.floatingIslandsHUD-bait-craftingItem-quantity{padding-right:4px;font-size:11px}.floatingIslandsHUD-craftingItem-quantity.quantity{font-size:13px}.floatingIslandsHUD-craftingItem.show-progress .floatingIslandsHUD-craftingItem-quantity.quantity{font-size:11px}.floatingIslandsHUD.island .floatingIslandsHUD-airshipContainer{top:70px;left:524px;z-index:14;filter:drop-shadow(0 0 6px #fbe7a4);transform:scale(2)}.floatingIslandsWorkshop-part-name{display:flex;align-items:center;justify-content:center;width:70%;height:15px;font-size:11px;text-shadow:none}.floatingIslandsHUD-fuel-quantity.quantity{top:31px;right:0;left:0;width:auto;padding:4px;margin-right:8px;margin-left:7px;font-size:14px;pointer-events:none;background:linear-gradient(218deg,#7baabd,#568295);border-radius:3px;box-shadow:inset 0 0 2px 2px #09577f,0 2px 8px 1px #78aabd}.floatingIslandsHUD-fuel-quantity.quantity:hover,.floatingIslandsHUD-fuel-quantity.quantity:focus{cursor:pointer}.floatingIslandsHUD-fuel-quantity.quantity.active{background:linear-gradient(218deg,#0e8eeb,#28eeff);box-shadow:0 0 2px 2px #09577f inset,0 2px 7px 1px #37feff}.floatingIslandsHUD-retreatButton,.floatingIslandsHUD-retreatButton.disabled,.floatingIslandsHUD.enemyActive .floatingIslandsHUD-retreatButton{margin-top:-1px;color:#b0a06c!important;background-color:transparent;border:none;border-radius:0}.floatingIslandsHUD-retreatButton:hover,.floatingIslandsHUD-retreatButton.disabled:hover,.floatingIslandsHUD.enemyActive .floatingIslandsHUD-retreatButton:hover,.floatingIslandsHUD-retreatButton:focus,.floatingIslandsHUD-retreatButton.disabled:focus,.floatingIslandsHUD.enemyActive .floatingIslandsHUD-retreatButton:focus{color:#fce698!important;background:none}.floatingIslandsHUD-craftingItem-quantity.quantity,.floatingIslandsHUD-islandLoot,.floatingIslandsHUD-modPanel-effect{text-shadow:1px 1px 1px #242424}.floatingIslandsHUD-modPanel.active .floatingIslandsHUD-modPanel-effect,.floatingIslandsHUD-modPanel.complete .floatingIslandsHUD-modPanel-effect{color:#0c3e0e;text-shadow:1px 1px 1px #9ab59a}.mh-ui-fi-enemy-countdown{position:absolute;top:0;bottom:-2px;left:-1px;z-index:4;width:auto;min-width:70px;padding-right:2px;padding-left:6px;font-size:11px;line-height:26px;white-space:nowrap;background-color:#51250a;border-radius:6px 5px 5px 0;box-shadow:1px -1px #b2630e,inset 1px 0 0 1px #7d5430}span.mh-ui-fi-enemy-countdown-hunts{font-size:14px;color:#fbe296;text-shadow:1px 1px 1px #000;vertical-align:top}.mh-ui-fi-enemy-name{position:absolute;top:33px;right:24px;left:26px;height:12px;padding:0;margin:0;font-size:12px;font-weight:500;line-height:4px;text-align:center;background:linear-gradient(90deg,#ecc37d,#fde89a 18% 64%,#f2cf86);border:1px solid #b15d18;border-top:none;border-radius:0 0 19px 19px;box-shadow:0 1px 1px #d78c34}.floatingIslandsHUD.enemyActive .floatingIslandsHUD-enemyContainer.hasEnemy .floatingIslandsHUD-enemy-thumb{box-shadow:0 0 4px 3px #fb7660}.floatingIslandsHUD.enemyActive .floatingIslandsHUD-goalContainer .floatingIslandsHUD-enemy-state.enemyActive{margin-right:4px;color:#fb7660}.floatingIslandsHUD-fuelContainer:hover{filter:brightness(1.2)}.mousehuntTooltip{transition-delay:.5s}.floatingIslandsHUD-craftingItem.show-progress{display:flex;flex-direction:row;justify-content:flex-end;padding-right:3px}.mh-ui-fi-glore-progress{margin-left:2px;font-size:9px;text-shadow:1px 1px 1px #242424}.floatingIslandPaperDoll-mod{pointer-events:none}.floatingIslandsAdventureBoardSkyMap-rerollQuantity.quantity{font-size:13px}.floatingIslandsAdventureBoardSkyPalace-wheel-face.loot_cache.real.active{margin-left:1px;border-radius:5px;box-shadow:0 0 13px 2px gold inset}.floatingIslandsAdventureBoardSkyMap-fuel-quantity{padding:2px;margin-top:-2px;margin-left:-2px;font-size:13px;background-color:#302636;border-radius:3px}.floatingIslandsAdventureBoard-paragonItem.mousehuntTooltipParent{font-size:14px}a.floatingIslandsHUD-flightLogButton.mousehuntTooltipParent{top:2px;left:490px;background-image:url(https://i.mouse.rip/upscaled/flight_log_button.png?1);background-size:cover;transform:scale(1.2);transform-origin:left}.floatingIslandsHUD.island .floatingIslandsHUD-bait.sky_cheese.skyCheeseWarning:after{top:-10px;left:-9px;width:30px;height:30px}.floatingIslandsHUD.island .floatingIslandsHUD-bait.skyCheeseWarning .floatingIslandsHUD-bait-image.sky_cheese{box-shadow:inset 0 0 10px 3px #ff1b00}.floatingIslandsHUD-enemy-tooltip .floatingIslandsHUD-wardenShrine-status{padding-left:3px;font-size:13px;text-align:center;background-position:10px 20px}a.floatingIslandsHUD-islandLoot:hover,a.floatingIslandsHUD-islandLoot:focus{z-index:5}.floatingIslandsAirship.highlight .floatingIslandsAirship-part{transform:scale(1.1) rotate(2deg)}.floatingIslandsHUD-enemyContainer:hover .floatingIslandsHUD-enemy-thumb{box-shadow:inset 1px -1px 5px 7px #fb7660}.floatingIslandsHUD-enemy-thumbContainer{overflow:hidden}.floatingIslandsAdventureBoard-info span{line-height:1.5}.floatingIslandsHUD-jetstream{position:absolute;top:15px;right:15px;z-index:14;width:30px;height:30px}.floatingIslandsHUD.island .floatingIslandsHUD-airship-animationBoundary{z-index:14}.floatingIslandsHUD-jetstream .mousehuntTooltip{z-index:20}.launch_pad_island .floatingIslandsHUD-jetstream{top:12px;right:47px}.floatingIslandsHUD-jetstream .trapImageView-trapAura.active{width:30px;height:30px;margin:0;visibility:visible;opacity:.5}.floatingIslandsHUD-jetstream .trapImageView-trapAura.active:hover{opacity:1}.floatingIslandsHUD-jetstream .trapImageView-trapAura.active .mousehuntTooltip{top:-20px;left:-250px;z-index:15;width:235px}.floatingIslandsHUD-jetstream-time{position:absolute;top:-20px;right:0;width:auto;min-width:250px;font-size:13px;color:#71d0ff;text-align:right;text-shadow:1px 1px 0 rgb(0 0 0 / 50%)}.launch_pad_island .floatingIslandsHUD-jetstream-time{right:-30px}.floatingIslandsHUD-inventoryBag-item .floatingIslandsHUD-item-image,.floatingIslandsHUD-inventoryBag-item.active .floatingIslandsHUD-item-image{height:50px;background-color:transparent;border:none;box-shadow:none}.floatingIslandsHUD-inventoryBag-item:hover .floatingIslandsHUD-item-image{background-size:55px}.inventoryBag .floatingIslandsHUD-inventoryBag-item-quantity.quantity{top:35px;padding:2px;font-size:12px;box-shadow:0 0 100px #fffc inset,0 0 2px #333}.floatingIslandsHUD-statItem-quantity{z-index:1}.inventoryBag .floatingIslandsHUD-inventoryBag-item-name{margin:5px 0;font-size:10px}.floatingIslandPaperDoll-mod.sky_pirates.level_1{animation:dirigibleFloat 5s infinite}.floatingIslandsWorkshop-dirigiblePreview .floatingIslandsAirship:before{position:absolute;top:45px;right:-10px;left:-30px;display:block;height:170px;overflow:hidden;content:"";background:url(https://i.mouse.rip/airship-shadow.png) no-repeat;background-position:bottom center;background-size:190px;opacity:.2;transform:perspective(600px) rotateX(67deg)}.floatingIslandsWorkshop-dirigiblePreview .floatingIslandsAirship.animate:before{animation:mh-improved-dirigible-float-shadow 2s infinite}@keyframes mh-improved-dirigible-float-shadow{0%{top:45px;background-size:180px}50%{top:40px;background-size:190px}to{top:45px;background-size:180px}}@media (prefers-reduced-motion: reduce){.floatingIslandPaperDoll-mod{animation:none}.floatingIslandsWorkshop-dirigiblePreview .floatingIslandsAirship:before{animation:none}}.floatingIslandsHUD-warningContainer{top:20px;left:548px}.floatingIslandsHUD-statItemContainer{left:250px;justify-content:space-evenly;width:350px}.floatingIslandsHUD-inventoryBagButton{right:110px;background-image:url(https://i.mouse.rip/fi-bag.png)}.floatingIslandsHUD-statItem.active{display:flex;flex-direction:column;align-items:center}.floatingIslandsHUD-bait-image{inset:1px;background-repeat:no-repeat;background-size:32px;box-shadow:1px 1px 1px #b75d06 inset,1px 1px 1px #b75d06 inset}a.floatingIslandsHUD-bait-image:hover{background-size:32px;box-shadow:0 0 2px 2px #10ff00 inset}.floatingIslandsHUD-bait-craftingItem-image{background-repeat:no-repeat;background-position:1px 2px;background-size:23px;box-shadow:1px 1px 1px #b75d06 inset,1px 1px 1px #b75d06 inset,1px -1px 1px #b75d06 inset}.sky_pirate_cheese .floatingIslandsHUD-bait-craftingItem-image{background-position:1px 0;background-size:22px;box-shadow:1px 1px 1px #b75d06 inset,1px 1px 1px #b75d06 inset}.floatingIslandsHUD-bait.sky_cheese.extra_rich_sky_cheese .floatingIslandsHUD-bait-craftingItem-image{top:24px}.floatingIslandsHUD-bait.sky_cheese.extra_rich_sky_cheese .floatingIslandsHUD-bait-image.extra_rich_sky_cheese{background-position:3px 4px;background-size:29px}.floatingIslandsWorkshop-dirigiblePreview .floatingIslandsAirship-part{top:-10px;background-repeat:no-repeat}.floatingIslandsWorkshop-part.active .floatingIslandsWorkshop-part-border,.floatingIslandsWorkshop-part:hover .floatingIslandsWorkshop-part-border{background-color:#fcfcef;border:1px solid #edd28a}.floatingIslandsWorkshop-part.active{order:-1}.floatingIslandsWorkshop-part.active .floatingIslandsWorkshop-part-border:after{border-width:2px}.floatingIslandsWorkshop-part-state.active .mousehuntActionButton.selected,.floatingIslandsWorkshop-part-state.active .mousehuntActionButton.selected:before{background:none;border:none;box-shadow:none}.floatingIslandsWorkshop-part-state.active .mousehuntActionButton span{font-style:normal}.floatingIslandsWorkshop-part .floatingIslandsWorkshop-part-border{border:1px solid #edd28a;box-shadow:inset 0 -1px 5px 2px #edd28a}.floatingIslandsWorkshop-part-state .mousehuntActionButton.lightBlue{box-shadow:none}.floatingIslandsWorkshop-part{display:flex;flex-direction:column;align-items:center;margin-bottom:10px}.floatingIslandsHUD .floatingIslandsHUD-enemyContainer.hasEnemy:hover .floatingIslandsHUD-enemy-thumb{transform:scale(1.3)}.floatingIslandsHUD .floatingIslandsHUD-enemyContainer.hasEnemy:active .floatingIslandsHUD-enemy-thumb{transform:scale(1.3) rotate(360deg)}.floatingIslandsHUD .floatingIslandsHUD-enemyContainer.hasEnemy .floatingIslandsHUD-enemy-thumb{transition:.2s ease-in}.floatingIslandsHUD-modPanelTooltip-islandEffects.active .floatingIslandsHUD-modPanelTooltip-effectContainer.specialEffect:after,.floatingIslandsHUD-modPanelTooltip-islandEffects.active .floatingIslandsHUD-modPanelTooltip-effectContainer.reward:after,.floatingIslandsHUD-modPanelTooltip-islandEffects.complete .floatingIslandsHUD-modPanelTooltip-effectContainer.specialEffect:after,.floatingIslandsHUD-modPanelTooltip-islandEffects.complete .floatingIslandsHUD-modPanelTooltip-effectContainer.reward:after,.floatingIslandsHUD-modPanelTooltip-islandEffects.complete .floatingIslandsHUD-modPanelTooltip-effectContainer.oneTimeReward:after{bottom:3px}.floatingIslandsHUD-modPanelTooltip-effect{font-size:12px;text-align:center}.floatingIslandsHUD-item-image.cloud_curd_crafting_item{margin-right:3px;background-position:50% 10%;background-size:30px}.floatingIslandsHUD-modPanelTooltip .floatingIslandsHUD-item-image.cloud_curd_crafting_item{background-position:50% 2px}.floatingIslandsHUD-bait.sky_cheese.extra_rich_sky_cheese .floatingIslandsHUD-bait-quantity.sky_cheese{top:8px}.floatingIslandsHUD-navigationButtons.showSkyPalace .floatingIslandsHUD-skyPalaceFuel .quantity{font-size:13px}.floatingIslandsAdventureBoardSkyMap-rerollButton{animation:mh-improved-fade-busy 3s 1}.floatingIslandsAdventureBoardSkyMap-rerollButton.busy{pointer-events:none;animation:none}.floatingIslandsHUD-modPanel.highlight:after{border:1px solid #f1dc8a;box-shadow:0 0 3px 3px #ffdcbe inset}.floatingIslandsHUD-modPanelTooltip-effect-label{color:#f4d78c;text-align:center;text-shadow:1px 1px 1px #754426}.floatingIslandsHUD-statItem{width:auto}.floatingIslandsWorkshop-unlockButton.complete,.floatingIslandsWorkshop-unlockSkyPalaceItemButton.complete{filter:hue-rotate(300deg)}.floatingIslandsWorkshop-unlockSkyPalaceItemButton{top:unset;bottom:21px;left:340px;width:100%;height:37px;background-size:110px}.floatingIslandsWorkshop-skyPalace:hover .floatingIslandsWorkshop-skyPalace-upgradeImage.active{animation-name:mh-improved-shake;animation-duration:.5s;animation-iteration-count:infinite}.floatingIslandsHUD-modPanel-progress-pip{box-shadow:inset 0 0 2px 1px #6c3718}.floatingIslandsHUD-modPanel-progress-pip.active,.floatingIslandsHUD-modPanel-progress-pip.enemy,.floatingIslandsHUD-modPanel-progress-pip.player{box-shadow:none}.floatingIslandsHUD-statItem.active.hidden{display:none}.floatingIslandsHUD.island .floatingIslandsHUD-trapLibraryButton:hover{cursor:pointer}.floatingIslandsHUD-modPanel-progress,.floatingIslandsHUD-modPanel-progress-pip.player:before{counter-reset:tile tile-bw}.floatingIslandsHUD-modPanel-progress-pip:before{position:absolute;right:-3px;bottom:18px;font-size:14px;text-shadow:1px 1px #000;visibility:hidden;content:"";counter-increment:tile 1}.usingFuel .floatingIslandsHUD-modPanel-progress-pip:nth-child(odd):before{counter-increment:tile-bw}.floatingIslandsHUD-modPanel-progress-pip.enemy:before,.floatingIslandsHUD-modPanel-progress-pip.current:before{counter-increment:tile -1}.usingFuel .floatingIslandsHUD-modPanel-progress-pip.current:before{counter-increment:tile-bw -1}.usingFuel .floatingIslandsHUD-modPanel-progress-pip.enemy:before{counter-increment:tile 1}.active .floatingIslandsHUD-modPanel-progress-pip:before{text-shadow:1px 1px #fff}.usingFuel .floatingIslandsHUD-modPanel-progress-pip:before{color:#e0f8fa}.usingFuel .active .floatingIslandsHUD-modPanel-progress-pip:before{color:#023a56}.floatingIslandsHUD-modPanel-content:hover .floatingIslandsHUD-modPanel.active .floatingIslandsHUD-modPanel-progress-pip:last-child:before{visibility:visible;content:counter(tile)}.usingFuel .floatingIslandsHUD-modPanel-progress-pip:last-child:before{content:counter(tile)}.complete .floatingIslandsHUD-modPanel-progress-pip:before{visibility:hidden}.floatingIslandsAdventureBoardSkyMap-rerollImage:after{top:3px;background-image:url(https://i.mouse.rip/cyclone-stone.png)}.floatingIslandsAdventureBoardSkyMap-rerollButton:hover{border-radius:5px;box-shadow:inset 0 0 2px 1px #587565}.floatingIslandsAdventureBoardSkyMap-verticalPowerTypes .floatingIslandsHUD-powerType.active:after,.floatingIslandsAdventureBoardSkyMap-horizontalPowerTypes .floatingIslandsHUD-powerType.active:after{border-color:transparent}.floatingIslandsHUD-enemy-wardenProgress{top:-11px}.floatingIslandsHUD-inventoryBagButton:hover{background-position-y:-1%}.floatingIslandsHUD-modPanelTooltipContainer.active{z-index:17}
`;
}
});
var toggleFuelClass, toggleFuel, addBossCountdown, addEnemyClass, getNextOcUpgradeCost, showGloreProgress, onSkyMapShow, showBWReminder, maybeChangeWarning, updateJetstreamTime, jsClone, showJetstream, makeAirshipDraggable, run2, hud, floating_islands_default4, init_floating_islands4 = __esm({
"src/modules/location-huds/locations/floating-islands/index.js"() {
init_utils2();
init_styles84();
toggleFuelClass = (fuelCount, isActive) => {
isActive ? fuelCount.classList.remove("active") : fuelCount.classList.add("active");
}, toggleFuel = (skip = !1) => {
var _a, _b, _c;
let fuel = document.querySelector(".floatingIslandsHUD-fuel-button");
if (!fuel)
return;
let fuelCount = document.querySelector(".floatingIslandsHUD-fuel-quantity");
!fuelCount || (((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) == null ? void 0 : _b.hunting_site_atts) == null ? void 0 : _c.is_fuel_enabled) || !1 ? fuelCount.classList.add("active") : fuelCount.classList.remove("active"), skip) || fuel.addEventListener("click", (e) => {
toggleFuelClass(fuelCount, e.target.classList.contains("active")), hg.views.HeadsUpDisplayFloatingIslandsView.toggleFuel(fuel);
});
}, addBossCountdown = () => __async(void 0, null, function* () {
var _a, _b, _c;
let existing = document.querySelector(".mh-ui-fi-enemy-countdown");
existing && existing.remove();
let atts = ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) == null ? void 0 : _b.hunting_site_atts) || {};
if (!atts.has_enemy)
return;
let name = ((_c = atts.enemy) == null ? void 0 : _c.abbreviated_name) || "Enemy";
name = name.split(" ")[0];
let huntsRemaining = atts.enemy_encounter_hunts_remaining || 0, bossCountdown = document.createElement("div");
if (bossCountdown.classList.add("mh-ui-fi-enemy-countdown"), makeElement("span", "mh-ui-fi-enemy-countdown-name", name, bossCountdown), makeElement("span", "mh-ui-fi-enemy-countdown-in", " in ", bossCountdown), makeElement("span", "mh-ui-fi-enemy-countdown-hunts", huntsRemaining, bossCountdown), atts.has_encountered_enemy || atts.has_defeated_enemy)
return;
let goalContainer = document.querySelector(".floatingIslandsHUD-goalContainer");
if (goalContainer) {
goalContainer.append(bossCountdown);
return;
}
let tries = 0, maxTries = 10, interval = setInterval(() => {
goalContainer = document.querySelector(".floatingIslandsHUD-goalContainer"), goalContainer && (goalContainer.append(bossCountdown), clearInterval(interval)), tries += 1, tries >= maxTries && clearInterval(interval);
}, 1e3 * tries);
}), addEnemyClass = () => __async(void 0, null, function* () {
var _a, _b, _c, _d, _e, _f, _g, _h;
let name = ((_d = (_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) == null ? void 0 : _b.hunting_site_atts) == null ? void 0 : _c.enemy) == null ? void 0 : _d.name) || !1, type2 = ((_h = (_g = (_f = (_e = user == null ? void 0 : user.quests) == null ? void 0 : _e.QuestFloatingIslands) == null ? void 0 : _f.hunting_site_atts) == null ? void 0 : _g.enemy) == null ? void 0 : _h.type) || !1;
if (!name || !type2)
return;
let exists = document.querySelector(".mh-ui-fi-enemy-name");
if (exists)
exists.innerText = name;
else {
let enemyContainer = document.querySelector(".floatingIslandsHUD-islandTitle");
if (!enemyContainer)
return;
makeElement("div", "mh-ui-fi-enemy-name", name, enemyContainer);
}
}), getNextOcUpgradeCost = (ocLevel) => {
switch (Number.parseInt(ocLevel, 10)) {
case 1:
return "35";
case 2:
return "150";
case 3:
return "500";
case 4:
return "1.2k";
case 5:
return "2k";
case 6:
return "3.5k";
case 7:
return "8k";
case 8:
return "10k";
default:
return !1;
}
}, showGloreProgress = () => __async(void 0, null, function* () {
var _a, _b, _c;
let items6 = yield getUserItems(["floating_islands_cloud_gem_stat_item", "floating_islands_sky_ore_stat_item"]);
if (!(items6 && items6.length))
return;
let glass = document.querySelector(".floatingIslandsHUD-craftingItem.floating_islands_cloud_gem_stat_item"), ore = document.querySelector(".floatingIslandsHUD-craftingItem.floating_islands_sky_ore_stat_item");
if (!glass || !ore)
return;
let existing = document.querySelectorAll(".mh-ui-fi-glore-progress");
existing && existing.length && existing.forEach((el) => {
el.remove();
});
let nextUpgrade = getNextOcUpgradeCost(((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) == null ? void 0 : _b.airship) == null ? void 0 : _c.oculus_level) || 0);
nextUpgrade && (makeElement("div", "mh-ui-fi-glore-progress", ` / ${nextUpgrade}`, glass), glass.classList.add("show-progress"), makeElement("div", "mh-ui-fi-glore-progress", ` / ${nextUpgrade}`, ore), ore.classList.add("show-progress"));
}), onSkyMapShow = () => {
let roll = document.querySelector(".floatingIslandsAdventureBoardSkyMap-rerollButton");
roll && roll.addEventListener("click", () => {
roll.classList.add("disabled"), roll.classList.add("no-click"), setTimeout(() => {
roll.classList.remove("disabled"), roll.classList.remove("no-click");
}, 300);
});
}, showBWReminder = () => {
var _a, _b, _c, _d, _e, _f, _g, _h;
let isStart = ((_b = (_a = user.enviroment_atts) == null ? void 0 : _a.hunting_site_atts) == null ? void 0 : _b.hunts_remaining) === 75 && ((_c = user.enviroment_atts) == null ? void 0 : _c.on_island), bwOff = !((_e = (_d = user.enviroment_atts) == null ? void 0 : _d.hunting_site_atts) != null && _e.is_fuel_enabled), bw = ((_h = (_g = (_f = user.enviroment_atts) == null ? void 0 : _f.items) == null ? void 0 : _g.bottled_wind_stat_item) == null ? void 0 : _h.quantity) || "0", hasBw = Number.parseInt(bw.toString().replaceAll(",", ""), 10) >= 50;
isStart && bwOff && hasBw && showHornMessage({
title: "Bottled Wind Reminder",
text: "Don't forget to activate your Bottled Wind!",
button: "Activate",
/**
* Action to click the Bottled Wind button.
*/
action: () => {
setTimeout(() => {
let button = document.querySelector(".floatingIslandsHUD-fuel-button");
button && button.click();
}, 750);
},
dismiss: 4e3,
image: "https://www.mousehuntgame.com/images/ui/hud/floating_islands/items/bottled_wind_stat_item.png"
});
}, maybeChangeWarning = () => __async(void 0, null, function* () {
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
let isLAI = (_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) == null ? void 0 : _b.hunting_site_atts) == null ? void 0 : _c.is_low_tier_island, isAtBoss = ((_f = (_e = (_d = user == null ? void 0 : user.quests) == null ? void 0 : _d.QuestFloatingIslands) == null ? void 0 : _e.hunting_site_atts) == null ? void 0 : _f.has_encountered_enemy) && !((_i = (_h = (_g = user == null ? void 0 : user.quests) == null ? void 0 : _g.QuestFloatingIslands) == null ? void 0 : _h.hunting_site_atts) != null && _i.has_defeated_enemy);
if (!isLAI || !isAtBoss)
return;
let bossWarning = document.querySelector(".floatingIslandsHUD-warning.floatingIslandsHUD-powerTypeWarning.active");
bossWarning && (bossWarning.innerHTML = "Use your most powerful setup!");
}), updateJetstreamTime = () => __async(void 0, null, function* () {
var _a, _b;
let container = document.querySelector(".floatingIslandsHUD-jetstream-time");
if (!container)
return;
if (!((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) != null && _b.jet_stream_active)) {
container.innerHTML = "";
return;
}
let expiry = document.querySelector(".floatingIslandsHUD-jetstream .trapImageView-tooltip-trapAura-expiry span");
if (!expiry || !expiry.innerText) {
container.innerHTML = "";
return;
}
let dateParts = expiry.innerText.split(" ");
if (!dateParts.length || dateParts.length < 5) {
container.innerHTML = "";
return;
}
let month = dateParts[0], day = dateParts[1].replace(",", ""), year = dateParts[2], timeParts = dateParts[4].split(":"), hours = Number.parseInt(timeParts[0]), minutes = timeParts[1].slice(0, 2);
dateParts[4].includes("pm") && hours !== 12 ? hours += 12 : dateParts[4].includes("am") && hours === 12 && (hours = 0);
let expiryDate = Date.parse(`${month} ${day}, ${year} ${hours}:${minutes}`);
if (Number.isNaN(expiryDate))
return;
let timeRemaining = expiryDate - /* @__PURE__ */ new Date(), duration = plainHumanizer(timeRemaining, {
round: !0,
units: ["d", "h", "m"],
spacer: " ",
delimiter: " "
});
container.innerText !== duration && (container.innerText = duration, container.title = `Jetstream aura will expire on ${expiry.innerText}`);
}), showJetstream = () => __async(void 0, null, function* () {
var _a, _b;
let exists = document.querySelector(".floatingIslandsHUD-jetstream");
if (exists && exists.remove(), !((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) != null && _b.jet_stream_active) || document.querySelector(".floatingIslandsHUD-jetstream"))
return;
let container = document.querySelector(".floatingIslandsHUD");
if (!container)
return;
let hudAura;
if (getCurrentPage() === "camp") {
let aura = document.querySelector(".trapImageView-trapAura.mousehuntTooltipParent.QuestJetStreamAura.active");
if (!aura)
return;
hudAura = aura.cloneNode(!0), jsClone = hudAura;
} else
hudAura = jsClone;
if (!hudAura)
return;
let tooltip = hudAura.querySelector(".mousehuntTooltip");
tooltip && (tooltip.classList.remove("right"), tooltip.classList.add("left"));
let auraContainer = makeElement("div", "floatingIslandsHUD-jetstream");
auraContainer.append(hudAura), container.append(auraContainer);
let timeRemainingEl = makeElement("div", "floatingIslandsHUD-jetstream-time");
auraContainer.append(timeRemainingEl), updateJetstreamTime();
}), makeAirshipDraggable = () => {
let airship = document.querySelector(".floatingIslandsHUD-airshipContainer");
if (!airship)
return;
airship.classList.contains("landOnLaunchPad") && (airship.style.top = "", airship.style.left = "");
let airshipBox = airship.querySelector(".floatingIslandsHUD-airship-boundingBox");
if (!airshipBox)
return;
airshipBox.removeAttribute("onclick");
let startingPosition = getSetting("location-huds.fi-draggable-airship-position", {});
startingPosition.top && (airship.style.top = `${startingPosition.top}px`), startingPosition.left && (airship.style.left = `${startingPosition.left}px`);
let isDragging = !1, startX, startY2, startTop, startLeft, hasMoved = !1, mousemove = (e) => {
if (!isDragging)
return;
let dx = e.clientX - startX, dy = e.clientY - startY2;
(Math.abs(dx) > 5 || Math.abs(dy) > 5) && (hasMoved = !0), airship.style.top = `${startTop + dy}px`, airship.style.left = `${startLeft + dx}px`;
}, mouseup = () => {
isDragging = !1, document.removeEventListener("mouseup", mouseup), document.removeEventListener("mousemove", mousemove), hasMoved ? saveSetting("location-huds.fi-draggable-airship-position", { top: airship.offsetTop, left: airship.offsetLeft }) : hg.views.FloatingIslandsWorkshopView.show("customize");
}, mousedown = (e) => {
e.preventDefault(), e.stopPropagation(), isDragging = !0, hasMoved = !1, startX = e.clientX, startY2 = e.clientY, startTop = airship.offsetTop, startLeft = airship.offsetLeft, document.addEventListener("mouseup", mouseup), document.addEventListener("mousemove", mousemove);
};
airship.removeEventListener("mousedown", airship._mousedownHandler), document.removeEventListener("mouseup", airship._mouseupHandler), document.removeEventListener("mousemove", airship._mousemoveHandler), airship._mousedownHandler = mousedown, airship._mouseupHandler = mouseup, airship._mousemoveHandler = mousemove, airship.addEventListener("mousedown", mousedown);
let islandContainer = document.querySelector(".floatingIslandPaperDoll");
islandContainer && (islandContainer.removeEventListener("click", islandContainer._clickHandler), islandContainer._clickHandler = () => {
saveSetting("location-huds.fi-draggable-airship-position", {}), airship.style.transition = "top 0.5s, left 0.5s", airship.style.top = "", airship.style.left = "", setTimeout(() => {
airship.style.transition = "";
}, 500);
}, islandContainer.addEventListener("click", islandContainer._clickHandler));
}, run2 = () => __async(void 0, null, function* () {
yield showJetstream(), yield addEnemyClass(), yield addBossCountdown(), yield maybeChangeWarning(), getSetting("location-huds.fi-draggable-airship") && setTimeout(makeAirshipDraggable, 500);
}), hud = () => {
toggleFuel(), showGloreProgress(), run2(), showBWReminder(), onTravel(() => setTimeout(showBWReminder, 1500)), onEvent("ajax_response", () => {
setTimeout(run2, 300);
}), document.addEventListener("horn-countdown-tick-minute", updateJetstreamTime), onDialogShow("floatingIslandsAdventureBoard.floatingIslandsDialog.skyPalace", onSkyMapShow), onRequest("environment/floating_islands.php", (request, data) => {
run2(), toggleFuel(!0), (data == null ? void 0 : data.action) === "launch" && setMultipleTimeout(() => {
run2(), showBWReminder();
}, [1e3, 2e3, 3e3, 4e3, 5e3]), (data == null ? void 0 : data.action) === "retreat" && saveSetting("location-huds.fi-draggable-airship-position", {}), setTimeout(() => run2(), 2e3);
});
}, floating_islands_default4 = () => __async(void 0, null, function* () {
addHudStyles(styles_default83), hud();
});
}
});
var styles_default84, init_styles85 = __esm({
"src/modules/location-huds/locations/forbidden-grove/styles.css"() {
styles_default84 = `.forbiddenGroveHUD-grovebar-timeLeft{position:absolute;top:6px;left:171px;padding:1px 11px;font-size:12px;font-weight:900;color:#5f463d;background-color:#e1d1b7;border-top-right-radius:10px;box-shadow:0 -.5px 1px 1px #e1d1b7}
`;
}
});
var updateClosingTime2, hud2, forbidden_grove_default, init_forbidden_grove = __esm({
"src/modules/location-huds/locations/forbidden-grove/index.js"() {
init_utils2();
init_styles85();
init_cheese_selectors();
updateClosingTime2 = () => {
let timeLeftText = "", today = /* @__PURE__ */ new Date(), rotationLength = 20, rotationsExact = (today.getTime() / 1e3 - 1285704e3) / 3600 / rotationLength, rotationsInteger = Math.floor(rotationsExact), partialRotation = (rotationsExact - rotationsInteger) * rotationLength;
if (partialRotation < 16) {
let closes = (16 - partialRotation).toFixed(3), hours = Math.floor(closes), minutes = Math.ceil((closes - Math.floor(closes)) * 60);
timeLeftText = `${hours}h ${minutes}m remaining`;
}
let timeLeftEl = document.createElement("div");
return timeLeftEl.classList.add("forbiddenGroveHUD-grovebar-timeLeft"), timeLeftEl.innerText = timeLeftText, timeLeftEl;
}, hud2 = () => {
if (getCurrentLocation2() !== "forbidden_grove")
return;
let hudBar = document.querySelector(".forbiddenGroveHUD-grovebar");
if (!hudBar)
return;
let existing = document.querySelector(".forbiddenGroveHUD-grovebar-timeLeft");
existing && existing.remove();
let timeLeftEl = updateClosingTime2();
hudBar.append(timeLeftEl);
let timer = setInterval(updateClosingTime2, 60 * 1e3);
onEvent("travel_complete", () => {
clearInterval(timer);
});
}, forbidden_grove_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default84), cheese_selectors_default("forbidden-grove", [
"ancient_cheese",
"radioactive_blue_cheese",
"magical_radioactive_blue_cheese",
"moon_cheese",
"crescent_cheese"
]), hud2();
});
}
});
var saveHidden, isHidden, getToggleVisibilityMapping, toggleAllVisibility, isUnlocked, hideOrShowBlock, addToggle, addUpgradeVisibilityToggles, hasAddedUpgradeVisibilityToggles, folklore_forest_default2, init_folklore_forest2 = __esm({
"src/modules/location-huds/shared/folklore-forest/index.js"() {
init_utils2();
saveHidden = (upgradeId, isHidden2) => {
let upgradeIds = getSetting("location-huds.folklore-forest-visibility-toggles", {});
upgradeIds[upgradeId] = isHidden2, saveSetting("location-huds.folklore-forest-visibility-toggles", upgradeIds);
}, isHidden = (upgradeId) => getSetting("location-huds.folklore-forest-visibility-toggles", {})[upgradeId] || !1, getToggleVisibilityMapping = () => ({
tackle_box: ".prologuePondView-fishingBoat-paperDoll-layer.tackle_box",
fridge_bait_box: ".prologuePondView-fishingBoat-paperDoll-layer.fridge_bait_box",
fishing_rod: ".prologuePondView-fishingBoat-paperDoll-layer.fishing_rod",
fish_net: ".prologuePondView-fishingBoat-paperDoll-layer.fish_net",
fishing_line: ".prologuePondView-fishingBoat-paperDoll-layer.fishing_line",
steam_reel: ".prologuePondView-fishingBoat-paperDoll-layer.steam_reel",
binding_thread: ".tableOfContentsView-bookContainer.active .tableOfContentsView-bookImage-layer.tableOfContentsView-bookImage-paper",
leather_cover: ".tableOfContentsView-bookContainer.active .tableOfContentsView-bookImage-layer.tableOfContentsView-bookImage-binding",
edge_gilding: ".tableOfContentsView-bookContainer.active .tableOfContentsView-bookImage-layer.tableOfContentsView-bookImage-silk",
gold_foil: ".tableOfContentsView-bookContainer.active .tableOfContentsView-bookImage-layer.tableOfContentsView-bookImage-goldFoil",
silver_quill: "",
golden_quill: ""
}), toggleAllVisibility = () => {
let mapping = getToggleVisibilityMapping(), upgradeIds = Object.keys(mapping);
upgradeIds.length !== 0 && upgradeIds.forEach((upgradeId) => {
hideOrShowBlock(upgradeId, isHidden(upgradeId));
});
}, isUnlocked = (upgradeId) => {
var _a, _b, _c;
let userQuest;
if ((_a = user.quests) != null && _a.QuestTableOfContents)
userQuest = user.quests.QuestTableOfContents;
else if ((_b = user.quests) != null && _b.QuestProloguePond)
userQuest = user.quests.QuestProloguePond;
else if ((_c = user.quests) != null && _c.QuestForewordFarm)
userQuest = user.quests.QuestForewordFarm;
else
return !1;
if (!userQuest || !userQuest.upgrades)
return !1;
let upgrade = userQuest.upgrades.find((u) => u.type === upgradeId);
return upgrade ? upgrade.is_unlocked : !1;
}, hideOrShowBlock = (blockId, isBlockToggled) => {
let mapping = getToggleVisibilityMapping();
if (!mapping[blockId]) {
let quill = document.querySelector(".tableOfContentsProgressView-quillContainer");
if (!quill)
return;
if (isBlockToggled) {
blockId === "golden_quill" ? quill.classList.remove("quill--gold") : blockId === "silver_quill" && quill.classList.remove("quill--silver");
return;
}
blockId === "golden_quill" && isUnlocked("golden_quill") ? quill.classList.add("quill--gold") : blockId === "silver_quill" && isUnlocked("silver_quill") && quill.classList.add("quill--silver");
return;
}
if (!isUnlocked(blockId))
return;
let selector = mapping[blockId];
if (!selector)
return;
let element2 = document.querySelector(selector);
element2 && element2.classList.toggle("active", !isBlockToggled);
}, addToggle = (upgradeBlock) => {
if (upgradeBlock.classList.contains("toggle-added"))
return;
let blockId = upgradeBlock.classList.value.replace("folkloreForestRegionView-dialog-block", "").replace("active", "").replace("prologue_pond", "").replace("table_of_contents", "").trim(), isBlockToggled = isHidden(blockId), toggle = makeElement("div", ["mhui-folklore-forest-upgrade-toggle", "mousehuntActionButton", "tiny", "lightBlue"]), toggleText = makeElement("span", "upgrade-toggle-text", isBlockToggled ? "Show" : "Hide");
toggle.append(toggleText), toggle.addEventListener("click", () => {
isBlockToggled = !isBlockToggled, saveHidden(blockId, isBlockToggled), toggleText.innerText = isBlockToggled ? "Show" : "Hide", hideOrShowBlock(blockId, isBlockToggled), upgradeBlock.classList.toggle("toggle-is-hidden", isBlockToggled);
});
let action = upgradeBlock.querySelector(".folkloreForestRegionView-dialog-block-action");
action ? action.append(toggle) : upgradeBlock.append(toggle), upgradeBlock.classList.add("toggle-added"), upgradeBlock.classList.add(isBlockToggled ? "toggle-is-hidden" : "toggle-is-visible");
}, addUpgradeVisibilityToggles = () => {
if (hasAddedUpgradeVisibilityToggles)
return;
hasAddedUpgradeVisibilityToggles = !0;
let pondUpgrades = document.querySelectorAll(".folkloreForestRegionView-dialog-blockContainer.upgrades .folkloreForestRegionView-dialog-block.prologue_pond.active"), bookUpgrades = document.querySelectorAll(".folkloreForestRegionView-dialog-blockContainer.upgrades .folkloreForestRegionView-dialog-block.table_of_contents.active");
if (!(!pondUpgrades || !bookUpgrades)) {
for (let upgrade of pondUpgrades)
addToggle(upgrade);
for (let upgrade of bookUpgrades)
addToggle(upgrade);
}
}, hasAddedUpgradeVisibilityToggles = !1, folklore_forest_default2 = () => __async(void 0, null, function* () {
toggleAllVisibility(), onDialogShow("fabledForestDialog", addUpgradeVisibilityToggles), onDialogHide(() => hasAddedUpgradeVisibilityToggles = !1), onTurn(toggleAllVisibility, 500), onRequest("*", toggleAllVisibility);
});
}
});
var styles_default85, init_styles86 = __esm({
"src/modules/location-huds/locations/foreword-farm/styles.css"() {
styles_default85 = `.forewordFarmPlotView-plot-progress-label{font-size:13px;line-height:18px;vertical-align:middle;filter:drop-shadow(0 0 1px #000);-webkit-text-stroke:1px rgb(255 255 255 / 50%)}span.forewordFarmPlotView-plot-progress-catchText{font-size:11px;vertical-align:bottom}.folkloreForestRegionView-basicBait-quantity.quantity{top:13px;font-size:12px}.forewordFarmView-growthRate-value span{margin-right:2px}.forewordFarmView-growthRate-value{font-size:14px;border-radius:4px;box-shadow:0 0 20px #000 inset}.forewordFarmView-growthRate-label{margin-left:2px;font-size:11px;font-variant:all-small-caps}.forewordFarmView-harvestBin-quantity{top:-12px;padding:2px;font-size:20px}.forewordFarmView-harvestBin-claimButton-label{margin-left:64px;font-size:12px;color:#224e1c!important;text-shadow:1px 1px 1px #d1d0cf}.forewordFarmPlotView-plot-queue-item-spacer{height:15px;background-color:#ccc}.forewordFarmPlotView-plot-queue-name{height:40px}.forewordFarmPlotView-plot-queue-name.active{-webkit-line-clamp:3}a.forewordFarmPlotView-plot-queue-cancelButton{top:-12px;right:-4px;padding:2px;background-color:#ffbfbf;box-shadow:0 0 3px -1px #000 inset}.forewordFarmPlotView-plot-progressContainer .mousehuntTooltip{border-width:1px}.forewordFarmPlotView-plot-queue-item:hover .forewordFarmPlotView-plot-queue-cancelButton:hover{z-index:1;color:#000!important;background-color:#eb7c73}.forewordFarmPlotView.showQueues .forewordFarmPlotView-plot-queue-item{width:50%}.forewordFarmPlotView-plot-queue-list:hover{background:none}.forewordFarmPlotView-plot-queue-item:hover a.forewordFarmPlotView-plot-queue-cancelButton{background-color:#ffbfbf}.folkloreForestRegionView-fuel-quantity.quantity{font-size:13px}.forewordFarmPlantDialogView-plant-yieldContainer table{margin-top:5px}.forewordFarmPlantDialogView-plant-yieldContainer{width:45%;padding-top:5px}.forewordFarmPlantDialogView-plant-costContainer.num_items_3{display:flex;flex-flow:row wrap;width:50%}.forewordFarmPlantDialogView .folkloreForestRegionView-dialog-block-item{margin:0}.forewordFarmPlantDialogView-plant-name{width:100%;font-size:12px;text-align:center}.forewordFarmPlantDialogView-plant .folkloreForestRegionView-button.big{width:95px;font-size:12px}#overlayPopup.fabledForestDialog .jsDialog.background{padding:18px 5px 10px}.folkloreForestRegionView-dialog-block.highlight,.folkloreForestRegionView-dialog-block{border-top:none;border-radius:0;box-shadow:none}.forewordFarmPlantDialogView-row{border:1px solid #897225;border-radius:0}.forewordFarmPlantDialogView-plant{border:none}.forewordFarmPlantDialogView-plant-header{border-bottom:1px solid #897225;box-shadow:0 0 6px #134220 inset}.forewordFarmPlantDialogView-row .forewordFarmPlantDialogView-plant:nth-child(2) .forewordFarmPlantDialogView-plant-content{margin-left:-1px;border-left:1px solid #897225}.forewordFarmPlotView-plot-progress-bar{top:-2px;bottom:-1px;border-right:none;border-left:none;box-shadow:0 1px #999,0 -1px #999}.forewordFarmPlotView-plot-progress-plantIcon.current{top:-5px;left:-24px}.forewordFarmPlotView.showQueues .forewordFarmPlotView-plot-progressContainer{width:80px;height:20px;margin-top:114px}.forewordFarmPlotView-plot-progress-plantIcon.queued{top:-1px;right:-17px;width:22px;height:22px}.forewordFarmPlotView.showPlantIconHighlight .forewordFarmPlotView-plot.highlight .forewordFarmPlotView-plot-progress-plantIcon.highlight{box-shadow:0 0 1px 2px #6adf4fd4}.forewordFarmHarvestBin-itemImage .quantity{font-size:16px}.folkloreForestRegionView-dialog-block-name{justify-content:center;padding:0;text-align:center}.folkloreForestRegionView-dialog-title{padding-top:5px}.forewordFarmPlantDialogView-plant-header .folkloreForestRegionView-dialog-block-icon{width:32px;height:32px;margin-top:4px;margin-left:5px;border:1px solid #897225;box-shadow:none}.folkloreForestRegionView-button.disabled{opacity:.5}.forewordFarmPlantDialogView-plant:hover .folkloreForestRegionView-button.disabled{opacity:1}.forewordFarmPlantDialogView-plant-costContainer .folkloreForestRegionView-dialog-block-item-image{background-color:transparent;border:none}.forewordFarmHarvestBin{filter:drop-shadow(0 3px 5px #161616)}
`;
}
});
var foreword_farm_default2, init_foreword_farm2 = __esm({
"src/modules/location-huds/locations/foreword-farm/index.js"() {
init_utils2();
init_folklore_forest2();
init_keep_inventory_open();
init_styles78();
init_styles86();
foreword_farm_default2 = () => __async(void 0, null, function* () {
addHudStyles([styles_default77, styles_default85]), folklore_forest_default2(), keep_inventory_open_default({
setting: "location-huds.foreward-farm-inventory-toggled",
buttonSelector: ".folkloreForestRegionView-environmentInventory-expandButton",
inventorySelector: ".folkloreForestRegionView-environmentInventoryContainer",
inventoryOpenClass: "expanded",
buttonOpenClass: "expanded"
});
});
}
});
var styles_default86, init_styles87 = __esm({
"src/modules/location-huds/locations/fort-rox/styles.css"() {
styles_default86 = `.fortRoxHUD-timeline{width:693px;box-shadow:0 0 2px 7px #5c3330}.fortRoxHUD-huntsRemaining.mousehuntTooltipParent{top:45px;right:13px;left:unset;background-color:#e2e2e2;box-shadow:inset 0 0 3px #c0b6b3}a.fortRoxHUD-retreat{top:70px}.fortRoxHUD-timeline-phase-name,.fortRoxHUD-timeline-phase-marker.active .fortRoxHUD-timeline-phase-name{font-size:13px;font-variant:normal;text-shadow:0 0 3px #131313;filter:drop-shadow(0 1px 1px 131313)}.fortRoxHUD-timeline-phase-marker.past .fortRoxHUD-timeline-phase-name{text-shadow:0 0 3px #7b7a7a;filter:drop-shadow(0 1px 1px #7b7a7a)}.fortRoxHUD-fort-upgrade-boundingBox-name{z-index:1;background-color:#c0c0ba}.fortRoxHUD-fort-upgrade-boundingBox:hover .fortRoxHUD-fort-upgrade-boundingBox-name{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:80px;font-size:11px}.fortRoxHUD-timeline-phase-time-tooltip{min-width:75px;margin-top:20px;margin-left:-20px}.fortRoxHUD-timeline-phase-time-tooltip .mousehuntTooltip-content{display:flex;flex-direction:column;align-items:center}.fortRoxHUD-timeline-phase-time-tooltip .mousehuntTooltip-content .tooltip-power{margin-top:5px}.fortRoxHUD-huntsRemaining .mousehuntTooltip{top:35px}.fortRoxHUD-timeline-phase-marker:before{position:absolute;top:-6px;left:-10px;z-index:5;display:inline-block;width:18px;height:18px;vertical-align:middle;content:"";background-image:url(https://www.mousehuntgame.com/images/powertypes/shadow.png);filter:drop-shadow(0 0 1px #fff);background-repeat:no-repeat;background-size:100%}.fortRoxHUD-timeline-phase-marker{position:relative}.fortRoxHUD-timeline-phase-marker.stage_three:before{background-image:none}.fortRoxHUD-timeline-phase-marker.stage_four:before,.fortRoxHUD-timeline-phase-marker.stage_five:before{background-image:url(https://www.mousehuntgame.com/images/powertypes/arcane.png)}.fortRoxHUD .quantity{padding:2px;font-size:12px}.fortRoxHUD-lairBaitContainer .fortRoxHUD .quantity{padding:0;font-size:14px}.fortRoxHUD-dialog-craftingItem-quantity{top:5px}.complete .fortRoxHUD-dialog-upgrade-costContainer{opacity:.6}.fortRoxHUD-bossWarning-hasMultiplier.active b{font-size:12px}.fortRoxHUD-bossWarning{width:auto;padding:5px 30px 5px 40px;font-size:11px}.fortRoxHUD-bossWarning:after{top:3px;left:3px}.frox-has-portal{filter:drop-shadow(0 0 5px #ffde2f) drop-shadow(0 0 15px #ffde2f)}.frox-no-portal{filter:grayscale(1);opacity:.8}.frox-no-portal:hover,.frox-no-portal:focus{filter:grayscale(.2);opacity:1}.fortRoxHUD-spellContainer{top:169px;left:25px}a.fortRoxHUD-upgradeButton.disabled{opacity:.4}a.fortRoxHUD-upgradeButton.disabled:hover,a.fortRoxHUD-upgradeButton.disabled:focus{opacity:1}a.fortRoxHUD-spellTowerButton{margin-left:80px}a.fortRoxHUD-spellTowerButton.normal.inactive{filter:hue-rotate(238deg)}.mh-frox-wall-hp{padding:3px}.fortRoxHUD-hp{top:99px;left:390px;padding-top:2px}.frox-wall-perfect{background-color:#7aff53}.frox-wall-high{background-color:#a9ff53}.frox-wall-medium{background-color:#fff253}.frox-wall-low{background-color:#ff9b53}.frox-wall-very-low{background-color:#ff5353}.fortRoxHUD-dialog-upgrade-name{padding:5px 0}.fortRoxHUD-dialog-upgrade-description{font-size:10px;font-style:italic}.fortRoxHUD-dialog-upgrade-costContainer-title{display:none}.fortRoxHUD-dialog-category-description{padding:10px 0}.fortRoxHUD-dialog-upgrade-costContainer{display:flex;flex-direction:row;align-items:center;justify-content:center;margin-top:10px}.fortRoxHUD-dialog-upgrade-status.complete .mousehuntActionButton{opacity:0}.fortRoxHUD-dialog-upgrade.cannotUpgrade .fortRoxHUD-dialog-upgrade-status.cannotUpgrade{display:flex;flex-direction:column;align-items:center}.complete .fortRoxHUD-dialog-upgrade-costContainer .mousehuntTooltipParent .mousehuntTooltip{display:none}.frox-boss-hp{position:absolute;inset:0 0 0 10px;display:flex;align-items:center;font-size:12px;font-weight:900;color:#000;text-shadow:1px 1px #ffc407}.fortRoxHUD-lairBaitQuantity{padding:1px;font-size:16px}.fortRoxHUD-lairBossProgress span{height:19px;margin-top:3px}.fortRoxHUD-itemContainer .fortRoxHUD-item .mousehuntTooltip:before{font-style:italic;color:#aaa}
`;
}
});
var phaseLengths, makeTooltip2, updateNightBar, updateUpgradeTooltips, updateWallHP, addPortalClass, addBossHp, fort_rox_default2, init_fort_rox2 = __esm({
"src/modules/location-huds/locations/fort-rox/index.js"() {
init_utils2();
init_styles87();
phaseLengths = {
stage_one: {
hunts: 35,
powerType: "Shadow"
},
stage_two: {
hunts: 25,
powerType: "Shadow"
},
stage_three: {
hunts: 10,
powerType: "Arcane or Shadow"
},
stage_four: {
hunts: 25,
powerType: "Arcane"
},
stage_five: {
hunts: 35,
powerType: "Arcane"
}
}, makeTooltip2 = (text, direction = "top", customClass = []) => {
let existing = document.querySelectorAll(".added-frox-tooltip");
existing.length && existing.forEach((tooltip2) => {
tooltip2.remove();
});
let tooltip = makeElement("div", ["added-frox-tooltip", "mousehuntTooltip", "tight", direction, ...customClass]);
return makeElement("div", "mousehuntTooltip-content", text, tooltip), makeElement("div", "mousehuntTooltip-arrow", "", tooltip), tooltip;
}, updateNightBar = () => {
let bar = document.querySelector(".fortRoxHUD-timeline-phases");
if (!bar)
return;
let phaseBars = bar.querySelectorAll(".fortRoxHUD-timeline-phase-marker");
phaseBars.length && phaseBars.forEach((phaseBar) => {
var _a, _b, _c, _d;
let phaseClass = [...phaseBar.classList].find((className) => className.startsWith("stage_")), phaseLength = phaseLengths[phaseClass];
if (!phaseLength)
return;
document.createElement("div").classList.add("fortRoxHUD-timeline-phase-time");
let tooltipText = [];
phaseBar.classList.contains("past") ? tooltipText.push("Phase complete.") : phaseClass === ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFortRox) == null ? void 0 : _b.current_stage) ? tooltipText.push(`${(_d = (_c = user == null ? void 0 : user.quests) == null ? void 0 : _c.QuestFortRox) == null ? void 0 : _d.hunts_until_next_phase} / ${phaseLength.hunts} hunts remaining. <div class='tooltip-power'>Use ${phaseLength.powerType} power type.</div>`) : tooltipText.push(`${phaseLength.hunts} hunts. <div class='tooltip-power'>Use ${phaseLength.powerType} power type.</div>`);
let tooltip = makeTooltip2(tooltipText.join(" "), "bottom", "fortRoxHUD-timeline-phase-time-tooltip");
phaseBar.append(tooltip), phaseBar.classList.add("mousehuntTooltipParent");
});
}, updateUpgradeTooltips = () => {
let upgradeTooltips = document.querySelectorAll(".fortRoxHUD-fort-upgrade-boundingBox");
if (!upgradeTooltips.length)
return;
let upgradeInfo = document.querySelectorAll(".fortRoxHUD-fort-upgrade-level-info");
upgradeInfo.length && upgradeInfo.forEach((info) => {
info.remove();
}), upgradeTooltips.forEach((tooltip) => {
var _a, _b;
let type2 = tooltip.getAttribute("onclick").replace("app.views.HeadsUpDisplayView.hud.fortRoxShowConfirm('upgradeFort', ", "").replace("); return false;", "").replaceAll("'", ""), upgradeProgress = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFortRox) == null ? void 0 : _b.upgrades[type2], upgradeKeys = Object.keys(upgradeProgress), completedUpgrades = upgradeKeys.reduce((count2, key) => (upgradeProgress[key].includes("complete") && count2++, count2), 0), name = tooltip.querySelector(`.fortRoxHUD-fort-upgrade-boundingBox-level.level_${completedUpgrades}`), upgradeText = `(Level ${completedUpgrades}/${upgradeKeys.length - 1})`;
completedUpgrades === upgradeKeys.length - 1 && (upgradeText = "(Max Level)"), makeElement("div", "fortRoxHUD-fort-upgrade-level-info", upgradeText, name).classList.add("frox-upgrade-level-info");
});
}, updateWallHP = () => {
let exists = document.querySelector(".mh-frox-wall-hp");
exists && exists.remove();
let hpBox = document.querySelector(".fortRoxHUD-hp");
if (!hpBox)
return;
let wallPercent = user.quests.QuestFortRox.hp_percent.toFixed(0), wrapper = makeElement("div", "mh-frox-wall-hp");
makeElement("div", "mh-frox-wall-hp-text", `${wallPercent}%`, wrapper), hpBox.append(wrapper), hpBox.classList.remove(
"frox-wall-very-low",
"frox-wall-low",
"frox-wall-medium",
"frox-wall-high",
"frox-wall-perfect"
);
let hp = Number.parseInt(user.quests.QuestFortRox.hp_percent, 10);
hp === 100 ? hpBox.classList.add("frox-wall-perfect") : hp >= 75 ? hpBox.classList.add("frox-wall-high") : hp >= 50 ? hpBox.classList.add("frox-wall-medium") : hp >= 25 ? hpBox.classList.add("frox-wall-low") : hpBox.classList.add("frox-wall-very-low");
}, addPortalClass = () => {
var _a, _b, _c, _d;
let portal = document.querySelector(".fortRoxHUD.dawn .fortRoxHUD-enterLairButton");
if (!portal)
return;
portal.classList.remove("frox-no-portal", "frox-has-portal");
let hasPortal = Number.parseInt((_d = (_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFortRox) == null ? void 0 : _b.items) == null ? void 0 : _c.fort_rox_lair_key_stat_item) == null ? void 0 : _d.quantity, 10);
portal.classList.add(hasPortal ? "frox-has-portal" : "frox-no-portal");
}, addBossHp = () => {
var _a, _b, _c, _d;
if (((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFortRox) == null ? void 0 : _b.current_phase) !== "lair")
return;
let bossHpBox = document.querySelector(".fortRoxHUD-lairBossProgress");
if (!bossHpBox)
return;
let bossHp = ((_d = (_c = user == null ? void 0 : user.quests) == null ? void 0 : _c.QuestFortRox) == null ? void 0 : _d.lair_width) || 100, existing = document.querySelector(".frox-boss-hp");
existing ? existing.textContent = `${bossHp}%` : makeElement("div", "frox-boss-hp", `${bossHp}%`, bossHpBox);
let bossHpSpan = bossHpBox.querySelector("span");
bossHpSpan && (bossHpSpan.style.width = `${bossHp}%`);
}, fort_rox_default2 = () => __async(void 0, null, function* () {
addHudStyles(styles_default86), updateNightBar(), updateUpgradeTooltips(), updateWallHP(), addPortalClass(), addBossHp(), onTurn(() => {
updateNightBar(), updateUpgradeTooltips(), updateWallHP(), addPortalClass(), addBossHp();
}, 250);
});
}
});
var styles_default87, init_styles88 = __esm({
"src/modules/location-huds/locations/fungal-cavern/styles.css"() {
styles_default87 = `.fungalCavernHUD-craftingItem-quantity.quantity{position:absolute;top:1px;left:-7px;width:52px;height:15px;font-size:12px;font-weight:400;line-height:1.3;background-color:#d7d5d4;border:1px solid #424140;border-radius:4px;box-shadow:1px 0 3px 1px #424140}.fungalCavernHUD-craftingItemContainer{top:-6px;bottom:7px;display:flex;flex-direction:column;justify-content:space-evenly;height:auto}.fungalCavernHUD-craftingItem.on .fungalCavernHUD-craftingItem-status{display:none}.active .fungalCavernHUD-bait-quantity.quantity,.on .fungalCavernHUD-craftingItem-quantity.quantity{background-color:#97df7b}.fungalCavernHUD-bait-quantity.quantity{width:34px;margin-top:-1px;margin-left:-4px;font-size:11px;font-weight:400;background-color:#d7d5d4;border:1px solid #424140;border-radius:3px;box-shadow:1px 0 3px 1px #424140}span.fungalCavernHUD-background-title-zone{padding:2px;font-size:16px;color:#d7d5d4;vertical-align:middle;background-color:#78645a;border:1px solid #9a887e}.fungalCavernHUD-craftingItem.rare .fungalCavernHUD-craftingItem-status{display:none}.rare .fungalCavernHUD-craftingItem-quantity.quantity{background-color:#d3ffc1}.fungalCavernHUD .armNow.active{filter:hue-rotate(131deg)}.fungalCavernHUD-zoneHelpContainer{font-size:12px}.fungalCavernHUD-bait-tooltip-recipe-result-quantity span{font-size:11px}.fungalCavernHUD-bait-tooltip-craftingItem-image{box-shadow:none}
`;
}
});
var fungal_cavern_default, init_fungal_cavern = __esm({
"src/modules/location-huds/locations/fungal-cavern/index.js"() {
init_utils2();
init_styles88();
fungal_cavern_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default87);
});
}
});
var great_gnarled_tree_default, init_great_gnarled_tree = __esm({
"src/modules/location-huds/locations/great-gnarled-tree/index.js"() {
init_cheese_selectors();
great_gnarled_tree_default = () => __async(void 0, null, function* () {
cheese_selectors_default("great-gnarled-tree", ["gnarled_cheese"]);
});
}
});
var styles_default88, init_styles89 = __esm({
"src/modules/location-huds/locations/harbour/styles.css"() {
styles_default88 = `.harbourHUD-map-mapImage{height:155px;transition:.3s ease-in-out;transform-origin:bottom center}.harbourHUD-mapContainer:hover .harbourHUD-map-mapImage{transform:scale(1.1)}.harbourHUD-mouse-name{text-shadow:1px 1px 2px #000,0 0 4px #fff}.harbourHUD-popup-title{text-shadow:none}.harbour-popup .harbourHUD-area-mice{display:flex;justify-content:center}.harbourHUD-mouse.uncaught{transition:.2s ease-in-out}.harbourHUD-mouse.uncaught:hover{transform:scale(1.1)}
`;
}
});
var harbour_default2, init_harbour2 = __esm({
"src/modules/location-huds/locations/harbour/index.js"() {
init_utils2();
init_styles89();
harbour_default2 = () => __async(void 0, null, function* () {
addHudStyles(styles_default88);
});
}
});
var bob_iceberg_default, init_bob_iceberg = __esm({
"src/modules/location-huds/locations/iceberg/styles/bob-iceberg.css"() {
bob_iceberg_default = `.icebergHud .timeline .icebergContainer .iceberg{z-index:1;width:110px;height:44px;background-position:bottom;background-size:contain;border-bottom-left-radius:8px;transition:.4s;transform-origin:top;animation:6s dirigibleFloat ease-in-out infinite}@media (prefers-reduced-motion: reduce){.icebergHud .timeline .icebergContainer .iceberg{animation:none}}.icebergHud .timeline:after{position:absolute;right:22px;bottom:-8px;left:22px;box-sizing:border-box;display:block;width:auto;height:10px;content:"";background-color:#6185c5;border:1px solid #5974a6;border-bottom-right-radius:5px}.icebergHud .cutaway{z-index:5}.icebergHud .timeline .chest{z-index:4}.icebergHud .timeline{top:5px}.icebergHud .timeline .icebergContainer .iceberg:hover{transform-origin:bottom center;animation:3s mh-improved-shake infinite}.icebergHud .timeline .icebergContainer .iceberg:active{animation-duration:1s}.waterline{pointer-events:none}
`;
}
});
var styles_default89, init_styles90 = __esm({
"src/modules/location-huds/locations/iceberg/styles/styles.css"() {
styles_default89 = `.icebergHud.bonus .bonus_timeline .turnsLeft{top:0;display:inline-flex;align-items:center;font-size:14px;border-color:#666;border-radius:0}.remaining-distance,.remaining-stage-distance{margin:2px 0;font-size:10px}.remaining-stage-distance{padding-top:2px;border-top:1px solid #a4b5bf}.icebergHud .cutaway .currentPhase{position:absolute;bottom:2px;padding-top:5px;margin-top:3px;font-size:14px;border-top:1px solid #a4b5bf}.icebergStatusTooltip{bottom:-3px;left:180px;width:325px;padding:8px 7px 6px 0;background-color:#fafafae5;border:1px solid #a4b5bf;box-shadow:0 1px 3px -1px #141414}.icebergStatusTooltip .mousehuntTooltip-content{display:grid;grid-template-columns:2fr 1fr;gap:10px;align-items:center}.icebergStatusTooltip .hunts-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;height:100%}.icebergStatusTooltip .hunts-wrapper .average-hunts{font-size:15px}.icebergStatusTooltip .hunts-wrapper div{display:flex;align-items:center;justify-content:space-evenly;width:100%;margin:0}.icebergStatusTooltip .hunts-wrapper div:first-child{margin-top:0;text-align:center}.icebergStatusTooltip .iceberg-sections{width:160px}.icebergStatusTooltip .iceberg-section{position:relative;display:flex;place-items:center start;justify-content:space-between;width:auto;margin-bottom:.25em;overflow:visible}.icebergStatusTooltip .iceberg-section.complete{color:#989898;opacity:.6}.icebergStatusTooltip .iceberg-section.complete .iceberg-section-name:before{position:absolute;top:1px;left:-10px;width:10px;height:10px;content:"";background:url(https://www.mousehuntgame.com/images/ui/hud/meadow_checkmark.png) 0 0 no-repeat;background-size:contain;opacity:1}.icebergStatusTooltip .iceberg-section.incomplete{color:#488589}.icebergStatusTooltip .iceberg-section.current:before{position:absolute;top:1px;left:-7px;font-size:8px;color:#6aa9af;vertical-align:middle;content:"\\2022";border-radius:3px}.deep-warning{position:absolute;top:5px;bottom:5px;left:175px;z-index:3;display:flex;align-items:center;justify-content:center;width:300px;padding:1em;color:#000;text-align:center;background-color:#ffbfbf;border-radius:10px;opacity:.8}.deep-warning-text{max-width:250px;font-size:11px;line-height:15px;color:#000;text-align:left}.icebergHud .timeline .resetIceberg{top:10px;right:25px;z-index:4;cursor:pointer}.icebergHud .timeline .resetIceberg:hover,.icebergHud .timeline .resetIceberg:focus{color:#a5cedf;opacity:1}.icebergHud .cutaway .wax .quantity,.icebergHud .cutaway .sticky .quantity{box-sizing:border-box;width:38px;padding:0;margin-top:22px;margin-left:4px;font-size:12px;font-weight:400;border-color:#89989e;border-radius:2px 2px 5px 5px}.icebergHud .cutaway .sticky .quantity{margin-top:26px}.icebergHud .cutaway .drill .quantity{top:28px;left:110px;font-size:14px;text-align:left;text-shadow:1px 1px #000}.iceberg-section.current{font-weight:900}.icebergHud .cutaway .depth,.icebergHud .cutaway .depth.early{top:3px;bottom:8px;left:25px;z-index:4;min-width:100px;padding-top:5px;font-size:11px;color:#000;background:#fafafae5;border-color:#8d98a0;border-bottom:1px solid #9aa8b2;border-radius:0;box-shadow:2px 0 2px -3px #8a949d}.icebergHud .cutaway .drill .heatContainer .heat{mix-blend-mode:overlay}.icebergStatusTooltip .hunts-wrapper strong{margin:0;font-size:11px;font-weight:900;line-height:1.125;text-align:center}.icebergStatusTooltip.mousehuntTooltip{pointer-events:all}.icebergStatusTooltip.mousehuntTooltip .mousehuntTooltip-arrow{top:70%;left:-24px;border-color:transparent #a4b5bf transparent transparent;border-width:12px}.icebergStatusTooltip.mousehuntTooltip .mousehuntTooltip-arrow:after{bottom:-10px;left:-8px;border-color:transparent #edf1f8 transparent transparent;border-width:10px}.icebergHud .cutaway .icebergContainer .label{padding:5px;font-size:12px;color:#142e2c;border-radius:5px}.icebergMap img{width:600px}.icebergHud .cutaway .drill .help b.warning{display:block}.icebergHud .cutaway .drill .help{position:absolute;top:90px;right:-55px;width:400px}.mh-improved-stick-iceberg-tooltip .icebergStatusTooltip.mousehuntTooltip{display:block}.mh-improved-stick-iceberg-tooltip .icebergStatusTooltip.mousehuntTooltip .mousehuntTooltip-arrow{display:none}.mh-improved-stick-iceberg-tooltip.depth.mousehuntTooltipParent:hover>.mousehuntTooltip{animation:none!important}.icebergHud .cutaway{filter:drop-shadow(0 1px 2px #141414)}.icebergHud .timeline .chest{transition:.2s ease-out}.icebergHud .timeline .chest:hover{transform:scale(1.5)}.icebergHud .timeline .chest:hover .mousehuntTooltip{transform:scale(.75);animation:none}.icebergHud .timeline .chest:active{animation:.4s mh-improved-shake-scaled infinite}@media (prefers-reduced-motion: reduce){.icebergHud .timeline .chest:active{animation:none}}span.user_progress_container .user_progress{color:#000!important}.icebergHud .cutaway .charm .mousehuntTooltip{width:65px}.icebergHud .cutaway .charm.sticky .mousehuntTooltip{width:83px}.icebergHud .cutaway .charm.sticky .mousehuntTooltip .mousehuntArmNowButton{top:15px}.icebergHud .cutaway .icebergContainer .label.phase_2{border:1px solid #bbe0f5}.icebergHud .cutaway .icebergContainer .label.phase_1{border:1px solid #9fd5e3;box-shadow:none}.icebergHud.bonus .bonus_timeline .help{top:5px;left:120px;padding:5px;background-color:#e4f6fe}
`;
}
});
var getSections, calculateRemaining, calculateCompletion, calculateAverage, calculateStageHunts, getQuestProgress, roundProgress, getTooltipText, addDeepWarning, hud3, makeTooltipSticky, iceberg_default3, init_iceberg3 = __esm({
"src/modules/location-huds/locations/iceberg/index.js"() {
init_utils2();
init_bob_iceberg();
init_styles90();
getSections = (quest) => {
let sections = [
{
name: "Treacherous Tunnels",
where: "0-300ft",
length: 300,
complete: quest.complete.tunnels
},
{
name: "Brutal Bulwark",
where: "300-600ft",
length: 300,
complete: quest.complete.bulwark
},
{
name: "Bombing Run",
where: "600-1600ft",
length: 1e3,
complete: quest.complete.bombing
},
{
name: "The Mad Depths",
where: "1600-1800ft",
length: 200,
complete: quest.complete.depths
},
{
name: "Icewing's Lair",
where: "1800 ft",
length: 0,
complete: quest.complete.lair
}
];
return quest.isDeep && sections.push({
name: "Hidden Depths",
where: "1800-2000 ft",
length: 200,
complete: !1
}), sections;
}, calculateRemaining = (depth, stageStart, stageEnd) => {
let stage = stageEnd - depth, stagePercent = stage / (stageEnd - stageStart) * 100;
return { stage, stagePercent };
}, calculateCompletion = (depth, stages) => stages.map((stageEnd) => depth >= stageEnd), calculateAverage = (progress, hunts, isDeep, depth) => isDeep ? (depth + 1800) / hunts : progress / hunts, calculateStageHunts = (stage, avg) => Math.ceil(stage / avg), getQuestProgress = () => {
var _a;
let quest = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestIceberg;
if (!quest)
return !1;
let data = {
progress: quest.user_progress || 0,
hunts: quest.turns_taken || 0,
chests: quest.chests || [],
isDeep: quest.in_bonus || !1
}, depth = data.progress, stages = [300, 600, 1600, 1800], stageIndex = stages.findIndex((stageEnd) => depth < stageEnd), { stage, stagePercent } = calculateRemaining(depth, stages[stageIndex - 1] || 0, stages[stageIndex]), complete = calculateCompletion(depth, stages), avg = calculateAverage(data.progress, data.hunts, data.isDeep, depth), stageHunts = calculateStageHunts(stage, avg), remaining2 = {
stage,
stagePercent: 100 - stagePercent,
total: 1800 - depth,
totalPercent: depth / 1800 * 100,
complete: {
tunnels: complete[0],
bulwark: complete[1],
bombing: complete[2],
depths: complete[3],
lair: depth >= 1800
},
isLair: depth >= 1800,
avg,
stageHunts
};
return __spreadValues(__spreadValues({}, data), remaining2);
}, roundProgress = (progress) => Number.isNaN(progress) || progress <= 0 ? "0" : progress >= 100 ? "100" : Number(progress.toFixed(2)).toString(), getTooltipText = (quest) => {
let wrapper = makeElement("div", "mousehuntTooltip-content"), progress = makeElement("div", "hunts-wrapper");
if (makeElement("div", "average-hunts", `Avg. ${roundProgress(quest.avg)} ft/hunt`, progress), !quest.isLair) {
let stageProgressPercent = makeElement("div", "stage-progress-percent");
if (makeElement("span", "progress-label", "Stage Progress: ", stageProgressPercent), makeElement("span", ["progress-label-short", "hidden"], "Stage: ", stageProgressPercent), makeElement("strong", "", `${roundProgress(quest.stagePercent)}%`, stageProgressPercent), progress.append(stageProgressPercent), !quest.isDeep) {
let totalProgressPercent = makeElement("div", "total-progress-percent");
makeElement("span", "progress-label", "Total Progress: ", totalProgressPercent), makeElement("span", ["progress-label-short", "hidden"], "Total: ", totalProgressPercent), makeElement("strong", "", `${roundProgress(quest.totalPercent)}%`, totalProgressPercent), progress.append(totalProgressPercent);
}
}
wrapper.append(progress);
let sectionsWrapper = makeElement("div", "iceberg-sections"), sections = getSections(quest), currentSection = !1;
return sections.forEach((sectionData) => {
quest.isDeep && sectionData.name !== "Hidden Depths" && (sectionData.complete = !0);
let section = makeElement("div", ["iceberg-section", sectionData.complete ? "complete" : "incomplete"]);
!currentSection && !sectionData.complete && (section.classList.add("current"), currentSection = !0), makeElement("div", "iceberg-section-name", sectionData.name, section), makeElement("div", "iceberg-section-length", sectionData.where, section), sectionsWrapper.append(section);
}), wrapper.append(sectionsWrapper), wrapper;
}, addDeepWarning = () => __async(void 0, null, function* () {
let equippedBase = Number.parseInt(user.base_item_id) || 0;
if (equippedBase === 899 || // Deep Freeze Base
equippedBase === 3256 || // Iceberg Boiler Base
equippedBase === 2392)
return;
let bases = yield getUserItems([
"deep_freeze_base",
"iceberg_boiler_base",
"ultimate_iceberg_base"
]), equippableBases = [], hasBase = !1;
if (bases.forEach((base) => {
base.quantity > 0 && (hasBase = !0, equippableBases.push({ name: base.name, id: base.item_id }));
}), !hasBase)
return;
let appendTo = document.querySelector(".cutawayClippingMask");
if (!appendTo)
return;
let equippableBasesText = equippableBases.map((base, index) => index === 0 ? base.name : index === equippableBases.length - 1 ? `or ${base.name}` : base.name).join(" "), warning = makeElement("div", "deep-warning"), warningText = makeElement("div", "deep-warning-text", `To access the Hidden Depths, make sure you equip ${equippableBasesText}.`), warningIcon = makeElement("img", "deep-warning-icon");
warningIcon.src = "https://www.mousehuntgame.com/images/ui/journal/pillage.gif", warning.append(warningIcon), warning.append(warningText);
let existingWarning = appendTo.querySelector(".deep-warning");
existingWarning ? existingWarning.replaceWith(warning) : appendTo.append(warning);
}), hud3 = () => __async(void 0, null, function* () {
if (getCurrentLocation2() !== "iceberg" || !user.quests.QuestIceberg)
return;
let huntInfo = document.querySelector(".icebergHud .depth");
if (!huntInfo)
return;
let quest = getQuestProgress();
if (!quest.isLair) {
let remainingStageDistance = document.createElement("div");
remainingStageDistance.classList.add("remaining-stage-distance");
let destination = quest.isDeep ? "Hidden Depths" : "next stage";
if (quest.stage !== quest.total) {
let feet = quest.stage.toLocaleString();
quest.isDeep && (feet = feet - 100), remainingStageDistance.innerHTML = `<strong>${feet}</strong> feet until ${destination}`, quest.stageHunts > 0 && (remainingStageDistance.innerHTML += ` (~${quest.stageHunts} hunts)`);
}
let existingStage = huntInfo.querySelector(".remaining-stage-distance");
existingStage ? existingStage.replaceWith(remainingStageDistance) : huntInfo.insertBefore(remainingStageDistance, huntInfo.lastChild);
}
if (!quest.isLair && !quest.isDeep) {
let remainingDistance = makeElement("div", "remaining-distance");
if (quest.total === 0)
remainingDistance.innerHTML = "";
else {
let feet = quest.total.toLocaleString();
remainingDistance.innerHTML = `<strong>${feet}</strong> feet until Icewing's Lair`, quest.totalHunts > 0 && (remainingDistance.innerHTML += `(~${quest.totalHunts} hunts)`);
}
let existingDistance = huntInfo.querySelector(".remaining-distance");
existingDistance ? existingDistance.replaceWith(remainingDistance) : huntInfo.insertBefore(remainingDistance, huntInfo.lastChild);
} else {
let existingDistance = huntInfo.querySelector(".remaining-distance");
existingDistance && existingDistance.remove();
}
huntInfo.classList.add("mousehuntTooltipParent");
let tooltip = makeElement("div", "icebergStatusTooltip");
tooltip.classList.add("mousehuntTooltip", "right", "noEvents");
let tooltipContent = getTooltipText(quest), existingTooltip = huntInfo.querySelector(".icebergStatusTooltip");
tooltip.append(tooltipContent), makeElement("div", "mousehuntTooltip-arrow", "", tooltip), existingTooltip ? existingTooltip.replaceWith(tooltip) : huntInfo.append(tooltip), quest.isLair && addDeepWarning();
}), makeTooltipSticky = () => {
if (!document.querySelector(".icebergStatusTooltip"))
return;
let huntInfo = document.querySelector(".icebergHud .depth");
if (!huntInfo)
return;
let isStuck = getSetting("location-huds.iceberg-sticky-tooltip", !1);
isStuck && huntInfo.classList.add("mh-improved-stick-iceberg-tooltip"), huntInfo.addEventListener("click", () => {
isStuck = !isStuck, huntInfo.classList.toggle("mh-improved-stick-iceberg-tooltip"), saveSetting("location-huds.iceberg-sticky-tooltip", isStuck);
});
}, iceberg_default3 = () => __async(void 0, null, function* () {
addHudStyles([styles_default89, bob_iceberg_default]), hud3(), makeTooltipSticky(), onTurn(hud3, 1e3), onRequest("environment/iceberg.php", hud3);
});
}
});
var jungle_of_dread_default, init_jungle_of_dread = __esm({
"src/modules/location-huds/locations/jungle-of-dread/index.js"() {
init_cheese_selectors();
jungle_of_dread_default = () => __async(void 0, null, function* () {
cheese_selectors_default("jungle-of-dread", [
"vanilla_stilton_cheese",
"vengeful_vanilla_stilton_cheese",
"spicy_havarti_cheese",
"pungent_havarti_cheese",
"creamy_havarti_cheese",
"magical_havarti_cheese",
"crunchy_havarti_cheese",
"sweet_havarti_cheese"
]);
});
}
});
var kings_arms_default, init_kings_arms = __esm({
"src/modules/location-huds/locations/kings-arms/index.js"() {
init_cheese_selectors();
kings_arms_default = () => __async(void 0, null, function* () {
cheese_selectors_default("kings-arms", ["gilded_cheese"]);
});
}
});
var kings_gauntlet_default, init_kings_gauntlet = __esm({
"src/modules/location-huds/locations/kings-gauntlet/index.js"() {
init_cheese_selectors();
kings_gauntlet_default = () => __async(void 0, null, function* () {
cheese_selectors_default("kings-gauntlet", [
"super_brie_cheese",
"gauntlet_cheese_2",
"gauntlet_cheese_3",
"gauntlet_cheese_4",
"gauntlet_cheese_5",
"gauntlet_cheese_6",
"gauntlet_cheese_7",
"gauntlet_cheese_8"
]);
});
}
});
var styles_default90, init_styles91 = __esm({
"src/modules/location-huds/locations/laboratory/styles.css"() {
styles_default90 = `.laboratoryHUD .mousehuntItem-image{background-color:transparent}.laboratoryHUD .laboratoryHUD-areaBaitContainer .mousehuntItem-image{box-sizing:border-box;width:64px;height:64px;margin-top:-4px;margin-left:-5px;background-color:#d0e9ec;border:1px solid #d0e9ec;outline:5px solid #d0e9ec;box-shadow:none}.laboratoryHUD .mousehuntItem-quantity.quantity{padding:3px 4px;font-size:12px}.laboratoryHUD .laboratoryHUD-basicBaitContainer .mousehuntItem-image{background-color:#a6c0c4}.laboratoryHUD-state{text-shadow:0 1px 3px #000}.laboratoryHUD-basicBaitContainer .mousehuntTooltip>div{display:flex;justify-content:center}.laboratoryHUDArmNowButton.active{filter:hue-rotate(90deg)}.laboratoryHUD-basicBaitContainer .mousehuntTooltip{width:180px}
`;
}
});
var laboratory_default, init_laboratory = __esm({
"src/modules/location-huds/locations/laboratory/index.js"() {
init_utils2();
init_styles91();
laboratory_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default90);
});
}
});
var styles_default91, init_styles92 = __esm({
"src/modules/location-huds/locations/labyrinth/styles.css"() {
styles_default91 = `.mh-ui-labyrinth-step-counter{padding-right:5px;margin-left:5px;font-weight:900;background-color:#000}.labyrinthHUD-clueBar-totalContainer{z-index:10;width:auto;padding-left:4px;font-size:12px;border-radius:6px;outline:2px solid #000}.labyrinthHUD-clue{display:flex;align-items:center;justify-content:space-evenly;font-size:12px;box-shadow:inset 0 0 3px -1px #000}.labyrinthHUD-clue-name{font-size:11px}.labyrinthHUD-clue:hover .labyrinthHUD-clue-name{z-index:10;overflow:visible}.mh-ui-labyrinth-clue-count{display:flex;align-items:center;height:20px;padding-right:3px;padding-left:3px;font-weight:900;color:#050505;border-radius:0 5px 5px 0}.y .labyrinthHUD-clue-name,.y .mh-ui-labyrinth-clue-count{background-color:#d851ff66}.h .labyrinthHUD-clue-name,.h .mh-ui-labyrinth-clue-count{background-color:#21e2ff66}.s .labyrinthHUD-clue-name,.s .mh-ui-labyrinth-clue-count{background-color:#e9630066}.t .labyrinthHUD-clue-name,.t .mh-ui-labyrinth-clue-count{background-color:#ffe40066}.f .labyrinthHUD-clue-name,.f .mh-ui-labyrinth-clue-count{background-color:#11f40066}.m .labyrinthHUD-clue-name,.m .mh-ui-labyrinth-clue-count{color:#d3c5c5;background-color:#6a6a6a66}.labyrinthHUD-item-quantity,.labyrinthHUD-scrambleDoors-quantity,.labyrinthHUD-scrambleClues-quantity,.labyrinthHUD-toggleLantern-quantity.quantity{position:absolute;top:6px;padding:0 5px;font-size:12px;text-align:center;background-color:#000;border-radius:5px}.labyrinthHUD-item-quantity.quantity{top:6px;left:5px;display:block;width:30px;margin:0!important}.labyrinthHUD-scrambleDoors-quantity,.labyrinthHUD-scrambleClues-quantity,.labyrinthHUD-toggleLantern-quantity.quantity{display:inline-flex;align-items:center;width:auto;height:18px;margin-right:11px}.labyrinthHUD-scrambleClues-quantity.quantity{left:-6px}.labyrinthHUD-toggleLantern-quantity.quantity{right:-5px}.labyrinthHUD-scrambleDoors-quantity.quantity{top:.5px;right:-7px;height:9.5px;padding:4px;pointer-events:none}.labyrinthHUD-scrambleClues:hover .labyrinthHUD-scrambleClues-name,.labyrinthHUD-scrambleClues.disabled .labyrinthHUD-scrambleClues-name,.labyrinthHUD-scrambleClues:focus .labyrinthHUD-scrambleClues-name,.labyrinthHUD-scrambleClues-name{position:relative;left:75px;width:0;color:transparent!important;text-shadow:none;pointer-events:none}.labyrinthHUD-scrambleClues-name:after{position:absolute;top:0;right:-30px;display:block;width:50px;color:#eee;text-align:center;text-shadow:0 0 1px #000;content:"Compass Magnet"}.labyrinthHUD-item:nth-child(1) .labyrinthHUD-item-name,.labyrinthHUD-item:nth-child(2) .labyrinthHUD-item-name,.labyrinthHUD-item:nth-child(3) .labyrinthHUD-item-name,.labyrinthHUD-item:nth-child(4) .labyrinthHUD-item-name,.labyrinthHUD-item:nth-child(5) .labyrinthHUD-item-name{width:96px;margin-left:47px;font-size:11px;font-weight:900;text-align:center;text-shadow:0 0 1px #000;background:linear-gradient(180deg,#70707000,#a8a8a8,#70707000);border-radius:20px}.labyrinthHUD-item:hover .labyrinthHUD-item-location,.labyrinthHUD-item:focus .labyrinthHUD-item-location{position:absolute;top:unset;bottom:-25px;padding:3px;font-size:9px;color:#000;text-align:center;background:#fff;border:2px solid #000;border-radius:10px;box-shadow:2px 3px 4px #666}.mh-ui-labyrinth-door-text{position:absolute;inset:0;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;color:#fff;opacity:.8}.mh-ui-laby-steps{margin-bottom:3px;font-size:13px}.labyrinthHUD-doorContainer{position:relative}.labyrinthHUD-door.disabled.mystery{filter:brightness(.4)}.labyrinthHUD-door.mh-ui-labyrinth-highlight{filter:brightness(1.1)}.labyrinthHUD-door.mh-ui-labyrinth-highlight:before{position:absolute;top:5px;right:15px;z-index:1;width:25px;height:25px;overflow:hidden;content:"";background:url(https://www.mousehuntgame.com/images/ui/events/winter_hunt_2013/checkmark.png) no-repeat;background-size:contain}.labyrinthHUD-confirm-padding .labyrinthHUD-door.mh-ui-labyrinth-highlight:after{background:none}.labyrinthHUD-clueDrawer{padding-bottom:11px;font-size:11px}.labyrinthHUD-clueDrawer-description{padding:5px 0 10px;line-height:17px;color:#f9f9f9;text-align:center}.labyrinthHUD-clueDrawer-clue{margin:10px 0}.labyrinthHUD-clueDrawer-clue.tier-1 .labyrinthHUD-clueDrawer-exit.tier-1:after,.labyrinthHUD-clueDrawer-clue.tier-2 .labyrinthHUD-clueDrawer-exit.tier-2:after,.labyrinthHUD-clueDrawer-clue.tier-3 .labyrinthHUD-clueDrawer-exit.tier-3:after{background:none}.labyrinthHUD-clueDrawer-exit{top:0;bottom:0;width:1px;height:10px;background:#8d8d8d;border-radius:0}.labyrinthHUD-clueDrawer-bar{height:10px;border-radius:0;opacity:.9}.labyrinthHUD-clueDrawer-barFrame{margin-right:3px;border:1px solid #585858;border-radius:0}.y .labyrinthHUD-clueDrawer-name,.y .labyrinthHUD-clueDrawer-quantity{border-bottom:1px solid #d851ff}.h .labyrinthHUD-clueDrawer-name,.h .labyrinthHUD-clueDrawer-quantity{border-bottom:1px solid #21e2ff}.s .labyrinthHUD-clueDrawer-name,.s .labyrinthHUD-clueDrawer-quantity{border-bottom:1px solid #e96300}.t .labyrinthHUD-clueDrawer-name,.t .labyrinthHUD-clueDrawer-quantity{border-bottom:1px solid #ffe400}.f .labyrinthHUD-clueDrawer-name,.f .labyrinthHUD-clueDrawer-quantity{border-bottom:1px solid #11f400}.labyrinthHUD-clueDrawer-name{padding-left:3px;margin-right:-3px}.labyrinthHUD-clueDrawer-quantity{padding-right:3px;margin-left:-3px}.hudLocationContent a.labyrinthHUD-retreatButton{color:#707070!important;background-color:#0000007f}.hudLocationContent a.labyrinthHUD-retreatButton:hover{color:#eee!important}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete:after,.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.bad:after,.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_1:after,.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_2:after,.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_3:after,.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_4:after,.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_5:after,.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_6:after{position:absolute;top:0;right:0;left:0;display:inline-flex;align-items:center;justify-content:center;height:100%;font-size:15px;font-weight:900;color:#000;text-align:center;text-shadow:0 0 4px #c7ffad;content:""}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete:after{color:#343434;text-shadow:none;content:"0"}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.bad:after{color:#c69898;text-shadow:none;content:"1"}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_1:after{content:"1"}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_2:after{content:"2"}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_3:after{content:"3"}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_4:after{content:"4"}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_5:after{content:"5"}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_6:after{content:"6"}.labyrinthHUD-hallway-tile.active{z-index:6;outline:1px solid #bbf8fa}.mh-ui-labyrinth-lantern-reminder{position:absolute;bottom:0;left:-8px;width:75px;height:75px;background:url(https://www.mousehuntgame.com/images/items/stats/transparent_thumb/d1c4774c7afebe379bef83d30b81f069.png) 0 0 no-repeat;filter:drop-shadow(1px 0 8px #f6eac3);background-size:contain;transform-origin:bottom;animation:mh-improved-shake-light 1s ease-out 1}.labyrinthHUD-toggleLantern-name.active{animation:mh-improved-scale 1.5s 2}.labyrinthHUD-scrambleClues-boundingBox:after{position:absolute;bottom:4px;left:131px;z-index:12;width:34px;height:33px;content:"";background:url(https://i.mouse.rip/laby-compass.png) 0 0 no-repeat;background-size:contain;transition:.3s ease-in-out}.labyrinthHUD-scrambleClues-boundingBox:hover:after{transform:scale(1.2)}@media (prefers-reduced-motion: reduce){.mh-ui-labyrinth-lantern-reminder,.labyrinthHUD-toggleLantern-name.active{animation:none}.labyrinthHUD-scrambleClues-boundingBox:hover:after{transform:none}}.labyrinthHUD-clueDrawer-barPadding{padding:1px 4px 0 1px}.labyrinthHUD-confirmDescription.chooseDoor b{font-size:13px}.labyrinthHUD-scrambleClues.disabled .labyrinthHUD-scrambleClues-name,.labyrinthHUD-scrambleClues.disabled:hover .labyrinthHUD-scrambleClues-name{color:transparent!important;text-shadow:none}a.labyrinthHUD-door.labyrinthHUD-door-category-y:after,a.labyrinthHUD-door.labyrinthHUD-door-category-h:after,a.labyrinthHUD-door.labyrinthHUD-door-category-s:after,a.labyrinthHUD-door.labyrinthHUD-door-category-t:after,a.labyrinthHUD-door.labyrinthHUD-door-category-f:after{position:absolute;right:19px;bottom:4px;left:19px;padding:1px 2px 0;font-size:13px;text-align:center;text-shadow:0 1px 1px #3d3d3d;content:"";background-color:#50306a;border-radius:1px;box-shadow:inset 0 0 4px #636363}a.labyrinthHUD-door.labyrinthHUD-door-category-y:after{content:"Fealty";background-color:#d851ff99}a.labyrinthHUD-door.labyrinthHUD-door-category-h:after{content:"Tech";background-color:#21e2ff99}a.labyrinthHUD-door.labyrinthHUD-door-category-s:after{content:"Scholar";background-color:#e9630099}a.labyrinthHUD-door.labyrinthHUD-door-category-t:after{font-size:11px;content:"Treasury";background-color:#ffe40099}a.labyrinthHUD-door.labyrinthHUD-door-category-f:after{font-size:12px;content:"Farming";background-color:#11f40099}.labyrinthHUD-door-name-padding span{margin-top:-25px}.labyrinthHUD-door-image:after{filter:drop-shadow(0 1px 1px #242424);transform:scale(1.5)}.labyrinthHUD-hallway-background{filter:brightness(1.2)}.labyrinthHUD-clueBar-totalContainer.mh-ui-labyrinth-100clues{background-color:#479f49}.mh-ui-labyrinth-tile-clicked{opacity:0;transition:opacity .3s ease}.mh-ui-labyrinth-tile-clicked-fade-in{opacity:1}.labyrinthHUD-secretContainer{font-weight:900;background-color:transparent;border:none;box-shadow:none;mix-blend-mode:overlay}.labyrinthHUD-confirmDescription .labyrinthHUD-exit{top:-4px}.labyrinthHUD-hallwayDescription-f .labyrinthHUD-hallwayName{color:#11f400}.labyrinthHUD-hallwayDescription-h .labyrinthHUD-hallwayName{color:#21e2ff}.labyrinthHUD-hallwayDescription-s .labyrinthHUD-hallwayName{color:#e96300}.labyrinthHUD-hallwayDescription-y .labyrinthHUD-hallwayName{color:#d851ff}.labyrinthHUD-hallwayDescription-t .labyrinthHUD-hallwayName{color:#ffe400}
`;
}
});
var highlightDoors, scrambleGems, expandClueBar, addLanternReminder, updateDoorText, highlight100Clues, highlightTileForMinigame, minigame, refreshHud, labyrinth_default4, init_labyrinth4 = __esm({
"src/modules/location-huds/locations/labyrinth/index.js"() {
init_utils2();
init_styles92();
highlightDoors = () => {
var _a, _b;
if (((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestLabyrinth) == null ? void 0 : _b.status) !== "intersection")
return;
let existingHighlight = document.querySelector(".mh-ui-labyrinth-highlight");
existingHighlight && existingHighlight.classList.remove("mh-ui-labyrinth-highlight");
let clue = (user.quests.QuestLabyrinth.clues || []).reduce((a, b) => a.quantity > b.quantity ? a : b);
if (clue) {
let matchingDoors = (user.quests.QuestLabyrinth.doors || []).filter((door) => door.choice && door.choice.length ? door.choice.includes(clue.type) : !1);
if (!matchingDoors.length)
return;
let bestDoor = matchingDoors.reduce((a, b) => a.choice.length > b.choice.length ? a : b);
if (bestDoor) {
let highlight = document.querySelector(`.labyrinthHUD-door.${bestDoor.css_class.replaceAll(" ", ".")}`);
highlight && highlight.classList.add("mh-ui-labyrinth-highlight");
}
}
}, scrambleGems = () => {
let gems = document.querySelectorAll(".labyrinthHUD-scrambleGem");
gems && gems.forEach((gem) => {
gem.removeAttribute("onclick"), gem.addEventListener("click", () => {
gems.forEach((g) => {
hg.views.HeadsUpDisplayLabyrinthView.labyrinthScrambleGem(g, 2);
});
});
});
}, expandClueBar = () => {
let clueProgresses = document.querySelectorAll(".mh-ui-labyrinth-clue-count");
clueProgresses && clueProgresses.forEach((progress) => {
progress.remove();
});
let clueProgress = document.querySelectorAll(".labyrinthHUD-clue");
clueProgress && clueProgress.forEach((progress) => {
let clueType = progress.classList.value.replace("labyrinthHUD-clue", "").replace("clueFound", "").trim(), clue = (user.quests.QuestLabyrinth.clues || []).find((c) => c.type === clueType);
if (clue) {
progress.setAttribute("title", `${clue.quantity} found`);
let text = makeElement("span", "mh-ui-labyrinth-clue-count", `${clue.quantity}`);
progress.append(text);
}
});
}, addLanternReminder = () => {
var _a, _b, _c, _d;
((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestLabyrinth) == null ? void 0 : _b.lantern_status) === "inactive" && ((_d = (_c = user == null ? void 0 : user.quests) == null ? void 0 : _c.QuestLabyrinth) == null ? void 0 : _d.hallway_tier) >= 2 && setTimeout(() => {
let existingLanternReminder = document.querySelector(".mh-ui-labyrinth-lantern-reminder");
existingLanternReminder && existingLanternReminder.classList.remove("hidden");
let labyHud = document.querySelector(".labyrinthHUD-intersection");
if (labyHud) {
let lanternReminder = document.createElement("div");
lanternReminder.classList.add("mh-ui-labyrinth-lantern-reminder"), labyHud.append(lanternReminder);
}
}, 500);
}, updateDoorText = () => {
var _a, _b;
let doorTextExisting = document.querySelector(".mh-ui-labyrinth-door-text");
doorTextExisting && doorTextExisting.remove();
let appendTo = document.querySelector(".labyrinthHUD-hallwayDescription");
if (!appendTo)
return;
let existing = document.querySelector(".mh-ui-labyrinth-step-counter");
existing && existing.remove();
let existingStepsToGo = document.querySelector(".mh-ui-labyrinth-steps-to-go");
existingStepsToGo && existingStepsToGo.remove();
let hallwayLength = user.quests.QuestLabyrinth.hallway_length || 0, tiles = user.quests.QuestLabyrinth.tiles || [], completed = tiles.filter((tile) => tile.status.includes("complete"));
completed.length !== hallwayLength && makeElement("span", "mh-ui-labyrinth-step-counter", `${completed.length}/${hallwayLength} steps completed.`, appendTo);
let stepsToGo = hallwayLength - completed.length, existingIntersectionText = document.querySelector(".mh-ui-labyrinth-door-text");
existingIntersectionText && existingIntersectionText.remove();
let stepsExisting = document.querySelector(".mh-ui-laby-steps");
stepsExisting && stepsExisting.remove();
let cptExisting = document.querySelector(".mh-ui-laby-cpt");
if (cptExisting && cptExisting.remove(), stepsToGo !== 0) {
let intersectionDoors = document.querySelector(".labyrinthHUD-doorContainer");
if (intersectionDoors) {
let cluesPerTile = (tiles.filter((tile) => tile.status.includes("good")).reduce((a, b) => a + Number.parseInt(b.status.replace("complete", "").replace("good_", "").trim()), 0) / completed.length).toFixed(1).replace(".0", ""), intersectionText = makeElement("div", "mh-ui-labyrinth-door-text"), stepsNoun = "hunt";
if ((stepsToGo > 1 || stepsToGo < 1) && (stepsNoun = "hunts"), makeElement("div", "mh-ui-laby-steps", `${stepsToGo} ${stepsNoun} left in the hallway`, intersectionText), cluesPerTile !== "NaN") {
let clueNoun = "clue";
(cluesPerTile > 1 || cluesPerTile < 1) && (clueNoun = "clues"), makeElement("div", "mh-ui-laby-cpt", `Avg. ${cluesPerTile} ${clueNoun} per tile`, intersectionText);
}
intersectionDoors.append(intersectionText);
}
}
((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestLabyrinth) == null ? void 0 : _b.status) === "intersection" && highlightDoors();
}, highlight100Clues = () => {
var _a;
let clues = document.querySelector(".labyrinthHUD-clueBar-totalContainer");
clues && (Number.parseInt(((_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestLabyrinth.total_clues) || 0) < 100 ? clues.classList.remove("mh-ui-labyrinth-100clues") : clues.classList.add("mh-ui-labyrinth-100clues"));
}, highlightTileForMinigame = (tile) => {
var _a, _b;
tile.classList.add("mh-ui-labyrinth-tile-clicked");
let id = tile.getAttribute("data-index"), length = ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestLabyrinth) == null ? void 0 : _b.hallway_length) || 10, degree = id / length * 360;
tile.style.filter = `brightness(1.5) hue-rotate(${Math.floor(degree)}deg)`, setTimeout(() => {
tile.classList.add("mh-ui-labyrinth-tile-clicked-fade-in");
}, 100), setTimeout(() => {
tile.style.filter = "brightness(1) hue-rotate(0deg)";
}, 500), setTimeout(() => {
tile.classList.remove("mh-ui-labyrinth-tile-clicked-fade-in"), tile.classList.remove("mh-ui-labyrinth-tile-clicked"), tile.style.filter = "";
}, 510);
}, minigame = () => __async(void 0, null, function* () {
let tiles = document.querySelectorAll(".labyrinthHUD-hallway-tile");
tiles && tiles.forEach((tile) => {
[...tile.classList].includes("active") && tile.addEventListener("click", () => {
let delay = 0;
tiles.forEach((t) => {
setTimeout(() => {
highlightTileForMinigame(t);
}, delay), delay += 50;
});
});
});
}), refreshHud = () => __async(void 0, null, function* () {
getCurrentLocation2() === "labyrinth" && (expandClueBar(), updateDoorText(), highlight100Clues(), minigame());
}), labyrinth_default4 = () => __async(void 0, null, function* () {
addHudStyles(styles_default91), scrambleGems(), refreshHud(), addLanternReminder(), onRequest("*", refreshHud), onTurn(refreshHud, 1e3);
});
}
});
var lagoon_default, init_lagoon = __esm({
"src/modules/location-huds/locations/lagoon/index.js"() {
init_cheese_selectors();
lagoon_default = () => __async(void 0, null, function* () {
cheese_selectors_default("lagoon", ["gnarled_cheese", "wicked_gnarly_cheese"]);
});
}
});
var meditation_room_default, init_meditation_room = __esm({
"src/modules/location-huds/locations/meditation-room/index.js"() {
init_cheese_selectors();
meditation_room_default = () => __async(void 0, null, function* () {
cheese_selectors_default("meditation-room", [
"combat_cheese",
"glutter_cheese",
"susheese_cheese"
]);
});
}
});
var styles_default92, init_styles93 = __esm({
"src/modules/location-huds/locations/mountain/styles.css"() {
styles_default92 = `.mountainHUD-boulder-health-percent{display:flex;align-items:center;justify-content:space-evenly}.mountainHUD-boulder-health-percent span{font-size:12px}.mountainHUD-boulder-health-progressBar span{top:-2px;bottom:-2px;box-shadow:inset 0 0 2px 1px #000}.mountainHUD-boulder-state,.mousehuntItem.mountainHUD-conduit-charm .mousehuntItem-image{transition:.2s ease-in}.mountainHUD-boulder:hover .mountainHUD-boulder-state{filter:brightness(.9);transform:translateY(4px)}.mountainHUD-boulderHelper{top:3px;left:128px;width:76px;font-size:11px}.mountainHUD-conduit-charm .mousehuntItem-image{background-color:#835327;background-size:cover;border-radius:0;box-shadow:-1px -1px #835327}.mountainHUD-conduit-charm .mousehuntItem-image:after{border:none;border-radius:40px}.mountainHUD-conduit-charm:hover .mousehuntItem-image{transform:rotate(5deg)}.mountainHUD-conduit-power{padding-left:19px;font-size:15px}.mountainHUD-conduit-power:after{top:-2px;width:20px;height:21px;padding-right:5px;background-size:20px}.mountainHUD-conduit-suggestions .mousehuntItem-quantity{right:0;bottom:-11px;left:0;font-size:12px;border:1px solid #858585}.mountainHUD-footer-item .mousehuntItem-image{width:25px;height:25px;background-color:transparent}.mountainHUD-footer-item .mousehuntItem-image,.mountainHUD-phaseContainer .mousehuntItem-image,.mountainHUD-conduit-suggestions .mousehuntItem-image{background-color:transparent;background-size:cover;box-shadow:none}.mountainHUD-conduit-suggestions .mousehuntItem-image{background-size:125%}.mountainHUD-footer-item .mousehuntItem-image:after,.mountainHUD-phaseContainer .mousehuntItem-image:after{border:none}.mountainHUD-footer-item .mousehuntItem-quantity{bottom:4px;font-size:12px;background-color:#de9c5f;box-shadow:inset 0 0 3px 2px #835327}.mountainHUD-footer-item-name{font-size:10px}.mountainHUD-footer-item:nth-child(1) .mountainHUD-footer-item-name{font-size:10px;line-height:10px}.mountainHUD-footer-item:nth-child(2) .mountainHUD-footer-item-name{width:82px;margin-left:24px;font-size:12px}.mountainHUD-footer-item:nth-child(3) .mountainHUD-footer-item-name{font-size:12px}.mountainHUD-footer-item:nth-child(4) .mountainHUD-footer-item-name{font-size:9px}.mountainHUD-footer-item:nth-child(5) .mountainHUD-footer-item-name{width:80px;margin-left:27px;font-size:11px}.mountainHUD-footer-item .mousehuntItem.disabled .mousehuntItem-image{filter:opacity(.3)}.mountainHUD-phase-description{line-height:10px}.mountainHUD-phase-title span{font-size:10px;font-variant:none;text-shadow:1px 1px 2px #000}.mountainHUD-phaseContainer .mousehuntItem-quantity.quantity{font-size:12px;border:1px solid #858585}.mountainHUD.none .mountainHUD-conduit-charm .mousehuntItem-image{border-radius:50%}.mousehuntItem.mountainHUD-conduit-charm{background-color:#835327}.mountainHUD-conduit .mousehuntItem.disabled{height:auto;background-color:#5f3e1f}.mountainHUD-conduit .mousehuntItem-image.disabled:after{border:none}.mountainHUD-conduit .mousehuntItem.disabled .mousehuntItem-quantity{display:none}.mountainHUD-conduit-suggestion-item .mousehuntTooltip{font-size:12px}.mountainHUD-conduit-suggestions .mousehuntItem-image.power_trinket{background-image:url(https://www.mousehuntgame.com/images/items/trinkets/large/b0fb665f8649eb72432c66b0575c9516.png)}.mountainHUD-conduit-suggestions .mousehuntItem-image.super_power_trinket{background-image:url(https://i.mouse.rip/upscaled/625bef6da38dc44ddcd70d0da47244ae.png)}.mountainHUD-conduit-suggestions .mousehuntItem-image.weak_power_trinket{background-image:url(https://www.mousehuntgame.com/images/items/trinkets/large/47a2b0f87d6ec8a9d86f39417a619f85.png)}.active .mousehuntItem-image.power_trinket{box-shadow:0 0 5px 3px #00e505 inset}.mountainHUD-minibossHelper{padding:2px;margin-left:-3px;font-size:10px}.mountainHUD-mouse{transition:.2s ease-in ease-out;transform-origin:bottom;will-change:transform}.mountainHUD-mouse:nth-child(1):hover{transform:scale(1.1) rotate(-3deg)}.mountainHUD-mouse:nth-child(2):hover{transform:scale(1.1)}.mountainHUD-mouse:nth-child(3):hover{transform:scale(1.1) rotate(3deg)}.mountainHUD-mouse .mountainHUD-mouse-image{border-radius:15px 15px 0 0}.mountainHUD-conduit-suggestions .mountainHUD-conduit-suggestion-item:hover .mousehuntItem-image{background-size:150%}.mountainHUD-miniBoulderContainer .mountainHUD-miniBoulder-health-percent{font-size:10px}.mountainHUD-miniBoulderContainer .mountainHUD-miniBoulder-health-percent span{font-size:12px}.mountainHUD-miniBoulderContainer .mountainHUD-miniBoulder-health-progressBar{top:7px;height:11px;background-color:#815026;box-shadow:inset 0 0 1px 1px #100802}.mountainHUD-miniBoulderContainer .mountainHUD-miniBoulder-health-progressBar span{box-shadow:inset 1px 0 2px 1px #000;transition:.2s ease-in}.mountainHUD-miniBoulder-state{filter:drop-shadow(0 0 1px #fff15b);transition:all .2s ease-out;transform-origin:center}.mountainHUD-miniBoulder-state:hover{filter:drop-shadow(0 0 3px #fff15b);transform:scale(1.4)}.mountainHUD-mouse-difficulty{font-size:13px}.mountainHUD-miniBoulderContainer .mountainHUD-miniBoulder-health-progressBar:hover span{filter:hue-rotate(105deg)}
`;
}
});
var mountain_default, init_mountain = __esm({
"src/modules/location-huds/locations/mountain/index.js"() {
init_utils2();
init_styles93();
mountain_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default92);
});
}
});
var styles_default93, init_styles94 = __esm({
"src/modules/location-huds/locations/mousoleum/styles.css"() {
styles_default93 = `.mousoleumHUD-buildWall.mousoleumHUD-wall-state{transform:scale(1.1)}.mousoleumHUD-bait .mousehuntItem-image{background-color:transparent}.mousoleumHUD-plankContainer{font-size:13px}.mousoleumHUD-quantity.quantity{font-size:12px;line-height:15px}.mousoleumHUD{background-image:url(https://i.mouse.rip/mousoleum-bg.png);filter:drop-shadow(0 -5px 3px #333)}
`;
}
});
var mousoleum_default3, init_mousoleum3 = __esm({
"src/modules/location-huds/locations/mousoleum/index.js"() {
init_utils2();
init_styles94();
mousoleum_default3 = () => __async(void 0, null, function* () {
addHudStyles(styles_default93);
let plankContainer = document.querySelector(".mousoleumHUD-plankContainer");
plankContainer && plankContainer.addEventListener("click", () => {
hg.views.HeadsUpDisplayMousoleumView.spawnShards(Math.floor(Math.random() * 20));
});
});
}
});
var styles_default94, init_styles95 = __esm({
"src/modules/location-huds/locations/moussu-picchu/styles.css"() {
styles_default94 = `.moussuPicchuHUD-torchQuantity.quantity{width:35px;font-size:12px;color:#fff;background-color:#320918;border-radius:4px}.moussuPicchuHUD .mousehuntItem-quantity.quantity{right:1px;bottom:-10px;left:1px;font-size:10px;color:#fff;background-color:#8d3f4d;box-shadow:none}.moussuPicchuHUD-itemContainer{top:150px;right:7px;left:7px;background-color:#320717;border-radius:5px;box-shadow:0 -7px #320717}a.moussuPicchuHUD-footer-item-action.mousehuntArmNowButton{top:8px;right:-1px;transform:scale(.8)}.moussuPicchuHUD-footer-item-name{width:auto;font-size:9px}.moussuPicchuHUD-footer-item.dragon_scale_crafting_item.mousehuntTooltipParent{width:20%}.moussuPicchuHUD-footer-item.gouda_cheese,.moussuPicchuHUD-footer-item.super_brie_cheese{width:26%}.moussuPicchuHUD-footer-item.glowing_gruyere_cheese{width:28%}.moussuPicchuHUD-itemBlock.mousehuntTooltipParent.dragon_bait{left:310px;display:flex;align-items:flex-end;justify-content:space-evenly;width:120px}.moussuPicchuHUD-powerType.moussuPicchuHUD-powerType{background-size:contain;box-shadow:none}.moussuPicchuHUD-footer-item-tooltip-baitRow .mousehuntArmNowButton[data-item-type=swiss_cheese],.moussuPicchuHUD-footer-item-tooltip-baitRow .mousehuntArmNowButton[data-item-type=brie_cheese]{display:block}.moussuPicchuHUD-footer-item.dragon_scale_crafting_item .mousehuntTooltip{text-align:center}.moussuPicchuHUD-footer-item .mousehuntTooltip{bottom:130%}.moussuPicchuHUD-footer-item-image{width:30px;height:30px;background-color:transparent;background-size:cover}.moussuPicchuHUD-footer-item:nth-child(3) .mousehuntTooltip{right:-30px;left:-30px}.moussuPicchuHUD .mousehuntItem-image{width:38px;height:38px}.moussuPicchuHUD .mousehuntItem.active .mousehuntItem-image:after{box-shadow:inset 0 0 9px 2px #74e776}.moussuPicchuHUD-background{border-top-left-radius:25px;border-top-right-radius:25px;box-shadow:inset 0 5px 10px -2px #321c1e}.moussuPicchuHUD-background.wind{top:2px;left:8px}.moussuPicchuHUD-background.storm{top:3px;left:8px}.moussuPicchuHUD-powerTypeWarning.active.useless{right:200px;left:200px;padding:5px;color:#870808;background-color:#ffbfbf;border-color:#ff8a7c}.moussuPicchuHUD-powerType.wind,.moussuPicchuHUD-powerType.wind.active,.moussuPicchuHUD-powerType.rain,.moussuPicchuHUD-powerType.rain.active{filter:hue-rotate(60deg) opacity(.8);background-position:center;box-shadow:none}.moussuPicchuHUD-powerType.rain,.moussuPicchuHUD-powerType.rain.active{background-image:url(https://www.mousehuntgame.com/images/powertypes/shadow.png)}.moussuPicchuHUD-powerType.wind,.moussuPicchuHUD-powerType.wind.active{background-image:url(https://www.mousehuntgame.com/images/powertypes/arcane.png)}.moussuPicchuHUD-powerType.wind.active{filter:opacity(.8)}a.moussuPicchuHUD-powerType{transition:transform .2s ease-out;transform:scale(1.2)}a.moussuPicchuHUD-powerType:hover{transform:scale(1.5)}.moussuPicchuHUD-element-status.max{filter:hue-rotate(50deg)}.moussuPicchuHUD{border-radius:10px 10px 5px 5px;box-shadow:inset -10px 5px #2c181a,inset 10px 5px 0 1px #2c181a,inset -10px 5px #2c181a,0 13px #2c181a,0 -3px #2c181a}.moussuPicchuHUD .mousehuntItem.potion .mousehuntItem-image,.moussuPicchuHUD .mousehuntItem-image{margin-top:-2px;background-color:#783642;border:none;box-shadow:none}.moussuPicchuHUD .mousehuntItem-image:after{inset:-1px}.moussuPicchuHUD .mousehuntItem.crafting_item .mousehuntItem-image,.moussuPicchuHUD .mousehuntItem.potion .mousehuntItem-image{width:33px;height:33px;margin-top:-3px;background-position:center;background-size:30px}.moussuPicchuHUD .mousehuntItem.potion .mousehuntItem-image{width:32px;height:32px}.moussuPicchuHUD .mousehuntItem.active .mousehuntItem-quantity.quantity{right:-1px;left:-1px;color:#000;background-color:#9ee184}.moussuPicchuHUD-elementContainer.wind .moussuPicchuHUD-element-progressBarContainer span[style="width:100%;"]:after,.moussuPicchuHUD-elementContainer.rain .moussuPicchuHUD-element-progressBarContainer span[style="width:100%;"]:after{border:none;border-radius:0}.moussuPicchuHUD-elementContainer.wind .moussuPicchuHUD-element-progressBarContainer,.moussuPicchuHUD-elementContainer.rain .moussuPicchuHUD-element-progressBarContainer,.moussuPicchuHUD-element-progressBarContainer{overflow:hidden;border-color:#978787;border-radius:3px}.moussuPicchuHUD-elementContainer.rain .moussuPicchuHUD-element-progressBarContainer span,.moussuPicchuHUD-elementContainer.wind .moussuPicchuHUD-element-progressBarContainer span{border-radius:2px}.moussuPicchuHUD-torchButton.selected:after{filter:drop-shadow(0 -2px 5px #f5a8fc)}.moussuPicchuHUD .mousehuntItem:hover .mousehuntItem-quantity.quantity{right:-1px;left:-1px}.moussuPicchuHUD .mousehuntItem:hover .mousehuntItem-quantity.quantity:after{position:absolute;inset:0 0 -1px;content:"";border:2px solid #ccc;border-top:none;border-radius:0 0 5px 5px}.moussuPicchuHUD .mousehuntItem.active:hover .mousehuntItem-quantity.quantity:after{border:none}
`;
}
});
var moussu_picchu_default2, init_moussu_picchu2 = __esm({
"src/modules/location-huds/locations/moussu-picchu/index.js"() {
init_utils2();
init_styles95();
moussu_picchu_default2 = () => __async(void 0, null, function* () {
addHudStyles(styles_default94);
});
}
});
var nerg_plains_default, init_nerg_plains = __esm({
"src/modules/location-huds/locations/nerg-plains/index.js"() {
init_cheese_selectors();
nerg_plains_default = () => __async(void 0, null, function* () {
cheese_selectors_default("nerg-plains", ["gumbo_cheese"]);
});
}
});
var pinnacle_chamber_default, init_pinnacle_chamber = __esm({
"src/modules/location-huds/locations/pinnacle-chamber/index.js"() {
init_cheese_selectors();
pinnacle_chamber_default = () => __async(void 0, null, function* () {
cheese_selectors_default("pinnacle-chamber", [
"rumble_cheese",
"onyx_gorgonzola_cheese"
]);
});
}
});
var styles_default95, init_styles96 = __esm({
"src/modules/location-huds/locations/pollution-outbreak/styles.css"() {
styles_default95 = `.pollutionOutbreakHUD{z-index:1;filter:drop-shadow(0 2px 1px #000)}.pollutionOutbreakHUD-item-image{height:30px;padding:0;margin:0;background-color:#ffffffbf;background-repeat:no-repeat;background-position:top;background-size:contain;box-shadow:none}.active .pollutionOutbreakHUD-item-image{background-color:#fff}.pollutionOutbreakHUD-timer{top:2px;bottom:unset;left:18px;z-index:29;padding:2px 7px 2px 3px;font-size:12px;border-top:1px solid #999;border-radius:5px 0 10px}.pollutionOutbreakHUD-totalPollution-direction-status{font-size:10px}.pollutionOutbreakHUD-hunters{top:5px;right:145px;left:unset;padding:2px 5px;font-size:12px;border-right:none;border-left:1px solid #999;border-radius:0 5px 0 10px}.pollutionOutbreakHUD-timer,.pollutionOutbreakHUD-hunters,.pollutionOutbreakHUD-totalPollution-direction .mousehuntTooltip{background:#f4f4f4cc}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/50f10ec5c7bc01cb99af2003b30d400d.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/0567284d6e12aaaed35ca5912007e070.png)!important}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/2e17d44079e1538b28409c05da497440.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/398dca9a8c7703de969769491622ca32.png)!important}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/322d0b6d9527f1f09c0e213c2fc7abbe.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/9a6acd429a9a3a4849ed13901288b0b8.png)!important}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/8ed26547b6ce5606faed7ce7d3494232.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/ea9c0ec2e6d3d81c14e61f5ce924d0e1.png)!important}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/53f8ec71d1a26beec6277152afdcc9ba.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/dd11711a25b80db90e0306193f2e8d78.png)!important}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/759a709a33a52b2fb70f0d6d994afc16.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/eb46ac1e8197b13299ab860f07d963db.png)!important}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/56ff0615bc3f03729b1d2b2bb52693c1.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/87937fa96bbb3b2dd3225df883002642.png)!important}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/e258cd2f5606d678cc0bba000b930500.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/043efe31de4f0f2e0ddca590fe829032.png)!important}.pollutionOutbreakHUD-pollution-title-block.active .pollutionOutbreakHUD-pollution-title-block-icon,.pollutionOutbreakHUD-pollution-title-block .pollutionOutbreakHUD-pollution-title-block-icon,.pollutionOutbreakHUD-pollution-title-block.complete .pollutionOutbreakHUD-pollution-title-block-icon{top:0;left:-1px;width:13px;height:15px;background-color:#9b9d9d;background-position:center;background-size:contain;border-radius:0}.pollutionOutbreakHUD-pollution-title-block-name{right:0;left:16px;font-size:11px;line-height:21px;text-align:center}.pollutionOutbreakHUD-pollution-title-block-icon{top:-2px;left:1px;width:16px;height:15px;background-color:transparent;background-position:center;background-size:contain}.pollutionOutbreakHUD-layer{z-index:7}.pollutionOutbreakHUD-pollution-title-block-progressBar{background-color:#469d30bf;box-shadow:-3px 2px 1px #6a6969 inset}.pollutionOutbreakHUD-pollution-title-block.active .pollutionOutbreakHUD-pollution-title-block-progressBar:after{border:none}.pollutionOutbreakHUD-pollution-title-block.complete .pollutionOutbreakHUD-pollution-title-block-name{color:#d1d0cf;box-shadow:inset 0 2px 1px #6a6969}.pollutionOutbreakHUD-pollution-title-block.active .pollutionOutbreakHUD-pollution-title-block-progressBar{border-right:1px solid #a13427;border-radius:0;box-shadow:-1px 2px 1px #6a6969 inset}.pollutionOutbreakHUD-pollution-title-block.hero,.pollutionOutbreakHUD-pollution-title-block.knight,.pollutionOutbreakHUD-pollution-title-block.lord_lady,.pollutionOutbreakHUD-pollution-title-block.baron_baroness{width:60px!important}.pollutionOutbreakHUD-pollution-title-block.count_countess,.pollutionOutbreakHUD-pollution-title-block.duke_dutchess{width:75px!important}.pollutionOutbreakHUD-pollution-title-block.grand_duke{width:85px!important}.pollutionOutbreakHUD-pollution-title-block.archduke_archduchess{width:80px!important}.pollutionOutbreakHUD-refineQuantityContainer{margin-top:-1px;font-weight:900}.pollutionOutbreakHUD-pollutinumContainer.active .pollutionOutbreakHUD-refineQuantityContainer,.pollutionOutbreakHUD-refineQuantityContainer{display:inline-block;width:23px;margin-right:0;line-height:17px;vertical-align:middle;background:#000;border:none;border-radius:3px;box-shadow:0 0 1px #3fa126 inset}.pollutionOutbreakHUD-scumContainer{padding-right:10px;padding-left:5px;overflow:hidden;background-color:#2a2a2a}.pollutionOutbreakHUD-scumContainer:after{display:none}.pollutionOutbreakHUD-scumContainer .quantity,.pollutionOutbreakHUD-scumContainer .maxQuantity{font-size:12px;line-height:17px}span.pollutionOutbreakHUD-refineQuantity{font-size:11px;font-weight:900}.pollutionOutbreakHUD-refineQuantity:before{content:"+"}a.pollutionOutbreakHUD-refineButton{top:0;width:52px;height:17px;margin-right:5px;background-position:0 center;background-size:100%;border:1px solid #000;border-radius:3px}a.pollutionOutbreakHUD-refineButton:hover{filter:sepia(1)}.pollutionOutbreakHUD-refineButton:after,.pollutionOutbreakHUD-refineButton.busy:before{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:12px;color:#494949;content:"Refine";background-color:#95ff7e;border-radius:2px}.pollutionOutbreakHUD-refineButton.busy:after{display:none}.pollutionOutbreakHUD-refineButton.active:after{content:"Refining";background-color:#55edff}.pollutionOutbreakHUD-refineButton.busy{background-color:#d0f4f9}.pollutionOutbreakHUD-refineButton.busy:before{content:"\\b7\\b7\\b7";background-color:#d0f4f9}.pollutionOutbreakHUD-refineButton{background:none}.pollutionOutbreakHUD-pollution-title-block .mousehuntTooltip b.pollutionOutbreakHUD-pollution-title-block-gender{display:none!important}.pollutionOutbreakHUD-pollution-title-block .mousehuntTooltip{font-size:12px;text-align:center}.pollutionOutbreakHUD-layer-fog{display:none}.pollutionOutbreakHUD-totalPollution-direction .mousehuntTooltip{bottom:24px;left:4px;display:block;width:auto;padding:2px 5px;font-size:12px;background:url(https://www.mousehuntgame.com/images/ui/backgrounds/overlay.png) top right;background-color:#f4f4f4cc;border-top:1px solid #999;border-right:1px solid #999;border-bottom:1px solid #999;border-left:none;border-radius:0 10px 0 2px;box-shadow:none;animation:none!important}.pollutionOutbreakHUD-totalPollution-direction .mousehuntTooltip-arrow{display:none}.pollutionOutbreakHUD-totalPollution-direction .mousehuntTooltip b{font-weight:400}.pollutionOutbreakHUD-item-quantity.quantity{font-size:10px;line-height:15px;background-color:#333;border-top:none;border-radius:0 0 3px 3px;box-shadow:none}.pollutionOutbreakHUD-itemContainer{top:3px;right:14px}.pollutionOutbreakHUD-item-padding{margin:1px 2px;border:1px solid #000;border-radius:6px}.pollutionOutbreakHUD-item{margin-top:1px}.pollutionOutbreakHUD-item.active .pollutionOutbreakHUD-item-padding:after{display:none}.pollutionOutbreakHUD-item:hover .pollutionOutbreakHUD-item-image,.pollutionOutbreakHUD-item:focus .pollutionOutbreakHUD-item-image{background-color:#fff}.pollutionOutbreakHUD-item.active .pollutionOutbreakHUD-item-image a{z-index:1;border-top-left-radius:5px;border-top-right-radius:5px;box-shadow:inset 0 0 20px #8dd06c}.pollutionOutbreakHUD-item.active .pollutionOutbreakHUD-item-quantity.quantity,.pollutionOutbreakHUD-item.focus .pollutionOutbreakHUD-item-quantity.quantity,.pollutionOutbreakHUD-item:hover .pollutionOutbreakHUD-item-quantity.quantity{color:#bcf1a2}.pollutionOutbreakHUD-item:hover .pollutionOutbreakHUD-item-padding:after{border:none}.pollutionOutbreakHUD-pollution-title-block.hero:after{width:41px;content:"30 hrs"}.pollutionOutbreakHUD-pollution-title-block.knight:after{width:41px;content:"16 hrs"}.pollutionOutbreakHUD-pollution-title-block.lord_lady:after{width:41px;content:"18 hrs"}.pollutionOutbreakHUD-pollution-title-block.baron_baroness:after{width:41px;content:"18 hrs"}.pollutionOutbreakHUD-pollution-title-block.count_countess:after,.pollutionOutbreakHUD-pollution-title-block.duke_dutchess:after{width:56px;content:"1 day"}.pollutionOutbreakHUD-pollution-title-block.grand_duke:after{right:1px;width:67px;content:"1 day"}.pollutionOutbreakHUD-pollution-title-block.archduke_archduchess:after{right:0;width:62px;content:"1 day"}.pollutionOutbreakHUD-pollution-title-block:hover:after{display:flex}.pollutionOutbreakHUD-pollution-title-block.mousehuntTooltipParent:hover .mousehuntTooltip{display:none}.pollutionOutbreakHUD-pollution-title-block:after{position:absolute;top:-22px;right:1px;z-index:10;display:none;align-items:center;justify-content:center;width:20px;height:20px;font-size:12px;color:#ccc;text-align:center;text-shadow:1px 1px 1px #000;vertical-align:middle;content:"";background:linear-gradient(180deg,#1d1d1d,#242424);border-radius:10px 10px 0 0;box-shadow:0 1px #9b9d9d,0 2px #6a6969,0 0 0 2px #9b9d9d,0 1px 1px #6a6969 inset}.pollutionOutbreakHUD-pollution-title-block.complete:after,.pollutionOutbreakHUD-pollution-title-block.active:after{box-shadow:0 1px #9b9d9d,0 2px #6a6969,0 0 0 2px #9b9d9d,0 1px 1px #6a6969 inset}.pollutionOutbreakHUD-pollution-title-block.complete:after{background:#449830}.pollutionOutbreakHUD-pollution-title-block.active:after{background:#822515}.pollutionOutbreakHUD-totalPollution-direction-image{width:24px;height:22px;margin-left:-1px}.pollutionOutbreakHUD-pollution-title-block.active .pollutionOutbreakHUD-pollution-title-block-name{right:2px;font-weight:400}.pollutionOutbreakHUD.rising .pollutionOutbreakHUD-pollution-title-blockContainer:after,.pollutionOutbreakHUD.falling .pollutionOutbreakHUD-pollution-title-blockContainer:after{position:absolute;inset:5px 0 0 25px;pointer-events:none;content:"";background-image:linear-gradient(-45deg,rgb(255 255 255 / 25%) 25%,transparent 25%,transparent 50%,rgb(255 255 255 / 25%) 50%,rgb(255 255 255 / 25%) 75%,transparent 75%,transparent);background-size:50px 50px;opacity:0;transition:opacity .5s}.pollutionOutbreakHUD.rising:hover .pollutionOutbreakHUD-pollution-title-blockContainer:after,.pollutionOutbreakHUD.falling:hover .pollutionOutbreakHUD-pollution-title-blockContainer:after{opacity:1;animation:mh-improved-background-to-right 3s linear infinite}.pollutionOutbreakHUD.falling:hover .pollutionOutbreakHUD-pollution-title-blockContainer:after{animation-name:mh-improved-background-to-left}@media (prefers-reduced-motion: reduce){.pollutionOutbreakHUD.rising:hover .pollutionOutbreakHUD-pollution-title-blockContainer:after,.pollutionOutbreakHUD.falling:hover .pollutionOutbreakHUD-pollution-title-blockContainer:after{animation:none}}.pollutionOutbreakHUD-scumContainer:before{position:absolute;right:0;bottom:0;display:block;width:var(--pollution-outbreak-width, 0%);height:5px;content:"";background-color:#418132}
`;
}
});
var addWidthToPolluntiumBar, pollution_outbreak_default2, init_pollution_outbreak2 = __esm({
"src/modules/location-huds/locations/pollution-outbreak/index.js"() {
init_utils2();
init_styles96();
addWidthToPolluntiumBar = () => {
let gauge = document.querySelector(".pollutionOutbreakHUD-scumContainer");
if (!gauge)
return;
let quantityEl = gauge.querySelector(".quantity"), maxQuantityEl = gauge.querySelector(".maxQuantity");
if (!quantityEl || !maxQuantityEl)
return;
let quantity = Number.parseInt(quantityEl.innerText, 10), maxQuantity = Number.parseInt(maxQuantityEl.innerText.replace("/", ""), 10), percentage = Math.round(quantity / maxQuantity * 100);
gauge.style.setProperty("--pollution-outbreak-width", `${percentage}%`);
}, pollution_outbreak_default2 = () => __async(void 0, null, function* () {
addHudStyles(styles_default95), setMultipleTimeout(addWidthToPolluntiumBar, [0, 100, 500]), onTurn(addWidthToPolluntiumBar, 500);
});
}
});
var boats_default, init_boats = __esm({
"src/modules/location-huds/locations/prologue-pond/boats.css"() {
boats_default = `.prologuePondView-fishingBoat-paperDoll{background:url(https://i.mouse.rip/mh-improved/boat-test.png) no-repeat 1px -1px,url(https://www.mousehuntgame.com/images/ui/hud/prologue_pond/boat/base.png) no-repeat 0 0;background-size:96%}
`;
}
});
var styles_default96, init_styles97 = __esm({
"src/modules/location-huds/locations/prologue-pond/styles.css"() {
styles_default96 = `.prologuePondView-chum-image{width:35px;height:35px;margin-top:-2px;filter:drop-shadow(0 0 2px #f378ff)}.prologuePondView-chum-quantity.quantity{padding:2px;font-size:14px}.prologuePondView-fishingBoat{top:30px;transition:.4s;transform:scale(1.1)}.prologuePondView-fishingBoat:hover{filter:brightness(1.1)}.prologuePondView-background-layer.water{top:19px;filter:brightness(.9);opacity:.6}.prologuePondView-background-layer.shore{top:25px;opacity:.7}.prologuePondView-currentLoot-value{font-size:12px;border-radius:4px;box-shadow:0 0 20px #000 inset}.prologuePondView-currentLoot-label{margin-bottom:3px}.prologuePondView-currentLoot{border:none}.prologuePondView-fishingBoat.forward .prologuePondView-fishingBoat-paperDoll{transform-origin:50% 40%;animation-duration:1.3s;animation-timing-function:ease-in-out}.disarmed .prologuePondView-fishingBoat-paperDoll{background-image:url(https://i.mouse.rip/mh-improved/boat-no-rod.png)}.prologuePondView-fishingBoat-paperDoll-layer.fish_net.active,.prologuePondView-fishingBoat-paperDoll-layer.fishing_rod.active{opacity:1;transition:.4s}.disarmed .prologuePondView-fishingBoat-paperDoll-layer.fish_net.active,.disarmed .prologuePondView-fishingBoat-paperDoll-layer.fishing_rod.active,.disarmed .prologuePondView-fishingBoat-paperDoll-layer.steam_reel.active,.disarmed .prologuePondView-fishingBoat-paperDoll-layer.fishing_line.active{opacity:0}.prologuePondView-chumDoober[style="top: 62px;"]{left:-96px}@keyframes mh-improved-boat-floating{0%{transform:translate(0)}50%{transform:translateY(3px)}to{transform:translate(0)}}@keyframes mh-improved-chum-floating{0%{transform:translate(0)}50%{transform:translateY(-5px)}to{transform:translate(0)}}.prologuePondView-chumDoober{filter:drop-shadow(-1px -1px 3px #526ba1) drop-shadow(-1px -1px 3px #526ba1) hue-rotate(94deg);animation-name:mh-improved-chum-floating;animation-duration:3s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.prologuePondView-fishingBoat-paperDoll{animation-name:mh-improved-boat-floating;animation-duration:6s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}@media screen and (prefers-reduced-motion: reduce){.prologuePondView-fishingBoat-paperDoll,.prologuePondView-chumDoober{animation:none}}.prologuePondView-chumDooberContainer .prologuePondView-chumDoober:nth-child(1){animation-delay:9s}.prologuePondView-chumDooberContainer .prologuePondView-chumDoober:nth-child(2){left:180px;animation-delay:6s}.prologuePondView-chumDooberContainer .prologuePondView-chumDoober:nth-child(3){left:180px;animation-delay:2s}.prologuePondView-chumDooberContainer .prologuePondView-chumDoober:nth-child(4){animation-delay:4s}.folkloreForestRegionView.stormy_water .prologuePondView-fishingBoat{left:220px}.folkloreForestRegionView.stormy_water .prologuePondView-background-layer.sky:after{top:30px;transform:scaleY(1.2);transform-origin:bottom}.prologuePondView-chumButton.active:after{background-image:url(https://i.mouse.rip/mh-improved/chum-lightning.png)}.folkloreForestRegionView-dialog-recipeResult-content{max-height:unset}
`;
}
});
var addDisarmedClass, updatePondLootQuantity, prologue_pond_default, init_prologue_pond = __esm({
"src/modules/location-huds/locations/prologue-pond/index.js"() {
init_utils2();
init_folklore_forest2();
init_keep_inventory_open();
init_boats();
init_styles78();
init_styles97();
addDisarmedClass = () => {
let hud5 = document.querySelector("#hudLocationContent");
hud5 && (user.bait_disarmed ? hud5.classList.add("disarmed") : hud5.classList.remove("disarmed"));
}, updatePondLootQuantity = () => {
var _a, _b, _c, _d, _e, _f;
let lootMin = ((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestProloguePond) == null ? void 0 : _b.current_loot_range) == null ? void 0 : _c.min) || 0, lootMax = ((_f = (_e = (_d = user == null ? void 0 : user.quests) == null ? void 0 : _d.QuestProloguePond) == null ? void 0 : _e.current_loot_range) == null ? void 0 : _f.max) || 0, lootMaxEl = document.querySelector(".prologuePondView-currentLoot-value-max");
lootMaxEl && (lootMin === lootMax ? lootMaxEl.classList.add("hidden") : lootMaxEl.classList.remove("hidden"));
}, prologue_pond_default = () => __async(void 0, null, function* () {
let stylesToAdd = [styles_default77, styles_default96];
getSetting("experiments.prologue-pond-wood-boat", !1) && stylesToAdd.push(boats_default), addHudStyles(stylesToAdd), folklore_forest_default2(), addDisarmedClass(), onRequest("users/changetrap.php", addDisarmedClass), updatePondLootQuantity(), onRequest("environment/prologue_pond.php", updatePondLootQuantity), keep_inventory_open_default({
setting: "location-huds.prologue-pond-inventory-toggled",
buttonSelector: ".folkloreForestRegionView-environmentInventory-expandButton",
inventorySelector: ".folkloreForestRegionView-environmentInventoryContainer",
inventoryOpenClass: "expanded",
buttonOpenClass: "expanded"
});
});
}
});
var styles_default97, init_styles98 = __esm({
"src/modules/location-huds/locations/rift-bristle-woods/styles.css"() {
styles_default97 = `.riftBristleWoodsHUD-footer-item-quantity.quantity{top:30px;padding:2px 4px;font-size:12px}.riftBristleWoodsHUD-footer-item-tooltip-baitRow-image .riftBristleWoodsHUD-footer-item-quantity{top:15px;right:-3px;padding:0 3px;font-size:9px}.riftBristleWoodsHUD-footer-itemGroup.wide .riftBristleWoodsHUD-footer-item-image:first-child .riftBristleWoodsHUD-footer-item-quantity{top:27px}.riftBristleWoodsHUD-chamberProgressQuantity{top:71px;left:7px;z-index:1;width:50px;padding:0 6px;text-shadow:none;background-color:#fefae9;border-bottom-right-radius:10px;border-bottom-left-radius:10px;box-shadow:inset 1px -1px 3px 1px #d1caaa}.riftBristleWoodsHUD-portalEquipment.lootBooster .riftBristleWoodsHUD-footer-item-quantity{top:22px;right:unset;left:5px}.riftBristleWoodsHUD-footer-item-image.active.highlight{border-color:#03ff95;box-shadow:0 0 10px #00ec00 inset}.riftBristleWoodsHUD-chamberProgressBar span{filter:hue-rotate(53deg);box-shadow:-2px 1px 4px 1px #6e496d inset}.riftBristleWoodsHUD-portal.closed.disabled{filter:grayscale(1);opacity:.5}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.ac.active:after,.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.ng.active:after,.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.ex.active:after,.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.fr.active:after,.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.st.active:after,.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.un.active:after{position:absolute;top:38px;width:53px;padding:3px;margin-left:-17px;text-align:center;background-color:#338053;border:2px solid #00ff95;border-radius:7px 7px 10px 10px}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.fr.active:after,.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.st.active:after,.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.un.active:after{margin-left:-45px;background-color:#623b2c;border:2px solid #d52a0b}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.ac.active:after{content:"Influence"}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.ng.active:after{text-decoration:line-through;content:"Paladins"}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.ex.active:after{content:"4 portals"}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.un.active:after{content:"No Luck"}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.fr.active:after{content:"Frozen"}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.st.active:after{content:"Pursued"}.riftBristleWoodsHUD-acolyteChamber-sandDetails,.riftBristleWoodsHUD-acolyteChamber-acolyteChargeDetails{top:66px;left:404px;display:flex;flex-direction:column;align-items:center;padding:2px;font-size:13px;background-color:#3e1d11;border-width:2px}.riftBristleWoodsHUD-acolyteChamber-sandDetails{left:188px}.riftBristleWoodsHUD-acolyteChamber-obeliskPercent{margin-left:-2px;font-size:14px;font-weight:400;background-color:#6e460b}.riftBristleWoodsHUD-footer-item-tooltip-baitRow .mousehuntArmNowButton{display:block}.riftBristleWoodsHUD-chamberSpecificText.acolyte_chamber{color:#e8dbb8}a.riftBristleWoodsHUD-acolyteChamber-retreat.mousehuntActionButton.tiny.cancel{margin-top:6px;margin-left:51px;font-size:9px;box-shadow:none;opacity:.8}a.riftBristleWoodsHUD-acolyteChamber-retreat.mousehuntActionButton.tiny.cancel:hover{opacity:1}.riftBristleWoodsHUD-acolyteStats.bronze:after{position:absolute;top:1px;right:40px;width:20px;height:17px;padding:0 5px;content:"";background-color:#4b3d30;background-image:url(https://www.mousehuntgame.com//images/ui/crowns/crown_bronze.png);background-position:center;background-size:cover;border-radius:8px 8px 0 0;box-shadow:0 -1px 0 1px #5b5041}.riftBristleWoodsHUD-acolyteStats{top:-1px;right:0;box-sizing:border-box;padding:0 5px;background-color:#4b3d30;background-blend-mode:multiply;border:1px solid #5b5041;border-bottom:none;border-radius:8px 8px 0 0}.riftBristleWoodsHUD-acolyteStats:before{position:absolute;right:0;bottom:0;left:-1px;height:2px;content:"";background-color:#4b3d30}.mousehuntTooltip .riftBristleWoodsHUD-footer-item-quantity.quantity{top:4px;left:31px;width:33px;border:1px solid #a6a6a6;box-shadow:none}.mousehuntTooltip .riftBristleWoodsHUD-footer-item-tooltip-baitRow-name{margin-left:50px}.mousehuntTooltip .riftBristleWoodsHUD-footer-item-tooltip-baitRow .mousehuntArmNowButton{right:-3px}.riftBristleWoodsHUD-footer-item-image{background-color:#e0cdbd}.riftBristleWoodsHUD-portalEquipment.disabled .riftBristleWoodsHUD-footer-item-quantity{top:27px;padding:0 3px;font-size:9px;opacity:.9}.riftBristleWoodsHUD-portalContainer{margin-top:-1px;border-top:2px solid #5b4d3f;border-top-left-radius:3px;box-shadow:-4px 2px 0 -2px #2e2014,-1px -1px 0 1px #514236}.riftBristleWoodsHUD-chamberDetails{background-color:#312822}.riftBristleWoodsHUD-chamberSpecificText.icebreak_chamber,.riftBristleWoodsHUD-chamberSpecificText.silence_chamber,.riftBristleWoodsHUD-chamberSpecificText.stalker_chamber,.riftBristleWoodsHUD-chamberSpecificText.treasury_chamber,.riftBristleWoodsHUD-chamberSpecificText.lucky_chamber{line-height:2}.riftBristleWoodsHUD-chamberSpecificText.potion_chamber{line-height:1.5}.riftBristleWoodsHUD-chamberDetails-image-padding{margin-right:4px;margin-left:-2px;background-color:#817871;border-color:#d1caaa;border-radius:10px}.riftBristleWoodsHUD-chamberDetails-imageContainer.floatl{margin:0}.riftBristleWoodsHUD-chamberDetails-imageContainer{display:flex;align-items:center;justify-content:space-evenly}.riftBristleWoodsHUD-chamberDetails-image:nth-last-child(3),.riftBristleWoodsHUD-chamberDetails-image:nth-last-child(3)~.riftBristleWoodsHUD-chamberDetails-image{width:auto}a.riftBristleWoodsHUD-portal.timewarp_chamber{filter:drop-shadow(0 1px 4px #fbd400)}.riftBristleWoodsHUD-portal-name span{font-size:11px;text-shadow:0 2px #000}
`;
}
});
var maybeAddUserscriptStyles, rift_bristle_woods_default2, init_rift_bristle_woods2 = __esm({
"src/modules/location-huds/locations/rift-bristle-woods/index.js"() {
init_utils2();
init_styles98();
maybeAddUserscriptStyles = () => {
if (!document.querySelector(".riftBristleWoodsHUD .item_container .item-Btn"))
return;
let userscriptStyles = [
".riftBristleWoodsHUD .item_container, .riftBristleWoodsHUD .charm_container { margin-top: 15px; }",
".riftBristleWoodsHUD { margin-bottom: 30px; }"
].join(`
`);
addStyles(userscriptStyles, "riftBristleWoodsHUD", "mh-improved-rift-bristle-woods-userscript-styles");
}, rift_bristle_woods_default2 = () => {
addHudStyles(styles_default97), setTimeout(() => {
maybeAddUserscriptStyles();
}, 1e3);
};
}
});
var styles_default98, init_styles99 = __esm({
"src/modules/location-huds/locations/rift-burroughs/styles.css"() {
styles_default98 = `.riftBurroughsHud .baitContainer .baitOption .baitQuantity{width:31px;font-size:13px;background-color:#464646;border-radius:7px}.brift-ui .mist-display{position:absolute;top:15px;bottom:10px;left:260px;display:flex;align-items:center;padding:10px;font-size:13px;font-weight:900;cursor:pointer;background-color:#ecf4f5;border-radius:10px;box-shadow:inset 0 0 0 3px #cbdde0,inset 0 0 4px 4px #8d9392,0 2px 6px #5b5d5d}.riftBurroughsHud .mistContainer{width:100px}.brift-ui .mist-display.state-yellow{background:radial-gradient(circle,#fff4a9 10%,#f4e830 50%)}.brift-ui .mist-display.state-green{background:radial-gradient(circle,#abe846 10%,#82d953 50%)}.brift-ui .mist-display.state-red{background:radial-gradient(circle,#ff9a9a 10%,#ff5e5e 50%)}.brift-ui .mouse-list{position:absolute;top:9px;right:20px;bottom:2px;display:flex}.brift-ui .mouse-type{display:flex;flex-direction:column;max-width:100px;padding:4px;margin:0 5px;background-color:#bfced0cf;border-radius:10px;box-shadow:inset 0 0 0 3px #cbdde0,inset 0 0 4px 4px #8d9392,0 2px 6px #5b5d5d}.brift-ui .mouse-type-title{min-width:95px;padding:3px 0;margin:-1px;font-size:12px;color:#d0f0f3;text-align:center;cursor:pointer;background-color:#828282;border-top-left-radius:7px;border-top-right-radius:8px}.brift-ui .mouse-type-mice{display:grid;grid-template-columns:repeat(4,1fr);justify-items:center;margin:3px 0;font-size:6px}.brift-ui .mouse-type-title:hover,.brift-ui .mouse-type-title:focus{color:#b1ed71;cursor:pointer}.brift-ui .mouse-type-mouse{display:block;width:25px;height:25px}.brift-ui img.mouse-type-mouse-image{width:25px;height:25px}.brift-ui .mouse-type-mouse:nth-child(5) .mouse-type-mouse-image{border-bottom-left-radius:4px}.brift-ui .mouse-type-mouse:nth-child(8) .mouse-type-mouse-image{border-bottom-right-radius:4px}.brift-ui .mouse-type-mouse-link{position:relative}.brift-ui .mouse-type-mouse-name{position:absolute;bottom:-30px;left:-25px;z-index:2;display:none;padding:6px;font-size:10px;color:#000;text-align:center;white-space:nowrap;background-color:#fff;border:2px solid #000;border-radius:10px}.brift-ui .mouse-type-mouse-link:hover .mouse-type-mouse-name,.brift-ui .mouse-type-mouse-link:focus .mouse-type-mouse-name{display:block}.brift-ui .mouse-type.active{box-shadow:inset 0 0 0 2px #a7fc32,inset 0 0 4px 4px #8d9392,0 2px 6px #5b5d5d}.brift-ui .mouse-type.active .mouse-type-title{color:#b1ed71}.riftBurroughsHud .baitOption .toolTip .item .itemImage .quantity{font-size:14px;background-color:#ffffffbf}.riftBurroughsHud .baitWarning{top:36px;left:275px;z-index:20;width:280px;padding:5px;font-size:12px;line-height:15px;color:#000;background-color:#ffbfbf;border:1px solid #b60000;border-radius:10px;box-shadow:0 0 10px 3px #4d4a4a}.mist-display:after{position:absolute;right:0;bottom:6px;left:0;font-weight:900;color:#2f3b1c;text-align:center;content:"\\2193"}.is_misting .mist-display:after{top:9px;bottom:unset;content:"\\2191"}.is_misting .mist-display.state-red:after{content:""}.riftBurroughsHud .mistQuantity{left:-7px;font-size:11px;letter-spacing:-1px}.riftBurroughsHud{border-radius:10px;box-shadow:6px 7px 5px -1px #161616}.riftBurroughsHud .mistMeter .mistStatus{top:20px}.riftBurroughsHud .mistMeter .mistWrapper span{filter:hue-rotate(60deg)}.riftBurroughsHud .baitContainer .baitOption .itemImage{background:url(https://www.mousehuntgame.com/images/ui/hud/rift_burroughs/mist_meter.png) -5px -15px no-repeat;box-shadow:inset 0 0 3px #cbdde0}.riftBurroughsHud .baitContainer .baitOption:hover .itemImage{box-shadow:inset 0 0 3px 2px #cbdde0}.riftBurroughsHud .mistCanisters.itemImage{margin-top:-2px;margin-left:-3px}.riftBurroughsHud .mistCanisters.itemImage,.riftBurroughsHud .mistCanisters.itemImage img{width:55px;height:55px;border-radius:3px;box-shadow:inset 0 0 3px #171717}.riftBurroughsHud .mistButton{background:none}.riftBurroughsHud .mistButton:after{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:900;text-shadow:1px 1px #000;text-transform:uppercase;content:"Mist";background:#24cde6;border-radius:3px;box-shadow:inset 0 0 4px 1px #067a90;transition:.15s ease-in}.riftBurroughsHud.is_misting .mistButton:after{letter-spacing:-.25px;content:"Misting";background:#967fbb;box-shadow:inset 0 0 4px 1px #644e88}.riftBurroughsHud .mistButton:hover:after{background:#08adc6;box-shadow:inset 0 0 4px 1px #067a90}.riftBurroughsHud .mistButton:hover{box-shadow:none}
`;
}
});
// dist/data/brift-mice-per-mist-level.json
var brift_mice_per_mist_level_default, init_brift_mice_per_mist_level = __esm({
"dist/data/brift-mice-per-mist-level.json"() {
brift_mice_per_mist_level_default = { tier_0: { string: [{ id: "rift_amplified_brown", name: "Amplified Brown Mouse", image: "9547c50891ce66c00188a0ce278cd9e0.gif" }, { id: "rift_amplified_grey", name: "Amplified Grey Mouse", image: "b6a9a248439e08367139cba601583781.gif" }, { id: "rift_amplified_white", name: "Amplified White Mouse", image: "877fd4f1831f1ffd76e6ab9334e96efc.gif" }, { id: "rift_automated_sentry", name: "Automated Sentry Mouse", image: "d57b33cdbb0d14bb138fe91c166325fa.gif" }, { id: "rift_cybernetic_specialist", name: "Cybernetic Specialist Mouse", image: "5a0d95f2211444717f29f74959b89366.gif" }, { id: "rift_doktor", name: "Doktor Mouse", image: "a44277c1d72f76fb507df2a7a4938542.gif" }, { id: "rift_evil_scientist", name: "Evil Scientist Mouse", image: "fc4030fcea4bb7e0118aa4d46705f37e.gif" }, { id: "rift_portable_generator", name: "Portable Generator Mouse", image: "f0437620c8c86379e6f8fefb9e82d2c3.gif" }, { id: "rift_bio_engineer", name: "Rift Bio Engineer", image: "1d91dc3220b096af75ca0423a77ccc83.gif" }, { id: "rift_surgeon_bot", name: "Surgeon Bot Mouse", image: "6678f8a7003093b081c941a3d571abb8.gif" }], terra: [], polluted: [] }, tier_1: { string: [{ id: "rift_count_vampire", name: "Count Vampire Mouse", image: "851f1d4c760d0f263a38d0fa28bbf2fa.gif" }, { id: "rift_phase_zombie", name: "Phase Zombie", image: "c9675fb32b01e91d43f5ebbbf3bf8f02.gif" }, { id: "rift_prototype", name: "Prototype Mouse", image: "8be0e48b2fa241e65312726433612871.gif" }, { id: "rift_robat", name: "Robat Mouse", image: "fa345c83ff784adfbe79230f279be2c6.gif" }, { id: "rift_tech_ravenous_zombie", name: "Tech Ravenous Zombie", image: "6249796e35d572687db2aa4a4e391335.gif" }], terra: [{ id: "rift_clump", name: "Clump Mouse", image: "a901fe9feea2e04ca1da1a3769dd7f77.gif" }, { id: "rift_cyber_miner", name: "Cyber Miner Mouse", image: "b3768e070c9b40fdfbfef4f39025acc3.gif" }, { id: "rift_itty_bitty_burroughs", name: "Itty Bitty Rifty Burroughs Mouse", image: "723735735fcbc38d75c5d980b454dc4e.gif" }, { id: "rift_pneumatic_dirt_displacement", name: "Pneumatic Dirt Displacement Mouse", image: "70bc4cb7409df8be9e1942e27b75c05f.gif" }, { id: "rift_rifterranian", name: "Rifterranian Mouse", image: "7abd07fac15972db28231f80fd03c075.gif" }], polluted: [{ id: "rift_mecha_tail", name: "Mecha Tail Mouse", image: "e329e623c6ff501d03c7077b8ecfabf9.gif" }, { id: "rift_spore", name: "Radioactive Ooze Mouse", image: "f037c2df0d654caaadfe4c8a58a13431.gif" }, { id: "rift_toxikinetic", name: "Toxikinetic Mouse", image: "bae7062027162025735a5ccbcaf58e5f.gif" }] }, tier_2: { string: [{ id: "rift_count_vampire", name: "Count Vampire Mouse", image: "851f1d4c760d0f263a38d0fa28bbf2fa.gif" }, { id: "rift_lycan", name: "Lycanoid", image: "18c987fe4ec5ee678114cb748dedfb6d.gif" }, { id: "rift_phase_zombie", name: "Phase Zombie", image: "c9675fb32b01e91d43f5ebbbf3bf8f02.gif" }, { id: "rift_prototype", name: "Prototype Mouse", image: "8be0e48b2fa241e65312726433612871.gif" }, { id: "rift_revenant", name: "Revenant Mouse", image: "a0060e929e11030025f6609a5cb81c51.gif" }, { id: "rift_robat", name: "Robat Mouse", image: "fa345c83ff784adfbe79230f279be2c6.gif" }, { id: "rift_tech_ravenous_zombie", name: "Tech Ravenous Zombie", image: "6249796e35d572687db2aa4a4e391335.gif" }, { id: "rift_zombot_unipire", name: "Zombot Unipire the Third", image: "95be1a40ec7cf3868fb9041bf43658a8.gif" }], terra: [{ id: "rift_boulder_biter", name: "Boulder Biter Mouse", image: "7da77ad10f719afce4f17453cb964f40.gif" }, { id: "rift_clump", name: "Clump Mouse", image: "a901fe9feea2e04ca1da1a3769dd7f77.gif" }, { id: "rift_cyber_miner", name: "Cyber Miner Mouse", image: "b3768e070c9b40fdfbfef4f39025acc3.gif" }, { id: "rift_itty_bitty_burroughs", name: "Itty Bitty Rifty Burroughs Mouse", image: "723735735fcbc38d75c5d980b454dc4e.gif" }, { id: "rift_lambent", name: "Lambent Mouse", image: "b301f96263690c2a3dc02a4625aa1c9b.gif" }, { id: "rift_master_exploder", name: "Master Exploder Mouse", image: "6d04a2ec4e21296272e080df7033a29a.gif" }, { id: "rift_pneumatic_dirt_displacement", name: "Pneumatic Dirt Displacement Mouse", image: "70bc4cb7409df8be9e1942e27b75c05f.gif" }, { id: "rift_rifterranian", name: "Rifterranian Mouse", image: "7abd07fac15972db28231f80fd03c075.gif" }], polluted: [{ id: "rift_mecha_tail", name: "Mecha Tail Mouse", image: "e329e623c6ff501d03c7077b8ecfabf9.gif" }, { id: "rift_spore", name: "Radioactive Ooze Mouse", image: "f037c2df0d654caaadfe4c8a58a13431.gif" }, { id: "rift_rancid_bog_beast", name: "Rancid Bog Beast Mouse", image: "5a7f8551ed42a6344e7948b18687e97d.gif" }, { id: "rift_radioactive_gold", name: "Super Mega Mecha Ultra RoboGold Mouse", image: "022763eaba9d7f6fdbd5cddb3813d6b8.gif" }, { id: "rift_toxic_avenger", name: "Toxic Avenger Mouse", image: "74891cb924851366d67a3632ed56fa6b.gif" }, { id: "rift_toxikinetic", name: "Toxikinetic Mouse", image: "bae7062027162025735a5ccbcaf58e5f.gif" }] }, tier_3: { string: [{ id: "rift_monstrous_abomination", name: "Monstrous Abomination Mouse", image: "12dc2f226fd5e26144deb154d293e6db.gif" }], terra: [{ id: "rift_big_bad_burroughs", name: "Big Bad Behemoth Burroughs Mouse", image: "dfb15f35c1fe4bb07e2b276071a7c439.gif" }], polluted: [{ id: "rift_assassin_beast", name: "Assassin Beast Mouse", image: "ddb77d3c8cad610f4270f6d1b401602c.gif" }, { id: "rift_menace", name: "Menace of the Rift Mouse", image: "a286833ada1c4718096e30db734514a2.gif" }, { id: "rift_plutonium_tentacle", name: "Plutonium Tentacle Mouse", image: "97c996e63dab24de6ed6a089f318012e.gif" }, { id: "rift_rancid_bog_beast", name: "Rancid Bog Beast Mouse", image: "5a7f8551ed42a6344e7948b18687e97d.gif" }, { id: "rift_radioactive_gold", name: "Super Mega Mecha Ultra RoboGold Mouse", image: "022763eaba9d7f6fdbd5cddb3813d6b8.gif" }, { id: "rift_toxic_avenger", name: "Toxic Avenger Mouse", image: "74891cb924851366d67a3632ed56fa6b.gif" }] } };
}
});
var makeMiceList, hud4, rift_burroughs_default2, init_rift_burroughs2 = __esm({
"src/modules/location-huds/locations/rift-burroughs/index.js"() {
init_utils2();
init_styles99();
init_brift_mice_per_mist_level();
makeMiceList = (type2, title, mice, currentType, appendTo) => {
let wrapper = makeElement("div", ["mouse-type", type2]);
currentType === type2 && wrapper.classList.add("active");
let mTitle = makeElement("a", "mouse-type-title", title);
mTitle.addEventListener("click", () => {
let id = 1426;
type2 === "terra" ? id = 1551 : type2 === "polluted" && (id = 1550), hg.utils.TrapControl.setBait(id), hg.utils.TrapControl.go();
}), wrapper.append(mTitle);
let miceWrapper = makeElement("div", "mouse-type-mice");
return mice.forEach((mouse) => {
let mouseWrapper = makeElement("div", "mouse-type-mouse"), mouseLink = makeElement("a", "mouse-type-mouse-link");
mouseLink.addEventListener("click", (e) => {
hg.views.MouseView.show(mouse.id), e.preventDefault();
});
let mouseImage = makeElement("img", "mouse-type-mouse-image");
mouseImage.src = `https://www.mousehuntgame.com/images/mice/thumb/${mouse.image}`, mouseLink.append(mouseImage), makeElement("div", "mouse-type-mouse-name", mouse.name, mouseLink), mouseWrapper.append(mouseLink), miceWrapper.append(mouseWrapper);
}), wrapper.append(miceWrapper), appendTo.append(wrapper), wrapper;
}, hud4 = () => {
var _a;
if (!((_a = user == null ? void 0 : user.quests) != null && _a.QuestRiftBurroughs))
return;
let quest = user.quests.QuestRiftBurroughs, armedBait = (quest == null ? void 0 : quest.armed_bait) || "disarmed", mistLevel = (quest == null ? void 0 : quest.mist_released) || 0, mistTier = (quest == null ? void 0 : quest.mist_tier) || "tier_0", hudEl = document.querySelector("#hudLocationContent .riftBurroughsHud");
if (!hudEl)
return;
let color = "yellow";
mistLevel >= 6 && (color = "green"), mistLevel >= 19 && (color = "red");
let existing = document.querySelector(".brift-ui");
existing && existing.remove();
let wrapper = makeElement("div", ["brift-ui"]), mist = makeElement("div", ["mist-display", `state-${color}`], `${mistLevel} / 20 `);
mist.addEventListener("click", (e) => {
hg.views.HeadsUpDisplayRiftBurroughsView.toggleMist(e.target);
}), wrapper.append(mist);
let availableMice = brift_mice_per_mist_level_default[mistTier], mouseWrapper = makeElement("div", "mouse-list"), currentType = null;
switch (armedBait) {
case "brie_string_cheese":
case "marble_string_cheese":
case "magical_string_cheese":
currentType = "string";
break;
case "polluted_parmesan_cheese":
currentType = "polluted";
break;
case "terre_ricotta_cheese":
currentType = "terra";
break;
}
makeMiceList("string", "Magical String", availableMice.string, currentType, mouseWrapper), makeMiceList("terra", "Terra Ricotta", availableMice.terra, currentType, mouseWrapper), makeMiceList("polluted", "Polluted Parm.", availableMice.polluted, currentType, mouseWrapper), wrapper.append(mouseWrapper), hudEl.append(wrapper);
}, rift_burroughs_default2 = () => __async(void 0, null, function* () {
addHudStyles(styles_default98), hud4(), onRequest("*", hud4);
});
}
});
var styles_default99, init_styles100 = __esm({
"src/modules/location-huds/locations/rift-furoma/styles.css"() {
styles_default99 = `.riftFuromaHUD-battery-energyRemaining{top:22px;right:1px;left:1px;width:auto;font-size:11px;font-style:normal;color:#fff;background-color:#8caaaabf;border:1px solid #535757;border-radius:1px}.riftFuromaHUD-itemGroup-activeItem .quantity{padding:1px 2px;font-size:12px;font-weight:400;background-color:#dadada}.riftFuromaHUD-battery-energyTotal{font-size:10px;color:#e0e0e0}.riftFuromaHUD-droid-details .riftFuromaHUD-chargeLevel-stat-value{text-shadow:1px 1px 1px #000,0 0 2px #000}.riftFuromaHUD-droid-image{transition:all .5s}.riftFuromaHUD-droid-image:hover{filter:brightness(1.3)}.riftFuromaHUD-battery-image:hover,.riftFuromaHUD-itemGroup.can_craft .riftFuromaHUD-itemGroup-craftButton:hover{filter:brightness(1.2)}.riftFuromaHUD-chargeLevel-stat.luck .riftFuromaHUD-chargeLevel-stat-label,.riftFuromaHUD-chargeLevel-stat.power .riftFuromaHUD-chargeLevel-stat-label{padding-bottom:2px;margin-left:-8px}span.riftFuromaHUD-craftingPopup-recipe-part-quantity,.riftFuromaHUD-craftingPopup-recipe-part-padding span.quantity{font-size:12px}a.riftFuromaHUD-battery.hidden{display:inline-block}a.riftFuromaHUD-battery:before{position:absolute;top:10px;right:0;left:0;z-index:1;font-size:9px;color:#073833;text-align:center}a.riftFuromaHUD-battery.hidden:before{display:none}a.riftFuromaHUD-battery.disabled:before{color:#97a8a6}a.riftFuromaHUD-battery[data-type=charge_level_one]:before{right:6px;left:5px;content:"1"}a.riftFuromaHUD-battery[data-type=charge_level_two]:before{right:6px;left:7px;content:"2"}a.riftFuromaHUD-battery[data-type=charge_level_three]:before{right:6px;left:8px;content:"3"}a.riftFuromaHUD-battery[data-type=charge_level_four]:before{right:8px;left:11px;content:"4"}a.riftFuromaHUD-battery[data-type=charge_level_five]:before{right:9px;left:12px;content:"5"}a.riftFuromaHUD-battery[data-type=charge_level_six]:before{right:9px;left:14px;content:"6"}a.riftFuromaHUD-battery[data-type=charge_level_seven]:before{right:11px;left:16px;content:"7"}a.riftFuromaHUD-battery[data-type=charge_level_eight]:before{right:12px;left:18px;content:"8"}a.riftFuromaHUD-battery[data-type=charge_level_nine]:before{right:12px;left:20px;content:"9"}a.riftFuromaHUD-battery[data-type=charge_level_ten]:before{right:12px;left:24px;content:"10"}.riftFuromaHUD-battery.locked .riftFuromaHUD-battery-progressContainer{background:transparent;box-shadow:none}.riftFuromaHUD-battery-image{transform:none}.riftFuromaHUD-chargeLevel-stat-label.riftFuromaHUD-chargeLevel-stat-label-meowth-furoma-calc,.riftFuromaHUD-chargeLevel-stat-value.riftFuromaHUD-chargeLevel-stat-value-meowth-furoma-calc{display:none}.riftFuromaHUD-droid-details .riftFuromaHUD-chargeLevel-stat.droid_energy .riftFuromaHUD-chargeLevel-stat-label{padding-top:0;margin-right:-5px;margin-left:-5px;font-size:7.5px}.riftFuromaHUD-droid-details .riftFuromaHUD-chargeLevel-stat.droid_energy .riftFuromaHUD-chargeLevel-stat-value{min-height:18px;padding-top:2px}.riftFuromaHUD-chargeLevel-stat.droid_energy{padding-top:1px}.mh-improved-recall{margin-right:-5px;margin-left:-6px;border-top:2px solid #6f7374}.mh-improved-riftFuromaHUD-leavePagoda-amount{position:absolute;top:13px;right:0;left:0;padding:1px 1px 5px;font-size:11px;color:#39e4eb;text-align:center;background-color:#333;border-radius:0 0 5px 5px;box-shadow:0 1px 3px -1px #3a3a3a}.riftFuromaHUD-leavePagoda:hover,.riftFuromaHUD-leavePagoda:hover .mh-improved-riftFuromaHUD-leavePagoda-amount{background-color:#1b1b1b}.riftFuromaHUD-leavePagoda{border-bottom-right-radius:0;border-bottom-left-radius:0}.riftFuromaHUD-item .itemImage{background-color:#fff}.riftFuromaHUD-craftingPopup-recipe-actionGroup{box-shadow:8px 5px 21px -3px #fff inset,1px 0 1px -1px #000}.riftFuromaHUD-craftingPopup-subtabHeader.can_craft .riftFuromaHUD-craftingPopup-subtabHeader-padding:before{display:none}.riftFuromaHUD-craftingPopup-subtabHeader.can_craft .riftFuromaHUD-craftingPopup-subtabHeader-padding{background-color:#00acc7}.riftFuromaHUD-craftingPopup-subtabHeader.can_craft.active .riftFuromaHUD-craftingPopup-subtabHeader-padding{background-color:#51dff5}.riftFuromaHUD-craftingPopup-recipe-actionGroup:first-child{margin-left:5px}
`;
}
});
var getEnergyStats, addRecallCaclulation, rift_furoma_default2, init_rift_furoma2 = __esm({
"src/modules/location-huds/locations/rift-furoma/index.js"() {
init_utils2();
init_styles100();
getEnergyStats = () => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
let droid = Number.parseInt(`${((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRiftFuroma) == null ? void 0 : _b.droid) == null ? void 0 : _c.remaining_energy) || 0}`.replaceAll(",", "")), lost = Number.parseInt(`${((_f = (_e = (_d = user == null ? void 0 : user.quests) == null ? void 0 : _d.QuestRiftFuroma) == null ? void 0 : _e.droid) == null ? void 0 : _f.energy_lost) || 0}`.replaceAll(",", "")), recall = Math.floor((droid - lost) / 2), energy = Number.parseInt(`${((_j = (_i = (_h = (_g = user == null ? void 0 : user.quests) == null ? void 0 : _g.QuestRiftFuroma) == null ? void 0 : _h.items) == null ? void 0 : _i.combat_energy_stat_item) == null ? void 0 : _j.quantity) || 0}`.replaceAll(",", ""));
return {
droid,
lost,
recall,
energy,
afterRecall: energy + recall
};
}, addRecallCaclulation = () => {
let { recall, afterRecall } = getEnergyStats(), statBlocks = document.querySelector(".riftFuromaHUD-droid-details .riftFuromaHUD-chargeLevel-stat.droid_energy");
if (statBlocks) {
let existingRecall = document.querySelector(".mh-improved-recall"), afterRecallEl = makeElement("div", "mh-improved-recall");
if (user.quests.QuestRiftFuroma.droid.remaining_energy === "---") {
existingRecall && existingRecall.remove(), afterRecallEl && afterRecallEl.remove();
return;
}
makeElement("div", "riftFuromaHUD-chargeLevel-stat-label", "After Recall", afterRecallEl), makeElement("div", "riftFuromaHUD-chargeLevel-stat-value", afterRecall.toLocaleString(), afterRecallEl), existingRecall ? existingRecall.replaceWith(afterRecallEl) : statBlocks.append(afterRecallEl);
}
let leave = document.querySelector(".riftFuromaHUD-leavePagoda");
if (leave) {
let existing = document.querySelector(".mh-improved-riftFuromaHUD-leavePagoda-amount"), amountEl = makeElement("div", "mh-improved-riftFuromaHUD-leavePagoda-amount", `+ ${recall.toLocaleString()}`);
existing ? existing.replaceWith(amountEl) : leave.append(amountEl);
}
}, rift_furoma_default2 = () => __async(void 0, null, function* () {
addHudStyles(styles_default99), addRecallCaclulation(), onTurn(addRecallCaclulation);
});
}
});
var styles_default100, init_styles101 = __esm({
"src/modules/location-huds/locations/rift-gnawnia/styles.css"() {
styles_default100 = `.riftGnawniaHud:hover .riftGnawniaHud-targetsBackground,.riftGnawniaHud:focus .riftGnawniaHud-targetsBackground,.riftGnawniaHud:active .riftGnawniaHud-targetsBackground{filter:hue-rotate(-40deg)}.riftGnawniaHud-targetsBackground{transition:.5s}.riftGnawniaHud-targets .mousehuntTooltip{inset:0 34px 0 -5px;display:flex;align-items:center;width:auto;font-size:11px;text-align:center;background-color:#d6e8e4;border:1px solid #29c7cb;opacity:.9}.riftGnawniaHud-targets.mousehuntTooltipParent:hover .mousehuntTooltip{display:flex}.riftGnawniaHud-targets{right:-10px}.riftGnawniaHud-targets .mousehuntTooltip .mousehuntTooltip-arrow{display:none}.riftGnawniaHud .riftGnawniaHud-stringBait>.itemImage,.riftGnawniaHud .riftGnawniaHud-potion>.itemImage,.riftGnawniaHud .riftGnawniaHud-craftingBait>.itemImage{background-color:#a39d99}.riftGnawniaHud .mousehuntTooltip.top{width:280px;min-height:40px}.riftGnawniaHud .riftGnawniaHud-tooltip-content{margin-right:0}.riftGnawniaHud .riftGnawniaHud-stringBait.mousehuntTooltipParent:hover .mousehuntTooltip,.riftGnawniaHud .riftGnawniaHud-potion.mousehuntTooltipParent:hover .mousehuntTooltip,.riftGnawniaHud .riftGnawniaHud-craftingBait.mousehuntTooltipParent:hover .mousehuntTooltip{display:grid;grid-template-columns:1fr 1fr;place-items:center stretch}.riftGnawniaHud .mousehuntTooltipParent:hover .mousehuntTooltip .riftGnawniaHud-tooltip-result{position:relative;bottom:0;display:flex;align-items:center;justify-content:center;width:100%}.riftGnawniaHud-tooltip-quantity{box-sizing:border-box;width:50px;padding:2px}.riftGnawniaHud-label{text-shadow:1px 1px #333,0 0 1px #333,-1px 0 1px #333}.riftGnawniaHud-button{padding:5px;font-size:1.1em}
`;
}
});
var rift_gnawnia_default, init_rift_gnawnia = __esm({
"src/modules/location-huds/locations/rift-gnawnia/index.js"() {
init_utils2();
init_styles101();
rift_gnawnia_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default100);
});
}
});
var flipped_avatar_default, init_flipped_avatar = __esm({
"src/modules/location-huds/locations/rift-valour/flipped-avatar.css"() {
flipped_avatar_default = `.valourRiftHUD-tower-sprite.player .valourRiftHUD-tower-sprite-image{transform:scaleX(-1)}.valourRiftHUD-tower-sprite.player.flipped .valourRiftHUD-tower-sprite-image{transform:scaleX(1)}.valourRiftHUD-tower-sprite.player:hover .valourRiftHUD-tower-sprite-image{transform:scaleX(-1.5) scaleY(1.5)}.valourRiftHUD-tower-sprite.player.flipped:hover .valourRiftHUD-tower-sprite-image{transform:scaleX(1.5) scaleY(1.5)}
`;
}
});
var styles_default101, init_styles102 = __esm({
"src/modules/location-huds/locations/rift-valour/styles.css"() {
styles_default101 = `#overlayPopup.mh-vrift-popup .jsDialogContainer{background:linear-gradient(#20216f,#703271,#20216f);outline:1px solid #20216f}#overlayPopup.mh-vrift-popup .title{padding:10px;font-size:18px;color:#fff}.mh-vrift-sim-results{display:grid;grid-template-columns:70% 30%;margin:0 1em;color:#fff}.mh-vrift-sim-results .stats{display:grid;grid-template-columns:repeat(2,1fr);grid-row-gap:1rem;margin-bottom:2em}.mh-vrift-sim-results .result{display:flex;place-content:center space-between}.mh-vrift-sim-results .label{width:100%;padding-left:10px;font-size:13px;line-height:30px;color:#eaeaea;vertical-align:middle;background-color:#c3c3c31a;border-radius:5px}.mh-vrift-sim-results .value{position:relative;left:-25px;width:35px;font-size:14px;line-height:30px;color:#eaeaea;text-align:center;background:linear-gradient(#07041d,#4d3bac);border:1px solid #6d86de;border-radius:5px}.mh-vrift-sim-results .eclipses{padding:10px;margin-bottom:2em;font-size:13px;background-color:#c3c3c31a;border-radius:5px}.mh-vrift-sim-results .eclipses h3{padding-bottom:11px;font-size:16px;color:#fff}.mh-vrift-sim-results .eclipses .header{padding-bottom:3px;margin-bottom:10px;font-size:12px;line-height:unset;color:#afafafd9;border-bottom:1px solid rgb(175 175 175 / 85%)}.mh-vrift-sim-results .eclipses li{display:flex;justify-content:space-between;line-height:24px;text-align:right}.mh-vrift-sim-results .eclipses .guaranteed{color:#80e472}.mh-vrift-sim-results .number{text-align:left}.valourRiftHUD-dialog-inventory-item-quantity.quantity{min-width:30px;font-size:12px;font-weight:900;line-height:20px;text-align:center;text-shadow:none;background-color:#282659;box-shadow:none}.valourRiftHUD-dialog-inventory-item-name{text-align:center}.valourRiftHUD-towerUpgradeLevel-costTotal{font-size:14px}span.valourRiftHUD-towerUpgrade-currentValue{font-size:13px;font-weight:900;line-height:19px;color:#fff;background-color:#282659}.valourRiftHUD-towerUpgrade-currentValueContainer{display:block;line-height:20px;vertical-align:middle}.valourRiftHUD-towerUpgrade-header-title{padding:10px;font-size:15px}.valourRiftHUD-towerUpgrade-header{display:grid;grid-template-columns:150px 1fr;place-items:center stretch}.valourRiftHUD-towerUpgrade-content{padding:10px}.valourRiftHUD-powerUp.canUpgrade:after{top:6px;left:13px;filter:drop-shadow(1px 4px 6px #40f5ff) hue-rotate(73deg);box-shadow:0 0 6px 3px #2d9ba2}.valourRiftHUD-powerUp-level span{margin-left:-1px;border-radius:0}.valourRiftHUD-powerUp-level:first-child span{border-top-left-radius:5px;border-bottom-left-radius:5px}.valourRiftHUD-powerUp-level:last-child span{border-top-right-radius:5px;border-bottom-right-radius:5px}.valourRiftHUD-powerUp-currentLevel{top:9px;right:8px;width:23px;padding:2px;font-size:15px;line-height:27px;color:#fff;background:radial-gradient(circle,#4d3bac,#1a115b);border:none;border-radius:10px 15px 15px 10px;box-shadow:inset 0 0 2px 1px #171717}.valourRiftHUD-powerUp.hunt_limit .valourRiftHUD-powerUp-currentLevel{font-size:11px}.valourRiftHUD-gauntletBait-quantity.quantity{top:45px;font-size:13px;font-weight:900}.valourRiftHUD-towerLoot-quantity.quantity{font-size:12px;font-weight:900}.valourRiftHUD-bait-quantity.quantity{width:60px;font-size:13px;line-height:18px}.valourRiftHUD-crafting-quantity.quantity{width:42px;font-size:12px}.valourRiftHUD-fuelContainer-quantity.quantity{z-index:1;padding:1px 2px;margin-top:-7px;margin-right:-3px;font-size:14px;background-color:#281c55;border:1px solid #7db4dc;box-shadow:0 0 0 1px #7eaacd}.valourRiftHUD-fuelContainer-buyButton{top:-4px;left:98px}.valourRiftHUD-previewTower{top:45px;left:580px;filter:grayscale(1);opacity:.6}.valourRiftHUD-previewTower.mh-vrift-sim-link{top:43px;left:550px;width:21px;height:21px;color:transparent;background-image:url(https://i.mouse.rip/mh-improved/sim.png);filter:grayscale(1);opacity:.4}.valourRiftHUD-previewTower.mh-vrift-sim-link:hover{opacity:.8}span.valourRiftHUD-huntsRemaining-value{margin-right:5px;font-size:15px;font-weight:900;line-height:14px}span.valourRiftHUD-stepsTaken-value{font-size:13px;font-weight:900;color:#2d2964}#mh-vrift-floor-name{position:absolute;top:2px;right:25px;left:25px;z-index:1;height:20px;font-family:Rockwell,Rockwell Nova,Roboto Slab,"DejaVu Serif",Sitka Small,serif;font-size:21px;font-variant:petite-caps;color:#ebfffd;text-shadow:0 0 1px #62fff3;background-color:#231857;opacity:0;transition:opacity .2s ease-in-out;-webkit-text-stroke:1px #4fc5bc}.valourRiftHUD-currentFloor:hover #mh-vrift-floor-name,.valourRiftHUD-state.tower:hover #mh-vrift-floor-name,.valourRiftHUD-currentFloor:focus #mh-vrift-floor-name,.valourRiftHUD-state.tower:focus #mh-vrift-floor-name{opacity:1}.bottom.mh-vrift-floor-tooltip{right:-60px;bottom:-40px;left:-70px;font-size:11px}.bottom.mh-vrift-floor-tooltip .mousehuntTooltip-arrow{display:none}.valourRiftHUD-stepsTaken .mousehuntTooltip{top:-5px;left:107%;width:auto;min-width:170px}.valourRiftHUD-huntsRemaining .mousehuntTooltip{top:5px;left:105%;width:auto;min-width:335px}.valourRiftPopupClaim-lootLog-name{font-size:12px}.valourRiftPopup-towerStat .valourRiftPopup-label{font-size:14px}.valourRiftPopupClaim-stats-content{display:grid;grid-template-columns:repeat(3,1fr);place-items:center center;padding:5px 0 5px 15px;margin:20px;text-align:unset}.valourRiftPopup-towerStat .valourRiftPopup-value{font-size:25px;line-height:30px}.valourRiftPopup-towerStat{display:flex;flex-flow:column;align-items:center;justify-content:center;width:auto;text-align:center}.valourRiftPopup-towerStat.wide{width:unset}.valourRiftPopup-towerStat:last-child{margin-right:-110px}.valourRiftPopupClaim-cacheLoot-image,.valourRiftPopupClaim-lootLog .itemImage{box-shadow:none}.valourRiftPopupClaim-footer{margin-top:-40px}.valourRiftPopupClaim-chest-floor{filter:drop-shadow(0 0 5px #fee198)}.valourRiftPopupClaim-cacheLoot.robbery_slot_a .valourRiftPopupClaim-cacheLoot-image{filter:drop-shadow(0 5px 10px #fe8f21);box-shadow:none}.valourRiftPopupClaim-cacheLoot.research_slot_b .valourRiftPopupClaim-cacheLoot-image{filter:drop-shadow(0 5px 10px #28a938);box-shadow:none}.valourRiftPopupClaim-cacheLoot .mousehuntTooltip .mousehuntTooltip-arrow,.valourRiftPopupClaim-cacheLoot.robbery_slot_a .mousehuntTooltip:after,.valourRiftPopupClaim-cacheLoot.research_slot_b .mousehuntTooltip:after{display:none}.valourRiftPopupClaim-cacheLoot.robbery_slot_a .valourRiftPopupClaim-cacheLoot-image:before,.valourRiftPopupClaim-cacheLoot.research_slot_b .valourRiftPopupClaim-cacheLoot-image:before{top:unset;right:-2px;bottom:0;width:30px;height:30px;content:""}.valourRiftPopupClaim-lootLogTitle{color:#462605}.valourRiftPopupClaim-newFloorRecord{grid-column:span 3}.valourRiftPopupIllustrated-inventoryCostContainer{right:0;left:80px;width:352px;font-size:12px;font-weight:400;line-height:14px;text-align:center}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-highestFloor{font-size:12px;font-weight:900;color:#f2bc7d}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-highestFloorReachedContainer{top:72px;right:69px;display:flex;padding:3px 6px;background-color:#3f354d;border:1px solid #2f283a;border-radius:4px}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-augmentation-description{display:flex;font-size:12px;font-style:normal;line-height:13px}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-augmentation-cost-quantity{margin-top:3px;margin-left:-14px;font-size:14px;box-shadow:1px -4px 2px #310f3c inset,0 0 3px 3px #b06fd3 inset}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-augmentation-cost-image{background-color:#c7c8c6;background-position:-1px -1px}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-augmentation-cost.error .valourRiftHUD-augmentation-cost-quantity{color:#ccc;background-color:#744444}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-augmentation-cost.error .valourRiftHUD-augmentation-cost-image{filter:grayscale(1);box-shadow:0 0 2px 2px #744444}.valourRiftPopupIllustrated.enterTower a[data-type=tu] .valourRiftHUD-augmentation-description{font-size:10px;line-height:10px}.valourRiftPopupIllustrated.enterTower a.valourRiftHUD-augmentation.locked{filter:grayscale(.8) opacity(.6)}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-dialog-inventory-item-name{padding-right:6px;font-size:12px;line-height:12px}.valourRiftHUD-tower .valourRiftHUD-tower-sprite-name,.valourRiftHUD-tower .valourRiftHUD-tower-sprite.step,.valourRiftHUD-tower .valourRiftHUD-tower-sprite.player,.valourRiftHUD-tower .valourRiftHUD-tower-sprite.floor .valourRiftHUD-tower-sprite-image:before{opacity:1;transition:opacity .4s ease-in-out}.valourRiftHUD-tower:hover .valourRiftHUD-tower-sprite.step,.valourRiftHUD-tower:hover .valourRiftHUD-tower-sprite.player,.valourRiftHUD-tower:hover .valourRiftHUD-tower-sprite.floor .valourRiftHUD-tower-sprite-image:before{opacity:.4}.valourRiftHUD-tower:hover .valourRiftHUD-tower-sprite.player:hover{opacity:1}.valourRiftHUD-tower-sprite.floor .valourRiftHUD-tower-sprite-name{font-size:11px;mix-blend-mode:hard-light}.valourRiftHUD.tower .valourRiftHUD-huntsRemaining .valourRiftHUD-state.tower,.valourRiftHUD.tower .valourRiftHUD-stepsTaken .valourRiftHUD-state.tower{display:flex;gap:5px;align-items:center;justify-content:flex-end}.valourRiftHUD.tower .valourRiftHUD-state.tower{font-size:10px}.valourRiftHUD-powerUp .valourRiftHUD-powerUpIcon{top:2px;left:2px;width:44px;height:45px}.valourRiftHUD-powerUp-title{margin-top:-3px;margin-left:2px;font-size:13px}a.valourRiftHUD-gauntletBait-image{background-color:#694481;outline:1px solid #564065}a.valourRiftHUD-bait-image{background-color:#6d90de;outline:2px solid #4f71bc;box-shadow:0 0 0 2px #5071bc}.valourRiftHUD-towerLoot-thumb:hover{transform:scale(2.2)}.valourRiftHUD-towerLoot-thumb{background-size:80%;transition:.2s ease-in;transform:scale(1.7)}a.valourRiftHUD-gauntletBait-image.active{filter:drop-shadow(0 5px 5px #68b868)}.floor_8 .valourRiftHUD-currentFloor{filter:hue-rotate(125deg);mix-blend-mode:color-dodge}.floor_8 .valourRiftHUD-floorProgress-barContainer{filter:hue-rotate(110deg)}.eclipse.floor_8 .valourRiftHUD-floorProgress-barContainer{filter:brightness(1.2);animation:fortRoxlairPulse 2s 3}.valourRiftHUD-tower-sprite.floor_8 .valourRiftHUD-tower-sprite-image{filter:saturate(1.2);box-shadow:inset 0 10px 25px 5px #000}.valourRiftHUD-floorProgress-boss{top:-2px;z-index:2;width:32px;height:32px;border-radius:3px;outline:2px solid #6c87be;box-shadow:0 0 2px 2px #231855}.mh-improved-player-spin{animation:mh-improved-spin .7s linear 1}.flipped .mh-improved-player-spin{animation:mh-improved-spin-flipped .7s linear 1}.mh-improved-player-spin.mh-improved-player-large{animation:mh-improved-spin-large .7s linear 1}.flipped .mh-improved-player-spin.mh-improved-player-large{animation:mh-improved-spin-large-flipped .7s linear 1}@media (prefers-reduced-motion: reduce){.eclipse.floor_8 .valourRiftHUD-floorProgress-barContainer,.mh-improved-player-spin,.mh-improved-player-spin.mh-improved-player-large,.flipped .mh-improved-player-spin,.flipped .mh-improved-player-spin.mh-improved-player-large{animation:none}}.valourRiftHUD-crafting-image{background-position:center;background-size:120%}.valourRiftHUD-tower-sprite.player .valourRiftHUD-tower-sprite-image.mh-improved-player-large{transform:scale(2)}.valourRiftHUD-tower-sprite.player.flipped .valourRiftHUD-tower-sprite-image.mh-improved-player-large{transform:scale(-2,2)}.valourRiftHUD{z-index:1;filter:drop-shadow(0 2px 1px #25266a)}.valourRiftHUD.tower .valourRiftHUD-huntsRemaining .valourRiftHUD-state.tower{gap:0;margin-right:-3px}.valourRiftHUD-fuelContainer-armButton{font-size:12px}.valourRiftHUD-warningContainer.active.hidden,.valourRiftHUD-powerTypeWarning.active.hidden{display:none}.uc-text-highlight,.valourRiftHUD-powerUp-currentLevel.uc-text-highlight{color:#90ffe1}.valourRiftHUD-towerUpgrade-allLevels{outline:1px solid #333}.valourRiftHUD-towerUpgrade-level.active{border-right:1px solid #333}.valourRiftHUD-towerUpgrade-level.active:last-of-type{border:none}a.valourRiftHUD-dialog-closeButton{padding:5px 9px}
`;
}
});
function getCacheLoot(floor) {
let idx = floor > 1 ? floor - 1 : 0;
return idx >= cacheLoot.length && (idx = cacheLoot.length - 1), cacheLoot[idx];
}
function convertToCR(power, luck, stats) {
let mPower = stats[0], mEff = stats[1];
return Math.min(1, (power * mEff + 2 * Math.pow(luck * Math.min(mEff, 1.4), 2)) / (mPower + power * mEff));
}
function simulate(shouldDisplay = !0) {
let time = Date.now() / 1e3, lvSpeed = window.user.enviroment_atts.power_up_data.long_stride.current_value, lvSync = window.user.enviroment_atts.power_up_data.hunt_limit.current_level + 1, lvSiphon = window.user.enviroment_atts.power_up_data.boss_extension.current_level + 1, siphon = window.user.enviroment_atts.power_up_data.boss_extension.current_value, sync = window.user.enviroment_atts.hunts_remaining, steps = window.user.enviroment_atts.current_step, torchState = window.user.enviroment_atts.is_fuel_enabled, torchEclipse = !0, umbra = window.user.enviroment_atts.active_augmentations.tu, superSiphon = window.user.enviroment_atts.active_augmentations.ss, strStep = window.user.enviroment_atts.active_augmentations.sste, curFloor = window.user.enviroment_atts.floor, sh = window.user.enviroment_atts.active_augmentations.hr, sr = window.user.enviroment_atts.active_augmentations.sr, bail = 999, power = window.user.trap_power, luck = window.user.trinket_name == "Ultimate Charm" ? 1e5 : window.user.trap_luck;
try {
let altpower = Number(document.querySelectorAll(".campPage-trap-trapStat.power")[0].children[1].innerText.match(/\d/g).join("")), altluck = Number(document.querySelectorAll(".campPage-trap-trapStat.luck")[0].children[1].innerText);
power = Number.isNaN(altpower) ? power : Math.max(power, altpower), luck = Number.isNaN(altluck) ? luck : Math.max(luck, altluck);
} catch (error) {
console.log(error);
}
let mouseCR = mouseStats.map(function(stats) {
return convertToCR(power, luck, stats);
}), mouseAR = umbra ? umbraAR : normalAR, eclipseCR = umbra ? mouseCR[17] : mouseCR[9], eclipseSG = umbra ? mouseDrops[17][0] : mouseDrops[9][0], eclipseSC = umbra ? mouseDrops[17][2] : mouseDrops[9][2], eclipseGold = umbra ? mouseDrops[17][4] : mouseDrops[9][4], catchProfile = {
push: [eclipseCR],
ta: [0],
kb: [1 - eclipseCR],
bkb: [0],
fta: [0],
sg: [eclipseSG * eclipseCR],
sgi: [0],
sc: [eclipseSC * eclipseCR],
sci: [0],
gold: [eclipseGold * eclipseCR],
cf: [0]
};
for (var j = 1; j <= 4; j++)
catchProfile.ta[j] = mouseCR[24] * mouseAR[24][j - 1], catchProfile.bkb[j] = (1 - mouseCR[25]) * mouseAR[25][j - 1], catchProfile.fta[j] = 0, catchProfile.sg[j] = 0, catchProfile.sgi[j] = 0, catchProfile.sc[j] = 0, catchProfile.sci[j] = 0, catchProfile.gold[j] = 0, catchProfile.cf[j] = 0, catchProfile.push[j] = -catchProfile.ta[j], mouseCR.map(function(cr, index) {
catchProfile.push[j] += cr * mouseAR[index][j - 1], catchProfile.sg[j] += cr * mouseAR[index][j - 1] * mouseDrops[index][0], catchProfile.sgi[j] += cr * mouseAR[index][j - 1] * mouseDrops[index][1], catchProfile.sc[j] += cr * mouseAR[index][j - 1] * mouseDrops[index][2], catchProfile.sci[j] += cr * mouseAR[index][j - 1] * mouseDrops[index][3], catchProfile.gold[j] += cr * mouseAR[index][j - 1] * mouseDrops[index][4];
}), catchProfile.kb[j] = 1 - catchProfile.ta[j] - catchProfile.bkb[j] - catchProfile.push[j];
console.log(catchProfile);
let speed = torchState ? Number(lvSpeed) + 1 : lvSpeed;
siphon = superSiphon ? siphon * 2 : siphon;
let sigils = 0, secrets = 0, gold = 0, cfDrops = 0, totalHunts = 0, catches = 0;
function addRate(step2, hunts, change) {
runValues[step2] == null && (runValues[step2] = []), runValues[step2][hunts] == null && (runValues[step2][hunts] = 0), runValues[step2][hunts] += change;
}
function stepBuild(step2) {
stepDetails[step2] = {};
let lap = Math.floor(Math.pow(step2 / 35 + 2809 / 1225, 0.5) - 53 / 35) + 1, checkLap = Math.floor(Math.pow((step2 + 1) / 35 + 2809 / 1225, 0.5) - 53 / 35) + 1, toEC = checkLap * (106 + 35 * checkLap) - 1, floorLength = 10 * (lap + 1), onEC = lap * (106 + 35 * lap) - 1, flFromEC = Math.ceil((onEC - step2) / floorLength), floorStart = onEC - flFromEC * floorLength;
stepDetails[step2].floor = lap * 8 - flFromEC, stepDetails[step2].sync = siphon * (lap - 1) - syncSpent, stepDetails[step2].toPush = flFromEC == 0 ? Math.min(step2 + speed - torchState + torchEclipse, toEC) : Math.min(step2 + speed, toEC), stepDetails[step2].toTA = Math.min(strStep ? step2 + 4 * speed : step2 + 2 * speed, toEC), stepDetails[step2].toKB = Math.max(umbra === !0 ? step2 - 5 : step2, floorStart), stepDetails[step2].toBKB = Math.max(step2 - 10, floorStart), lap = flFromEC == 0 ? 0 : Math.min(lap, 4), stepDetails[step2].cPush = catchProfile.push[lap], stepDetails[step2].cTA = catchProfile.ta[lap], stepDetails[step2].cKB = catchProfile.kb[lap], stepDetails[step2].cBKB = catchProfile.bkb[lap], stepDetails[step2].cFTA = catchProfile.fta[lap], stepDetails[step2].sg = catchProfile.sg[lap], stepDetails[step2].sgi = catchProfile.sgi[lap], stepDetails[step2].sc = catchProfile.sc[lap], stepDetails[step2].sci = catchProfile.sci[lap], stepDetails[step2].gold = catchProfile.gold[lap], stepDetails[step2].cf = catchProfile.cf[lap];
}
var syncSpent = 0;
let valuesDistribution = Array.from({ length: 500 });
for (var i = 0; i < 500; i++)
valuesDistribution[i] = [];
var stepDetails = [];
let loopActive = 1, startActive = steps, endActive = steps, loopEnd;
for (let element2 of valuesDistribution)
element2[0] = 0;
for (var runValues = [], step = 0; step < steps; step++)
runValues[step] = [], runValues[step][0] = 0;
runValues[steps] = [1], stepBuild(steps), syncSpent = stepDetails[steps].sync - sync, stepBuild(steps);
for (let hunts = 1; loopActive == 1; hunts++)
for (loopActive = 0, loopEnd = endActive, step = startActive; step <= loopEnd; step++)
if (runValues[step] == null)
runValues[step] = [];
else {
let rate = runValues[step][hunts - 1];
rate != null && rate > 1e-8 && (stepDetails[step] == null && stepBuild(step), gold += rate * stepDetails[step].gold, cfDrops += rate * stepDetails[step].cf, sigils += rate * stepDetails[step].sg, secrets += rate * stepDetails[step].sc, (torchState && stepDetails[step].floor % 8 != 0 || torchEclipse && stepDetails[step].floor % 8 == 0) && (sigils += rate * stepDetails[step].sgi, secrets += rate * stepDetails[step].sci), hunts <= stepDetails[step].sync && rate != 0 && stepDetails[step].floor < bail ? (loopActive = 1, startActive = Math.min(startActive, stepDetails[step].toBKB), endActive = Math.max(endActive, stepDetails[step].toTA), addRate(stepDetails[step].toPush, hunts, rate * stepDetails[step].cPush), addRate(stepDetails[step].toTA, hunts, rate * stepDetails[step].cTA), addRate(stepDetails[step].toKB, hunts, rate * stepDetails[step].cKB), addRate(stepDetails[step].toBKB, hunts, rate * stepDetails[step].cBKB), addRate(step, hunts, rate * stepDetails[step].cFTA), catches += rate * (stepDetails[step].cPush + stepDetails[step].cTA)) : (hunts - 1 == stepDetails[step].sync || stepDetails[step].floor >= bail) && (totalHunts += (hunts - 1) * rate, valuesDistribution[stepDetails[step].floor - 1][0] += rate));
}
let averageFloor = 0;
valuesDistribution.map(function(a, b) {
averageFloor += a * (b + 1);
});
let loopDistribution = Array.from({ length: 25 }).fill(0).map(
function(a, index) {
let sum = 0;
return valuesDistribution.slice(index * 8, (index + 1) * 8).map(
function(a2) {
sum += Number(a2);
}
), Number(sum);
}
), runningProbability = 1, loopCumulative = loopDistribution.map(function(a) {
let result = runningProbability;
return runningProbability -= a, result;
}), loopCopy = [...loopDistribution].filter(function(a) {
return a > 1e-3;
}), avgFloor = Math.round(averageFloor), curCache = getCacheLoot(curFloor), avgCache = getCacheLoot(avgFloor), mult = [sh ? 1.5 : 1, sr ? 1.5 : 1], deltaCache = [Math.ceil(avgCache[0] * mult[0]) - Math.ceil(curCache[0] * mult[0]), Math.ceil(avgCache[1] * mult[1]) - Math.ceil(curCache[1] * mult[1])], display = [
"VRift Sim: " + lvSpeed + "/" + lvSync + "/" + lvSiphon + (torchState ? " CF" : "") + (superSiphon ? " SS" : "") + (umbra ? " UU" : "") + (strStep ? " SSt" : ""),
"Steps: " + steps + "    Sync: " + sync,
"Power: " + power + "    Luck: " + luck,
"Average Highest Floor: " + avgFloor + ",    Average Hunts: " + Math.round(totalHunts),
"| Loot:  Sigils: +" + Math.round(sigils) + ",    Secrets: +" + Math.round(secrets),
"| Cache: Sigils: +" + deltaCache[0] + ",    Secrets: +" + deltaCache[1],
""
], startDisplay = display.length, fullDisplay = [
"VRift Run Simulation: " + (Date.now() / 1e3 - time) + " seconds taken.",
"Speed: " + lvSpeed,
"Siphon: " + siphon,
(torchState ? "CF " : "") + (superSiphon ? "SS " : "") + (umbra ? "UU " : "") + (strStep ? "SSt " : ""),
"Steps: " + steps,
"Sync: " + sync,
"Power: " + power,
"Luck: " + luck,
"Sigils: " + sigils,
"Secrets: " + secrets,
"Gold: " + gold,
"Average Highest Floor: " + Math.round(averageFloor),
"Average Hunts: " + Math.round(totalHunts),
""
], startFullDisplay = fullDisplay.length, eclipses = [];
for (i = 0; i < loopCopy.length; i++) {
let loopIndex = loopDistribution.indexOf(loopCopy[i]), eEntry = (loopCopy[i] * 100).toFixed(1), cEntry = (loopCumulative[loopIndex] * 100).toFixed(1), entry = "Eclipse #" + loopIndex.toString() + ": ", fullEntry = entry + eEntry + "% (" + cEntry + "% cumulative)";
entry += cEntry + "%", display[startDisplay + i] = entry, fullDisplay[startFullDisplay + i] = fullEntry, eclipses.push({
number: loopIndex,
percent: eEntry,
cumulative: cEntry
});
}
if (shouldDisplay)
console.log(fullDisplay.join(`
`)), alert(display.join(`
`));
else
return {
speed: lvSpeed,
sync: lvSync,
siphon: lvSiphon,
cfOn: torchState,
superSiphon,
umbra,
strStep,
ucEclipse: !1,
steps,
power,
luck,
avgFloor,
avgHunts: Math.round(totalHunts),
lootSigils: Math.round(sigils),
lootSecrets: Math.round(secrets),
cacheSigils: deltaCache[0],
cacheSecrets: deltaCache[1],
eclipses
};
}
var cacheLoot, normalAR, umbraAR, mouseDrops, mouseStats, simulator_default, init_simulator = __esm({
"src/modules/location-huds/locations/rift-valour/simulator.js"() {
cacheLoot = [
[0, 0],
[7, 0],
[16, 0],
[24, 0],
[32, 0],
[40, 0],
[48, 0],
[50, 0],
[59, 8],
[69, 10],
[80, 11],
[88, 13],
[98, 14],
[107, 16],
[118, 17],
[120, 17],
[135, 20],
[150, 22],
[165, 24],
[182, 26],
[199, 28],
[217, 31],
[235, 33],
[254, 33],
[272, 37],
[290, 40],
[308, 43],
[325, 45],
[342, 48],
[357, 51],
[372, 54],
[386, 54],
[399, 60],
[410, 63],
[421, 66],
[430, 70],
[439, 73],
[446, 77],
[453, 80],
[459, 80],
[464, 88],
[469, 92],
[473, 96],
[477, 101],
[480, 105],
[482, 109],
[485, 113],
[487, 113],
[489, 123],
[490, 128],
[492, 133],
[493, 138],
[494, 143],
[495, 148],
[495, 153],
[496, 153],
[497, 161],
[497, 167],
[497, 173],
[498, 178],
[498, 184],
[498, 190],
[499, 196],
[500, 196],
[500, 205],
[500, 212],
[500, 218],
[500, 224],
[500, 231],
[500, 237],
[500, 244],
[500, 244],
[500, 253],
[500, 260],
[500, 267],
[500, 274],
[500, 282],
[500, 289],
[500, 296],
[500, 300]
], normalAR = [
[0, 0, 0, 0],
[0, 0, 0, 0],
[0.08246, 0.05616, 0.04866, 0.04231],
[0.08246, 0.05616, 0.04866, 0.04231],
[0.08246, 0.05616, 0.04866, 0.04231],
[0.08246, 0.05616, 0.04866, 0.04231],
[0.08246, 0.05616, 0.04866, 0.04231],
[0.08246, 0.05616, 0.04866, 0.04231],
[0.08246, 0.05616, 0.04866, 0.04231],
[0, 0, 0, 0],
[0, 0.01658, 0.02836, 0.04121],
[0, 0.01658, 0.02836, 0.04121],
[0, 0.01658, 0.02836, 0.04121],
[0, 0.01658, 0.02836, 0.04121],
[0, 0.01658, 0.02836, 0.04121],
[0, 0.01658, 0.02836, 0.04121],
[0, 0.01658, 0.02836, 0.04121],
[0, 0, 0, 0],
[0.17073, 0.06332, 0.06193, 0.08571],
[0.04065, 0.01583, 0.02368, 0.01978],
[0.03252, 0.01583, 0.02732, 0.01209],
[0, 0.29288, 0.1184, 0.03626],
[0, 0, 0.1275, 0.07473],
[0, 0, 0, 0.09725],
[0.17886, 0.1029, 0.102, 0.08956],
[0, 0, 0, 0],
[0, 0, 0, 0]
], umbraAR = [
[0, 0, 0, 0],
[0, 0, 0, 0],
[0.066, 0.04129, 0.03857, 0.031],
[0.066, 0.04129, 0.03857, 0.031],
[0.066, 0.04129, 0.03857, 0.031],
[0.066, 0.04129, 0.03857, 0.031],
[0.066, 0.04129, 0.03857, 0.031],
[0.066, 0.04129, 0.03857, 0.031],
[0.066, 0.04129, 0.03857, 0.031],
[0, 0, 0, 0],
[0, 0.01043, 0.01886, 0.036],
[0, 0.01043, 0.01886, 0.036],
[0, 0.01043, 0.01886, 0.036],
[0, 0.01043, 0.01886, 0.036],
[0, 0.01043, 0.01886, 0.036],
[0, 0.01043, 0.01886, 0.036],
[0, 0.01043, 0.01886, 0.036],
[0, 0, 0, 0],
[0.115, 0.072, 0.065, 0.056],
[0.038, 0.023, 0.02, 0.017],
[0.023, 0.014, 0.013, 9e-3],
[0, 0.2311, 0.10806, 0.033],
[0, 0, 0.098, 0.055],
[0, 0, 0, 0.081],
[0.183, 0.112, 0.102, 0.08],
[0.179, 0.186, 0.192, 0.2],
[0, 0, 0, 0]
], mouseDrops = [
[0, 0, 0, 0, 1982],
[0, 0, 0, 0, 4250],
[0.60515, 0.60515, 0, 0, 1e3],
[0.63774, 0.63774, 0, 0, 1250],
[0.56444, 0.56444, 0, 0, 1500],
[0.57674, 0.57674, 0, 0, 2e3],
[0.63102, 0.63102, 0, 0, 2500],
[0.57209, 0.57209, 0, 0, 3e3],
[0.59, 0.59, 0, 0, 4e3],
[2.40541, 0.98649, 0, 0, 25e3],
[0.01, 0.01, 1.1, 1, 6e3],
[0, 0, 1.1, 1, 6e3],
[909e-5, 909e-5, 1.1, 1, 6e3],
[0, 0, 1.1, 1, 6e3],
[8e-3, 8e-3, 1.1, 1, 6e3],
[826e-5, 826e-5, 1.1, 1, 6e3],
[0.0315, 0.0315, 1.1, 1, 6e3],
[3.82927, 1, 0, 0, 1e5],
[0.0177, 0.0177, 0, 0, 2e3],
[0, 0, 0, 0, 1500],
[0.01429, 0.01429, 0, 0, 1e3],
[643e-5, 643e-5, 1.1, 1, 5e3],
[0, 0, 1.15, 1, 5e3],
[0.02475, 0.02475, 1.75, 1, 8e3],
[0.99597, 0.99396, 0, 0, 4795],
[0, 0, 0, 0, 12e3],
[0, 0, 0, 0, 0]
], mouseStats = [
[3300, 1],
[5050, 1],
[2900, 1],
[6650, 2],
[8800, 3],
[11750, 4],
[16e3, 5],
[21500, 6],
[29e3, 7],
[7e6, 1e3],
[72e3, 9],
[72e3, 9],
[72e3, 9],
[72e3, 9],
[72e3, 9],
[72e3, 9],
[72e3, 9],
[135e5, 1e3],
[4800, 1.75],
[8250, 1.75],
[23e3, 1.75],
[38e3, 10],
[15e4, 25],
[35e4, 50],
[100, 2],
[818250, 75],
[1e30, 1]
];
simulator_default = simulate;
}
});
var displayResults, doSimulation, addUIComponents, modifyPlayerIcon, addSimulatorEvents, removeWarningIfUcEquipped, highlightQuantitiesIfUcEquipped, ifUcEquipped, rift_valour_default2, init_rift_valour2 = __esm({
"src/modules/location-huds/locations/rift-valour/index.js"() {
init_utils2();
init_flipped_avatar();
init_styles102();
init_simulator();
displayResults = (results) => {
let eclipseText = "";
return results.eclipses.forEach((eclipse) => {
eclipseText += `<li>
<span class="number">Eclipse ${eclipse.number}</span>
<span class="percent ${eclipse.percent === "100.0" ? "guaranteed" : ""}">${eclipse.percent}%</span>
<span class="cumulative ${eclipse.cumulative === "100.0" ? "guaranteed" : ""}">${eclipse.cumulative}%</span>
</li>`;
}), `<div class="mh-vrift-sim-results">
<div class="stats">
<div class="result">
<div class="label">Speed</div>
<div class="value">${results.speed}</div>
</div>
<div class="result">
<div class="label">Sync</div>
<div class="value">${results.sync}</div>
</div>
<div class="result">
<div class="label">Avg. Highest Floor</div>
<div class="value">${results.avgFloor}</div>
</div>
<div class="result">
<div class="label">Avg. Hunts</div>
<div class="value">${results.avgHunts}</div>
</div>
<div class="result">
<div class="label">Sigils (Loot)</div>
<div class="value">${results.lootSigils}</div>
</div>
<div class="result">
<div class="label">Secrets (Loot)</div>
<div class="value">${results.lootSecrets}</div>
</div>
<div class="result">
<div class="label">Sigils (Cache)</div>
<div class="value">${results.cacheSigils}</div>
</div>
<div class="result">
<div class="label">Secrets (Cache)</div>
<div class="value">${results.cacheSecrets}</div>
</div>
</div>
<div class="eclipses">
<ol>
<li class="header">
<span class="number">#</span>
<span class="percent">Chance</span>
<span class="cumulative">Total</span>
</li>
${eclipseText}
</ol>
</div>
</div>`;
}, doSimulation = (selector) => {
let simPopup = document.querySelector(selector);
simPopup && simPopup.addEventListener("click", () => {
let data = simulator_default(!1), popup = createPopup({
title: "Valour Rift Run Simulation",
content: displayResults(data),
show: !1
});
popup.setAttributes({ className: "mh-vrift-popup" }), popup.show();
});
}, addUIComponents = () => {
var _a, _b;
let existing = document.querySelector("#mh-vrift-floor-name");
existing && existing.remove();
let floor = document.querySelector(".valourRiftHUD-currentFloor");
if (floor) {
let floorName = makeElement("div", "valourRiftHUD-floorName", (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRiftValour) == null ? void 0 : _b.floor_name);
floorName.id = "mh-vrift-floor-name", floor.append(floorName);
}
let floorTooltipParent = document.querySelector(".valourRiftHUD-floorProgress.mousehuntTooltipParent");
if (!floorTooltipParent)
return;
let tooltip = floorTooltipParent.querySelector(".mousehuntTooltip");
if (!tooltip)
return;
tooltip.classList.add("bottom", "mh-vrift-floor-tooltip"), tooltip.classList.remove("top");
let stepsRemaining = tooltip.querySelector(".valourRiftHUD-stepsRemaining");
if (!stepsRemaining)
return;
let floorBar = document.querySelector(".valourRiftHUD-floorProgress-barContainer");
if (!floorBar)
return;
let stepsExisting = document.querySelector(".mh-vrift-steps-remaining");
stepsExisting && stepsExisting.remove(), makeElement("div", "mh-vrift-steps-remaining", stepsRemaining.textContent, floorBar);
}, modifyPlayerIcon = () => {
let playerIcon = document.querySelector(".valourRiftHUD-tower-sprite.player .valourRiftHUD-tower-sprite-image");
if (!playerIcon)
return;
let timeout;
playerIcon.addEventListener("click", (event) => {
if (event.shiftKey) {
playerIcon.classList.toggle("mh-improved-player-large");
return;
}
playerIcon.classList.add("mh-improved-player-spin"), clearTimeout(timeout), timeout = setTimeout(() => {
playerIcon.classList.remove("mh-improved-player-spin");
}, 700);
});
}, addSimulatorEvents = () => {
doSimulation(".valourRiftHUD-floorProgress-barContainer");
let magnifyingGlass = document.querySelector(".valourRiftHUD-previewTower");
if (!magnifyingGlass)
return;
let existing = document.querySelector(".mh-vrift-sim-link");
existing && existing.remove();
let simLink = makeElement("a", ["valourRiftHUD-previewTower", "mh-vrift-sim-link"], "Simulate Run");
simLink.title = "Simulate Valour Rift Run", magnifyingGlass.after(simLink), doSimulation(".mh-vrift-sim-link");
}, removeWarningIfUcEquipped = () => {
let warningContainer = document.querySelector(".valourRiftHUD-warningContainer.active");
if (!warningContainer)
return;
warningContainer.classList.remove("hidden");
let powerTypeWarning = warningContainer.querySelector(".valourRiftHUD-powerTypeWarning.active");
powerTypeWarning && (powerTypeWarning.classList.remove("hidden"), user.trinket_item_id == 1075 && (warningContainer.classList.add("hidden"), powerTypeWarning.classList.add("hidden")));
}, highlightQuantitiesIfUcEquipped = () => __async(void 0, null, function* () {
[
".valourRiftHUD-gauntletBait-quantity.quantity",
".valourRiftHUD-towerLoot-quantity.quantity",
".valourRiftHUD-powerUp-currentLevel"
].forEach((selector) => {
let existing = document.querySelectorAll(selector);
existing && existing.forEach((e) => {
user.trinket_item_id == 1075 ? e.classList.add("uc-text-highlight") : e.classList.remove("uc-text-highlight");
});
});
}), ifUcEquipped = () => {
removeWarningIfUcEquipped(), highlightQuantitiesIfUcEquipped();
}, rift_valour_default2 = () => __async(void 0, null, function* () {
addHudStyles([
styles_default101,
getSetting("location-huds.valour-rift-flip-avatar", !1) ? flipped_avatar_default : ""
]), addUIComponents(), addSimulatorEvents(), modifyPlayerIcon(), onTrapChange(ifUcEquipped);
});
}
});
var styles_default102, init_styles103 = __esm({
"src/modules/location-huds/locations/rift-whisker-woods/styles.css"() {
styles_default102 = `.riftWhiskerWoodsHUD-zone-title{right:20%;left:20%;font-size:12px}span.riftWhiskerWoodsHUD-zone-rageLevel{padding-top:0;margin-top:-3px;font-size:18px}span.riftWhiskerWoodsHUD-zone-rageMax{position:unset;display:block;font-size:10px}.riftWhiskerWoodsHUD-zone-rageContainer{top:-9px;left:-4px;display:flex;flex-direction:column;align-items:center;justify-content:center;width:40px;height:40px;background:#5b3b1a;border-radius:10px;box-shadow:0 0 1px 2px inset #b78c5c,0 0 3px 3px inset #292928}.riftWhiskerWoodsHUD-baitWarning{right:20%;left:20%;padding:10px 60px;font-size:12px;text-align:center;background-color:#ffa5a5;border-color:#992023}.riftWhiskerWoodsHUD-zone-charm-quantity.quantity{width:30px;font-size:12px}.riftWhiskerWoodsHUD-zone .mousehuntArmNowButton{right:-2px}.riftWhiskerWoodsHUD-zone-charm-craftingItem{display:grid;grid-template-columns:1fr;place-items:center}.riftWhiskerWoodsHUD-zone-charm-craftingItem-container{display:inline-flex;align-items:stretch;width:270px}.riftWhiskerWoodsHUD-zone-charm-craftButtonContainer{width:110px}.riftWhiskerWoodsHUD-zone-charm-craftingItem-quantity{display:grid;grid-template-columns:1fr 1fr;gap:3px;align-items:end;font-size:10px}.riftWhiskerWoodsHUD-zone-charm-craftingItem-quantity br{display:none}.riftWhiskerWoodsHUD-zone-charm-craftingItem-quantity-label{display:block;margin:0}.riftWhiskerWoodsHUD-zone-charm-craftingItem .itemName{display:flex;flex-wrap:nowrap;align-items:stretch;justify-content:center;margin-bottom:4px}.riftWhiskerWoodsHUD-zone-charm-craftButton{display:inline-block;float:none;width:30px}.riftWhiskerWoodsHUD-zone-charm-craftButtonMargin{margin-right:0}.riftWhiskerWoodsHUD-zone-charm-description>b{display:inline-block;padding-bottom:5px;font-size:11px;text-align:center}.riftWhiskerWoodsHUD:hover .riftWhiskerWoodsHUD-zone.boss .riftWhiskerWoodsHUD-zone-progress:after,.riftWhiskerWoodsHUD:focus .riftWhiskerWoodsHUD-zone.boss .riftWhiskerWoodsHUD-zone-progress:after,.riftWhiskerWoodsHUD:hover .riftWhiskerWoodsHUD-zone.high .riftWhiskerWoodsHUD-zone-progress:after,.riftWhiskerWoodsHUD:focus .riftWhiskerWoodsHUD-zone.high .riftWhiskerWoodsHUD-zone-progress:after,.riftWhiskerWoodsHUD:hover .riftWhiskerWoodsHUD-zone.low .riftWhiskerWoodsHUD-zone-progress:after,.riftWhiskerWoodsHUD:focus .riftWhiskerWoodsHUD-zone.low .riftWhiskerWoodsHUD-zone-progress:after{position:absolute;top:0;bottom:0;left:9px;display:flex;align-items:center;padding:2px;font-size:14px;text-shadow:1px 1px #000;content:"Low";background-color:#0006}.riftWhiskerWoodsHUD:hover .riftWhiskerWoodsHUD-zone.high .riftWhiskerWoodsHUD-zone-progress:after,.riftWhiskerWoodsHUD:focus .riftWhiskerWoodsHUD-zone.high .riftWhiskerWoodsHUD-zone-progress:after{content:"High"}.riftWhiskerWoodsHUD:hover .riftWhiskerWoodsHUD-zone.boss .riftWhiskerWoodsHUD-zone-progress:after,.riftWhiskerWoodsHUD:focus .riftWhiskerWoodsHUD-zone.boss .riftWhiskerWoodsHUD-zone-progress:after{content:"Boss"}.boss .riftWhiskerWoodsHUD-zone-rageContainer{box-shadow:0 0 1px 3px inset #b72929,0 0 1px 2px inset #b78c5c,0 0 3px 3px inset #292928}.mhui-taunting-warning{top:36px;left:150px;width:414px;padding:10px 20px;border-color:#992023}.mhui-taunting-warning-close{position:absolute;top:-6px;right:-6px;z-index:15;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:18px;height:17px;padding:5px;font-size:12px;font-weight:700;line-height:15px;color:#fff;text-align:center;background-color:#e03a3a;border:1px solid #992023;border-color:#d1d0cf;border-radius:20px}.mhui-taunting-warning-close:hover{color:#ffb4b4;background-color:#992023}@keyframes mhui-glow-eyes{0%{filter:saturate(1)}40%{filter:saturate(2.5)}to{filter:saturate(1)}}.riftWhiskerWoodsHUD.boss_bait .riftWhiskerWoodsHUD-boss{animation:mhui-glow-eyes 30s ease-in-out infinite}.riftWhiskerWoodsHUD-zone-charm-image-container{top:-5px;width:32px;height:32px}.clearing .riftWhiskerWoodsHUD-zone-charm-image-container{top:-6px}.riftWhiskerWoodsHUD-zone.low .riftWhiskerWoodsHUD-zone-progress{background-position:95% 0}
`;
}
});
var hasHiddenTauntingWarning, showTauntingWarning, checkAndWarnWhenNoTauntingCharm, rift_whisker_woods_default, init_rift_whisker_woods = __esm({
"src/modules/location-huds/locations/rift-whisker-woods/index.js"() {
init_utils2();
init_styles103();
hasHiddenTauntingWarning = !1, showTauntingWarning = () => {
if (document.querySelector(".mhui-taunting-warning"))
return;
let baitWarning = document.querySelector(".riftWhiskerWoodsHUD-bossBaitWarning");
if (!baitWarning || hasHiddenTauntingWarning)
return;
let warning = baitWarning.cloneNode(!0);
warning.classList.add("mhui-taunting-warning", "active"), warning.innerHTML = "You don't have a Taunting Charm equipped! You may reset your rage!";
let warningClose = makeElement("div", "mhui-taunting-warning-close");
warningClose.innerHTML = "\xD7", warningClose.onclick = (e) => {
e.preventDefault(), hasHiddenTauntingWarning = !0, warning.classList.remove("active");
}, warning.append(warningClose), baitWarning.after(warning);
}, checkAndWarnWhenNoTauntingCharm = () => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
if (user.trinket_item_id == "1647")
return;
let rage = [
((_d = (_c = (_b = (_a = user.quests) == null ? void 0 : _a.QuestRiftWhiskerWoods) == null ? void 0 : _b.zones) == null ? void 0 : _c.clearing) == null ? void 0 : _d.level) || 0,
((_h = (_g = (_f = (_e = user.quests) == null ? void 0 : _e.QuestRiftWhiskerWoods) == null ? void 0 : _f.zones) == null ? void 0 : _g.lagoon) == null ? void 0 : _h.level) || 0,
((_l = (_k = (_j = (_i = user.quests) == null ? void 0 : _i.QuestRiftWhiskerWoods) == null ? void 0 : _j.zones) == null ? void 0 : _k.tree) == null ? void 0 : _l.level) || 0
], rage48 = rage.filter((val) => val >= 48).length, rage49 = rage.filter((val) => val >= 49).length, rage50 = rage.filter((val) => val >= 50).length;
(rage48 === 3 || // If all 3 are 48.
rage49 === 2 || // If 2 are 49.
rage50 === 1 || // If 1 is 50.
user.bait_item_id == "1646") && showTauntingWarning();
}, rift_whisker_woods_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default102), checkAndWarnWhenNoTauntingCharm(), onRequest("*", checkAndWarnWhenNoTauntingCharm);
});
}
});
var clean_chalkboard_default, init_clean_chalkboard = __esm({
"src/modules/location-huds/locations/school-of-sorcery/clean-chalkboard.css"() {
clean_chalkboard_default = `.schoolOfSorceryCourseView__background--arcane_101_course{background-image:url(https://i.mouse.rip/sos/background_arcane.png)}.schoolOfSorceryCourseView__background--shadow_101_course{background-image:url(https://i.mouse.rip/sos/background_shadow.png)}.schoolOfSorceryCourseView__background--exam_course{background-image:url(https://i.mouse.rip/sos/background_exam.png)}
`;
}
});
var styles_default103, init_styles104 = __esm({
"src/modules/location-huds/locations/school-of-sorcery/styles.css"() {
styles_default103 = `.folkloreForestRegionView-trapWarningContainer{top:40%}.headsUpDisplaySchoolOfSorceryView .folkloreForestRegionView-trapWarningContainer{right:160px;left:160px;padding:5px}.folkloreForestRegionView-warning{border:none}.schoolOfSorceryCourseView__dropOutButton{height:19px}.schoolOfSorceryTranscriptDialogView__courseSummaryIcon{width:30px;height:30px;background-size:cover}.schoolOfSorceryCourseView__magicProgressBarLabel{top:45px;left:30%;padding:3px;color:#ddd;background-color:#3c3c3c;border:1px solid #1f1f1f}.schoolOfSorceryCourseView__content:hover .schoolOfSorceryCourseView__stream--short,.schoolOfSorceryCourseView__content:hover .schoolOfSorceryCourseView__glow,.schoolOfSorceryCourseView__content:hover .schoolOfSorceryCourseView__explosion{animation-play-state:unset}.schoolOfSorceryCourseView__explosion{animation-timing-function:unset}.schoolOfSorceryCourseView__powerTypeRecommendationText.schoolOfSorceryCourseView__powerTypeRecommendationText--usingCorrectPowerType{position:relative;width:0;color:transparent;visibility:hidden}.schoolOfSorceryCourseView__powerTypeRecommendationText.schoolOfSorceryCourseView__powerTypeRecommendationText--usingCorrectPowerType:after{position:absolute;top:0;bottom:0;left:2px;width:13px;height:13px;color:#70e923;visibility:visible;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/hud/meadow_checkmark.png);background-repeat:no-repeat;background-size:cover}.schoolOfSorceryCourseView__powerTypeRecommendationContainer{top:130px}.schoolOfSorceryCourseView__powerTypeIcon{filter:drop-shadow(-1px -1px 2px #000)}.schoolOfSorceryCourseView__powerTypeWarningIcon{top:6px;width:20px;height:19px;background-image:url(https://i.mouse.rip/map-marker.png);filter:hue-rotate(320deg);background-position:50% -3px;background-size:20px;border-radius:50%}.headsUpDisplaySchoolOfSorceryView__wandQuantity.quantity{top:7px;font-size:12px}.schoolOfSorceryCourseView__huntsRemainingContainer{font-size:17px;color:#ddd;opacity:.9}.schoolOfSorceryCourseView__magicProgressBarLabel .schoolOfSorceryCourseView__magicProgressValue--overcharged{color:#74f623}.schoolOfSorceryCourseView__spellforceQuanitity{font-size:16px;text-shadow:0 0 0 #444,1px 0 0 #444,0 1px 0 #444,-1px 0 0 #444,0 -1px 0 #444,-1px -1px 0 #444,1px -1px 0 #444,-1px 1px 0 #444,1px 1px 0 #444;filter:none}.schoolOfSorceryCourseView__dropOutButton,.headsUpDisplaySchoolOfSorceryView__disarmPreferenceButton,.headsUpDisplaySchoolOfSorceryView__viewTranscriptButton{opacity:.7;transition:opacity .2s}.schoolOfSorceryCourseView__dropOutButton:hover,.headsUpDisplaySchoolOfSorceryView__disarmPreferenceButton:hover,.headsUpDisplaySchoolOfSorceryView__viewTranscriptButton:hover{filter:none;opacity:1}.headsUpDisplaySchoolOfSorcery__inventoryBlock:before,.headsUpDisplaySchoolOfSorcery__inventoryBlockQuantity{background-color:#0b4e7f;border-color:#008cf3}.headsUpDisplaySchoolOfSorceryView__disarmPreferenceButton,.headsUpDisplaySchoolOfSorceryView__viewTranscriptButton,.headsUpDisplaySchoolOfSorceryView__baitCraftableContainer{filter:hue-rotate(125deg)}.headsUpDisplaySchoolOfSorceryView__baitImage,.headsUpDisplaySchoolOfSorceryView__baitIngredientImage,.headsUpDisplaySchoolOfSorceryView__baitBuyButton{filter:hue-rotate(-125deg)}.headsUpDisplaySchoolOfSorceryView__baitImage:hover,.headsUpDisplaySchoolOfSorceryView__baitIngredientImage:hover,.headsUpDisplaySchoolOfSorceryView__baitBuyButton:hover{filter:hue-rotate(-125deg) brightness(1.2)}.folkloreForestRegionView-basicBaitContainer{filter:hue-rotate(170deg)}.folkloreForestRegionView-basicBait .folkloreForestRegionView-bait-image{filter:hue-rotate(-170deg)}.folkloreForestRegionView-basicBaitContainer:hover{filter:hue-rotate(170deg) brightness(1.1)}.schoolOfSorceryCourseView__huntRemainingText--highlight{font-size:22px;text-shadow:none;vertical-align:bottom}.schoolOfSorceryCourseView__magicProgressBarLabel--bossMode{left:-52%}.headsUpDisplaySchoolOfSorcery__inventoryBlock.highlight:before{background-color:#3ecb9e}.headsUpDisplaySchoolOfSorcery__inventoryBlock.highlight .headsUpDisplaySchoolOfSorcery__inventoryBlockQuantity{background-color:#276f91;border-color:#1e6571}.schoolOfSorceryTranscriptDialogView__courseSummaryNumberBlock{justify-self:center;padding-right:4px;font-size:15px}.schoolOfSorceryTranscriptDialogView__courseSummaryHeader .schoolOfSorceryTranscriptDialogView__courseSummaryNumberBlock{font-size:13px}.schoolOfSorceryTranscriptDialogView__courseSummaryName{width:unset;margin-left:0;font-size:13px}.schoolOfSorceryTranscriptDialogView__courseSummaryHeader .schoolOfSorceryTranscriptDialogView__courseSummaryName{margin-right:-55px}.headsUpDisplaySchoolOfSorceryView__fuelQuantity.quantity{color:#fff;background-color:#64c87d4d}.schoolOfSorceryCourseView__spellforceAvatar{filter:drop-shadow(0 10px 1px #000)}.headsUpDisplaySchoolOfSorceryView__lootPerCatchItemImage{width:25px;height:25px;margin-top:-2px;filter:drop-shadow(-1px 2px 2px #000)}.headsUpDisplaySchoolOfSorceryView__lootPerCatchItemText{color:#90dd31;text-shadow:1px 1px #000}.headsUpDisplaySchoolOfSorceryView__baitImage.busy:after{top:calc(50% - 1px);left:calc(50% - 1px)}.headsUpDisplaySchoolOfSorceryView__wandButton{font-weight:900;text-shadow:1px 1px 1px #a8c3fa}.schoolOfSorceryCourseView__dropOutButton,.headsUpDisplaySchoolOfSorceryView__fuelToggleButton:before{font-weight:900;text-shadow:1px 1px 1px #b5f1bc}.schoolOfSorceryHallwayView__startCourse--disabled{color:#fff;filter:grayscale(1);background-position-y:unset;opacity:.6}.schoolOfSorceryHallwayView__courseSelectionContainer.schoolOfSorceryHallwayView__courseSelectionContainer--arcane_101_course,.schoolOfSorceryHallwayView__courseSelectionContainer.schoolOfSorceryHallwayView__courseSelectionContainer--shadow_101_course,.schoolOfSorceryHallwayView__courseSelectionContainer.schoolOfSorceryHallwayView__courseSelectionContainer--exam_course{position:relative}.schoolOfSorceryHallwayView__courseSelectionContainer.schoolOfSorceryHallwayView__courseSelectionContainer--arcane_101_course:before,.schoolOfSorceryHallwayView__courseSelectionContainer.schoolOfSorceryHallwayView__courseSelectionContainer--shadow_101_course:before,.schoolOfSorceryHallwayView__courseSelectionContainer.schoolOfSorceryHallwayView__courseSelectionContainer--exam_course:before{position:absolute;top:1px;left:55px;display:block;width:24px;height:24px;content:"";background:url(https://www.mousehuntgame.com/images/powertypes/arcane.png);background-repeat:no-repeat;background-size:contain}.schoolOfSorceryHallwayView__courseSelectionContainer.schoolOfSorceryHallwayView__courseSelectionContainer--shadow_101_course:before{background-image:url(https://www.mousehuntgame.com/images/powertypes/shadow.png)}.schoolOfSorceryHallwayView__courseSelectionContainer.schoolOfSorceryHallwayView__courseSelectionContainer--exam_course:before{background-image:url(https://www.mousehuntgame.com//images/ui/hud/school_of_sorcery/exam_icon.png)}.schoolOfSorceryHallwayView__courseSelectionContainer.schoolOfSorceryHallwayView__courseSelectionContainer--arcane_101_course .schoolOfSorceryHallwayView__startCourse,.schoolOfSorceryHallwayView__courseSelectionContainer.schoolOfSorceryHallwayView__courseSelectionContainer--shadow_101_course .schoolOfSorceryHallwayView__startCourse,.schoolOfSorceryHallwayView__courseSelectionContainer.schoolOfSorceryHallwayView__courseSelectionContainer--exam_course .schoolOfSorceryHallwayView__startCourse{top:120px}.schoolOfSorceryHallwayView__courseSelectionContainer.schoolOfSorceryHallwayView__courseSelectionContainer--arcane_101_course .schoolOfSorceryHallwayView__entryCostItemImage,.schoolOfSorceryHallwayView__courseSelectionContainer.schoolOfSorceryHallwayView__courseSelectionContainer--shadow_101_course .schoolOfSorceryHallwayView__entryCostItemImage{margin-left:3px}.schoolOfSorceryHallwayView__entryCostItemQuantity{font-weight:900}.schoolOfSorceryHallwayView__entryCost{filter:drop-shadow(1px 1px 1px #000)}.schoolOfSorceryEnrollCourseDialogView__courseBossDrop{bottom:5px}.schoolOfSorceryEnrollCourseDialogView__courseInfoContainer{padding-top:10px}.schoolOfSorceryEnrollCourseDialogView__course{height:160px;background-color:#fff5dd}.schoolOfSorceryEnrollCourseDialogView__courseStats{padding-top:5px}.schoolOfSorceryEnrollCourseDialogView__course--exam_course .schoolOfSorceryEnrollCourseDialogView__examPowerTypeSwitchWarning{top:unset;bottom:10px}.schoolOfSorceryEnrollCourseDialogView__courseStat{background-color:#fbe3a7}.schoolOfSorceryEnrollCourseDialogView__course:hover:after,.schoolOfSorceryEnrollCourseDialogView__course--active:after{position:absolute;inset:-2px;content:"";border:2px solid #008cf3;border-radius:6px}.schoolOfSorceryEnrollCourseDialogView__course--active:after{outline:2px solid #5fb4f1}.schoolOfSorceryEnrollCourseDialogView__course.schoolOfSorceryEnrollCourseDialogView__course--disabled:hover:after{border:none}.schoolOfSorceryCourseView__beam--enemy:after{position:absolute;top:-13px;right:-14px;z-index:10;width:60px;height:70px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/hud/school_of_sorcery/course/beam/wand_glow_arcane.png);background-repeat:no-repeat;background-position:left;border-radius:0;opacity:.6;transform:scaleX(-1)}.schoolOfSorceryCourseView__beam--shadow.schoolOfSorceryCourseView__beam--enemy:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/school_of_sorcery/course/beam/wand_glow_shadow.png)}.schoolOfSorceryCourseView__beam--exam_course.schoolOfSorceryCourseView__beam--arcane.schoolOfSorceryCourseView__beam--enemy:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/school_of_sorcery/course/beam/glow_boss_arcane.png)}.schoolOfSorceryCourseView__beam--exam_course.schoolOfSorceryCourseView__beam--shadow.schoolOfSorceryCourseView__beam--enemy:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/school_of_sorcery/course/beam/glow_boss_shadow.png)}.schoolOfSorceryCourseView__beam--player:after{position:absolute;top:-10px;left:-13px;z-index:10;width:60px;height:70px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/hud/school_of_sorcery/course/beam/glow_player.png);background-repeat:no-repeat;background-position:left;border-radius:0;opacity:.6}.schoolOfSorceryCourseView__streamContainer.schoolOfSorceryCourseView__streamContainer--player{margin-top:-3px}.schoolOfSorceryCourseView__streamContainer.schoolOfSorceryCourseView__streamContainer--enemy{margin-top:-2px}.schoolOfSorceryCourseView__beamIntersection.schoolOfSorceryCourseView__beamIntersection--arcane{margin-top:-8px}.schoolOfSorceryCourseView__streamContainer--player{border-top-left-radius:60%;border-bottom-left-radius:60%}.schoolOfSorceryTranscriptDialogView__courseSummaryRow{display:grid;grid-template-columns:70px 1fr 1fr 1fr;justify-items:stretch}.schoolOfSorceryTranscriptDialogView__courseSummaryRow.schoolOfSorceryTranscriptDialogView__courseSummaryHeader .schoolOfSorceryTranscriptDialogView__courseSummaryName{grid-column:span 2;margin-right:0;margin-left:50px}.headsUpDisplaySchoolOfSorceryView__standardBaitTooltip.mousehuntTooltip{width:120px}.headsUpDisplaySchoolOfSorceryView__baitCraftableContainer .mousehuntTooltip{right:-25px;left:-25px}.schoolOfSorceryCourseView__courseName.schoolOfSorceryCourseView__courseName--highest{color:#954f2d}.schoolOfSorceryCourseView__highestMarker{position:absolute;top:0;right:24px;width:20px;height:20px;filter:hue-rotate(160deg);opacity:.6}.schoolOfSorceryCourseView__highestMarker:hover,.schoolOfSorceryCourseView__highestMarker:focus{cursor:pointer;filter:hue-rotate(300deg);opacity:1}.schoolOfSorceryCourseView__powerTypeRecommendation{color:#ccc}.schoolOfSorceryCourseView__powerTypeText{margin-right:-10px;margin-left:10px;font-size:12px;color:#ddd}.schoolOfSorceryCourseView__powerTypeText b{font-size:16px}
`;
}
});
var highlightIfHighest, showPowerTypeReminder, school_of_sorcery_default2, init_school_of_sorcery2 = __esm({
"src/modules/location-huds/locations/school-of-sorcery/index.js"() {
init_utils2();
init_clean_chalkboard();
init_styles78();
init_styles104();
highlightIfHighest = () => {
var _a, _b, _c, _d, _e, _f, _g, _h;
let transcripts = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestSchoolOfSorcery) == null ? void 0 : _b.transcript_data, currentCourse = (_e = (_d = (_c = user == null ? void 0 : user.quests) == null ? void 0 : _c.QuestSchoolOfSorcery) == null ? void 0 : _d.current_course) == null ? void 0 : _e.course_type, currentScore = (_h = (_g = (_f = user == null ? void 0 : user.quests) == null ? void 0 : _f.QuestSchoolOfSorcery) == null ? void 0 : _g.current_course) == null ? void 0 : _h.course_level;
if (!transcripts || !currentCourse || !currentScore)
return;
let courseTranscript = transcripts.find(({ courseType }) => courseType === currentCourse), highestScore = (courseTranscript == null ? void 0 : courseTranscript.highest_level) || 0;
if (!courseTranscript)
return;
let title = document.querySelector(".schoolOfSorceryCourseView__courseName");
if (highestScore > currentScore) {
title.classList.remove("schoolOfSorceryCourseView__courseName--highest");
let existingHighestMarker2 = title.querySelector(".schoolOfSorceryCourseView__highestMarker");
existingHighestMarker2 && existingHighestMarker2.remove();
return;
}
if (title.classList.contains("schoolOfSorceryCourseView__courseName--highest") || title.classList.add("schoolOfSorceryCourseView__courseName--highest"), title.querySelector(".schoolOfSorceryCourseView__highestMarker"))
return;
let highestMarker = makeElement("img", "schoolOfSorceryCourseView__highestMarker");
highestMarker.src = "https://www.mousehuntgame.com/images/ui/camp/trap/star_favorite.png", highestMarker.src = "https://www.mousehuntgame.com/images/ui/hud/rift_valour/upgrade_arrow.png", highestMarker.alt = "", highestMarker.setAttribute("title", "New record for your highest in this course!"), highestMarker.addEventListener("click", () => {
let transcriptButton = document.querySelector(".headsUpDisplaySchoolOfSorceryView__viewTranscriptButton");
transcriptButton && transcriptButton.click();
}), title.append(highestMarker);
}, showPowerTypeReminder = () => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
if (((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestSchoolOfSorcery) == null ? void 0 : _b.current_course) == null ? void 0 : _c.course_type) !== "exam_course" || (_f = (_e = (_d = user == null ? void 0 : user.quests) == null ? void 0 : _d.QuestSchoolOfSorcery) == null ? void 0 : _e.current_course) != null && _f.using_correct_power_type)
return;
let powerType = (_i = (_h = (_g = user == null ? void 0 : user.quests) == null ? void 0 : _g.QuestSchoolOfSorcery) == null ? void 0 : _h.current_course) == null ? void 0 : _i.power_type;
showHornMessage({
title: "Power Type Reminder",
text: `The recommended power type for this course is ${powerType.charAt(0).toUpperCase() + powerType.slice(1)}.`,
image: `https://www.mousehuntgame.com/images/powertypes/${powerType}.png`,
type: "error",
button: "Switch",
action: () => {
let trapSelector = document.querySelector(".campPage-trap-armedItem.weapon");
trapSelector && trapSelector.click();
},
dismiss: 600090
});
}, school_of_sorcery_default2 = () => __async(void 0, null, function* () {
addHudStyles([
styles_default77,
styles_default103,
getSetting("location-huds.school-of-sorcery-clean-chalkboard", !1) && clean_chalkboard_default
]), highlightIfHighest(), onRequest("*", highlightIfHighest), showPowerTypeReminder(), onTurn(showPowerTypeReminder, 3e3);
});
}
});
var styles_default104, init_styles105 = __esm({
"src/modules/location-huds/locations/seasonal-garden/styles.css"() {
styles_default104 = `.seasonalGardenHUD-season.sg,.seasonalGardenHUD-season.sr,.seasonalGardenHUD-season.fl,.seasonalGardenHUD-season.wr{background:url(https://i.mouse.rip/seasonal-garden-season.png) no-repeat 0 0;transform:scale(1.3);transform-origin:bottom}.seasonalGardenHUD{background:url(https://i.mouse.rip/seasonal-garden-hud.png) no-repeat 0 0}.seasonalGardenHUD-season.sg:after,.seasonalGardenHUD-season.sr:after,.seasonalGardenHUD-season.fl:after,.seasonalGardenHUD-season.wr:after{position:absolute;inset:0;content:""}.seasonalGardenHUD-season.sg:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/spring_icon.png)}.seasonalGardenHUD-season.sr:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/summer_icon.png)}.seasonalGardenHUD-season.fl:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/fall_icon.png)}.seasonalGardenHUD-season.wr:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/winter_icon.png)}.seasonalGardenHUD-currentAmplifier{top:19px;font-size:15px;text-shadow:1px 1px 0 #ded3c1}.seasonalGardenHUD-currentAmplifier:before{position:absolute;top:-15px;left:10px;width:125px;padding:0 20px;font-size:12px;font-weight:900;color:#765e4c;content:"Tower Amplifier";background:radial-gradient(circle,#dac8ab 14%,#efe2cd 76%,transparent 100%)}.seasonalGardenHUD-maxAmplifier{top:34px;left:60px;display:flex;align-items:center;justify-content:center;width:75px;height:14px;padding:3px;text-align:center;background:radial-gradient(circle,#dac8ab 14%,#d7c1a4 76%,#c4b096);border-bottom-right-radius:40px;border-bottom-left-radius:40px}.seasonalGardenHUD-maxAmplifier:before{content:"Max:"}span.seasonalGardenHUD-maxAmplifier-value{font-size:15px;color:#000;text-shadow:1px 1px 0 #ded3c1}.seasonalGardenHUD-amplifierBoundingBox{width:80px;border-radius:30px}.seasonalGardenHUD-amplifierProgress{overflow:hidden}.seasonalGardenHUD-currentAmplifier:after{position:absolute;top:0;right:-6px;width:12px;height:19px;content:"";background:linear-gradient(249deg,#f6e5d0,#dfc9aa);border-top-left-radius:5px;border-bottom-left-radius:7px}.seasonalGardenHUD-amplifierProgress-bar{transition:width .2s cubic-bezier(.175,.885,.32,1.275);transform-origin:left;will-change:transform}.seasonalGardenHUD-amplifierProgress-bar--animating{animation:.3s mh-improved-bounce-and-stretch 2}@media (prefers-reduced-motion: reduce){.seasonalGardenHUD-amplifierProgress-bar--animating{animation:none}}.seasonalGardenHUD-amplifierBoundingBox .mousehuntTooltip{top:-10px;left:120px;width:460px;font-size:11px;line-height:1.6}.seasonalGardenHUD-amplifierBoundingBox .mousehuntTooltip .mousehuntTooltip-arrow{display:none}
`;
}
});
var makeProgressDraggable, changeBarColor, seasonal_garden_default, init_seasonal_garden2 = __esm({
"src/modules/location-huds/locations/seasonal-garden/index.js"() {
init_utils2();
init_styles105();
makeProgressDraggable = () => {
let progressBar = document.querySelector(".seasonalGardenHUD-amplifierProgress");
if (!progressBar)
return;
let progressBarMarker = document.querySelector(".seasonalGardenHUD-amplifierProgress-bar");
if (!progressBarMarker)
return;
let originalWidth = progressBarMarker.style.width, timeout = null;
progressBar.addEventListener("click", (e) => {
let rect = progressBar.getBoundingClientRect(), x = e.clientX - rect.left, width = rect.width, percent = Math.round(x / width * 100);
progressBarMarker.style.width = `${percent}%`, setTimeout(() => {
progressBarMarker.classList.add("seasonalGardenHUD-amplifierProgress-bar--animating");
}, 50), timeout && clearTimeout(timeout), timeout = setTimeout(() => {
progressBarMarker.style.width = originalWidth, setTimeout(() => {
progressBarMarker.classList.remove("seasonalGardenHUD-amplifierProgress-bar--animating");
}, 300);
}, 600);
});
}, changeBarColor = () => {
let trigger = document.querySelector(".seasonalGardenHUD-season");
if (!trigger)
return;
let bar = document.querySelector(".seasonalGardenHUD-amplifierProgress-bar");
bar && trigger.addEventListener("click", () => {
let hue = Math.round(Math.random() * 360);
bar.style.filter = `hue-rotate(${hue}deg)`;
});
}, seasonal_garden_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default104), makeProgressDraggable(), changeBarColor();
});
}
});
var slushy_shoreline_default, init_slushy_shoreline = __esm({
"src/modules/location-huds/locations/slushy-shoreline/index.js"() {
init_cheese_selectors();
slushy_shoreline_default = () => __async(void 0, null, function* () {
cheese_selectors_default("slushy-shoreline", ["toxic_super_brie_cheese"]);
});
}
});
var ss_huntington_ii_default, init_ss_huntington_ii = __esm({
"src/modules/location-huds/locations/ss-huntington-ii/index.js"() {
init_cheese_selectors();
ss_huntington_ii_default = () => __async(void 0, null, function* () {
cheese_selectors_default("ss-huntington-ii", ["galleon_gouda_cheese"]);
});
}
});
var styles_default105, init_styles106 = __esm({
"src/modules/location-huds/locations/sunken-city/styles.css"() {
styles_default105 = `.sunkenCityHud .leftSidebar{border:1px solid #333}.sunkenCityHud .leftSidebar .craftingItems{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:98px;padding:0;border-color:#7e7e7e;border-radius:0}.sunkenCityHud .leftSidebar .craftingItems a{line-height:initial;border-bottom:1px solid #7e7e7e;border-radius:0}.sunkenCityHud .leftSidebar .craftingItems a:first-child{margin-top:-3px}.sunkenCityHud .leftSidebar .craftingItems a:last-child{border-bottom:none}.sunkenCityHud .leftSidebar .craftingItems a img{width:30px;height:30px;border-radius:10px}.sunkenCityHud .leftSidebar .craftingItems a .item.quantity{display:inline-block;font-size:12px;vertical-align:middle}.sunkenCityHud .sunkenCharms{top:0;right:131px;bottom:0;display:grid;grid-template-columns:1fr 1fr;place-items:center stretch;padding-right:3px;background:#333;border:1px solid #7e7e7e;border-radius:5px 0 0 5px}.sunkenCityHud .sunkenCharms a{position:initial;padding:0 1px;margin-left:2px;background-color:#646465;border:none;border-radius:9px}.sunkenCityHud .sunkenCharms a.active{margin-left:2px;background-color:#19a0b8}.sunkenCityHud .sunkenCharms a .toolTip{top:10px;right:130px;left:unset;font-size:10px}.sunkenCityHud .sunkenCharms a .toolTip .arrow{display:none}.sunkenCityHud .sunkenCharms a:last-child,.sunkenCityHud .sunkenCharms a:nth-child(5){border-bottom:none}.sunkenCityHud .sunkenCharms a .itemImage{float:none;width:unset;height:unset}.sunkenCityHud .sunkenCharms a .clear-block{display:flex;align-items:center;justify-content:space-around}.sunkenCityHud .sunkenCharms a .quantity{margin-left:3px;font-size:13px;line-height:initial}.sunkenCityHud .sunkenCharms a .itemImage img{display:inline-block;width:25px;height:25px}.sunkenCityHud .sunkenCharms a .armNow,.sunkenCityHud .sunkenCharms a.disabled .armNow{display:none}.sunkenCityHud .sidebar,.sunkenCityHud .sidebarBox{width:130px}.sunkenCityHud .sidebar{height:98px;border:1px solid #7e7e7e;border-bottom-right-radius:3px}.sunkenCityHud .sidebar .oxygen{color:transparent}.sunkenCityHud .sidebar .oxygen .item,.sunkenCityHud .sidebar .oxygen .item.long{margin-left:3px;font-size:13px}.sunkenCityHud .sidebar .oxygen .item:after{position:absolute;width:25px;margin-left:10px;font-size:12px;color:#000;text-align:left;content:"O\\2082"}.sunkenCityHud .sidebar .diveButton{width:35px;height:20px;padding:2px;margin-right:3px;font-size:9px;line-height:22px;text-align:center;box-shadow:3px 3px 3px #ee9d47 inset,-5px -5px 50px #c66c0c inset}.sunkenCityHud .sidebarTitle{font-size:11px;letter-spacing:3px;background-color:#474747;border:none}.sunkenCityHud .sidebarContent{display:flex;flex-direction:column;justify-content:flex-start;border:none}.sunkenCityHud .diveControls{display:flex;align-items:center;border-top:1px solid #8b93a9;box-shadow:0 0 20px #fff inset,0 -6px 7px #4b587d inset}.sunkenCityHud .baitWarning{bottom:30%;left:154px;width:330px;font-size:12px;line-height:15px;color:#000;background-color:#ffbfbf;border-radius:10px;box-shadow:none}.sunkenCityHud .sidebarContent .zoneName{font-size:12px;white-space:nowrap}
`;
}
});
var updateHudImages, makeCharmElement, addMoreCharms, sunken_city_default2, init_sunken_city2 = __esm({
"src/modules/location-huds/locations/sunken-city/index.js"() {
init_utils2();
init_styles106();
updateHudImages = () => {
let upscaleMapping = {
"/crafting_items/thumbnails/1a7897042ba8f3fa31fa6805404456d6.gif": "/crafting_items/transparent_thumb/9197ccdec26278bfb07ab7846b1a2648.png",
// damaged coral.
"/crafting_items/thumbnails/4aaa6478c10308ac865507e4d7915b3c.gif": "/crafting_items/transparent_thumb/d7f3f77c87ea7849a2ec8bc3f7d05b74.png",
// mouse scale.
"/crafting_items/thumbnails/e12ed1306d81665278952d4b4349b495.gif": "/crafting_items/transparent_thumb/5057d634368131d5ab4ad62bf0963800.png",
// barnacle.
"/bait/1f6237cebe21954e53d6586b2cbdfe39.gif": "/bait/transparent_thumb/0d27e0c72c3cbdc8e9fe06fb7bdaa56d.png",
// fishy fromage.
"/trinkets/555bb67ba245aaf2b05db070d2b4cfcb.gif": "/trinkets/transparent_thumb/be6749a947b746fbece2754d9bd02f74.png",
// anchor.
"/trinkets/5f56cb017ff9414e584ced35b2491aef.gif": "/trinkets/transparent_thumb/2dc6b3e505fd1eaac8c6069937490386.png"
// water jet.
}, upscaleImage = (image) => {
let normalizedImage = image.src.replace("https://www.mousehuntgame.com/images/items", "").replace("?cv=1", "").replace("?cv=2", "").replace("?cv=3", "").replace("?v=1", "").replace("?v=2", "").replace("?v=3", "");
upscaleMapping[normalizedImage] && (image.src = `https://www.mousehuntgame.com/images/items/${upscaleMapping[normalizedImage]}`);
};
document.querySelectorAll(".sunkenCityHud .leftSidebar .craftingItems a img").forEach((image) => {
upscaleImage(image);
});
let baitImage = document.querySelector(".sunkenCityHud .sunkenBait .itemImage img");
baitImage && upscaleImage(baitImage), document.querySelectorAll(".sunkenCityHud .sunkenCharms a .itemImage img").forEach((charm) => {
upscaleImage(charm);
});
}, makeCharmElement = (charm, appendTo) => {
let existing = document.querySelector(`.mhui-sunken-charm[data-item-type="${charm.type}"]`);
existing && existing.remove();
let wrapper = makeElement("a", ["charm", "mhui-sunken-charm"]);
user.trinket_item_id == charm.item_id && wrapper.classList.add("active"), wrapper.setAttribute("href", "#"), wrapper.setAttribute("data-item-type", charm.type), wrapper.setAttribute("data-item-classification", "trinket"), wrapper.setAttribute("title", charm.name), wrapper.setAttribute("onclick", "app.views.HeadsUpDisplayView.hud.sunkenCityArmItem(this);return false;");
let clearBlock = makeElement("div", "clear-block"), itemImage = makeElement("div", "itemImage"), image = makeElement("img");
image.setAttribute("src", charm.thumbnail_transparent), itemImage.append(image), clearBlock.append(itemImage);
let quantity = makeElement("div", "item quantity", charm.quantity);
quantity.setAttribute("data-item-type", charm.type), clearBlock.append(quantity), wrapper.append(clearBlock), charm.type == "smart_water_jet_trinket" ? charm.description = "Overcharge your engine for a 500m boost with an automatic unequip after the hunt." : charm.type == "brilliant_water_jet_trinket" ? charm.description = "Supercharge your engine for a boost to the end of the current zone!" : charm.type == "spiked_anchor_trinket" ? charm.description = "Slow down your sub while also boosting your power!" : charm.type == "golden_anchor_trinket" && (charm.description = "Set your sub to super-slow and also find additional sand dollars!");
let toolTip = makeElement("div", "toolTip");
toolTip.innerHTML = `<b>${charm.name}s</b><br>${charm.description}`, wrapper.append(toolTip), appendTo.append(wrapper);
}, addMoreCharms = () => __async(void 0, null, function* () {
let charmsWrapper = document.querySelector(".sunkenCityHud .sunkenCharms");
if (!charmsWrapper)
return;
let existingCharms = charmsWrapper.querySelectorAll(".mhui-sunken-charm");
for (let charm of existingCharms)
charm.remove();
let itemsData = yield getUserItems([
"spiked_anchor_trinket",
"smart_water_jet_trinket",
"golden_anchor_trinket",
"brilliant_water_jet_trinket"
]);
if (user.trinket_item_id == 1517) {
let waterJetCharm = document.querySelector('.sunkenCityHud .sunkenCharms a[data-item-type="water_jet_trinket"]');
waterJetCharm && waterJetCharm.classList.add("active");
}
if (user.trinket_item_id == 423) {
let anchorCharm = document.querySelector('.sunkenCityHud .sunkenCharms a[data-item-type="anchor_trinket"]');
anchorCharm && anchorCharm.classList.add("active");
}
for (let item of itemsData)
makeCharmElement(item, charmsWrapper);
document.querySelectorAll(".sunkenCityHud .sunkenCharms a").forEach((charm) => {
charm.addEventListener("click", () => {
document.querySelectorAll(".sunkenCityHud .sunkenCharms a.active").forEach((item) => {
item.classList.remove("active");
}), charm.classList.toggle("active");
});
});
}), sunken_city_default2 = () => __async(void 0, null, function* () {
addHudStyles(styles_default105), updateHudImages(), addMoreCharms();
});
}
});
var MousePool, MouseStats, simulate2, updateWords, updateCR, getCatchRate, getEncounteredMouse, simulator_default2, init_simulator2 = __esm({
"src/modules/location-huds/locations/table-of-contents/simulator.js"() {
init_utils2();
MousePool = {
PreEncyclopedia: {
Grammarian: 1
},
Encyclopedia: {
Grammarian: 0.6,
Mythweaver: 0.4
}
}, MouseStats = {
Grammarian: {
Power: 9e4,
Eff: 4,
Points: 25e4
},
Mythweaver: {
Power: 2e5,
Eff: 7,
Points: 1e6
}
}, simulate2 = (options2) => {
updateWords(options2.Upgrades), updateCR(options2.TrapPower, options2.TrapLuck);
let debug4 = {}, volumeCountByVolume = {}, huntsByVolume = {};
for (let i = 0; i < options2.TotalSimulations; i++) {
let wordCount = options2.WritingSession.WordsWritten, huntsRemaining = options2.WritingSession.HuntsRemaining;
for (; huntsRemaining > 0; ) {
let stage = wordCount < 4e3 ? "PreEncyclopedia" : "Encyclopedia", mouse = getEncounteredMouse(stage), mouseStats2 = MouseStats[mouse];
Math.random() <= mouseStats2.CatchRate && (wordCount += mouseStats2.Words * (options2.WritingSession.FuelEnabled ? 2 : 1), mouse === "Mythweaver" && (huntsRemaining += 2)), huntsRemaining -= 1;
}
let totalVolumes = Math.floor(wordCount / 4e3);
volumeCountByVolume[totalVolumes] || (volumeCountByVolume[totalVolumes] = 0), volumeCountByVolume[totalVolumes] += 1, huntsByVolume[totalVolumes] || (huntsByVolume[totalVolumes] = 0), debug4[totalVolumes] || (debug4[totalVolumes] = []), debug4[totalVolumes].push({
wordCount,
totalVolumes
});
}
let volumesWritten = Object.keys(volumeCountByVolume).map(Number);
volumesWritten.sort((a, b) => a - b);
let minVolume = volumesWritten.at(0), maxVolume = volumesWritten.at(-1), results = {
chances: [],
mostLikely: {}
}, cumulativeChance = 1;
for (let volume = minVolume; volume <= maxVolume; volume++) {
if (!volumeCountByVolume[volume])
continue;
let chance = volumeCountByVolume[volume] / options2.TotalSimulations;
cumulativeChance -= chance, results.chances.push({
volume,
gnawbels: volume * 54,
words: volume * 4e3,
chance,
cumulativeChance
});
}
let mostLikelyVolume = Number(Object.keys(volumeCountByVolume).reduce((a, b) => volumeCountByVolume[a] > volumeCountByVolume[b] ? a : b));
return results.mostLikely = {
volume: mostLikelyVolume,
gnawbels: mostLikelyVolume * 54,
words: mostLikelyVolume * 4e3
}, debuglog("location-huds-table-of-contents", `Simulated ${options2.TotalSimulations} ToC runs.`, results), results;
}, updateWords = (upgrades) => {
Object.entries(MouseStats).forEach(([key, mouseStats2]) => {
let words = mouseStats2.Points / 1e3;
upgrades.HasSilverQuill && (words = Math.ceil(words * 1.25)), upgrades.HasGoldenQuill && (words = Math.ceil(words * 1.5)), MouseStats[key].Words = words;
});
}, updateCR = (power, luck) => {
Object.entries(MouseStats).forEach(([key, mouseStats2]) => {
MouseStats[key].CatchRate = getCatchRate(mouseStats2.Power, mouseStats2.Eff, power, luck);
});
}, getCatchRate = (mousePower, effectiveness2, power, luck) => Math.min(
1,
(effectiveness2 * power + 2 * Math.pow(Math.floor(Math.min(effectiveness2, 1.4) * luck), 2)) / (effectiveness2 * power + mousePower)
), getEncounteredMouse = (stage) => {
let totalWeight = 0, selected = "";
for (let [mouse, weight] of Object.entries(MousePool[stage]))
Math.random() >= totalWeight && (selected = mouse), totalWeight += weight;
return selected;
}, simulator_default2 = simulate2;
}
});
var simulator_styles_default, init_simulator_styles = __esm({
"src/modules/location-huds/locations/table-of-contents/simulator-styles.css"() {
simulator_styles_default = `#overlayPopup.mh-toc-popup .jsDialogContainer{background:linear-gradient(#2b622e,#142e16,#2b622e);outline:1px solid #2b622e}#overlayPopup.mh-toc-popup .jsDialogContainer .content{padding:10px 0 20px}#overlayPopup.mh-toc-popup .title{position:relative;padding:5px 5px 5px 45px;font-size:18px;color:#fff}.mh-toc-sim-results{display:grid;grid-template-columns:40% 45%;justify-content:space-evenly;justify-items:stretch;margin:0 1em;color:#fff}.mh-toc-sim-results .stats{display:flex;flex-direction:column;gap:3em;align-items:stretch;justify-content:space-between}.mh-toc-sim-results .stats .group{display:grid;gap:1em}.mh-toc-sim-results .result{display:grid;grid-template-columns:2fr 1fr;gap:1em;place-items:stretch;align-items:center}.mh-toc-sim-results .label{padding-left:10px;font-size:13px;line-height:30px;background-color:#c3c3c31a;border-radius:5px}.mh-toc-sim-results .value{position:relative;left:-5px;font-size:14px;line-height:30px;color:#eaeaea;text-align:center;background:linear-gradient(#146114,#549241);border:1px solid #123d1c;border-radius:5px}.mh-toc-sim-results .percents{margin-top:-30px}.mh-toc-sim-results ol{display:flex;flex-direction:column;align-items:stretch;height:100%;max-height:290px;overflow-x:auto;font-size:13px;color:#d2e5d2;background-color:#c3c3c31a;border-radius:3px;::-webkit-scrollbar{display:none}-ms-overflow-style:none;scrollbar-width:none}.mh-toc-sim-results .percents li{display:grid;grid-template-columns:repeat(4,1fr);place-items:center;padding:3px;margin-bottom:.25em;text-align:right}.mh-toc-sim-results .percents h3{padding-bottom:11px;font-size:16px;color:#fff}.mh-toc-sim-results .percents .header{position:sticky;top:0;padding:3px 0;font-size:13px;color:#c4c4c4;backdrop-filter:blur(8px);border-bottom:1px solid rgb(150 150 150 / 35%)}.mh-toc-sim-results .percents li:nth-child(odd){background-color:#c3c3c333}.mh-toc-sim-results .percents .guaranteed .number,.mh-toc-sim-results .percents .guaranteed .volume{color:#9ff593}.mh-toc-sim-results .percents .good .number,.mh-toc-sim-results .percents .good .volume{color:#7ebe7e}.mh-toc-sim-results .percents .maybe .number,.mh-toc-sim-results .percents .maybe .volume{color:#faee9e}.mh-toc-sim-results .percents .bad .number,.mh-toc-sim-results .percents .bad .volume{color:#fcd6b6}.mh-toc-sim-results .percents .worst .number,.mh-toc-sim-results .percents .worst .volume{color:#ff8181}.mh-toc-sim-results .percents li.expected{background-color:#2ba1c7b3}.mh-toc-sim-results .percents li.result .volume{font-size:16px}.mh-toc-sim-results .percents .words,.mh-toc-sim-results .percents .gnawbels{font-size:12px}.mh-toc-sim-results .percents .header .words{justify-self:center;font-size:10px;text-align:center}#overlayPopup.mh-toc-popup .title:before{position:absolute;top:0;bottom:0;left:0;width:35px;height:35px;content:"";background:url(https://www.mousehuntgame.com/images/folklore_forest_upgrades/leather_cover_thumb.png) no-repeat 0 0 / cover;opacity:.8}a.mh-toc-sim-link{position:absolute;right:20px;bottom:95px;width:40px;height:40px;color:transparent;background:url(https://i.mouse.rip/toc-sim.png) no-repeat bottom center / 40px;background-blend-mode:multiply;border-radius:50%}a.mh-toc-sim-link:hover{background:url(https://i.mouse.rip/toc-sim.png) no-repeat top center / 40px}a.mh-toc-sim-link .mousehuntTooltip{top:120%;right:-15px;width:60px;text-align:center}.tableOfContentsView-libraryButton{bottom:6px}.tableOfContentsView-disarmPreferenceButton{bottom:50px}.mh-toc-popup .info{position:absolute;bottom:30px;left:20px;margin:0;font-size:10px;color:#000}
`;
}
});
var styles_default106, init_styles107 = __esm({
"src/modules/location-huds/locations/table-of-contents/styles.css"() {
styles_default106 = `.folkloreForestRegionView-libraryStatsContainer{display:grid;grid-template-columns:1fr 1fr 1fr;justify-items:center;margin:10px 0 10px 10px}.folkloreForestRegionView-libraryStats.bestBook{padding:10px 15px;margin:10px 0;border:1px solid #2e602b;border-top:none;border-radius:30px}.folkloreForestRegionView-libraryStats.bestBook:after{display:none}.folkloreForestRegionView-libraryStats-label{max-width:130px;height:unset;padding:5px;font-size:13px;font-weight:400}.folkloreForestRegionView-libraryStats.bestBook .folkloreForestRegionView-libraryStats-value{gap:10px}.folkloreForestRegionView-libraryBestBook-name{min-width:100px;margin-bottom:5px;font-size:13px;line-height:15px}.folkloreForestRegionView-libraryStats.bestBook .folkloreForestRegionView-libraryStats-label{position:absolute;top:-16px;left:-10px;max-width:unset;padding:5px 10px;background-color:#6a9e43;border-radius:10px;box-shadow:0 1px 5px #070707;rotate:-10deg}.folkloreForestRegionView-libraryStats{display:flex;flex-direction:column;align-items:center;width:210px}.folkloreForestRegionView-libraryStats-value{height:unset}.folkloreForestRegionView-libraryStats-value.longestWritingSession{display:flex;flex-direction:row;column-gap:5px;align-items:baseline;justify-content:center;margin-left:30px}.folkloreForestRegionView-libraryBooksContainer{display:flex;flex-wrap:wrap;gap:20px;align-items:center;justify-content:center;padding-bottom:20px}.folkloreForestRegionView-libraryBook{width:auto;min-width:150px}.folkloreForestRegionView-libraryBook-words{font-size:12px;color:#b4c2ab}.folkloreForestRegionView-libraryBook-name{font-size:14px;font-weight:400}.folkloreForestRegionView-libraryBook-quantity{font-size:30px;color:#81eb00;text-shadow:1px 1px 1px #143706,0 1px 1px #143706,1px 0 1px #143706,0 0 1px #143706;filter:drop-shadow(0 0 2px #000)}.folkloreForestRegionView-libraryStats-value.bigText{color:#81eb00;text-shadow:1px 1px 1px #143706,0 1px 1px #143706,1px 0 1px #143706,0 0 1px #143706}.folkloreForestRegionView-libraryStats.totalWords{flex:1}.folkloreForestRegionView-libraryBook.disabled .tableOfContentsView-bookCover{filter:opacity(.8) grayscale(1)}.folkloreForestRegionView-libraryBook.disabled .folkloreForestRegionView-libraryBook-name{color:#979797}#overlayPopup.fabledForestDialog .title{font-size:19px;letter-spacing:1px}.tableOfContentsProgressView-nextBookContainer{position:absolute;bottom:-33px;padding:3px;font-size:11px;white-space:nowrap;background-color:#fdebab;box-shadow:0 1px 1px 1px #f1b960;transform:translate(-50%)}.tableOfContentsView-wordMeter-value{margin-right:2px;font-size:14px;border-radius:3px}.tableOfContentsProgressView-nextBook-wordsRequired{text-decoration:none}.tableOfContentsProgressView-book-huntsRemaining span{font-size:13px}.tableOfContentsProgressView-book-wordCount{margin:10px 0 5px}a.tableOfContentsProgressView-claimButton.reveal{filter:hue-rotate(80deg) brightness(1.2)}.tableOfContentsClaimDialogView-miceLoot .itemImage .quantity{font-size:13px;background-color:#fff9}.folkloreForestRegionView-boost{display:none}.tableOfContentsView-initialFuel-checkboxContainer{background-color:transparent}.tableOfContentsProgressView-progressBar-value{filter:sepia(1)}.tableOfContentsProgressView-progressBar{background:none;box-shadow:none}.tableOfContentsProgressView-cancelButton.active{top:-31px;left:338px;border-radius:50%;box-shadow:0 0 0 4px #48762a,inset 0 -1px 3px 1px #d7a086}.tableOfContentsView-wordMeterContainer{margin-right:-15px}.tableOfContentsView-wordMeter-label{width:50px}.folkloreForestRegionView-baitTOCCraftableContainer .folkloreForestRegionView-bait-image{position:absolute;top:0;left:-2px;width:40px;height:40px}.folkloreForestRegionView-bait-image:hover{background-size:100%;transform:scale(1.2)}a.folkloreForestRegionView-bait-image{transition:.2s ease-in}.folkloreForestRegionView-bait-range{padding-top:5px;font-size:13px;font-weight:900;text-align:center}.folkloreForestRegionView-baitTOCCraftableContainer .mousehuntTooltip{right:-40px;left:-40px;text-align:center}.folkloreForestRegionView-baitTOCCraftableContainer[data-item-type=thousandth_draft_derby_cheese] .mousehuntTooltip{right:-55px;left:-55px}.folkloreForestRegionView-baitTOCCraftableContainer .mousehuntTooltip b{font-size:12px;line-height:18px}.folkloreForestRegionView-environmentInventory-blockContainer{width:auto}.expanded .folkloreForestRegionView-environmentInventory-blockContainer{width:110px}.folkloreForestRegionView.table_of_contents .folkloreForestRegionView-environmentInventory.table_of_contents{width:80px}.folkloreForestRegionView.table_of_contents .expanded .folkloreForestRegionView-environmentInventory.table_of_contents{width:auto}.folkloreForestRegionView-environmentInventory-label{overflow:hidden;text-overflow:ellipsis}
`;
}
});
var displayResults2, getOptions, triggerSimPopup, doSimulation2, addSimulatorEvents2, addSimulatorIcon, updateWordLootQuantity, updateNextWordCount, table_of_contents_default2, init_table_of_contents2 = __esm({
"src/modules/location-huds/locations/table-of-contents/index.js"() {
init_utils2();
init_folklore_forest2();
init_keep_inventory_open();
init_simulator2();
init_styles78();
init_simulator_styles();
init_styles107();
displayResults2 = (results, timeTaken) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
let currentVolume = ((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestTableOfContents) == null ? void 0 : _b.current_book) == null ? void 0 : _c.volume) || 0, currentWordCount = ((_f = (_e = (_d = user == null ? void 0 : user.quests) == null ? void 0 : _d.QuestTableOfContents) == null ? void 0 : _e.current_book) == null ? void 0 : _f.word_count) || 0, expectedVolume = ((_g = results == null ? void 0 : results.mostLikely) == null ? void 0 : _g.volume) < currentVolume ? currentVolume : (_h = results == null ? void 0 : results.mostLikely) == null ? void 0 : _h.volume, expectedWords = ((_i = results == null ? void 0 : results.mostLikely) == null ? void 0 : _i.words) < currentWordCount ? currentWordCount : (_j = results == null ? void 0 : results.mostLikely) == null ? void 0 : _j.words, text = `<div class="mh-toc-sim-results">
<div class="stats">
<div class="group current">
<div class="result">
<div class="label">Current Volume</div>
<div class="value">${currentVolume}</div>
</div>
<div class="result">
<div class="label">Current Words</div>
<div class="value">${currentWordCount == null ? void 0 : currentWordCount.toLocaleString()}</div>
</div>
</div>
<div class="group mean">
<div class="result">
<div class="label">Expected Volume</div>
<div class="value">${expectedVolume.toLocaleString()}</div>
</div>
<div class="result">
<div class="label">Expected Words</div>
<div class="value">${expectedWords == null ? void 0 : expectedWords.toLocaleString()}</div>
</div>
</div>
<div class="group gnawbels">
<div class="result">
<div class="label">Expected Gnawbels</div>
<div class="value">${(_l = (_k = results == null ? void 0 : results.mostLikely) == null ? void 0 : _k.gnawbels) == null ? void 0 : _l.toLocaleString()}</div>
</div>
</div>
</div>
<div class="percents">
<ol>
<li class="header">
<span class="percent">Volume</span>
<span class="number">Chance</span>
<span class="words">Words Remaining</span>
<span class="gnabels">Gnawbels</span>
</li>`;
for (let chance of (results == null ? void 0 : results.chances) || []) {
chance.cumulativeChance >= 0.999 && (chance.cumulativeChance = 1);
let chancePercent = Math.floor(chance.cumulativeChance * 1e3) / 10;
if (chancePercent < 1 || chance.volume === currentVolume)
continue;
let classname = "normal";
switch (!0) {
case chancePercent >= 99:
classname = "guaranteed";
break;
case chancePercent >= 75:
classname = "good";
break;
case chancePercent >= 30:
classname = "maybe";
break;
case chancePercent <= 2:
classname = "worst";
break;
case chancePercent <= 10:
classname = "bad";
break;
}
chance.volume === expectedVolume && (classname += " expected");
let wordsToGo = chance.words - currentWordCount;
wordsToGo < 0 && (wordsToGo = 0), text += `<li class="result ${classname}">
<span class="volume">${chance.volume}</span>
<span class="number">${chancePercent.toFixed(1)}%</span>
<span class="words">${wordsToGo == null ? void 0 : wordsToGo.toLocaleString()}</span>
<span class="gnawbels">${(_m = chance.gnawbels) == null ? void 0 : _m.toLocaleString()}</span>
</li>`;
}
return text += "</ol></div></div>", text += `<div class="info">Simulated ${getOptions().TotalSimulations.toLocaleString()} writing sessions with Final Draft Derby equipped in ${(timeTaken / 1e3).toFixed(3)}s.</div>`, text;
}, getOptions = () => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
return {
TotalSimulations: 1e5,
TrapPower: (user == null ? void 0 : user.trap_power) || 0,
TrapLuck: (user == null ? void 0 : user.trap_luck) || 0,
Upgrades: {
HasEdgeGilding: ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestTableOfContents) == null ? void 0 : _b.has_improved_paper) || !1,
HasGoldFoilPrinting: ((_d = (_c = user == null ? void 0 : user.quests) == null ? void 0 : _c.QuestTableOfContents) == null ? void 0 : _d.has_gold_foil) || !1,
HasSilverQuill: ((_f = (_e = user == null ? void 0 : user.quests) == null ? void 0 : _e.QuestTableOfContents) == null ? void 0 : _f.has_silver_quill) || !1,
HasGoldenQuill: ((_h = (_g = user == null ? void 0 : user.quests) == null ? void 0 : _g.QuestTableOfContents) == null ? void 0 : _h.has_golden_quill) || !1
},
WritingSession: {
HuntsRemaining: ((_j = (_i = user == null ? void 0 : user.quests) == null ? void 0 : _i.QuestTableOfContents) == null ? void 0 : _j.current_book.hunts_remaining) || 0,
WordsWritten: ((_l = (_k = user == null ? void 0 : user.quests) == null ? void 0 : _k.QuestTableOfContents) == null ? void 0 : _l.current_book.word_count) || 0,
FuelEnabled: ((_n = (_m = user == null ? void 0 : user.quests) == null ? void 0 : _m.QuestTableOfContents) == null ? void 0 : _n.is_fuel_enabled) || !1
}
};
}, triggerSimPopup = () => {
let startTimestamp = Date.now(), data = simulator_default2(getOptions()), timeTaken = Date.now() - startTimestamp, popup = createPopup({
title: "Encyclopedia Simulation",
content: displayResults2(data, timeTaken),
show: !1
});
popup.setAttributes({ className: "mh-toc-popup" }), popup.show();
}, doSimulation2 = (selector) => {
let simPopup = document.querySelector(selector);
simPopup && simPopup.addEventListener("click", triggerSimPopup);
}, addSimulatorEvents2 = () => {
doSimulation2(".tableOfContentsProgressView-book-wordCount"), doSimulation2(".tableOfContentsProgressView-book-huntsRemaining");
}, addSimulatorIcon = () => {
let bookHud = document.querySelector(".folkloreForestRegionView-environmentHud");
if (!bookHud)
return;
let existing = document.querySelector(".mh-toc-sim-link");
existing && existing.remove();
let simLink = makeElement("a", ["mh-toc-sim-link", "mousehuntTooltipParent"], "View Encyclopedia Simulation");
simLink.title = "Simulate Encyclopedia writing";
let tooltip = makeElement("div", ["mousehuntTooltip", "tight", "bottom", "noEvents"], "View Encyclopedia Simulation");
makeElement("div", "mousehuntTooltip-arrow", "", tooltip), simLink.append(tooltip), simLink.addEventListener("click", triggerSimPopup), bookHud.append(simLink);
}, updateWordLootQuantity = () => {
let lootSpan = document.querySelector(".tableOfContentsView-wordMeter-value");
if (!lootSpan)
return;
let lootParts = lootSpan.innerText.split("-");
lootParts.length > 1 && lootParts[0] === lootParts[1] && (lootSpan.innerText = lootParts[0]);
}, updateNextWordCount = () => {
let wordsRequired = document.querySelector(".tableOfContentsProgressView-nextBook-wordsRequired");
wordsRequired && (wordsRequired.innerText = wordsRequired.getAttribute("title").replace(" words", ""));
}, table_of_contents_default2 = () => __async(void 0, null, function* () {
addHudStyles([styles_default77, simulator_styles_default, styles_default106]), folklore_forest_default2(), addSimulatorIcon(), addSimulatorEvents2(), updateWordLootQuantity(), onRequest("environment/table_of_contents.php", updateWordLootQuantity), updateNextWordCount(), onTurn(() => {
updateNextWordCount(), setTimeout(updateNextWordCount, 500), setTimeout(updateNextWordCount, 1e3);
}), keep_inventory_open_default({
setting: "location-huds.table-of-contents-inventory-toggled",
buttonSelector: ".folkloreForestRegionView-environmentInventory-expandButton",
inventorySelector: ".folkloreForestRegionView-environmentInventoryContainer",
inventoryOpenClass: "expanded",
buttonOpenClass: "expanded"
});
});
}
});
var tournament_hall_default, init_tournament_hall = __esm({
"src/modules/location-huds/locations/tournament-hall/index.js"() {
init_cheese_selectors();
tournament_hall_default = () => __async(void 0, null, function* () {
cheese_selectors_default("tournament-hall", ["runny_cheese"]);
});
}
});
var town_of_digby_default, init_town_of_digby = __esm({
"src/modules/location-huds/locations/town-of-digby/index.js"() {
init_cheese_selectors();
town_of_digby_default = () => __async(void 0, null, function* () {
cheese_selectors_default("town-of-digby", ["limelight_cheese"]);
});
}
});
var styles_default107, init_styles108 = __esm({
"src/modules/location-huds/locations/town-of-gnawnia/styles.css"() {
styles_default107 = `.townOfGnawniaHUD-intro{line-height:17px}.townOfGnawniaHUD-bountyRewardContainer{background:#e5c9a8 url(https://www.mousehuntgame.com/images/items/stats/large/f659a8a07d3877df4165b188f13bb0db.png) 5px 0 no-repeat;background-size:contain}.townOfGnawniaHUD-mouse-bait-thumb{background-color:#c19d74;outline:2px solid #886843}.townOfGnawniaHUD-mouse-bait-name{font-size:13px}.townOfGnawniaHUD-mouse-image.reveal{animation-name:town-of-gnawnia-mouse-reveal-new}@media screen and (prefers-reduced-motion: reduce){.townOfGnawniaHUD-mouse-image{animation:none}}@keyframes town-of-gnawnia-mouse-reveal-new{0%{opacity:0;transform:scale(.1) rotate(30deg);transform-origin:center bottom}50%{transform:rotate(-10deg)}70%{transform:rotate(3deg)}to{opacity:1;transform:scale(1)}}
`;
}
});
var town_of_gnawnia_default, init_town_of_gnawnia = __esm({
"src/modules/location-huds/locations/town-of-gnawnia/index.js"() {
init_utils2();
init_styles108();
town_of_gnawnia_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default107);
});
}
});
var styles_default108, init_styles109 = __esm({
"src/modules/location-huds/locations/train-station/styles.css"() {
styles_default108 = `.pendingTrainContainer .trainTableBody{height:340px}.trainStationHUD{height:400px}.trainStationHUD .trainStationPhase .wrongEnvironment b{position:absolute;top:-41px;box-sizing:border-box;height:32px;padding:3px 10px;font-weight:400;line-height:30px;vertical-align:middle;background-color:#ffbfbf}.mousehuntHud-marbleDrawer .tournamentStatusHud.hasError.train{height:32px;overflow:hidden}.pendingTrainContainer .trainRow:hover,.pendingTrainContainer .trainRow:nth-child(2n):hover{background-color:#645052}
`;
}
});
var train_station_default, init_train_station = __esm({
"src/modules/location-huds/locations/train-station/index.js"() {
init_utils2();
init_styles109();
train_station_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default108);
});
}
});
var styles_default109, init_styles110 = __esm({
"src/modules/location-huds/locations/windmill/styles.css"() {
styles_default109 = `.windmillHud-helpContainer-section-quantity{font-size:12px;font-weight:49;color:#000}.windmillHud-bossContainer.complete:after{position:absolute;inset:0;display:block;content:"";background:url(https://www.mousehuntgame.com/images/ui/hud/windmill/boss.png) 0 100% no-repeat;filter:drop-shadow(2px 4px 4px #16240a)}.windmillHud-helpContainer-section-content{top:-5px;right:0;left:57px;height:80px;line-height:13px}.windmillHud-helpContainer-section-title{margin-bottom:5px}.windmillHud-bonusContainer{top:34px;left:110px;display:flex;align-items:center;justify-content:center;width:105px;height:67px;padding:0;font-size:11px;text-align:center}.windmillHud-bonusContainer.none .windmillHud-bonus.none,.windmillHud-bonusContainer.low .windmillHud-bonus.low,.windmillHud-bonusContainer.ultra_low .windmillHud-bonus.ultra_low,.windmillHud-bonusContainer.medium .windmillHud-bonus.medium,.windmillHud-bonusContainer.high .windmillHud-bonus.high,.windmillHud-bonusContainer.max .windmillHud-bonus.max{line-height:1.4}.windmillHud-bonusContainer.none{font-size:13px}.windmillHud-bonusContainer.low .windmillHud-bonus.low,.windmillHud-bonusContainer.medium .windmillHud-bonus.medium{font-size:12px}.windmillHud-speed{left:17px;display:flex;align-items:center;justify-content:center;width:80px;height:20px;font-size:13px;font-weight:900;user-select:none}.windmillHud-speed span{margin-right:5px}
`;
}
});
var start, spinNeedle, windmill_default, init_windmill = __esm({
"src/modules/location-huds/locations/windmill/index.js"() {
init_utils2();
init_styles110();
spinNeedle = () => {
let needle = document.querySelector(".windmillHud-needle");
if (!needle)
return;
let speed = document.querySelector(".windmillHud-speed");
if (!speed || (start = needle.style.transform.match(/rotate\(([^)]+)\)/), !start.length > 1))
return;
start = Number.parseInt(start[1].replace("deg", ""), 10);
let timeout, spins = 1;
speed.addEventListener("click", () => {
needle.style.transition = "transform 0.4s", needle.style.transform = `rotate(${start + 360 * spins}deg)`, spins += 1, clearTimeout(timeout), timeout = setTimeout(() => {
needle.style.transition = "none", needle.style.transform = `rotate(${start}deg)`, spins = 1;
}, spins * 400);
});
}, windmill_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default109), spinNeedle();
});
}
});
var styles_default110, init_styles111 = __esm({
"src/modules/location-huds/locations/zugzwang-tower/styles.css"() {
styles_default110 = `.zuzwangsTowerHUD-progress{overflow:visible;counter-reset:chess 0}.zuzwangsTowerHUD-progress img{position:relative;display:inline-block;counter-increment:chess 1}.zuzwangsTowerHUD:hover .zuzwangsTowerHUD-progress:after{position:absolute;top:0;right:0;display:block;padding:2px;margin-right:-40px;font-size:10px;color:#000;content:counter(chess) "/15";background-color:#dcccb3;border-radius:10px}.zuzwangsTowerHUD-amplifierBoundingBox .mousehuntTooltip{left:86px}.zuzwangsTowerHUD-amplifierBoundingBox .mousehuntTooltip .mousehuntTooltip-arrow{display:none}.zuzwangsTowerHUD-currentAmplifier{top:19px;font-size:15px;text-shadow:1px 1px 0 #ded3c1}.zuzwangsTowerHUD:before{position:absolute;top:4px;left:125px;padding:0 20px;font-size:12px;font-weight:900;color:#765e4c;content:"Tower Amplifier";background:radial-gradient(circle,#dac8ab 14%,#efe2cd 76%,transparent 100%)}a.zugzwangsTowerHUD-retreatButton.mousehuntTooltipParent{top:95px}.zugzwangsTowerHUD-retreatButton:hover{background-color:#7d2b2b}
`;
}
});
var zugzwang_tower_default, init_zugzwang_tower2 = __esm({
"src/modules/location-huds/locations/zugzwang-tower/index.js"() {
init_utils2();
init_styles111();
zugzwang_tower_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default110);
});
}
});
var styles_default111, init_styles112 = __esm({
"src/modules/location-huds/locations/region-living-garden/styles.css"() {
styles_default111 = `.livingGardenHud .essenceContainer .item{padding-top:26px;padding-bottom:5px;font-size:14px;text-shadow:0 0 4px #5e5e5e}.livingGardenHud .itemContainer .itemImage .quantity{right:1px;bottom:1px;padding:2px 3px;font-size:12px;font-weight:400}.livingGardenHud.desert_oasis .minigameContainer .pourEstimate{top:45px;font-size:12px}.livingGardenHud.desert_oasis.corrupted .minigameContainer.drops .itemImage .quantity{padding:1px 2px;font-size:12px}.livingGardenHud .itemContainer .itemImage:hover{opacity:.9}.livingGardenHud .essenceContainer .item:hover{border-radius:7px;box-shadow:inset 0 0 5px 2px #8cffde}.livingGardenHud .essenceContainer .item.essence_a_crafting_item{display:inline;padding-left:0;margin-left:23px;text-align:center}.itemImage.dewthief_petal_crafting_item:before,.itemImage.dreamfluff_herbs_crafting_item:before,.itemImage.duskshade_petal_crafting_item:before{position:absolute;top:-26px;left:-2px;z-index:1;padding:4px;font-size:12px;font-weight:900;text-align:center;text-shadow:1px 1px 0 #2e1800;content:"Garden";background-color:#412200}.itemImage.dewthief_petal_crafting_item:before{right:-2px;left:-9px;padding-left:6px;color:#2f9d31;border-top-left-radius:10px}.livingGardenHud.desert_oasis .itemImage.dewthief_petal_crafting_item:before{color:#7fd981}.itemImage.dreamfluff_herbs_crafting_item:before{right:-2px;left:-3px;color:#079dbb;content:"City"}.livingGardenHud.lost_city .itemImage.dreamfluff_herbs_crafting_item:before{color:#91e9fb}.itemImage.duskshade_petal_crafting_item:before{right:-8px;left:-3px;padding-left:2px;color:#d48321;content:"Desert";border-top-right-radius:10px}.livingGardenHud.sand_dunes .itemImage.duskshade_petal_crafting_item:before{color:#f4daba}.livingGardenHud .itemContainer .itemImage,.livingGardenHud .itemContainer .itemImage:hover img,.livingGardenHud .itemContainer .itemImage:hover .quantity,.livingGardenHud .itemContainer .itemImage.faded:hover img,.livingGardenHud .itemContainer .itemImage.faded:hover .quantity{overflow:visible;opacity:1}.livingGardenHud .itemContainer .itemImage.faded img,.livingGardenHud .itemContainer .itemImage.faded .quantity{opacity:.4}.travelHudLg>div{display:none}.livingGardenHud.corrupted .minigameContainer .curseContainer .curse.active:after{position:absolute;right:13px;bottom:0;left:15px;padding:2px;font-size:11px;font-weight:900;text-align:center;content:"cursed!";background-color:#050605;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.livingGardenHud.corrupted .minigameContainer .curseContainer .curse.mist.active:after{color:#086c6a;content:"Clarity";background-color:#8bf7f5;box-shadow:-3px 0 5px 1px #8bf7f5,3px 0 5px -1px #8bf7f5}.livingGardenHud.corrupted .minigameContainer .curseContainer .curse.darkness.active:after{color:#68a856;text-shadow:0 0 3px #63765f;content:"Shine";background-color:#050605;box-shadow:-7px 4px 5px -1px #649e53,7px 2px 5px -1px #649e53}.livingGardenHud.corrupted .minigameContainer .curseContainer .curse.fear.active:after{text-shadow:0 0 1px #fee236;content:"Bravery";background-color:#f09036;box-shadow:-7px 2px 5px -1px #da7b34,5px 2px 5px -1px #da7b34}.livingGardenHud.lost_city.corrupted .curse.active .curseActive{display:flex;flex-direction:column;align-items:center;text-align:center}.livingGardenHud .minigameContainer .curseContainer .curse.active .help{inset:20px 18px 20px 20px;display:block;width:unset;height:unset;padding:5px;visibility:hidden;background-color:transparent}.livingGardenHud .minigameContainer .curseContainer .curse.active .help img{inset:5px 0 0 6px;width:45px;height:45px;filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #fff) drop-shadow(0 0 3px #fff) drop-shadow(0 0 4px #fff) drop-shadow(0 0 5px #fff)}.livingGardenHud .minigameContainer .curseContainer .curse.active:hover .help{visibility:visible}.livingGardenHud .minigameContainer .curseContainer .curse.active .help b{position:absolute;top:-22px;right:-5px;left:-5px;padding-top:2px;font-size:12px;visibility:visible;border-top-left-radius:5px;border-top-right-radius:5px}.livingGardenHud .minigameContainer .curseContainer .curse.mist.active .help b{color:#086c6a;content:"Clarity";background-color:#8bf7f5;box-shadow:-3px 0 5px 1px #8bf7f5,3px 0 5px -1px #8bf7f5}.livingGardenHud .minigameContainer .curseContainer .curse.darkness.active .help b{color:#68a856;text-shadow:0 0 3px #63765f;content:"Shine";background-color:#050605;box-shadow:-5px -3px 5px -2px #649e53,6px -2px 5px -2px #649e53}.livingGardenHud .minigameContainer .curseContainer .curse.fear.active .help b{text-shadow:0 0 1px #fee236;content:"Bravery";background-color:#f09036;box-shadow:-7px 2px 5px -1px #da7b34,5px 2px 5px -1px #da7b34}.livingGardenHud .minigameContainer .curseContainer .curse.active{cursor:pointer}.livingGardenHud .minigameContainer .curseContainer .curse.active .help span{display:none}.livingGardenHud.lost_city.corrupted .curse{display:block!important;visibility:hidden}.livingGardenHud.lost_city.corrupted .curse .corruptedispelled{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;visibility:visible;background-color:#f6ffd4;box-shadow:inset 0 0 5px #000}.livingGardenHud.lost_city.corrupted .curse.active{visibility:visible}.livingGardenHud.lost_city.corrupted .curse .corruptedispelled b{font-size:11px;text-decoration:line-through}.livingGardenHud.lost_city.corrupted .curse .corruptedispelled br{display:none}.livingGardenHud .minigameContainer{z-index:1}.livingGardenHud{margin-top:25px;margin-bottom:20px}.livingGardenHud .spongeDoubleYellow{width:55px}.livingGardenHud .essenceContainer a.livingGardenRecipes:hover{background-image:url(https://i.mouse.rip/living-garden/recipe_rollover-new.png)}.livingGardenHud.desert_oasis.normal{background-image:url(https://i.mouse.rip/living-garden/living_garden_bg.png)}.livingGardenHud.desert_oasis.corrupted{background-image:url(https://i.mouse.rip/living-garden/twisted_garden_bg.png)}.livingGardenHud.lost_city.normal{background-image:url(https://i.mouse.rip/living-garden/lost_city_bg.png);border-bottom-right-radius:35px;border-bottom-left-radius:15px}.livingGardenHud.lost_city.corrupted{background-image:url(https://i.mouse.rip/living-garden/cursed_city_bg.png)}.livingGardenHud.sand_dunes.normal{background-image:url(https://i.mouse.rip/living-garden/grubling_bg.png)}.livingGardenHud.sand_dunes.corrupted{background-image:url(https://i.mouse.rip/living-garden/king_grub_bg.png)}.livingGardenHud .minigameContainer .minigameHelp{bottom:5px;font-size:11px;line-height:1.5}.livingGardenHud.lost_city.corrupted .minigameContainer.blessed{visibility:visible}.livingGardenHud.desert_oasis.normal .minigameContainer.drops .itemImage img{background-color:#5fafaf7f}
`;
}
});
var clickCharmsToEquip, region_living_garden_default, init_region_living_garden = __esm({
"src/modules/location-huds/locations/region-living-garden/index.js"() {
init_utils2();
init_styles112();
clickCharmsToEquip = () => {
let charms = document.querySelectorAll(".livingGardenHud .minigameContainer .curseContainer .curse.active"), charmMap = {
fear: 1011,
darkness: 1019,
mist: 1012
};
charms.forEach((charm) => {
let charmClass = [...charm.classList].find((c) => c !== "curse" && c !== "active");
charm.addEventListener("click", () => {
charmClass in charmMap && (hg.utils.TrapControl.armItem(charmMap[charmClass], "trinket"), hg.utils.TrapControl.go());
}), charm.title = "Click to equip charm";
});
}, region_living_garden_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default111), clickCharmsToEquip();
});
}
});
var styles_default112, init_styles113 = __esm({
"src/modules/location-huds/locations/region-queso/styles.css"() {
styles_default112 = `.quesoHUD-wildTonic-quantity.quantity{top:4px;left:42px;padding:1px;font-size:13px;line-height:initial;text-shadow:1px 1px 1px #825842}.quesoHUD-bait-group-baitQuantity.quantity{z-index:1;font-size:12px;text-shadow:1px 1px 1px #715c4e;border-radius:4px}.ember_root_crafting_item .quesoHUD-bait-group-craftingQuantity.quantity,.ember_stone_crafting_item .quesoHUD-bait-group-craftingQuantity.quantity{position:absolute;top:5px;right:-20px;z-index:1;display:block;font-size:12px;text-shadow:1px 1px 1px #715c4e;background-color:#715c4eab;border-radius:4px}.quesoGeyserHUD .quesoHUD-bait-group .mousehuntItem-image{background-color:#e8c4ab}.quesoGeyserHUD .disabled .mousehuntItem-image{top:1px;left:-1px;box-shadow:0 0 20px #333 inset}.quesoGeyserHUD .quesoHUD-bait-group-spiceImage .mousehuntItem-image{top:0;left:-2px;width:25px;height:25px;background-color:transparent;background-size:100%}.quesoGeyserHUD .quesoHUD-bait-group.bland_queso_cheese .mousehuntItem-image{top:-2px}.quesoGeyserHUD-nestBlock:hover .quesoGeyserHUD-nestBlock-image-transition{opacity:1;transition:opacity .3s ease-in-out}.quesoHUD-bait-group:hover .quesoHUD-bait-group-tooltip{padding:4px 3px;font-size:12px;background-color:#505050;border:none;border-radius:10px}.quesoCanyonHUD-pump-nachore-padding span.quantity{font-size:11px}.quesoGeyserHUD-block-title.quesoGeyserHUD-stateName{margin:2px 8px 1px;font-size:12px;background-color:#723b14;box-shadow:0 0 5px -1px inset #90542a}#hudLocationContent .quesoGeyserHUD:hover .quesoHUD-wildTonic-button.selected:after{transform-origin:center;animation:mh-improved-shake-light .45s 2}@media (prefers-reduced-motion: reduce){#hudLocationContent .quesoGeyserHUD:hover .quesoHUD-wildTonic-button.selected:after{animation:none}}.quesoGeyserHUD-block-huntsRemaining{padding-top:4px;padding-bottom:2px;font-size:38px}.quesoGeyserHUD-block-huntsRemaining-label.eruption.claim{font-size:10px;color:#d7d7d7;text-transform:lowercase}.quesoGeyserHUD-craftingItem-quantity.quantity{font-size:13px;background-color:#815942;border-radius:3px;box-shadow:0 0 5px -1px inset #90542a}.quesoHUD-bait-group-spiceQuantity.quantity{top:29px;font-size:12px}.quesoGeyserHUD .quesoHUD-bait-group.bland_queso_cheese .quesoHUD-bait-group-baitQuantity{top:18px;padding-left:3px;background-color:#634736;border-top-left-radius:5px;border-bottom-left-radius:5px;box-shadow:0 0 5px -1px inset #90542a}.quesoCanyonHUD.showBossCheese .quesoHUD-bait-group.super_brie_cheese .quesoHUD-bait-group-baitQuantity{right:26px}.quesoHUD-bait-group{display:inline-block}.quesoGeyserHUD-craftingItem-image,.quesoHUD-bait-group-cheeseImage .mousehuntItem-image,.quesoHUD-bait-group-spiceImage .mousehuntItem-image{background-color:transparent}.quesoHUD-bait-group-spiceImage .mousehuntItem-image{border:none;box-shadow:none}.quesoHUD-crafting-recipe-part .itemImage{background-color:transparent;box-shadow:none}.quesoCanyonHUD-basicBait-item .mousehuntItem.hidden{display:block;margin:0 auto}.quesoCanyonHUD-basicBait-item .mousehuntItem,.quesoCanyonHUD-basicBait-item .mousehuntItem.hidden{margin-bottom:10px}.quesoCanyonHUD-basicBait-item .mousehuntItem-boundingBox.hidden{display:block}.quesoCanyonHUD-basicBait-item .mousehuntItem,.quesoCanyonHUD-basicBait-item .mousehuntItem-image{background-color:transparent;border:none;box-shadow:none}.quesoCanyonHUD-basicBait-item .mousehuntItem-image:after{border:none}.mousehuntItem-quantity.quantity{padding:2px;font-size:10px;box-shadow:0 0 100px #fff inset,0 0 2px #333}.quesoHUD-crafting-recipe-actionContainer .mousehuntActionButton{margin-right:-5px;margin-left:-5px}.quesoHUD-crafting-recipe.queso_river_boss_cheese .quesoHUD-crafting-recipe-actionContainer .mousehuntActionButton{margin-right:-7px;margin-left:-7px}.quesoCanyonHUD-basicBait-item .mousehuntItem-boundingBox.hidden:after{position:absolute;top:-10px;content:"Arm"}.quesoHUD-crafting-recipe{display:flex;flex-direction:row;align-items:stretch;height:145px}.quesoHUD-crafting-recipe-actionContainer{align-self:center}.quesoHUD-crafting-recipe.queso_river_boss_cheese .quesoHUD-crafting-recipe-part{width:18%}.quesoHUD-crafting-recipe.queso_river_boss_cheese .quesoHUD-crafting-recipe-actionContainer{width:28%}.quesoCanyonHUD-pump-level{font-size:14px;text-shadow:-1px 1px 1px #000}.quesoHUD-crafting-recipe.queso_river_boss_cheese .quesoHUD-crafting-recipe-part .itemImage{width:75px;height:75px}.quesoHUD-crafting-recipe-action-quantity{font-size:9px}.quesoHUD-crafting-recipe-action-quantity span{font-size:13px}.quesoHUD-crafting-recipe-quantity{padding:1px 8px}.quesoCanyonHUD-basicBait-item .mousehuntItem-boundingBox:after{position:absolute;bottom:-40px;display:flex;align-items:center;width:53px;height:17px;content:"";background:url(https://www.mousehuntgame.com/images/ui/hud/train_station/phasetab_button.png) 0 0 no-repeat}.quesoCanyonHUD-basicBait-item .mousehuntItem-boundingBox:hover:after{background-position:0 -17px}.quesoCanyonHUD-basicBait-item .active .mousehuntItem-boundingBox:after{filter:hue-rotate(131deg);background-position:0 -34px}.quesoCanyonHUD-basicBait-item-name{padding-bottom:15px}.quesoHUD-warning.quesoHUD-powerTypeWarning{left:286px}.quesoHUD-warning{font-size:12px;background-color:#ffc5c5;border-color:#992023}.quesoGeyserHUD-claim-dustQuantity.quantity{top:40px;height:20px;font-size:14px;line-height:20px}.quesoGeyserPopup-mouse-loot-item .itemImage{box-shadow:none}.quesoGeyserHUD-cork-requirement-imagePadding{overflow:hidden;border-color:#f5bea1;border-radius:0}.quesoGeyserHUD-cork-requirement-quantityContainer{height:26px;font-size:11px;box-shadow:none}.quesoGeyserHUD-cork-requirement.hasEnough .quesoGeyserHUD-cork-requirement-quantityContainer{box-shadow:none}.quesoHUD-confirm-content-tabWrapper{min-height:210px}.quesoGeyserHUD-help-image{width:80px;height:80px;background-color:transparent}.quesoGeyserHUD-help-title{margin-bottom:5px}.quesoGeyserHUD-help-mouse .quesoGeyserHUD-help-image{border:1px solid #000;box-shadow:none}.quesoGeyserHUD-craftingItem:hover .quesoGeyserHUD-craftingItem-image{background-color:transparent;filter:brightness(1.2);transform:scale(1.1)}.quesoGeyserHUD-craftingItem-name{font-size:10px;background-color:#0000007f;border-top:none}.medium_queso_cheese .quesoHUD-bait-group-tooltip{right:-5px;left:-5px}.quesoHUD-warning.quesoHUD-baitWarning{top:50px;width:auto}.quesoGeyserHUD-craftingItem-image{width:31px;height:25px;background-color:#ab826e;background-size:cover}.highlight .quesoGeyserHUD-craftingItem-quantity.quantity{color:#b9ff5d}.error .quesoGeyserHUD-craftingItem-quantity.quantity{color:#ffacac}.quesoGeyserHUD-craftingItem.highlight .quesoGeyserHUD-craftingItem-image{background-size:cover}.quesoGeyserHUD-block-huntsRemaining-label{font-size:9px}.quesoHUD-bait-group-tooltip{border-radius:10px}.quesoHUD-warning.quesoHUD-baitWarning .quesoHUD-trapSelectorLink:after{top:0}
`;
}
});
var region_queso_default, init_region_queso = __esm({
"src/modules/location-huds/locations/region-queso/index.js"() {
init_utils2();
init_styles113();
region_queso_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default112);
});
}
});
var updateDateTooltip, spaceNumbers, updateDateDates, init_shared = __esm({
"src/modules/location-huds/locations/event-locations/shared.js"() {
updateDateTooltip = (selector) => {
let tooltip = document.querySelector(selector);
tooltip && (tooltip.getAttribute("data-changed") || (tooltip.classList.add("bottom"), tooltip.classList.remove("top"), tooltip.setAttribute("data-changed", "true")));
}, spaceNumbers = (text) => text.replaceAll(/(\d+)/g, " $1 ").trim(), updateDateDates = (remainingSelector, textSelector = !1) => {
let badge = document.querySelector(remainingSelector);
if (badge) {
if (badge.getAttribute("data-changed"))
return;
badge.innerHTML = spaceNumbers(badge.innerHTML), badge.setAttribute("data-changed", "true");
}
if (!textSelector)
return;
let tooltip = document.querySelector(textSelector);
if (tooltip) {
if (tooltip.getAttribute("data-changed"))
return;
tooltip.innerHTML = spaceNumbers(tooltip.innerHTML), tooltip.setAttribute("data-changed", "true");
}
};
}
});
var styles_default113, init_styles114 = __esm({
"src/modules/location-huds/locations/event-locations/birthday/styles.css"() {
styles_default113 = `.superBrieFactoryHUD-vendingMachine-quantity.quantity,.superBrieFactoryHUD-item-quantity.quantity{font-size:12px;line-height:15px}.superBrieFactoryHUD-itemContainer.boss_ticket .superBrieFactoryHUD-item-quantity.quantity{padding:1px;margin-right:-2px;font-size:12px;line-height:12px;background-color:#f6f3eb;border:1px solid #aeb1b0;border-radius:2px}.superBrieFactoryHUD-pipeProgress{font-size:10px}.superBrieFactoryHUD-vendingMachine-quantity{min-width:30px;margin-right:4px;text-align:right}.superBrieFactoryHUD-factoryRoom.mixing_room,.superBrieFactoryHUD-factoryRoom.break_room,.superBrieFactoryHUD-factoryRoom.pumping_room,.superBrieFactoryHUD-factoryRoom.quality_assurance_room{box-sizing:border-box;padding:2px;border:1px solid #000}.superBrieFactoryHUD-factoryRoom.mixing_room,.superBrieFactoryHUD-factoryRoom.break_room,.superBrieFactoryHUD-factoryRoom.pumping_room,.superBrieFactoryHUD-factoryRoom.quality_assurance_room,.superBrieFactoryHUD-factoryRoom.mixing_room:before,.superBrieFactoryHUD-factoryRoom.break_room:before,.superBrieFactoryHUD-factoryRoom.pumping_room:before,.superBrieFactoryHUD-factoryRoom.quality_assurance_room:before{background-repeat:no-repeat;background-size:100%}.superBrieFactoryHUD-factoryRoom.mixing_room{background-image:url(https://www.mousehuntgame.com/images/ui/events/birthday_factory/active_mixing_room.jpg)}.superBrieFactoryHUD-factoryRoom.break_room{background-image:url(https://www.mousehuntgame.com/images/ui/events/birthday_factory/active_break_room.jpg);background-size:contain}.superBrieFactoryHUD-factoryRoom.pumping_room{background-image:url(https://www.mousehuntgame.com/images/ui/events/birthday_factory/active_pump_room.jpg)}.superBrieFactoryHUD-factoryRoom.quality_assurance_room{background-image:url(https://www.mousehuntgame.com/images/ui/events/birthday_factory/active_qa_room.jpg)}.superBrieFactoryHUD-factoryRoom.mixing_room:before,.superBrieFactoryHUD-factoryRoom.break_room:before,.superBrieFactoryHUD-factoryRoom.pumping_room:before,.superBrieFactoryHUD-factoryRoom.quality_assurance_room:before{background-image:none}.superBrieFactoryHUD-factoryRoom:before{border-color:#fe9ff1;border-width:1px;border-radius:1px;outline:1px solid #dc4a9e;box-shadow:inset 0 0 2px 1px #87378f}.superBrieFactoryHUD-factoryRoom:after{top:44px;left:3px;width:149px;background-color:#15ff46;background-image:none;filter:invert(1);mix-blend-mode:color;opacity:.3}.superBrieFactoryHUD-factoryRoom:nth-child(2) .superBrieFactoryHUD-factoryRoom-level,.superBrieFactoryHUD-factoryRoom:nth-child(4) .superBrieFactoryHUD-factoryRoom-level{left:43px}.superBrieFactoryHUD-room-name{margin-top:5px;font-size:12px}.superBrieFactoryHUD-room-effectPrefix{margin-bottom:4px;font-size:10px}.superBrieFactoryHUD-room-costLevel.level_max{margin-top:5px}.level_5 .superBrieFactoryHUD-room-cost-levelNumber{display:none}.level_5 .superBrieFactoryHUD-room-cost-effect{margin-left:-6px}.superBrieFactoryHUD-room-costLevel{margin-top:5px}.superBrieFactoryHUD-factoryRoom-level{left:75.5px}.superBrieFactoryHUD-showControlPanelButton:after{background-color:#4cc2a6;border-radius:4px}.superBrieFactoryHUD-craftingItem.active .quantity:before{position:absolute;inset:8px 0 0;display:block;content:""}.superBrieFactoryHUD-craftingItem .quantity{position:absolute;inset:4px 5px 2px 15px;display:flex;align-items:center;justify-content:flex-end;padding-right:3px;margin-right:-10px;background-color:#f6f3eb;border:1px solid #aeb1b0;border-radius:2px}.superBrieFactoryHUD-craftingItem.active .quantity{color:#fff;text-shadow:none;background-color:#338577;border-color:#2dc49f}.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_break_room_stat_item]:after,.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_mixing_room_stat_item]:after,.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_pumping_room_stat_item]:after,.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_quality_assurance_room_stat_item]:after{position:absolute;top:-4px;left:-16px;width:20px;height:20px;content:"";background-size:contain}.superBrieFactoryHUD-craftingItem.active .quantity[data-item-type=birthday_factory_break_room_stat_item]:after,.superBrieFactoryHUD-craftingItem.active .quantity[data-item-type=birthday_factory_mixing_room_stat_item]:after,.superBrieFactoryHUD-craftingItem.active .quantity[data-item-type=birthday_factory_pumping_room_stat_item]:after,.superBrieFactoryHUD-craftingItem.active .quantity[data-item-type=birthday_factory_quality_assurance_room_stat_item]:after{transform:scale(1.3)}.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_break_room_stat_item]:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/4a52c6d8607991a93d3167ac401802ec.png)}.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_mixing_room_stat_item]:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/2396577aacb317979238844ae30b62c1.png)}.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_pumping_room_stat_item]:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/c3c5cb340c3949ba5280c63b2f552a19.png)}.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_quality_assurance_room_stat_item]:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/97bb19e8f5ae6cc29a7a0f312a1a3b14.png)}.superBrieFactoryHUD-item-boundingBox{z-index:1}.superBrieFactoryHUD-item-boundingBox[data-item-type=coggy_colby_cheese]:before,.superBrieFactoryHUD-item-boundingBox[data-item-type=speed_coggy_colby_cheese]:before,.superBrieFactoryHUD-item-boundingBox[data-item-type=birthday_factory_trinket]:before{position:absolute;inset:-16px 0 0 -1px;content:"";background-repeat:no-repeat;background-size:45px;transition:transform .3s;transform:rotate(351deg)}.superBrieFactoryHUD-item-boundingBox[data-item-type=coggy_colby_cheese]:before{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/39a63a48084383a7eb07d64c74357544.png)}.superBrieFactoryHUD-item-boundingBox[data-item-type=speed_coggy_colby_cheese]:before{top:-15px;background-image:url(https://www.mousehuntgame.com/images/items/bait/large/9326f63ea3644631c5fe8360ea4ffdf5.png)}.superBrieFactoryHUD-item-boundingBox[data-item-type=birthday_factory_trinket]:before{top:-9px;left:5px;background-image:url(https://www.mousehuntgame.com/images/items/trinkets/large/907ce5291e023dedae8ed33c98546743.png);background-size:36px;transform:rotate(0)}.superBrieFactoryHUD-item-boundingBox:hover:before{transform:scale(1.3)}.superBrieFactoryHUD-item-quantity.quantity{position:relative;z-index:2}.superBrieFactoryHUD-factoryRoom:hover .superBrieFactoryHUD-factoryRoom-level-dot{animation:mh-improved-hue-rotate-and-scale 1s 1}.superBrieFactoryHUD-factoryRoom:hover .superBrieFactoryHUD-factoryRoom-level-dot:nth-child(1){animation-delay:0s}.superBrieFactoryHUD-factoryRoom:hover .superBrieFactoryHUD-factoryRoom-level-dot:nth-child(2){animation-delay:.2s}.superBrieFactoryHUD-factoryRoom:hover .superBrieFactoryHUD-factoryRoom-level-dot:nth-child(3){animation-delay:.4s}.superBrieFactoryHUD-factoryRoom:hover .superBrieFactoryHUD-factoryRoom-level-dot:nth-child(4){animation-delay:.5s}.superBrieFactoryHUD-factoryRoom:hover .superBrieFactoryHUD-factoryRoom-level-dot:nth-child(5){animation-delay:.6s}@media (prefers-reduced-motion: reduce){.superBrieFactoryHUD-factoryRoom:hover .superBrieFactoryHUD-factoryRoom-level-dot{animation:none}.superBrieFactoryHUD-item-boundingBox:hover:before{transform:none}}.superBrieFactoryVendingMachinePopup .superBrieFactoryVendingMachineView-numTokens{top:202px;right:57px;background:transparent;border:none;box-shadow:none}.superBrieFactoryHUD .superBrieFactoryHUD-dateCountdownMiniWrapper{top:-10px}.hudLocationContent.super_brie_factory{filter:drop-shadow(0 1px 2px #000)}.superBrieFactoryVendingMachineView-snackPack-cost{font-size:14px;line-height:15px;text-shadow:0 2px #343440}.superBrieFactoryVendingMachineView-snackPack:hover .superBrieFactoryVendingMachineView-snackPack-cost{text-shadow:0 2px #f7d877}.superBrieFactoryVendingMachineView{background-image:url(https://i.mouse.rip/bday/vending-machine-2.png)}.vending-machine-can{position:absolute;right:1px;bottom:40px;width:40px;height:53px;content:"";background-image:url(https://i.mouse.rip/bday/vending-machine-can.png);background-repeat:no-repeat;background-size:contain}.vending-machine-hat{position:absolute;top:23px;right:41px;z-index:1;width:38px;height:21px;content:"";background-image:url(https://i.mouse.rip/bday/vending-machine-hat-2.png);background-repeat:no-repeat;background-size:contain}.superBrieFactoryHUD-dateCountdownMiniWrapper.mousehuntTooltipParent .mousehuntTooltip{top:40px}.superBrieFactoryClaimReward-item .itemImage{border:none}
`;
}
});
var changeColors, birthdayGlobal, birthdayLocation, init_birthday2 = __esm({
"src/modules/location-huds/locations/event-locations/birthday/index.js"() {
init_utils2();
init_shared();
init_styles114();
changeColors = () => {
let popup = document.querySelector(".superBrieFactoryVendingMachinePopup");
if (!popup)
return;
let can = makeElement("div", "vending-machine-can"), updateColor = () => {
let hue = Math.floor(Math.random() * 360);
can.style.filter = `hue-rotate(${hue}deg)`;
};
can.addEventListener("click", updateColor), updateColor(), popup.append(can);
let hat = makeElement("div", "vending-machine-hat"), initialMouseX = 0, initialHatX = 0, isDragging = !1;
hat.addEventListener("mousedown", (event) => {
isDragging = !0, initialMouseX = event.clientX, initialHatX = Number.parseInt(window.getComputedStyle(hat).left, 10);
}), document.addEventListener("mousemove", (event) => {
if (isDragging) {
let deltaX = event.clientX - initialMouseX, newPosition = initialHatX + deltaX;
newPosition >= 25 && newPosition <= 415 && (hat.style.left = `${newPosition}px`);
}
}), document.addEventListener("mouseup", () => {
isDragging = !1;
}), popup.append(hat);
}, birthdayGlobal = () => {
}, birthdayLocation = () => __async(void 0, null, function* () {
addHudStyles(styles_default113), setMultipleTimeout(() => {
updateDateTooltip(".superBrieFactoryHUD-dateCountdownMiniWrapper.mousehuntTooltipParent .mousehuntTooltip"), updateDateDates(".superBrieFactoryHUD-dateCountdownMiniContainer .dateCountdownMini__remainingText", ".superBrieFactoryHUD-dateCountdownMiniWrapper.mousehuntTooltipParent .mousehuntTooltip .dateCountdown__datesContainer .dateCountdown__remainingText");
}, [100, 500, 1e3]), onDialogShow("superBrieFactoryVendingMachinePopup", () => {
setTimeout(changeColors, 500);
});
});
}
});
var styles_default114, init_styles115 = __esm({
"src/modules/location-huds/locations/event-locations/great-winter-hunt/styles.css"() {
styles_default114 = `.headsUpDisplayWinterHuntRegionView__golemPartQuantity.quantity{margin-top:-2px;margin-right:1px;margin-left:0;font-size:12px;background-color:#4484a2;border-radius:3px;box-shadow:inset 0 0 0 1px #154b6f}.headsUpDisplayWinterHuntRegionView__golemPart:nth-child(3) .headsUpDisplayWinterHuntRegionView__golemPartQuantity.quantity{margin-right:-2px;margin-left:2px}.headsUpDisplayWinterHuntRegionView__golemPart:nth-child(2) .headsUpDisplayWinterHuntRegionView__golemPartQuantity.quantity{margin-right:-1px;margin-left:1px}.headsUpDisplayWinterHuntRegionView__golemPart:nth-child(4) .headsUpDisplayWinterHuntRegionView__golemPartQuantity.quantity{padding-top:0;padding-bottom:2px;margin-top:4px;margin-right:0;margin-left:0;color:#133850;background:linear-gradient(90deg,#0c5168 1%,#95c2d3 10%,#a8d3e0 16% 84%,#6ba1bb 92%,#0c5168 96%);border-radius:0 0 3px 3px;box-shadow:inset 1px -2px 2px -1px #0b3f55}.headsUpDisplayWinterHuntRegionView__golemPart:nth-child(5) .headsUpDisplayWinterHuntRegionView__golemPartQuantity.quantity{padding-top:1px;padding-bottom:1px;margin-top:-2px;margin-right:-1px;margin-left:1px;color:#133850;background-color:#a8d3e0;box-shadow:inset 0 0 1px 1px #5f9bb4}.headsUpDisplayWinterHuntRegionView__golemBuffQuantity.quantity{font-size:11px;color:#133850}.headsUpDisplayWinterHuntRegionView__golemUpgradeCost{position:absolute;top:6px;right:22px;left:24px;display:flex;align-items:center;justify-content:center;height:15px;padding:2px;margin-left:-1px;font-size:12px;color:#86c8e4;text-align:center;background-color:#18536d;border:1px solid #915211;border-radius:10px;box-shadow:inset 0 0 2px 1px #113346,1px -2px 1px -1px #e9c320,-8px 6px 0 -6px #6c5528}.headsUpDisplayWinterHuntRegionView__golemUpgradeCost:after{display:none}.headsUpDisplayWinterHuntRegionView__golemLevel{align-items:center;justify-content:center;margin-top:1px}.headsUpDisplayWinterHuntRegionView__environmentItemQuantity.quantity{font-size:13px}.headsUpDisplayWinterHuntRegionView__cinnamon{margin-bottom:9px}.headsUpDisplayWinterHuntRegionView__fuelQuantity.quantity{font-size:13px}.headsUpDisplayWinterHuntRegionView__baitImageButton{filter:drop-shadow(0 0 3px #a8d3e0);background-position:-1px -4px;background-size:41px;border-radius:50%}.headsUpDisplayWinterHuntRegionView__basicBaitContainer.super_brie_cheese .headsUpDisplayWinterHuntRegionView__baitImageButton{background-position:-3px -4px;border-radius:50%}.greatWinterHuntGolemManagerLaunchTabView__toggleButton{background:linear-gradient(to bottom,#fff9f9 50%,#71a4eb);border:none}.greatWinterHuntGolemManagerLaunchTabView__toggleButton--disabled{filter:grayscale(1);opacity:.7}.greatWinterHuntGolemManagerLaunchTabView__toggleItemQuantity{padding:4px;font-size:13px}.greatWinterHuntGolemManagerLaunchTabView__toggleItemImage{top:-10px;left:-11px;width:40px;height:40px}.greatWinterHuntDialogView__footerItemQuantity.quantity{padding:3px;font-size:13px;border-radius:5px;box-shadow:inset 0 0 1px 1px #a8d3e0}.greatWinterHuntDialogView__inventoryFooter .headsUpDisplayWinterHuntRegionView__plusButton{position:absolute;right:-15px;display:none;width:19px;height:19px;background-size:cover;border-radius:2px;box-shadow:0 0 1px 1px #527e8f}.greatWinterHuntDialogView__inventoryFooter:hover button.headsUpDisplayWinterHuntRegionView__plusButton,.greatWinterHuntDialogView__inventoryFooter:focus button.headsUpDisplayWinterHuntRegionView__plusButton,.greatWinterHuntDialogView__inventoryFooter:active button.headsUpDisplayWinterHuntRegionView__plusButton{display:block}.headsUpDisplayWinterHuntRegionView__golemHuntsRemaining{display:flex;align-items:center;justify-content:center;height:26px;padding-top:0;margin-top:1px;font-size:15px;line-height:unset;background-color:#0d3650;border-radius:5px 1px 1px 5px;box-shadow:inset 0 0 2px 2px #5d747f}.headsUpDisplayWinterHuntRegionView__golemChatMessage span{display:flex;width:unset;padding-bottom:2px;font-size:10px;line-height:10px}.headsUpDisplayWinterHuntRegionView__golemChatMessage:before{top:100%}.headsUpDisplayWinterHuntRegionView__golem:nth-child(1) .headsUpDisplayWinterHuntRegionView__golemChatMessage{padding:3px;transform:rotate(-5deg) translate(-10px) translateY(-25px)}.headsUpDisplayWinterHuntRegionView__golem:nth-child(2) .headsUpDisplayWinterHuntRegionView__golemChatMessage{padding:3px;transform:translateY(-25px)}.headsUpDisplayWinterHuntRegionView__golem:nth-child(3) .headsUpDisplayWinterHuntRegionView__golemChatMessage{padding:3px;transform:rotate(5deg) translate(10px) translateY(-25px)}.headsUpDisplayWinterHuntRegionView__golem .headsUpDisplayWinterHuntRegionView__golemChatMessage{opacity:0;transition:opacity .3s}.headsUpDisplayWinterHuntRegionView__golem:hover .headsUpDisplayWinterHuntRegionView__golemChatMessage,.headsUpDisplayWinterHuntRegionView__golem:focus .headsUpDisplayWinterHuntRegionView__golemChatMessage,.headsUpDisplayWinterHuntRegionView__golem:active .headsUpDisplayWinterHuntRegionView__golemChatMessage{opacity:1}.winterHuntGolemView__golem{z-index:11;overflow:visible;pointer-events:none;filter:drop-shadow(0 0 4px #18536d);transform:translateY(-8px)}.winterHuntGolemView__head,.winterHuntGolemView__arms,.winterHuntGolemView__legs,.winterHuntGolemView__torso,.winterHuntGolemView__scarf{transform:scale(1.6)}.greatWinterHuntClaimRewardDialogView__golem .winterHuntGolemView__head,.greatWinterHuntClaimRewardDialogView__golem .winterHuntGolemView__arms,.greatWinterHuntClaimRewardDialogView__golem .winterHuntGolemView__legs,.greatWinterHuntClaimRewardDialogView__golem .winterHuntGolemView__torso,.greatWinterHuntClaimRewardDialogView__golem .winterHuntGolemView__scarf{transform:scale(1.3) translate(10px)}.winterHuntGolemView.winterHuntGolemView--idleAnimation .winterHuntGolemView__head,.winterHuntGolemView.winterHuntGolemView--idleAnimation:hover .winterHuntGolemView__head,.winterHuntGolemView.winterHuntGolemView--idleAnimation:focus .winterHuntGolemView__head,.winterHuntGolemView.winterHuntGolemView--idleAnimation:active .winterHuntGolemView__head{transform-origin:48% 51%}.winterHuntGolemView__background{box-shadow:0 0 25px 25px #e0f7fd inset}@keyframes golemLegWiggle{0%{transform:scale(1.6) rotate(2deg)}50%{transform:scale(1.6) rotate(-2deg)}to{transform:scale(1.6) rotate(2deg)}}@keyframes golemArmWiggle{0%{transform:scale(1.6) rotate(8deg)}50%{transform:scale(1.6) rotate(-8deg)}to{transform:scale(1.6) rotate(8deg)}}@keyframes golemHeadWiggle{0%{transform:scale(1.6) translateY(-3px)}50%{transform:scale(1.6) translateY(3px)}to{transform:scale(1.6) translateY(-3px)}}@keyframes golemHeadWiggleExcited{0%{transform:scale(1.6) translateY(-5px)}50%{transform:scale(1.6) translateY(1px)}to{transform:scale(1.6) translateY(-5px)}}@keyframes golemJump{0%{transform:scaleY(.28)}20%{transform:scaleY(.96)}50%{transform:scaleY(1.6) translateY(-8.5%)}60%{transform:scaleY(1.6) translateY(-8%)}95%{transform:scaleY(1.52) translateY(1%)}to{transform:scaleY(1.6) translateY(0)}}.greatWinterHuntGolemManagerDialogView__activeGolem{overflow:visible}.activeJsDialog .headsUpDisplayWinterHuntRegionView__golemChatMessage{display:none}.greatWinterHuntGolemManagerDialogView__golemPanel{background-color:#32748c}.greatWinterHuntGolemManagerDialogView__golemPreview .winterHuntGolemView__background{border-bottom:1px solid #3887a3;box-shadow:0 0 40px 76px #99cadc inset,0 11px 10px -6px #52b1d3}.greatWinterHuntGolemManagerDialogView__golem .winterHuntGolemView{width:60px}.greatWinterHuntGolemManagerDialogView__golem{width:33%;margin:0}.greatWinterHuntGolemManagerDialogView__golemUpgradeButton{position:absolute;bottom:-25px;left:5px;display:flex;flex-direction:row;width:90%;font-size:13px;background-position-x:45px;transform-origin:0 -40px}.greatWinterHuntGolemManagerDialogView__golem:hover,.greatWinterHuntGolemManagerDialogView__golem:focus,.greatWinterHuntGolemManagerDialogView__golem:active{transform:none}.greatWinterHuntGolemManagerDialogView__golem:hover button.greatWinterHuntGolemManagerDialogView__golemSelectButton,.greatWinterHuntGolemManagerDialogView__golem:focus button.greatWinterHuntGolemManagerDialogView__golemSelectButton,.greatWinterHuntGolemManagerDialogView__golem:active button.greatWinterHuntGolemManagerDialogView__golemSelectButton{transform:scale(1.1)}.greatWinterHuntGolemManagerDialogView__golem .greatWinterHuntGolemManagerDialogView__golemSelectButton{filter:brightness(.9)!important}.greatWinterHuntGolemManagerUpgradeTabView__itemQuantity{margin-top:35px;font-size:14px;background:#d8f0ff;border:1px solid #000;box-shadow:none}.greatWinterHuntGolemManagerUpgradeTabView__item--box{background-color:#96e3fd;border-width:1px}.greatWinterHuntDialogView__bigButtonInlineCostQuantity{margin-top:12px;font-size:19px;box-shadow:0 0 20px 4px #074762 inset}.greatWinterHuntDialogView__bigButtonInlineCost{margin-right:20px}.greatWinterHuntDialogView__button{filter:saturate(.6)}.greatWinterHuntGolemManagerReturnTabView__progressContainer b{display:block;font-size:15px}.greatWinterHuntGolemManagerReturnTabView__progressContainer b:after,.greatWinterHuntGolemManagerReturnTabView__progressContainer b:before{content:" \\1f389\\fe0f  "}.greatWinterHuntGolemManagerReturnTabView__instantReturnBellCost{padding:0 3px 1px;margin:0 -3px -1px -5px;font-size:23px;background:linear-gradient(23deg,#e78700,#d16e07);border-radius:3px;box-shadow:-1px -3px 5px -3px #f9a148}.greatWinterHuntGolemManagerReturnTabView__instantReturnButton--disabled .greatWinterHuntGolemManagerReturnTabView__instantReturnBellCost{background:linear-gradient(23deg,#8d8d8d,#7e7e7e);box-shadow:none}.greatWinterHuntRecycleDialogView__itemQuantity.quantity{top:185px;right:unset;left:unset;min-width:40px;font-size:18px;background-color:#ffffffbf}.greatWinterHuntRecycleDialogView__item{align-items:center}.greatWinterHuntRecycleDialogView__action{border-radius:4px}.greatWinterHuntRecycleDialogView__craftCost:before{font-size:24px;content:"\\2212"}.greatWinterHuntRecycleDialogView__smashYield:before{font-size:24px;content:"+"}.greatWinterHuntRecycleDialogView__golemRequirement{margin-bottom:3px;font-size:13px}.greatWinterHuntRecycleDialogView__action:after{position:absolute;top:60px;left:-10px;width:20px;height:10px;content:""}.greatWinterHuntRecycleDialogView__golemRequirementContainer{margin-left:-10px}.greatWinterHuntRecycleDialogView__golemRequirementTitle{padding-bottom:4px;color:#1863bf}.greatWinterHuntRecycleDialogView__item:nth-child(1) .greatWinterHuntRecycleDialogView__itemQuantity.quantity{top:175px}.possibleGolems .greatWinterHuntDialogView__footerItemQuantity.quantity{background-color:#51516e;box-shadow:inset 0 0 1px 1px #6ea0d1}.greatWinterHuntDialogView__footerItemSeperator{width:50px}.headsUpDisplayWinterHuntIceFortressView__shieldLabel.headsUpDisplayWinterHuntIceFortressView__shieldLabel--active{top:6px;font-size:11px;background-color:#273852;border-radius:13px}.headsUpDisplayWinterHuntRegionView__hailstones .headsUpDisplayWinterHuntRegionView__resourceCost{top:39px;font-size:14px;background-color:#8de3e4}.greatWinterHuntRecycleDialogView__itemQuantity.quantity[data-item-type=golem_part_limb_stat_item]{display:flex;gap:4px;align-items:center;justify-content:space-evenly}.headsUpDisplayWinterHuntGolemWorkshopView__droidButton .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining{top:172px;left:54px;width:20px;font-size:14px;background:linear-gradient(54deg,#c87d0e,#9f510c);border-radius:4px}.headsUpDisplayWinterHuntGolemWorkshopView__droidButton:nth-child(2) .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining{left:55px}.headsUpDisplayWinterHuntGolemWorkshopView__droidButton:nth-child(3) .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining{left:56px}.headsUpDisplayWinterHuntGolemWorkshopView__droidButton--inactive .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining{background:linear-gradient(90deg,#7d3415,#5a231c)}.headsUpDisplayWinterHuntGolemWorkshopView__droidButton--inactive:hover .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining,.headsUpDisplayWinterHuntGolemWorkshopView__droidButton--inactive:focus .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining,.headsUpDisplayWinterHuntGolemWorkshopView__droidButton--inactive:active .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining{background:linear-gradient(112deg,#91492a,#602726)}.headsUpDisplayWinterHuntGolemWorkshopView__droidButton--active:hover .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining,.headsUpDisplayWinterHuntGolemWorkshopView__droidButton--active:focus .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining,.headsUpDisplayWinterHuntGolemWorkshopView__droidButton--active:active .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining{background:linear-gradient(54deg,#e77f14,#b8590f)}#overlayPopup.greatWinterHuntDialog{margin-top:30px}.greatWinterHuntClaimRewardDialogView__title{padding-left:20px}.greatWinterHuntGolemManagerDialogView__destinationViewContainer--active{z-index:11}button.greatWinterHuntGolemManagerDialogView__randomizeButton{top:15px}.greatWinterHuntGolemManagerDialogView__activeGolemControls.greatWinterHuntGolemManagerDialogView__activeGolemControls--decrement{right:-25px;left:unset;border-radius:10px 0 0 10px}.greatWinterHuntGolemManagerDialogView__partButton{opacity:1}.greatWinterHuntGolemManagerDialogView__activeGolemControls--increment{right:-45px}.greatWinterHuntGolemManagerDialogView__activeGolemControls:hover,.greatWinterHuntGolemManagerDialogView__activeGolemControls:focus,.greatWinterHuntGolemManagerDialogView__activeGolemControls:active,.greatWinterHuntGolemManagerDialogView__activeGolem:hover .greatWinterHuntGolemManagerDialogView__activeGolemControls,.greatWinterHuntGolemManagerDialogView__activeGolem:focus .greatWinterHuntGolemManagerDialogView__activeGolemControls,.greatWinterHuntGolemManagerDialogView__activeGolem:active .greatWinterHuntGolemManagerDialogView__activeGolemControls{z-index:12;opacity:.8}.greatWinterHuntGolemManagerDialogView__activeGolemControls{top:40px;padding:20px 5px 0;background-color:#32748c;opacity:.1}.greatWinterHuntGolemManagerDialogView__activeGolemControls.greatWinterHuntGolemManagerDialogView__activeGolemControls--increment{border-radius:0 10px 10px 0}.greatWinterHuntGolemManagerDialogView__activeGolemContent .winterHuntGolemView--hasScarf .winterHuntGolemView__scarf{top:15px}.headsUpDisplayWinterHuntRegionView__warning{width:170px;padding:10px;font-size:13px;font-weight:900;line-height:20px;color:#2f2a2a;text-align:center;border:none}.headsUpDisplayWinterHuntRegionView__trapWarningContainer .greatWinterHuntDialogView{top:25%;z-index:11}.headsUpDisplayWinterHuntRegionView__trapWarningContainer.headsUpDisplayWinterHuntRegionView__trapWarningContainer--active{filter:drop-shadow(0 0 7px #000)}.headsUpDisplayWinterHuntRegionView__trapWarningContainer.headsUpDisplayWinterHuntRegionView__trapWarningContainer--active .greatWinterHuntDialogView__content{display:flex;flex-wrap:wrap;align-items:center;justify-content:center}.greatWinterHuntRewardTrackView--allRewardsClaimed .greatWinterHuntRewardTrackView__claimedLabel{color:transparent;background:transparent}.greatWinterHuntRewardTrackView--allRewardsClaimed .greatWinterHuntRewardTrackView__bar{filter:hue-rotate(347deg);transition:none}.greatWinterHuntRewardTrackView__golem:hover{animation:wallDamageWiggleSmall .3s infinite}.greatWinterHuntRewardTrackView__golem:focus,.greatWinterHuntRewardTrackView__golem:active{animation-name:wallDamageWiggle}@media (prefers-reduced-motion: reduce){.greatWinterHuntRewardTrackView__golem,.greatWinterHuntRewardTrackView__golem:hover,.greatWinterHuntRewardTrackView__golem:focus,.greatWinterHuntRewardTrackView__golem:active{animation:none}}.headsUpDisplayWinterHuntGolemWorkshopView__droidButton .mousehuntTooltip{bottom:30%}.greatWinterHuntNewYearsDialogView__shopsButton{transition:none}.greatWinterHuntNewYearsDialogView__itemImage{background-size:contain}#overlayPopup.winter_hunt_profile_tree_possible_gifts .suffix{display:flex;flex-direction:row;align-items:center;justify-content:flex-end}#overlayPopup.winter_hunt_profile_tree_possible_gifts .wrappingGoldCost{order:1;margin-right:10px}#overlayPopup.winter_hunt_profile_tree_possible_gifts .suffix .cancelGift{order:5}#overlayPopup.winter_hunt_profile_tree_possible_gifts .suffix .sendGift{order:10}#overlayPopup.winter_hunt_profile_tree_possible_gifts .giftCostContainer{line-height:2}#overlayPopup.winter_hunt_profile_tree_possible_gifts .recipientContainer img{width:100px;height:100px}#overlayPopup.winter_hunt_profile_tree_possible_gifts .recipientContainer{padding:10px;border:1px solid #ccc;border-radius:5px}#overlayPopup.winter_hunt_profile_tree_possible_gifts .winter_hunt_profile_tree_possible_gifts-search{padding:5px;margin:10px;font-size:12px}#overlayPopup.winter_hunt_profile_tree_possible_gifts .winter_hunt_profile_tree_possible_gifts-clearSearch{top:10px;right:12px}#overlayPopup.winter_hunt_profile_tree_possible_gifts .winter_hunt_profile_tree_possible_gifts-clearSearch:hover,#overlayPopup.winter_hunt_profile_tree_possible_gifts .winter_hunt_profile_tree_possible_gifts-clearSearch:focus,#overlayPopup.winter_hunt_profile_tree_possible_gifts .winter_hunt_profile_tree_possible_gifts-clearSearch:active{color:#e33f3f;text-decoration:none}#overlayPopup.winter_hunt_profile_tree_possible_gifts .giftChannel-title{margin-bottom:10px}#overlayPopup.winter_hunt_profile_tree_possible_gifts .recipient{float:right;padding:10px;margin:-25px 20px 0 10px;border:1px solid #ccc;border-radius:5px}#overlayPopup.winter_hunt_profile_tree_possible_gifts .giftDescription{margin-left:0}.winterHuntProfileInteractionView-gifting{background-position-x:0;background-size:130px}.winterHuntProfileInteractionView .info{width:190px;margin-top:10px}.winterHuntProfileInteractionView-giftCeremony{line-height:1.5}.winterHuntProfileInteractionView a.giftBox:hover,.winterHuntProfileInteractionView a.giftBox:focus,.winterHuntProfileInteractionView a.giftBox:active{filter:brightness(1.1)}.headsUpDisplayWinterHuntRegionView__bait .mousehuntTooltip{width:175px;line-height:1.5}.greatWinterHuntGolemManagerTabView__destinationCount{margin-left:5px}.greatWinterHuntGolemDestinationView__environmentImage{border-radius:0 0 2px 2px;transition:all .2s ease-in-out}.headsUpDisplayWinterHuntRegionView__newYearsButton--active{opacity:.8}.headsUpDisplayWinterHuntRegionView__newYearsButton--active:hover{opacity:1}.headsUpDisplayWinterHuntRegionView{filter:drop-shadow(0 1px 5px #1b202b)}
`;
}
});
var global_default, init_global2 = __esm({
"src/modules/location-huds/locations/event-locations/great-winter-hunt/global.css"() {
global_default = `.campHudSnowballShowdownView__disabled{top:45px}.advent-calendar-spoilers .adventCalendarView-gift .adventCalendarView-gift-label,.advent-calendar-spoilers .adventCalendarView-gift .adventCalendarView-gift-image{display:none}.mousehuntActionButton.tiny.toggle-advent-calendar-spoilers{position:absolute;left:20px;font-size:12px}.adventCalendarView-subtitle{padding:10px;font-size:12px;line-height:19px;background-color:#d3ddfe}.adventCalendarView-gift.canClaim{filter:brightness(1.75)}.adventCalendarView-gift-rewardContainer{inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;margin:0;background-color:#d3ddfe;border-radius:0}.adventCalendarView-gift-reward-close{padding:2px 4px 5px 6px;font-size:13px;font-weight:900;color:#e03a3a;background-color:#b1bfed;border-top-right-radius:0;border-bottom-left-radius:10px}.adventCalendarView-gift-reward-items{display:flex;align-items:center;justify-content:space-between;margin-bottom:5px}.adventCalendarView-gift-item,.adventCalendarView-gift-item img{width:55px;height:55px}.adventCalendarView-title{background-color:#d3ddfe;border-width:1px}.adventCalendarView-header{background-color:#e2ebee}.campHudSnowballShowdownView__imageContainer{height:35px;margin-top:-5px;background:#dabc9b99;border-radius:13px}.campHudSnowballShowdownView__image{height:35px;background-position:bottom center}.campHudSnowballShowdownView__snowball .campHudSnowballShowdownView__image{background-position:center 5px}.campHudSnowballShowdownView__quantity{padding:1px;font-size:13px;color:#133850;text-align:center;background-color:#a8d3e0;border-radius:5px;box-shadow:inset 0 0 0 1px #2174ab}button.campHudSnowballShowdownView__buyButton{display:none}.campHudSnowballShowdownView__item:hover button.campHudSnowballShowdownView__buyButton,.campHudSnowballShowdownView__item:focus button.campHudSnowballShowdownView__buyButton,.campHudSnowballShowdownView__item:active button.campHudSnowballShowdownView__buyButton{position:absolute;right:-1px;bottom:-2px;display:block;width:17px;height:17px;background-size:cover}.snowballShowdownView-reward-subtitle,.snowballShowdownView-rewardsTitle{display:none}.snowballShowdownView-rewardsContainer{overflow:hidden;border-radius:10px}.snowballShowdownView-reward-image{height:120px}.snowballShowdownView-reward-item{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center}.snowballShowdownView-reward-item-name span{display:inline}.snowballShowdownView-reward-item-name{display:inline-block;height:unset;text-align:center}.snowballShowdownView-reward-item .itemImage{float:none;width:unset;height:unset}.snowballShowdownView-reward-item .itemImage img{width:45px;height:auto}.snowballShowdownView-item-quantity{padding:1px 5px;font-size:12px}.snowballShowdownView-item-name{margin:0 4px;font-size:11px}.snowballShowdownView-item{box-shadow:0 -7px 8px #ccc inset,0 0 0 3px #3e71be}.snowballShowdownView-message{display:inline-block;width:auto;padding:8px;font-size:10px;background:#3e71be;border-radius:4px;box-shadow:0 0 1px #103060 inset}.snowballShowdownView-messageContainer{padding:0;background:none;box-shadow:none}.snowballShowdownView-item:after{filter:drop-shadow(-2px 2px 0 #3e71be) drop-shadow(1px -2px 0 #3e71be)}.snowballShowdownView-board-row-cell.available:hover,.snowballShowdownView-board-row-cell.available:focus{cursor:pointer;box-shadow:inset 0 0 1px 3px #3e71be}.snowballShowdownView-board-row-cell.hit{box-shadow:inset 0 0 0 3px #b8ffe3}.winter_hunt_profile_tree_possible_gifts .gift{width:20%}.campHudSnowballShowdownView__quantityContainer.possibleAmount{display:none;margin-top:7px}.campHudSnowballShowdownView--hasSnowballShowdown:hover .campHudSnowballShowdownView__quantityContainer.possibleAmount,.campHudSnowballShowdownView--hasSnowballShowdown:focus .campHudSnowballShowdownView__quantityContainer.possibleAmount{display:flex}.possibleAmount .campHudSnowballShowdownView__quantity{background-color:#d2e8ef;box-shadow:inset 0 0 0 1px #7ebde7}
`;
}
});
var updateGolemFooter, getFraction, updateGolemPartsQuantity, updateGolemTravelCount, updateGolemPopup, golemDance, getQuest, expandAnimatedSnowCount, showPossibleSnowballShowdownDustCount, getGolemCounts, adventCalendarPopup, maybeHideAdventCalendarInMenu, greatWinterHuntGlobal, greatWinterHuntLocation, init_great_winter_hunt = __esm({
"src/modules/location-huds/locations/event-locations/great-winter-hunt/index.js"() {
init_utils2();
init_styles115();
init_global2();
updateGolemFooter = () => {
let footer = document.querySelector(".greatWinterHuntDialogView__inventoryFooter");
if (!footer)
return;
let headsEl = footer.querySelector('.greatWinterHuntDialogView__footerItemQuantity[data-item-type="golem_part_head_stat_item"]'), torsoEl = footer.querySelector('.greatWinterHuntDialogView__footerItemQuantity[data-item-type="golem_part_torso_stat_item"]'), limbsEl = footer.querySelector('.greatWinterHuntDialogView__footerItemQuantity[data-item-type="golem_part_limb_stat_item"]');
if (!headsEl && !torsoEl && !limbsEl)
return;
let heads = headsEl ? Number.parseInt(headsEl.textContent, 10) : 0, torso = torsoEl ? Number.parseInt(torsoEl.textContent, 10) : 0, limbs = limbsEl ? Number.parseInt(limbsEl.textContent, 10) : 0, limbSet = Math.floor(limbs / 4), possibleGolems = Math.min(heads, torso, limbSet), existing = footer.querySelector(".greatWinterHuntDialogView__footerItem.possibleGolems");
existing && existing.remove();
let possibleWrapper = makeElement("div", ["greatWinterHuntDialogView__footerItem", "mousehuntTooltipParent", "possibleGolems"]), possibleImage = makeElement("div", ["greatWinterHuntDialogView__footerItemImage"]);
possibleImage.style.backgroundImage = "url(https://i.mouse.rip/mh-improved/golem-thumb.png)", possibleWrapper.append(possibleImage), makeElement("div", ["greatWinterHuntDialogView__footerItemQuantity", "quantity"], possibleGolems, possibleWrapper);
let possibleTooltip = makeElement("div", ["mousehuntTooltip", "tight", "top", "noEvents"], `You can make ${possibleGolems} golem${possibleGolems === 1 ? "" : "s"}`);
makeElement("div", ["mousehuntTooltip-arrow"], null, possibleTooltip), possibleWrapper.append(possibleTooltip), footer.insertBefore(possibleWrapper, footer.children[3]);
}, getFraction = (num) => {
switch (num) {
case 1:
return "\xBC";
case 2:
return "\xBD";
case 3:
return "\xBE";
default:
return "";
}
}, updateGolemPartsQuantity = () => {
let limbs = document.querySelector('.greatWinterHuntRecycleDialogView__itemQuantity.quantity[data-item-type="golem_part_limb_stat_item"]');
if (!limbs)
return;
let original = limbs.getAttribute("original-quantity");
if (original) {
let footerLimbs = document.querySelector('.greatWinterHuntDialogView__footerItemQuantity.quantity[data-item-type="golem_part_limb_stat_item"]');
limbs.textContent = footerLimbs ? footerLimbs.textContent : original;
}
let limbCount = Number.parseInt(limbs.textContent, 10);
limbs.setAttribute("original-quantity", limbCount);
let limbSet = Math.floor(limbCount / 4), limbSetFraction = getFraction(limbCount % 4), newLimbsEl = makeElement("span", ["golemLimbsTotal"], limbCount), newLimbsSetEl = makeElement("span", ["golemLimbsPossible"], `(${limbSet}${limbSetFraction})`);
limbs.textContent = "", limbs.append(newLimbsEl, newLimbsSetEl);
}, updateGolemTravelCount = () => __async(void 0, null, function* () {
let title = document.querySelector(".greatWinterHuntGolemManagerTabView__destinationHeader");
if (!title)
return;
let name = title.querySelector(".greatWinterHuntGolemManagerTabView__destinationName");
if (!name)
return;
let currentEnvironment = (yield getData("environments")).find((env) => env.name === name.textContent);
if (!currentEnvironment)
return;
let golemCounts = getGolemCounts(), existing = title.querySelector(".greatWinterHuntGolemManagerTabView__destinationCount");
if (existing) {
existing.textContent = golemCounts[currentEnvironment.id] || 0;
return;
}
let countEl = makeElement("span", ["greatWinterHuntGolemManagerTabView__destinationCount"], `(${golemCounts[currentEnvironment.id] || 0})`);
name.append(countEl);
}), updateGolemPopup = () => {
setTimeout(() => {
let golems = document.querySelectorAll(".greatWinterHuntGolemManagerDialogView__golem");
golems && golems.forEach((golem) => {
golem.addEventListener("click", () => {
eventRegistry.doEvent("golem-switch-in-dialog");
});
}), updateGolemTravelCount(), updateGolemFooter(), updateGolemPartsQuantity();
}, 250);
}, golemDance = () => {
let trigger = document.querySelector(".greatWinterHuntRewardTrackView__progress");
trigger && trigger.addEventListener("click", () => {
let golems = document.querySelectorAll(".headsUpDisplayWinterHuntRegionView__golem .winterHuntGolemView");
golems && (count = 0, golems.forEach((golem) => {
setTimeout(() => {
golem.classList.add("winterHuntGolemView--idleAnimation");
}, 100 * count), count++;
}));
});
}, getQuest = () => getCurrentLocation2() === "winter_hunt_grove" ? user.quests.QuestCinnamonTreeGrove : getCurrentLocation2() === "winter_hunt_workshop" ? user.quests.QuestGolemWorkshop : getCurrentLocation2() === "winter_hunt_fortress" ? user.quests.QuestIceFortress : {}, expandAnimatedSnowCount = () => {
var _a, _b;
let limbEl = document.querySelector('.headsUpDisplayWinterHuntRegionView__golemPartQuantity.quantity[data-item-type="animate_snow_stat_item"]');
limbEl && (limbEl.textContent = ((_b = (_a = getQuest()) == null ? void 0 : _a.items) == null ? void 0 : _b.animate_snow_stat_item.quantity_formatted) || 0);
}, showPossibleSnowballShowdownDustCount = () => {
let showdownItems = document.querySelector(".campHudSnowballShowdownView__itemsContainer");
if (!showdownItems)
return;
let snowballEl = showdownItems.querySelector(".campHudSnowballShowdownView__snowball"), snowballQtyEl = snowballEl.querySelector(".campHudSnowballShowdownView__quantity"), snowballQty = snowballQtyEl ? Number.parseInt(snowballQtyEl.textContent.replaceAll(",", ""), 10) : 0, dustEl = showdownItems.querySelector(".campHudSnowballShowdownView__dust"), currentDustQtyEl = dustEl.querySelector(".campHudSnowballShowdownView__quantity"), currentDustQty = currentDustQtyEl ? Number.parseInt(currentDustQtyEl.textContent.replaceAll(",", ""), 10) : 0, possibleDustQty = Math.floor(snowballQty / 175), snowballText = snowballQty - possibleDustQty * 175, dustText = currentDustQty + possibleDustQty, possibleSnowballExists = showdownItems.querySelector(".campHudSnowballShowdownView__quantity.possibleSnowball");
if (possibleSnowballExists)
possibleSnowballExists.textContent = snowballText;
else {
let possibleSnowballWrapper = makeElement("div", "campHudSnowballShowdownView__quantityContainer possibleAmount");
makeElement("div", ["campHudSnowballShowdownView__quantity", "possibleSnowball"], snowballText, possibleSnowballWrapper), snowballEl.append(possibleSnowballWrapper);
}
let possibleDustExists = showdownItems.querySelector(".campHudSnowballShowdownView__quantity.possibleDust");
if (possibleDustExists)
possibleDustExists.textContent = dustText;
else {
let dustWrapper = makeElement("div", "campHudSnowballShowdownView__quantityContainer possibleAmount");
makeElement("div", ["campHudSnowballShowdownView__quantity", "possibleDust"], dustText, dustWrapper), dustEl.append(dustWrapper);
}
}, getGolemCounts = () => {
var _a;
let golemCounts = {}, destinations = ((_a = getQuest()) == null ? void 0 : _a.destinations) || {};
for (let region in destinations)
destinations[region].environments.forEach((env) => {
golemCounts[env.type] = env.num_golem_visits;
});
return golemCounts;
}, adventCalendarPopup = () => {
let suffix = document.querySelector("#overlayPopup .suffix");
if (!suffix || document.querySelector(".toggle-advent-calendar-spoilers"))
return;
let toggleBtn = makeElement("button", ["mousehuntActionButton", "tiny", "toggle-advent-calendar-spoilers"]);
makeElement("span", "", "View unblurred calendar", toggleBtn), toggleBtn.setAttribute("data-enabled", "false"), toggleBtn.addEventListener("click", () => {
let popup = document.querySelector("#overlayPopup");
if (!popup)
return;
popup.classList.toggle("advent-calendar-spoilers"), toggleBtn.getAttribute("data-enabled") === "true" ? (toggleBtn.setAttribute("data-enabled", "false"), toggleBtn.querySelector("span").innerText = "View unblurred calendar") : (toggleBtn.setAttribute("data-enabled", "true"), toggleBtn.querySelector("span").innerText = "Hide unblurred calendar");
}), suffix.append(toggleBtn);
}, maybeHideAdventCalendarInMenu = () => (/* @__PURE__ */ new Date()).getMonth() !== 11 ? ".mousehuntHeaderView-gameTabs .menuItem.adventCalendar { display: none; }" : "", greatWinterHuntGlobal = () => {
addStyles([global_default, maybeHideAdventCalendarInMenu], "location-hud-events-great-winter-hunt"), onDialogShow("adventCalendarPopup", adventCalendarPopup);
}, greatWinterHuntLocation = () => {
addHudStyles(styles_default114), onDialogShow("greatWinterHuntDialog", updateGolemPopup), golemDance(), expandAnimatedSnowCount(), showPossibleSnowballShowdownDustCount(), onRequest("purchases/itempurchase.php", () => {
updateGolemPartsQuantity(), setTimeout(updateGolemFooter, 250);
}), onRequest("*", () => {
expandAnimatedSnowCount(), showPossibleSnowballShowdownDustCount();
}), onEvent("golem-switch-in-dialog", () => {
updateGolemTravelCount();
}), setTimeout(expandAnimatedSnowCount, 1e3);
};
}
});
var styles_default115, init_styles116 = __esm({
"src/modules/location-huds/locations/event-locations/halloween/spooky-shuffle-tracker/styles.css"() {
styles_default115 = `.halloweenMemoryGame-card-container{position:relative}.mh-spooky-shuffle-card-front{opacity:.8}.mh-spooky-shuffle-card-name{position:absolute;top:80px;right:1px;left:3px;padding:4px 0;text-align:center;background-color:#ffde94;border:1px solid #b9923c;border-radius:5px;box-shadow:0 8px 4px -5px #b4b0aa}.revealed .mh-spooky-shuffle-card-name{background-color:#ffac14}.halloweenMemoryGame-card-container.is_matched .mh-spooky-shuffle-card-name{background-color:#d3f5c9;border-color:#89b769}.halloweenMemoryGame-card-container.mh-spooky-shuffle-card-match{animation:spookyShuffleHappyDance .3s .2s 2}
`;
}
});
var getSavedCards, saveCard, renderSavedCard, cleanUpCompleteGame, processRequest, spookyShuffleTracker, init_spooky_shuffle_tracker = __esm({
"src/modules/location-huds/locations/event-locations/halloween/spooky-shuffle-tracker/index.js"() {
init_utils2();
init_styles116();
getSavedCards = () => JSON.parse(localStorage.getItem("mh-spooky-shuffle-cards")) || [], saveCard = (card, savedCards) => (savedCards[card.id] = card, localStorage.setItem("mh-spooky-shuffle-cards", JSON.stringify(savedCards)), savedCards), renderSavedCard = (card) => {
if (!card)
return;
let cardElement = document.querySelector(`.halloweenMemoryGame-card-container[data-card-id="${card.id}"]`);
if (!cardElement)
return;
cardElement.classList.remove("mh-spooky-shuffle-card-match");
let cardFront = cardElement.querySelector(".halloweenMemoryGame-card-front"), flipper = cardElement.querySelector(".halloweenMemoryGame-card-flipper");
!cardFront || !flipper || (cardFront.style.background = "url(https://www.mousehuntgame.com/images/ui/events/spooky_shuffle/game/shuffle_cards.png) 0 100% no-repeat", cardFront.classList.add("mh-spooky-shuffle-card-front"), card.is_matched || (flipper.style.background = `url(${card.thumb}) 5px 0 no-repeat / cover`), makeElement("div", ["mh-spooky-shuffle-card-name", `mh-spooky-shuffle-card-name-${card.id}`], card.name, cardElement));
}, cleanUpCompleteGame = () => {
localStorage.removeItem("mh-spooky-shuffle-cards");
let shownCards = document.querySelectorAll(".halloweenMemoryGame-card-flipper");
shownCards && shownCards.forEach((card) => {
card.style.background = "";
});
let cardFronts = document.querySelectorAll(".mh-spooky-shuffle-card-front");
cardFronts && cardFronts.forEach((card) => {
card.style.background = "", card.classList.remove("mh-spooky-shuffle-card-front");
});
}, processRequest = (req) => {
if (!req || !req.memory_game)
return;
if (req.memory_game.is_complete) {
cleanUpCompleteGame();
return;
}
let cardNames = document.querySelectorAll(".mh-spooky-shuffle-card-name");
cardNames.length && cardNames.forEach((cardName) => {
cardName.remove();
});
let savedCards = getSavedCards(), revealedCards = req.memory_game.cards.filter((card) => card.is_revealed);
revealedCards.length && revealedCards.forEach((card) => {
saveCard(card, savedCards);
});
let newCard = req.memory_game.cards.filter((card) => card.is_revealed && !card.is_matched);
if (getSavedCards().forEach((card) => {
renderSavedCard(card);
}), newCard.length) {
let matchingCard = savedCards.filter((card) => (card == null ? void 0 : card.name) === newCard[0].name && card.id !== newCard[0].id && !card.is_matched);
if (matchingCard.length && matchingCard[0].id !== !1) {
let matchingCardEl = document.querySelector(`.halloweenMemoryGame-card-container[data-card-id="${matchingCard[0].id}"]`);
matchingCardEl && matchingCardEl.classList.add("mh-spooky-shuffle-card-match");
}
}
}, spookyShuffleTracker = () => {
addStyles(styles_default115, "spooky-shuffle-tracker"), onRequest("events/spooky_shuffle.php", processRequest);
};
}
});
var styles_default116, init_styles117 = __esm({
"src/modules/location-huds/locations/event-locations/halloween/styles.css"() {
styles_default116 = `.halloweenBoilingCauldronHUD-bait-quantity{top:31px;left:40px;font-size:11px}.halloweenBoilingCauldronHUD-bait-ingredientQuantity{top:47px;width:38px;font-size:11px}.halloweenBoilingCauldronHUD-extract-quantity.quantity{line-height:22px}.halloweenBoilingCauldronHUD-extract-mouseDrake-quantity.quantity{line-height:23px}.halloweenBoilingCauldronHUD-bait-quantity,.halloweenBoilingCauldronHUD-bait-ingredientQuantity,.halloweenBoilingCauldronHUD-extract-quantity.quantity,.halloweenBoilingCauldronHUD-extract-mouseDrake-quantity.quantity,.halloweenBoilingCauldronHUD-instantFinish-quantity{text-shadow:1px 1px 1px #282828}body .halloweenBoilingCauldronHUD-bait.basic_baits .halloweenBoilingCauldronHUD-bait-quantity{top:29px;left:42px;width:58px;padding-right:8px;background:linear-gradient(0deg,#2b3320,#4b5837,#2b3320);border:1px solid #6f8d70;border-radius:6px}body .halloweenBoilingCauldronHUD-bait.basic_baits.active .halloweenBoilingCauldronHUD-bait-quantity{background:linear-gradient(0deg,#03461a,#03792d,#03461a);border-color:#03d14c}a.halloweenBoilingCauldronHUD-cauldron-boundingBox{font-size:14px}.halloweenBoilingCauldronHUD-cauldron-imageContainer .halloweenBoilingCauldronHUD-cauldron-queue-brewTime{width:auto;padding-right:4px;font-size:19px;color:#f9e8b1;text-align:center;text-shadow:1px 1px 1px #515b3a;background-image:none}.halloweenBoilingCauldronHUD-cauldron-tooltip{top:0;height:50px;font-size:13px;line-height:1.3;background-color:#292827;transition:.3s ease-in-out}.halloweenBoilingCauldronHUD-cauldron-tooltip i{font-size:15px;color:#f8e7b0}.halloweenBoilingCauldronHUD-cauldron-tooltip b{font-weight:400;color:#ccc}.halloweenBoilingCauldronHUD-bait-cauldronButton{box-shadow:none}.halloweenBoilingCauldronHUD-cauldron.active:hover .halloweenBoilingCauldronHUD-cauldron-instantFinishButton{opacity:1}.halloweenBoilingCauldronHUD-cauldron-instantFinishButton{display:block;opacity:0;transition:opacity .2s ease-in-out}.halloweenBoilingCauldronHUD-shutdownButton{left:271px;width:198px}.itemPurchaseView-container.apothecary .itemPurchaseView-content-name{display:block;padding-top:3px}.itemPurchaseView-container.apothecary .itemPurchaseView-image-container{background-color:transparent}.itemPurchaseView-container.apothecary .itemPurchaseView-action-purchaseHelper-owned{padding-left:0;margin:0;text-shadow:none;background-color:transparent;border:none}.itemPurchaseView-container.apothecary .itemPurchaseView-content-description{height:80px}.itemPurchaseView-container.apothecary.no_gold_cost .itemPurchaseView-action-goldGost{display:none}.itemPurchaseView-container.apothecary .itemPurchaseView-action-itemCost-table{width:100%;margin-right:0;margin-left:0;background-color:#e8f2e5}.itemPurchaseView-container.apothecary .itemPurchaseView-action-itemCost-table-row{display:flex;align-items:center;justify-content:flex-start;width:auto;height:50px;padding:0;margin:0}.itemPurchaseView-container.apothecary .itemPurchaseView-action-quantity{margin-top:-1px}.itemPurchaseView-container.apothecary .itemPurchaseView-action-quantity input{width:90px}.itemPurchaseView-container.apothecary .itemPurchaseView-action-container{height:130px}.itemPurchaseView-container.apothecary .itemPurchaseView-action-itemCost-table-cell a{padding:20px 6px 20px 29px;font-size:13px;background-position:-10px 50%;background-size:42px}.itemPurchaseView-container.apothecary .itemPurchaseView-action-itemCost-table .itemPurchaseView-action-itemCost-table-cell.cost{width:20%;font-size:17px;font-weight:400;text-shadow:1px 1px 1px #788c59}.itemPurchaseView-container.apothecary .itemPurchaseView-content-container{background-color:transparent}.halloweenBoilingCauldronHUD-dialog-boonImage{display:flex;align-items:center}.halloweenBoilingCauldronHUD-dialog-reward.complete:after{top:45px;filter:drop-shadow(0 5px 6px #000);transform:rotate(348deg)}a.halloweenBoilingCauldronHUD-dialog-closeButton{top:0;right:-6px;width:46px;height:38px;background-size:100%}#overlayPopup.halloweenBoilingCauldronRecipePopup #jsDialogClose{top:146px;right:22px;z-index:1;width:46px;height:37px;color:transparent;background-size:cover}#overlayPopup.halloweenBoilingCauldronRecipePopup #jsDialogClose:hover{background-size:cover}.halloweenBoilingCauldronRecipeView-recipe-ingredientContainer table{border:none}.halloweenBoilingCauldronRecipeView-recipe-ingredientContainer{padding:0;border-radius:5px}.halloweenBoilingCauldronRecipeView-recipe-ingredient-header{display:none}.halloweenBoilingCauldronRecipeView-recipe-ingredientContainer td:first-child{padding-left:10px}.halloweenBoilingCauldronRecipeView-recipe-ingredientContainer td:last-child{padding-right:10px}.halloweenBoilingCauldronRecipeView-recipe-ingredientContainer td{font-size:12px}.halloweenBoilingCauldronRecipeView-recipe-description{line-height:1.3;color:#4c4d37}.halloweenBoilingCauldronRecipeView-recipe-mouse{font-size:11px}.halloweenBoilingCauldronRecipeView-recipe-mice-list.num_5 .halloweenBoilingCauldronRecipeView-recipe-mouse{width:33%}.halloweenBoilingCauldronHUD-cauldron-queue-brewTime{margin-top:-1px;margin-left:3px;font-size:13px;text-shadow:0 1px 1px #efd28e;background-color:#efd28e;background-position-y:bottom;border-radius:10px}.empty .halloweenBoilingCauldronHUD-cauldron-queue-brewTime{background-color:transparent}.halloweenBoilingCauldronRecipeView-cauldron-queueSlot.cauldron .halloweenBoilingCauldronHUD-cauldron-queue-brewTime{padding-top:2px;font-size:13px;font-weight:900}a.halloweenBoilingCauldronRecipeView-cauldron-queueSlot-cancelButton{top:-17px;right:7px;left:unset}.halloweenBoilingCauldronRecipeView-content{font-size:12px}.hudLocationContent .halloweenBoilingCauldronHUD-cauldron-imageContainer .halloweenBoilingCauldronHUD-cauldron-queue-brewTime{padding:0;background-color:transparent}.campHudSpookyShuffleView__quantity{font-size:12px}.fuelActive .halloweenBoilingCauldronHUD-reward-progress-bar{transition:all .2s ease-in-out}.fuelActive .halloweenBoilingCauldronHUD-cauldron-imageContainer{background-image:url(https://i.mouse.rip/mh-improved/cauldrons.png);filter:drop-shadow(2px 4px 6px #ff8b1c)}.fuelActive a.halloweenBoilingCauldronHUD-moreInfoButton{filter:hue-rotate(256deg)}.halloweenBoilingCauldronHUD.fuelReveal .halloweenBoilingCauldronHUD-candle{animation-delay:.5s}.halloweenBoilingCauldronHUD-yield-huntsRemaining{right:30px;left:30px;height:6px;border-width:1px;border-radius:0}.halloweenBoilingCauldronHUD-yield-huntsRemaining-progress-bar{height:5px;background-color:#03cd4a;box-shadow:inset 0 0 2px #037e2d}.halloweenBoilingCauldronHUD-dialog-state.item .halloweenBoilingCauldronHUD-dialog-title{margin-right:20px}.halloweenBoilingCauldronRecipeView-brewButton{border-radius:3px}.halloweenBoilingCauldronRecipeView-recipeList{height:480px}.halloweenBoilingCauldronHUD-overlay{z-index:90}
`;
}
});
var unDisableCheese, halloweenGlobal, halloweenLocation, init_halloween2 = __esm({
"src/modules/location-huds/locations/event-locations/halloween/index.js"() {
init_utils2();
init_spooky_shuffle_tracker();
init_styles117();
unDisableCheese = () => {
document.querySelectorAll(".halloweenBoilingCauldronHUD-bait").forEach((armButton) => {
armButton.classList.remove("disabled");
let link = armButton.querySelector("a.disabled");
link && link.classList.remove("disabled");
let tooltipLink = armButton.querySelector(".halloweenBoilingCauldronHUD-bait-tooltipContent a.disabled");
tooltipLink && tooltipLink.classList.remove("disabled");
});
}, halloweenGlobal = () => __async(void 0, null, function* () {
spookyShuffleTracker();
}), halloweenLocation = () => __async(void 0, null, function* () {
addHudStyles(styles_default116), unDisableCheese(), onRequest("*", unDisableCheese);
});
}
});
var styles_default117, init_styles118 = __esm({
"src/modules/location-huds/locations/event-locations/ronza/styles.css"() {
styles_default117 = `.headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--closed .headsUpDisplayRonzasTravelingShoppeView__mainHudContainer{top:-2px;width:230px;height:2px;margin:0 auto;overflow:hidden;background-image:url(https://i.mouse.rip/ronza-button.png)}.headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--closed.headsUpDisplayRonzasTravelingShoppeView{height:auto;min-height:40px}.headsUpDisplayRonzasTravelingShoppeView__mainHudContainer{background-image:url(https://i.mouse.rip/ronza-short.png)}.headsUpDisplayRonzasTravelingShoppeView__baitInfoContainer{display:none}.headsUpDisplayRonzasTravelingShoppeView{height:190px}.headsUpDisplayRonzasTravelingShoppeView__baitContainer:hover .headsUpDisplayRonzasTravelingShoppeView__baitInfoContainer{z-index:2;display:block;box-shadow:0 2px 2px #3a3a3a}.headsUpDisplayRonzasTravelingShoppeView__baitQuantity,.headsUpDisplayRonzasTravelingShoppeView__itemQuantity{z-index:3}.QuestRonzaPopup-items .QuestRonzaPopup-item-costContainer,.QuestRonzaPopup-trapsmith .QuestRonzaPopup-item-costContainer{padding-left:4px;background-color:#a3ccf0;border-radius:5px}.QuestRonzaPopup-bucketContainer{overflow:hidden}.QuestRonzaCampHUD-completeQuantity.QuestRonzaCampHUD-chromeBitQuantity{font-size:13px}.QuestRonzaPopup-container .mousehuntActionButton{width:50px;margin-right:-30px}.QuestRonzaPopup-bucket .rewards .chromeTicket{background-size:57px}.QuestRonzaCampHUD-goal{z-index:1}.QuestRonzaPopup-bucket .rewardDescription b{font-size:12px;line-height:1.5}#overlayPopup.QuestRonzaPopup #jsDialogClose{z-index:2}.voucherImage,.chromeBitImage{width:19px;height:19px}.headsUpDisplayRonzasTravelingShoppeView__inventoryBlockQuantity{font-size:11px;line-height:13px}.QuestRonzaPopup-shopTabButton.bits{padding-left:0;margin-left:5px}.QuestRonzaPopup-shopTabButton.voucher{margin-right:5px}.ronza-miniview,.headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--miniview .headsUpDisplayRonzasTravelingShoppeView__footerContainer,.headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--miniview .headsUpDisplayRonzasTravelingShoppeView__primaryContent,.headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--miniview .headsUpDisplayRonzasTravelingShoppeView__secondaryContent{display:none}.headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--miniview.headsUpDisplayRonzasTravelingShoppeView{height:90px}.headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--miniview .headsUpDisplayRonzasTravelingShoppeView__mainHudContainer{background-image:url(https://i.mouse.rip/ronza-mini.png);background-position:top;border-radius:10px}.headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--miniview .ronza-miniview{display:flex;align-items:center;justify-content:center;margin-top:-3px}.headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--miniview .headsUpDisplayRonzasTravelingShoppeView__inventoryBlock.dragonbane_trinket{margin-right:20px}.headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--miniview .headsUpDisplayRonzasTravelingShoppeView__baitContainer{width:80px}.headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--miniview .headsUpDisplayRonzasTravelingShoppeView__baitQuantity,.headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--miniview .headsUpDisplayRonzasTravelingShoppeView__itemQuantity{width:40px}.headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--miniview .headsUpDisplayRonzasTravelingShoppeView__baitContainer:hover .headsUpDisplayRonzasTravelingShoppeView__baitInfoContainer{right:-40px;left:-2px}.chrome.itemPurchaseView-container.airship_rocket_fuel_stat_item.stat.view .itemPurchaseView-content-description:after{font-weight:900;content:" Please don't spend your bits on this."}
`;
}
});
var addToggleListener, reformatRonzaView, ronzaGlobal, ronzaLocation, init_ronza2 = __esm({
"src/modules/location-huds/locations/event-locations/ronza/index.js"() {
init_utils2();
init_styles118();
addToggleListener = (wrapper) => {
let container = document.querySelector(".headsUpDisplayRonzasTravelingShoppeView__mainHudContainer");
if (!container || !wrapper)
return;
let isToggled = getSetting("location-huds.ronza-info-toggled", !1);
isToggled === "hidden" ? wrapper.classList.add("headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--closed") : isToggled === "miniview" && wrapper.classList.add("headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--miniview"), container.addEventListener("click", (e) => {
e.target === container && (isToggled === "miniview" ? (wrapper.classList.remove("headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--miniview"), wrapper.classList.add("headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--closed"), isToggled = "hidden") : isToggled === "hidden" ? (wrapper.classList.remove("headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--closed"), isToggled = !1) : (wrapper.classList.add("headsUpDisplayRonzasTravelingShoppeView__mainHudContainer--miniview"), isToggled = "miniview"), saveSetting("location-huds.ronza-info-toggled", isToggled));
});
}, reformatRonzaView = (wrapper) => {
let main23 = wrapper.querySelector(".headsUpDisplayRonzasTravelingShoppeView__contentContainer");
if (!main23)
return;
let baits = wrapper.querySelectorAll(".headsUpDisplayRonzasTravelingShoppeView__baitContainer"), existingMiniview = main23.querySelector(".ronza-miniview");
existingMiniview && existingMiniview.remove();
let newContainer = makeElement("div", "ronza-miniview");
[
wrapper.querySelector(".headsUpDisplayRonzasTravelingShoppeView__inventoryBlock.icy_isabirra_ingredient_stat_item"),
// Ice Worm.
wrapper.querySelector(".headsUpDisplayRonzasTravelingShoppeView__inventoryBlock.poisonous_provolone_ingredient_stat_item"),
// Poison Worm.
wrapper.querySelector(".headsUpDisplayRonzasTravelingShoppeView__inventoryBlock.fiery_fontina_ingredient_stat_item"),
// Fire Worm.
wrapper.querySelector(".headsUpDisplayRonzasTravelingShoppeView__inventoryBlock.dragonbane_trinket"),
// Dragonbane Charms.
wrapper.querySelector('.headsUpDisplayRonzasTravelingShoppeView__altInventoryBlock[data-item-type="dragonhide_sliver_stat_item"]'),
// Slivers.
...baits
].forEach((item) => {
if (item && !item.classList.contains("ronza-miniview__item")) {
let clone = item.cloneNode(!0);
clone.classList.add("ronza-miniview__item"), newContainer.append(clone);
}
}), main23.prepend(newContainer), document.querySelectorAll(".ronza-miniview__item .headsUpDisplayRonzasTravelingShoppeView__baitImage:not(.disabled)").forEach((button) => {
button.setAttribute("onclick", "hg.utils.TrapControl.toggleItem(this)");
});
}, ronzaGlobal = () => __async(void 0, null, function* () {
addStyles(styles_default117, "location-hud-events-ronza");
}), ronzaLocation = () => __async(void 0, null, function* () {
let wrapper = document.querySelector(".headsUpDisplayRonzasTravelingShoppeView");
wrapper && (addToggleListener(wrapper), reformatRonzaView(wrapper), addOnboardingMessage({
step: "location-huds-ronza",
page: "camp",
highlightSelector: ".headsUpDisplayRonzasTravelingShoppeView",
content: `Click the "Ronza's Shoppe" button to toggle between full, mini, and closed views.`,
direction: "top",
delay: 2500
}));
});
}
});
var styles_default118, init_styles119 = __esm({
"src/modules/location-huds/locations/event-locations/lunar-new-year/styles.css"() {
styles_default118 = `.lunarNewYearCampPopup-content-endDate{font-size:14px;line-height:20px}.lunarNewYearCampPopup-environment .mousehuntTooltip{top:-44%}.lunarNewYearCampHUD-window-row-reward:after{top:1px;background-color:#9b2034;border-color:#f3577c}.lunarNewYearCampHUD-window-row:nth-child(2n) .lunarNewYearCampHUD-window-row-reward:after{right:35px}.lunarNewYearCampHUD-window-row:nth-child(odd) .lunarNewYearCampHUD-window-row-reward:after{top:0;left:35px}.lunarNewYearCampHUD-window-row .lunarNewYearCampHUD-window-row-reward:after{box-shadow:0 -1px 1px #f3577c,0 1px 1px #f3577c}.lunarNewYearCampHUD-window-row-reward{width:28px;height:18px;border-radius:6px;box-shadow:0 -1px 1px #f3577c,0 1px 1px #f3577c}.lunarNewYearCampHUD-window-row.lunar_new_year_2018_cheese.reward .lunarNewYearCampHUD-window-row-reward:after,.lunarNewYearCampHUD-window-row.lunar_new_year_2018_cheese.claimed .lunarNewYearCampHUD-window-row-reward:after{width:180px}.lunarNewYearCampHUD-container .mousehuntItem .mousehuntItem-quantity.quantity{right:0;bottom:0;left:0;padding-top:2px;font-size:12px;border-top-left-radius:0;border-top-right-radius:0}.lunarNewYearCampHUD-container .mousehuntItem:hover .mousehuntItem-quantity.quantity,.lunarNewYearCampHUD-container .mousehuntItem:focus .mousehuntItem-quantity.quantity,.lunarNewYearCampHUD-container .mousehuntItem.active .mousehuntItem-quantity.quantity{border-top:1px solid #d6a766;box-shadow:inset 0 0 5px 5px #ffe344}.lunarNewYearCampHUD-container .mousehuntItem:hover .mousehuntItem-image:after,.lunarNewYearCampHUD-container .mousehuntItem:focus .mousehuntItem-image:after{border-color:#ffe344}.lunarNewYearCampHUD-stat-value{font-size:13px;text-shadow:0 0 10px #fee7a6;box-shadow:inset 0 0 3px 1px #b81d3e}.lunarNewYearCampHUD-stat-label{text-align:center}.lunarNewYearCampHUD-statsContainer .lunarNewYearCampHUD-stat:nth-child(3) .lunarNewYearCampHUD-stat-value{width:32px}.lunarNewYearCampHUD-window-background .lunarNewYearCampHUD-window-lantern:after{transition:.7s}.lunarNewYearCampHUD-window-background:hover .lunarNewYearCampHUD-window-lantern:after{filter:brightness(1.5) drop-shadow(1px 0 4px #000);transform:scale(1.5)}.lunarNewYearCampPopup .lunarNewYear2018-claimRow-image{text-align:left}.lunarNewYearCampHUD-window-row-height{font-size:12px;font-weight:900;text-shadow:1px 1px 1px #000}.lunarNewYearCampPopup-subtitle{margin-bottom:5px}.lunarNewYearCampPopupContainer .lunarNewYearCampHUD-window.lunarNewYearCampHUD-viewState.hasLantern{top:21px;bottom:22px;box-shadow:inset 1px 0 4px 2px #000}.lunarNewYearCampHUD-window-background{box-shadow:inset 1px 0 10px #05050a}.lunarNewYearCampPopupContainer .lunarNewYearCampHUD-window-background{border:2px solid #decfb4}.lunarNewYearCampPopup-lanternMap-button.up{border-bottom-width:1px}.lunarNewYearCampPopup-lanternMap-button.down{border-top-width:1px}.lunarNewYearCampPopup-environment:hover .lunarNewYearCampPopup-environment-image{box-shadow:0 -1px 7px -4px #000}.lunarNewYearCampPopup-environment:hover .lunarNewYearCampPopup-environment-name{box-shadow:0 4px 9px -2px #000}.lunarNewYearCampPopup-environment:hover{border-radius:4px;box-shadow:0 1px 5px #2e2e2e;transform:scale(1.2)}.lunarNewYearCampPopup-environment{width:100%;padding:0;border-radius:6px;box-shadow:0 0 2px #000;transition:.2s ease-in;transform-origin:bottom}.lunarNewYearCampPopup-stockpile-environmentContainer{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;align-items:start}.lunarNewYearCampPopup-environment:hover .lunarNewYearCampPopup-environment-name,.lunarNewYearCampPopup-environment.selected .lunarNewYearCampPopup-environment-name{color:#fff;background-color:#b4383a}.lunarNewYearCampPopup-environment.disabled .lunarNewYearCampPopup-environment-name,.lunarNewYearCampPopup-environment.disabled .lunarNewYearCampPopup-environment-image{opacity:.4}.lunarNewYearCampPopup-content-block-image{width:auto;height:60px;background-repeat:no-repeat;box-shadow:none}.lunarNewYearCampPopup-itemContainer{display:flex;gap:5px;align-content:center}.lunarNewYearCampPopup-content-block{width:100%}.launch-the-fireworks{display:block}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(1):before{animation-delay:.1s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(1):after{animation-delay:.7s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(2):before{animation-delay:.9s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(2):after{animation-delay:1.1s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(3):before{animation-delay:1.4s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(3):after{animation-delay:1.8s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(4):before{animation-delay:2s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(4):after{animation-delay:2.5s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(5):before{animation-delay:2.8s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(5):after{animation-delay:3.3s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(6):before{animation-delay:3.7s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(6):after{animation-delay:4.1s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(7):before{animation-delay:4.5s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(7):after{animation-delay:5.9s}.launch-the-fireworks-please{position:absolute;bottom:2px;left:-3px;width:20px;height:20px;background-image:url(https://i.mouse.rip/upscaled/festive_firework_stat_item.png);background-repeat:no-repeat;background-size:contain;opacity:.4;transition:.3s;transform:scaleX(-1)}.launch-the-fireworks-please:hover{cursor:pointer;opacity:.9;transform:scaleX(-1.2) scaleY(1.2)}
`;
}
});
var startY, initialTranslateY, dragMapPopup, dragMapCamp, dragMap, triggerFireworks, lunarNewYearGlobal, init_lunar_new_year = __esm({
"src/modules/location-huds/locations/event-locations/lunar-new-year/index.js"() {
init_utils2();
init_styles119();
dragMapPopup = () => __async(void 0, null, function* () {
let map = document.querySelector(".lunarNewYearCampPopupContainer .lunarNewYearCampHUD-window-background");
map && dragMap({ map, maxHeight: 2300 });
}), dragMapCamp = () => __async(void 0, null, function* () {
let map = document.querySelector(".lunarNewYearCampHUD-window .lunarNewYearCampHUD-window-background");
map && dragMap({ map, maxHeight: 1881 });
}), dragMap = (args) => __async(void 0, null, function* () {
let { map, maxHeight } = args;
if (!map)
return;
let onDrag = (event) => {
let deltaY = event.clientY - startY, newTranslateY = initialTranslateY + deltaY;
newTranslateY < 0 ? newTranslateY = 0 : newTranslateY > maxHeight && (newTranslateY = maxHeight), map.style.transform = `translateY(${newTranslateY}px)`;
};
map.addEventListener("mousedown", (event) => {
startY = event.clientY;
let style = window.getComputedStyle(map);
initialTranslateY = new WebKitCSSMatrix(style.transform).m42, map.style.transition = "none", map.addEventListener("mousemove", onDrag);
}), map.addEventListener("mouseup", () => {
map.removeEventListener("mousemove", onDrag);
}), map.addEventListener("wheel", (event) => {
event.preventDefault(), map.style.transition = "none";
let style = window.getComputedStyle(map), newTranslateY = new WebKitCSSMatrix(style.transform).m42 - event.deltaY;
newTranslateY < 0 ? newTranslateY = 0 : newTranslateY > maxHeight && (newTranslateY = maxHeight), map.style.transform = `translateY(${newTranslateY}px)`;
}), map.addEventListener("mouseleave", () => {
map.style.transition = "transform 1s ease-in-out";
});
}), triggerFireworks = () => {
if (document.querySelector(".launch-the-fireworks-please"))
return;
let fireworks = document.querySelector(".lunarNewYearCampHUD-container .lunarNewYearCampHUD-window-fireworksContainer");
if (!fireworks)
return;
let statsContainer = document.querySelector(".lunarNewYearCampHUD-container .lunarNewYearCampHUD-statsContainer");
if (!statsContainer)
return;
let launchButton = makeElement("div", "launch-the-fireworks-please", "");
statsContainer.append(launchButton);
let isAnimating = !1;
launchButton.addEventListener("click", () => {
launchButton.classList.add("launched"), fireworks.classList.add("launch-the-fireworks"), !isAnimating && (isAnimating = !0, setTimeout(() => {
launchButton.classList.remove("launched"), fireworks.classList.remove("launch-the-fireworks"), isAnimating = !1;
}, 5 * 1e3));
});
}, lunarNewYearGlobal = () => __async(void 0, null, function* () {
addStyles(styles_default118, "location-hud-events-lunar-new-year"), onRequest("events/lunar_new_year.php", dragMapPopup), getCurrentPage() === "camp" && (dragMapCamp(), triggerFireworks()), onEvent("camp_quest_hud_view_initialize", () => {
dragMapCamp(), triggerFireworks();
});
});
}
});
var styles_default119, init_styles120 = __esm({
"src/modules/location-huds/locations/event-locations/spring-egg-hunt/styles.css"() {
styles_default119 = `.springEggHuntCampHUD-chocolate-quantity{font-size:14px}.springHuntHUD-popup-region-environment.active:before{left:-9px;outline:1px solid #364661;box-shadow:0 0 125px #bbffb3 inset,0 1px 6px -2px #000}.springHuntHUD-popup-egg-quantity{right:0;bottom:0;padding:5px;font-size:14px}.springHuntHUD-popup-region-environment-header{padding-bottom:5px;margin-bottom:10px}.springHuntHUD-popup-region-environment-header .mousehuntActionButton{bottom:5px}.springHuntHUD-popup-region-environment-margin{margin-bottom:15px}.springHuntHUD-totalEggStats{top:-7px;display:flex;flex-direction:column;gap:4px;align-items:flex-end;font-size:12px}.springHuntHUD-popup-tabHeader span{top:0;padding-top:8px}.springHuntHUD-popup-tabHeader.active,.springHuntHUD-popup-tabHeader:hover{padding-top:5px}.springHuntHUD-shop-cost{margin-top:-2px;font-size:12px;border-color:#999}.springHuntHUD-shelf .springHuntHUD-shelf-itemsContainer{margin-bottom:5px}.springHuntHUD-shelf-unlockContainer:before,.springHuntHUD-shelf.locked:nth-of-type(6) .springHuntHUD-shelf-unlockContainer:before,.springHuntHUD-shelf.locked:nth-of-type(3) .springHuntHUD-shelf-unlockContainer:before{height:155px}.springHuntHUD-shelf.locked:nth-of-type(4) .springHuntHUD-shelf-unlockContainer:before{height:282px}.springHuntHUD-shelf.locked:nth-of-type(5) .springHuntHUD-shelf-unlockContainer:before{height:292px}.springHuntHUD-unlockShelfButton,.springHuntHUD-shelf-unlockContainer span{display:flex;align-items:center}.springHuntHUD-unlockShelfButton .springHuntHUD-shop-cost{margin:-1px -6px -1px 10px}.springHuntHUD-shelf-unlock-reward-image{filter:drop-shadow(0 1px 1px #c7f4ff);transition:.3s}.springHuntHUD-shelf-unlock-reward-image:hover{transform:scale(1.35)}.springHuntHUD-interfaceEgg:after{border:none;transform-origin:center;animation:2s wallDamageWiggle infinite}.eggSweeper-inventoryReminder-quantity,.eggSweeper-play-upgradeQuantity{font-size:12px}.eggSweeper-dialog-title{margin-bottom:10px}.eggSweeper-dialog-state.rewards{margin-top:-10px}.springEggHuntCampHUD-fuelQuantity{top:15px;left:27px;font-size:13px}.springEggHuntCampHUD-buyFuelButton{top:14px;border:1px solid #5f221e;border-radius:7px;mix-blend-mode:luminosity}.eggSweeper-eggConvertible .itemImage{background-color:transparent}.highlight .springHuntHUD-popup-egg.found{opacity:.2}.springHuntHUD-popup-egg.found:after{top:60px;left:0}.springHuntHUD-popup-moreInfo-content-paragraph-container img{transition:.2s ease-in}.springHuntHUD-popup-moreInfo-content-paragraph-container img:hover{transform:scale(1.2) rotate(-2deg)}.springHuntHUD-shelf-item.mousehuntTooltipParent:hover .mousehuntTooltip{display:none}.springHuntHUD-shelf-item-name{margin:2px -30px;line-height:1.4}.springHuntHUD-shop-cost:hover{filter:brightness(1.3)}.mousehuntTooltipParent:hover .springEggHuntCampHUD-fuelButtonBackground:after{position:absolute;top:9px;right:24px;width:14px;height:11px;content:"";background:linear-gradient(90deg,#5b201c,#4e1915);border-radius:0 0 40px 36px;box-shadow:0 -.7px #652c1c,0 -1px #eda934,0 -3px #f5a02d}.springHuntHUD-setMaxQuantityButton{font-size:14px}.springHuntHUD-popup-dialogContainer{top:50vh}.springHuntHUD-popup-dialogFrame-content{max-height:60vh;overflow-y:auto}.springHuntHUD-shelf-item .itemImage{border-width:1px;box-shadow:inset 0 0 7px -1px #db882f}
`;
}
});
var addUnfoundEggHighlight, addUnfoundEggHighlightWithTimeout, rightclickToFlag, springEggHuntGlobal, init_spring_egg_hunt = __esm({
"src/modules/location-huds/locations/event-locations/spring-egg-hunt/index.js"() {
init_utils2();
init_shared();
init_styles120();
addUnfoundEggHighlight = () => {
let tabContent = document.querySelector(".springHuntHUD-popup-tabContentContainer");
if (!tabContent)
return;
let stats = tabContent.querySelector(".springHuntHUD-totalEggStats");
if (!stats || stats.querySelector(".springHuntHUD-unfoundEggHighlight"))
return;
let highlightEl = makeElement("a", "springHuntHUD-unfoundEggHighlight", "Highlight missing");
highlightEl.addEventListener("click", () => {
tabContent.classList.contains("highlight") ? (tabContent.classList.remove("highlight"), highlightEl.innerText = "Highlight missing") : (tabContent.classList.add("highlight"), highlightEl.innerText = "Unhighlight missing");
}), stats.append(highlightEl);
}, addUnfoundEggHighlightWithTimeout = () => {
setMultipleTimeout(() => {
addUnfoundEggHighlight();
}, [10, 500, 1e3]);
}, rightclickToFlag = () => {
let board = document.querySelector(".eggSweeper");
if (!board || board.classList.contains("flags"))
return;
let spaces = board.querySelectorAll(".eggSweeper-board-row-cell");
spaces && spaces.forEach((space) => {
space.addEventListener("contextmenu", (e) => __async(void 0, null, function* () {
let cell = space.querySelector("a");
cell && (e.preventDefault(), hg.views.EggstremeEggscavationView.setFlagMode(), hg.views.EggstremeEggscavationView.pickTile(cell), hg.views.EggstremeEggscavationView.setShovelMode());
}));
});
}, springEggHuntGlobal = () => __async(void 0, null, function* () {
addStyles(styles_default119, "location-hud-events-spring-egg-hunt"), onDialogShow("springHuntPopup", () => {
addUnfoundEggHighlightWithTimeout(), onEvent("ajax_response", addUnfoundEggHighlightWithTimeout, !0);
}), onDialogShow("eggSweeperPopup", () => {
setTimeout(rightclickToFlag, 1e3);
}), onRequest("events/eggstreme_eggscavation.php", (request, data) => {
data.action === "show_field" && setTimeout(rightclickToFlag, 1e3);
}), setMultipleTimeout(() => {
updateDateDates(".springEggHuntCampHUD-dateCountdownMiniContainer .dateCountdownMini__remainingText");
}, [100, 500, 1e3]);
});
}
});
var event_locations_default, init_event_locations = __esm({
"src/modules/location-huds/locations/event-locations/index.js"() {
init_birthday2();
init_great_winter_hunt();
init_halloween2();
init_ronza2();
init_lunar_new_year();
init_spring_egg_hunt();
event_locations_default = (location) => __async(void 0, null, function* () {
switch (location) {
case "halloween_event_location":
halloweenLocation();
break;
case "winter_hunt_grove":
case "winter_hunt_workshop":
case "winter_hunt_fortress":
greatWinterHuntLocation();
break;
case "super_brie_factory":
birthdayLocation();
break;
case "ronzas_traveling_shoppe":
ronzaLocation();
break;
default:
break;
}
let events = {
0: [greatWinterHuntGlobal],
// January.
1: [birthdayGlobal, lunarNewYearGlobal],
// February.
2: [birthdayGlobal, springEggHuntGlobal],
// March.
3: [springEggHuntGlobal],
// April.
4: [],
// May.
5: [],
// June.
6: [ronzaGlobal],
// July.
7: [ronzaGlobal],
// August.
8: [],
// September.
9: [halloweenGlobal],
// October.
10: [halloweenGlobal, greatWinterHuntGlobal],
// November.
11: [greatWinterHuntGlobal]
// December.
}, month = (/* @__PURE__ */ new Date()).getMonth();
events[month].forEach((event) => {
event();
});
});
}
});
var regionMapping, normalizeCurrentLocation, main18, init83, location_huds_default, init_location_huds = __esm({
"src/modules/location-huds/index.js"() {
init_utils2();
init_toggle_icon();
init_settings35();
init_styles75();
init_acolyte_realm();
init_ancient_city2();
init_balacks_cove();
init_bazaar();
init_bountiful_beanstalk3();
init_calm_clearing();
init_cape_clawed();
init_catacombs();
init_claw_shot_city();
init_derr_dunes();
init_desert_city();
init_desert_warpath2();
init_dojo();
init_dracano();
init_draconic_depths();
init_elub_shore();
init_floating_islands4();
init_forbidden_grove();
init_foreword_farm2();
init_fort_rox2();
init_fungal_cavern();
init_great_gnarled_tree();
init_harbour2();
init_iceberg3();
init_jungle_of_dread();
init_kings_arms();
init_kings_gauntlet();
init_laboratory();
init_labyrinth4();
init_lagoon();
init_meditation_room();
init_mountain();
init_mousoleum3();
init_moussu_picchu2();
init_nerg_plains();
init_pinnacle_chamber();
init_pollution_outbreak2();
init_prologue_pond();
init_rift_bristle_woods2();
init_rift_burroughs2();
init_rift_furoma2();
init_rift_gnawnia();
init_rift_valour2();
init_rift_whisker_woods();
init_school_of_sorcery2();
init_seasonal_garden2();
init_slushy_shoreline();
init_ss_huntington_ii();
init_sunken_city2();
init_table_of_contents2();
init_tournament_hall();
init_town_of_digby();
init_town_of_gnawnia();
init_train_station();
init_windmill();
init_zugzwang_tower2();
init_region_living_garden();
init_region_queso();
init_event_locations();
regionMapping = [
{
region: "region-living-garden",
locations: ["desert_oasis", "lost_city", "sand_dunes"]
},
{
region: "region-queso",
locations: ["queso_geyser", "queso_plains", "queso_quarry", "queso_river"]
},
{
region: "event-locations",
locations: [
"halloween_event_location",
"winter_hunt_workshop",
"winter_hunt_fortress",
"great_winter_taiga"
]
}
], normalizeCurrentLocation = (location) => {
let region = regionMapping.find((regionMap) => regionMap.locations.includes(location));
return region ? region.region : location;
}, main18 = () => {
removeHudStyles();
let currentLocation = getCurrentLocation2(), location = normalizeCurrentLocation(currentLocation);
if (debuglog("location-huds", `Location: ${location}`), getSetting("location-huds-enabled.event-locations", !0) && event_locations_default(currentLocation), !getSetting(`location-huds-enabled.${location}`, !0))
return;
removeBodyClassByPrefix("mh-improved-location-"), addBodyClass(`mh-improved-location-${location}`);
let locationHandlers = {
acolyte_realm: acolyte_realm_default,
ancient_city: ancient_city_default2,
balacks_cove: balacks_cove_default,
bazaar: bazaar_default,
bountiful_beanstalk: bountiful_beanstalk_default3,
calm_clearing: calm_clearing_default,
cape_clawed: cape_clawed_default,
catacombs: catacombs_default,
clawshot_city: claw_shot_city_default,
derr_dunes: derr_dunes_default,
desert_city: desert_city_default,
desert_warpath: desert_warpath_default,
dojo: dojo_default,
draconic_depths: draconic_depths_default,
dracano: dracano_default,
elub_shore: elub_shore_default,
floating_islands: floating_islands_default4,
forbidden_grove: forbidden_grove_default,
foreword_farm: foreword_farm_default2,
fort_rox: fort_rox_default2,
fungal_cavern: fungal_cavern_default,
great_gnarled_tree: great_gnarled_tree_default,
harbour: harbour_default2,
iceberg: iceberg_default3,
jungle_of_dread: jungle_of_dread_default,
kings_arms: kings_arms_default,
kings_gauntlet: kings_gauntlet_default,
laboratory: laboratory_default,
labyrinth: labyrinth_default4,
lagoon: lagoon_default,
meditation_room: meditation_room_default,
mountain: mountain_default,
mousoleum: mousoleum_default3,
moussu_picchu: moussu_picchu_default2,
nerg_plains: nerg_plains_default,
pinnacle_chamber: pinnacle_chamber_default,
pollution_outbreak: pollution_outbreak_default2,
prologue_pond: prologue_pond_default,
rift_bristle_woods: rift_bristle_woods_default2,
rift_burroughs: rift_burroughs_default2,
rift_furoma: rift_furoma_default2,
rift_gnawnia: rift_gnawnia_default,
rift_valour: rift_valour_default2,
rift_whisker_woods: rift_whisker_woods_default,
school_of_sorcery: school_of_sorcery_default2,
seasonal_garden: seasonal_garden_default,
slushy_shoreline: slushy_shoreline_default,
ss_huntington_ii: ss_huntington_ii_default,
sunken_city: sunken_city_default2,
table_of_contents: table_of_contents_default2,
tournament_hall: tournament_hall_default,
town_of_digby: town_of_digby_default,
town_of_gnawnia: town_of_gnawnia_default,
train_station: train_station_default,
windmill: windmill_default,
zugzwang_tower: zugzwang_tower_default,
"region-living-garden": region_living_garden_default,
"region-queso": region_queso_default
};
locationHandlers[location] && locationHandlers[location]();
}, init83 = () => __async(void 0, null, function* () {
addStyles(styles_default74, "location-huds"), getSetting("experiments.location-hud-toggle") && toggle_icon_default();
let delayedMain = () => {
setTimeout(main18, 1e3);
};
onNavigation(main18), onEvent("travel_complete", delayedMain), onEvent("camp_page_toggle_blueprint", delayedMain), onRequest("environment/labyrinth.php", (data, request) => {
request.action === "make_intersection_choice" && delayedMain();
}), onRequest("environment/ancient_city.php", (data, request) => {
request.action === "retreat" && delayedMain();
});
}), location_huds_default = {
id: "location-huds",
type: "location-hud",
alwaysLoad: !0,
load: init83,
settings: settings_default34
};
}
});
var settings_default35, init_settings36 = __esm({
"src/modules/better-send-supplies/settings/index.js"() {
init_utils2();
settings_default35 = () => __async(void 0, null, function* () {
let tradableItems = yield getTradableItems("truncated_name");
return tradableItems.unshift({ name: "None", value: "none" }, { seperator: !0 }), [{
id: "better-send-supplies.pinned-items",
title: "Pinned items",
default: [
{
name: "SUPER|brie+",
value: "SUPER|brie+"
},
{
name: "Empowered SUPER|brie+",
value: "Empowered SUPER|b..."
},
{
name: "Rift Cherries",
value: "Rift Cherries"
},
{
name: "Rift-torn Roots",
value: "Rift-torn Roots"
},
{
name: "Sap-filled Thorns",
value: "Sap-filled Thorns"
}
],
description: "Pin items at the top of the Send Supplies page.",
settings: {
type: "multi-select",
number: 5,
options: tradableItems
}
}];
});
}
});
var styles_default120, init_styles121 = __esm({
"src/modules/better-send-supplies/styles.css"() {
styles_default120 = `#supplytransfer .tabContent.recipient .listContainer .actions{display:none}#supplytransfer .listContainer a.element.recipient{width:auto;height:120px;white-space:nowrap;background-color:#fff}#supplytransfer .tabContent.recipient .listContainer span.content{font-size:12px}#supplytransfer .listContainer a.element.item{display:grid;grid-template-rows:1fr 1fr;align-items:center;width:auto;height:100px;padding:0;margin:0;overflow:hidden}#supplytransfer .listContainer a.element.item,#supplytransfer .listContainer a.element.recipient{border-radius:5px;box-shadow:0 1px 2px -2px #1f1f1f}#supplytransfer .listContainer a.element:hover,#supplytransfer .listContainer a.element.recipient:hover,#supplytransfer .listContainer a.element.item.pinned:hover,#supplytransfer .tabs .tab .image:hover,#supplytransfer .tabs .tab .image.empty:hover{color:#3b5998;background-color:#d8f0ff;border-color:#ccc}#supplytransfer .tabContent.item .listContainer{grid-template-columns:repeat(5,1fr);gap:5px;width:550px;height:100%;max-height:80vh;margin-bottom:0;margin-left:90px}#supplytransfer .categoryMenu{width:90px;background:none}#supplytransfer .categoryMenu a{margin-bottom:1px;font-size:12px;text-align:left}#supplytransfer .itemList .element .itemImage img{width:60px;height:60px}#supplytransfer .listContainer a.element .details{width:90px;margin:0 auto;font-size:11px;text-align:center}#supplytransfer .categoryMenu a:hover,#supplytransfer .categoryMenu a:focus,#supplytransfer .categoryMenu a:active{padding-left:5px;margin-left:-5px;text-decoration:none;background-color:#d8f0ff}.mhui-supply-search{display:flex;align-items:center;padding-bottom:5px;margin:5px 5px 15px;border-bottom:1px solid #ccc}#supplytransfer .drawer .tabContent .searchContainer{position:absolute;top:-5px;right:0}#supplytransfer .drawer .tabContent h2{padding:0;margin:0 auto 0 0;font-size:14px;border:none}#supplytransfer .listContainer a.element.item.hidden{display:none}.mhui-supply-sort-wrapper a,.mhui-supply-sort-wrapper img{width:35px;height:20px}.mhui-supply-sort-wrapper{display:flex;flex-direction:row;gap:5px;align-items:center;margin-right:10px}.mhui-supply-sort-wrapper a{margin:0 4px;line-height:20px;text-align:center;text-decoration:none;border:1px solid #ccc;border-radius:3px;box-shadow:2px 2px 3px #cdc9c6 inset}.mhui-supply-sort-wrapper a:hover,.mhui-supply-sort-wrapper a.focus{background-color:#cac0b2}#supplytransfer .listContainer a.element.item.pinned{background-color:#aef5f7}.mhui-supply-quick-quantity-wrapper{display:flex;gap:10px;align-items:center;justify-content:center;margin:10px auto}.mhui-supply-quick-quantity-max{width:53px}#supplytransfer .friendList.listContainer{padding-top:10px;margin-top:10px;border-top:1px solid #ccc}#supplytransfer .tabs .tab.recipient .image.empty:after,#supplytransfer .tabs .tab.item .image.empty:after{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#3b5998;cursor:pointer;content:""}#supplytransfer .tabs .tab.recipient .image.empty:after{content:"Select Friend"}#supplytransfer .tabs .tab.item .image.empty:after{content:"Select Item"}#supplytransfer .drawer .tabContent.confirm #supplytransfer-confirm-text{padding:0}#supplytransfer .tabs .tab.confirm{display:none}#supplytransfer .tabs .tab.recipient .image.empty,#supplytransfer .tabs .tab.item .image.empty{position:relative;margin-bottom:-20px;background-image:none}#supplytransfer .tabs .tab .image{background:#ccc;border:1px solid #eee}.PageSupplyTransfer .flexibleDialogWarmBrown{padding:0;background:none;box-shadow:none}#supplytransfer .drawer{width:unset;height:100%;max-height:unset;padding:5px;border:none}#supplytransfer{position:relative}#supplytransfer .tabs{position:sticky;top:50px;z-index:1;width:auto;padding:10px 10px 0;margin-top:35px;border:1px solid #ccc;border-radius:5px;box-shadow:0 1px 2px -2px #1f1f1f}#supplytransfer .tabs .tab .image,#supplytransfer .tabs .tab .image.empty{background-color:#eee;border:1px solid #ccc;border-radius:5px}#supplytransfer .drawer .listContainer{display:grid;grid-template-columns:repeat(6,1fr);gap:5px 0}#supplytransfer .listContainer.friendList img{width:85px;height:85px;padding-bottom:5px;border:none;border-radius:3px}#supplytransfer .tabs .tab:hover{background:transparent}#supplytransfer .tabContent.item{margin:-5px}span.mhui-supply-sort-label{color:#000}#supplytransfer .itemList a.element .itemImage{width:60px;height:60px;padding:5px;overflow:visible}#supplytransfer .drawer .tabContent{position:relative;height:100%;max-height:unset}#supplytransfer .tabs .tab .image .img,#supplytransfer .tabs .tab .image{width:80px;height:80px}#supplytransfer .tabs .tab{display:flex;flex-direction:column;align-items:center}#supplytransfer .itemImage .quantity{right:0;bottom:0;background-color:#fff9}#supplytransfer .tab .itemImage .quantity{bottom:10px}#supplytransfer .listContainer a.element.item.pinned .itemImage .quantity{background-color:#aef5f799}.mousehuntPage-content #supplytransfer .drawer .listContainer,.mousehuntPage-content #supplytransfer .drawer .tabContent,.mousehuntPage-content #supplytransfer .drawer{height:auto;max-height:unset}.mh-improved-math-button.mhui-supply-quick-quantity{font-family:inherit}
`;
}
});
var processSearch, addSearch, asNum, resortItems, addSortButtons, highlightFavoritedItems, addQuickQuantityButtons, items4, currentSort, upgradeSendSupplies, hasSorted, main19, init84, better_send_supplies_default, init_better_send_supplies = __esm({
"src/modules/better-send-supplies/index.js"() {
init_utils2();
init_settings36();
init_styles121();
processSearch = () => {
let currentValue = document.querySelector("#mhui-supply-search-input");
currentValue.value || items4.forEach((item) => {
item.classList.remove("hidden");
}), items4.forEach((item) => {
item.textContent.toLowerCase().includes(currentValue.value.toLowerCase()) ? item.classList.remove("hidden") : item.classList.add("hidden");
});
}, addSearch = () => {
if (document.querySelector(".mhui-supply-search-wrapper"))
return;
let container = document.querySelector("#supplytransfer .tabContent.item");
if (!container)
return;
let form = makeElement("form", "mhui-supply-search-form"), label = makeElement("label", ["mhui-supply-search-label"]);
label.setAttribute("for", "mhui-supply-search-input"), makeElement("span", "", "Search: ", label);
let input = makeElement("input", "mhui-supply-search-input");
input.setAttribute("type", "text"), input.setAttribute("id", "mhui-supply-search-input"), input.setAttribute("autocomplete", "off"), input.addEventListener("keyup", processSearch), label.append(input), form.append(label);
let titleWrapper = makeElement("div", "mhui-supply-search"), title = container.querySelector("h2");
title.textContent = "Send Supplies", titleWrapper.append(title), titleWrapper.append(form), container.insertBefore(titleWrapper, container.firstChild), setTimeout(() => {
input.focus();
}, 100);
}, asNum = (number) => Number.parseInt(number.replace(",", "")), resortItems = (sortType = "alpha") => {
let container = document.querySelector("#supplytransfer .tabContent.item .listContainer"), items6 = container.querySelectorAll(".item"), sortSelector = ".quantity";
(sortType === "alpha" || sortType === "alpha-reverse") && (sortSelector = ".details");
let sorted = [...items6].sort((a, b) => {
let aText = a.querySelector(sortSelector).textContent, bText = b.querySelector(sortSelector).textContent;
switch (sortType) {
case "alpha":
return aText.localeCompare(bText);
case "alpha-reverse":
return bText.localeCompare(aText);
case "qty":
return asNum(bText) - asNum(aText);
case "qty-reverse":
return asNum(aText) - asNum(bText);
}
return 0;
});
for (let item of sorted)
item.classList.contains("pinned") || container.append(item);
currentSort = sortType;
}, addSortButtons = () => {
if (document.querySelector(".mhui-supply-sort-wrapper"))
return;
let container = document.querySelector(".mhui-supply-search");
if (!container)
return;
let sortWrapper = makeElement("div", "mhui-supply-sort-wrapper");
makeElement("span", "mhui-supply-sort-label", "Sort by:", sortWrapper);
let alphaSortButton = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-supply-sort-alphabetic"]);
makeElement("span", "mousehuntActionButton-text", "Name", alphaSortButton), alphaSortButton.addEventListener("click", () => {
resortItems(currentSort === "alpha" ? "alpha-reverse" : "alpha");
}), sortWrapper.append(alphaSortButton);
let sortQtyButton = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-supply-sort-quantity"]);
makeElement("span", "mousehuntActionButton-text", "Quantity", sortQtyButton), sortQtyButton.addEventListener("click", () => {
resortItems(currentSort === "qty" ? "qty-reverse" : "qty");
}), sortWrapper.append(sortQtyButton), container.insertBefore(sortWrapper, container.childNodes[1]);
}, highlightFavoritedItems = () => {
let itemsToPin = /* @__PURE__ */ new Set([
getSetting("better-send-supplies.pinned-items-0", "SUPER|brie+"),
getSetting("better-send-supplies.pinned-items-1", "Empowered SUPER|b..."),
getSetting("better-send-supplies.pinned-items-2", "Rift Cherries"),
getSetting("better-send-supplies.pinned-items-3", "Rift-torn Roots"),
getSetting("better-send-supplies.pinned-items-4", "Sap-filled Thorns")
]);
for (let item of items4) {
let details = item.querySelector(".details");
itemsToPin.has(details.textContent) && item.classList.add("pinned");
}
}, addQuickQuantityButtons = () => {
let input = document.querySelector("#supplytransfer-confirm-text input");
if (!input)
return;
let maxquantity = document.querySelector("#supplytransfer-confirm-text .userQuantity");
if (!maxquantity)
return;
let existing = document.querySelector(".mhui-supply-quick-quantity-wrapper");
existing && existing.remove();
let maxQty = Number.parseInt(maxquantity.textContent.split("You can send up to: ")[1].split(" ")[0].replace(",", "")), wrapper = makeElement("div", "mhui-supply-quick-quantity-wrapper");
makeMathButtons([1, 5, 10, 100], {
appendTo: wrapper,
input,
maxQty,
classNames: ["mhui-supply-quick-quantity", "small"]
});
let max = makeElement("button", ["mousehuntActionButton", "lightBlue", "small", "mhui-supply-quick-quantity", "mhui-supply-quick-quantity-max"]), maxText = makeElement("span", "", "Max");
max.addEventListener("click", () => {
maxText.textContent === "Reset" ? (input.value = 0, maxText.textContent = "Max") : (input.value = maxQty, maxText.textContent = "Reset");
}), max.append(maxText), wrapper.append(max), input.parentNode.insertBefore(wrapper, input.nextSibling);
}, items4 = [], currentSort = null, upgradeSendSupplies = (initial = !1) => {
let sendTo = document.querySelector("#supplytransfer .drawer .tabContent.recipient"), isChoosingUser = sendTo && sendTo.style.display !== "none", sending = document.querySelector("#supplytransfer .drawer .tabContent.item"), isChoosingItem = sending && sending.style.display !== "none";
if (isChoosingUser) {
let users = document.querySelectorAll("#supplytransfer .friendList .element.recipient");
for (let user2 of users) {
user2.addEventListener("click", () => {
upgradeSendSupplies();
}, { once: !0 });
let search = document.querySelector(".searchContainer input");
search && search.focus();
}
} else if (isChoosingItem) {
items4 = document.querySelectorAll("#supplytransfer .tabContent.item .listContainer .item"), highlightFavoritedItems(), (initial || !hasSorted) && (hasSorted = !0, resortItems("alpha")), addSortButtons();
let itemSearch = document.querySelector(".mhui-supply-search-input");
itemSearch && itemSearch.focus();
} else {
addQuickQuantityButtons();
let inputVal = document.querySelector("#supplytransfer-confirm-text input");
inputVal && inputVal.focus();
}
let categories = document.querySelectorAll("#supplytransfer .categoryMenu a");
for (let category of categories)
category.addEventListener("click", () => {
highlightFavoritedItems();
}, { once: !0 });
sendTo.addEventListener("click", () => {
upgradeSendSupplies();
}, { once: !0 }), sending.addEventListener("click", () => {
upgradeSendSupplies();
}, { once: !0 });
}, hasSorted = !1, main19 = () => {
addSearch(), upgradeSendSupplies(!0);
}, init84 = () => __async(void 0, null, function* () {
addStyles(styles_default120, "better-send-supplies"), onNavigation(main19, {
page: "supplytransfer"
});
}), better_send_supplies_default = {
id: "better-send-supplies",
name: "Better Send Supplies",
type: "better",
default: !0,
description: "Add pinned items, search, and sorting to the Send Supplies page.",
load: init84,
settings: settings_default35
};
}
});
var updateStats, setPrestigeStats, isModifying, modifyPB, isSaving, savePbStats, run3, init85, prestige_base_stats_default, init_prestige_base_stats = __esm({
"src/modules/prestige-base-stats/index.js"() {
init_utils2();
updateStats = (selector, pbStats) => {
let stats = selector.querySelector(".campPage-trap-itemBrowser-item-statContainer");
if (!stats)
return;
let currentSetup = getUserSetupDetails(), power = stats.querySelector(".campPage-trap-itemBrowser-item-stat.power");
if (power) {
let powerValue = power.querySelector(".value span");
powerValue && (powerValue.innerText = pbStats.power, power.classList.remove("better", "worse"), currentSetup.base.power < pbStats.power ? power.classList.add("better") : currentSetup.base.power > pbStats.power && power.classList.add("worse"));
}
let luck = stats.querySelector(".campPage-trap-itemBrowser-item-stat.luck");
if (luck) {
let luckValue = luck.querySelector(".value span");
luckValue && (luckValue.innerText = pbStats.luck, luck.classList.remove("better", "worse"), currentSetup.base.luck < pbStats.luck ? luck.classList.add("better") : currentSetup.base.luck > pbStats.luck && luck.classList.add("worse"));
}
}, setPrestigeStats = () => __async(void 0, null, function* () {
let prestige = document.querySelector(".campPage-trap-itemBrowser-item.base.valour_rift_prestige_base");
if (!prestige)
return;
let pbStats = yield dataGet("pb-stats", !1);
if (!pbStats)
return;
updateStats(prestige, pbStats);
let armed = document.querySelector(".campPage-trap-itemBrowser-armed-item.base");
if (!armed)
return;
let name = armed.querySelector(".campPage-trap-itemBrowser-item-name");
name && name.innerText.includes("Prestige Base") && updateStats(armed, pbStats);
}), isModifying = !1, modifyPB = (opts) => __async(void 0, null, function* () {
if (isModifying)
return;
isModifying = !0;
let activeBp = document.querySelector(".trapSelectorView__blueprint--active .trapSelectorView__browserStateParent");
if (!activeBp) {
isModifying = !1;
return;
}
let bpType = activeBp.getAttribute("data-blueprint-type");
if (!bpType || bpType !== "base") {
isModifying = !1;
return;
}
let { retryPrestige } = opts || {}, savedStats = yield dataGet("pb-stats", !1);
if (debuglog("prestige-base-stats", "Saved Prestige Base stats:", savedStats), !savedStats) {
isModifying = !1;
return;
}
let prestige = document.querySelector(".campPage-trap-itemBrowser-item.base.valour_rift_prestige_base");
if (!prestige) {
retryPrestige || setTimeout(() => {
modifyPB({ retryPrestige: !0 });
}, 500), isModifying = !1;
return;
}
if (prestige.getAttribute("data-pinned")) {
isModifying = !1;
return;
}
let recommended = document.querySelector('.trapSelectorView__browserStateParent--items[data-blueprint-type="base"] .recommended');
if (!recommended) {
isModifying = !1;
return;
}
let header = recommended.querySelector(".campPage-trap-itemBrowser-tagGroup-name");
header && header.after(prestige), prestige.setAttribute("data-pinned", !0), setPrestigeStats(), isModifying = !1;
}), isSaving = !1, savePbStats = () => {
if (isSaving)
return;
if (isSaving = !0, getUserSetupDetails().base.id !== 2904) {
isSaving = !1;
return;
}
debuglog("prestige-base-stats", "Saving Prestige Base stats\u2026");
let trapMath = document.querySelectorAll(".campPage-trap-trapStat-mathRow");
if (!trapMath.length) {
isSaving = !1;
return;
}
let stats = {};
if (trapMath.forEach((row) => {
let stat = row.querySelector(".campPage-trap-trapStat-mathRow-name");
if (!stat) {
isSaving = !1;
return;
}
if (!stat.innerText.includes("Prestige Base")) {
isSaving = !1;
return;
}
let value = row.querySelector(".campPage-trap-trapStat-mathRow-value");
if (!value) {
isSaving = !1;
return;
}
let parsedValue = Number.parseInt(value.innerText.replaceAll(",", ""), 10), typeClass = row.parentElement.parentElement.className.replace("campPage-trap-trapStat", "").trim();
typeClass === "power" ? parsedValue = parsedValue + 490 : typeClass === "luck" && (parsedValue = parsedValue + 5), stats[typeClass] = parsedValue;
}), !stats.power || !stats.luck) {
isSaving = !1;
return;
}
debuglog("prestige-base-stats", "Prestige Base stats:", stats), dataSet("pb-stats", stats), isSaving = !1;
}, run3 = () => __async(void 0, null, function* () {
modifyPB(), savePbStats();
}), init85 = () => __async(void 0, null, function* () {
onEvent("camp_page_toggle_blueprint", run3), onRequest("users/changetrap.php", run3);
}), prestige_base_stats_default = {
id: "prestige-base-stats",
name: "Prestige Base Stats",
type: "feature",
default: !0,
description: "Show the correct stats for the Prestige Base in the base selector.",
load: init85
};
}
});
var settings_default36, init_settings37 = __esm({
"src/modules/debug/settings/index.js"() {
settings_default36 = () => __async(void 0, null, function* () {
return [
{
id: "debug.utils-data",
title: "Log data caching and retrieval"
},
{
id: "debug.events",
title: "Log events"
},
{
id: "debug.all-events",
title: "Log all events"
},
{
id: "debug.dialog",
title: "Log IDs of opening and closing dialogs/popups"
},
{
id: "debug.all",
title: "Log module debug messages"
},
{
id: "debug.module-loading",
title: "Log module loading"
},
{
id: "debug.navigation",
title: "Log page, tab, and subtab navigation"
},
{
id: "debug.request",
title: "Log remote requests and responses"
},
{
id: "debug.sentry",
title: "Set Sentry to debug mode"
},
{
id: "debug.hover-popups",
title: "Don't close hover popups on mouseout"
},
{
id: "debug.disable-cache",
title: "Disable caching",
description: "Disable caching of data and settings."
}
];
});
}
});
var debug3, main20, init86, debug_default, init_debug2 = __esm({
"src/modules/debug/index.js"() {
init_utils2();
init_settings37();
debug3 = (message, ...args) => {
let textMessages = [], objectMessages = [];
for (let arg of args)
typeof arg == "string" ? textMessages.push(arg) : objectMessages.push(arg);
console.log(
`%cMH Improved:%c ${message}`,
"color: #ff3434; font-weight: 900; font-size: 1.1em",
"color: inherit; font-weight: inherit; font-size: inherit",
...textMessages,
...objectMessages
);
}, main20 = () => {
if (window.app = window.app || {}, window.app.mhutils = utils_exports, !getSetting("debug", !1))
return;
if (getSetting("debug.dialog", !1)) {
let currentDialog = null;
onDialogHide(() => {
debug3(`Dialog hidden: ${currentDialog}`);
}), onDialogShow("all", () => {
currentDialog = getCurrentDialog(), debug3(`Dialog shown: ${currentDialog}`);
});
}
getSetting("debug.navigation", !1) && (onNavigation(() => {
debug3("onNavigation", {
page: getCurrentPage(),
tab: getCurrentTab(),
subtab: getCurrentSubtab()
});
}), onTravel(null, () => {
debug3("onTravel", getCurrentLocation2());
})), getSetting("debug.request", !1) && onRequest("*", (response) => {
debug3("onRequest", response);
});
let debugAllEvents = getSetting("debug.all-events", !1);
if (getSetting("debug.events", !1) && !debugAllEvents) {
let events = [
"camp_page_arm_item",
"camp_page_toggle_blueprint",
"camp_page_update_item_array",
"camp_quest_hud_view_initialize",
"checkout_cart_update",
"info_arrow_hide",
"info_arrow_show",
"spring_hunt_claim_hidden_egg",
"tournament_status_change",
"treasure_map_update_favourite_friends",
"treasure_map_update_sent_requests",
"treasure_map_update",
"user_interaction_update",
"user_inventory_update",
"user_inventory_use_convertible",
"user_recipe_update",
"user_relationship",
"user_trap_update"
], hasSingleEvent = !1, ignoredEvents = [];
for (let flag in getFlags())
if (flag.startsWith("debug-events-only-"))
hasSingleEvent = flag.replace("debug-events-only-", "");
else if (flag.startsWith("debug-events-")) {
let event = flag.replace("debug-events-", "");
events.push(event);
} else if (flag.startsWith("debug-events-no-")) {
let event = flag.replace("debug-events-no-", "");
ignoredEvents.push(event);
}
ignoredEvents.length > 0 && (events = events.filter((event) => !ignoredEvents.includes(event))), hasSingleEvent && (events = [hasSingleEvent]), events.forEach((event) => {
onEvent(event, (...data) => {
debug3(`onEvent: ${event}`, data);
});
});
}
}, init86 = () => {
main20(), onActivation("dev", main20), onDeactivation("dev", () => {
window.location.reload();
});
}, debug_default = {
id: "debug",
name: "Debug",
type: "advanced",
default: !1,
order: 900,
load: init86,
settings: settings_default36
};
}
});
var styles_default121, init_styles122 = __esm({
"src/modules/tem-crowns/styles.css"() {
styles_default121 = `.campPage-trap-trapEffectiveness-mouse-name{display:inline-flex;flex-flow:column wrap;place-content:flex-start space-around;align-items:flex-start;justify-content:flex-start;width:100px;padding-left:0;margin-top:-10px}.campPage-trap-trapEffectiveness-mouse:hover,.campPage-trap-trapEffectiveness-mouse:focus,.campPage-trap-trapEffectiveness-mouse:active{border:none;outline:1px solid #ccc}.campPage-trap-trapEffectiveness-content{overflow:visible}.mh-ui-tem-crown.mousebox{position:relative;float:none;margin:0;border:none}img.mh-ui-tem-crown-icon{position:absolute;top:-1px;right:-5px;z-index:2;box-sizing:border-box;width:22px;height:22px;vertical-align:middle;background-color:#f4f4f4;border:1px solid #8d8282;border-right:none;border-radius:50% 0 0 50%}span.mh-ui-tem-crown-text{position:absolute;top:-1px;left:1px;z-index:1;box-sizing:border-box;display:inline-block;width:auto;height:22px;padding:3px 4px 3px 20px;font-size:12px;font-weight:900;color:#8e6642;background-color:#f4f4f4;border:1px solid #8d8282}.mh-ui-tem-crown-wrapper{position:absolute;bottom:0;left:45px}.campPage-trap-trapEffectiveness-mouse-chance{display:block;margin-top:5px;color:#628ea9}.campPage-trap-trapEffectiveness-mouse-powerType{right:28px;bottom:-9px;background-color:#f4f4f4;background-size:70%;border-color:#8d8282}.campPage-trap-trapEffectiveness span{font-size:14px;vertical-align:bottom}.campPage-trap-trapEffectiveness-difficultyGroup.clear-block{display:grid;grid-template-columns:1fr 1fr;place-items:center stretch;padding-left:10px}.campPage-trap-trapEffectiveness-mouse{width:unset;margin:10px 0;overflow:visible;border:none}.campPage-trap-trapEffectiveness-difficultyGroup-label{grid-column:span 2;font-weight:400;text-align:center;border:none}
`;
}
});
var getCrownType, addCrownsToTEM, init87, tem_crowns_default, init_tem_crowns = __esm({
"src/modules/tem-crowns/index.js"() {
init_utils2();
init_styles122();
getCrownType = (catches) => catches < 10 ? "none" : catches < 100 ? "bronze" : catches < 500 ? "silver" : catches < 1e3 ? "gold" : catches < 2500 ? "platinum" : "diamond", addCrownsToTEM = (panel) => __async(void 0, null, function* () {
if (panel !== "trap_effectiveness")
return;
let crowns = yield doRequest("managers/ajax/mice/getstat.php", {
action: "get_hunting_stats"
});
if (!(crowns != null && crowns.hunting_stats && (crowns == null ? void 0 : crowns.hunting_stats.length) > 0))
return;
huntingStats = crowns == null ? void 0 : crowns.hunting_stats;
let temMice = document.querySelectorAll(".campPage-trap-trapEffectiveness-mouse");
!temMice || !temMice.length || temMice.forEach((mouse) => __async(void 0, null, function* () {
if (mouse.getAttribute("data-mh-ui-tem-crown"))
return;
let type2 = mouse.getAttribute("data-mouse");
if (!type2)
return;
mouse.setAttribute("data-mh-ui-tem-crown", !0);
let mouseStats2 = huntingStats.find((m) => m.type === type2);
if (!mouseStats2)
return;
let name = mouse.querySelector(".campPage-trap-trapEffectiveness-mouse-name");
if (!name)
return;
let catches = mouseStats2.num_catches, crownType = getCrownType(catches), crownWrapper = makeElement("div", "mh-ui-tem-crown-wrapper"), crown = document.createElement("span");
crown.classList.add("mh-ui-tem-crown", "mousebox");
let crownIcon = document.createElement("img");
crownIcon.classList.add("mh-ui-tem-crown-icon"), crownIcon.src = `https://www.mousehuntgame.com/images/ui/crowns/crown_${crownType}.png`, crown.append(crownIcon), makeElement("span", "mh-ui-tem-crown-text", catches, crown), crownWrapper.append(crown), name.append(crownWrapper);
}));
}), init87 = () => __async(void 0, null, function* () {
addStyles(styles_default121, "tem-crowns"), onEvent("camp_page_toggle_blueprint", addCrownsToTEM);
}), tem_crowns_default = {
id: "tem-crowns",
name: "TEM Crowns",
type: "feature",
default: !0,
description: "Add crowns and catches to the Trap Effectiveness Meter.",
load: init87
};
}
});
// dist/data/cre-mice-groups.json
var cre_mice_groups_default, init_cre_mice_groups = __esm({
"dist/data/cre-mice-groups.json"() {
cre_mice_groups_default = { dragon: ["dragon", "icewing", "drag_goon", "ful_mina_mountain_queen", "thunderstriker", "thundering_watcher", "thunderlord", "violet_thunderling", "geyser_cork_dropper_bland", "geyser_cork_dropper_mild", "geyser_cork_dropper_medium", "geyser_cork_dropper_rare", "geyser_cork_dropper_hot", "geyser_cork_dropper_flaming", "geyser_cork_dropper_wildfire", "geyser_pressure_builder_mild", "geyser_pressure_builder_medium", "geyser_pressure_builder_hot", "geyser_pressure_builder_flaming", "geyser_pressure_builder_wildfire", "geyser_eruption_dragon_mild", "geyser_eruption_dragon_small", "geyser_eruption_dragon_medium_spice", "geyser_eruption_dragon_medium", "geyser_eruption_dragon_hot", "geyser_eruption_dragon_large", "geyser_eruption_dragon_flaming", "geyser_eruption_dragon_epic", "geyser_eruption_dragon_wildfire", "tiny_dragonfly", "dragon_lancer", "dragon_breather", "regal_spearman", "draconic_paragon", "empyrean_draconic_mouse", "crematio_scorchworth", "malignus_vilestrom", "rimeus_polarblast", "absolutia_harmonius", "arcticus_the_biting_frost", "avalancheus_the_glacial", "belchazar_banewright", "blizzara_winterosa", "chillandria_permafrost", "colonel_crisp", "combustius_furnaceheart", "corrupticus_the_blight_baron", "dreck_grimehaven", "flamina_cinderbreath", "frigidocius_coldshot", "frostnip_icebound", "goopus_dredgemore", "iciclesius_the_defender", "incendarius_the_unquenchable", "magnatius_majestica", "mythical_dragon_emperor", "noxio_sludgewell", "pestilentia_the_putrid", "squire_sizzleton", "sulfurious_the_raging_inferno", "supremia_magnificus", "threeimat", "torchbearer_tinderhelm", "tranquilia_protecticus", "venomona_festerbloom"], fort_rox: { cosmic: ["moonstone_slinger", "arcane_summoner", "night_watcher", "cursed_taskmaster", "moonstone_golem", "moonstone_mystic"], weremice: ["good_supply_night", "werehauler", "wealthy_werewarrior", "mischievous_wereminer", "were_alpha", "reveling_lycanthrope", "wereminer"] }, fiery_warpath: { archers: ["desert_archer_weak", "desert_archer", "desert_archer_epic"], cavalry: ["desert_cavalry", "desert_cavalry_strong"], mages: ["desert_mage", "desert_mage_strong"], scouts: ["desert_scout_weak", "desert_scout", "desert_scout_epic"], warriors: ["desert_warrior_weak", "desert_warrior", "desert_warrior_epic"], commanders: ["desert_general"] }, sand_dunes: ["king_grub", "king_scarab"], rift_whisker_woods: ["rift_cyclops", "rift_centaur", "rift_hydra", "rift_black_widow"], zugzwang_tower: { mystic: ["mystic_bishop", "mystic_king", "mystic_knight", "mystic_pawn", "mystic_queen", "mystic_rook"], technic: ["tech_bishop", "tech_king", "tech_knight", "tech_pawn", "tech_queen", "tech_rook"], rooks: ["mystic_rook", "technic_rook"] } };
}
});
var miceEffs, hasGottenEffs, items5, getMiceEffectiveness, getMouse, getMousePower, getMouseEffectiveness, getMinluck, getPercent, isWaveAndHasRemaining, kingScarabThresholds, kingScarabCoefficients, defaultThresholds, defaultCoefficients, calculatePowerWhenSalted, getAmplifier, applySpecialEffectsAndGetCatchRate, calculateCatchRate, getCatchRate2, init_data2 = __esm({
"src/modules/catch-rate-estimate/data.js"() {
init_utils2();
init_cre_mice_groups();
hasGottenEffs = !1, items5 = null, getMiceEffectiveness = () => __async(void 0, null, function* () {
hasGottenEffs || (miceEffs = yield getData("effs"), hasGottenEffs = !0);
let response = yield doRequest("managers/ajax/users/getmiceeffectiveness.php");
return response == null ? void 0 : response.effectiveness;
}), getMouse = (mouseId) => __async(void 0, null, function* () {
return (!miceEffs || !hasGottenEffs) && (miceEffs = yield getData("effs"), hasGottenEffs = !0), miceEffs.find((m) => m.type === mouseId);
}), getMousePower = (mouseId) => __async(void 0, null, function* () {
var _a;
let mouse = yield getMouse(mouseId);
return !mouse || !mouse.effectivenesses ? 0 : (_a = mouse == null ? void 0 : mouse.effectivenesses) == null ? void 0 : _a.power;
}), getMouseEffectiveness = (mouseId) => __async(void 0, null, function* () {
let mouse = yield getMouse(mouseId);
return !mouse || !mouse.effectivenesses ? 0 : mouse.effectivenesses[user.trap_power_type_name.toLowerCase()];
}), getMinluck = (options2) => __async(void 0, null, function* () {
let { mousePower, effectiveness: effectiveness2 } = options2;
return effectiveness2 = effectiveness2 * 100, effectiveness2 === 0 ? "\u221E" : Math.ceil(
Math.ceil(Math.sqrt(mousePower / 2)) / Math.min(effectiveness2 / 100, 1.4)
);
}), getPercent = (rate) => rate === 1 ? "100%" : `${Math.max(0, rate * 100).toFixed(2)}%`, isWaveAndHasRemaining = (waveToCheck) => {
if (!waveToCheck || !waveToCheck.classList)
return !1;
let wave = [...waveToCheck.classList].find((className) => className.startsWith("wave")).replace("wave", "").replace("_", "");
if (waveToCheck !== wave)
return !1;
let remainingEl = document.querySelectorAll(`.warpathHUD-wave.wave_${wave} .warpathHUD-wave-mouse-population`);
return remainingEl.length && (remaining = [...remainingEl].reduce((sum, el) => (el.innerText && (sum += Number.parseInt(el.innerText)), sum), 0)), remaining > 0;
}, kingScarabThresholds = [0, 30, 40, 50], kingScarabCoefficients = [25e3, 12500, 6500, 0], defaultThresholds = [0, 6, 7, 10, 14, 18, 23, 24, 27, 34, 44, 48, 50], defaultCoefficients = [5e4, 4e4, 2e4, 1e4, 5e3, 2500, 1e3, 1500, 1e3, 500, 1e3, 2e3, 0], calculatePowerWhenSalted = (power, salt, mousetype) => {
if (salt === 0)
return power;
let saltThresholds = mousetype === "king_scarab" ? kingScarabThresholds : defaultThresholds, saltCoefficients = mousetype === "king_scarab" ? kingScarabCoefficients : defaultCoefficients;
for (let i = 0; i < saltThresholds.length - 1; i++)
power -= Math.min(saltThresholds[i + 1] - saltThresholds[i], Math.max(0, salt - saltThresholds[i])) * saltCoefficients[i];
return power;
}, getAmplifier = () => {
var _a, _b;
return (_b = (_a = user.viewing_atts) == null ? void 0 : _a.zzt_amplifier) != null ? _b : 0;
}, applySpecialEffectsAndGetCatchRate = (options2) => __async(void 0, null, function* () {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T;
items5 || (items5 = yield getData("items"));
let {
mouseType,
mousePower,
effectiveness: effectiveness2,
trapPower: trapPower2,
trapPowerBoost: trapPowerBoost2,
trapLuck: trapLuck2,
trapPowerBonus: trapPowerBonus2
} = options2, charm = (_a = items5.find((item) => item.id === Number.parseInt(user == null ? void 0 : user.trinket_item_id))) == null ? void 0 : _a.type, weapon = (_b = items5.find((item) => item.id === Number.parseInt(user == null ? void 0 : user.weapon_item_id))) == null ? void 0 : _b.type, trapPowerType = user.trap_power_type_name.toLowerCase(), location = getCurrentLocation2();
switch (location) {
case "ancient_city":
mouseType === "retired_minotaur" ? mousePower *= (((_d = (_c = user == null ? void 0 : user.quests) == null ? void 0 : _c.QuestAncientCity) == null ? void 0 : _d.width) || 100) / 100 : user.quests.QuestAncientCity.boss === "defeated" && trapPowerType === "forgotten" && (effectiveness2 += 1);
break;
case "claw_shot_city":
mouseType === "bounty_hunter" && charm === "sheriff_badge_trinket" && (mousePower = 0, effectiveness2 = 1);
break;
case "crystal_library":
mouseType === "library_boss" && weapon !== "zurreals_folly_weapon" && (effectiveness2 = 0);
break;
case "desert_warpath":
(cre_mice_groups_default.fiery_warpath.archers.includes(mouseType) && charm === "super_flame_march_archer_trinket" || cre_mice_groups_default.fiery_warpath.cavalry.includes(mouseType) && charm === "super_flame_march_cavalry_trinket" || cre_mice_groups_default.fiery_warpath.mages.includes(mouseType) && charm === "super_flame_march_mage_trinket" || cre_mice_groups_default.fiery_warpath.scouts.includes(mouseType) && charm === "super_flame_march_scout_trinket" || cre_mice_groups_default.fiery_warpath.warriors.includes(mouseType) && charm === "super_flame_march_warrior_trinket" || cre_mice_groups_default.fiery_warpath.commanders.includes(mouseType) && charm === "super_flame_march_commander_trinket") && (trapPowerBonus2 += 50), (mouseType === "desert_boss" && isWaveAndHasRemaining("4") || mouseType === "desert_artillery_commander" && isWaveAndHasRemaining("portal") === "portal") && (effectiveness2 = 0);
break;
case "fort_rox":
cre_mice_groups_default.fort_rox.weremice.includes(mouseType) && Number.parseInt((_h = (_g = (_f = (_e = user == null ? void 0 : user.quests) == null ? void 0 : _e.QuestFortRox) == null ? void 0 : _f.fort) == null ? void 0 : _g.b) == null ? void 0 : _h.level) === 0 || cre_mice_groups_default.fort_rox.cosmic.includes(mouseType) && Number.parseInt((_l = (_k = (_j = (_i = user == null ? void 0 : user.quests) == null ? void 0 : _i.QuestFortRox) == null ? void 0 : _j.fort) == null ? void 0 : _k.c) == null ? void 0 : _l.level) === 0 ? mousePower *= 2 : mouseType === "nightmancer" && Number.parseInt((_p = (_o = (_n = (_m = user == null ? void 0 : user.quests) == null ? void 0 : _m.QuestFortRox) == null ? void 0 : _n.fort) == null ? void 0 : _o.b) == null ? void 0 : _p.level) === 3 || mouseType === "nightfire" && Number.parseInt((_t = (_s = (_r = (_q = user == null ? void 0 : user.quests) == null ? void 0 : _q.QuestFortRox) == null ? void 0 : _r.fort) == null ? void 0 : _s.c) == null ? void 0 : _t.level) === 3 || mouseType === "battering_ram_night" && weapon === "battering_ram_buster_weapon" ? (mousePower = 0, effectiveness2 = 1) : mouseType === "heart_of_the_meteor" && (mousePower *= (((_v = (_u = user == null ? void 0 : user.quests) == null ? void 0 : _u.QuestFortRox) == null ? void 0 : _v.lair_width) || 100) / 100);
break;
case "rift_bristle_woods":
mouseType === "rift_acolyte" && (((_y = (_x = (_w = user == null ? void 0 : user.quests) == null ? void 0 : _w.QuestRiftBristleWoods) == null ? void 0 : _x.QuestRiftBristleWoods) == null ? void 0 : _y.acolyte_sand) || 0) > 0 && (effectiveness2 = 0);
break;
case "sand_dunes":
cre_mice_groups_default.sand_dunes.includes(mouseType) && !((_A = (_z = user == null ? void 0 : user.quests) == null ? void 0 : _z.QuestSandDunes) != null && _A.is_normal) && (mousePower = calculatePowerWhenSalted(mousePower, ((_D = (_C = (_B = user == null ? void 0 : user.quests) == null ? void 0 : _B.QuestSandDunes) == null ? void 0 : _C.minigame) == null ? void 0 : _D.salt_charms_used) || 0, mouseType));
break;
case "sunken_city":
charm === "ultimate_anchoring_trinket" && (mousePower = 0, effectiveness2 = 1);
break;
case "zugzwang_tower":
weapon === "obvious_ambush_weapon" && cre_mice_groups_default.zugzwang_tower.technic.includes(mouseType) || weapon === "blackstone_pass_weapon" && cre_mice_groups_default.zugzwang_tower.mystic.includes(mouseType) ? (trapPower2 += 1800, trapLuck2 += 6) : weapon === "obvious_ambush_weapon" && cre_mice_groups_default.zugzwang_tower.mystic.includes(mouseType) || weapon === "blackstone_pass_weapon" && cre_mice_groups_default.zugzwang_tower.technic.includes(mouseType) ? (trapPower2 -= 2400, trapLuck2 -= 9) : /* Pawn Pinchers - each give +10920 Power and +51 luck on corresponding Pawn, -60 Power and -0.05 Luck on opposite Pawn. */ weapon === "technic_low_weapon" && mouseType === "tech_pawn" || weapon === "mystic_low_weapon" && mouseType === "mystic_pawn" ? (trapPower2 += 10920, trapLuck2 += 51) : (weapon === "technic_low_weapon" && mouseType === "mystic_pawn" || weapon === "mystic_low_weapon" && mouseType === "tech_pawn") && (trapPower2 -= 60, trapLuck2 -= 0.05), charm === "rook_crumble_trinket" && cre_mice_groups_default.zugzwang_tower.rooks.includes(mouseType) && (trapPowerBonus2 += 300);
break;
}
cre_mice_groups_default.dragon.includes(mouseType) && (charm === "dragonbane_trinket" ? trapPowerBonus2 += 300 : charm === "super_dragonbane_trinket" ? trapPowerBonus2 += 600 : charm === "extrme_dragonbane_trinket" ? trapPowerBonus2 += 900 : charm === "ultimate_dragonbane_trinket" && (trapPowerBonus2 += 1200));
let power = Math.ceil(trapPower2 + trapPower2 * (trapPowerBonus2 / 100) + trapPowerBoost2);
location === "zugzwang_tower" && (power = Math.ceil(power * getAmplifier() / 100));
let catchRate = calculateCatchRate(mousePower, effectiveness2, power, trapLuck2);
return weapon === "zugzwang_ultimate_move_weapon" && (location === "zugzwang_tower" || location === "seasonal_garden") && getAmplifier() > 0 ? catchRate += (1 - catchRate) * 0.5 : weapon === "anniversary_acronym_weapon" || weapon === "anniversary_ambush_weapon" || weapon === "anniversary_ancient_box_trap_weapon" || weapon === "anniversary_mouse_deathbot_weapon" || weapon === "anniversary_reaper_perch_weapon" ? catchRate += (1 - catchRate) * 0.1 : location === "fort_rox" && // Weremice get a 50% auto catch with Ballista 2 or 3.
(cre_mice_groups_default.fort_rox.weremice.includes(mouseType) && (Number.parseInt(((_H = (_G = (_F = (_E = user == null ? void 0 : user.quests) == null ? void 0 : _E.QuestFortRox) == null ? void 0 : _F.fort) == null ? void 0 : _G.b) == null ? void 0 : _H.level) === 2) || Number.parseInt(((_L = (_K = (_J = (_I = user == null ? void 0 : user.quests) == null ? void 0 : _I.QuestFortRox) == null ? void 0 : _J.fort) == null ? void 0 : _K.b) == null ? void 0 : _L.level) === 3)) || // Cosmic Critters get a 50% auto catch with Cannon 2 or 3.
cre_mice_groups_default.fort_rox.cosmic.includes(mouseType) && (Number.parseInt(((_P = (_O = (_N = (_M = user == null ? void 0 : user.quests) == null ? void 0 : _M.QuestFortRox) == null ? void 0 : _N.fort) == null ? void 0 : _O.c) == null ? void 0 : _P.level) === 2) || Number.parseInt(((_T = (_S = (_R = (_Q = user == null ? void 0 : user.quests) == null ? void 0 : _Q.QuestFortRox) == null ? void 0 : _R.fort) == null ? void 0 : _S.c) == null ? void 0 : _T.level) === 3))) && (catchRate += (1 - catchRate) * 0.5), catchRate;
}), calculateCatchRate = (mousePower, effectiveness2, power, luck) => Math.min(
1,
(effectiveness2 * power + 2 * Math.pow(Math.floor(Math.min(effectiveness2, 1.4) * luck), 2)) / (effectiveness2 * power + mousePower)
), getCatchRate2 = (options2) => __async(void 0, null, function* () {
let rate = yield applySpecialEffectsAndGetCatchRate(options2);
return {
rate,
percent: getPercent(rate)
};
});
}
});
var styles_default122, init_styles123 = __esm({
"src/modules/catch-rate-estimate/styles.css"() {
styles_default122 = `#mh-improved-cre{padding:3px 0;margin:5px 0;cursor:default}#mh-improved-cre table{width:100%}#mh-improved-cre thead{box-shadow:0 -1px #d3cecb inset}.mh-dark-mode #mh-improved-cre thead{box-shadow:0 -1px #5c5c5c inset}#mh-improved-cre table th{font-weight:700;text-align:center}#mh-improved-cre table th.name{padding-left:8px;text-align:left}#mh-improved-cre table th:last-of-type{padding-right:5px}#mh-improved-cre table:first-child{text-align:left}.mh-improved-cre-data{min-width:70px;font-size:12px;text-align:center}.mh-improved-cre-highlight:before{position:absolute;top:-2px;right:1px;left:1px;height:10px;content:"";background-color:#f7f7f7;border-radius:4px}.mh-improved-cre-data-good{color:#118011}.mh-improved-cre-highlight-good:before{background-color:#118011}.mh-dark-mode .mh-improved-cre-data-good{color:#4fe54f}.mh-dark-mode .mh-improved-cre-highlight-good:before{background-color:#4fe54f}.mh-improved-cre-data-bad{color:#bb4646}.mh-improved-cre-highlight-bad:before{background-color:#bb4646}.mh-dark-mode .mh-improved-cre-data-bad{color:#fb9b9b}.mh-dark-mode .mh-improved-cre-highlight-bad:before{background-color:#fb9b9b}.mh-improved-cre-data-ultimate{color:#0fa4bd}.mh-improved-cre-highlight-ultimate:before{background-color:#0fa4bd}.mh-improved-cre-highlight-minlucked:before{background-color:#0f5cbd}.mh-improved-cre-name{max-width:170px;padding-left:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mh-improved-cre-name:hover{overflow:visible;text-overflow:revert}.mh-improved-cre-name a{color:inherit}#mh-improved-cre.cre-refreshing,#mh-improved-cre.cre-loading{display:flex;align-items:flex-end;justify-content:center;height:100%;min-height:50px;background-image:url(https://www.mousehuntgame.com/images/ui/loaders/round_bar_green.gif);background-repeat:no-repeat;background-position:center;background-size:auto;background-blend-mode:luminosity}#mh-improved-cre.cre-loading{padding:20px 0}#mh-improved-cre.cre-loading:after{position:absolute;right:0;bottom:-5px;left:0;font-weight:400;color:#8e6642;text-align:center;content:"Loading Catch Rate Estimator\\2026"}#mh-improved-cre.cre-refreshing #mh-improved-cre-table{opacity:.5}span.mh-improved-cre-no-mice{font-size:12px}.mh-improved-cre-row:hover{background-color:#eee7e2;box-shadow:-1px 1px 3px #d3cecb inset}
`;
}
});
var lastStats, effectiveness, isUpdating, trapPower, trapPowerBoost, trapPowerBonus, trapLuck, updateStats2, updateMinLucks, updateTrapView, renderList, main21, init88, catch_rate_estimate_default, init_catch_rate_estimate = __esm({
"src/modules/catch-rate-estimate/index.js"() {
init_utils2();
init_data2();
init_styles123();
lastStats = "", effectiveness = null, isUpdating = !1, updateStats2 = () => {
trapPower = 0, trapPowerBoost = 0, trapPowerBonus = 0, trapLuck = user.trap_luck, document.querySelectorAll(".campPage-trap-trapStat.power .campPage-trap-trapStat-mathRow").forEach((mathRow) => {
let row = mathRow.querySelector(".campPage-trap-trapStat-mathRow-value");
if (!row.textContent)
return;
let value = Number.parseInt(row.textContent.replaceAll(",", "").replace("%", "") || "0", 10);
if (!value)
return;
let label = mathRow.querySelector(".campPage-trap-trapStat-mathRow-name");
if (label && label.textContent.includes("Your trap is")) {
if (user.environment_name !== "Zugzwang's Tower") {
let sign = label.textContent.includes("weakened") ? -1 : 1;
trapPowerBoost += sign * value;
}
return;
}
row.textContent.includes("%") ? trapPowerBonus += value : trapPower += value;
});
}, updateMinLucks = () => __async(void 0, null, function* () {
if (getCurrentPage() !== "camp" || isUpdating)
return;
isUpdating = !0;
let minluckList = document.querySelector("#mh-improved-cre");
if (minluckList)
minluckList.classList.add("cre-refreshing");
else {
let statsContainer = document.querySelector(".trapSelectorView__trapStatSummaryContainer");
if (!statsContainer) {
isUpdating = !1;
return;
}
minluckList = makeElement("div", ["mh-cre-table", "campPage-trap-trapEffectiveness", "cre-loading"]), minluckList.id = "mh-improved-cre", minluckList.addEventListener("click", (e) => {
e.preventDefault(), e.stopPropagation();
}), statsContainer.append(minluckList);
}
let currentStats = `
${user.trap_power}
${user.trap_luck}
${user.trap_attraction_bonus}
${user.trap_cheese_effect}
${user.trap_luck}
${user.trap_power}
${user.trap_power_bonus}
${user.trap_power_type_name}
${user.trinket_item_id}
${user.trinket_quantity}
${user.base_item_id}
${user.weapon_item_id}
${user.bait_item_id}
${user.bait_quantity}
${user.environment_id}
`;
if (currentStats !== lastStats && (effectiveness = yield getMiceEffectiveness(), lastStats = currentStats, updateStats2()), !effectiveness) {
isUpdating = !1;
return;
}
let miceIds = Object.values(effectiveness).flatMap(({ mice }) => mice).map((mouse) => ({
name: mouse.name,
type: mouse.type
}));
yield renderList(miceIds), isUpdating = !1, minluckList.classList.remove("cre-refreshing");
}), updateTrapView = (rows) => {
if (!getSetting("catch-rate-estimate.show-trap-highlight", !1))
return;
let trapView = document.querySelector(".trapImageView");
if (trapView)
if (trapView.classList.remove(
"mh-improved-cre-highlight",
"mh-improved-cre-highlight-good",
"mh-improved-cre-highlight-bad",
"mh-improved-cre-highlight-minlucked",
"mh-improved-cre-highlight-ultimate"
), trapView.classList.add("mh-improved-cre-highlight"), user.trinket_item_id == 1075)
trapView.classList.add("mh-improved-cre-highlight-ultimate");
else if (rows.every((row) => user.trap_luck >= row.minluck))
trapView.classList.add("mh-improved-cre-highlight-minlucked");
else {
let averageCatchRate = rows.reduce((acc, row) => acc + row.catchRateValue, 0) / rows.length;
averageCatchRate >= 0.75 ? trapView.classList.add("mh-improved-cre-highlight-good") : averageCatchRate <= 0.4 && trapView.classList.add("mh-improved-cre-highlight-bad");
}
}, renderList = (list) => __async(void 0, null, function* () {
let minluckList = document.querySelector("#mh-improved-cre");
if (!minluckList) {
minluckList = makeElement("div", "campPage-trap-trapEffectiveness"), minluckList.id = "mh-improved-cre";
let statsContainer = document.querySelector(".trapSelectorView__trapStatSummaryContainer");
if (!statsContainer)
return;
statsContainer.append(minluckList), doEvent2("mh-improved-cre-list-rendered");
}
let existing = document.querySelector("#mh-improved-cre-table");
existing && existing.remove(), minluckList.classList.remove("cre-loading");
let table = makeElement("table");
table.id = "mh-improved-cre-table";
let tableheader = makeElement("thead");
makeElement("th", "name", "Mouse", tableheader), makeElement("th", "", "Minluck", tableheader), makeElement("th", "", "Catch Rate", tableheader), tableheader.addEventListener("click", updateMinLucks), table.append(tableheader);
let rows = [];
for (let mouse of list) {
let mousePower = yield getMousePower(mouse.type), mouseEffectiveness = yield getMouseEffectiveness(mouse.type), options2 = {
mouseType: mouse.type,
mousePower,
effectiveness: mouseEffectiveness / 100,
trapPower,
trapPowerBoost,
trapLuck,
trapPowerBonus
}, minluck = yield getMinluck(options2), catchRate = yield getCatchRate2(options2);
Number.isNaN(catchRate.rate) && (catchRate = {
rate: 0,
percent: "0%"
});
let crClass = ["mh-improved-cre-data"], minluckClass = ["mh-improved-cre-data"];
user.trinket_item_id == 1075 ? (crClass.push("mh-improved-cre-data-ultimate"), minluckClass.push("mh-improved-cre-data-ultimate"), catchRate.rate = 1, catchRate.percent = "100%") : (catchRate.rate * 100 >= 100 ? (crClass.push("mh-improved-cre-data-good"), minluckClass.push("mh-improved-cre-data-good")) : catchRate.rate * 100 <= 60 && (crClass.push("mh-improved-cre-data-bad"), minluckClass.push("mh-improved-cre-data-bad")), user.trap_luck >= minluck && (crClass.push("mh-improved-cre-data-minlucked"), minluckClass.push("mh-improved-cre-data-minlucked"))), rows.push({
mouse: mouse.name,
type: mouse.type,
minluck,
catchRateValue: catchRate.rate,
catchRate: catchRate.percent,
crClass,
minluckClass
});
}
if (rows.sort((a, b) => a.catchRateValue !== b.catchRateValue ? a.catchRateValue - b.catchRateValue : b.minluck - a.minluck), rows.length === 0) {
makeElement("span", "mh-improved-cre-no-mice", "No mice found.", table), minluckList.append(table);
return;
}
rows.forEach(({ mouse, type: type2, minluck, catchRate, crClass, minluckClass }) => {
let row = makeElement("tr", "mh-improved-cre-row"), name = makeElement("td", "mh-improved-cre-name"), nameLink = makeElement("a", "", mouse);
nameLink.addEventListener("click", (e) => {
e.preventDefault(), e.stopPropagation(), hg.views.MouseView.show(type2);
}), name.append(nameLink), row.append(name), makeElement("td", minluckClass, minluck, row), makeElement("td", crClass, catchRate, row), table.append(row);
}), minluckList.append(table), updateTrapView(rows);
}), main21 = () => __async(void 0, null, function* () {
onNavigation(updateMinLucks, {
page: "camp"
}), getFlag("catch-rate-estimate-more-refresh") ? onRequest("*", updateMinLucks, !0, ["users/getmiceeffectiveness.php"]) : (onRequest("users/changetrap.php", updateMinLucks), onTravel(null, { callback: updateMinLucks }));
}), init88 = () => __async(void 0, null, function* () {
addStyles(styles_default122, "catch-rate-estimate"), setTimeout(main21, 240);
}), catch_rate_estimate_default = {
id: "catch-rate-estimate",
name: "Catch Rate Estimator & Minlucks",
type: "feature",
default: !0,
description: "Display Minluck and catch rate estimates on the Camp page.",
load: init88
};
}
});
var settings_default37, init_settings38 = __esm({
"src/modules/copy-id/settings/index.js"() {
settings_default37 = () => __async(void 0, null, function* () {
return [{
id: "copy-id-button.hide-button",
title: "Hide button",
description: "Click your profile picture to copy ID.",
default: !1
}];
});
}
});
var styles_default123, init_styles124 = __esm({
"src/modules/copy-id/styles.css"() {
styles_default123 = `.mousehuntHud-userStatBar .profileImage{position:relative}.mh-copy-id-button{position:absolute;top:30px;left:3px;z-index:10;display:none;padding:2px 4px;font-size:9px;cursor:pointer}.mh-copy-id-success-message{position:absolute;top:32px;left:60px;z-index:10;font-weight:900;color:#fff;text-shadow:1px 1px 1px #000;opacity:0;transition:opacity .2s ease-in-out}
`;
}
});
var main22, init89, copy_id_default, init_copy_id = __esm({
"src/modules/copy-id/index.js"() {
init_utils2();
init_settings38();
init_styles124();
main22 = () => {
let profilePic = document.querySelector(".mousehuntHud-userStatBar .mousehuntHud-profilePic");
if (!profilePic)
return;
let copyIdButton = makeElement("div", ["mh-copy-id-button", "mousehuntActionButton", "tiny"]), hidebutton = getSetting("copy-id-button.hide-button");
hidebutton && copyIdButton.classList.add("hidden"), makeElement("span", "mh-copy-id-button-text", "Copy ID", copyIdButton), profilePic.parentNode.insertBefore(copyIdButton, profilePic.nextSibling);
let successMessage = makeElement("div", "mh-copy-id-success-message", "Copied!");
successMessage.style.opacity = 0, copyIdButton.parentNode.insertBefore(successMessage, copyIdButton.nextSibling);
let clickAction = (e) => {
e.preventDefault();
let Id = user.user_id;
navigator.clipboard.writeText(Id), successMessage.style.opacity = 1, setTimeout(() => {
successMessage.style.opacity = 0;
}, 1e3);
};
copyIdButton.addEventListener("click", clickAction), hidebutton ? (profilePic.setAttribute("onclick", ""), profilePic.addEventListener("click", clickAction)) : (profilePic.addEventListener("mouseenter", () => {
copyIdButton.style.display = "block";
}), profilePic.addEventListener("mouseleave", () => {
copyIdButton.style.display = "none";
}), copyIdButton.addEventListener("mouseenter", () => {
copyIdButton.style.display = "block";
}), copyIdButton.addEventListener("mouseleave", () => {
copyIdButton.style.display = "none";
}));
}, init89 = () => __async(void 0, null, function* () {
addStyles(styles_default123, "copy-id"), main22();
}), copy_id_default = {
id: "copy-id",
name: "Copy ID Button",
type: "feature",
default: !0,
description: "Hover over your profile picture in the HUD for a quick \u201CCopy ID to clipboard\u201D button.",
load: init89,
settings: settings_default37
};
}
});
var require_src = __commonJS({
"src/index.js"(exports) {
init_esm3();
init_utils2();
init_updates();
init_taller_windows();
init_settings3();
init_delayed_tooltips();
init_fixes();
init_global_styles();
init_larger_codices();
init_journal_privacy();
init_hide_sidebar();
init_adblock();
init_codex_at_bottom();
init_better_travel();
init_larger_skin_images();
init_delayed_menus();
init_error_reporting();
init_better_journal();
init_better_item_view();
init_experiments();
init_custom_hud();
init_replace_favicon();
init_feature_flags();
init_better_mice();
init_hide_news_ticker();
init_native_dark_mode();
init_printing_press_paper_counter();
init_journal_changer();
init_better_tournaments();
init_custom_shield();
init_hide_daily_reward_popup();
init_better_ui();
init_scoreboard_search_on_profiles();
init_image_upscaling();
init_custom_camp_background();
init_required();
init_better_maps();
init_unique_loot_count();
init_custom_css();
init_hide_daily_draw();
init_data_exporters();
init_hide_share();
init_update_notifications();
init_legacy_hud();
init_links2();
init_show_auras();
init_better_kings_reward();
init_paste_hunter_id();
init_user_highlighting();
init_inline_wiki();
init_better_inventory();
init_favorite_setups3();
init_hide_footer();
init_hover_profiles();
init_quick_filters_and_sort();
init_inventory_open_all_but_one();
init_location_dashboard();
init_better_quests();
init_dark_mode_tweaks();
init_shield_goes_to_camp();
init_inventory_only_open_multiple();
init_quick_send_supplies();
init_lgs_reminder2();
init_inventory_lock_and_hide();
init_inventory_open_all();
init_wisdom_in_stat_bar();
init_metric();
init_better_marketplace();
init_better_gifts();
init_flrt_helper();
init_emotes2();
init_ssdb_toothlet_counter();
init_hide_codices();
init_ultimate_checkmark2();
init_custom_background();
init_onboarding2();
init_big_timer();
init_keyboard_shortcuts();
init_custom_horn();
init_location_catch_stats2();
init_better_shops();
init_location_huds();
init_better_send_supplies();
init_prestige_base_stats();
init_debug2();
init_tem_crowns();
init_catch_rate_estimate();
init_copy_id();
var imported10 = [taller_windows_default, settings_default2, delayed_tooltips_default, fixes_default, global_styles_default, larger_codices_default, journal_privacy_default, hide_sidebar_default, adblock_default, codex_at_bottom_default, better_travel_default, larger_skin_images_default, delayed_menus_default, error_reporting_default, better_journal_default, better_item_view_default, experiments_default, custom_hud_default, replace_favicon_default, feature_flags_default, better_mice_default, hide_news_ticker_default, native_dark_mode_default, printing_press_paper_counter_default, journal_changer_default, better_tournaments_default, custom_shield_default, hide_daily_reward_popup_default, better_ui_default, scoreboard_search_on_profiles_default, image_upscaling_default, custom_camp_background_default, required_default, better_maps_default, unique_loot_count_default, custom_css_default, hide_daily_draw_default, data_exporters_default, hide_share_default, update_notifications_default, legacy_hud_default, links_default, show_auras_default, better_kings_reward_default, paste_hunter_id_default, user_highlighting_default, inline_wiki_default, better_inventory_default, favorite_setups_default3, hide_footer_default, hover_profiles_default, quick_filters_and_sort_default, inventory_open_all_but_one_default, location_dashboard_default, better_quests_default, dark_mode_tweaks_default, shield_goes_to_camp_default, inventory_only_open_multiple_default, quick_send_supplies_default, lgs_reminder_default2, inventory_lock_and_hide_default, inventory_open_all_default, wisdom_in_stat_bar_default, metric_default, better_marketplace_default, better_gifts_default, flrt_helper_default, emotes_default2, ssdb_toothlet_counter_default, hide_codices_default, ultimate_checkmark_default2, custom_background_default, onboarding_default, big_timer_default, keyboard_shortcuts_default, custom_horn_default, location_catch_stats_default2, better_shops_default, location_huds_default, better_send_supplies_default, prestige_base_stats_default, debug_default, tem_crowns_default, catch_rate_estimate_default, copy_id_default], modules2 = imported10, categories = [
{ id: "required", name: "Always Loaded" },
{ id: "better", name: `MouseHunt Improved <a title="View release notes" href="https://github.com/MHCommunity/mousehunt-improved/releases/tag/v${mhImprovedVersion}" target="_blank" rel="noopener noreferrer">v${mhImprovedVersion}</a>` },
{ id: "feature", name: "Features" },
{ id: "design", name: "Design" },
{ id: "element-hiding", name: "Hide Page Elements" },
{ id: "location-hud", name: "Location HUDs" },
{ id: "beta", name: "Beta Features" },
{ id: "advanced", name: "Advanced" }
], loadModules = () => __async(exports, null, function* () {
if (getGlobal("loaded")) {
debug("Already loaded, exiting.");
return;
}
yield addSettingsTab("mousehunt-improved-settings", "MH Improved"), modules2.forEach((m) => {
let category = categories.find((c) => c.id === m.type);
if (!category) {
debug(`Unknown module category: ${m.type}`);
return;
}
category.modules = category.modules || [], category.modules.push(m);
});
for (let category of categories)
category.modules.sort((a, b) => (a.order = a.order || 1, b.order = b.order || 1, a.order !== b.order ? a.order - b.order : (a.name || a.id).localeCompare(b.name || b.id)));
let load = [], allLoadedModules = [];
for (let category of categories) {
let loadedModules = [];
for (let module2 of category.modules)
if (!getFlag(`no-${module2.id}`) && (module2.alwaysLoad || category.id === "required" || getSetting(module2.id, module2.default)))
try {
load.push(module2.load()), loadedModules.push(module2.id);
} catch (error) {
throw debug(`Error loading "${module2.id}"`, error), error;
}
allLoadedModules.push(...loadedModules), debuglog("module-loading", `Loaded ${category.modules.length} ${category.id} modules`, loadedModules);
}
try {
yield Promise.all(load);
} catch (error) {
throw getSetting("error-reporting", !0) && captureException(error), error;
}
setGlobal("modules", allLoadedModules);
}), init90 = () => __async(exports, null, function* () {
if (isUnsupportedFile()) {
debug("Skipping unsupported filetype.");
return;
}
if (isiFrame()) {
debug("Loading inside an iframe is not supported.");
return;
}
if (!isApp()) {
maybeDoMaintenance(), debug("Global MouseHunt functions not found.");
return;
}
if (!eventRegistry) {
debug("Event registry not found.");
return;
}
let previousVersion = getSetting("mh-improved-version", "0.0.0");
previousVersion !== mhImprovedVersion && (yield updates_default(previousVersion, mhImprovedVersion));
try {
yield loadModules(), setGlobal("version", mhImprovedVersion), setGlobal("loaded", !0), doEvent2("mh-improved-loaded", {
version: mhImprovedVersion,
modules: getGlobal("modules")
}), console.log(
`%c\u{1F42D}\uFE0F MouseHunt Improved v${mhImprovedVersion}-${mhImprovedPlatform} has been loaded. Happy Hunting!%c`,
"color: #ca77ff; font-weight: 900; font-size: 1.1em",
"color: inherit; font-weight: inherit; font-size: inherit"
), doEvent2("mh-improved-init", mhImprovedVersion), onNavigation(() => __async(exports, null, function* () {
for (let module2 of categories)
yield addSettingForModule(module2);
}), {
page: "preferences",
tab: "mousehunt-improved-settings"
});
} catch (error) {
showLoadingError(error);
}
});
init90();
}
});
return require_src();
})();