{"version":3,"sources":["../../src/utils/log-utility.ts","../../src/decorators/RegisteredActivities.ts","../../src/decorators/RegisteredCommitments.ts","../../src/decorators/RegisteredLocations.ts","../../src/decorators/RegisteredMaps.ts","../../src/decorators/RegisteredQuests.ts","../../src/decorators/RegisteredRooms.ts"],"names":["logger","message","optionalParams","registeredActivities","CachedMap","RegisteredActivities","add","activities","activity","get","id","e","values","has","RegisteredActivities_default","registeredCommitments","RegisteredCommitments","commitments","commitment","RegisteredCommitments_default","registeredLocations","RegisteredLocations","location","c","RegisteredLocations_default","registeredMaps","RegisteredMaps","map","RegisteredMaps_default","registeredQuests","RegisteredQuest","quests","quest","RegisteredQuests_default","registeredRooms","RegisteredRooms","room","RegisteredRooms_default"],"mappings":"mDAAO,IAAUA,OACAA,CAAAA,CAAA,GAAA,CAAM,CAACC,CAAAA,CAAAA,GAAkBC,CAAAA,GAA0B,QAAQ,GAAA,CAAI,CAAA,OAAA,EAAUD,CAAO,CAAA,CAAA,CAAI,GAAGC,CAAc,CAAA,CACrGF,CAAAA,CAAA,KAAO,CAACC,CAAAA,CAAAA,GAAkBC,IACnC,OAAA,CAAQ,IAAA,CAAK,UAAUD,CAAO,CAAA,CAAA,CAAI,GAAGC,CAAc,CAAA,CAC1CF,EAAA,KAAA,CAAQ,CAACC,KAAkBC,CAAAA,GACpC,OAAA,CAAQ,MAAM,CAAA,OAAA,EAAUD,CAAO,GAAI,GAAGC,CAAc,CAAA,CAC3CF,CAAAA,CAAA,IAAA,CAAO,CAACC,KAAkBC,CAAAA,GACnC,OAAA,CAAQ,KAAK,CAAA,OAAA,EAAUD,CAAO,GAAI,GAAGC,CAAc,IAP1CF,CAAAA,GAAA,EAAA,CAAA,CCQjB,IAAMG,CAAAA,CAAuB,IAAIC,iBAAqC,CAAE,SAAA,CAAW,EAAG,CAAC,CAAA,CAE7EC,CAAAA,CAAAA,CAAAA,CAAAA,EAAV,CAMW,SAASC,CAAAA,CAAIC,EAAqD,CACrE,GAAI,MAAM,OAAA,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,CAChD,MACJ,CACJ,CAZOwB,EAAS,GAAA,CAAA1B,CAAAA,CAkBT,SAASG,CAAAA,EAA0B,CACtC,OAAO,KAAA,CAAM,IAAA,CAAKsB,CAAAA,CAAgB,QAAQ,CAC9C,CAFOC,CAAAA,CAAS,MAAA,CAAAvB,EAST,SAASC,CAAAA,CAAIH,EAAqB,CACrC,OAAOwB,EAAgB,GAAA,CAAIxB,CAAE,CACjC,CAFOyB,CAAAA,CAAS,IAAAtB,EAAAA,CAAAA,EArDVsB,CAAAA,GAAA,EAAA,CAAA,CAyDV,IAAOE,CAAAA,CAAQF","file":"index.cjs","sourcesContent":["export namespace logger {\n    export const log = (message?: any, ...optionalParams: any[]) => console.log(`[NQTR] ${message}`, ...optionalParams);\n    export const warn = (message?: any, ...optionalParams: any[]) =>\n        console.warn(`[NQTR] ${message}`, ...optionalParams);\n    export const error = (message?: any, ...optionalParams: any[]) =>\n        console.error(`[NQTR] ${message}`, ...optionalParams);\n    export const info = (message?: any, ...optionalParams: any[]) =>\n        console.info(`[NQTR] ${message}`, ...optionalParams);\n}\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { ActivityInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all activities registered and available to be used.\n * The key is the id of the activity and the value is the activity itself.\n */\nconst registeredActivities = new CachedMap<string, ActivityInterface>({ cacheSize: 20 });\n\nnamespace RegisteredActivities {\n    /**\n     * Save an activity in the registered activities. If the activity already exists, it will be overwritten.\n     * @param activity The activity to save.\n     * @returns\n     */\n    export function add(activities: ActivityInterface | ActivityInterface[]) {\n        if (Array.isArray(activities)) {\n            activities.forEach((activity) => RegisteredActivities.add(activity));\n            return;\n        }\n        registeredActivities.set(activities.id, activities);\n    }\n\n    /**\n     * Get an activity by its id.\n     * @param id The id of the activity.\n     * @returns The activity or undefined if not found.\n     */\n    export function get(id: string): ActivityInterface | undefined {\n        try {\n            let activity = registeredActivities.get(id);\n            if (!activity) {\n                console.warn(`[NQTR] Activity ${id} not found, you should register it first`);\n                return;\n            }\n            return activity;\n        } catch (e) {\n            logger.error(`Error while getting Activity ${id}`, e);\n            return;\n        }\n    }\n\n    /**\n     * Get a list of all activities registered.\n     * @returns An array of activities.\n     */\n    export function values(): ActivityInterface[] {\n        return Array.from(registeredActivities.values());\n    }\n\n    /**\n     * Check if an activity is registered.\n     * @param id The id of the activity.\n     * @returns True if the activity is registered, false otherwise.\n     */\n    export function has(id: string): boolean {\n        return registeredActivities.has(id);\n    }\n}\nexport default RegisteredActivities;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { CommitmentInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all commitments registered and available to be used.\n * The key is the id of the commitment and the value is the commitment itself.\n */\nexport const registeredCommitments = new CachedMap<string, CommitmentInterface>({ cacheSize: 20 });\nexport const fixedCommitments = new CachedMap<string, CommitmentInterface>({ cacheSize: 20 });\n\nnamespace RegisteredCommitments {\n    /**\n     * Save a commitment in the registered commitments. If the commitment already exists, it will be overwritten.\n     * @param commitment The commitment to save.\n     * @returns\n     */\n    export function add(commitments: CommitmentInterface | CommitmentInterface[]) {\n        if (Array.isArray(commitments)) {\n            commitments.forEach((commitment) => RegisteredCommitments.add(commitment));\n            return;\n        }\n        registeredCommitments.set(commitments.id, commitments);\n    }\n    /**\n     * Get a commitment by its id.\n     * @param id The id of the commitment.\n     * @returns The commitment or undefined if not found.\n     */\n    export function get(id: string): CommitmentInterface | undefined {\n        try {\n            let commitment = registeredCommitments.get(id);\n            if (!commitment) {\n                console.warn(`[NQTR] Commitment ${id} not found, you should register it first`);\n                return;\n            }\n            return commitment;\n        } catch (e) {\n            logger.error(`Error while getting Commitment ${id}`, e);\n            return;\n        }\n    }\n    /**\n     * Get a list of all commitments registered.\n     * @returns An array of commitments.\n     */\n    export function values(): CommitmentInterface[] {\n        return Array.from(registeredCommitments.values());\n    }\n    /**\n     * Check if a commitment is registered.\n     * @param id The id of the commitment.\n     * @returns True if the commitment is registered, false otherwise.\n     */\n    export function has(id: string): boolean {\n        return registeredCommitments.has(id);\n    }\n}\nexport default RegisteredCommitments;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { LocationInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all locations registered and available to be used.\n * The key is the id of the location and the value is the location itself.\n */\nconst registeredLocations = new CachedMap<string, LocationInterface>({ cacheSize: 20 });\n\nnamespace RegisteredLocations {\n    /**\n     * Save a location in the registered locations. If the location already exists, it will be overwritten.\n     * @param location The location to save.\n     * @returns\n     */\n    export function add(location: LocationInterface | LocationInterface[]) {\n        if (Array.isArray(location)) {\n            location.forEach((c) => add(c));\n            return;\n        }\n        // if (registeredLocations.has(location.id)) {\n        //     console.warn(`[NQTR] Location id ${location.id} already exists, it will be overwritten`);\n        // }\n        registeredLocations.set(location.id, location);\n    }\n\n    /**\n     * Get a location by its id.\n     * @param id The id of the location.\n     * @returns The location or undefined if not found.\n     */\n    export function get(id: string): LocationInterface | undefined {\n        try {\n            let location = registeredLocations.get(id);\n            if (!location) {\n                console.warn(`[NQTR] Location ${id} not found, you should register it first`);\n                return;\n            }\n            return location;\n        } catch (e) {\n            logger.error(`Error while getting Location ${id}`, e);\n            return;\n        }\n    }\n\n    /**\n     * Get a list of all locations registered.\n     * @returns An array of locations.\n     */\n    export function values(): LocationInterface[] {\n        return Array.from(registeredLocations.values());\n    }\n\n    /**\n     * Check if a location is registered.\n     * @param id The id of the location.\n     * @returns True if the location is registered, false otherwise.\n     */\n    export function has(id: string): boolean {\n        return registeredLocations.has(id);\n    }\n}\nexport default RegisteredLocations;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { MapInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all maps registered and available to be used.\n * The key is the id of the map and the value is the map itself.\n */\nconst registeredMaps = new CachedMap<string, MapInterface>({ cacheSize: 20 });\n\nnamespace RegisteredMaps {\n    /**\n     * Save a map in the registered maps. If the map already exists, it will be overwritten.\n     * @param map The map to save.\n     * @returns\n     */\n    export function add(map: MapInterface | MapInterface[]) {\n        if (Array.isArray(map)) {\n            map.forEach((c) => add(c));\n            return;\n        }\n        // if (registeredMaps.has(map.id)) {\n        //     console.warn(`[NQTR] Map id ${map.id} already exists, it will be overwritten`);\n        // }\n        registeredMaps.set(map.id, map);\n    }\n\n    /**\n     * Get a map by its id.\n     * @param id The id of the map.\n     * @returns The map or undefined if not found.\n     */\n    export function get(id: string): MapInterface | undefined {\n        try {\n            let map = registeredMaps.get(id);\n            if (!map) {\n                console.warn(`[NQTR] Map ${id} not found, you should register it first`);\n                return;\n            }\n            return map;\n        } catch (e) {\n            logger.error(`Error while getting Map ${id}`, e);\n            return;\n        }\n    }\n\n    /**\n     * Get a list of all maps registered.\n     * @returns An array of maps.\n     */\n    export function values(): MapInterface[] {\n        return Array.from(registeredMaps.values());\n    }\n\n    /**\n     * Check if a map is registered.\n     * @param id The id of the map.\n     * @returns True if the map is registered, false otherwise.\n     */\n    export function has(id: string): boolean {\n        return registeredMaps.has(id);\n    }\n}\nexport default RegisteredMaps;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { QuestInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all quests registered and available to be used.\n * The key is the id of the quest and the value is the quest itself.\n */\nconst registeredQuests = new CachedMap<string, QuestInterface>({ cacheSize: 5 });\n\nnamespace RegisteredQuest {\n    /**\n     * Save a quest in the registered quests. If the quest already exists, it will be overwritten.\n     * @param quest The quest to save.\n     * @returns\n     */\n    export function add(quests: QuestInterface | QuestInterface[]) {\n        if (Array.isArray(quests)) {\n            quests.forEach((quest) => RegisteredQuest.add(quest));\n            return;\n        }\n        registeredQuests.set(quests.id, quests);\n    }\n    /**\n     * Get a quest by its id.\n     * @param id The id of the quest.\n     * @returns The quest or undefined if not found.\n     */\n    export function get(id: string): QuestInterface | undefined {\n        try {\n            let quest = registeredQuests.get(id);\n            if (!quest) {\n                console.warn(`[NQTR] Quest ${id} not found, you should register it first`);\n                return;\n            }\n            return quest;\n        } catch (e) {\n            logger.error(`Error while getting Quest ${id}`, e);\n            return;\n        }\n    }\n    /**\n     * Get a list of all quests registered.\n     * @returns An array of quests.\n     */\n    export function values(): QuestInterface[] {\n        return Array.from(registeredQuests.values());\n    }\n    /**\n     * Check if a quest is registered.\n     * @param id The id of the quest.\n     * @returns True if the quest is registered, false otherwise.\n     */\n    export function has(id: string): boolean {\n        return registeredQuests.has(id);\n    }\n}\nexport default RegisteredQuest;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { RoomInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\nimport RegisteredLocations from \"./RegisteredLocations\";\nimport RegisteredMaps from \"./RegisteredMaps\";\n\n/**\n * A Map that contains all rooms registered and available to be used.\n * The key is the id of the room and the value is the room itself.\n */\nconst registeredRooms = new CachedMap<string, RoomInterface>({ cacheSize: 20 });\n\nnamespace RegisteredRooms {\n    /**\n     * Save a room in the registered rooms, and their location and map if they are not already registered.\n     * If the room already exists, it will be overwritten.\n     * @param room The room to save.\n     * @returns\n     */\n    export function add(room: RoomInterface | RoomInterface[]) {\n        if (Array.isArray(room)) {\n            room.forEach((c) => add(c));\n            return;\n        }\n        registeredRooms.set(room.id, room);\n        let location = room.location;\n        RegisteredLocations.add(location);\n        let map = location?.map;\n        if (map) {\n            RegisteredMaps.add(map);\n        }\n    }\n\n    /**\n     * Get a room by its id.\n     * @param id The id of the room.\n     * @returns The room or undefined if not found.\n     */\n    export function get(id: string): RoomInterface | undefined {\n        try {\n            let room = registeredRooms.get(id);\n            if (!room) {\n                console.warn(`[NQTR] Room ${id} not found, you should register it first`);\n                return;\n            }\n            return room;\n        } catch (e) {\n            logger.error(`Error while getting Room ${id}`, e);\n            return;\n        }\n    }\n\n    /**\n     * Get a list of all rooms registered.\n     * @returns An array of rooms.\n     */\n    export function values(): RoomInterface[] {\n        return Array.from(registeredRooms.values());\n    }\n\n    /**\n     * Check if a room is registered.\n     * @param id The id of the room.\n     * @returns True if the room is registered, false otherwise.\n     */\n    export function has(id: string): boolean {\n        return registeredRooms.has(id);\n    }\n}\nexport default RegisteredRooms;\n"]}