@drincs/nqtr 0.4.3 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/{RoomInterface-woJFHSNQ.d.mts → RoomInterface--jctVS2T.d.mts} +42 -36
  2. package/dist/{RoomInterface-DIn8IN8x.d.ts → RoomInterface-BfsHYFLJ.d.ts} +42 -36
  3. package/dist/{StageInterface-LDgQToad.d.mts → StageInterface-C1Zfcpk3.d.mts} +6 -6
  4. package/dist/{StageInterface-LDgQToad.d.ts → StageInterface-C1Zfcpk3.d.ts} +6 -6
  5. package/dist/classes/index.cjs +1 -1
  6. package/dist/classes/index.cjs.map +1 -1
  7. package/dist/classes/index.d.mts +30 -58
  8. package/dist/classes/index.d.ts +30 -58
  9. package/dist/classes/index.mjs +1 -1
  10. package/dist/classes/index.mjs.map +1 -1
  11. package/dist/decorators/index.d.mts +2 -2
  12. package/dist/decorators/index.d.ts +2 -2
  13. package/dist/{index-C-b3uDPT.d.ts → index-B-NIWPf6.d.ts} +43 -29
  14. package/dist/{index-CpnCu7Ma.d.ts → index-C5ZHpLb6.d.mts} +15 -47
  15. package/dist/{index-CwdOXkAk.d.mts → index-CRjIjzWa.d.mts} +43 -29
  16. package/dist/{index-DaJKvJc8.d.mts → index-k8thY0Hu.d.ts} +15 -47
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.mts +5 -5
  20. package/dist/index.d.ts +5 -5
  21. package/dist/index.mjs +1 -1
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/interface/index.d.mts +3 -3
  24. package/dist/interface/index.d.ts +3 -3
  25. package/dist/managers/index.cjs +1 -1
  26. package/dist/managers/index.cjs.map +1 -1
  27. package/dist/managers/index.d.mts +3 -3
  28. package/dist/managers/index.d.ts +3 -3
  29. package/dist/managers/index.mjs +1 -1
  30. package/dist/managers/index.mjs.map +1 -1
  31. package/dist/types/index.d.mts +21 -17
  32. package/dist/types/index.d.ts +21 -17
  33. package/package.json +1 -1
@@ -1,25 +1,19 @@
1
- import { A as ActivityInterface, a as ActivityBaseInternalInterface, C as CommitmentInterface, b as CommitmentBaseInternalInterface, R as RoomInterface, N as NavigationAbstractInterface, c as LocationInternalInterface, M as MapInterface, d as MapBaseInternalInterface, L as LocationInterface, e as RoomBaseInternalInterface } from '../RoomInterface-woJFHSNQ.mjs';
2
- import { A as ActivityProps, C as CommitmentProps, L as LocationBaseModelProps, M as MapBaseModelProps, R as RoomBaseModelProps, Q as QuestProps, S as StageProps, a as StageFlags } from '../index-DaJKvJc8.mjs';
3
- import { a as OnRunEvent, O as OnRunAsyncFunction, E as ExecutionType, e as QuestBaseInternalInterface, S as StageInterface, Q as QuestInterface, f as StageBaseInternalInterface, d as QuestsRequiredType } from '../StageInterface-LDgQToad.mjs';
1
+ import { A as ActivityInterface, a as ActivityBaseInternalInterface, T as TimeSchedulingInterface, D as DateSchedulingInterface, C as CommitmentInterface, b as CommitmentBaseInternalInterface, R as RoomInterface, N as NavigationAbstractInterface, c as LocationInternalInterface, M as MapInterface, d as MapBaseInternalInterface, L as LocationInterface, e as RoomBaseInternalInterface } from '../RoomInterface--jctVS2T.mjs';
2
+ import { A as ActivityProps, C as CommitmentProps, L as LocationBaseModelProps, M as MapBaseModelProps, R as RoomBaseModelProps, Q as QuestProps, S as StageProps, a as StageFlags } from '../index-C5ZHpLb6.mjs';
3
+ import { a as OnRunEvent, O as OnRunAsyncFunction, E as ExecutionType, e as QuestBaseInternalInterface, S as StageInterface, Q as QuestInterface, f as StageBaseInternalInterface, d as QuestsRequiredType } from '../StageInterface-C1Zfcpk3.mjs';
4
4
  import { StoredClassModel, CharacterInterface } from '@drincs/pixi-vn';
5
5
  import { OnRunProps } from '@drincs/nqtr';
6
6
 
7
7
  declare class ActivityStoredClass<OnRunEventType = ActivityInterface> extends StoredClassModel implements ActivityBaseInternalInterface {
8
8
  private readonly _onRun;
9
9
  constructor(id: string, _onRun: OnRunEvent<OnRunEventType>, props: {
10
- fromHour?: number;
11
- toHour?: number;
12
- fromDay?: number;
13
- toDay?: number;
10
+ timeSlot?: TimeSchedulingInterface;
11
+ dateScheduling?: DateSchedulingInterface;
14
12
  }, category?: string);
15
- private _fromHour?;
16
- get fromHour(): number | undefined;
17
- private _toHour?;
18
- get toHour(): number | undefined;
19
- private _fromDay?;
20
- get fromDay(): number | undefined;
21
- private _toDay?;
22
- get toDay(): number | undefined;
13
+ private _timeSlot?;
14
+ get timeSlot(): TimeSchedulingInterface | undefined;
15
+ private _dateScheduling?;
16
+ get dateScheduling(): DateSchedulingInterface | undefined;
23
17
  get run(): OnRunAsyncFunction;
24
18
  get expired(): boolean;
25
19
  get isActive(): boolean;
@@ -41,8 +35,10 @@ declare class ActivityStoredClass<OnRunEventType = ActivityInterface> extends St
41
35
  * },
42
36
  * {
43
37
  * name: "Nap",
44
- * fromHour: 5,
45
- * toHour: 23,
38
+ * timeSlot: {
39
+ * from: 5,
40
+ * to: 23,
41
+ * },
46
42
  * icon: "https://icon.jpg",
47
43
  * }
48
44
  * )
@@ -86,10 +82,8 @@ declare class CommitmentStoredClass extends ActivityStoredClass<CommitmentInterf
86
82
  constructor(id: string, _characters: CharacterInterface[], _room: RoomInterface, onRun: OnRunEvent<CommitmentInterface> | undefined, props: {
87
83
  executionType?: ExecutionType;
88
84
  priority?: number;
89
- fromHour?: number;
90
- toHour?: number;
91
- fromDay?: number;
92
- toDay?: number;
85
+ timeSlot?: TimeSchedulingInterface;
86
+ dateScheduling?: DateSchedulingInterface;
93
87
  });
94
88
  private readonly defaultExecutionType;
95
89
  private readonly defaultPriority?;
@@ -166,32 +160,10 @@ declare abstract class NavigationAbstractClass extends StoredClassModel implemen
166
160
  private get additionalActivitiesIds();
167
161
  private get excludedActivitiesIds();
168
162
  addActivity(activity: ActivityInterface, options?: {
169
- /**
170
- * the activity will be associated with this class only for the specified hours.
171
- * If you set from 3 and to 5, the activity will be associated with this class only for hours 3, 4 and 5. soSo at 2 or 6 it will not be associated with this class.
172
- */
173
- hours?: {
174
- from: number;
175
- to: number;
176
- };
177
- /**
178
- * the activity will be associated with this class from the specified day.
179
- * If you set 3, the activity will be associated with this class from day 3. So at day 2 it will not be associated with this class.
180
- */
181
- fromDay?: number;
182
- /**
183
- * the activity will be associated with this class to the specified day.
184
- * If you set 3, the activity will be associated with this class until day 3. So at day 4 it will not be associated with this class.
185
- */
186
- toDay?: number;
187
- }): void;
188
- removeActivity(activity: ActivityInterface | string, options?: {
189
- /**
190
- * The activity will be excluded from this class only for the specified days.
191
- * If to 3, the activity will be excluded from this class only for days 1, 2 and 3. So at day 4 it will be associated with this class.
192
- */
193
- toDay?: number;
163
+ timeSlot?: TimeSchedulingInterface;
164
+ dateScheduling?: DateSchedulingInterface;
194
165
  }): void;
166
+ removeActivity(activity: ActivityInterface | string, options?: Pick<DateSchedulingInterface, "to">): void;
195
167
  clearExpiredActivities(): void;
196
168
  get activities(): ActivityInterface[];
197
169
  }
@@ -433,15 +405,15 @@ declare class StageStoredClass extends StoredClassModel implements StageBaseInte
433
405
  */
434
406
  onEnd?: OnRunEvent<StageInterface>;
435
407
  /**
436
- * The day required to start the stage.
408
+ * The number of day/date required to start the stage.
437
409
  * @example If the value is 3, and the previous stage ends on day 1, the stage will start on day 4.
438
410
  */
439
- daysRequiredToStart?: number;
411
+ deltaDateRequired?: number;
440
412
  /**
441
413
  * The quests required to start the stage.
442
414
  * @default []
443
415
  */
444
- questsRequiredToStart?: QuestsRequiredType[];
416
+ questsRequired?: QuestsRequiredType[];
445
417
  });
