coh-content-db 2.0.0-rc.16 → 2.0.0-rc.18

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.
@@ -96,12 +96,71 @@ function compareSex(a, b) {
96
96
  return orderA - orderB;
97
97
  }
98
98
 
99
- var __defProp$a = Object.defineProperty;
99
+ const ZONE_TYPE = [
100
+ /**
101
+ * The standard zone type, even if not technically occurring in the 'City' proper.
102
+ */
103
+ "city",
104
+ /**
105
+ * An Ouroboros flashback to a zone as it was in a previous era.
106
+ */
107
+ "echo",
108
+ /**
109
+ * Tutorial zon, usually inaccessible after leaving.
110
+ */
111
+ "tutorial",
112
+ /**
113
+ * Trial zones, like the Abandoned Sewers trial.
114
+ */
115
+ "trial",
116
+ /**
117
+ * Hazard zones like the Hollows.
118
+ */
119
+ "hazard",
120
+ /**
121
+ * Mayhem mission zones.
122
+ */
123
+ "mayhem",
124
+ /**
125
+ * Safeguard mission zones.
126
+ */
127
+ "safeguard",
128
+ /**
129
+ * Exists inside a mission not covered by the other types.
130
+ */
131
+ "mission",
132
+ /**
133
+ * Incarnate trial zones.
134
+ */
135
+ "incarnate",
136
+ /**
137
+ * Cooprative zones where Heroes and Villains can team up for PvE content.
138
+ */
139
+ "co-op",
140
+ /**
141
+ * PvP zones like Bloody Bay.
142
+ */
143
+ "pvp",
144
+ /**
145
+ * Located in an arena PvP map.
146
+ */
147
+ "arena",
148
+ /**
149
+ * A building, usually contained within another zone, like the AE buildings.
150
+ */
151
+ "building",
152
+ /**
153
+ * Stuff like the (Phone only) zone.
154
+ */
155
+ "other"
156
+ ];
157
+
158
+ var __defProp$c = Object.defineProperty;
100
159
  var __typeError$6 = (msg) => {
101
160
  throw TypeError(msg);
102
161
  };
103
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
104
- var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
162
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
163
+ var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
105
164
  var __accessCheck$6 = (obj, member, msg) => member.has(obj) || __typeError$6("Cannot " + msg);
