@doodle-engine/core 0.0.8 → 0.0.10

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.
package/dist/core.js CHANGED
@@ -1,441 +1,465 @@
1
- var L = Object.defineProperty;
2
- var x = (n, t, e) => t in n ? L(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var v = (n, t, e) => x(n, typeof t != "symbol" ? t + "" : t, e);
4
- function O(n, t) {
5
- switch (n.type) {
1
+ var x = Object.defineProperty;
2
+ var k = (t, e, n) => e in t ? x(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var T = (t, e, n) => k(t, typeof e != "symbol" ? e + "" : e, n);
4
+ function O(t, e) {
5
+ switch (t.type) {
6
6
  case "hasFlag":
7
- return k(n.flag, t);
7
+ return V(t.flag, e);
8
8
  case "notFlag":
9
- return V(n.flag, t);
9
+ return R(t.flag, e);
10
10
  case "hasItem":
11
- return R(n.itemId, t);
11
+ return D(t.itemId, e);
12
12
  case "variableEquals":
13
- return D(n.variable, n.value, t);
13
+ return P(t.variable, t.value, e);
14
14
  case "variableGreaterThan":
15
- return P(n.variable, n.value, t);
15
+ return $(t.variable, t.value, e);
16
16
  case "variableLessThan":
17
- return $(n.variable, n.value, t);
17
+ return q(t.variable, t.value, e);
18
18
  case "atLocation":
19
- return q(n.locationId, t);
19
+ return F(t.locationId, e);
20
20
  case "questAtStage":
21
- return F(n.questId, n.stageId, t);
21
+ return W(t.questId, t.stageId, e);
22
22
  case "characterAt":
23
- return W(n.characterId, n.locationId, t);
23
+ return M(t.characterId, t.locationId, e);
24
24
  case "characterInParty":
25
- return M(n.characterId, t);
25
+ return G(t.characterId, e);
26
26
  case "relationshipAbove":
27
- return G(n.characterId, n.value, t);
27
+ return H(t.characterId, t.value, e);
28
28
  case "relationshipBelow":
29
- return H(n.characterId, n.value, t);
29
+ return j(t.characterId, t.value, e);
30
30
  case "timeIs":
31
- return j(n.startHour, n.endHour, t);
31
+ return Q(t.startHour, t.endHour, e);
32
32
  case "itemAt":
33
- return Q(n.itemId, n.locationId, t);
33
+ return J(t.itemId, t.locationId, e);
34
34
  default:
35
35
  return !1;
36
36
  }
37
37
  }
38
- function I(n, t) {
39
- return n.every((e) => O(e, t));
38
+ function v(t, e) {
39
+ return t.every((n) => O(n, e));
40
40
  }
41
- function k(n, t) {
42
- return t.flags[n] === !0;
41
+ function V(t, e) {
42
+ return e.flags[t] === !0;
43
43
  }
44
- function V(n, t) {
45
- return t.flags[n] !== !0;
44
+ function R(t, e) {
45
+ return e.flags[t] !== !0;
46
46
  }
47
- function R(n, t) {
48
- return t.inventory.includes(n);
47
+ function D(t, e) {
48
+ return e.inventory.includes(t);
49
49
  }
50
- function D(n, t, e) {
51
- return e.variables[n] === t;
50
+ function P(t, e, n) {
51
+ return n.variables[t] === e;
52
52
  }
53
- function P(n, t, e) {
54
- const r = e.variables[n];
55
- return typeof r == "number" && r > t;
53
+ function $(t, e, n) {
54
+ const r = n.variables[t];
55
+ return typeof r == "number" && r > e;
56
56
  }
57
- function $(n, t, e) {
58
- const r = e.variables[n];
59
- return typeof r == "number" && r < t;
57
+ function q(t, e, n) {
58
+ const r = n.variables[t];
59
+ return typeof r == "number" && r < e;
60
60
  }
61
- function q(n, t) {
62
- return t.currentLocation === n;
61
+ function F(t, e) {
62
+ return e.currentLocation === t;
63
63
  }
64
- function F(n, t, e) {
65
- return e.questProgress[n] === t;
64
+ function W(t, e, n) {
65
+ return n.questProgress[t] === e;
66
66
  }
67
- function W(n, t, e) {
68
- const r = e.characterState[n];
69
- return (r == null ? void 0 : r.location) === t;
67
+ function M(t, e, n) {
68
+ const r = n.characterState[t];
69
+ return (r == null ? void 0 : r.location) === e;
70
70
  }
71
- function M(n, t) {
72
- const e = t.characterState[n];
73
- return (e == null ? void 0 : e.inParty) === !0;
71
+ function G(t, e) {
72
+ const n = e.characterState[t];
73
+ return (n == null ? void 0 : n.inParty) === !0;
74
74
  }
75
- function G(n, t, e) {
76
- const r = e.characterState[n];
77
- return r !== void 0 && r.relationship > t;
75
+ function H(t, e, n) {
76
+ const r = n.characterState[t];
77
+ return r !== void 0 && r.relationship > e;
78
78
  }
79
- function H(n, t, e) {
80
- const r = e.characterState[n];
81
- return r !== void 0 && r.relationship < t;
79
+ function j(t, e, n) {
80
+ const r = n.characterState[t];
81
+ return r !== void 0 && r.relationship < e;
82
82
  }
83
- function j(n, t, e) {
84
- const r = e.currentTime.hour;
85
- return n < t ? r >= n && r < t : r >= n || r < t;
83
+ function Q(t, e, n) {
84
+ const r = n.currentTime.hour;
85
+ return t < e ? r >= t && r < e : r >= t || r < e;
86
86
  }
87
- function Q(n, t, e) {
88
- return e.itemLocations[n] === t;
87
+ function J(t, e, n) {
88
+ return n.itemLocations[t] === e;
89
89
  }
90
- function J(n, t) {
91
- switch (n.type) {
90
+ function U(t, e) {
91
+ switch (t.type) {
92
92
  case "setFlag":
93
- return U(n.flag, t);
93
+ return B(t.flag, e);
94
94
  case "clearFlag":
95
- return B(n.flag, t);
95
+ return _(t.flag, e);
96
96
  case "setVariable":
97
- return _(n.variable, n.value, t);
97
+ return z(t.variable, t.value, e);
98
98
  case "addVariable":
99
- return z(n.variable, n.value, t);
99
+ return Y(t.variable, t.value, e);
100
100
  case "addItem":
101
- return Y(n.itemId, t);
101
+ return K(t.itemId, e);
102
102
  case "removeItem":
103
- return K(n.itemId, t);
103
+ return X(t.itemId, e);
104
104
  case "moveItem":
105
- return X(n.itemId, n.locationId, t);
105
+ return Z(t.itemId, t.locationId, e);
106
106
  case "goToLocation":
107
- return Z(n.locationId, t);
107
+ return ee(t.locationId, e);
108
108
  case "advanceTime":
109
- return tt(n.hours, t);
109
+ return te(t.hours, e);
110
110
  case "setQuestStage":
111
- return et(n.questId, n.stageId, t);
111
+ return ne(t.questId, t.stageId, e);
112
112
  case "addJournalEntry":
113
- return nt(n.entryId, t);
113
+ return re(t.entryId, e);
114
114
  case "startDialogue":
115
- return rt(n.dialogueId, t);
115
+ return ae(t.dialogueId, e);
116
116
  case "endDialogue":
117
- return at(t);
117
+ return ie(e);
118
118
  case "setCharacterLocation":
119
- return it(n.characterId, n.locationId, t);
119
+ return se(t.characterId, t.locationId, e);
120
120
  case "addToParty":
121
- return st(n.characterId, t);
121
+ return oe(t.characterId, e);
122
122
  case "removeFromParty":
123
- return ot(n.characterId, t);
123
+ return le(t.characterId, e);
124
124
  case "setRelationship":
125
- return ct(n.characterId, n.value, t);
125
+ return ce(t.characterId, t.value, e);
126
126
  case "addRelationship":
127
- return lt(n.characterId, n.value, t);
127
+ return ue(t.characterId, t.value, e);
128
128
  case "setCharacterStat":
129
- return ut(n.characterId, n.stat, n.value, t);
129
+ return de(t.characterId, t.stat, t.value, e);
130
130
  case "addCharacterStat":
131
- return dt(n.characterId, n.stat, n.value, t);
131
+ return he(t.characterId, t.stat, t.value, e);
132
132
  case "setMapEnabled":
133
- return ht(n.enabled, t);
133
+ return pe(t.enabled, e);
134
134
  case "playMusic":
135
- return t;
135
+ return e;
136
136
  case "playSound":
137
- return gt(n.sound, t);
137
+ return fe(t.sound, e);
138
138
  case "notify":
139
- return pt(n.message, t);
139
+ return ge(t.message, e);
140
140
  case "playVideo":
141
- return ft(n.file, t);
141
+ return me(t.file, e);
142
+ case "showInterlude":
143
+ return be(t.interludeId, e);
142
144
  default:
143
- return t;
145
+ return e;
144
146
  }
145
147
  }
146
- function y(n, t) {
147
- return n.reduce((e, r) => J(r, e), t);
148
+ function S(t, e) {
149
+ return t.reduce((n, r) => U(r, n), e);
148
150
  }
149
- function U(n, t) {
151
+ function B(t, e) {
150
152
  return {
151
- ...t,
153
+ ...e,
152
154
  flags: {
153
- ...t.flags,
154
- [n]: !0
155
+ ...e.flags,
156
+ [t]: !0
155
157
  }
156
158
  };
157
159
  }
158
- function B(n, t) {
160
+ function _(t, e) {
159
161
  return {
160
- ...t,
162
+ ...e,
161
163
  flags: {
162
- ...t.flags,
163
- [n]: !1
164
+ ...e.flags,
165
+ [t]: !1
164
166
  }
165
167
  };
166
168
  }
167
- function _(n, t, e) {
169
+ function z(t, e, n) {
168
170
  return {
169
- ...e,
171
+ ...n,
170
172
  variables: {
171
- ...e.variables,
172
- [n]: t
173
+ ...n.variables,
174
+ [t]: e
173
175
  }
174
176
  };
175
177
  }
176
- function z(n, t, e) {
177
- const r = e.variables[n], a = typeof r == "number" ? r + t : t;
178
+ function Y(t, e, n) {
179
+ const r = n.variables[t], a = typeof r == "number" ? r + e : e;
178
180
  return {
179
- ...e,
181
+ ...n,
180
182
  variables: {
181
- ...e.variables,
182
- [n]: a
183
+ ...n.variables,
184
+ [t]: a
183
185
  }
184
186
  };
185
187
  }
186
- function Y(n, t) {
187
- return t.inventory.includes(n) ? t : {
188
- ...t,
189
- inventory: [...t.inventory, n],
188
+ function K(t, e) {
189
+ return e.inventory.includes(t) ? e : {
190
+ ...e,
191
+ inventory: [...e.inventory, t],
190
192
  itemLocations: {
191
- ...t.itemLocations,
192
- [n]: "inventory"
193
+ ...e.itemLocations,
194
+ [t]: "inventory"
193
195
  }
194
196
  };
195
197
  }
196
- function K(n, t) {
198
+ function X(t, e) {
197
199
  return {
198
- ...t,
199
- inventory: t.inventory.filter((e) => e !== n)
200
+ ...e,
201
+ inventory: e.inventory.filter((n) => n !== t)
200
202
  // Note: itemLocation is NOT updated here - the item stays at "inventory"
201
203
  // or wherever it was. Use moveItem to relocate it.
202
204
  };
203
205
  }
204
- function X(n, t, e) {
206
+ function Z(t, e, n) {
205
207
  return {
206
- ...e,
207
- inventory: e.inventory.filter((r) => r !== n),
208
+ ...n,
209
+ inventory: n.inventory.filter((r) => r !== t),
208
210
  itemLocations: {
209
- ...e.itemLocations,
210
- [n]: t
211
+ ...n.itemLocations,
212
+ [t]: e
211
213
  }
212
214
  };
213
215
  }
214
- function Z(n, t) {
216
+ function ee(t, e) {
215
217
  return {
216
- ...t,
217
- currentLocation: n
218
+ ...e,
219
+ currentLocation: t
218
220
  };
219
221
  }
220
- function tt(n, t) {
221
- const e = t.currentTime.hour + n, r = Math.floor(e / 24), a = e % 24;
222
+ function te(t, e) {
223
+ const n = e.currentTime.hour + t, r = Math.floor(n / 24), a = n % 24;
222
224
  return {
223
- ...t,
225
+ ...e,
224
226
  currentTime: {
225
- day: t.currentTime.day + r,
227
+ day: e.currentTime.day + r,
226
228
  hour: a
227
229
  }
228
230
  };
229
231
  }
230
- function et(n, t, e) {
232
+ function ne(t, e, n) {
231
233
  return {
232
- ...e,
234
+ ...n,
233
235
  questProgress: {
234
- ...e.questProgress,
235
- [n]: t
236
+ ...n.questProgress,
237
+ [t]: e
236
238
  }
237
239
  };
238
240
  }
239
- function nt(n, t) {
240
- return t.unlockedJournalEntries.includes(n) ? t : {
241
- ...t,
242
- unlockedJournalEntries: [...t.unlockedJournalEntries, n]
241
+ function re(t, e) {
242
+ return e.unlockedJournalEntries.includes(t) ? e : {
243
+ ...e,
244
+ unlockedJournalEntries: [...e.unlockedJournalEntries, t]
243
245
  };
244
246
  }
245
- function rt(n, t) {
247
+ function ae(t, e) {
246
248
  return {
247
- ...t,
249
+ ...e,
248
250
  dialogueState: {
249
- dialogueId: n,
251
+ dialogueId: t,
250
252
  nodeId: ""
251
253
  // Will be set by engine when it looks up the dialogue
252
254
  }
253
255
  };
254
256
  }
255
- function at(n) {
257
+ function ie(t) {
256
258
  return {
257
- ...n,
259
+ ...t,
258
260
  dialogueState: null
259
261
  };
260
262
  }
261
- function it(n, t, e) {
262
- const r = e.characterState[n];
263
+ function se(t, e, n) {
264
+ const r = n.characterState[t];
263
265
  return r ? {
264
- ...e,
266
+ ...n,
265
267
  characterState: {
266
- ...e.characterState,
267
- [n]: {
268
+ ...n.characterState,
269
+ [t]: {
268
270
  ...r,
269
- location: t
271
+ location: e
270
272
  }
271
273
  }
272
- } : e;
274
+ } : n;
273
275
  }
274
- function st(n, t) {
275
- const e = t.characterState[n];
276
- return e ? {
277
- ...t,
276
+ function oe(t, e) {
277
+ const n = e.characterState[t];
278
+ return n ? {
279
+ ...e,
278
280
  characterState: {
279
- ...t.characterState,
280
- [n]: {
281
- ...e,
281
+ ...e.characterState,
282
+ [t]: {
283
+ ...n,
282
284
  inParty: !0
283
285
  }
284
286
  }
285
- } : t;
287
+ } : e;
286
288
  }
287
- function ot(n, t) {
288
- const e = t.characterState[n];
289
- return e ? {
290
- ...t,
289
+ function le(t, e) {
290
+ const n = e.characterState[t];
291
+ return n ? {
292
+ ...e,
291
293
  characterState: {
292
- ...t.characterState,
293
- [n]: {
294
- ...e,
294
+ ...e.characterState,
295
+ [t]: {
296
+ ...n,
295
297
  inParty: !1
296
298
  }
297
299
  }
298
- } : t;
300
+ } : e;
299
301
  }
300
- function ct(n, t, e) {
301
- const r = e.characterState[n];
302
+ function ce(t, e, n) {
303
+ const r = n.characterState[t];
302
304
  return r ? {
303
- ...e,
305
+ ...n,
304
306
  characterState: {
305
- ...e.characterState,
306
- [n]: {
307
+ ...n.characterState,
308
+ [t]: {
307
309
  ...r,
308
- relationship: t
310
+ relationship: e
309
311
  }
310
312
  }
311
- } : e;
313
+ } : n;
312
314
  }
313
- function lt(n, t, e) {
314
- const r = e.characterState[n];
315
+ function ue(t, e, n) {
316
+ const r = n.characterState[t];
315
317
  return r ? {
316
- ...e,
318
+ ...n,
317
319
  characterState: {
318
- ...e.characterState,
319
- [n]: {
320
+ ...n.characterState,
321
+ [t]: {
320
322
  ...r,
321
- relationship: r.relationship + t
323
+ relationship: r.relationship + e
322
324
  }
323
325
  }
324
- } : e;
326
+ } : n;
325
327
  }
326
- function ut(n, t, e, r) {
327
- const a = r.characterState[n];
328
+ function de(t, e, n, r) {
329
+ const a = r.characterState[t];
328
330
  return a ? {
329
331
  ...r,
330
332
  characterState: {
331
333
  ...r.characterState,
332
- [n]: {
334
+ [t]: {
333
335
  ...a,
334
336
  stats: {
335
337
  ...a.stats,
336
- [t]: e
338
+ [e]: n
337
339
  }
338
340
  }
339
341
  }
340
342
  } : r;
341
343
  }
342
- function dt(n, t, e, r) {
343
- const a = r.characterState[n];
344
+ function he(t, e, n, r) {
345
+ const a = r.characterState[t];
344
346
  if (!a)
345
347
  return r;
346
- const s = a.stats[t], i = typeof s == "number" ? s + e : e;
348
+ const s = a.stats[e], i = typeof s == "number" ? s + n : n;
347
349
  return {
348
350
  ...r,
349
351
  characterState: {
350
352
  ...r.characterState,
351
- [n]: {
353
+ [t]: {
352
354
  ...a,
353
355
  stats: {
354
356
  ...a.stats,
355
- [t]: i
357
+ [e]: i
356
358
  }
357
359
  }
358
360
  }
359
361
  };
360
362
  }
361
- function ht(n, t) {
363
+ function pe(t, e) {
362
364
  return {
363
- ...t,
364
- mapEnabled: n
365
+ ...e,
366
+ mapEnabled: t
365
367
  };
366
368
  }
367
- function pt(n, t) {
369
+ function ge(t, e) {
368
370
  return {
369
- ...t,
370
- notifications: [...t.notifications, n]
371
+ ...e,
372
+ notifications: [...e.notifications, t]
371
373
  };
372
374
  }
373
- function gt(n, t) {
375
+ function fe(t, e) {
374
376
  return {
375
- ...t,
376
- pendingSounds: [...t.pendingSounds, n]
377
+ ...e,
378
+ pendingSounds: [...e.pendingSounds, t]
377
379
  };
378
380
  }
379
- function ft(n, t) {
381
+ function me(t, e) {
380
382
  return {
381
- ...t,
382
- pendingVideo: n
383
+ ...e,
384
+ pendingVideo: t
383
385
  };
384
386
  }
385
- function A(n, t) {
386
- if (!n.startsWith("@"))
387
- return n;
388
- const e = n.slice(1);
389
- return t[e] ?? n;
390
- }
391
- function kt(n) {
392
- return (t) => A(t, n);
387
+ function be(t, e) {
388
+ return {
389
+ ...e,
390
+ pendingInterlude: t
391
+ };
393
392
  }
394
- function mt(n, t) {
395
- const e = t.locales[n.currentLocale] ?? {}, r = (C) => A(C, e), a = bt(n.currentLocation, t, r), s = yt(n, t, r), i = St(n, t, r), { dialogue: o, choices: c } = vt(n, t, r), l = It(n, t, r), d = Tt(n, t, r), f = Nt(n, t, r), m = Et(n, t, r), u = n.mapEnabled ? At(n, t, r) : null, g = t.locations[n.currentLocation], h = (g == null ? void 0 : g.music) ?? "", p = (g == null ? void 0 : g.ambient) ?? "", b = n.notifications.map(r), S = [...n.pendingSounds], w = n.pendingVideo;
393
+ function C(t, e) {
394
+ if (!t.startsWith("@"))
395
+ return t;
396
+ const n = t.slice(1);
397
+ return e[n] ?? t;
398
+ }
399
+ function Re(t) {
400
+ return (e) => C(e, t);
401
+ }
402
+ function ye(t, e) {
403
+ const n = e.locales[t.currentLocale] ?? {}, r = (m) => C(m, n), a = Se(t.currentLocation, e, r), s = ve(t, e, r), i = Ie(t, e, r), { dialogue: o, choices: l } = Te(t, e, r), c = Ne(t, e, r), d = Ee(t, e, r), f = Ae(t, e, r), b = we(t, e, r), u = t.mapEnabled ? Ce(t, e, r) : null, g = e.locations[t.currentLocation], h = (g == null ? void 0 : g.music) ?? "", p = (g == null ? void 0 : g.ambient) ?? "", y = t.notifications.map(r), I = [...t.pendingSounds], L = t.pendingVideo;
404
+ let w = null;
405
+ if (t.pendingInterlude) {
406
+ const m = e.interludes[t.pendingInterlude];
407
+ m && (w = {
408
+ id: m.id,
409
+ background: m.background,
410
+ banner: m.banner,
411
+ music: m.music,
412
+ voice: m.voice,
413
+ sounds: m.sounds,
414
+ scroll: m.scroll ?? !0,
415
+ scrollSpeed: m.scrollSpeed ?? 30,
416
+ text: r(m.text)
417
+ });
418
+ }
396
419
  return {
397
420
  location: a,
398
421
  charactersHere: s,
399
422
  itemsHere: i,
400
- choices: c,
423
+ choices: l,
401
424
  dialogue: o,
402
- party: l,
425
+ party: c,
403
426
  inventory: d,
404
427
  quests: f,
405
- journal: m,
406
- variables: { ...n.variables },
407
- time: n.currentTime,
428
+ journal: b,
429
+ variables: { ...t.variables },
430
+ time: t.currentTime,
408
431
  map: u,
409
432
  music: h,
410
433
  ambient: p,
411
- notifications: b,
412
- pendingSounds: S,
413
- pendingVideo: w
434
+ notifications: y,
435
+ pendingSounds: I,
436
+ pendingVideo: L,
437
+ pendingInterlude: w
414
438
  };
415
439
  }
416
- function bt(n, t, e) {
417
- const r = t.locations[n];
440
+ function Se(t, e, n) {
441
+ const r = e.locations[t];
418
442
  return r ? {
419
443
  id: r.id,
420
- name: e(r.name),
421
- description: e(r.description),
444
+ name: n(r.name),
445
+ description: n(r.description),
422
446
  banner: r.banner
423
447
  } : {
424
- id: n,
425
- name: n,
426
- description: `Location not found: ${n}`,
448
+ id: t,
449
+ name: t,
450
+ description: `Location not found: ${t}`,
427
451
  banner: ""
428
452
  };
429
453
  }
430
- function yt(n, t, e) {
454
+ function ve(t, e, n) {
431
455
  const r = [];
432
- for (const [a, s] of Object.entries(n.characterState))
433
- if (s.location === n.currentLocation) {
434
- const i = t.characters[a];
456
+ for (const [a, s] of Object.entries(t.characterState))
457
+ if (s.location === t.currentLocation) {
458
+ const i = e.characters[a];
435
459
  i && r.push({
436
460
  id: i.id,
437
- name: e(i.name),
438
- biography: e(i.biography),
461
+ name: n(i.name),
462
+ biography: n(i.biography),
439
463
  portrait: i.portrait,
440
464
  location: s.location,
441
465
  inParty: s.inParty,
@@ -445,15 +469,15 @@ function yt(n, t, e) {
445
469
  }
446
470
  return r;
447
471
  }
448
- function St(n, t, e) {
472
+ function Ie(t, e, n) {
449
473
  const r = [];
450
- for (const [a, s] of Object.entries(n.itemLocations))
451
- if (s === n.currentLocation) {
452
- const i = t.items[a];
474
+ for (const [a, s] of Object.entries(t.itemLocations))
475
+ if (s === t.currentLocation) {
476
+ const i = e.items[a];
453
477
  i && r.push({
454
478
  id: i.id,
455
- name: e(i.name),
456
- description: e(i.description),
479
+ name: n(i.name),
480
+ description: n(i.description),
457
481
  icon: i.icon,
458
482
  image: i.image,
459
483
  stats: i.stats
@@ -461,40 +485,40 @@ function St(n, t, e) {
461
485
  }
462
486
  return r;
463
487
  }
464
- function vt(n, t, e) {
465
- var c, l;
466
- if (!n.dialogueState)
488
+ function Te(t, e, n) {
489
+ var l, c;
490
+ if (!t.dialogueState)
467
491
  return { dialogue: null, choices: [] };
468
- const r = t.dialogues[n.dialogueState.dialogueId];
492
+ const r = e.dialogues[t.dialogueState.dialogueId];
469
493
  if (!r)
470
494
  return { dialogue: null, choices: [] };
471
495
  const a = r.nodes.find((d) => {
472
496
  var f;
473
- return d.id === ((f = n.dialogueState) == null ? void 0 : f.nodeId);
497
+ return d.id === ((f = t.dialogueState) == null ? void 0 : f.nodeId);
474
498
  });
475
499
  if (!a)
476
500
  return { dialogue: null, choices: [] };
477
- const s = a.speaker ? e(((c = t.characters[a.speaker]) == null ? void 0 : c.name) ?? a.speaker) : "Narrator", i = {
501
+ const s = a.speaker ? n(((l = e.characters[a.speaker]) == null ? void 0 : l.name) ?? a.speaker) : "Narrator", i = {
478
502
  speaker: a.speaker,
479
503
  speakerName: s,
480
- text: e(a.text),
481
- portrait: a.portrait ?? ((l = t.characters[a.speaker ?? ""]) == null ? void 0 : l.portrait),
504
+ text: n(a.text),
505
+ portrait: a.portrait ?? ((c = e.characters[a.speaker ?? ""]) == null ? void 0 : c.portrait),
482
506
  voice: a.voice
483
- }, o = a.choices.filter((d) => !d.conditions || d.conditions.length === 0 ? !0 : I(d.conditions, n)).map((d) => ({
507
+ }, o = a.choices.filter((d) => !d.conditions || d.conditions.length === 0 ? !0 : v(d.conditions, t)).map((d) => ({
484
508
  id: d.id,
485
- text: e(d.text)
509
+ text: n(d.text)
486
510
  }));
487
511
  return { dialogue: i, choices: o };
488
512
  }
489
- function It(n, t, e) {
513
+ function Ne(t, e, n) {
490
514
  const r = [];
491
- for (const [a, s] of Object.entries(n.characterState))
515
+ for (const [a, s] of Object.entries(t.characterState))
492
516
  if (s.inParty) {
493
- const i = t.characters[a];
517
+ const i = e.characters[a];
494
518
  i && r.push({
495
519
  id: i.id,
496
- name: e(i.name),
497
- biography: e(i.biography),
520
+ name: n(i.name),
521
+ biography: n(i.biography),
498
522
  portrait: i.portrait,
499
523
  location: s.location,
500
524
  inParty: s.inParty,
@@ -504,80 +528,80 @@ function It(n, t, e) {
504
528
  }
505
529
  return r;
506
530
  }
507
- function Tt(n, t, e) {
508
- return n.inventory.map((r) => {
509
- const a = t.items[r];
531
+ function Ee(t, e, n) {
532
+ return t.inventory.map((r) => {
533
+ const a = e.items[r];
510
534
  return a ? {
511
535
  id: a.id,
512
- name: e(a.name),
513
- description: e(a.description),
536
+ name: n(a.name),
537
+ description: n(a.description),
514
538
  icon: a.icon,
515
539
  image: a.image,
516
540
  stats: a.stats
517
541
  } : null;
518
542
  }).filter((r) => r !== null);
519
543
  }
520
- function Nt(n, t, e) {
544
+ function Ae(t, e, n) {
521
545
  const r = [];
522
- for (const [a, s] of Object.entries(n.questProgress)) {
523
- const i = t.quests[a];
546
+ for (const [a, s] of Object.entries(t.questProgress)) {
547
+ const i = e.quests[a];
524
548
  if (!i) continue;
525
- const o = i.stages.find((c) => c.id === s);
549
+ const o = i.stages.find((l) => l.id === s);
526
550
  o && r.push({
527
551
  id: i.id,
528
- name: e(i.name),
529
- description: e(i.description),
552
+ name: n(i.name),
553
+ description: n(i.description),
530
554
  currentStage: o.id,
531
- currentStageDescription: e(o.description)
555
+ currentStageDescription: n(o.description)
532
556
  });
533
557
  }
534
558
  return r;
535
559
  }
536
- function Et(n, t, e) {
537
- return n.unlockedJournalEntries.map((r) => {
538
- const a = t.journalEntries[r];
560
+ function we(t, e, n) {
561
+ return t.unlockedJournalEntries.map((r) => {
562
+ const a = e.journalEntries[r];
539
563
  return a ? {
540
564
  id: a.id,
541
- title: e(a.title),
542
- text: e(a.text),
565
+ title: n(a.title),
566
+ text: n(a.text),
543
567
  category: a.category
544
568
  } : null;
545
569
  }).filter((r) => r !== null);
546
570
  }
547
- function At(n, t, e) {
548
- const r = Object.keys(t.maps);
571
+ function Ce(t, e, n) {
572
+ const r = Object.keys(e.maps);
549
573
  if (r.length === 0) return null;
550
- const a = t.maps[r[0]];
574
+ const a = e.maps[r[0]];
551
575
  if (!a) return null;
552
576
  const s = a.locations.map((i) => {
553
- const o = t.locations[i.id];
577
+ const o = e.locations[i.id];
554
578
  return {
555
579
  id: i.id,
556
- name: o ? e(o.name) : i.id,
580
+ name: o ? n(o.name) : i.id,
557
581
  x: i.x,
558
582
  y: i.y,
559
- isCurrent: i.id === n.currentLocation
583
+ isCurrent: i.id === t.currentLocation
560
584
  };
561
585
  });
562
586
  return {
563
587
  id: a.id,
564
- name: e(a.name),
588
+ name: n(a.name),
565
589
  image: a.image,
566
590
  scale: a.scale,
567
591
  locations: s
568
592
  };
569
593
  }
570
- class Vt {
594
+ class De {
571
595
  /**
572
596
  * Create a new engine instance.
573
597
  *
574
598
  * @param registry - Content registry with all game entities
575
599
  * @param state - Initial game state
576
600
  */
577
- constructor(t, e) {
578
- v(this, "registry");
579
- v(this, "state");
580
- this.registry = t, this.state = e;
601
+ constructor(e, n) {
602
+ T(this, "registry");
603
+ T(this, "state");
604
+ this.registry = e, this.state = n;
581
605
  }
582
606
  // ===========================================================================
583
607
  // Core API Methods
@@ -590,10 +614,10 @@ class Vt {
590
614
  * @param config - Game configuration with starting conditions
591
615
  * @returns Initial snapshot
592
616
  */
593
- newGame(t) {
594
- const e = {};
617
+ newGame(e) {
618
+ const n = {};
595
619
  for (const [a, s] of Object.entries(this.registry.characters))
596
- e[a] = {
620
+ n[a] = {
597
621
  location: s.location,
598
622
  inParty: !1,
599
623
  relationship: 0,
@@ -604,24 +628,25 @@ class Vt {
604
628
  for (const [a, s] of Object.entries(this.registry.items))
605
629
  r[a] = s.location;
606
630
  return this.state = {
607
- currentLocation: t.startLocation,
608
- currentTime: { ...t.startTime },
609
- flags: { ...t.startFlags },
610
- variables: { ...t.startVariables },
611
- inventory: [...t.startInventory],
631
+ currentLocation: e.startLocation,
632
+ currentTime: { ...e.startTime },
633
+ flags: { ...e.startFlags },
634
+ variables: { ...e.startVariables },
635
+ inventory: [...e.startInventory],
612
636
  questProgress: {},
613
637
  unlockedJournalEntries: [],
614
638
  playerNotes: [],
615
639
  dialogueState: null,
616
- characterState: e,
640
+ characterState: n,
617
641
  itemLocations: r,
618
642
  mapEnabled: !0,
619
643
  notifications: [],
620
644
  pendingSounds: [],
621
645
  pendingVideo: null,
646
+ pendingInterlude: null,
622
647
  currentLocale: "en"
623
648
  // Default locale
624
- }, this.checkTriggeredDialogues(), this.buildSnapshotAndClearTransients();
649
+ }, this.checkTriggeredDialogues(), this.checkTriggeredInterludes(), this.buildSnapshotAndClearTransients();
625
650
  }
626
651
  /**
627
652
  * Load a game from save data.
@@ -631,8 +656,8 @@ class Vt {
631
656
  * @param saveData - Saved game data
632
657
  * @returns Snapshot of the loaded game
633
658
  */
634
- loadGame(t) {
635
- return this.state = { ...t.state }, this.buildSnapshotAndClearTransients();
659
+ loadGame(e) {
660
+ return this.state = { ...e.state }, this.buildSnapshotAndClearTransients();
636
661
  }
637
662
  /**
638
663
  * Save the current game state.
@@ -656,23 +681,23 @@ class Vt {
656
681
  * @param choiceId - ID of the selected choice
657
682
  * @returns New snapshot after processing the choice
658
683
  */
659
- selectChoice(t) {
684
+ selectChoice(e) {
660
685
  if (!this.state.dialogueState)
661
686
  return this.buildSnapshotAndClearTransients();
662
- const e = this.registry.dialogues[this.state.dialogueState.dialogueId];
663
- if (!e)
687
+ const n = this.registry.dialogues[this.state.dialogueState.dialogueId];
688
+ if (!n)
664
689
  return this.buildSnapshotAndClearTransients();
665
- const r = e.nodes.find((i) => {
690
+ const r = n.nodes.find((i) => {
666
691
  var o;
667
692
  return i.id === ((o = this.state.dialogueState) == null ? void 0 : o.nodeId);
668
693
  });
669
694
  if (!r)
670
695
  return this.buildSnapshotAndClearTransients();
671
- const a = r.choices.find((i) => i.id === t);
696
+ const a = r.choices.find((i) => i.id === e);
672
697
  if (!a)
673
698
  return this.buildSnapshotAndClearTransients();
674
- a.effects && (this.state = y(a.effects, this.state));
675
- const s = e.nodes.find((i) => i.id === a.next);
699
+ a.effects && (this.state = S(a.effects, this.state));
700
+ const s = n.nodes.find((i) => i.id === a.next);
676
701
  if (!s)
677
702
  return this.state = {
678
703
  ...this.state,
@@ -681,15 +706,15 @@ class Vt {
681
706
  if (this.state = {
682
707
  ...this.state,
683
708
  dialogueState: {
684
- dialogueId: e.id,
709
+ dialogueId: n.id,
685
710
  nodeId: s.id
686
711
  }
687
- }, s.effects && (this.state = y(s.effects, this.state)), s.choices.length === 0) {
712
+ }, s.effects && (this.state = S(s.effects, this.state)), s.choices.length === 0) {
688
713
  const i = this.resolveNextNode(s);
689
714
  i ? this.state = {
690
715
  ...this.state,
691
716
  dialogueState: {
692
- dialogueId: e.id,
717
+ dialogueId: n.id,
693
718
  nodeId: i
694
719
  }
695
720
  } : this.state = {
@@ -707,11 +732,11 @@ class Vt {
707
732
  * @param characterId - ID of the character to talk to
708
733
  * @returns New snapshot with dialogue started
709
734
  */
710
- talkTo(t) {
711
- const e = this.registry.characters[t];
712
- if (!e || !e.dialogue)
735
+ talkTo(e) {
736
+ const n = this.registry.characters[e];
737
+ if (!n || !n.dialogue)
713
738
  return this.buildSnapshotAndClearTransients();
714
- const r = this.registry.dialogues[e.dialogue];
739
+ const r = this.registry.dialogues[n.dialogue];
715
740
  if (!r)
716
741
  return this.buildSnapshotAndClearTransients();
717
742
  const a = r.nodes.find((s) => s.id === r.startNode);
@@ -723,7 +748,7 @@ class Vt {
723
748
  dialogueId: r.id,
724
749
  nodeId: a.id
725
750
  }
726
- }, a.effects && (this.state = y(a.effects, this.state)), a.choices.length === 0) {
751
+ }, a.effects && (this.state = S(a.effects, this.state)), a.choices.length === 0) {
727
752
  const s = this.resolveNextNode(a);
728
753
  s ? this.state = {
729
754
  ...this.state,
@@ -746,13 +771,13 @@ class Vt {
746
771
  * @param itemId - ID of the item to take
747
772
  * @returns New snapshot with item in inventory
748
773
  */
749
- takeItem(t) {
750
- return this.state.itemLocations[t] !== this.state.currentLocation ? this.buildSnapshotAndClearTransients() : (this.state = {
774
+ takeItem(e) {
775
+ return this.state.itemLocations[e] !== this.state.currentLocation ? this.buildSnapshotAndClearTransients() : (this.state = {
751
776
  ...this.state,
752
- inventory: [...this.state.inventory, t],
777
+ inventory: [...this.state.inventory, e],
753
778
  itemLocations: {
754
779
  ...this.state.itemLocations,
755
- [t]: "inventory"
780
+ [e]: "inventory"
756
781
  }
757
782
  }, this.buildSnapshotAndClearTransients());
758
783
  }
@@ -764,30 +789,30 @@ class Vt {
764
789
  * @param locationId - ID of the destination location
765
790
  * @returns New snapshot at the new location
766
791
  */
767
- travelTo(t) {
792
+ travelTo(e) {
768
793
  if (!this.state.mapEnabled)
769
794
  return this.buildSnapshotAndClearTransients();
770
- const e = Object.keys(this.registry.maps);
771
- if (e.length === 0)
795
+ const n = Object.keys(this.registry.maps);
796
+ if (n.length === 0)
772
797
  return this.buildSnapshotAndClearTransients();
773
- const r = this.registry.maps[e[0]];
798
+ const r = this.registry.maps[n[0]];
774
799
  if (!r)
775
800
  return this.buildSnapshotAndClearTransients();
776
- const a = r.locations.find((f) => f.id === this.state.currentLocation), s = r.locations.find((f) => f.id === t);
801
+ const a = r.locations.find((f) => f.id === this.state.currentLocation), s = r.locations.find((f) => f.id === e);
777
802
  if (!a || !s)
778
803
  return this.buildSnapshotAndClearTransients();
779
804
  const i = Math.sqrt(
780
805
  Math.pow(s.x - a.x, 2) + Math.pow(s.y - a.y, 2)
781
- ), o = Math.round(i * r.scale), c = this.state.currentTime.hour + o, l = Math.floor(c / 24), d = c % 24;
806
+ ), o = Math.round(i * r.scale), l = this.state.currentTime.hour + o, c = Math.floor(l / 24), d = l % 24;
782
807
  return this.state = {
783
808
  ...this.state,
784
- currentLocation: t,
809
+ currentLocation: e,
785
810
  dialogueState: null,
786
811
  currentTime: {
787
- day: this.state.currentTime.day + l,
812
+ day: this.state.currentTime.day + c,
788
813
  hour: d
789
814
  }
790
- }, this.checkTriggeredDialogues(), this.buildSnapshotAndClearTransients();
815
+ }, this.checkTriggeredDialogues(), this.checkTriggeredInterludes(), this.buildSnapshotAndClearTransients();
791
816
  }
792
817
  /**
793
818
  * Player wrote a note.
@@ -798,11 +823,11 @@ class Vt {
798
823
  * @param text - Note content
799
824
  * @returns New snapshot with note added
800
825
  */
801
- writeNote(t, e) {
826
+ writeNote(e, n) {
802
827
  const r = {
803
828
  id: `note_${Date.now()}`,
804
- title: t,
805
- text: e
829
+ title: e,
830
+ text: n
806
831
  };
807
832
  return this.state = {
808
833
  ...this.state,
@@ -817,10 +842,10 @@ class Vt {
817
842
  * @param noteId - ID of the note to delete
818
843
  * @returns New snapshot with note removed
819
844
  */
820
- deleteNote(t) {
845
+ deleteNote(e) {
821
846
  return this.state = {
822
847
  ...this.state,
823
- playerNotes: this.state.playerNotes.filter((e) => e.id !== t)
848
+ playerNotes: this.state.playerNotes.filter((n) => n.id !== e)
824
849
  }, this.buildSnapshotAndClearTransients();
825
850
  }
826
851
  /**
@@ -831,10 +856,10 @@ class Vt {
831
856
  * @param locale - Language code (e.g., "en", "es")
832
857
  * @returns New snapshot with updated locale
833
858
  */
834
- setLocale(t) {
859
+ setLocale(e) {
835
860
  return this.state = {
836
861
  ...this.state,
837
- currentLocale: t
862
+ currentLocale: e
838
863
  }, this.buildSnapshotAndClearTransients();
839
864
  }
840
865
  /**
@@ -855,13 +880,14 @@ class Vt {
855
880
  * Transient state is data that should only appear in one snapshot.
856
881
  */
857
882
  buildSnapshotAndClearTransients() {
858
- const t = mt(this.state, this.registry);
883
+ const e = ye(this.state, this.registry);
859
884
  return this.state = {
860
885
  ...this.state,
861
886
  notifications: [],
862
887
  pendingSounds: [],
863
- pendingVideo: null
864
- }, t;
888
+ pendingVideo: null,
889
+ pendingInterlude: null
890
+ }, e;
865
891
  }
866
892
  /**
867
893
  * Resolve the next node ID from a dialogue node.
@@ -873,13 +899,13 @@ class Vt {
873
899
  * @param node - The dialogue node to resolve next from
874
900
  * @returns Next node ID, or null to end dialogue
875
901
  */
876
- resolveNextNode(t) {
877
- if (t.conditionalNext && t.conditionalNext.length > 0) {
878
- for (const e of t.conditionalNext)
879
- if (I([e.condition], this.state))
880
- return e.next;
902
+ resolveNextNode(e) {
903
+ if (e.conditionalNext && e.conditionalNext.length > 0) {
904
+ for (const n of e.conditionalNext)
905
+ if (v([n.condition], this.state))
906
+ return n.next;
881
907
  }
882
- return t.next ?? null;
908
+ return e.next ?? null;
883
909
  }
884
910
  /**
885
911
  * Check for dialogues that should auto-trigger at the current location.
@@ -890,23 +916,23 @@ class Vt {
890
916
  * This is called after location changes (newGame, travelTo).
891
917
  */
892
918
  checkTriggeredDialogues() {
893
- for (const t of Object.values(this.registry.dialogues)) {
894
- if (t.triggerLocation !== this.state.currentLocation || t.conditions && !I(t.conditions, this.state))
919
+ for (const e of Object.values(this.registry.dialogues)) {
920
+ if (e.triggerLocation !== this.state.currentLocation || e.conditions && !v(e.conditions, this.state))
895
921
  continue;
896
- const e = t.nodes.find((r) => r.id === t.startNode);
897
- if (e) {
922
+ const n = e.nodes.find((r) => r.id === e.startNode);
923
+ if (n) {
898
924
  if (this.state = {
899
925
  ...this.state,
900
926
  dialogueState: {
901
- dialogueId: t.id,
902
- nodeId: e.id
927
+ dialogueId: e.id,
928
+ nodeId: n.id
903
929
  }
904
- }, e.effects && (this.state = y(e.effects, this.state)), e.choices.length === 0) {
905
- const r = this.resolveNextNode(e);
930
+ }, n.effects && (this.state = S(n.effects, this.state)), n.choices.length === 0) {
931
+ const r = this.resolveNextNode(n);
906
932
  r ? this.state = {
907
933
  ...this.state,
908
934
  dialogueState: {
909
- dialogueId: t.id,
935
+ dialogueId: e.id,
910
936
  nodeId: r
911
937
  }
912
938
  } : this.state = {
@@ -918,211 +944,231 @@ class Vt {
918
944
  }
919
945
  }
920
946
  }
947
+ /**
948
+ * Check for interludes that should auto-trigger at the current location.
949
+ *
950
+ * If an interlude matches the current location and all its conditions pass,
951
+ * queue that interlude to show.
952
+ *
953
+ * This is called after location changes (newGame, travelTo).
954
+ */
955
+ checkTriggeredInterludes() {
956
+ for (const e of Object.values(this.registry.interludes))
957
+ if (e.triggerLocation === this.state.currentLocation && !(e.triggerConditions && !v(e.triggerConditions, this.state))) {
958
+ this.state = {
959
+ ...this.state,
960
+ pendingInterlude: e.id
961
+ };
962
+ break;
963
+ }
964
+ }
921
965
  }
922
- function wt(n) {
923
- return n.split(`
924
- `).map((t, e) => ({
925
- original: t,
926
- lineNumber: e + 1
927
- })).map(({ original: t, lineNumber: e }) => {
928
- let r = t;
929
- const a = t.indexOf("#");
966
+ function Le(t) {
967
+ return t.split(`
968
+ `).map((e, n) => ({
969
+ original: e,
970
+ lineNumber: n + 1
971
+ })).map(({ original: e, lineNumber: n }) => {
972
+ let r = e;
973
+ const a = e.indexOf("#");
930
974
  if (a === -1)
931
- r = t;
975
+ r = e;
932
976
  else {
933
- const o = t.match(/"[^"]*"/);
977
+ const o = e.match(/"[^"]*"/);
934
978
  if (o) {
935
- const c = t.indexOf(o[0]), l = c + o[0].length;
936
- a < c ? r = t.substring(0, a) : a >= c && a < l ? r = t.substring(0, l) + t.substring(l).split("#")[0] : r = t.substring(0, a);
979
+ const l = e.indexOf(o[0]), c = l + o[0].length;
980
+ a < l ? r = e.substring(0, a) : a >= l && a < c ? r = e.substring(0, c) + e.substring(c).split("#")[0] : r = e.substring(0, a);
937
981
  } else
938
- r = t.substring(0, a);
982
+ r = e.substring(0, a);
939
983
  }
940
984
  const s = r.length - r.trimStart().length;
941
- return { line: r.trim(), lineNumber: e, indent: s };
942
- }).filter((t) => t.line.length > 0);
985
+ return { line: r.trim(), lineNumber: n, indent: s };
986
+ }).filter((e) => e.line.length > 0);
943
987
  }
944
- function T(n) {
945
- const t = n.trim();
946
- return t.startsWith("@") ? t : t.startsWith('"') && t.endsWith('"') ? t.substring(1, t.length - 1) : t;
988
+ function N(t) {
989
+ const e = t.trim();
990
+ return e.startsWith("@") ? e : e.startsWith('"') && e.endsWith('"') ? e.substring(1, e.length - 1) : e;
947
991
  }
948
- function N(n) {
949
- const t = n.trim().split(/\s+/), e = t[0];
950
- switch (e) {
992
+ function E(t) {
993
+ const e = t.trim().split(/\s+/), n = e[0];
994
+ switch (n) {
951
995
  case "hasFlag":
952
- return { type: "hasFlag", flag: t[1] };
996
+ return { type: "hasFlag", flag: e[1] };
953
997
  case "notFlag":
954
- return { type: "notFlag", flag: t[1] };
998
+ return { type: "notFlag", flag: e[1] };
955
999
  case "hasItem":
956
- return { type: "hasItem", itemId: t[1] };
1000
+ return { type: "hasItem", itemId: e[1] };
957
1001
  case "variableEquals":
958
1002
  return {
959
1003
  type: "variableEquals",
960
- variable: t[1],
961
- value: isNaN(Number(t[2])) ? t[2] : Number(t[2])
1004
+ variable: e[1],
1005
+ value: isNaN(Number(e[2])) ? e[2] : Number(e[2])
962
1006
  };
963
1007
  case "variableGreaterThan":
964
1008
  return {
965
1009
  type: "variableGreaterThan",
966
- variable: t[1],
967
- value: Number(t[2])
1010
+ variable: e[1],
1011
+ value: Number(e[2])
968
1012
  };
969
1013
  case "variableLessThan":
970
1014
  return {
971
1015
  type: "variableLessThan",
972
- variable: t[1],
973
- value: Number(t[2])
1016
+ variable: e[1],
1017
+ value: Number(e[2])
974
1018
  };
975
1019
  case "atLocation":
976
- return { type: "atLocation", locationId: t[1] };
1020
+ return { type: "atLocation", locationId: e[1] };
977
1021
  case "questAtStage":
978
- return { type: "questAtStage", questId: t[1], stageId: t[2] };
1022
+ return { type: "questAtStage", questId: e[1], stageId: e[2] };
979
1023
  case "characterAt":
980
1024
  return {
981
1025
  type: "characterAt",
982
- characterId: t[1],
983
- locationId: t[2]
1026
+ characterId: e[1],
1027
+ locationId: e[2]
984
1028
  };
985
1029
  case "characterInParty":
986
- return { type: "characterInParty", characterId: t[1] };
1030
+ return { type: "characterInParty", characterId: e[1] };
987
1031
  case "relationshipAbove":
988
1032
  return {
989
1033
  type: "relationshipAbove",
990
- characterId: t[1],
991
- value: Number(t[2])
1034
+ characterId: e[1],
1035
+ value: Number(e[2])
992
1036
  };
993
1037
  case "relationshipBelow":
994
1038
  return {
995
1039
  type: "relationshipBelow",
996
- characterId: t[1],
997
- value: Number(t[2])
1040
+ characterId: e[1],
1041
+ value: Number(e[2])
998
1042
  };
999
1043
  case "timeIs":
1000
- return { type: "timeIs", startHour: Number(t[1]), endHour: Number(t[2]) };
1044
+ return { type: "timeIs", startHour: Number(e[1]), endHour: Number(e[2]) };
1001
1045
  case "itemAt":
1002
- return { type: "itemAt", itemId: t[1], locationId: t[2] };
1046
+ return { type: "itemAt", itemId: e[1], locationId: e[2] };
1003
1047
  default:
1004
- throw new Error(`Unknown condition type: ${e}`);
1048
+ throw new Error(`Unknown condition type: ${n}`);
1005
1049
  }
1006
1050
  }
1007
- function E(n) {
1008
- const t = n.trim();
1009
- if (t.startsWith("NOTIFY "))
1010
- return { type: "notify", message: T(t.substring(7)) };
1011
- if (t.startsWith("MUSIC "))
1012
- return { type: "playMusic", track: t.substring(6).trim() };
1013
- if (t.startsWith("SOUND "))
1014
- return { type: "playSound", sound: t.substring(6).trim() };
1015
- if (t.startsWith("VIDEO "))
1016
- return { type: "playVideo", file: t.substring(6).trim() };
1017
- const e = t.split(/\s+/), r = e[0];
1051
+ function A(t) {
1052
+ const e = t.trim();
1053
+ if (e.startsWith("NOTIFY "))
1054
+ return { type: "notify", message: N(e.substring(7)) };
1055
+ if (e.startsWith("MUSIC "))
1056
+ return { type: "playMusic", track: e.substring(6).trim() };
1057
+ if (e.startsWith("SOUND "))
1058
+ return { type: "playSound", sound: e.substring(6).trim() };
1059
+ if (e.startsWith("VIDEO "))
1060
+ return { type: "playVideo", file: e.substring(6).trim() };
1061
+ if (e.startsWith("INTERLUDE "))
1062
+ return { type: "showInterlude", interludeId: e.substring(10).trim() };
1063
+ const n = e.split(/\s+/), r = n[0];
1018
1064
  switch (r) {
1019
1065
  case "SET":
1020
- if (e[1] === "flag")
1021
- return { type: "setFlag", flag: e[2] };
1022
- if (e[1] === "variable")
1066
+ if (n[1] === "flag")
1067
+ return { type: "setFlag", flag: n[2] };
1068
+ if (n[1] === "variable")
1023
1069
  return {
1024
1070
  type: "setVariable",
1025
- variable: e[2],
1026
- value: isNaN(Number(e[3])) ? e[3] : Number(e[3])
1071
+ variable: n[2],
1072
+ value: isNaN(Number(n[3])) ? n[3] : Number(n[3])
1027
1073
  };
1028
- if (e[1] === "questStage")
1029
- return { type: "setQuestStage", questId: e[2], stageId: e[3] };
1030
- if (e[1] === "characterLocation")
1074
+ if (n[1] === "questStage")
1075
+ return { type: "setQuestStage", questId: n[2], stageId: n[3] };
1076
+ if (n[1] === "characterLocation")
1031
1077
  return {
1032
1078
  type: "setCharacterLocation",
1033
- characterId: e[2],
1034
- locationId: e[3]
1079
+ characterId: n[2],
1080
+ locationId: n[3]
1035
1081
  };
1036
- if (e[1] === "relationship")
1082
+ if (n[1] === "relationship")
1037
1083
  return {
1038
1084
  type: "setRelationship",
1039
- characterId: e[2],
1040
- value: Number(e[3])
1085
+ characterId: n[2],
1086
+ value: Number(n[3])
1041
1087
  };
1042
- if (e[1] === "characterStat")
1088
+ if (n[1] === "characterStat")
1043
1089
  return {
1044
1090
  type: "setCharacterStat",
1045
- characterId: e[2],
1046
- stat: e[3],
1047
- value: isNaN(Number(e[4])) ? e[4] : Number(e[4])
1091
+ characterId: n[2],
1092
+ stat: n[3],
1093
+ value: isNaN(Number(n[4])) ? n[4] : Number(n[4])
1048
1094
  };
1049
- if (e[1] === "mapEnabled")
1050
- return { type: "setMapEnabled", enabled: e[2] === "true" };
1051
- throw new Error(`Unknown SET effect: ${e[1]}`);
1095
+ if (n[1] === "mapEnabled")
1096
+ return { type: "setMapEnabled", enabled: n[2] === "true" };
1097
+ throw new Error(`Unknown SET effect: ${n[1]}`);
1052
1098
  case "CLEAR":
1053
- if (e[1] === "flag")
1054
- return { type: "clearFlag", flag: e[2] };
1055
- throw new Error(`Unknown CLEAR effect: ${e[1]}`);
1099
+ if (n[1] === "flag")
1100
+ return { type: "clearFlag", flag: n[2] };
1101
+ throw new Error(`Unknown CLEAR effect: ${n[1]}`);
1056
1102
  case "ADD":
1057
- if (e[1] === "variable")
1103
+ if (n[1] === "variable")
1058
1104
  return {
1059
1105
  type: "addVariable",
1060
- variable: e[2],
1061
- value: Number(e[3])
1106
+ variable: n[2],
1107
+ value: Number(n[3])
1062
1108
  };
1063
- if (e[1] === "item")
1064
- return { type: "addItem", itemId: e[2] };
1065
- if (e[1] === "journalEntry")
1066
- return { type: "addJournalEntry", entryId: e[2] };
1067
- if (e[1] === "toParty")
1068
- return { type: "addToParty", characterId: e[2] };
1069
- if (e[1] === "relationship")
1109
+ if (n[1] === "item")
1110
+ return { type: "addItem", itemId: n[2] };
1111
+ if (n[1] === "journalEntry")
1112
+ return { type: "addJournalEntry", entryId: n[2] };
1113
+ if (n[1] === "toParty")
1114
+ return { type: "addToParty", characterId: n[2] };
1115
+ if (n[1] === "relationship")
1070
1116
  return {
1071
1117
  type: "addRelationship",
1072
- characterId: e[2],
1073
- value: Number(e[3])
1118
+ characterId: n[2],
1119
+ value: Number(n[3])
1074
1120
  };
1075
- if (e[1] === "characterStat")
1121
+ if (n[1] === "characterStat")
1076
1122
  return {
1077
1123
  type: "addCharacterStat",
1078
- characterId: e[2],
1079
- stat: e[3],
1080
- value: Number(e[4])
1124
+ characterId: n[2],
1125
+ stat: n[3],
1126
+ value: Number(n[4])
1081
1127
  };
1082
- throw new Error(`Unknown ADD effect: ${e[1]}`);
1128
+ throw new Error(`Unknown ADD effect: ${n[1]}`);
1083
1129
  case "REMOVE":
1084
- if (e[1] === "item")
1085
- return { type: "removeItem", itemId: e[2] };
1086
- if (e[1] === "fromParty")
1087
- return { type: "removeFromParty", characterId: e[2] };
1088
- throw new Error(`Unknown REMOVE effect: ${e[1]}`);
1130
+ if (n[1] === "item")
1131
+ return { type: "removeItem", itemId: n[2] };
1132
+ if (n[1] === "fromParty")
1133
+ return { type: "removeFromParty", characterId: n[2] };
1134
+ throw new Error(`Unknown REMOVE effect: ${n[1]}`);
1089
1135
  case "MOVE":
1090
- if (e[1] === "item")
1091
- return { type: "moveItem", itemId: e[2], locationId: e[3] };
1092
- throw new Error(`Unknown MOVE effect: ${e[1]}`);
1136
+ if (n[1] === "item")
1137
+ return { type: "moveItem", itemId: n[2], locationId: n[3] };
1138
+ throw new Error(`Unknown MOVE effect: ${n[1]}`);
1093
1139
  case "GOTO":
1094
- if (e[1] === "location")
1095
- return { type: "goToLocation", locationId: e[2] };
1140
+ if (n[1] === "location")
1141
+ return { type: "goToLocation", locationId: n[2] };
1096
1142
  throw new Error("GOTO should not be parsed as an effect");
1097
1143
  case "ADVANCE":
1098
- if (e[1] === "time")
1099
- return { type: "advanceTime", hours: Number(e[2]) };
1100
- throw new Error(`Unknown ADVANCE effect: ${e[1]}`);
1144
+ if (n[1] === "time")
1145
+ return { type: "advanceTime", hours: Number(n[2]) };
1146
+ throw new Error(`Unknown ADVANCE effect: ${n[1]}`);
1101
1147
  case "START":
1102
- if (e[1] === "dialogue")
1103
- return { type: "startDialogue", dialogueId: e[2] };
1104
- throw new Error(`Unknown START effect: ${e[1]}`);
1148
+ if (n[1] === "dialogue")
1149
+ return { type: "startDialogue", dialogueId: n[2] };
1150
+ throw new Error(`Unknown START effect: ${n[1]}`);
1105
1151
  case "END":
1106
- if (e[1] === "dialogue")
1152
+ if (n[1] === "dialogue")
1107
1153
  return { type: "endDialogue" };
1108
1154
  throw new Error("END should not be parsed as an effect");
1109
1155
  default:
1110
1156
  throw new Error(`Unknown effect keyword: ${r}`);
1111
1157
  }
1112
1158
  }
1113
- function Ct(n, t, e) {
1114
- const r = n[t], a = T(r.line.substring(7)), s = [], i = [];
1115
- let o = "", c = t + 1;
1116
- const l = r.indent;
1117
- for (; c < n.length; ) {
1118
- const u = n[c];
1119
- if (u.line === "END" && u.indent === l) {
1120
- c++;
1159
+ function xe(t, e, n) {
1160
+ const r = t[e], a = N(r.line.substring(7)), s = [], i = [];
1161
+ let o = "", l = e + 1;
1162
+ const c = r.indent;
1163
+ for (; l < t.length; ) {
1164
+ const u = t[l];
1165
+ if (u.line === "END" && u.indent === c) {
1166
+ l++;
1121
1167
  break;
1122
1168
  }
1123
1169
  if (u.line.startsWith("REQUIRE ")) {
1124
1170
  const g = u.line.substring(8).trim();
1125
- s.push(N(g)), c++;
1171
+ s.push(E(g)), l++;
1126
1172
  } else if (u.line.startsWith("GOTO ")) {
1127
1173
  const g = u.line.substring(5).trim();
1128
1174
  if (g.startsWith("location ")) {
@@ -1130,71 +1176,71 @@ function Ct(n, t, e) {
1130
1176
  i.push({ type: "goToLocation", locationId: h }), i.push({ type: "endDialogue" }), o = "";
1131
1177
  } else
1132
1178
  o = g;
1133
- c++;
1134
- } else u.line.includes(":") || i.push(E(u.line)), c++;
1179
+ l++;
1180
+ } else u.line.includes(":") || i.push(A(u.line)), l++;
1135
1181
  }
1136
1182
  const d = a.replace(/[@"]/g, "").replace(/[^a-z0-9]/gi, "_");
1137
1183
  return { choice: {
1138
- id: `${e}_choice_${d.toLowerCase().substring(0, 30)}`,
1184
+ id: `${n}_choice_${d.toLowerCase().substring(0, 30)}`,
1139
1185
  text: a,
1140
1186
  conditions: s.length > 0 ? s : void 0,
1141
1187
  effects: i.length > 0 ? i : void 0,
1142
1188
  next: o || ""
1143
- }, nextIndex: c };
1189
+ }, nextIndex: l };
1144
1190
  }
1145
- function Lt(n, t) {
1146
- const e = n[t], r = e.line.substring(3).trim(), a = N(r);
1191
+ function ke(t, e) {
1192
+ const n = t[e], r = n.line.substring(3).trim(), a = E(r);
1147
1193
  let s;
1148
1194
  const i = [];
1149
- let o = t + 1;
1150
- const c = e.indent;
1151
- for (; o < n.length; ) {
1152
- const l = n[o];
1153
- if (l.line === "END" && l.indent === c) {
1195
+ let o = e + 1;
1196
+ const l = n.indent;
1197
+ for (; o < t.length; ) {
1198
+ const c = t[o];
1199
+ if (c.line === "END" && c.indent === l) {
1154
1200
  o++;
1155
1201
  break;
1156
1202
  }
1157
- l.line.startsWith("GOTO ") ? (s = l.line.substring(5).trim(), o++) : (i.push(E(l.line)), o++);
1203
+ c.line.startsWith("GOTO ") ? (s = c.line.substring(5).trim(), o++) : (i.push(A(c.line)), o++);
1158
1204
  }
1159
1205
  return { condition: a, next: s, effects: i, nextIndex: o };
1160
1206
  }
1161
- function xt(n, t) {
1162
- const r = n[t].line.substring(5).trim();
1207
+ function Oe(t, e) {
1208
+ const r = t[e].line.substring(5).trim();
1163
1209
  let a = null, s = "", i, o;
1164
- const c = [], l = [], d = [];
1210
+ const l = [], c = [], d = [];
1165
1211
  let f;
1166
- const m = [];
1167
- let u = t + 1;
1168
- for (; u < n.length; ) {
1169
- const h = n[u];
1212
+ const b = [];
1213
+ let u = e + 1;
1214
+ for (; u < t.length; ) {
1215
+ const h = t[u];
1170
1216
  if (h.line.startsWith("NODE "))
1171
1217
  break;
1172
1218
  if (h.line.includes(":") && !h.line.startsWith("VOICE")) {
1173
- const p = h.line.indexOf(":"), b = h.line.substring(0, p).trim(), S = h.line.substring(p + 1).trim();
1174
- b === "NARRATOR" ? a = null : a = b.toLowerCase(), s = T(S), u++;
1219
+ const p = h.line.indexOf(":"), y = h.line.substring(0, p).trim(), I = h.line.substring(p + 1).trim();
1220
+ y === "NARRATOR" ? a = null : a = y.toLowerCase(), s = N(I), u++;
1175
1221
  } else if (h.line.startsWith("VOICE "))
1176
1222
  i = h.line.substring(6).trim(), u++;
1177
1223
  else if (h.line.startsWith("PORTRAIT "))
1178
1224
  o = h.line.substring(9).trim(), u++;
1179
1225
  else if (h.line.startsWith("CHOICE ")) {
1180
- const p = Ct(n, u, r);
1181
- l.push(p.choice), u = p.nextIndex;
1226
+ const p = xe(t, u, r);
1227
+ c.push(p.choice), u = p.nextIndex;
1182
1228
  } else if (h.line.startsWith("IF ")) {
1183
- const p = Lt(n, u);
1184
- p.next && m.push({
1229
+ const p = ke(t, u);
1230
+ p.next && b.push({
1185
1231
  condition: p.condition,
1186
1232
  next: p.next
1187
1233
  }), d.push(...p.effects), u = p.nextIndex;
1188
1234
  } else if (h.line.startsWith("GOTO ")) {
1189
1235
  const p = h.line.substring(5).trim();
1190
1236
  if (p.startsWith("location ")) {
1191
- const b = p.substring(9).trim();
1192
- d.push({ type: "goToLocation", locationId: b }), d.push({ type: "endDialogue" });
1237
+ const y = p.substring(9).trim();
1238
+ d.push({ type: "goToLocation", locationId: y }), d.push({ type: "endDialogue" });
1193
1239
  } else
1194
1240
  f = p;
1195
1241
  u++;
1196
1242
  } else
1197
- d.push(E(h.line)), u++;
1243
+ d.push(A(h.line)), u++;
1198
1244
  }
1199
1245
  const g = {
1200
1246
  id: r,
@@ -1202,64 +1248,64 @@ function xt(n, t) {
1202
1248
  text: s,
1203
1249
  voice: i,
1204
1250
  portrait: o,
1205
- conditions: c.length > 0 ? c : void 0,
1206
- choices: l,
1251
+ conditions: l.length > 0 ? l : void 0,
1252
+ choices: c,
1207
1253
  effects: d.length > 0 ? d : void 0,
1208
1254
  next: f
1209
1255
  };
1210
- return m.length > 0 && (g.conditionalNext = m), { node: g, nextIndex: u };
1256
+ return b.length > 0 && (g.conditionalNext = b), { node: g, nextIndex: u };
1211
1257
  }
1212
- function Rt(n, t) {
1213
- const e = wt(n);
1258
+ function Pe(t, e) {
1259
+ const n = Le(t);
1214
1260
  let r;
1215
1261
  const a = [], s = [];
1216
1262
  let i = "", o = 0;
1217
- for (; o < e.length; ) {
1218
- const c = e[o];
1219
- if (c.line.startsWith("TRIGGER "))
1220
- r = c.line.substring(8).trim(), o++;
1221
- else if (c.line.startsWith("REQUIRE ")) {
1222
- const l = c.line.substring(8).trim();
1223
- a.push(N(l)), o++;
1224
- } else if (c.line.startsWith("NODE ")) {
1225
- const l = xt(e, o);
1226
- s.push(l.node), i || (i = l.node.id), o = l.nextIndex;
1263
+ for (; o < n.length; ) {
1264
+ const l = n[o];
1265
+ if (l.line.startsWith("TRIGGER "))
1266
+ r = l.line.substring(8).trim(), o++;
1267
+ else if (l.line.startsWith("REQUIRE ")) {
1268
+ const c = l.line.substring(8).trim();
1269
+ a.push(E(c)), o++;
1270
+ } else if (l.line.startsWith("NODE ")) {
1271
+ const c = Oe(n, o);
1272
+ s.push(c.node), i || (i = c.node.id), o = c.nextIndex;
1227
1273
  } else
1228
- throw new Error(`Unexpected token at line ${c.lineNumber}: ${c.line}`);
1274
+ throw new Error(`Unexpected token at line ${l.lineNumber}: ${l.line}`);
1229
1275
  }
1230
1276
  return {
1231
- id: t,
1277
+ id: e,
1232
1278
  triggerLocation: r,
1233
1279
  conditions: a.length > 0 ? a : void 0,
1234
1280
  startNode: i,
1235
1281
  nodes: s
1236
1282
  };
1237
1283
  }
1238
- function Dt(n, t) {
1239
- const e = n;
1284
+ function $e(t, e) {
1285
+ const n = t;
1240
1286
  window.doodle = {
1241
1287
  // Flag manipulation
1242
1288
  setFlag(r) {
1243
- e.state.flags[r] = !0, t(), console.log(`🐾 Flag set: ${r}`);
1289
+ n.state.flags[r] = !0, e(), console.log(`🐾 Flag set: ${r}`);
1244
1290
  },
1245
1291
  clearFlag(r) {
1246
- delete e.state.flags[r], t(), console.log(`🐾 Flag cleared: ${r}`);
1292
+ delete n.state.flags[r], e(), console.log(`🐾 Flag cleared: ${r}`);
1247
1293
  },
1248
1294
  // Variable manipulation
1249
1295
  setVariable(r, a) {
1250
- e.state.variables[r] = a, t(), console.log(`🐾 Variable set: ${r} = ${a}`);
1296
+ n.state.variables[r] = a, e(), console.log(`🐾 Variable set: ${r} = ${a}`);
1251
1297
  },
1252
1298
  getVariable(r) {
1253
- const a = e.state.variables[r];
1299
+ const a = n.state.variables[r];
1254
1300
  return console.log(`🐾 Variable: ${r} = ${a}`), a;
1255
1301
  },
1256
1302
  // Location control
1257
1303
  teleport(r) {
1258
- n.travelTo(r), t(), console.log(`🐾 Teleported to: ${r}`);
1304
+ t.travelTo(r), e(), console.log(`🐾 Teleported to: ${r}`);
1259
1305
  },
1260
1306
  // Dialogue control
1261
1307
  triggerDialogue(r) {
1262
- const a = e.registry.dialogues[r];
1308
+ const a = n.registry.dialogues[r];
1263
1309
  if (!a) {
1264
1310
  console.error(`🐾 Dialogue not found: ${r}`);
1265
1311
  return;
@@ -1269,49 +1315,49 @@ function Dt(n, t) {
1269
1315
  console.error(`🐾 Start node not found for dialogue: ${r}`);
1270
1316
  return;
1271
1317
  }
1272
- e.state.dialogueState = {
1318
+ n.state.dialogueState = {
1273
1319
  dialogueId: a.id,
1274
1320
  nodeId: s.id
1275
- }, t(), console.log(`🐾 Triggered dialogue: ${r}`);
1321
+ }, e(), console.log(`🐾 Triggered dialogue: ${r}`);
1276
1322
  },
1277
1323
  // Quest control
1278
1324
  setQuestStage(r, a) {
1279
- e.state.questProgress[r] = a, t(), console.log(`🐾 Quest stage set: ${r} -> ${a}`);
1325
+ n.state.questProgress[r] = a, e(), console.log(`🐾 Quest stage set: ${r} -> ${a}`);
1280
1326
  },
1281
1327
  // Inventory control
1282
1328
  addItem(r) {
1283
- e.state.inventory.includes(r) ? console.log(`🐾 Item already in inventory: ${r}`) : (e.state.inventory.push(r), e.state.itemLocations[r] = "inventory", t(), console.log(`🐾 Item added: ${r}`));
1329
+ n.state.inventory.includes(r) ? console.log(`🐾 Item already in inventory: ${r}`) : (n.state.inventory.push(r), n.state.itemLocations[r] = "inventory", e(), console.log(`🐾 Item added: ${r}`));
1284
1330
  },
1285
1331
  removeItem(r) {
1286
- const a = e.state.inventory.indexOf(r);
1287
- a !== -1 ? (e.state.inventory.splice(a, 1), delete e.state.itemLocations[r], t(), console.log(`🐾 Item removed: ${r}`)) : console.log(`🐾 Item not in inventory: ${r}`);
1332
+ const a = n.state.inventory.indexOf(r);
1333
+ a !== -1 ? (n.state.inventory.splice(a, 1), delete n.state.itemLocations[r], e(), console.log(`🐾 Item removed: ${r}`)) : console.log(`🐾 Item not in inventory: ${r}`);
1288
1334
  },
1289
1335
  // Inspection
1290
1336
  inspect() {
1291
- const r = n.getSnapshot();
1292
- console.log("🐾 DOODLE ENGINE INSPECTOR 🐾"), console.log(""), console.log("Current Location:", r.location.name), console.log("Current Time:", `Day ${r.time.day}, Hour ${r.time.hour}`), console.log("Flags:", Object.keys(e.state.flags)), console.log("Variables:", e.state.variables), console.log("Inventory:", r.inventory.map((a) => a.name)), console.log("Quest Progress:", e.state.questProgress), console.log(""), console.log("Available commands:"), console.log(" doodle.setFlag(flag)"), console.log(" doodle.clearFlag(flag)"), console.log(" doodle.setVariable(variable, value)"), console.log(" doodle.getVariable(variable)"), console.log(" doodle.teleport(locationId)"), console.log(" doodle.triggerDialogue(dialogueId)"), console.log(" doodle.setQuestStage(questId, stageId)"), console.log(" doodle.addItem(itemId)"), console.log(" doodle.removeItem(itemId)"), console.log(" doodle.inspectState()"), console.log(" doodle.inspectRegistry()");
1337
+ const r = t.getSnapshot();
1338
+ console.log("🐾 DOODLE ENGINE INSPECTOR 🐾"), console.log(""), console.log("Current Location:", r.location.name), console.log("Current Time:", `Day ${r.time.day}, Hour ${r.time.hour}`), console.log("Flags:", Object.keys(n.state.flags)), console.log("Variables:", n.state.variables), console.log("Inventory:", r.inventory.map((a) => a.name)), console.log("Quest Progress:", n.state.questProgress), console.log(""), console.log("Available commands:"), console.log(" doodle.setFlag(flag)"), console.log(" doodle.clearFlag(flag)"), console.log(" doodle.setVariable(variable, value)"), console.log(" doodle.getVariable(variable)"), console.log(" doodle.teleport(locationId)"), console.log(" doodle.triggerDialogue(dialogueId)"), console.log(" doodle.setQuestStage(questId, stageId)"), console.log(" doodle.addItem(itemId)"), console.log(" doodle.removeItem(itemId)"), console.log(" doodle.inspectState()"), console.log(" doodle.inspectRegistry()");
1293
1339
  },
1294
1340
  inspectState() {
1295
- return console.log("🐾 GAME STATE:", e.state), e.state;
1341
+ return console.log("🐾 GAME STATE:", n.state), n.state;
1296
1342
  },
1297
1343
  inspectRegistry() {
1298
- return console.log("🐾 CONTENT REGISTRY:", e.registry), e.registry;
1344
+ return console.log("🐾 CONTENT REGISTRY:", n.registry), n.registry;
1299
1345
  }
1300
1346
  }, console.log("🐾 Doodle Engine dev tools enabled! Type `doodle.inspect()` to see available commands.");
1301
1347
  }
1302
- const Pt = "0.0.1";
1348
+ const qe = "0.0.1";
1303
1349
  export {
1304
- Vt as Engine,
1305
- Pt as VERSION,
1306
- J as applyEffect,
1307
- y as applyEffects,
1308
- mt as buildSnapshot,
1309
- kt as createResolver,
1310
- Dt as enableDevTools,
1350
+ De as Engine,
1351
+ qe as VERSION,
1352
+ U as applyEffect,
1353
+ S as applyEffects,
1354
+ ye as buildSnapshot,
1355
+ Re as createResolver,
1356
+ $e as enableDevTools,
1311
1357
  O as evaluateCondition,
1312
- I as evaluateConditions,
1313
- N as parseCondition,
1314
- Rt as parseDialogue,
1315
- E as parseEffect,
1316
- A as resolveText
1358
+ v as evaluateConditions,
1359
+ E as parseCondition,
1360
+ Pe as parseDialogue,
1361
+ A as parseEffect,
1362
+ C as resolveText
1317
1363
  };