{"version":3,"sources":["../src/classes/index.ts","../src/managers/index.ts","../src/constants.ts","../src/decorators/index.ts","../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","../src/functions/tracking-changes.ts","../src/managers/NavigatorManager.ts","../src/managers/QuestManager.ts","../src/managers/RoutineManager.ts","../src/managers/TimeManagerSettings.ts","../src/managers/TimeManager.ts","../src/classes/ActivityStoredClass.ts","../src/classes/ActivityBaseModel.ts","../src/classes/CommitmentStoredClass.ts","../src/classes/CommitmentBaseModel.ts","../src/classes/navigation/NavigationAbstractClass.ts","../src/classes/navigation/LocationStoredClass.ts","../src/classes/navigation/LocationBaseModel.ts","../src/classes/navigation/MapStoredClass.ts","../src/classes/navigation/MapBaseModel.ts","../src/classes/navigation/RoomStoredClass.ts","../src/classes/navigation/RoomBaseModel.ts","../src/classes/quest/QuestStoredClass.ts","../src/classes/quest/QuestBaseModel.ts","../src/classes/quest/StageStoredClass.ts","../src/classes/quest/StageBaseModel.ts","../src/interface/index.ts","../src/types/index.ts","../src/index.ts"],"names":["classes_exports","__export","ActivityBaseModel","ActivityStoredClass","CommitmentBaseModel","CommitmentStoredClass","LocationBaseModel","LocationStoredClass","MapBaseModel","MapStoredClass","QuestBaseModel","QuestStoredClass","RoomBaseModel","RoomStoredClass","StageBaseModel","StageStoredClass","managers_exports","navigator","questsNotebook","routine","timeTracker","TIME_DATA_KEY","CURRENT_ROOM_MEMORY_KEY","LATEST_EVENT_MEMORY_KEY","decorators_exports","RegisteredActivities_default","RegisteredCommitments_default","RegisteredLocations_default","RegisteredMaps_default","RegisteredQuests_default","RegisteredRooms_default","logger","message","optionalParams","registeredActivities","CachedMap","RegisteredActivities","add","activities","activity","get","id","e","values","has","registeredCommitments","fixedCommitments","RegisteredCommitments","commitments","commitment","registeredLocations","RegisteredLocations","location","c","registeredMaps","RegisteredMaps","map","registeredQuests","RegisteredQuest","quests","quest","registeredRooms","RegisteredRooms","room","setLastEvent","event","storage","getLastEvent","NavigatorManager","roomId","prevRoom","QuestManager","props","promises","TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY","RoutineManager","commitmentsIds","currentCommitments","character_commitments","ch","character","TimeManagerSettings","TimeManager","settings","dayStartTime","dayEndTime","defaultTimeSpent","timeSlots","weekLength","weekendStartDay","getDayName","data","value","prev","index","slot","delta","newTime","time","newDate","fromTime","toTime","currentTime","ACTIVITY_CATEGORY","StoredClassModel","_onRun","category","narration","onRun","COMMITMENT_CATEGORY","_characters","_room","currentRoom","lastEvent","NavigationAbstractClass","categoryId","defaultActivities","activityId","activeActivityScheduling","excludedActivitiesScheduling","scheduling","options","timeSlot","dateScheduling","additionalActivitiesIds","to","excludedActivitiesIds","toDate","res","fromDate","a","LOCATION_CATEGORY","_map","MAP_CATEGORY","ROOM_CATEGORY","_location","characters","QUEST_CATEGORY","_stages","currentStage","prevStage","currentStageIndex","nextCurrentStage","newCurrentStage","stages","STAGE_CATEGORY","inizializeDate","deltaDateRequired","q","flag","interface_exports","types_exports","nqtr","index_default"],"mappings":"2EAAA,IAAA,EAAA,CAAA,MAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,IAAA,IAAA,CAAA,IAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,UAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA,IAAAA,EAAAA,CAAA,EAAA,CAAAC,CAAAA,CAAAD,EAAAA,CAAA,uBAAAE,CAAAA,CAAA,mBAAA,CAAA,IAAAC,CAAAA,CAAA,mBAAA,CAAA,IAAAC,CAAAA,CAAA,qBAAA,CAAA,IAAAC,CAAAA,CAAA,iBAAA,CAAA,IAAAC,EAAA,mBAAA,CAAA,IA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AA,CAIR,IAAI,iBAAA,EAA4B,CAC5B,OAAO,KAAK,kBAChB,CAEQ,MAAA,CAIR,IAAI,KAAA,EAA4B,CAC5B,OAAO,IAAA,CAAK,MAChB,CAEQ,MAAA,CAIR,IAAI,KAAA,EAAsB,CACtB,OAAO,IAAA,CAAK,MAChB,CAEQ,cAAA,CAIR,IAAI,aAAA,EAA8B,CAC9B,OAAO,IAAA,CAAK,cAChB,CAEQ,2BAIR,IAAI,yBAAA,EAAoC,CACpC,OAAO,IAAA,CAAK,0BAChB,CAEA,IAAa,WAAqB,CAC9B,OAAI,KAAA,CAAM,SAAA,CACC,IAAA,CAEP,IAAA,CAAK,KAAA,CAAM,MAAA,CAAS,EACf,CAAA,CAAA,IAAA,CAAK,KAAA,CAAM,KAAA,CAAO6E,CAAAA,EAASnF,OAAAA,CAAQ,OAAA,CAAQmF,CAAAA,CAAK,IAAI,CAAC,CAAA,CAKvD,KACX,CACA,IAAa,SAAA,CAAUzD,CAAAA,CAAgB,CACnC,KAAA,CAAM,UAAYA,EACtB,CACA,IAAa,QAAA,EAAoB,CAC7B,OAAI,IAAA,CAAK,aAAA,CAAc,OAAS,CAAA,EAAK,CAAC,IAAA,CAAK,aAAA,CAAc,KAAA,CAAOyD,CAAAA,EAASnF,OAAAA,CAAQ,OAAA,CAAQmF,EAAK,IAAI,CAAC,CAAA,CACxF,KAAA,CAEJ,KAAA,CAAM,QACjB,CACJ,ECnGA,IAAAC,EAAAA,CAAA,EAAA,CCAA,IAAAC,EAAAA,CAAA,EAAA,CCYA,IAAMC,EAAAA,CAAO,CACT,GAAGxJ,EAAAA,CACH,GAAGwB,EAAAA,CACH,GAAG8H,GACH,GAAGtI,EAAAA,CACH,GAAGuI,EACP,EACOE,EAAAA,CAAQD","file":"index.mjs","sourcesContent":["export { default as ActivityBaseModel } from \"./ActivityBaseModel\";\nexport { default as ActivityStoredClass, ActivityStoredClassProps } from \"./ActivityStoredClass\";\nexport { default as CommitmentBaseModel } from \"./CommitmentBaseModel\";\nexport { default as CommitmentStoredClass, CommitmentStoredClassProps } from \"./CommitmentStoredClass\";\nexport { default as LocationBaseModel } from \"./navigation/LocationBaseModel\";\nexport { default as LocationStoredClass } from \"./navigation/LocationStoredClass\";\nexport { default as MapBaseModel } from \"./navigation/MapBaseModel\";\nexport { default as MapStoredClass } from \"./navigation/MapStoredClass\";\nexport { default as RoomBaseModel } from \"./navigation/RoomBaseModel\";\nexport { default as RoomStoredClass } from \"./navigation/RoomStoredClass\";\nexport { default as QuestBaseModel } from \"./quest/QuestBaseModel\";\nexport { default as QuestStoredClass, QuestStoredClassProps } from \"./quest/QuestStoredClass\";\nexport { default as StageBaseModel } from \"./quest/StageBaseModel\";\nexport { default as StageStoredClass, StageStoredClassProps } from \"./quest/StageStoredClass\";\n","import NavigatorManager from \"./NavigatorManager\";\nimport QuestManager from \"./QuestManager\";\nimport RoutineManager from \"./RoutineManager\";\nimport { default as TimeManager } from \"./TimeManager\";\n\nconst timeTracker = new TimeManager();\nconst navigator = new NavigatorManager();\nconst routine = new RoutineManager();\nconst questsNotebook = new QuestManager();\n\nexport { navigator, questsNotebook, routine, timeTracker };\n","export const TIME_SETTINGS_KEY = \"___nqtr-time_manager_settings___\";\nexport const TIME_DATA_KEY = \"___nqtr-time_manager_data___\";\n\nexport const CURRENT_ROOM_MEMORY_KEY = \"___nqtr-current_room_memory___\";\nexport const LATEST_EVENT_MEMORY_KEY = \"___nqtr-last_event_memory___\";\n","export { default as RegisteredActivities } from \"./RegisteredActivities\";\nexport { default as RegisteredCommitments } from \"./RegisteredCommitments\";\nexport { default as RegisteredLocations } from \"./RegisteredLocations\";\nexport { default as RegisteredMaps } from \"./RegisteredMaps\";\nexport { default as RegisteredQuests } from \"./RegisteredQuests\";\nexport { default as RegisteredRooms } from \"./RegisteredRooms\";\n","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","import { storage } from \"@drincs/pixi-vn\";\nimport { LATEST_EVENT_MEMORY_KEY } from \"../constants\";\nimport LastEventType from \"../types/LastEventType\";\n\nexport function setLastEvent(event: LastEventType) {\n    storage.setVariable(LATEST_EVENT_MEMORY_KEY, event);\n}\nexport function getLastEvent() {\n    return storage.getVariable<LastEventType>(LATEST_EVENT_MEMORY_KEY);\n}\n","import { storage } from \"@drincs/pixi-vn\";\nimport { CURRENT_ROOM_MEMORY_KEY } from \"../constants\";\nimport { RegisteredLocations, RegisteredMaps, RegisteredRooms } from \"../decorators\";\nimport { setLastEvent } from \"../functions/tracking-changes\";\nimport { LocationInterface, MapInterface, RoomInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\nexport default class NavigatorManager {\n    get rooms() {\n        return RegisteredRooms.values();\n    }\n    get locations() {\n        return RegisteredLocations.values();\n    }\n    get maps() {\n        return RegisteredMaps.values();\n    }\n    get currentRoomId(): string | undefined {\n        return storage.getVariable<string>(CURRENT_ROOM_MEMORY_KEY);\n    }\n    get currentRoom(): RoomInterface | undefined {\n        let roomId = this.currentRoomId;\n        if (!roomId) {\n            logger.error(`The current room has not yet been set`);\n            return;\n        }\n        let room = RegisteredRooms.get(roomId);\n        if (!room) {\n            logger.error(`Current room ${roomId} not found`);\n            return;\n        }\n        return room;\n    }\n    set currentRoom(room: RoomInterface | string) {\n        if (typeof room !== \"string\") {\n            room = room.id;\n        }\n        let roomRegistrated = RegisteredRooms.get(room);\n        if (!roomRegistrated) {\n            logger.error(`The room ${room} is not registered, so it can't be set as current room`);\n            return;\n        }\n        let prevRoom = storage.getVariable<string>(CURRENT_ROOM_MEMORY_KEY);\n        if (prevRoom === room) {\n            return;\n        }\n\n        setLastEvent({\n            type: \"editroom\",\n            prev: prevRoom,\n            value: room,\n        });\n        storage.setVariable(CURRENT_ROOM_MEMORY_KEY, room);\n    }\n    get currentLocation(): LocationInterface | undefined {\n        return this.currentRoom?.location;\n    }\n    get currentMap(): MapInterface | undefined {\n        return this.currentRoom?.location.map;\n    }\n    /**\n     * Clear all the expired activities.\n     */\n    clearExpiredActivities() {\n        RegisteredRooms.values().forEach((room) => {\n            room.clearExpiredActivities();\n        });\n    }\n}\n","import { OnRunProps } from \"@drincs/nqtr\";\nimport RegisteredQuest from \"../decorators/RegisteredQuests\";\nimport { QuestInterface } from \"../interface\";\n\nexport default class QuestManager {\n    /**\n     * The quests registered in the game.\n     */\n    get quests(): QuestInterface[] {\n        return RegisteredQuest.values();\n    }\n    /**\n     * The quests that are started, so they are in progress or completed or failed.\n     */\n    get startedQuests(): QuestInterface[] {\n        return this.quests.filter((quest) => quest.started);\n    }\n    /**\n     * The quests that are in progress.\n     */\n    get inProgressQuests(): QuestInterface[] {\n        return this.quests.filter((quest) => quest.inProgress);\n    }\n    /**\n     * The quests that are completed.\n     */\n    get completedQuests(): QuestInterface[] {\n        return this.quests.filter((quest) => quest.completed);\n    }\n    /**\n     * The quests that are failed.\n     */\n    get failedQuests(): QuestInterface[] {\n        return this.quests.filter((quest) => quest.failed);\n    }\n    /**\n     * The quests that are not started.\n     */\n    get notStartedQuests(): QuestInterface[] {\n        return this.quests.filter((quest) => !quest.started);\n    }\n    /**\n     * Get the quest by the id.\n     * @param id The id of the quest.\n     * @returns The quest with the id.\n     */\n    find(id: string): QuestInterface | undefined {\n        return RegisteredQuest.get(id);\n    }\n\n    /**\n     * Start the quests that must start on the current stage.\n     */\n    async startsStageMustBeStarted(props: OnRunProps) {\n        let promises: Promise<void>[] = this.quests.map((quest) => {\n            if (quest.currentStageMustStart) {\n                return quest.startCurrentStage(props);\n            }\n            return Promise.resolve();\n        });\n        await Promise.all(promises);\n    }\n}\n","import { CharacterInterface, storage } from \"@drincs/pixi-vn\";\nimport RegisteredCommitments, { fixedCommitments, registeredCommitments } from \"../decorators/RegisteredCommitments\";\nimport { CommitmentInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\nconst TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY = \"___nqtr-temporary_commitment___\";\nexport default class RoutineManager {\n    get fixedRoutine(): CommitmentInterface[] {\n        return [...fixedCommitments.values()];\n    }\n    /**\n     * Set a commitment as fixed, it will be always available. They cannot be deleted or edit during the game session.\n     */\n    set fixedRoutine(commitments: CommitmentInterface[]) {\n        commitments.forEach((c) => {\n            if (fixedCommitments.has(c.id)) {\n                console.warn(`[NQTR] Commitment id ${c.id} already exists, it will be overwritten`);\n            }\n            fixedCommitments.set(c.id, c);\n        });\n    }\n\n    /**\n     * Get the temporary commitments by its id.\n     * @returns The temporary commitments.\n     */\n    get temporaryRoutine(): CommitmentInterface[] {\n        let commitmentsIds = storage.getVariable<string[]>(TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY);\n        if (!commitmentsIds) {\n            return [];\n        }\n        let commitments = commitmentsIds\n            .map((id) => RegisteredCommitments.get(id))\n            .filter((commitment) => commitment !== undefined);\n        return commitments;\n    }\n\n    get allRoutine(): CommitmentInterface[] {\n        return [...this.fixedRoutine, ...this.temporaryRoutine];\n    }\n\n    /**\n     * This feature adds the commitments during the game session.\n     * @param commitment The commitment or commitments to add.\n     */\n    add(commitment: CommitmentInterface[] | CommitmentInterface) {\n        if (!Array.isArray(commitment)) {\n            commitment = [commitment];\n        }\n        let commitmentsIds = commitment\n            .map((commitment) => {\n                let commitmentTest = RegisteredCommitments.get(commitment.id);\n                if (!commitmentTest) {\n                    console.warn(`[NQTR] Commitment ${commitment.id} not found, it will be ignored`);\n                    return undefined;\n                }\n                return commitment.id;\n            })\n            .filter((id) => id !== undefined);\n\n        storage.setVariable(TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY, commitmentsIds);\n    }\n\n    /**\n     * Get the commitments added during the game session.\n     * @param id The id of the commitment.\n     * @returns The commitment or undefined if not found.\n     */\n    find(id: string): CommitmentInterface | undefined {\n        return RegisteredCommitments.get(id);\n    }\n\n    /**\n     * Remove the commitments added during the game session.\n     * @param commitment The commitment or commitments to remove.\n     */\n    remove(commitment: CommitmentInterface[] | CommitmentInterface) {\n        if (!Array.isArray(commitment)) {\n            commitment = [commitment];\n        }\n        let commitmentsIds = commitment.map((commitment) => {\n            return commitment.id;\n        });\n\n        let currentCommitments = storage.getVariable<string[]>(TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY);\n        if (!currentCommitments) {\n            return;\n        }\n        currentCommitments = currentCommitments.filter((id) => !commitmentsIds.includes(id));\n        storage.setVariable(TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY, currentCommitments);\n    }\n\n    /**\n     * Clear all the expired commitments.\n     */\n    clearExpiredRoutine() {\n        RegisteredCommitments.values().forEach((commitment) => {\n            if (commitment.expired) {\n                registeredCommitments.delete(commitment.id);\n            }\n        });\n    }\n\n    /**\n     * Get the current commitments. The hidden commitments are not included.\n     * In case there is a character who has two or more commitments at the same time, will be selected the commitment with the highest priority.\n     * Higher priority commitments are calculated using the following steps:\n     * 1. The commitments that have Commitments BaseModel.priority set to a higher value will be selected first.\n     * 2. If there are commitments with the same priority, the commitments that are not fixed will be selected first.\n     * 3. If there are commitments with the same priority and the same fixed status, priority will be given to the commitment with a lower index.\n     * @returns The current commitments.\n     */\n    get currentRoutine(): CommitmentInterface[] {\n        let character_commitments: { [character: string]: CommitmentInterface } = {};\n        [...this.fixedRoutine, ...this.temporaryRoutine].forEach((c) => {\n            if (c.isActive) {\n                if (c.characters.length > 0) {\n                    // all the characters don't already have commitments or the commitment has a higher priority\n                    let allAvailable = c.characters.every(\n                        (ch) => !character_commitments[ch.id] || c.priority > character_commitments[ch.id].priority\n                    );\n                    if (allAvailable) {\n                        c.characters.forEach((ch) => {\n                            character_commitments[ch.id] = c;\n                        });\n                    }\n                } else {\n                    logger.error(`The commitment ${c.id} has no characters assigned`);\n                }\n            }\n        });\n        return Object.values(character_commitments);\n    }\n\n    /**\n     * Get the character commitment.\n     * @param character The character.\n     * @returns The commitment or undefined if not found.\n     */\n    getCommitmentByCharacter(character: CharacterInterface): CommitmentInterface | undefined {\n        this.currentRoutine.forEach((c) => {\n            if (c.characters.map((ch) => ch.id).includes(character.id)) {\n                return c;\n            }\n        });\n        return undefined;\n    }\n}\n","import { TimeSettings, TimeSlotInterface } from \"../types/TimeSettings\";\n\nexport default class TimeManagerSettings implements TimeSettings {\n    static dayStartTime: number = 0;\n    static dayEndTime: number = 24;\n    static defaultTimeSpent: number = 1;\n    static timeSlots: TimeSlotInterface[] = [];\n    static weekLength: number = 7;\n    static weekendStartDay: number = this.weekLength - 1;\n    static getDayName?: (weekDayNumber: number) => string;\n}\n","import { storage } from \"@drincs/pixi-vn\";\nimport { TIME_DATA_KEY } from \"../constants\";\nimport { setLastEvent } from \"../functions/tracking-changes\";\nimport TimeDataType from \"../types/TimeDataType\";\nimport { TimeSettings, TimeSlotInterface } from \"../types/TimeSettings\";\nimport TimeManagerSettings from \"./TimeManagerSettings\";\n\nexport default class TimeManager {\n    initialize(settings: TimeSettings) {\n        const {\n            dayStartTime = 0,\n            dayEndTime = 24,\n            defaultTimeSpent = 1,\n            timeSlots = [],\n            weekLength = 7,\n            weekendStartDay = weekLength - 1,\n            getDayName,\n        } = settings;\n        TimeManagerSettings.dayStartTime = dayStartTime;\n        TimeManagerSettings.dayEndTime = dayEndTime;\n        TimeManagerSettings.defaultTimeSpent = defaultTimeSpent;\n        TimeManagerSettings.timeSlots = timeSlots;\n        TimeManagerSettings.weekLength = weekLength;\n        if (weekendStartDay >= TimeManagerSettings.weekLength) {\n            console.warn(`[NQTR] Weekend start day should be less than week length ${weekLength}, so will be ignored`);\n        } else {\n            TimeManagerSettings.weekendStartDay = weekendStartDay;\n        }\n        TimeManagerSettings.getDayName = getDayName;\n    }\n    get dayStartTime(): number {\n        return TimeManagerSettings.dayStartTime;\n    }\n    get dayEndTime(): number {\n        return TimeManagerSettings.dayEndTime;\n    }\n    get defaultTimeSpent(): number {\n        return TimeManagerSettings.defaultTimeSpent;\n    }\n    get timeSlots(): TimeSlotInterface[] {\n        return TimeManagerSettings.timeSlots;\n    }\n    get weekLength(): number {\n        return TimeManagerSettings.weekLength;\n    }\n    get weekendStartDay(): number {\n        return TimeManagerSettings.weekendStartDay;\n    }\n    /**\n     * Week days name\n     * @param weekDayNumber The current week day number (from: 0 - to: {@link weekLength} - 1).\n     * @returns The name of the week day.\n     * @example\n     * ```ts\n     * (weekDayNumber: number) => {\n     *     const weekDaysNames = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];\n     *     return weekDaysNames[weekDayNumber];\n     * }\n     * ```\n     */\n    get getDayName() {\n        return TimeManagerSettings.getDayName;\n    }\n\n    /**\n     * Get the current time. Time is a numeric variable used to determine and manage time during a day/date.\n     * It's recommended to use currentTime as if it were the current time. If you also want to manage minutes, you can use a float value.\n     */\n    get currentTime(): number {\n        let data = storage.getVariable<TimeDataType>(TIME_DATA_KEY) || {};\n        if (data.hasOwnProperty(\"currentTime\") && typeof data.currentTime === \"number\") {\n            return data.currentTime;\n        }\n        return this.dayStartTime;\n    }\n    set currentTime(value: number | undefined) {\n        let prev = storage.getVariable<TimeDataType>(TIME_DATA_KEY) || {};\n        let data = { ...prev };\n        if (typeof value === \"number\") {\n            data.currentTime = value;\n        } else {\n            delete data.currentTime;\n        }\n        setLastEvent({\n            type: \"edittime\",\n            prev: prev,\n            value: data,\n        });\n        storage.setVariable(TIME_DATA_KEY, data);\n    }\n    /**\n     * Get the current date. Date is a numeric variable used to determine and manage the number of days passed.\n     * It's recommended to use currentDate as if it were the current day.\n     */\n    get currentDate(): number {\n        let data = storage.getVariable<TimeDataType>(TIME_DATA_KEY) || {};\n        if (data.hasOwnProperty(\"currentDate\") && typeof data.currentDate === \"number\") {\n            return data.currentDate;\n        }\n        return 0;\n    }\n    set currentDate(value: number | undefined) {\n        let prev = storage.getVariable<TimeDataType>(TIME_DATA_KEY) || {};\n        let data = { ...prev };\n        if (typeof value === \"number\") {\n            data.currentDate = value;\n        } else {\n            delete data.currentDate;\n        }\n        setLastEvent({\n            type: \"edittime\",\n            prev: prev,\n            value: data,\n        });\n        storage.setVariable(TIME_DATA_KEY, data);\n    }\n    /**\n     * If the current day is greater than or equal to the weekend start day, then it will return true.\n     */\n    get isWeekend(): boolean {\n        return this.currentWeekDayNumber >= this.weekendStartDay;\n    }\n    /**\n     * Get the current week day number (from: 1 - to: {@link weekLength}).\n     * For example, if the week length is 7 and the current day is 10, then the result will be 4.\n     */\n    get currentWeekDayNumber(): number {\n        let result = this.currentDate % this.weekLength;\n        return result + 1;\n    }\n    /**\n     * Get the current week day name. If the week days names are not defined, then it will return undefined.\n     * For example, if the week days names are ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] and the current day is 10, then the result will be 'Thursday'.\n     * @default \"\"\n     */\n    get currentDayName(): string {\n        if (!this.getDayName) {\n            console.warn(`[NQTR] Week days names are not defined, so currentDayName will be empty`);\n            return \"\";\n        }\n        return this.getDayName(this.currentWeekDayNumber - 1);\n    }\n    /**\n     * Get the current {@link timeSlots} index.\n     * You can use this property to create \"Image that changes based on the time period\":\n     * @example\n     * ```tsx\n     * import { weekLength } from '@drincs/nqtr';\n     *\n     * function changeBackground() {\n     *     return (\n     *         <img src={`background-currentTimeSlot.currentTimeSlot.png`} />\n     *     )\n     * }\n     */\n    get currentTimeSlot(): number {\n        if (this.timeSlots.length === 0) {\n            console.warn(\"[NQTR] Time slots are not defined\");\n            return 0;\n        }\n        for (let index = 0; index < this.timeSlots.length; index++) {\n            let slot = this.timeSlots[index];\n            if (this.timeSlots.length > index + 1) {\n                if (this.nowIsBetween(slot.startTime, this.timeSlots[index + 1].startTime)) {\n                    return index;\n                }\n            }\n        }\n        return this.timeSlots.length - 1;\n    }\n\n    /**\n     * This function will increase the current time by the given time spent.\n     * If the new time is greater than or equal to the max day times, then it will increase the day and set the new time.\n     * @param delta is the time spent in times (default: {@link defaultTimeSpent})\n     * @returns currentTimeSlot.currentTime\n     */\n    increaseTime(delta: number = this.defaultTimeSpent): number {\n        let newTime = this.currentTime + delta;\n        if (newTime >= this.dayEndTime) {\n            this.increaseDate();\n            newTime = this.dayStartTime + (newTime - this.dayEndTime);\n        }\n        this.currentTime = newTime;\n        return this.currentTime;\n    }\n\n    /**\n     * This function will increase the current date by the given delta.\n     * @param delta is the number of days to increase (default: 1)\n     * @param time is the time of the new day (default: {@link dayStartTime})\n     * @returns timeTracker.currentDate\n     */\n    increaseDate(delta: number = 1, time: number = this.dayStartTime): number {\n        let newDate = this.currentDate + delta;\n        this.currentDate = newDate;\n        this.currentTime = time;\n        return this.currentDate;\n    }\n\n    /**\n     * This function will check if the current time is between the given times.\n     * @param fromTime the starting time. If the {@link currentTime} is equal to this time, the function will return true.\n     * @param toTime the ending time.\n     * @returns true if the current time is between the given times, otherwise false.\n     */\n    nowIsBetween(fromTime: number | undefined, toTime: number | undefined): boolean {\n        if (fromTime === undefined) {\n            fromTime = this.dayStartTime - 1;\n        }\n        if (toTime === undefined) {\n            toTime = this.dayEndTime + 1;\n        }\n        let currentTime = this.currentTime;\n        if (fromTime < toTime) {\n            return currentTime >= fromTime && currentTime < toTime;\n        }\n        return currentTime >= fromTime || currentTime < toTime;\n    }\n}\n","import { narration, StoredClassModel } from \"@drincs/pixi-vn\";\nimport { ActivityInterface } from \"../interface\";\nimport { ActivityBaseInternalInterface } from \"../interface/ActivityInterface\";\nimport DateSchedulingInterface from \"../interface/DateSchedulingInterface\";\nimport TimeSchedulingInterface from \"../interface/TimeSchedulingInterface\";\nimport { timeTracker } from \"../managers\";\nimport { OnRunAsyncFunction, OnRunEvent } from \"../types\";\n\nexport interface ActivityStoredClassProps {\n    /**\n     * Time slot in which activity/commitment will be active.\n     */\n    timeSlot?: TimeSchedulingInterface;\n    /**\n     * Used to schedule what date it will be added and removed.\n     */\n    dateScheduling?: DateSchedulingInterface;\n}\n\nconst ACTIVITY_CATEGORY = \"__nqtr-activity__\";\nexport default class ActivityStoredClass<OnRunEventType = ActivityInterface>\n    extends StoredClassModel\n    implements ActivityBaseInternalInterface\n{\n    constructor(\n        id: string,\n        private readonly _onRun: OnRunEvent<OnRunEventType>,\n        props: ActivityStoredClassProps,\n        category: string = ACTIVITY_CATEGORY\n    ) {\n        super(category, id);\n        this._timeSlot = props.timeSlot;\n        this._dateScheduling = props.dateScheduling;\n    }\n\n    private _timeSlot?: TimeSchedulingInterface;\n    get timeSlot(): TimeSchedulingInterface | undefined {\n        return this._timeSlot;\n    }\n\n    private _dateScheduling?: DateSchedulingInterface;\n    get dateScheduling(): DateSchedulingInterface | undefined {\n        return this._dateScheduling;\n    }\n\n    protected addTempHistoryItem() {\n        narration.addCurrentStepToHistory();\n    }\n    get run(): OnRunAsyncFunction {\n        return async (props) => {\n            this.addTempHistoryItem();\n            return await this._onRun(this as any, props);\n        };\n    }\n\n    get expired(): boolean {\n        if (this.dateScheduling?.to && this.dateScheduling.to <= timeTracker.currentDate) {\n            return true;\n        }\n        return false;\n    }\n\n    get isActive(): boolean {\n        if (this.dateScheduling?.from && this.dateScheduling.from > timeTracker.currentDate) {\n            return false;\n        }\n        if (this.dateScheduling?.to && this.dateScheduling.to < timeTracker.currentDate) {\n            return false;\n        }\n        if (!timeTracker.nowIsBetween(this.timeSlot?.from, this.timeSlot?.to)) {\n            return false;\n        }\n        return true;\n    }\n}\n","import { storage } from \"@drincs/pixi-vn\";\nimport { ActivityInterface, ActivityProps } from \"../interface\";\nimport { OnRunEvent } from \"../types/OnRunEvent\";\nimport ActivityStoredClass from \"./ActivityStoredClass\";\n\n/**\n * The activity model. It is used to create an activity.\n * @example\n * ```tsx\n * export const nap = new ActivityModel(\"nap\",\n *     (_, event) => {\n *         if (event) {\n *             event.navigate(\"/game\")\n *             callLabelWithGoNavigationCallBack(napLabel, event)\n *         }\n *         else {\n *             console.error(\"Event is undefined\")\n *         }\n *     },\n *     {\n *         name: \"Nap\",\n *         timeSlot: {\n *             from: 5,\n *             to: 23,\n *         },\n *         icon: \"https://icon.jpg\",\n *     }\n * )\n * ```\n */\nexport default class ActivityBaseModel extends ActivityStoredClass<ActivityInterface> {\n    /**\n     * @param id The activity id, that must be unique.\n     * @param onRun The function that is called when the activity is runned. Have 2 parameters: the runned activity and the yourParams object, that is an object with the parameters that you want to pass to the onRun function.\n     * @param props The activity properties.\n     */\n    constructor(id: string, onRun: OnRunEvent<ActivityInterface>, props: ActivityProps) {\n        super(id, onRun, {\n            dateScheduling: props.dateScheduling,\n            timeSlot: props.timeSlot,\n        });\n        this.defaultName = props.name || \"\";\n        this.defaultDisabled = props.disabled || false;\n        this.defaultHidden = props.hidden || false;\n        this._icon = props.renderIcon;\n    }\n\n    private defaultName: string;\n    /**\n     * The name of the activity.\n     */\n    get name(): string {\n        return this.getStorageProperty<string>(\"name\") || this.defaultName;\n    }\n    set name(value: string | undefined) {\n        this.setStorageProperty(\"name\", value);\n    }\n\n    private defaultDisabled: boolean | string;\n    /**\n     * Whether is disabled. If it is a string, it is a Pixi'VN flag name.\n     */\n    get disabled(): boolean {\n        let value = this.getStorageProperty<boolean>(\"disabled\") || this.defaultDisabled;\n        if (typeof value === \"string\") {\n            return storage.getFlag(value);\n        }\n        return value;\n    }\n    set disabled(value: boolean | string) {\n        this.setStorageProperty(\"disabled\", value);\n    }\n\n    private defaultHidden: boolean | string;\n    /**\n     * Whether is hidden. If it is a string, it is a Pixi'VN flag name.\n     */\n    get hidden(): boolean {\n        let value = this.getStorageProperty<boolean>(\"hidden\") || this.defaultHidden;\n        if (typeof value === \"string\") {\n            return storage.getFlag(value);\n        }\n        return value;\n    }\n    set hidden(value: boolean | string) {\n        this.setStorageProperty(\"hidden\", value);\n    }\n\n    private _icon?: string;\n    /**\n     * The icon of the activity.\n     */\n    get icon(): string | undefined {\n        return this._icon;\n    }\n}\n","import { CharacterInterface, storage } from \"@drincs/pixi-vn\";\nimport { CURRENT_ROOM_MEMORY_KEY, TIME_DATA_KEY } from \"../constants\";\nimport { getLastEvent } from \"../functions/tracking-changes\";\nimport { CommitmentInterface, RoomInterface } from \"../interface\";\nimport { CommitmentBaseInternalInterface } from \"../interface/CommitmentInterface\";\nimport DateSchedulingInterface from \"../interface/DateSchedulingInterface\";\nimport TimeSchedulingInterface from \"../interface/TimeSchedulingInterface\";\nimport { navigator } from \"../managers\";\nimport { ExecutionType } from \"../types\";\nimport { OnRunEvent } from \"../types/OnRunEvent\";\nimport TimeDataType from \"../types/TimeDataType\";\nimport ActivityStoredClass from \"./ActivityStoredClass\";\n\nexport interface CommitmentStoredClassProps {\n    /**\n     * Execution type. If is \"automatic\" the onRun() runned automatically when the palayer is in the room. If is \"interaction\" the player must interact with the character to run the onRun() function.\n     * If you set \"automatic\" remember to remove the commitment when it is no longer needed, because otherwise it repeats itself every time.\n     */\n    executionType?: ExecutionType;\n    /**\n     * The priority. The higher the number, the higher the priority.\n     * To ensure that a character is not in 2 places at the same time, if there are 2 or more valid commits at the same time and with the same character, the one with the highest priority will be chosen.\n     */\n    priority?: number;\n    /**\n     * Time slot in which activity/commitment will be active.\n     */\n    timeSlot?: TimeSchedulingInterface;\n    /**\n     * Used to schedule what date it will be added and removed.\n     */\n    dateScheduling?: DateSchedulingInterface;\n}\n\nconst COMMITMENT_CATEGORY = \"__nqtr-commitment__\";\nexport default class CommitmentStoredClass\n    extends ActivityStoredClass<CommitmentInterface>\n    implements CommitmentBaseInternalInterface\n{\n    constructor(\n        id: string,\n        private readonly _characters: CharacterInterface[],\n        private readonly _room: RoomInterface,\n        onRun: OnRunEvent<CommitmentInterface> | undefined,\n        props: CommitmentStoredClassProps\n    ) {\n        onRun = onRun || (() => {});\n        super(id, onRun, props, COMMITMENT_CATEGORY);\n        this.defaultExecutionType = props.executionType || \"interaction\";\n        this.defaultPriority = props.priority;\n    }\n    private readonly defaultExecutionType: ExecutionType;\n    private readonly defaultPriority?: number;\n\n    get characters(): CharacterInterface[] {\n        return this._characters;\n    }\n\n    get room(): RoomInterface {\n        return this._room;\n    }\n\n    get executionType(): ExecutionType {\n        return this.getStorageProperty<ExecutionType>(\"executionType\") || this.defaultExecutionType;\n    }\n    set executionType(value: ExecutionType) {\n        this.setStorageProperty(\"executionType\", value);\n    }\n\n    get priority(): number {\n        return this.getStorageProperty<number>(\"priority\") || this.defaultPriority || 0;\n    }\n    set priority(value: number) {\n        this.setStorageProperty(\"priority\", value);\n    }\n    protected override addTempHistoryItem(): void {\n        let currentRoom = navigator.currentRoom;\n        if (!currentRoom || this.executionType !== \"automatic\") {\n            return super.addTempHistoryItem();\n        }\n        let lastEvent = getLastEvent();\n        switch (lastEvent?.type) {\n            case \"editroom\":\n                storage.setVariable(CURRENT_ROOM_MEMORY_KEY, lastEvent.prev);\n                super.addTempHistoryItem();\n                storage.setVariable(CURRENT_ROOM_MEMORY_KEY, currentRoom.id);\n                break;\n            case \"edittime\":\n                let currentTime = storage.getVariable<TimeDataType>(TIME_DATA_KEY) || {};\n                storage.setVariable(TIME_DATA_KEY, lastEvent.prev);\n                super.addTempHistoryItem();\n                storage.setVariable(TIME_DATA_KEY, currentTime);\n                break;\n        }\n    }\n}\n","import { CharacterInterface, storage } from \"@drincs/pixi-vn\";\nimport { CommitmentProps, RoomInterface } from \"../interface\";\nimport { timeTracker } from \"../managers\";\nimport CommitmentStoredClass from \"./CommitmentStoredClass\";\n\n/**\n * The base model of a commitment. I suggest you extend this class to create your own commitment model.\n * You must use the saveRoom function to save the commitment in the registered commitments.\n * @example\n * ```ts\n * export const mcRoom = new CommitmentBaseModel(\"test\", character, room, {\n *     name: \"Test\",\n *     image: \"https://image.jpg\",\n *     executionType: ExecutionTypeEnum.INTERACTION,\n *     onRun: (commitment) => {\n *         // Do something\n *     }\n * })\n * saveCommitment(mcRoom)\n * ```\n */\nexport default class CommitmentBaseModel extends CommitmentStoredClass {\n    /**\n     * @param id The id of the commitment, it must be unique.\n     * @param character The character or characters that are in the commitment and so in the room.\n     * @param room The room where the commitment is.\n     * @param props The properties of the commitment.\n     */\n    constructor(\n        id: string,\n        character: CharacterInterface | CharacterInterface[] | undefined,\n        room: RoomInterface,\n        props: CommitmentProps\n    ) {\n        super(id, character ? (Array.isArray(character) ? character : [character]) : [], room, props.onRun, {\n            executionType: props.executionType,\n            priority: props.priority,\n            timeSlot: props.timeSlot,\n            dateScheduling: props.dateScheduling,\n        });\n        this._name = props.name || \"\";\n        this._image = props.image;\n        this.defaultDisabled = props.disabled || false;\n        this.defaultHidden = props.hidden || false;\n        this._icon = props.icon;\n    }\n\n    private _name: string;\n    /**\n     * The name of the commitment.\n     */\n    get name(): string {\n        return this._name;\n    }\n\n    private _image?: string;\n    /**\n     * The image of the commitment.\n     */\n    get image(): string | undefined {\n        return this._image;\n    }\n\n    private _icon?: string;\n    /**\n     * The icon of the commitment.\n     */\n    get icon(): string | undefined {\n        return this._icon;\n    }\n\n    private defaultDisabled: boolean | string;\n    /**\n     * Whether is disabled. You can also pass a Pixi'VN flag name.\n     */\n    get disabled(): boolean {\n        let value = this.getStorageProperty<boolean>(\"disabled\") || this.defaultDisabled;\n        if (typeof value === \"string\") {\n            return storage.getFlag(value);\n        }\n        return value;\n    }\n    set disabled(value: boolean | string) {\n        this.setStorageProperty(\"disabled\", value);\n    }\n\n    private defaultHidden: boolean | string;\n    /**\n     * Whether is hidden. You can also pass a Pixi'VN flag name.\n     */\n    get hidden(): boolean {\n        if (this.dateScheduling?.from && this.dateScheduling.from > timeTracker.currentDate) {\n            return true;\n        }\n        if (!timeTracker.nowIsBetween(this.timeSlot?.from, this.timeSlot?.to)) {\n            return true;\n        }\n        if (!this.expired) {\n            return true;\n        }\n        let value = this.getStorageProperty<boolean>(\"hidden\") || this.defaultHidden;\n        if (typeof value === \"string\") {\n            return storage.getFlag(value);\n        }\n        return value;\n    }\n    set hidden(value: boolean | string) {\n        this.setStorageProperty(\"hidden\", value);\n    }\n}\n","import { StoredClassModel } from \"@drincs/pixi-vn\";\nimport { RegisteredActivities } from \"../../decorators\";\nimport { ActivityInterface } from \"../../interface\";\nimport DateSchedulingInterface from \"../../interface/DateSchedulingInterface\";\nimport NavigationAbstractInterface from \"../../interface/navigation/NavigationAbstractClass\";\nimport TimeSchedulingInterface from \"../../interface/TimeSchedulingInterface\";\nimport { timeTracker } from \"../../managers\";\n\ntype ActiveScheduling = {\n    timeSlot?: Partial<TimeSchedulingInterface>;\n    dateScheduling?: Partial<DateSchedulingInterface>;\n};\ntype ExcludedScheduling = {\n    dateScheduling?: Pick<DateSchedulingInterface, \"to\">;\n};\n\nexport default abstract class NavigationAbstractClass extends StoredClassModel implements NavigationAbstractInterface {\n    constructor(categoryId: string, id: string, private defaultActivities: ActivityInterface[] = []) {\n        super(categoryId, id);\n    }\n    private get defaultActivitiesIds(): string[] {\n        return this.defaultActivities.map((activity) => activity.id);\n    }\n    private get activeActivityScheduling(): { [activityId: string]: ActiveScheduling } {\n        return this.getStorageProperty<{ [activityId: string]: ActiveScheduling }>(`activeActivityScheduling`) || {};\n    }\n    private get excludedActivitiesScheduling(): { [activityId: string]: ExcludedScheduling } {\n        return (\n            this.getStorageProperty<{ [activityId: string]: ExcludedScheduling }>(`excludedActivitiesScheduling`) || {}\n        );\n    }\n    private removeActivityScheduling(activityId: string) {\n        let activeActivityScheduling = this.activeActivityScheduling;\n        delete activeActivityScheduling[activityId];\n        this.setStorageProperty(`activeActivityScheduling`, activeActivityScheduling);\n        let excludedActivitiesScheduling = this.excludedActivitiesScheduling;\n        delete excludedActivitiesScheduling[activityId];\n        this.setStorageProperty(`excludedActivitiesScheduling`, excludedActivitiesScheduling);\n    }\n    private editActivityScheduling(activityId: string, scheduling: ActiveScheduling) {\n        this.removeActivityScheduling(activityId);\n        let activeActivityScheduling = this.activeActivityScheduling;\n        activeActivityScheduling[activityId] = scheduling;\n        this.setStorageProperty(`activeActivityScheduling`, activeActivityScheduling);\n    }\n    private editExcludedActivityScheduling(activityId: string, scheduling: ExcludedScheduling) {\n        this.removeActivityScheduling(activityId);\n        let excludedActivitiesScheduling = this.excludedActivitiesScheduling;\n        excludedActivitiesScheduling[activityId] = scheduling;\n        this.setStorageProperty(`excludedActivitiesScheduling`, excludedActivitiesScheduling);\n    }\n    private get additionalActivitiesIds(): string[] {\n        return this.getStorageProperty<string[]>(`additionalActivitiesIds`) || [];\n    }\n    private get excludedActivitiesIds(): string[] {\n        return this.getStorageProperty<string[]>(`excludedActivitiesIds`) || [];\n    }\n    get activitiesIds(): string[] {\n        return this.additionalActivitiesIds.concat(this.defaultActivitiesIds);\n    }\n    addActivity(\n        activity: ActivityInterface,\n        options: {\n            timeSlot?: TimeSchedulingInterface;\n            dateScheduling?: DateSchedulingInterface;\n        } = {}\n    ) {\n        const { timeSlot, dateScheduling } = options;\n        const { to: toTime = timeTracker.dayEndTime + 1 } = timeSlot || {};\n        if (timeSlot) {\n            if (timeSlot.from >= toTime) {\n                throw new Error(`[NQTR] The from time must be less than the to time.`);\n            }\n        }\n        if (\n            dateScheduling?.from !== undefined &&\n            dateScheduling?.to !== undefined &&\n            dateScheduling?.from >= dateScheduling?.to\n        ) {\n            throw new Error(`[NQTR] The from day/date must be less than the to day/date.`);\n        }\n\n        if (this.defaultActivitiesIds.includes(activity.id)) {\n            console.warn(`[NQTR] Activity with id ${activity.id} already exists, so it will be ignored.`);\n            return;\n        }\n        let additionalActivitiesIds = this.additionalActivitiesIds;\n        if (additionalActivitiesIds.includes(activity.id)) {\n            console.warn(`[NQTR] Activity with id ${activity.id} already exists, so it will be ignored.`);\n        } else {\n            additionalActivitiesIds.push(activity.id);\n            this.setStorageProperty(`additionalActivitiesIds`, additionalActivitiesIds);\n        }\n\n        if (this.excludedActivitiesIds.includes(activity.id)) {\n            this.removeActivityScheduling(activity.id);\n            console.log(\n                `[NQTR] Activity with id ${activity.id} was excluded, so it will be associated with this class again.`\n            );\n        }\n\n        if (timeSlot || dateScheduling) {\n            this.editActivityScheduling(activity.id, {\n                timeSlot: timeSlot,\n                dateScheduling: dateScheduling,\n            });\n        }\n    }\n    removeActivity(activity: ActivityInterface | string, options: Pick<DateSchedulingInterface, \"to\"> = {}) {\n        const { to } = options;\n        const activityId = typeof activity === \"string\" ? activity : activity.id;\n\n        let additionalActivitiesIds = this.additionalActivitiesIds;\n        if (additionalActivitiesIds.includes(activityId)) {\n            if (to !== undefined) {\n                this.editExcludedActivityScheduling(activityId, {\n                    dateScheduling: { to },\n                });\n                return;\n            }\n            additionalActivitiesIds = additionalActivitiesIds.filter((id) => id !== activityId);\n            this.setStorageProperty(`additionalActivitiesIds`, additionalActivitiesIds);\n            this.removeActivityScheduling(activityId);\n        } else if (this.defaultActivitiesIds.includes(activityId)) {\n            if (to !== undefined) {\n                this.editExcludedActivityScheduling(activityId, {\n                    dateScheduling: { to },\n                });\n                return;\n            }\n            let excludedActivitiesIds = this.excludedActivitiesIds;\n            excludedActivitiesIds.push(activityId);\n            this.setStorageProperty(`excludedActivitiesIds`, excludedActivitiesIds);\n        } else {\n            console.warn(`[NQTR] Activity with id ${activityId} not found, so it will be ignored.`);\n        }\n    }\n    clearExpiredActivities() {\n        let activeActivityScheduling = this.activeActivityScheduling;\n        let excludedActivitiesScheduling = this.excludedActivitiesScheduling;\n        let additionalActivitiesIds = this.additionalActivitiesIds;\n        let excludedActivitiesIds = this.excludedActivitiesIds;\n\n        additionalActivitiesIds.forEach((activityId) => {\n            if (activityId in activeActivityScheduling) {\n                let { to: toDate } = activeActivityScheduling[activityId].dateScheduling || {};\n                if (toDate && toDate < timeTracker.currentDate) {\n                    this.removeActivityScheduling(activityId);\n                    additionalActivitiesIds = additionalActivitiesIds.filter((id) => id !== activityId);\n                }\n            }\n        });\n        excludedActivitiesIds.forEach((activityId) => {\n            if (activityId in excludedActivitiesScheduling) {\n                let { to: toDate } = excludedActivitiesScheduling[activityId].dateScheduling || {};\n                if (toDate && toDate < timeTracker.currentDate) {\n                    this.removeActivityScheduling(activityId);\n                    excludedActivitiesIds = excludedActivitiesIds.filter((id) => id !== activityId);\n                }\n            }\n        });\n    }\n\n    get activities(): ActivityInterface[] {\n        let res: ActivityInterface[] = [];\n        let activeActivityScheduling = this.activeActivityScheduling;\n        this.additionalActivitiesIds.concat(this.defaultActivitiesIds).forEach((activityId) => {\n            let activity = RegisteredActivities.get(activityId);\n            const { dateScheduling, timeSlot } = activeActivityScheduling[activityId] || {};\n            const { from: fromDate = activity?.dateScheduling?.from, to: toDate = activity?.dateScheduling?.to } =\n                dateScheduling || {};\n            const { from: fromTime = activity?.timeSlot?.from, to: toTime = activity?.timeSlot?.to } = timeSlot || {};\n            if (\n                activity &&\n                timeTracker.nowIsBetween(fromTime, toTime) &&\n                !(fromDate && fromDate > timeTracker.currentDate) &&\n                !(toDate && toDate < timeTracker.currentDate)\n            ) {\n                res.push(activity);\n            }\n        });\n        Object.entries(this.excludedActivitiesScheduling).forEach(([activityId, scheduling]) => {\n            let activity = RegisteredActivities.get(activityId);\n            if (\n                activity &&\n                activity.isActive &&\n                !(\n                    scheduling.dateScheduling &&\n                    scheduling.dateScheduling.to !== undefined &&\n                    scheduling.dateScheduling.to >= timeTracker.currentDate\n                )\n            ) {\n                res.push(activity);\n            }\n        });\n        this.defaultActivities.forEach((activity) => {\n            if (activity.isActive && !res.find((a) => a.id === activity.id)) {\n                res.push(activity);\n            }\n        });\n        return res;\n    }\n}\n","import { ActivityInterface, MapInterface, RoomInterface } from \"../../interface\";\nimport { LocationInternalInterface } from \"../../interface/navigation/LocationInterface\";\nimport { navigator } from \"../../managers\";\nimport NavigationAbstractClass from \"./NavigationAbstractClass\";\n\nconst LOCATION_CATEGORY = \"__nqtr-location__\";\nexport default class LocationStoredClass extends NavigationAbstractClass implements LocationInternalInterface {\n\tconstructor(\n\t\tid: string,\n\t\t/**\n\t\t * The map where the location is.\n\t\t */\n\t\tprivate readonly _map: MapInterface,\n\t\tactivities: ActivityInterface[] = []\n\t) {\n\t\tsuper(LOCATION_CATEGORY, id, activities);\n\t}\n\n\tget map(): MapInterface {\n\t\treturn this._map;\n\t}\n\n\tget rooms(): RoomInterface[] {\n\t\treturn navigator.rooms.filter((room) => room.location.id === this.id);\n\t}\n}\n","import { storage } from \"@drincs/pixi-vn\";\nimport { LocationBaseModelProps, MapInterface } from \"../../interface\";\nimport { LocationInternalInterface } from \"../../interface/navigation/LocationInterface\";\nimport LocationStoredClass from \"./LocationStoredClass\";\n\n/**\n * The base model of a location. I suggest you extend this class to create your own location model.\n * @example\n * ```typescript\n * export const mcHome = new LocationBaseModel('mc_home', mainMap, {\n *     name: 'MC Home',\n *     icon: \"https://icon.jpg\",\n * });\n * ```\n */\nexport default class LocationBaseModel extends LocationStoredClass implements LocationInternalInterface {\n    /**\n     * @param id The id of the location, it must be unique.\n     * @param map The map where the location is.\n     * @param props The properties of the location.\n     */\n    constructor(id: string, map: MapInterface, props: LocationBaseModelProps = {}) {\n        super(id, map, props.activities || []);\n        this.defaultName = props.name || \"\";\n        this.defaultDisabled = props.disabled || false;\n        this.defaultHidden = props.hidden || false;\n        this._icon = props.icon;\n    }\n\n    private defaultName: string;\n    /**\n     * The name of the location.\n     * If you set undefined, it will return the initial value of name.\n     */\n    get name(): string {\n        return this.getStorageProperty<string>(\"name\") || this.defaultName;\n    }\n    set name(value: string | undefined) {\n        this.setStorageProperty(\"name\", value);\n    }\n\n    private defaultDisabled: boolean | string;\n    /**\n     * Whether is disabled. If it is a string, it is a Pixi'VN flag name.\n     */\n    get disabled(): boolean {\n        let value = this.getStorageProperty<boolean>(\"disabled\") || this.defaultDisabled;\n        if (typeof value === \"string\") {\n            return storage.getFlag(value);\n        }\n        return value;\n    }\n    set disabled(value: boolean | string) {\n        this.setStorageProperty(\"disabled\", value);\n    }\n\n    private defaultHidden: boolean | string;\n    /**\n     * Whether is hidden. If it is a string, it is a Pixi'VN flag name.\n     */\n    get hidden(): boolean {\n        let value = this.getStorageProperty<boolean>(\"hidden\") || this.defaultHidden;\n        if (typeof value === \"string\") {\n            return storage.getFlag(value);\n        }\n        return value;\n    }\n    set hidden(value: boolean | string) {\n        this.setStorageProperty(\"hidden\", value);\n    }\n\n    private _icon?: string;\n    /**\n     * The icon of the location.\n     */\n    get icon(): string | undefined {\n        return this._icon;\n    }\n}\n","import { ActivityInterface, LocationInterface } from \"../../interface\";\nimport { MapBaseInternalInterface } from \"../../interface/navigation/MapInterface\";\nimport { navigator } from \"../../managers\";\nimport NavigationAbstractClass from \"./NavigationAbstractClass\";\n\nconst MAP_CATEGORY = \"__nqtr-map__\";\nexport default class MapStoredClass extends NavigationAbstractClass implements MapBaseInternalInterface {\n\tconstructor(id: string, activities: ActivityInterface[] = []) {\n\t\tsuper(MAP_CATEGORY, id, activities);\n\t}\n\n\tget locations(): LocationInterface[] {\n\t\treturn navigator.locations.filter((location) => location.map.id === this.id);\n\t}\n}\n","import { MapBaseModelProps } from \"../../interface\"\nimport { MapBaseInternalInterface } from \"../../interface/navigation/MapInterface\"\nimport MapStoredClass from \"./MapStoredClass\"\n\n/**\n * The base model of a map. I suggest you extend this class to create your own map model.\n * @example\n * ```typescript\n * export const mainMap = new MapBaseModel('main_map', {\n *     name: 'Main Map',\n *     image: \"https://image.jpg\",\n * });\n * ```\n */\nexport default class MapBaseModel extends MapStoredClass implements MapBaseInternalInterface {\n    /**\n     * @param id The id of the map, it must be unique.\n     * @param props The properties of the map. \n     */\n    constructor(id: string, props: MapBaseModelProps = {}) {\n        super(id, props.activities || [])\n        this.defaultName = props.name || \"\"\n        this._image = props.image\n    }\n\n    private defaultName: string\n    /**\n     * The name of the map.\n     * If you set undefined, it will return the initial value of name.\n     */\n    get name(): string {\n        return this.getStorageProperty<string>(\"name\") || this.defaultName\n    }\n    set name(value: string | undefined) {\n        this.setStorageProperty(\"name\", value)\n    }\n\n    private _image?: string\n    /**\n     * The image of the map.\n     */\n    get image(): string | undefined {\n        return this._image\n    }\n}\n","import { CharacterInterface } from \"@drincs/pixi-vn\";\nimport { ActivityInterface, CommitmentInterface, LocationInterface } from \"../../interface\";\nimport { RoomBaseInternalInterface } from \"../../interface/navigation/RoomInterface\";\nimport { routine } from \"../../managers\";\nimport { OnRunAsyncFunction } from \"../../types\";\nimport NavigationAbstractClass from \"./NavigationAbstractClass\";\n\nconst ROOM_CATEGORY = \"__nqtr-room__\";\nexport default class RoomStoredClass extends NavigationAbstractClass implements RoomBaseInternalInterface {\n    constructor(\n        id: string,\n        /**\n         * The location where the room is.\n         */\n        private readonly _location: LocationInterface,\n        activities: ActivityInterface[] = []\n    ) {\n        super(ROOM_CATEGORY, id, activities);\n    }\n    get routine(): CommitmentInterface[] {\n        return routine.currentRoutine.filter((c) => c.room.id === this.id);\n    }\n\n    get location(): LocationInterface {\n        return this._location;\n    }\n\n    get characters(): CharacterInterface[] {\n        let characters: CharacterInterface[] = [];\n        this.routine.forEach((commitment) => {\n            characters.push(...commitment.characters);\n        });\n        return characters;\n    }\n\n    get automaticFunctions(): OnRunAsyncFunction[] {\n        return this.routine\n            .filter((commitment) => commitment.executionType === \"automatic\" && commitment.run)\n            .map((commitment) => {\n                let res: OnRunAsyncFunction = async (props) => {\n                    await commitment.run(props);\n                };\n                return res;\n            });\n    }\n}\n","import { storage } from \"@drincs/pixi-vn\";\nimport { RegisteredRooms } from \"../../decorators\";\nimport { LocationInterface, RoomBaseModelProps } from \"../../interface\";\nimport RoomStoredClass from \"./RoomStoredClass\";\n\n/**\n * The base model of a room. I suggest you extend this class to create your own room model.\n * **You must use the {@link RegisteredRooms.add} function to save the room in the registered rooms.**\n * @example\n * ```ts\n * export const mcRoom = new RoomBaseModel('mc_room', mcHome, {\n *     name: \"MC Room\",\n *     icon: \"https://icon.jpg\",\n *     image: \"https://image.jpg\",\n * })\n * RegisteredRooms.add(mcRoom)\n * ```\n */\nexport default class RoomBaseModel extends RoomStoredClass {\n    /**\n     * @param id The id of the room, it must be unique.\n     * @param location The location where the room is.\n     * @param props The properties of the room.\n     */\n    constructor(id: string, location: LocationInterface, props: RoomBaseModelProps = {}) {\n        super(id, location, props.activities || []);\n        this.defaultName = props.name || \"\";\n        this._image = props.image;\n        this.defaultDisabled = props.disabled || false;\n        this.defaultHidden = props.hidden || false;\n        this._icon = props.icon;\n    }\n\n    private defaultName: string;\n    /**\n     * The name.\n     * If you set undefined, it will return the initial value of name.\n     */\n    get name(): string {\n        return this.getStorageProperty<string>(\"name\") || this.defaultName;\n    }\n    set name(value: string | undefined) {\n        this.setStorageProperty(\"name\", value);\n    }\n\n    private _image?: string;\n    /**\n     * The image of the room.\n     */\n    get image(): string | undefined {\n        return this._image;\n    }\n\n    private defaultDisabled: boolean | string;\n    /**\n     * Whether is disabled. If it is a string, it is a Pixi'VN flag name.\n     */\n    get disabled(): boolean {\n        let value = this.getStorageProperty<boolean>(\"disabled\") || this.defaultDisabled;\n        if (typeof value === \"string\") {\n            return storage.getFlag(value);\n        }\n        return value;\n    }\n    set disabled(value: boolean | string) {\n        this.setStorageProperty(\"disabled\", value);\n    }\n\n    private defaultHidden: boolean | string;\n    /**\n     * Whether is hidden. If it is a string, it is a Pixi'VN flag name.\n     */\n    get hidden(): boolean {\n        let value = this.getStorageProperty<boolean>(\"hidden\") || this.defaultHidden;\n        if (typeof value === \"string\") {\n            return storage.getFlag(value);\n        }\n        return value;\n    }\n    set hidden(value: boolean | string) {\n        this.setStorageProperty(\"hidden\", value);\n    }\n\n    private _icon?: string;\n    /**\n     * The function for rendering the icon of the room.\n     */\n    get icon(): string | undefined {\n        return this._icon;\n    }\n}\n","import { OnRunProps } from \"@drincs/nqtr\";\nimport { StoredClassModel } from \"@drincs/pixi-vn\";\nimport { QuestInterface, StageInterface } from \"../../interface\";\nimport { QuestBaseInternalInterface } from \"../../interface/quest/QuestInterface\";\nimport { OnRunEvent } from \"../../types\";\nimport { logger } from \"../../utils/log-utility\";\nimport StageStoredClass from \"./StageStoredClass\";\n\nexport interface QuestStoredClassProps {\n    /**\n     * The function that will be executed when the quest starts.\n     */\n    onStart?: OnRunEvent<QuestInterface>;\n    /**\n     * The function that will be executed when a stage end in the quest.\n     */\n    onNextStage?: OnRunEvent<QuestInterface>;\n}\n\nconst QUEST_CATEGORY = \"__nqtr-quest__\";\nexport default class QuestStoredClass extends StoredClassModel implements QuestBaseInternalInterface {\n    constructor(id: string, private readonly _stages: StageInterface[], props: QuestStoredClassProps = {}) {\n        super(QUEST_CATEGORY, id);\n        this._onStart = props.onStart;\n        this._onNextStage = props.onNextStage;\n    }\n\n    get stages(): StageInterface[] {\n        return this._stages;\n    }\n\n    get currentStageIndex(): number | undefined {\n        return this.getStorageProperty<number>(\"currentStageIndex\");\n    }\n    private set currentStageIndex(value: number | undefined) {\n        this.setStorageProperty(\"currentStageIndex\", value);\n    }\n\n    get currentStage(): StageInterface | undefined {\n        let index = this.currentStageIndex;\n        if (index === undefined || index >= this.stages.length) {\n            return undefined;\n        }\n        return this.stages[index];\n    }\n\n    get started(): boolean {\n        return this.currentStageIndex !== undefined;\n    }\n\n    get completed(): boolean {\n        if (this.currentStageIndex === undefined) {\n            return false;\n        }\n        return this.currentStageIndex > this.stages.length - 1;\n    }\n\n    get inProgress() {\n        if (this.completed) {\n            return false;\n        }\n        if (this.failed) {\n            return false;\n        }\n        return this.started;\n    }\n\n    get failed(): boolean {\n        return this.getStorageProperty<boolean>(\"failed\") || false;\n    }\n    set failed(value: boolean) {\n        this.setStorageProperty(\"failed\", value);\n    }\n\n    private _onStart?: OnRunEvent<QuestInterface>;\n    get onStart(): undefined | OnRunEvent<QuestInterface> {\n        return this._onStart;\n    }\n\n    private _onNextStage?: OnRunEvent<QuestInterface>;\n    get onNextStage(): undefined | OnRunEvent<QuestInterface> {\n        return this._onNextStage;\n    }\n\n    async start(props: OnRunProps): Promise<void> {\n        if (this.started) {\n            console.warn(`[NQTR] Quest ${this.id} is already started`);\n            return;\n        }\n        if (this.stages.length === 0) {\n            logger.error(`Quest ${this.id} has no stages`);\n            return;\n        }\n        this.currentStageIndex = 0;\n        let currentStage = this.currentStage;\n        if (currentStage && currentStage.start) {\n            this.onStart && (await this.onStart(this as any as QuestInterface, props));\n            return await currentStage.start(props);\n        } else {\n            logger.error(`Quest ${this.id} has no start stage`);\n        }\n    }\n\n    async tryToGoNextStage(props: OnRunProps): Promise<boolean> {\n        if (!this.inProgress) {\n            return false;\n        }\n        let currentStage = this.currentStage;\n        if (!currentStage) {\n            logger.error(`Quest ${this.id} has no current stage`);\n            return false;\n        }\n        if (currentStage.completed) {\n            return await this.goNextStage(props);\n        }\n        return false;\n    }\n\n    async completeCurrentStageAndGoNext(props: OnRunProps): Promise<boolean> {\n        let currentStage = this.currentStage;\n        if (!currentStage) {\n            logger.error(`Quest ${this.id} has no current stage`);\n            return false;\n        }\n        currentStage.completed = true;\n        return await this.goNextStage(props);\n    }\n\n    async goNextStage(props: OnRunProps): Promise<boolean> {\n        if (!this.inProgress) {\n            console.warn(`[NQTR] Quest ${this.id} is not in progress`);\n            return false;\n        }\n        let prevStage = this.currentStage;\n        let currentStageIndex = this.currentStageIndex;\n        if (!prevStage || currentStageIndex === undefined) {\n            logger.error(`Quest ${this.id} has no current stage`);\n            return false;\n        }\n        this.currentStageIndex = currentStageIndex + 1;\n        this.onNextStage && (await this.onNextStage(this as any as QuestInterface, props));\n        if (prevStage && prevStage.onEnd) {\n            await prevStage.onEnd(prevStage, props);\n        }\n        let nextCurrentStage = this.currentStage;\n        if (nextCurrentStage) {\n            (nextCurrentStage as any as StageStoredClass).inizialize();\n            if (this.currentStageMustStart) {\n                await this.startCurrentStage(props);\n            }\n        }\n\n        return true;\n    }\n\n    get currentStageMustStart(): boolean {\n        let currentStage = this.currentStage;\n        if (!currentStage) {\n            return false;\n        }\n        return !currentStage.started && currentStage.canStart && !currentStage.completed;\n    }\n\n    async startCurrentStage(props: OnRunProps): Promise<void> {\n        let newCurrentStage = this.currentStage;\n        if (newCurrentStage && this.currentStageMustStart) {\n            await newCurrentStage.start(props);\n        } else {\n            console.warn(`[NQTR] Quest ${this.id} can't start the current stage`);\n        }\n    }\n}\n","import { QuestProps, StageInterface } from \"../../interface\";\r\nimport QuestStoredClass from \"./QuestStoredClass\";\r\n\r\nexport default class QuestBaseModel extends QuestStoredClass {\r\n\tconstructor(id: string, stages: StageInterface[], props: QuestProps) {\r\n\t\tsuper(id, stages, { onStart: props.onStart, onNextStage: props.onNextStage });\r\n\t\tthis._name = props.name || \"\";\r\n\t\tthis._description = props.description || \"\";\r\n\t\tthis._icon = props.icon;\r\n\t\tthis._image = props.image;\r\n\t\tthis._inDevelopment = props.inDevelopment || false;\r\n\t}\r\n\r\n\tprivate _name: string;\r\n\t/**\r\n\t * The name of the quest.\r\n\t */\r\n\tget name(): string {\r\n\t\treturn this._name;\r\n\t}\r\n\r\n\tprivate _description: string;\r\n\t/**\r\n\t * The description of the quest.\r\n\t */\r\n\tget description(): string {\r\n\t\treturn this._description;\r\n\t}\r\n\r\n\tprivate _icon?: string;\r\n\t/**\r\n\t * Icon of the quest.\r\n\t */\r\n\tget icon(): string | undefined {\r\n\t\treturn this._icon;\r\n\t}\r\n\r\n\tprivate _image?: string;\r\n\t/**\r\n\t * Image of the quest.\r\n\t */\r\n\tget image(): string | undefined {\r\n\t\treturn this._image;\r\n\t}\r\n\r\n\tprivate _inDevelopment: boolean;\r\n\t/**\r\n\t * If the quest is in development.\r\n\t */\r\n\tget inDevelopment(): boolean {\r\n\t\treturn this._inDevelopment;\r\n\t}\r\n}\r\n","import { OnRunProps } from \"@drincs/nqtr\";\nimport { StoredClassModel } from \"@drincs/pixi-vn\";\nimport { StageInterface } from \"../../interface\";\nimport { StageBaseInternalInterface } from \"../../interface/quest/StageInterface\";\nimport { timeTracker } from \"../../managers\";\nimport { OnRunEvent, QuestsRequiredType } from \"../../types\";\n\nexport interface StageStoredClassProps {\n    /**\n     * The function that will be executed when the stage starts.\n     */\n    onStart?: OnRunEvent<StageInterface>;\n    /**\n     * The function that will be executed when the stage ends.\n     */\n    onEnd?: OnRunEvent<StageInterface>;\n    /**\n     * The number of day/date required to start the stage.\n     * @example If the value is 3, and the previous stage ends on day 1, the stage will start on day 4.\n     */\n    deltaDateRequired?: number;\n    /**\n     * The quests required to start the stage.\n     * @default []\n     */\n    questsRequired?: QuestsRequiredType[];\n}\n\nconst STAGE_CATEGORY = \"__nqtr-stage__\";\nexport default class StageStoredClass extends StoredClassModel implements StageBaseInternalInterface {\n    constructor(id: string, props: StageStoredClassProps = {}) {\n        super(STAGE_CATEGORY, id);\n        this._onStart = props.onStart;\n        this._onEnd = props.onEnd;\n        this._deltaDateRequired = props.deltaDateRequired;\n        this._questsRequired = props.questsRequired || [];\n    }\n\n    private _onStart?: OnRunEvent<StageInterface>;\n    get onStart(): undefined | OnRunEvent<StageInterface> {\n        return this._onStart;\n    }\n\n    private _onEnd?: OnRunEvent<StageInterface>;\n    get onEnd(): undefined | OnRunEvent<StageInterface> {\n        return this._onEnd;\n    }\n\n    get completed(): boolean {\n        return this.getStorageProperty<boolean>(\"completed\") || false;\n    }\n    set completed(value: boolean) {\n        this.setStorageProperty(\"completed\", value);\n    }\n\n    get started(): boolean {\n        return this.getStorageProperty<boolean>(\"started\") || false;\n    }\n    set started(value: boolean) {\n        this.setStorageProperty(\"started\", value);\n    }\n\n    private get inizializeDate(): number | undefined {\n        return this.getStorageProperty<number>(\"inizializeDate\");\n    }\n    private set inizializeDate(value: number | undefined) {\n        this.setStorageProperty(\"inizializeDate\", value);\n    }\n\n    get startDate(): number | undefined {\n        let inizializeDate = this.inizializeDate;\n        if (inizializeDate === undefined) {\n            return undefined;\n        }\n        return inizializeDate + this.deltaDateRequired;\n    }\n\n    get canStart(): boolean {\n        let deltaDateRequired = this.deltaDateRequired;\n        if (deltaDateRequired > 0) {\n            let inizializeDate = this.inizializeDate;\n            if (inizializeDate === undefined) {\n                return false;\n            }\n            if (inizializeDate + deltaDateRequired > timeTracker.currentDate) {\n                return false;\n            }\n        }\n        if (\n            this.questsRequired.length > 0 &&\n            !this.questsRequired.every((q) => q.quest.currentStageIndex && q.quest.currentStageIndex >= q.stageNumber)\n        ) {\n            return false;\n        }\n        return true;\n    }\n\n    inizialize() {\n        if (this.deltaDateRequired > 0) {\n            this.inizializeDate = timeTracker.currentDate;\n            console.log(`[NQTR] Stage ${this.id} will start on date ${this.startDate}`);\n        }\n    }\n\n    async start(props: OnRunProps) {\n        if (this.canStart) {\n            this.started = true;\n            if (this.onStart) {\n                await this.onStart(this as any as StageInterface, props);\n            }\n        } else {\n            console.warn(`[NQTR] Stage ${this.id} can't start`);\n        }\n    }\n\n    private _deltaDateRequired?: number;\n    get deltaDateRequired(): number {\n        return this._deltaDateRequired || 0;\n    }\n\n    private _questsRequired: QuestsRequiredType[];\n    get questsRequired(): QuestsRequiredType[] {\n        return this._questsRequired || [];\n    }\n}\n","import { storage } from \"@drincs/pixi-vn\";\nimport { StageProps } from \"../../interface\";\nimport StageFlags from \"../../interface/quest/StageFlags\";\nimport StageStoredClass from \"./StageStoredClass\";\n\nexport default class StageBaseModel extends StageStoredClass {\n    constructor(id: string, props: StageProps) {\n        super(id, {\n            onStart: props.onStart,\n            onEnd: props.onEnd,\n            deltaDateRequired: props.deltaDateRequired,\n            questsRequired: props.questsRequired,\n        });\n        this._name = props.name || \"\";\n        this._flags = props.flags || [];\n        this._description = props.description || \"\";\n        this._adviceDescription = props.adviceDescription || \"\";\n        this._image = props.image;\n        this._flagsRequired = props.flagsRequired || [];\n        this._requestDescriptionToStart = props.requestDescriptionToStart || \"\";\n    }\n\n    private _name: string;\n    /**\n     * The name of the stage.\n     */\n    get name(): string {\n        return this._name;\n    }\n\n    private _description: string;\n    /**\n     * The description of the stage.\n     */\n    get description(): string {\n        return this._description;\n    }\n\n    private _adviceDescription: string;\n    /**\n     * The advice description of the stage.\n     */\n    get adviceDescription(): string {\n        return this._adviceDescription;\n    }\n\n    private _image?: string;\n    /**\n     * The image of the stage.\n     */\n    get image(): string | undefined {\n        return this._image;\n    }\n\n    private _flags: StageFlags[];\n    /**\n     * The list of flags that the player must complete to finish the stage.\n     */\n    get flags(): StageFlags[] {\n        return this._flags;\n    }\n\n    private _flagsRequired: StageFlags[];\n    /**\n     * The list of flags required to start the stage.\n     */\n    get flagsRequired(): StageFlags[] {\n        return this._flagsRequired;\n    }\n\n    private _requestDescriptionToStart: string;\n    /**\n     * The description of the request to start the stage.\n     */\n    get requestDescriptionToStart(): string {\n        return this._requestDescriptionToStart;\n    }\n\n    override get completed(): boolean {\n        if (super.completed) {\n            return true;\n        }\n        if (this.flags.length > 0) {\n            if (!this.flags.every((flag) => storage.getFlag(flag.flag))) {\n                return false;\n            }\n            return true;\n        }\n        return false;\n    }\n    override set completed(value: boolean) {\n        super.completed = value;\n    }\n    override get canStart(): boolean {\n        if (this.flagsRequired.length > 0 && !this.flagsRequired.every((flag) => storage.getFlag(flag.flag))) {\n            return false;\n        }\n        return super.canStart;\n    }\n}\n","export type { default as ActivityInterface } from \"./ActivityInterface\";\nexport type { default as ActivityProps } from \"./ActivityProps\";\nexport type { default as CommitmentInterface } from \"./CommitmentInterface\";\nexport type { default as CommitmentProps } from \"./CommitmentProps\";\nexport type { default as DateSchedulingInterface } from \"./DateSchedulingInterface\";\nexport type { default as LocationBaseModelProps } from \"./navigation/LocationBaseModelProps\";\nexport type { default as LocationInterface } from \"./navigation/LocationInterface\";\nexport type { default as MapBaseModelProps } from \"./navigation/MapBaseModelProps\";\nexport type { default as MapInterface } from \"./navigation/MapInterface\";\nexport type { default as RoomBaseModelProps } from \"./navigation/RoomBaseModelProps\";\nexport type { default as RoomInterface } from \"./navigation/RoomInterface\";\nexport type { default as QuestInterface } from \"./quest/QuestInterface\";\nexport type { default as QuestProps } from \"./quest/QuestProps\";\nexport type { default as StageInterface } from \"./quest/StageInterface\";\nexport type { default as StageProps } from \"./quest/StageProps\";\nexport type { default as TimeSchedulingInterface } from \"./TimeSchedulingInterface\";\n","export type { default as ExecutionType } from \"./ExecutionType\";\nexport type { OnRunAsyncFunction, OnRunEvent, OnRunFunction, OnRunProps } from \"./OnRunEvent\";\nexport type { QuestsRequiredType } from \"./QuestsRequired\";\nexport type { TimeSlotInterface as ITimeStlot, TimeSettings } from \"./TimeSettings\";\n","export * from \"./classes\";\nexport * from \"./decorators\";\nexport * from \"./interface\";\nexport * from \"./managers\";\nexport * from \"./types\";\n\nimport * as classes from \"./classes\";\nimport * as decorators from \"./decorators\";\nimport * as interfaceNqtr from \"./interface\";\nimport * as managers from \"./managers\";\nimport * as types from \"./types\";\n\nconst nqtr = {\n    ...classes,\n    ...decorators,\n    ...interfaceNqtr,\n    ...managers,\n    ...types,\n};\nexport default nqtr;\n"]}