106
165
  var __privateGet$5 = (obj, member, getter) => (__accessCheck$6(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
107
166
  var __privateAdd$6 = (obj, member, value) => member.has(obj) ? __typeError$6("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
@@ -110,11 +169,11 @@ var _items$1;
110
169
  class AlignmentList {
111
170
  constructor(items) {
112
171
  __privateAdd$6(this, _items$1);
113
- __publicField$a(this, "hero");
114
- __publicField$a(this, "villain");
115
- __publicField$a(this, "praetorian");
116
- __publicField$a(this, "primal");
117
- __publicField$a(this, "all");
172
+ __publicField$c(this, "hero");
173
+ __publicField$c(this, "villain");
174
+ __publicField$c(this, "praetorian");
175
+ __publicField$c(this, "primal");
176
+ __publicField$c(this, "all");
118
177
  const set = new Set(items ?? [...ALIGNMENT]);
119
178
  this.hero = set.has("hero") || set.has("primal") || set.has("all");
120
179
  this.villain = set.has("villain") || set.has("primal") || set.has("all");
@@ -245,14 +304,14 @@ validateKey_fn = function(key) {
245
304
  if (INVALID_KEY_PATTERN.test(key)) throw new Error(`Invalid key: [${key}]; Keys can only contain lowercase characters, numbers and dashes.`);
246
305
  };
247
306
 
248
- var __defProp$9 = Object.defineProperty;
249
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
250
- var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
307
+ var __defProp$b = Object.defineProperty;
308
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
309
+ var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
251
310
  class Archetype {
252
311
  constructor(data) {
253
- __publicField$9(this, "key");
254
- __publicField$9(this, "name");
255
- __publicField$9(this, "description");
312
+ __publicField$b(this, "key");
313
+ __publicField$b(this, "name");
314
+ __publicField$b(this, "description");
256
315
  this.key = new Key(data.key).value;
257
316
  this.name = data.name;
258
317
  this.description = data.description;
@@ -264,9 +323,9 @@ function coalesceToArray(value) {
264
323
  return Array.isArray(value) ? value : [value];
265
324
  }
266
325
 
267
- var __defProp$8 = Object.defineProperty;
268
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
269
- var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
326
+ var __defProp$a = Object.defineProperty;
327
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
328
+ var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
270
329
  class BadgeRequirement {
271
330
  constructor(data) {
272
331
  /**
@@ -274,47 +333,47 @@ class BadgeRequirement {
274
333
  *
275
334
  * Keys must be unique and can only contain lowercase letters, numbers and hyphens (`-`).
276
335
  */
277
- __publicField$8(this, "key");
336
+ __publicField$a(this, "key");
278
337
  /**
279
338
  * The requirement type.
280
339
  */
281
- __publicField$8(this, "type");
340
+ __publicField$a(this, "type");
282
341
  /**
283
342
  * If the requirement involves a location, where it is.
284
343
  */
285
- __publicField$8(this, "location");
344
+ __publicField$a(this, "location");
286
345
  /**
287
346
  * If the requirement involves a badge, the badge key.
288
347
  */
289
- __publicField$8(this, "badgeKey");
348
+ __publicField$a(this, "badgeKey");
290
349
  /**
291
350
  * If the requirement involves a mission, the mission key.
292
351
  */
293
- __publicField$8(this, "missionKey");
352
+ __publicField$a(this, "missionKey");
294
353
  /**
295
354
  * If the requirement involves a monument, the text that is displayed thereon.
296
355
  */
297
- __publicField$8(this, "monumentText");
356
+ __publicField$a(this, "monumentText");
298
357
  /**
299
358
  * If the requirement involves crafting an invention, the Level of the invention required.
300
359
  */
301
- __publicField$8(this, "inventionLevel");
360
+ __publicField$a(this, "inventionLevel");
302
361
  /**
303
362
  * If the requirement involves crafting an invention, the types of enhancements that will qualify.
304
363
  */
305
- __publicField$8(this, "inventionTypes");
364
+ __publicField$a(this, "inventionTypes");
306
365
  /**
307
366
  * Number of times the task needs to be repeated.
308
367
  */
309
- __publicField$8(this, "count");
368
+ __publicField$a(this, "count");
310
369
  /**
311
370
  * Additional information about the requirement.
312
371
  */
313
- __publicField$8(this, "notes");
372
+ __publicField$a(this, "notes");
314
373
  /**
315
374
  * List of external links. Wiki, forums, etc.
316
375
  */
317
- __publicField$8(this, "links");
376
+ __publicField$a(this, "links");
318
377
  this.key = new Key(data.key).value;
319
378
  this.type = data.type;
320
379
  this.location = coalesceToArray(data.location);
@@ -329,12 +388,12 @@ class BadgeRequirement {
329
388
  }
330
389
  }
331
390
 
332
- var __defProp$7 = Object.defineProperty;
391
+ var __defProp$9 = Object.defineProperty;
333
392
  var __typeError$3 = (msg) => {
334
393
  throw TypeError(msg);
335
394
  };
336
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
337
- var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
395
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
396
+ var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
338
397
  var __accessCheck$3 = (obj, member, msg) => member.has(obj) || __typeError$3("Cannot " + msg);
339
398
  var __privateGet$2 = (obj, member, getter) => (__accessCheck$3(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
340
399
  var __privateAdd$3 = (obj, member, value) => member.has(obj) ? __typeError$3("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
@@ -343,19 +402,19 @@ var _items;
343
402
  class MoralityList {
344
403
  constructor(items) {
345
404
  __privateAdd$3(this, _items);
346
- __publicField$7(this, "hero");
347
- __publicField$7(this, "vigilante");
348
- __publicField$7(this, "villain");
349
- __publicField$7(this, "rogue");
350
- __publicField$7(this, "resistance");
351
- __publicField$7(this, "loyalist");
352
- __publicField$7(this, "primal");
353
- __publicField$7(this, "praetorian");
354
- __publicField$7(this, "heroic");
355
- __publicField$7(this, "villainous");
356
- __publicField$7(this, "paragonCityAccess");
357
- __publicField$7(this, "rogueIslesAccess");
358
- __publicField$7(this, "all");
405
+ __publicField$9(this, "hero");
406
+ __publicField$9(this, "vigilante");
407
+ __publicField$9(this, "villain");
408
+ __publicField$9(this, "rogue");
409
+ __publicField$9(this, "resistance");
410
+ __publicField$9(this, "loyalist");
411
+ __publicField$9(this, "primal");
412
+ __publicField$9(this, "praetorian");
413
+ __publicField$9(this, "heroic");
414
+ __publicField$9(this, "villainous");
415
+ __publicField$9(this, "paragonCityAccess");
416
+ __publicField$9(this, "rogueIslesAccess");
417
+ __publicField$9(this, "all");
359
418
  const set = new Set(items ?? [...MORALITY]);
360
419
  this.hero = set.has("hero") || set.has("primal") || set.has("heroic") || set.has("paragon-city-access") || set.has("all");
361
420
  this.vigilante = set.has("vigilante") || set.has("primal") || set.has("heroic") || set.has("paragon-city-access") || set.has("rogue-isles-access") || set.has("all");
@@ -430,9 +489,9 @@ class MoralityList {
430
489
  }
431
490
  _items = new WeakMap();
432
491
 
433
- var __defProp$6 = Object.defineProperty;
434
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
435
- var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
492
+ var __defProp$8 = Object.defineProperty;
493
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
494
+ var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
436
495
  class AbstractIndex {
437
496
  /**
438
497
  * Create a new index.
@@ -440,8 +499,8 @@ class AbstractIndex {
440
499
  * @param values Values to index.
441
500
  */
442
501
  constructor(keyField, values) {
443
- __publicField$6(this, "_values", []);
444
- __publicField$6(this, "_hashTable", {});
502
+ __publicField$8(this, "_values", []);
503
+ __publicField$8(this, "_hashTable", {});
445
504
  this._values = values ?? [];
446
505
  this._hashTable = {};
447
506
  for (const value of this.values) {
@@ -472,12 +531,23 @@ function toDate(iso) {
472
531
  return date;
473
532
  }
474
533
 
475
- var __defProp$5 = Object.defineProperty;
534
+ var __defProp$7 = Object.defineProperty;
535
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
536
+ var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
537
+ class SetTitleIds {
538
+ constructor(value) {
539
+ __publicField$7(this, "primal");
540
+ __publicField$7(this, "praetorian");
541
+ [this.primal, this.praetorian] = value;
542
+ }
543
+ }
544
+
545
+ var __defProp$6 = Object.defineProperty;
476
546
  var __typeError$2 = (msg) => {
477
547
  throw TypeError(msg);
478
548
  };
479
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
480
- var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
549
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
550
+ var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
481
551
  var __accessCheck$2 = (obj, member, msg) => member.has(obj) || __typeError$2("Cannot " + msg);
482
552
  var __privateGet$1 = (obj, member, getter) => (__accessCheck$2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
483
553
  var __privateAdd$2 = (obj, member, value) => member.has(obj) ? __typeError$2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
@@ -490,60 +560,60 @@ class Badge {
490
560
  /**
491
561
  * The database key for this badge.
492
562
  */
493
- __publicField$5(this, "key");
563
+ __publicField$6(this, "key");
494
564
  /**
495
565
  * The type of badge.
496
566
  */
497
- __publicField$5(this, "type");
567
+ __publicField$6(this, "type");
498
568
  /**
499
569
  * The name of this badge.
500
570
  *
501
571
  * May vary by character sex or alignment.
502
572
  */
503
- __publicField$5(this, "name");
573
+ __publicField$6(this, "name");
504
574
  /**
505
575
  * The date that the badge was added to the game.
506
576
  */
507
- __publicField$5(this, "releaseDate");
577
+ __publicField$6(this, "releaseDate");
508
578
  /**
509
579
  * The character moralities that this badge is available to.
510
580
  */
511
- __publicField$5(this, "morality");
581
+ __publicField$6(this, "morality");
512
582
  /**
513
583
  * The badge text as it appears in-game. May vary by character sex or alignment.
514
584
  */
515
- __publicField$5(this, "badgeText");
585
+ __publicField$6(this, "badgeText");
516
586
  /**
517
587
  * Short description of how to acquire the badge. Detailed instructions will be in the notes field.
518
588
  */
519
- __publicField$5(this, "acquisition");
589
+ __publicField$6(this, "acquisition");
520
590
  /**
521
591
  * Absolute URL to this badge's icon.
522
592
  *
523
593
  * May vary by character sex or alignment.
524
594
  */
525
- __publicField$5(this, "icon");
595
+ __publicField$6(this, "icon");
526
596
  /**
527
597
  * Freeform notes or tips about the badge.
528
598
  */
529
- __publicField$5(this, "notes");
599
+ __publicField$6(this, "notes");
530
600
  /**
531
601
  * List of external links. Wiki, forums, etc.
532
602
  */
533
- __publicField$5(this, "links");
603
+ __publicField$6(this, "links");
534
604
  /**
535
605
  * The id used with the in-game `/settitle` command to apply the badge.
536
606
  * The first value is the id for primal characters and the (optional) second number is the id for praetorian characters.
537
607
  */
538
- __publicField$5(this, "setTitleId");
608
+ __publicField$6(this, "setTitleId");
539
609
  /**
540
610
  * A description of the effect the badge will have, such as a buff or granting a temporary power.
541
611
  */
542
- __publicField$5(this, "effect");
612
+ __publicField$6(this, "effect");
543
613
  /**
544
614
  * Some badges are not included in the badge total count... such as Flames of Prometheus, which can be removed by redeeming it for a Notice of the Well.
545
615
  */
546
- __publicField$5(this, "ignoreInTotals");
616
+ __publicField$6(this, "ignoreInTotals");
547
617
  this.key = new Key(badgeData.key).value;
548
618
  this.type = badgeData.type;
549
619
  this.name = new Alternates(badgeData.name);
@@ -555,7 +625,7 @@ class Badge {
555
625
  this.notes = badgeData.notes;
556
626
  this.links = badgeData.links ?? [];
557
627
  this.effect = badgeData.effect;
558
- this.setTitleId = badgeData.setTitleId;
628
+ this.setTitleId = badgeData.setTitleId ? new SetTitleIds(badgeData.setTitleId) : void 0;
559
629
  this.ignoreInTotals = badgeData.ignoreInTotals ?? false;
560
630
  __privateSet$1(this, _requirementsIndex, new AbstractIndex("key", badgeData.requirements?.map((x) => new BadgeRequirement(x))));
561
631
  for (const requirement of __privateGet$1(this, _requirementsIndex).values) {
@@ -645,7 +715,7 @@ satisfiesQueryPredicate_fn = function(badge, query) {
645
715
  const queryString = query?.str?.toLowerCase() ?? "";
646
716
  const fields = query?.fields ? new Set(query?.fields) : /* @__PURE__ */ new Set(["name"]);
647
717
  if (fields.size === 0) return true;
648
- return !!(fields.has("name") && badge.name.canonical.some((x) => x.value.toLowerCase().includes(queryString)) || fields.has("badge-text") && badge.badgeText.canonical.some((x) => x.value.toLowerCase().includes(queryString)) || fields.has("acquisition") && badge.acquisition?.toLowerCase().includes(queryString) || fields.has("effect") && badge.effect?.toLowerCase().includes(queryString) || fields.has("notes") && badge.notes?.toLowerCase().includes(queryString) || fields.has("set-title-id") && badge.setTitleId?.some((x) => x?.toString().includes(queryString)));
718
+ return !!(fields.has("name") && badge.name.canonical.some((x) => x.value.toLowerCase().includes(queryString)) || fields.has("badge-text") && badge.badgeText.canonical.some((x) => x.value.toLowerCase().includes(queryString)) || fields.has("acquisition") && badge.acquisition?.toLowerCase().includes(queryString) || fields.has("effect") && badge.effect?.toLowerCase().includes(queryString) || fields.has("notes") && badge.notes?.toLowerCase().includes(queryString) || fields.has("set-title-id") && badge.setTitleId?.primal.toString() === queryString || fields.has("set-title-id") && badge.setTitleId?.praetorian?.toString() === queryString);
649
719
  };
650
720
  satisfiesFilterPredicate_fn = function(badge, filter) {
651
721
  return (!filter?.type || badge.type === filter.type) && (!filter?.zoneKey || badge.zoneKey === filter.zoneKey) && (!filter?.morality || badge.morality.has(filter.morality));
@@ -679,39 +749,39 @@ sort_fn = function(badges, sort) {
679
749
  }
680
750
  };
681
751
 
682
- var __defProp$4 = Object.defineProperty;
683
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
684
- var __publicField$4 = (obj, key, value) => __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
752
+ var __defProp$5 = Object.defineProperty;
753
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
754
+ var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
685
755
  class BundleHeader {
686
756
  constructor(data) {
687
757
  /**
688
758
  * Name of the fork this bundle contains data for.
689
759
  */
690
- __publicField$4(this, "name");
760
+ __publicField$5(this, "name");
691
761
  /**
692
762
  * Version number for this data package.
693
763
  */
694
- __publicField$4(this, "version");
764
+ __publicField$5(this, "version");
695
765
  /**
696
766
  * The time this bundle was last updated.
697
767
  */
698
- __publicField$4(this, "lastUpdateTime");
768
+ __publicField$5(this, "lastUpdateTime");
699
769
  /**
700
770
  * Description of the fork.
701
771
  */
702
- __publicField$4(this, "description");
772
+ __publicField$5(this, "description");
703
773
  /**
704
774
  * Url for the repository where the bundle is maintained.
705
775
  */
706
- __publicField$4(this, "repositoryUrl");
776
+ __publicField$5(this, "repositoryUrl");
707
777
  /**
708
778
  * Url for the location of the changelog.
709
779
  */
710
- __publicField$4(this, "changelogUrl");
780
+ __publicField$5(this, "changelogUrl");
711
781
  /**
712
782
  * List of external links. Wiki, forums, etc.
713
783
  */
714
- __publicField$4(this, "links");
784
+ __publicField$5(this, "links");
715
785
  if (!data) throw new Error("Missing header data");
716
786
  this.name = data.name;
717
787
  this.version = data.version;
@@ -723,6 +793,22 @@ class BundleHeader {
723
793
  }
724
794
  }
725
795
 
796
+ var __defProp$4 = Object.defineProperty;
797
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
798
+ var __publicField$4 = (obj, key, value) => __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
799
+ class LevelRange {
800
+ constructor(value) {
801
+ __publicField$4(this, "min");
802
+ __publicField$4(this, "max");
803
+ if (Array.isArray(value)) {
804
+ this.min = value[0];
805
+ this.max = value[1] === void 0 ? void 0 : value[1];
806
+ } else {
807
+ this.min = value;
808
+ }
809
+ }
810
+ }
811
+
726
812
  var __defProp$3 = Object.defineProperty;
727
813
  var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
728
814
  var __publicField$3 = (obj, key, value) => __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -738,12 +824,32 @@ class Zone {
738
824
  * The name of the zone as it appears in-game.
739
825
  */
740
826
  __publicField$3(this, "name");
827
+ /**
828
+ * The type of zone.
829
+ */
830
+ __publicField$3(this, "type");
831
+ /**
832
+ * The character moralities that this zone is accessible by.
833
+ */
834
+ __publicField$3(this, "morality");
835
+ /**
836
+ * The level range this zone is recommended for.
837
+ */
838
+ __publicField$3(this, "levelRange");
839
+ /**
840
+ * Freeform notes or tips about the zone.
841
+ */
842
+ __publicField$3(this, "notes");
741
843
  /**
742
844
  * List of external links. Wiki, forums, etc.
743
845
  */
744
846
  __publicField$3(this, "links");
745
847
  this.key = new Key(data.key).value;
746
848
  this.name = data.name;
849
+ this.type = data.type;
850
+ this.morality = new MoralityList(coalesceToArray(data.morality));
851
+ this.levelRange = data.levelRange ? new LevelRange(data.levelRange) : void 0;
852
+ this.notes = data.notes;
747
853
  this.links = data.links ?? [];
748
854
  }
749
855
  }
@@ -792,7 +898,7 @@ class Contact {
792
898
  this.title = data.title;
793
899
  this.morality = new MoralityList(coalesceToArray(data.morality));
794
900
  this.location = data.location;
795
- this.levelRange = data.levelRange;
901
+ this.levelRange = data.levelRange ? new LevelRange(data.levelRange) : void 0;
796
902
  this.notes = data.notes;
797
903
  this.links = data.links ?? [];
798
904
  }
@@ -848,7 +954,7 @@ class Mission {
848
954
  this.type = data.type;
849
955
  this.morality = new MoralityList(coalesceToArray(data.morality));
850
956
  this.contactKeys = coalesceToArray(data.contactKeys);
851
- this.levelRange = data.levelRange;
957
+ this.levelRange = data.levelRange ? new LevelRange(data.levelRange) : void 0;
852
958
  this.notes = data.notes;
853
959
  this.links = data.links ?? [];
854
960
  this.flashback = createFlashback(data);
@@ -858,7 +964,7 @@ function createFlashback(data) {
858
964
  if (!data.flashback) return void 0;
859
965
  return {
860
966
  id: data.flashback.id,
861
- levelRange: data.flashback.levelRange ?? data.levelRange,
967
+ levelRange: data.flashback.levelRange ? new LevelRange(data.flashback.levelRange) : void 0,
862
968
  name: data.flashback.name ?? data.name,
863
969
  morality: new MoralityList(coalesceToArray(data.flashback.morality ?? data.morality)),
864
970
  notes: data.flashback.notes
@@ -1052,5 +1158,5 @@ function zoneLink(target) {
1052
1158
  return `[${key}](${zoneUri(target)})`;
1053
1159
  }
1054
1160
 
1055
- export { ALIGNMENT, AlignmentList, Alternates, Archetype, BADGE_REQUIREMENT_TYPE, BADGE_TYPE, Badge, BadgeIndex, BadgeRequirement, BundleHeader, CohContentDatabase, Contact, ENHANCEMENT_CATEGORY, Key, Location, MISSION_TYPE, MORALITY, Mission, MoralityList, SEX, Zone, badgeLink, badgeUri, compareAlignment, compareByDefaultName, compareByReleaseDate, compareByZoneKey, compareSex, contactLink, contactUri, missionLink, missionUri, zoneLink, zoneUri };
1161
+ export { ALIGNMENT, AlignmentList, Alternates, Archetype, BADGE_REQUIREMENT_TYPE, BADGE_TYPE, Badge, BadgeIndex, BadgeRequirement, BundleHeader, CohContentDatabase, Contact, ENHANCEMENT_CATEGORY, Key, LevelRange, Location, MISSION_TYPE, MORALITY, Mission, MoralityList, SEX, SetTitleIds, ZONE_TYPE, Zone, badgeLink, badgeUri, compareAlignment, compareByDefaultName, compareByReleaseDate, compareByZoneKey, compareSex, contactLink, contactUri, missionLink, missionUri, zoneLink, zoneUri };
1056
1162
  //# sourceMappingURL=coh-content-db.mjs.map