446
418
  private _onStart?;
447
419
  get onStart(): undefined | OnRunEvent<StageInterface>;
@@ -451,16 +423,16 @@ declare class StageStoredClass extends StoredClassModel implements StageBaseInte
451
423
  set completed(value: boolean);
452
424
  get started(): boolean;
453
425
  set started(value: boolean);
454
- private get prevStageEndDay();
455
- private set prevStageEndDay(value);
456
- get startDay(): number | undefined;
426
+ private get inizializeDate();
427
+ private set inizializeDate(value);
428
+ get startDate(): number | undefined;
457
429
  get canStart(): boolean;
458
430
  inizialize(): void;
459
431
  start(props: OnRunProps): Promise<void>;
460
- private _daysRequiredToStart?;
461
- get daysRequiredToStart(): number;
462
- private _questsRequiredToStart;
463
- get questsRequiredToStart(): QuestsRequiredType[];
432
+ private _deltaDateRequired?;
433
+ get deltaDateRequired(): number;
434
+ private _questsRequired;
435
+ get questsRequired(): QuestsRequiredType[];
464
436
  }
465
437
 
466
438
  declare class StageBaseModel extends StageStoredClass {
@@ -490,11 +462,11 @@ declare class StageBaseModel extends StageStoredClass {
490
462
  * The list of flags that the player must complete to finish the stage.
491
463
  */
492
464
  get flags(): StageFlags[];
493
- private _flagsRequiredToStart;
465
+ private _flagsRequired;
494
466
  /**
495
467
  * The list of flags required to start the stage.
496
468
  */
497
- get flagsRequiredToStart(): StageFlags[];
469
+ get flagsRequired(): StageFlags[];
498
470
  private _requestDescriptionToStart;
499
471
  /**
500
472
  * The description of the request to start the stage.
@@ -1,25 +1,19 @@
1
- import { A as ActivityInterface, a as ActivityBaseInternalInterface, C as CommitmentInterface, b as CommitmentBaseInternalInterface, R as RoomInterface, N as NavigationAbstractInterface, c as LocationInternalInterface, M as MapInterface, d as MapBaseInternalInterface, L as LocationInterface, e as RoomBaseInternalInterface } from '../RoomInterface-DIn8IN8x.js';
2
- import { A as ActivityProps, C as CommitmentProps, L as LocationBaseModelProps, M as MapBaseModelProps, R as RoomBaseModelProps, Q as QuestProps, S as StageProps, a as StageFlags } from '../index-CpnCu7Ma.js';
3
- import { a as OnRunEvent, O as OnRunAsyncFunction, E as ExecutionType, e as QuestBaseInternalInterface, S as StageInterface, Q as QuestInterface, f as StageBaseInternalInterface, d as QuestsRequiredType } from '../StageInterface-LDgQToad.js';
1
+ import { A as ActivityInterface, a as ActivityBaseInternalInterface, T as TimeSchedulingInterface, D as DateSchedulingInterface, C as CommitmentInterface, b as CommitmentBaseInternalInterface, R as RoomInterface, N as NavigationAbstractInterface, c as LocationInternalInterface, M as MapInterface, d as MapBaseInternalInterface, L as LocationInterface, e as RoomBaseInternalInterface } from '../RoomInterface-BfsHYFLJ.js';
2
+ import { A as ActivityProps, C as CommitmentProps, L as LocationBaseModelProps, M as MapBaseModelProps, R as RoomBaseModelProps, Q as QuestProps, S as StageProps, a as StageFlags } from '../index-k8thY0Hu.js';
3
+ import { a as OnRunEvent, O as OnRunAsyncFunction, E as ExecutionType, e as QuestBaseInternalInterface, S as StageInterface, Q as QuestInterface, f as StageBaseInternalInterface, d as QuestsRequiredType } from '../StageInterface-C1Zfcpk3.js';
4
4
  import { StoredClassModel, CharacterInterface } from '@drincs/pixi-vn';
5
5
  import { OnRunProps } from '@drincs/nqtr';
6
6
 
7
7
  declare class ActivityStoredClass<OnRunEventType = ActivityInterface> extends StoredClassModel implements ActivityBaseInternalInterface {
8
8
  private readonly _onRun;
9
9
  constructor(id: string, _onRun: OnRunEvent<OnRunEventType>, props: {
10
- fromHour?: number;
11
- toHour?: number;
12
- fromDay?: number;
13
- toDay?: number;
10
+ timeSlot?: TimeSchedulingInterface;
11
+ dateScheduling?: DateSchedulingInterface;
14
12
  }, category?: string);
15
- private _fromHour?;
16
- get fromHour(): number | undefined;
17
- private _toHour?;
18
- get toHour(): number | undefined;
19
- private _fromDay?;
20
- get fromDay(): number | undefined;
21
- private _toDay?;
22
- get toDay(): number | undefined;
13
+ private _timeSlot?;
14
+ get timeSlot(): TimeSchedulingInterface | undefined;
15
+ private _dateScheduling?;
16
+ get dateScheduling(): DateSchedulingInterface | undefined;
23
17
  get run(): OnRunAsyncFunction;
24
18
  get expired(): boolean;
25
19
  get isActive(): boolean;
@@ -41,8 +35,10 @@ declare class ActivityStoredClass<OnRunEventType = ActivityInterface> extends St
41
35
  * },
42
36
  * {
43
37
  * name: "Nap",
44
- * fromHour: 5,
45
- * toHour: 23,
38
+ * timeSlot: {
39
+ * from: 5,
40
+ * to: 23,
41
+ * },
46
42
  * icon: "https://icon.jpg",
47
43
  * }
48
44
  * )
@@ -86,10 +82,8 @@ declare class CommitmentStoredClass extends ActivityStoredClass<CommitmentInterf
86
82
  constructor(id: string, _characters: CharacterInterface[], _room: RoomInterface, onRun: OnRunEvent<CommitmentInterface> | undefined, props: {
87
83
  executionType?: ExecutionType;
88
84
  priority?: number;
89
- fromHour?: number;
90
- toHour?: number;
91
- fromDay?: number;
92
- toDay?: number;
85
+ timeSlot?: TimeSchedulingInterface;
86
+ dateScheduling?: DateSchedulingInterface;
93
87
  });
94
88
  private readonly defaultExecutionType;
95
89
  private readonly defaultPriority?;
@@ -166,32 +160,10 @@ declare abstract class NavigationAbstractClass extends StoredClassModel implemen
166
160
  private get additionalActivitiesIds();
167
161
  private get excludedActivitiesIds();
168
162
  addActivity(activity: ActivityInterface, options?: {
169
- /**
170
- * the activity will be associated with this class only for the specified hours.
171
- * If you set from 3 and to 5, the activity will be associated with this class only for hours 3, 4 and 5. soSo at 2 or 6 it will not be associated with this class.
172
- */
173
- hours?: {
174
- from: number;
175
- to: number;
176
- };
177
- /**
178
- * the activity will be associated with this class from the specified day.
179
- * If you set 3, the activity will be associated with this class from day 3. So at day 2 it will not be associated with this class.
180
- */
181
- fromDay?: number;
182
- /**
183
- * the activity will be associated with this class to the specified day.
184
- * If you set 3, the activity will be associated with this class until day 3. So at day 4 it will not be associated with this class.
185
- */
186
- toDay?: number;
187
- }): void;
188
- removeActivity(activity: ActivityInterface | string, options?: {
189
- /**
190
- * The activity will be excluded from this class only for the specified days.
191
- * If to 3, the activity will be excluded from this class only for days 1, 2 and 3. So at day 4 it will be associated with this class.
192
- */
193
- toDay?: number;
163
+ timeSlot?: TimeSchedulingInterface;
164
+ dateScheduling?: DateSchedulingInterface;
194
165
  }): void;
166
+ removeActivity(activity: ActivityInterface | string, options?: Pick<DateSchedulingInterface, "to">): void;
195
167
  clearExpiredActivities(): void;
196
168
  get activities(): ActivityInterface[];
197
169
  }
@@ -433,15 +405,15 @@ declare class StageStoredClass extends StoredClassModel implements StageBaseInte
433
405
  */
434
406
  onEnd?: OnRunEvent<StageInterface>;
435
407
  /**
436
- * The day required to start the stage.
408
+ * The number of day/date required to start the stage.
437
409
  * @example If the value is 3, and the previous stage ends on day 1, the stage will start on day 4.
438
410
  */
439
- daysRequiredToStart?: number;
411
+ deltaDateRequired?: number;
440
412
  /**
441
413
  * The quests required to start the stage.
442
414
  * @default []
443
415
  */
444
- questsRequiredToStart?: QuestsRequiredType[];
416
+ questsRequired?: QuestsRequiredType[];
445
417
  });
446
418
  private _onStart?;
447
419
  get onStart(): undefined | OnRunEvent<StageInterface>;
@@ -451,16 +423,16 @@ declare class StageStoredClass extends StoredClassModel implements StageBaseInte
451
423
  set completed(value: boolean);
452
424
  get started(): boolean;
453
425
  set started(value: boolean);
454
- private get prevStageEndDay();
455
- private set prevStageEndDay(value);
456
- get startDay(): number | undefined;
426
+ private get inizializeDate();
427
+ private set inizializeDate(value);
428
+ get startDate(): number | undefined;
457
429
  get canStart(): boolean;
458
430
  inizialize(): void;
459
431
  start(props: OnRunProps): Promise<void>;
460
- private _daysRequiredToStart?;
461
- get daysRequiredToStart(): number;
462
- private _questsRequiredToStart;
463
- get questsRequiredToStart(): QuestsRequiredType[];
432
+ private _deltaDateRequired?;
433
+ get deltaDateRequired(): number;
434
+ private _questsRequired;
435
+ get questsRequired(): QuestsRequiredType[];
464
436
  }
465
437
 
466
438
  declare class StageBaseModel extends StageStoredClass {
@@ -490,11 +462,11 @@ declare class StageBaseModel extends StageStoredClass {
490
462
  * The list of flags that the player must complete to finish the stage.
491
463
  */
492
464
  get flags(): StageFlags[];
493
- private _flagsRequiredToStart;
465
+ private _flagsRequired;
494
466
  /**
495
467
  * The list of flags required to start the stage.
496
468
  */
497
- get flagsRequiredToStart(): StageFlags[];
469
+ get flagsRequired(): StageFlags[];
498
470
  private _requestDescriptionToStart;
499
471
  /**
500
472
  * The description of the request to start the stage.
@@ -1,2 +1,2 @@
1
- import {CachedMap,StoredClassModel,storage,narration}from'@drincs/pixi-vn';var f="___nqtr-time_manager_data___",p="___nqtr-current_room_memory___",Z="___nqtr-last_event_memory___";var u;(a=>(a.log=(i,...n)=>console.log(`[NQTR] ${i}`,...n),a.warn=(i,...n)=>console.warn(`[NQTR] ${i}`,...n),a.error=(i,...n)=>console.error(`[NQTR] ${i}`,...n),a.info=(i,...n)=>console.info(`[NQTR] ${i}`,...n)))(u||={});var q=new CachedMap({cacheSize:20}),re;(a=>{function o(i){if(Array.isArray(i)){i.forEach(n=>a.add(n));return}q.set(i.id,i);}a.add=o;function e(i){try{let n=q.get(i);if(!n){console.warn(`[NQTR] Activity ${i} not found, you should register it first`);return}return n}catch(n){u.error(`Error while getting Activity ${i}`,n);return}}a.get=e;function t(){return Array.from(q.values())}a.values=t;function r(i){return q.has(i)}a.has=r;})(re||={});var L=re;var S=new CachedMap({cacheSize:20}),k=new CachedMap({cacheSize:20}),ne;(a=>{function o(i){if(Array.isArray(i)){i.forEach(n=>a.add(n));return}console.warn(`[NQTR] Registering commitment ${i.id}`,i),S.set(i.id,i);}a.add=o;function e(i){try{let n=S.get(i);if(!n){console.warn(`[NQTR] Commitment ${i} not found, you should register it first`);return}return n}catch(n){u.error(`Error while getting Commitment ${i}`,n);return}}a.get=e;function t(){return Array.from(S.values())}a.values=t;function r(i){return S.has(i)}a.has=r;})(ne||={});var v=ne;var E=new CachedMap({cacheSize:20}),ae;(a=>{function o(i){if(Array.isArray(i)){i.forEach(n=>o(n));return}E.has(i.id)&&console.warn(`[NQTR] Location id ${i.id} already exists, it will be overwritten`),E.set(i.id,i);}a.add=o;function e(i){try{let n=E.get(i);if(!n){console.warn(`[NQTR] Location ${i} not found, you should register it first`);return}return n}catch(n){u.error(`Error while getting Location ${i}`,n);return}}a.get=e;function t(){return Array.from(E.values())}a.values=t;function r(i){return E.has(i)}a.has=r;})(ae||={});var w=ae;var C=new CachedMap({cacheSize:20}),oe;(a=>{function o(i){if(Array.isArray(i)){i.forEach(n=>o(n));return}C.has(i.id)&&console.warn(`[NQTR] Map id ${i.id} already exists, it will be overwritten`),C.set(i.id,i);}a.add=o;function e(i){try{let n=C.get(i);if(!n){console.warn(`[NQTR] Map ${i} not found, you should register it first`);return}return n}catch(n){u.error(`Error while getting Map ${i}`,n);return}}a.get=e;function t(){return Array.from(C.values())}a.values=t;function r(i){return C.has(i)}a.has=r;})(oe||={});var P=oe;var $=new CachedMap({cacheSize:5}),se;(a=>{function o(i){if(Array.isArray(i)){i.forEach(n=>a.add(n));return}$.set(i.id,i);}a.add=o;function e(i){try{let n=$.get(i);if(!n){console.warn(`[NQTR] Quest ${i} not found, you should register it first`);return}return n}catch(n){u.error(`Error while getting Quest ${i}`,n);return}}a.get=e;function t(){return Array.from($.values())}a.values=t;function r(i){return $.has(i)}a.has=r;})(se||={});var Y=new CachedMap({cacheSize:20}),ue;(a=>{function o(i){if(Array.isArray(i)){i.forEach(d=>o(d));return}Y.set(i.id,i);let n=i.location;w.add(n);let s=n?.map;s&&P.add(s);}a.add=o;function e(i){try{let n=Y.get(i);if(!n){console.warn(`[NQTR] Room ${i} not found, you should register it first`);return}return n}catch(n){u.error(`Error while getting Room ${i}`,n);return}}a.get=e;function t(){return Array.from(Y.values())}a.values=t;function r(i){return Y.has(i)}a.has=r;})(ue||={});var I=ue;var N=class{get rooms(){return I.values()}get locations(){return w.values()}get maps(){return P.values()}get currentRoomId(){return storage.getVariable(p)}get currentRoom(){let e=this.currentRoomId;if(!e){u.error("The current room has not yet been set");return}let t=I.get(e);if(!t){u.error(`Current room ${e} not found`);return}return t}set currentRoom(e){if(typeof e!="string"&&(e=e.id),!I.get(e)){u.error(`The room ${e} is not registered, so it can't be set as current room`);return}let r=storage.getVariable(p);r!==e&&(Q({type:"editroom",prev:r,value:e}),storage.setVariable(p,e));}get currentLocation(){return this.currentRoom?.location}get currentMap(){return this.currentRoom?.location.map}clearExpiredActivities(){I.values().forEach(e=>{e.clearExpiredActivities();});}};var F="___nqtr-temporary_commitment___",H=class{get fixedRoutine(){return [...k.values()]}set fixedRoutine(e){e.forEach(t=>{k.has(t.id)&&console.warn(`[NQTR] Commitment id ${t.id} already exists, it will be overwritten`),k.set(t.id,t);});}get temporaryRoutine(){let e=storage.getVariable(F);return e?e.map(r=>v.get(r)).filter(r=>r!==void 0):[]}get allRoutine(){return [...this.fixedRoutine,...this.temporaryRoutine]}add(e){Array.isArray(e)||(e=[e]);let t=e.map(r=>{if(!v.get(r.id)){console.warn(`[NQTR] Commitment ${r.id} not found, it will be ignored`);return}return r.id}).filter(r=>r!==void 0);storage.setVariable(F,t);}find(e){return v.get(e)}remove(e){Array.isArray(e)||(e=[e]);let t=e.map(a=>a.id),r=storage.getVariable(F);r&&(r=r.filter(a=>!t.includes(a)),storage.setVariable(F,r));}clearExpiredRoutine(){v.values().forEach(e=>{e.expired&&S.delete(e.id);});}get currentRoutine(){let e={};return [...this.fixedRoutine,...this.temporaryRoutine].forEach(t=>{t.isActive&&(t.characters.length>0?t.characters.every(a=>!e[a.id]||t.priority>e[a.id].priority)&&t.characters.forEach(a=>{e[a.id]=t;}):u.error(`The commitment ${t.id} has no characters assigned`));}),Object.values(e)}get currentRoomRoutine(){return g.currentRoom?.routine||[]}getCommitmentByCharacter(e){this.currentRoutine.forEach(t=>{if(t.characters.map(r=>r.id).includes(e.id))return t});}};var c=class{static minDayHours=0;static maxDayHours=24;static defaultTimeSpent=1;static timeSlots=[];static weekLength=7;static weekendStartDay=this.weekLength-1;static weekDaysNames=[]};var O=class{initialize(e){let{minDayHours:t=0,maxDayHours:r=24,defaultTimeSpent:a=1,timeSlots:i=[],weekLength:n=7,weekendStartDay:s=n-1,weekDaysNames:d=[]}=e;c.minDayHours=t,c.maxDayHours=r,c.defaultTimeSpent=a,c.timeSlots=i,c.weekLength=n,s>=c.weekLength?console.warn(`[NQTR] Weekend start day should be less than week length ${n}, so will be ignored`):c.weekendStartDay=s,d.length!==n?console.warn(`[NQTR] Week days names should be equal to week length ${n}, so will be ignored`):c.weekDaysNames=d;}get minDayHours(){return c.minDayHours}get maxDayHours(){return c.maxDayHours}get defaultTimeSpent(){return c.defaultTimeSpent}get timeSlots(){return c.timeSlots}get weekLength(){return c.weekLength}get weekendStartDay(){return c.weekendStartDay}get weekDaysNames(){return c.weekDaysNames}get currentHour(){let e=storage.getVariable(f)||{};return e.hasOwnProperty("currentHour")&&typeof e.currentHour=="number"?e.currentHour:this.minDayHours}set currentHour(e){let t=storage.getVariable(f)||{},r={...t};typeof e=="number"?r.currentHour=e:delete r.currentHour,Q({type:"edittime",prev:t,value:r}),storage.setVariable(f,r);}get currentDay(){let e=storage.getVariable(f)||{};return e.hasOwnProperty("currentDay")&&typeof e.currentDay=="number"?e.currentDay:0}set currentDay(e){let t=storage.getVariable(f)||{},r={...t};typeof e=="number"?r.currentDay=e:delete r.currentDay,Q({type:"edittime",prev:t,value:r}),storage.setVariable(f,r);}get isWeekend(){return this.currentWeekDayNumber>=this.weekendStartDay}get currentWeekDayNumber(){return this.currentDay%this.weekLength+1}get currentDayName(){let e=this.currentWeekDayNumber-1;return e>=this.weekDaysNames.length?(console.warn(`[NQTR] Week day name is not defined for day ${e}`,this.weekDaysNames),""):this.weekDaysNames[e]}get currentTimeSlot(){if(this.timeSlots.length===0)return console.warn("[NQTR] Time slots are not defined"),0;for(let e=0;e<this.timeSlots.length;e++){let t=this.timeSlots[e];if(this.timeSlots.length>e+1&&this.nowIsBetween(t.startHour,this.timeSlots[e+1].startHour))return e}return this.timeSlots.length-1}increaseHour(e=this.defaultTimeSpent){let t=this.currentHour+e;return t>=this.maxDayHours&&(this.increaseDay(),t=this.minDayHours+(t-this.maxDayHours)),this.currentHour=t,this.currentHour}increaseDay(e=this.minDayHours,t=1){let r=this.currentDay+t;return this.currentDay=r,this.currentHour=e,this.currentDay}nowIsBetween(e,t){e===void 0&&(e=this.minDayHours-1),t===void 0&&(t=this.maxDayHours+1);let r=this.currentHour;return e<t?r>=e&&r<t:r>=e||r<t}};var m=new O,g=new N,z=new H;function Q(o){storage.setVariable(Z,o);}function be(){return storage.getVariable(Z)}function de(){let o=be(),e=g.currentRoom;if(!e||!e.automaticFunction){narration.addCurrentStepToHistory();return}switch(o?.type){case "editroom":storage.setVariable(p,o.prev),narration.addCurrentStepToHistory(),storage.setVariable(p,e.id);break;case "edittime":let t=storage.getVariable(f)||{};storage.setVariable(f,o.prev),narration.addCurrentStepToHistory(),storage.setVariable(f,t);break}}var _e="__nqtr-activity__",h=class extends StoredClassModel{constructor(t,r,a,i=_e){super(i,t);this._onRun=r;this._fromHour=a.fromHour,this._toHour=a.toHour,this._fromDay=a.fromDay,this._toDay=a.toDay;}_fromHour;get fromHour(){return this._fromHour}_toHour;get toHour(){return this._toHour}_fromDay;get fromDay(){return this._fromDay}_toDay;get toDay(){return this._toDay}get run(){return async t=>(de(),await this._onRun(this,t))}get expired(){return !!(this.toDay&&this.toDay<=m.currentDay)}get isActive(){return !(this.fromDay&&this.fromDay>m.currentDay||this.toDay&&this.toDay<m.currentDay||!m.nowIsBetween(this.fromHour,this.toHour))}};var G=class extends h{constructor(e,t,r){super(e,t,{fromHour:r.fromHour,toHour:r.toHour,fromDay:r.fromDay,toDay:r.toDay}),this.defaultName=r.name||"",this.defaultDisabled=r.disabled||false,this.defaultHidden=r.hidden||false,this._icon=r.renderIcon;}defaultName;get name(){return this.getStorageProperty("name")||this.defaultName}set name(e){this.setStorageProperty("name",e);}defaultDisabled;get disabled(){let e=this.getStorageProperty("disabled")||this.defaultDisabled;return typeof e=="string"?storage.getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}};var Re="__nqtr-commitment__",x=class extends h{constructor(t,r,a,i,n){i=i||(()=>{});super(t,i,n,Re);this._characters=r;this._room=a;this.defaultExecutionType=n.executionType||"interaction",this.defaultPriority=n.priority;}defaultExecutionType;defaultPriority;get characters(){return this._characters}get room(){return this._room}get executionType(){return this.getStorageProperty("executionType")||this.defaultExecutionType}set executionType(t){this.setStorageProperty("executionType",t);}get priority(){return this.getStorageProperty("priority")||this.defaultPriority||0}set priority(t){this.setStorageProperty("priority",t);}};var K=class extends x{constructor(e,t,r,a){super(e,t?Array.isArray(t)?t:[t]:[],r,a.onRun,{executionType:a.executionType,priority:a.priority,fromHour:a.fromHour,toHour:a.toHour,fromDay:a.fromDay,toDay:a.toDay}),this._name=a.name||"",this._image=a.image,this.defaultDisabled=a.disabled||false,this.defaultHidden=a.hidden||false,this._icon=a.icon;}_name;get name(){return this._name}_image;get image(){return this._image}_icon;get icon(){return this._icon}defaultDisabled;get disabled(){let e=this.getStorageProperty("disabled")||this.defaultDisabled;return typeof e=="string"?storage.getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){if(this.fromDay&&this.fromDay>m.currentDay||!m.nowIsBetween(this.fromHour,this.toHour)||!this.expired)return true;let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}};var l=class extends StoredClassModel{constructor(t,r,a=[]){super(t,r);this.defaultActivities=a;}get defaultActivitiesIds(){return this.defaultActivities.map(t=>t.id)}get activeActivityScheduling(){return this.getStorageProperty("activeActivityScheduling")||{}}get excludedActivitiesScheduling(){return this.getStorageProperty("excludedActivitiesScheduling")||{}}removeActivityScheduling(t){let r=this.activeActivityScheduling;delete r[t],this.setStorageProperty("activeActivityScheduling",r);let a=this.excludedActivitiesScheduling;delete a[t],this.setStorageProperty("excludedActivitiesScheduling",a);}editActivityScheduling(t,r){this.removeActivityScheduling(t);let a=this.activeActivityScheduling;a[t]=r,this.setStorageProperty("activeActivityScheduling",a);}editExcludedActivityScheduling(t,r){this.removeActivityScheduling(t);let a=this.excludedActivitiesScheduling;a[t]=r,this.setStorageProperty("excludedActivitiesScheduling",a);}get additionalActivitiesIds(){return this.getStorageProperty("additionalActivitiesIds")||[]}get excludedActivitiesIds(){return this.getStorageProperty("excludedActivitiesIds")||[]}addActivity(t,r={}){let{hours:a,fromDay:i,toDay:n}=r,s={};if(a){if(a.from>=a.to)throw new Error("[NQTR] The from hour must be less than the to hour.");s.fromHour=a.from;}if(i===0&&console.warn("[NQTR] The from day must be greater than 0, so it will be ignored."),n===0&&console.warn("[NQTR] The to day must be greater than 0, so it will be ignored."),i&&n&&i>=n)throw new Error("[NQTR] The from day must be less than the to day.");if(i&&(s.fromDay=i),n&&(s.toDay=n),this.defaultActivitiesIds.includes(t.id)){console.warn(`[NQTR] Activity with id ${t.id} already exists, so it will be ignored.`);return}let d=this.additionalActivitiesIds;if(d.includes(t.id)){if(Object.keys(s).length){this.editActivityScheduling(t.id,s);return}else if(this.excludedActivitiesIds.includes(t.id)){this.removeActivityScheduling(t.id),console.log(`[NQTR] Activity with id ${t.id} was excluded, so it will be associated with this class again.`);return}console.warn(`[NQTR] Activity with id ${t.id} already exists, so it will be ignored.`);return}d.push(t.id),this.setStorageProperty("additionalActivitiesIds",d),Object.keys(s).length&&this.editActivityScheduling(t.id,s);}removeActivity(t,r={}){let{toDay:a}=r,i=typeof t=="string"?t:t.id,n={};a===0&&console.warn("[NQTR] The to day must be greater than 0, so it will be ignored."),a&&(n.toDay=a);let s=this.additionalActivitiesIds;if(s.includes(i)){if(Object.keys(n).length){this.editExcludedActivityScheduling(i,n);return}s=s.filter(d=>d!==i),this.setStorageProperty("additionalActivitiesIds",s);}else if(this.defaultActivitiesIds.includes(i)){if(Object.keys(n).length){this.editExcludedActivityScheduling(i,n);return}let d=this.excludedActivitiesIds;d.push(i),this.setStorageProperty("excludedActivitiesIds",d);}else console.warn(`[NQTR] Activity with id ${i} not found, so it will be ignored.`);}clearExpiredActivities(){let t=this.activeActivityScheduling,r=this.excludedActivitiesScheduling,a=this.additionalActivitiesIds,i=this.excludedActivitiesIds;a.forEach(n=>{if(n in t){let{toDay:s}=t[n];s&&s<m.currentDay&&(this.removeActivityScheduling(n),a=a.filter(d=>d!==n));}}),i.forEach(n=>{if(n in r){let{toDay:s}=r[n];s&&s<m.currentDay&&(this.removeActivityScheduling(n),i=i.filter(d=>d!==n));}});}get activities(){let t=[],r=this.activeActivityScheduling;return this.additionalActivitiesIds.concat(this.defaultActivitiesIds).forEach(a=>{let i=L.get(a),{fromDay:n=i?.fromDay,fromHour:s=i?.fromHour,toDay:d=i?.toDay,toHour:he=i?.toHour}=r[a]||{};i&&m.nowIsBetween(s,he)&&!(n&&n>m.currentDay)&&!(d&&d<m.currentDay)&&t.push(i);}),Object.entries(this.excludedActivitiesScheduling).forEach(([a,i])=>{let n=L.get(a);n&&n.isActive&&!(i.toDay&&i.toDay>=m.currentDay)&&t.push(n);}),this.defaultActivities.forEach(a=>{a.isActive&&!t.find(i=>i.id===a.id)&&t.push(a);}),t}};var Ae="__nqtr-location__",_=class extends l{constructor(t,r,a=[]){super(Ae,t,a);this._map=r;}get map(){return this._map}get rooms(){return g.rooms.filter(t=>t.location.id===this.id)}};var W=class extends _{constructor(e,t,r={}){super(e,t,r.activities||[]),this.defaultName=r.name||"",this.defaultDisabled=r.disabled||false,this.defaultHidden=r.hidden||false,this._icon=r.icon;}defaultName;get name(){return this.getStorageProperty("name")||this.defaultName}set name(e){this.setStorageProperty("name",e);}defaultDisabled;get disabled(){let e=this.getStorageProperty("disabled")||this.defaultDisabled;return typeof e=="string"?storage.getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}};var De="__nqtr-map__",R=class extends l{constructor(e,t=[]){super(De,e,t);}get locations(){return g.locations.filter(e=>e.map.id===this.id)}};var j=class extends R{constructor(e,t={}){super(e,t.activities||[]),this.defaultName=t.name||"",this._image=t.image;}defaultName;get name(){return this.getStorageProperty("name")||this.defaultName}set name(e){this.setStorageProperty("name",e);}_image;get image(){return this._image}};var Ee="__nqtr-room__",T=class extends l{constructor(t,r,a=[]){super(Ee,t,a);this._location=r;}get routine(){return z.currentRoutine.filter(t=>t.room.id===this.id)}get location(){return this._location}get characters(){let t=[];return this.routine.forEach(r=>{t.push(...r.characters);}),t}get automaticFunction(){let t=this.routine.find(r=>r.executionType==="automatic")?.run;if(t)return async r=>{await t(r);}}};var U=class extends T{constructor(e,t,r={}){super(e,t,r.activities||[]),this.defaultName=r.name||"",this._image=r.image,this.defaultDisabled=r.disabled||false,this.defaultHidden=r.hidden||false,this._icon=r.icon;}defaultName;get name(){return this.getStorageProperty("name")||this.defaultName}set name(e){this.setStorageProperty("name",e);}_image;get image(){return this._image}defaultDisabled;get disabled(){let e=this.getStorageProperty("disabled")||this.defaultDisabled;return typeof e=="string"?storage.getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}get routine(){return z.currentRoutine.filter(e=>e.room.id===this.id)}};var Ce="__nqtr-quest__",A=class extends StoredClassModel{constructor(t,r,a={}){super(Ce,t);this._stages=r;this._onStart=a.onStart,this._onNextStage=a.onNextStage;}get stages(){return this._stages}get currentStageIndex(){return this.getStorageProperty("currentStageIndex")}set currentStageIndex(t){this.setStorageProperty("currentStageIndex",t);}get currentStage(){let t=this.currentStageIndex;if(!(t===void 0||t>=this.stages.length))return this.stages[t]}get started(){return this.currentStageIndex!==void 0}get completed(){return this.currentStageIndex===void 0?false:this.currentStageIndex>this.stages.length-1}get inProgress(){return this.completed||this.failed?false:this.started}get failed(){return this.getStorageProperty("failed")||false}set failed(t){this.setStorageProperty("failed",t);}_onStart;get onStart(){return this._onStart}_onNextStage;get onNextStage(){return this._onNextStage}async start(t){if(this.started){console.warn(`[NQTR] Quest ${this.id} is already started`);return}if(this.stages.length===0){u.error(`Quest ${this.id} has no stages`);return}this.currentStageIndex=0;let r=this.currentStage;if(r&&r.start)return this.onStart&&await this.onStart(this,t),await r.start(t);u.error(`Quest ${this.id} has no start stage`);}async tryToGoNextStage(t){if(!this.inProgress)return false;let r=this.currentStage;return r?r.completed?await this.goNextStage(t):false:(u.error(`Quest ${this.id} has no current stage`),false)}async completeCurrentStageAndGoNext(t){let r=this.currentStage;return r?(r.completed=true,await this.goNextStage(t)):(u.error(`Quest ${this.id} has no current stage`),false)}async goNextStage(t){if(!this.inProgress)return console.warn(`[NQTR] Quest ${this.id} is not in progress`),false;let r=this.currentStage,a=this.currentStageIndex;if(!r||a===void 0)return u.error(`Quest ${this.id} has no current stage`),false;this.currentStageIndex=a+1,this.onNextStage&&await this.onNextStage(this,t),r&&r.onEnd&&await r.onEnd(r,t);let i=this.currentStage;return i&&(i.inizialize(),this.currentStageMustStart&&await this.startCurrentStage(t)),true}get currentStageMustStart(){let t=this.currentStage;return t?!t.started&&t.canStart&&!t.completed:false}async startCurrentStage(t){let r=this.currentStage;r&&this.currentStageMustStart?await r.start(t):console.warn(`[NQTR] Quest ${this.id} can't start the current stage`);}};var J=class extends A{constructor(e,t,r){super(e,t,{onStart:r.onStart,onNextStage:r.onNextStage}),this._name=r.name||"",this._description=r.description||"",this._icon=r.icon,this._image=r.image,this._inDevelopment=r.inDevelopment||false;}_name;get name(){return this._name}_description;get description(){return this._description}_icon;get icon(){return this._icon}_image;get image(){return this._image}_inDevelopment;get inDevelopment(){return this._inDevelopment}};var Ne="__nqtr-stage__",D=class extends StoredClassModel{constructor(e,t={}){super(Ne,e),this._onStart=t.onStart,this._onEnd=t.onEnd,this._daysRequiredToStart=t.daysRequiredToStart,this._questsRequiredToStart=t.questsRequiredToStart||[];}_onStart;get onStart(){return this._onStart}_onEnd;get onEnd(){return this._onEnd}get completed(){return this.getStorageProperty("completed")||false}set completed(e){this.setStorageProperty("completed",e);}get started(){return this.getStorageProperty("started")||false}set started(e){this.setStorageProperty("started",e);}get prevStageEndDay(){return this.getStorageProperty("prevStageEndDay")}set prevStageEndDay(e){this.setStorageProperty("prevStageEndDay",e);}get startDay(){let e=this.prevStageEndDay;if(e!==void 0)return e+this.daysRequiredToStart}get canStart(){let e=this.daysRequiredToStart;if(e>0){let t=this.prevStageEndDay;if(t===void 0||t+e>m.currentDay)return false}return !(this.questsRequiredToStart.length>0&&!this.questsRequiredToStart.every(t=>t.quest.currentStageIndex&&t.quest.currentStageIndex>=t.stageNumber))}inizialize(){this.daysRequiredToStart>0&&(this.prevStageEndDay=m.currentDay,console.log(`[NQTR] Stage ${this.id} will start on day ${this.startDay}`));}async start(e){this.canStart?(this.started=true,this.onStart&&await this.onStart(this,e)):console.warn(`[NQTR] Stage ${this.id} can't start`);}_daysRequiredToStart;get daysRequiredToStart(){return this._daysRequiredToStart||0}_questsRequiredToStart;get questsRequiredToStart(){return this._questsRequiredToStart||[]}};var X=class extends D{constructor(e,t){super(e,{onStart:t.onStart,onEnd:t.onEnd,daysRequiredToStart:t.daysRequiredToStart,questsRequiredToStart:t.questsRequiredToStart}),this._name=t.name||"",this._flags=t.flags||[],this._description=t.description||"",this._adviceDescription=t.adviceDescription||"",this._image=t.image,this._flagsRequiredToStart=t.flagsRequiredToStart||[],this._requestDescriptionToStart=t.requestDescriptionToStart||"";}_name;get name(){return this._name}_description;get description(){return this._description}_adviceDescription;get adviceDescription(){return this._adviceDescription}_image;get image(){return this._image}_flags;get flags(){return this._flags}_flagsRequiredToStart;get flagsRequiredToStart(){return this._flagsRequiredToStart}_requestDescriptionToStart;get requestDescriptionToStart(){return this._requestDescriptionToStart}get completed(){return super.completed?true:this.flags.length>0?!!this.flags.every(e=>storage.getFlag(e.flag)):false}set completed(e){super.completed=e;}get canStart(){return this.flagsRequiredToStart.length>0&&!this.flagsRequiredToStart.every(e=>storage.getFlag(e.flag))?false:super.canStart}};export{G as ActivityBaseModel,h as ActivityStoredClass,K as CommitmentBaseModel,x as CommitmentStoredClass,W as LocationBaseModel,_ as LocationStoredClass,j as MapBaseModel,R as MapStoredClass,J as QuestBaseModel,A as QuestStoredClass,U as RoomBaseModel,T as RoomStoredClass,X as StageBaseModel,D as StageStoredClass};//# sourceMappingURL=index.mjs.map
1
+ import {CachedMap,StoredClassModel,storage,narration}from'@drincs/pixi-vn';var m="___nqtr-time_manager_data___",p="___nqtr-current_room_memory___",Z="___nqtr-last_event_memory___";var d;(a=>(a.log=(i,...n)=>console.log(`[NQTR] ${i}`,...n),a.warn=(i,...n)=>console.warn(`[NQTR] ${i}`,...n),a.error=(i,...n)=>console.error(`[NQTR] ${i}`,...n),a.info=(i,...n)=>console.info(`[NQTR] ${i}`,...n)))(d||={});var L=new CachedMap({cacheSize:20}),ie;(a=>{function o(i){if(Array.isArray(i)){i.forEach(n=>a.add(n));return}L.set(i.id,i);}a.add=o;function e(i){try{let n=L.get(i);if(!n){console.warn(`[NQTR] Activity ${i} not found, you should register it first`);return}return n}catch(n){d.error(`Error while getting Activity ${i}`,n);return}}a.get=e;function t(){return Array.from(L.values())}a.values=t;function r(i){return L.has(i)}a.has=r;})(ie||={});var $=ie;var y=new CachedMap({cacheSize:20}),k=new CachedMap({cacheSize:20}),ae;(a=>{function o(i){if(Array.isArray(i)){i.forEach(n=>a.add(n));return}console.warn(`[NQTR] Registering commitment ${i.id}`,i),y.set(i.id,i);}a.add=o;function e(i){try{let n=y.get(i);if(!n){console.warn(`[NQTR] Commitment ${i} not found, you should register it first`);return}return n}catch(n){d.error(`Error while getting Commitment ${i}`,n);return}}a.get=e;function t(){return Array.from(y.values())}a.values=t;function r(i){return y.has(i)}a.has=r;})(ae||={});var v=ae;var D=new CachedMap({cacheSize:20}),oe;(a=>{function o(i){if(Array.isArray(i)){i.forEach(n=>o(n));return}D.has(i.id)&&console.warn(`[NQTR] Location id ${i.id} already exists, it will be overwritten`),D.set(i.id,i);}a.add=o;function e(i){try{let n=D.get(i);if(!n){console.warn(`[NQTR] Location ${i} not found, you should register it first`);return}return n}catch(n){d.error(`Error while getting Location ${i}`,n);return}}a.get=e;function t(){return Array.from(D.values())}a.values=t;function r(i){return D.has(i)}a.has=r;})(oe||={});var w=oe;var C=new CachedMap({cacheSize:20}),se;(a=>{function o(i){if(Array.isArray(i)){i.forEach(n=>o(n));return}C.has(i.id)&&console.warn(`[NQTR] Map id ${i.id} already exists, it will be overwritten`),C.set(i.id,i);}a.add=o;function e(i){try{let n=C.get(i);if(!n){console.warn(`[NQTR] Map ${i} not found, you should register it first`);return}return n}catch(n){d.error(`Error while getting Map ${i}`,n);return}}a.get=e;function t(){return Array.from(C.values())}a.values=t;function r(i){return C.has(i)}a.has=r;})(se||={});var P=se;var z=new CachedMap({cacheSize:5}),de;(a=>{function o(i){if(Array.isArray(i)){i.forEach(n=>a.add(n));return}z.set(i.id,i);}a.add=o;function e(i){try{let n=z.get(i);if(!n){console.warn(`[NQTR] Quest ${i} not found, you should register it first`);return}return n}catch(n){d.error(`Error while getting Quest ${i}`,n);return}}a.get=e;function t(){return Array.from(z.values())}a.values=t;function r(i){return z.has(i)}a.has=r;})(de||={});var Y=new CachedMap({cacheSize:20}),ue;(a=>{function o(i){if(Array.isArray(i)){i.forEach(u=>o(u));return}Y.set(i.id,i);let n=i.location;w.add(n);let s=n?.map;s&&P.add(s);}a.add=o;function e(i){try{let n=Y.get(i);if(!n){console.warn(`[NQTR] Room ${i} not found, you should register it first`);return}return n}catch(n){d.error(`Error while getting Room ${i}`,n);return}}a.get=e;function t(){return Array.from(Y.values())}a.values=t;function r(i){return Y.has(i)}a.has=r;})(ue||={});var I=ue;var N=class{get rooms(){return I.values()}get locations(){return w.values()}get maps(){return P.values()}get currentRoomId(){return storage.getVariable(p)}get currentRoom(){let e=this.currentRoomId;if(!e){d.error("The current room has not yet been set");return}let t=I.get(e);if(!t){d.error(`Current room ${e} not found`);return}return t}set currentRoom(e){if(typeof e!="string"&&(e=e.id),!I.get(e)){d.error(`The room ${e} is not registered, so it can't be set as current room`);return}let r=storage.getVariable(p);r!==e&&(Q({type:"editroom",prev:r,value:e}),storage.setVariable(p,e));}get currentLocation(){return this.currentRoom?.location}get currentMap(){return this.currentRoom?.location.map}clearExpiredActivities(){I.values().forEach(e=>{e.clearExpiredActivities();});}};var F="___nqtr-temporary_commitment___",O=class{get fixedRoutine(){return [...k.values()]}set fixedRoutine(e){e.forEach(t=>{k.has(t.id)&&console.warn(`[NQTR] Commitment id ${t.id} already exists, it will be overwritten`),k.set(t.id,t);});}get temporaryRoutine(){let e=storage.getVariable(F);return e?e.map(r=>v.get(r)).filter(r=>r!==void 0):[]}get allRoutine(){return [...this.fixedRoutine,...this.temporaryRoutine]}add(e){Array.isArray(e)||(e=[e]);let t=e.map(r=>{if(!v.get(r.id)){console.warn(`[NQTR] Commitment ${r.id} not found, it will be ignored`);return}return r.id}).filter(r=>r!==void 0);storage.setVariable(F,t);}find(e){return v.get(e)}remove(e){Array.isArray(e)||(e=[e]);let t=e.map(a=>a.id),r=storage.getVariable(F);r&&(r=r.filter(a=>!t.includes(a)),storage.setVariable(F,r));}clearExpiredRoutine(){v.values().forEach(e=>{e.expired&&y.delete(e.id);});}get currentRoutine(){let e={};return [...this.fixedRoutine,...this.temporaryRoutine].forEach(t=>{t.isActive&&(t.characters.length>0?t.characters.every(a=>!e[a.id]||t.priority>e[a.id].priority)&&t.characters.forEach(a=>{e[a.id]=t;}):d.error(`The commitment ${t.id} has no characters assigned`));}),Object.values(e)}get currentRoomRoutine(){return g.currentRoom?.routine||[]}getCommitmentByCharacter(e){this.currentRoutine.forEach(t=>{if(t.characters.map(r=>r.id).includes(e.id))return t});}};var c=class{static dayStartTime=0;static dayEndTime=24;static defaultTimeSpent=1;static timeSlots=[];static weekLength=7;static weekendStartDay=this.weekLength-1;static getDayName};var q=class{initialize(e){let{dayStartTime:t=0,dayEndTime:r=24,defaultTimeSpent:a=1,timeSlots:i=[],weekLength:n=7,weekendStartDay:s=n-1,getDayName:u}=e;c.dayStartTime=t,c.dayEndTime=r,c.defaultTimeSpent=a,c.timeSlots=i,c.weekLength=n,s>=c.weekLength?console.warn(`[NQTR] Weekend start day should be less than week length ${n}, so will be ignored`):c.weekendStartDay=s,c.getDayName=u;}get dayStartTime(){return c.dayStartTime}get dayEndTime(){return c.dayEndTime}get defaultTimeSpent(){return c.defaultTimeSpent}get timeSlots(){return c.timeSlots}get weekLength(){return c.weekLength}get weekendStartDay(){return c.weekendStartDay}get getDayName(){return c.getDayName}get currentTime(){let e=storage.getVariable(m)||{};return e.hasOwnProperty("currentTime")&&typeof e.currentTime=="number"?e.currentTime:this.dayStartTime}set currentTime(e){let t=storage.getVariable(m)||{},r={...t};typeof e=="number"?r.currentTime=e:delete r.currentTime,Q({type:"edittime",prev:t,value:r}),storage.setVariable(m,r);}get currentDate(){let e=storage.getVariable(m)||{};return e.hasOwnProperty("currentDate")&&typeof e.currentDate=="number"?e.currentDate:0}set currentDate(e){let t=storage.getVariable(m)||{},r={...t};typeof e=="number"?r.currentDate=e:delete r.currentDate,Q({type:"edittime",prev:t,value:r}),storage.setVariable(m,r);}get isWeekend(){return this.currentWeekDayNumber>=this.weekendStartDay}get currentWeekDayNumber(){return this.currentDate%this.weekLength+1}get currentDayName(){return this.getDayName?this.getDayName(this.currentWeekDayNumber-1):(console.warn("[NQTR] Week days names are not defined, so currentDayName will be empty"),"")}get currentTimeSlot(){if(this.timeSlots.length===0)return console.warn("[NQTR] Time slots are not defined"),0;for(let e=0;e<this.timeSlots.length;e++){let t=this.timeSlots[e];if(this.timeSlots.length>e+1&&this.nowIsBetween(t.startTime,this.timeSlots[e+1].startTime))return e}return this.timeSlots.length-1}increaseTime(e=this.defaultTimeSpent){let t=this.currentTime+e;return t>=this.dayEndTime&&(this.increaseDate(),t=this.dayStartTime+(t-this.dayEndTime)),this.currentTime=t,this.currentTime}increaseDate(e=this.dayStartTime,t=1){let r=this.currentDate+t;return this.currentDate=r,this.currentTime=e,this.currentDate}nowIsBetween(e,t){e===void 0&&(e=this.dayStartTime-1),t===void 0&&(t=this.dayEndTime+1);let r=this.currentTime;return e<t?r>=e&&r<t:r>=e||r<t}};var l=new q,g=new N,H=new O;function Q(o){storage.setVariable(Z,o);}function Re(){return storage.getVariable(Z)}function ce(){let o=Re(),e=g.currentRoom;if(!e||!e.automaticFunction){narration.addCurrentStepToHistory();return}switch(o?.type){case "editroom":storage.setVariable(p,o.prev),narration.addCurrentStepToHistory(),storage.setVariable(p,e.id);break;case "edittime":let t=storage.getVariable(m)||{};storage.setVariable(m,o.prev),narration.addCurrentStepToHistory(),storage.setVariable(m,t);break}}var Te="__nqtr-activity__",h=class extends StoredClassModel{constructor(t,r,a,i=Te){super(i,t);this._onRun=r;this._timeSlot=a.timeSlot,this._dateScheduling=a.dateScheduling;}_timeSlot;get timeSlot(){return this._timeSlot}_dateScheduling;get dateScheduling(){return this._dateScheduling}get run(){return async t=>(ce(),await this._onRun(this,t))}get expired(){return !!(this.dateScheduling?.to&&this.dateScheduling.to<=l.currentDate)}get isActive(){return !(this.dateScheduling?.from&&this.dateScheduling.from>l.currentDate||this.dateScheduling?.to&&this.dateScheduling.to<l.currentDate||!l.nowIsBetween(this.timeSlot?.from,this.timeSlot?.to))}};var G=class extends h{constructor(e,t,r){super(e,t,{dateScheduling:r.dateScheduling,timeSlot:r.timeSlot}),this.defaultName=r.name||"",this.defaultDisabled=r.disabled||false,this.defaultHidden=r.hidden||false,this._icon=r.renderIcon;}defaultName;get name(){return this.getStorageProperty("name")||this.defaultName}set name(e){this.setStorageProperty("name",e);}defaultDisabled;get disabled(){let e=this.getStorageProperty("disabled")||this.defaultDisabled;return typeof e=="string"?storage.getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}};var Ae="__nqtr-commitment__",x=class extends h{constructor(t,r,a,i,n){i=i||(()=>{});super(t,i,n,Ae);this._characters=r;this._room=a;this.defaultExecutionType=n.executionType||"interaction",this.defaultPriority=n.priority;}defaultExecutionType;defaultPriority;get characters(){return this._characters}get room(){return this._room}get executionType(){return this.getStorageProperty("executionType")||this.defaultExecutionType}set executionType(t){this.setStorageProperty("executionType",t);}get priority(){return this.getStorageProperty("priority")||this.defaultPriority||0}set priority(t){this.setStorageProperty("priority",t);}};var K=class extends x{constructor(e,t,r,a){super(e,t?Array.isArray(t)?t:[t]:[],r,a.onRun,{executionType:a.executionType,priority:a.priority,timeSlot:a.timeSlot,dateScheduling:a.dateScheduling}),this._name=a.name||"",this._image=a.image,this.defaultDisabled=a.disabled||false,this.defaultHidden=a.hidden||false,this._icon=a.icon;}_name;get name(){return this._name}_image;get image(){return this._image}_icon;get icon(){return this._icon}defaultDisabled;get disabled(){let e=this.getStorageProperty("disabled")||this.defaultDisabled;return typeof e=="string"?storage.getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){if(this.dateScheduling?.from&&this.dateScheduling.from>l.currentDate||!l.nowIsBetween(this.timeSlot?.from,this.timeSlot?.to)||!this.expired)return true;let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}};var f=class extends StoredClassModel{constructor(t,r,a=[]){super(t,r);this.defaultActivities=a;}get defaultActivitiesIds(){return this.defaultActivities.map(t=>t.id)}get activeActivityScheduling(){return this.getStorageProperty("activeActivityScheduling")||{}}get excludedActivitiesScheduling(){return this.getStorageProperty("excludedActivitiesScheduling")||{}}removeActivityScheduling(t){let r=this.activeActivityScheduling;delete r[t],this.setStorageProperty("activeActivityScheduling",r);let a=this.excludedActivitiesScheduling;delete a[t],this.setStorageProperty("excludedActivitiesScheduling",a);}editActivityScheduling(t,r){this.removeActivityScheduling(t);let a=this.activeActivityScheduling;a[t]=r,this.setStorageProperty("activeActivityScheduling",a);}editExcludedActivityScheduling(t,r){this.removeActivityScheduling(t);let a=this.excludedActivitiesScheduling;a[t]=r,this.setStorageProperty("excludedActivitiesScheduling",a);}get additionalActivitiesIds(){return this.getStorageProperty("additionalActivitiesIds")||[]}get excludedActivitiesIds(){return this.getStorageProperty("excludedActivitiesIds")||[]}addActivity(t,r={}){let{timeSlot:a,dateScheduling:i}=r,{to:n=l.dayEndTime+1}=a||{},s={timeSlot:{},dateScheduling:{}};if(a){if(a.from>=n)throw new Error("[NQTR] The from time must be less than the to time.");s.timeSlot.from=a.from;}if(i?.from!==void 0&&i?.to!==void 0&&i?.from>=i?.to)throw new Error("[NQTR] The from day/date must be less than the to day/date.");if(i?.from!==void 0&&(s.dateScheduling.from=i?.from),i?.to!==void 0&&(s.dateScheduling.to=i?.to),this.defaultActivitiesIds.includes(t.id)){console.warn(`[NQTR] Activity with id ${t.id} already exists, so it will be ignored.`);return}let u=this.additionalActivitiesIds;if(u.includes(t.id)){if(Object.keys(s).length){this.editActivityScheduling(t.id,s);return}else if(this.excludedActivitiesIds.includes(t.id)){this.removeActivityScheduling(t.id),console.log(`[NQTR] Activity with id ${t.id} was excluded, so it will be associated with this class again.`);return}console.warn(`[NQTR] Activity with id ${t.id} already exists, so it will be ignored.`);return}u.push(t.id),this.setStorageProperty("additionalActivitiesIds",u),Object.keys(s).length&&this.editActivityScheduling(t.id,s);}removeActivity(t,r={}){let{to:a}=r,i=typeof t=="string"?t:t.id,n={dateScheduling:{}};a!==void 0&&(n.dateScheduling.to=a);let s=this.additionalActivitiesIds;if(s.includes(i)){if(Object.keys(n).length){this.editExcludedActivityScheduling(i,n);return}s=s.filter(u=>u!==i),this.setStorageProperty("additionalActivitiesIds",s);}else if(this.defaultActivitiesIds.includes(i)){if(Object.keys(n).length){this.editExcludedActivityScheduling(i,n);return}let u=this.excludedActivitiesIds;u.push(i),this.setStorageProperty("excludedActivitiesIds",u);}else console.warn(`[NQTR] Activity with id ${i} not found, so it will be ignored.`);}clearExpiredActivities(){let t=this.activeActivityScheduling,r=this.excludedActivitiesScheduling,a=this.additionalActivitiesIds,i=this.excludedActivitiesIds;a.forEach(n=>{if(n in t){let{to:s}=t[n].dateScheduling||{};s&&s<l.currentDate&&(this.removeActivityScheduling(n),a=a.filter(u=>u!==n));}}),i.forEach(n=>{if(n in r){let{to:s}=r[n].dateScheduling||{};s&&s<l.currentDate&&(this.removeActivityScheduling(n),i=i.filter(u=>u!==n));}});}get activities(){let t=[],r=this.activeActivityScheduling;return this.additionalActivitiesIds.concat(this.defaultActivitiesIds).forEach(a=>{let i=$.get(a),{dateScheduling:n,timeSlot:s}=r[a]||{},{from:u=i?.dateScheduling?.from,to:re=i?.dateScheduling?.to}=n||{},{from:pe=i?.timeSlot?.from,to:Se=i?.timeSlot?.to}=s||{};i&&l.nowIsBetween(pe,Se)&&!(u&&u>l.currentDate)&&!(re&&re<l.currentDate)&&t.push(i);}),Object.entries(this.excludedActivitiesScheduling).forEach(([a,i])=>{let n=$.get(a);n&&n.isActive&&!(i.dateScheduling.to!==void 0&&i.dateScheduling.to>=l.currentDate)&&t.push(n);}),this.defaultActivities.forEach(a=>{a.isActive&&!t.find(i=>i.id===a.id)&&t.push(a);}),t}};var De="__nqtr-location__",R=class extends f{constructor(t,r,a=[]){super(De,t,a);this._map=r;}get map(){return this._map}get rooms(){return g.rooms.filter(t=>t.location.id===this.id)}};var j=class extends R{constructor(e,t,r={}){super(e,t,r.activities||[]),this.defaultName=r.name||"",this.defaultDisabled=r.disabled||false,this.defaultHidden=r.hidden||false,this._icon=r.icon;}defaultName;get name(){return this.getStorageProperty("name")||this.defaultName}set name(e){this.setStorageProperty("name",e);}defaultDisabled;get disabled(){let e=this.getStorageProperty("disabled")||this.defaultDisabled;return typeof e=="string"?storage.getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}};var we="__nqtr-map__",b=class extends f{constructor(e,t=[]){super(we,e,t);}get locations(){return g.locations.filter(e=>e.map.id===this.id)}};var W=class extends b{constructor(e,t={}){super(e,t.activities||[]),this.defaultName=t.name||"",this._image=t.image;}defaultName;get name(){return this.getStorageProperty("name")||this.defaultName}set name(e){this.setStorageProperty("name",e);}_image;get image(){return this._image}};var Ce="__nqtr-room__",T=class extends f{constructor(t,r,a=[]){super(Ce,t,a);this._location=r;}get routine(){return H.currentRoutine.filter(t=>t.room.id===this.id)}get location(){return this._location}get characters(){let t=[];return this.routine.forEach(r=>{t.push(...r.characters);}),t}get automaticFunction(){let t=this.routine.find(r=>r.executionType==="automatic")?.run;if(t)return async r=>{await t(r);}}};var U=class extends T{constructor(e,t,r={}){super(e,t,r.activities||[]),this.defaultName=r.name||"",this._image=r.image,this.defaultDisabled=r.disabled||false,this.defaultHidden=r.hidden||false,this._icon=r.icon;}defaultName;get name(){return this.getStorageProperty("name")||this.defaultName}set name(e){this.setStorageProperty("name",e);}_image;get image(){return this._image}defaultDisabled;get disabled(){let e=this.getStorageProperty("disabled")||this.defaultDisabled;return typeof e=="string"?storage.getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}get routine(){return H.currentRoutine.filter(e=>e.room.id===this.id)}};var Ne="__nqtr-quest__",A=class extends StoredClassModel{constructor(t,r,a={}){super(Ne,t);this._stages=r;this._onStart=a.onStart,this._onNextStage=a.onNextStage;}get stages(){return this._stages}get currentStageIndex(){return this.getStorageProperty("currentStageIndex")}set currentStageIndex(t){this.setStorageProperty("currentStageIndex",t);}get currentStage(){let t=this.currentStageIndex;if(!(t===void 0||t>=this.stages.length))return this.stages[t]}get started(){return this.currentStageIndex!==void 0}get completed(){return this.currentStageIndex===void 0?false:this.currentStageIndex>this.stages.length-1}get inProgress(){return this.completed||this.failed?false:this.started}get failed(){return this.getStorageProperty("failed")||false}set failed(t){this.setStorageProperty("failed",t);}_onStart;get onStart(){return this._onStart}_onNextStage;get onNextStage(){return this._onNextStage}async start(t){if(this.started){console.warn(`[NQTR] Quest ${this.id} is already started`);return}if(this.stages.length===0){d.error(`Quest ${this.id} has no stages`);return}this.currentStageIndex=0;let r=this.currentStage;if(r&&r.start)return this.onStart&&await this.onStart(this,t),await r.start(t);d.error(`Quest ${this.id} has no start stage`);}async tryToGoNextStage(t){if(!this.inProgress)return false;let r=this.currentStage;return r?r.completed?await this.goNextStage(t):false:(d.error(`Quest ${this.id} has no current stage`),false)}async completeCurrentStageAndGoNext(t){let r=this.currentStage;return r?(r.completed=true,await this.goNextStage(t)):(d.error(`Quest ${this.id} has no current stage`),false)}async goNextStage(t){if(!this.inProgress)return console.warn(`[NQTR] Quest ${this.id} is not in progress`),false;let r=this.currentStage,a=this.currentStageIndex;if(!r||a===void 0)return d.error(`Quest ${this.id} has no current stage`),false;this.currentStageIndex=a+1,this.onNextStage&&await this.onNextStage(this,t),r&&r.onEnd&&await r.onEnd(r,t);let i=this.currentStage;return i&&(i.inizialize(),this.currentStageMustStart&&await this.startCurrentStage(t)),true}get currentStageMustStart(){let t=this.currentStage;return t?!t.started&&t.canStart&&!t.completed:false}async startCurrentStage(t){let r=this.currentStage;r&&this.currentStageMustStart?await r.start(t):console.warn(`[NQTR] Quest ${this.id} can't start the current stage`);}};var J=class extends A{constructor(e,t,r){super(e,t,{onStart:r.onStart,onNextStage:r.onNextStage}),this._name=r.name||"",this._description=r.description||"",this._icon=r.icon,this._image=r.image,this._inDevelopment=r.inDevelopment||false;}_name;get name(){return this._name}_description;get description(){return this._description}_icon;get icon(){return this._icon}_image;get image(){return this._image}_inDevelopment;get inDevelopment(){return this._inDevelopment}};var Me="__nqtr-stage__",E=class extends StoredClassModel{constructor(e,t={}){super(Me,e),this._onStart=t.onStart,this._onEnd=t.onEnd,this._deltaDateRequired=t.deltaDateRequired,this._questsRequired=t.questsRequired||[];}_onStart;get onStart(){return this._onStart}_onEnd;get onEnd(){return this._onEnd}get completed(){return this.getStorageProperty("completed")||false}set completed(e){this.setStorageProperty("completed",e);}get started(){return this.getStorageProperty("started")||false}set started(e){this.setStorageProperty("started",e);}get inizializeDate(){return this.getStorageProperty("inizializeDate")}set inizializeDate(e){this.setStorageProperty("inizializeDate",e);}get startDate(){let e=this.inizializeDate;if(e!==void 0)return e+this.deltaDateRequired}get canStart(){let e=this.deltaDateRequired;if(e>0){let t=this.inizializeDate;if(t===void 0||t+e>l.currentDate)return false}return !(this.questsRequired.length>0&&!this.questsRequired.every(t=>t.quest.currentStageIndex&&t.quest.currentStageIndex>=t.stageNumber))}inizialize(){this.deltaDateRequired>0&&(this.inizializeDate=l.currentDate,console.log(`[NQTR] Stage ${this.id} will start on date ${this.startDate}`));}async start(e){this.canStart?(this.started=true,this.onStart&&await this.onStart(this,e)):console.warn(`[NQTR] Stage ${this.id} can't start`);}_deltaDateRequired;get deltaDateRequired(){return this._deltaDateRequired||0}_questsRequired;get questsRequired(){return this._questsRequired||[]}};var X=class extends E{constructor(e,t){super(e,{onStart:t.onStart,onEnd:t.onEnd,deltaDateRequired:t.deltaDateRequired,questsRequired:t.questsRequired}),this._name=t.name||"",this._flags=t.flags||[],this._description=t.description||"",this._adviceDescription=t.adviceDescription||"",this._image=t.image,this._flagsRequired=t.flagsRequired||[],this._requestDescriptionToStart=t.requestDescriptionToStart||"";}_name;get name(){return this._name}_description;get description(){return this._description}_adviceDescription;get adviceDescription(){return this._adviceDescription}_image;get image(){return this._image}_flags;get flags(){return this._flags}_flagsRequired;get flagsRequired(){return this._flagsRequired}_requestDescriptionToStart;get requestDescriptionToStart(){return this._requestDescriptionToStart}get completed(){return super.completed?true:this.flags.length>0?!!this.flags.every(e=>storage.getFlag(e.flag)):false}set completed(e){super.completed=e;}get canStart(){return this.flagsRequired.length>0&&!this.flagsRequired.every(e=>storage.getFlag(e.flag))?false:super.canStart}};export{G as ActivityBaseModel,h as ActivityStoredClass,K as CommitmentBaseModel,x as CommitmentStoredClass,j as LocationBaseModel,R as LocationStoredClass,W as MapBaseModel,b as MapStoredClass,J as QuestBaseModel,A as QuestStoredClass,U as RoomBaseModel,T as RoomStoredClass,X as StageBaseModel,E as StageStoredClass};//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map