@doodle-engine/react 0.0.8 → 0.0.9
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/CHANGELOG.md +8 -0
- package/dist/GameProvider.d.ts +13 -3
- package/dist/GameProvider.d.ts.map +1 -1
- package/dist/GameShell.d.ts +11 -1
- package/dist/GameShell.d.ts.map +1 -1
- package/dist/components/LoadingScreen.d.ts +14 -0
- package/dist/components/LoadingScreen.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/react.cjs +4 -4
- package/dist/react.js +531 -519
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/react.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { VERSION as
|
|
3
|
-
import
|
|
1
|
+
import { enableDevTools as ie, Engine as ue } from "@doodle-engine/core";
|
|
2
|
+
import { VERSION as Fe } from "@doodle-engine/core";
|
|
3
|
+
import de, { createContext as me, useState as T, useEffect as L, useCallback as j, useContext as he, useRef as U } from "react";
|
|
4
4
|
var Z = { exports: {} }, z = {};
|
|
5
5
|
/**
|
|
6
6
|
* @license React
|
|
@@ -11,27 +11,27 @@ var Z = { exports: {} }, z = {};
|
|
|
11
11
|
* This source code is licensed under the MIT license found in the
|
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
|
13
13
|
*/
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
var n = Symbol.for("react.transitional.element"),
|
|
19
|
-
function r(a,
|
|
20
|
-
var
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
for (var
|
|
24
|
-
|
|
25
|
-
} else
|
|
26
|
-
return
|
|
14
|
+
var se;
|
|
15
|
+
function ve() {
|
|
16
|
+
if (se) return z;
|
|
17
|
+
se = 1;
|
|
18
|
+
var n = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
19
|
+
function r(a, o, c) {
|
|
20
|
+
var d = null;
|
|
21
|
+
if (c !== void 0 && (d = "" + c), o.key !== void 0 && (d = "" + o.key), "key" in o) {
|
|
22
|
+
c = {};
|
|
23
|
+
for (var m in o)
|
|
24
|
+
m !== "key" && (c[m] = o[m]);
|
|
25
|
+
} else c = o;
|
|
26
|
+
return o = c.ref, {
|
|
27
27
|
$$typeof: n,
|
|
28
28
|
type: a,
|
|
29
|
-
key:
|
|
30
|
-
ref:
|
|
31
|
-
props:
|
|
29
|
+
key: d,
|
|
30
|
+
ref: o !== void 0 ? o : null,
|
|
31
|
+
props: c
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
return z.Fragment =
|
|
34
|
+
return z.Fragment = t, z.jsx = r, z.jsxs = r, z;
|
|
35
35
|
}
|
|
36
36
|
var B = {};
|
|
37
37
|
/**
|
|
@@ -44,433 +44,437 @@ var B = {};
|
|
|
44
44
|
* LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
46
|
var ne;
|
|
47
|
-
function
|
|
47
|
+
function pe() {
|
|
48
48
|
return ne || (ne = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
49
|
-
function n(
|
|
50
|
-
if (
|
|
51
|
-
if (typeof
|
|
52
|
-
return
|
|
53
|
-
if (typeof
|
|
54
|
-
switch (
|
|
49
|
+
function n(s) {
|
|
50
|
+
if (s == null) return null;
|
|
51
|
+
if (typeof s == "function")
|
|
52
|
+
return s.$$typeof === N ? null : s.displayName || s.name || null;
|
|
53
|
+
if (typeof s == "string") return s;
|
|
54
|
+
switch (s) {
|
|
55
55
|
case u:
|
|
56
56
|
return "Fragment";
|
|
57
|
-
case
|
|
57
|
+
case $:
|
|
58
58
|
return "Profiler";
|
|
59
|
-
case
|
|
59
|
+
case h:
|
|
60
60
|
return "StrictMode";
|
|
61
|
-
case
|
|
61
|
+
case W:
|
|
62
62
|
return "Suspense";
|
|
63
|
-
case
|
|
63
|
+
case R:
|
|
64
64
|
return "SuspenseList";
|
|
65
|
-
case
|
|
65
|
+
case p:
|
|
66
66
|
return "Activity";
|
|
67
67
|
}
|
|
68
|
-
if (typeof
|
|
69
|
-
switch (typeof
|
|
68
|
+
if (typeof s == "object")
|
|
69
|
+
switch (typeof s.tag == "number" && console.error(
|
|
70
70
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
71
|
-
),
|
|
72
|
-
case
|
|
71
|
+
), s.$$typeof) {
|
|
72
|
+
case S:
|
|
73
73
|
return "Portal";
|
|
74
|
-
case
|
|
75
|
-
return
|
|
76
|
-
case
|
|
77
|
-
return (
|
|
78
|
-
case
|
|
79
|
-
var
|
|
80
|
-
return
|
|
81
|
-
case
|
|
82
|
-
return
|
|
83
|
-
case
|
|
84
|
-
|
|
74
|
+
case q:
|
|
75
|
+
return s.displayName || "Context";
|
|
76
|
+
case M:
|
|
77
|
+
return (s._context.displayName || "Context") + ".Consumer";
|
|
78
|
+
case Y:
|
|
79
|
+
var i = s.render;
|
|
80
|
+
return s = s.displayName, s || (s = i.displayName || i.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
|
|
81
|
+
case I:
|
|
82
|
+
return i = s.displayName || null, i !== null ? i : n(s.type) || "Memo";
|
|
83
|
+
case l:
|
|
84
|
+
i = s._payload, s = s._init;
|
|
85
85
|
try {
|
|
86
|
-
return n(
|
|
86
|
+
return n(s(i));
|
|
87
87
|
} catch {
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
return null;
|
|
91
91
|
}
|
|
92
|
-
function s
|
|
93
|
-
return "" +
|
|
92
|
+
function t(s) {
|
|
93
|
+
return "" + s;
|
|
94
94
|
}
|
|
95
|
-
function r(
|
|
95
|
+
function r(s) {
|
|
96
96
|
try {
|
|
97
|
-
s
|
|
98
|
-
var
|
|
97
|
+
t(s);
|
|
98
|
+
var i = !1;
|
|
99
99
|
} catch {
|
|
100
|
-
|
|
100
|
+
i = !0;
|
|
101
101
|
}
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
return
|
|
106
|
-
|
|
102
|
+
if (i) {
|
|
103
|
+
i = console;
|
|
104
|
+
var f = i.error, k = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
105
|
+
return f.call(
|
|
106
|
+
i,
|
|
107
107
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
108
|
-
|
|
109
|
-
), s
|
|
108
|
+
k
|
|
109
|
+
), t(s);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
function a(
|
|
113
|
-
if (
|
|
114
|
-
if (typeof
|
|
112
|
+
function a(s) {
|
|
113
|
+
if (s === u) return "<>";
|
|
114
|
+
if (typeof s == "object" && s !== null && s.$$typeof === l)
|
|
115
115
|
return "<...>";
|
|
116
116
|
try {
|
|
117
|
-
var
|
|
118
|
-
return
|
|
117
|
+
var i = n(s);
|
|
118
|
+
return i ? "<" + i + ">" : "<...>";
|
|
119
119
|
} catch {
|
|
120
120
|
return "<...>";
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
function l() {
|
|
124
|
-
var t = O.A;
|
|
125
|
-
return t === null ? null : t.getOwner();
|
|
126
|
-
}
|
|
127
123
|
function o() {
|
|
124
|
+
var s = A.A;
|
|
125
|
+
return s === null ? null : s.getOwner();
|
|
126
|
+
}
|
|
127
|
+
function c() {
|
|
128
128
|
return Error("react-stack-top-frame");
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
if (
|
|
132
|
-
var
|
|
133
|
-
if (
|
|
130
|
+
function d(s) {
|
|
131
|
+
if (V.call(s, "key")) {
|
|
132
|
+
var i = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
133
|
+
if (i && i.isReactWarning) return !1;
|
|
134
134
|
}
|
|
135
|
-
return
|
|
135
|
+
return s.key !== void 0;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
function
|
|
137
|
+
function m(s, i) {
|
|
138
|
+
function f() {
|
|
139
139
|
P || (P = !0, console.error(
|
|
140
140
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
141
|
-
|
|
141
|
+
i
|
|
142
142
|
));
|
|
143
143
|
}
|
|
144
|
-
|
|
145
|
-
get:
|
|
144
|
+
f.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
145
|
+
get: f,
|
|
146
146
|
configurable: !0
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
var
|
|
151
|
-
return
|
|
149
|
+
function v() {
|
|
150
|
+
var s = n(this.type);
|
|
151
|
+
return D[s] || (D[s] = !0, console.error(
|
|
152
152
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
153
|
-
)),
|
|
153
|
+
)), s = this.props.ref, s !== void 0 ? s : null;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
var
|
|
157
|
-
return
|
|
155
|
+
function b(s, i, f, k, H, K) {
|
|
156
|
+
var y = f.ref;
|
|
157
|
+
return s = {
|
|
158
158
|
$$typeof: w,
|
|
159
|
-
type:
|
|
160
|
-
key:
|
|
161
|
-
props:
|
|
162
|
-
_owner:
|
|
163
|
-
}, (
|
|
159
|
+
type: s,
|
|
160
|
+
key: i,
|
|
161
|
+
props: f,
|
|
162
|
+
_owner: k
|
|
163
|
+
}, (y !== void 0 ? y : null) !== null ? Object.defineProperty(s, "ref", {
|
|
164
164
|
enumerable: !1,
|
|
165
|
-
get:
|
|
166
|
-
}) : Object.defineProperty(
|
|
165
|
+
get: v
|
|
166
|
+
}) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
167
167
|
configurable: !1,
|
|
168
168
|
enumerable: !1,
|
|
169
169
|
writable: !0,
|
|
170
170
|
value: 0
|
|
171
|
-
}), Object.defineProperty(
|
|
171
|
+
}), Object.defineProperty(s, "_debugInfo", {
|
|
172
172
|
configurable: !1,
|
|
173
173
|
enumerable: !1,
|
|
174
174
|
writable: !0,
|
|
175
175
|
value: null
|
|
176
|
-
}), Object.defineProperty(
|
|
176
|
+
}), Object.defineProperty(s, "_debugStack", {
|
|
177
177
|
configurable: !1,
|
|
178
178
|
enumerable: !1,
|
|
179
179
|
writable: !0,
|
|
180
180
|
value: H
|
|
181
|
-
}), Object.defineProperty(
|
|
181
|
+
}), Object.defineProperty(s, "_debugTask", {
|
|
182
182
|
configurable: !1,
|
|
183
183
|
enumerable: !1,
|
|
184
184
|
writable: !0,
|
|
185
185
|
value: K
|
|
186
|
-
}), Object.freeze && (Object.freeze(
|
|
186
|
+
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
187
187
|
}
|
|
188
|
-
function x(
|
|
189
|
-
var
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
if (
|
|
193
|
-
for (
|
|
194
|
-
|
|
195
|
-
Object.freeze && Object.freeze(
|
|
188
|
+
function x(s, i, f, k, H, K) {
|
|
189
|
+
var y = i.children;
|
|
190
|
+
if (y !== void 0)
|
|
191
|
+
if (k)
|
|
192
|
+
if (G(y)) {
|
|
193
|
+
for (k = 0; k < y.length; k++)
|
|
194
|
+
_(y[k]);
|
|
195
|
+
Object.freeze && Object.freeze(y);
|
|
196
196
|
} else
|
|
197
197
|
console.error(
|
|
198
198
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
199
199
|
);
|
|
200
|
-
else
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
var
|
|
200
|
+
else _(y);
|
|
201
|
+
if (V.call(i, "key")) {
|
|
202
|
+
y = n(s);
|
|
203
|
+
var J = Object.keys(i).filter(function(ce) {
|
|
204
204
|
return ce !== "key";
|
|
205
205
|
});
|
|
206
|
-
|
|
206
|
+
k = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", g[y + k] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
207
207
|
`A props object containing a "key" prop is being spread into JSX:
|
|
208
208
|
let props = %s;
|
|
209
209
|
<%s {...props} />
|
|
210
210
|
React keys must be passed directly to JSX without using spread:
|
|
211
211
|
let props = %s;
|
|
212
212
|
<%s key={someKey} {...props} />`,
|
|
213
|
-
S,
|
|
214
213
|
k,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
214
|
+
y,
|
|
215
|
+
J,
|
|
216
|
+
y
|
|
217
|
+
), g[y + k] = !0);
|
|
218
218
|
}
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
for (var ee in
|
|
222
|
-
ee !== "key" && (
|
|
223
|
-
} else
|
|
224
|
-
return
|
|
225
|
-
|
|
226
|
-
typeof
|
|
227
|
-
),
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
219
|
+
if (y = null, f !== void 0 && (r(f), y = "" + f), d(i) && (r(i.key), y = "" + i.key), "key" in i) {
|
|
220
|
+
f = {};
|
|
221
|
+
for (var ee in i)
|
|
222
|
+
ee !== "key" && (f[ee] = i[ee]);
|
|
223
|
+
} else f = i;
|
|
224
|
+
return y && m(
|
|
225
|
+
f,
|
|
226
|
+
typeof s == "function" ? s.displayName || s.name || "Unknown" : s
|
|
227
|
+
), b(
|
|
228
|
+
s,
|
|
229
|
+
y,
|
|
230
|
+
f,
|
|
231
|
+
o(),
|
|
232
232
|
H,
|
|
233
233
|
K
|
|
234
234
|
);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
237
|
-
|
|
236
|
+
function _(s) {
|
|
237
|
+
C(s) ? s._store && (s._store.validated = 1) : typeof s == "object" && s !== null && s.$$typeof === l && (s._payload.status === "fulfilled" ? C(s._payload.value) && s._payload.value._store && (s._payload.value._store.validated = 1) : s._store && (s._store.validated = 1));
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
return typeof
|
|
239
|
+
function C(s) {
|
|
240
|
+
return typeof s == "object" && s !== null && s.$$typeof === w;
|
|
241
241
|
}
|
|
242
|
-
var E =
|
|
242
|
+
var E = de, w = Symbol.for("react.transitional.element"), S = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), $ = Symbol.for("react.profiler"), M = Symbol.for("react.consumer"), q = Symbol.for("react.context"), Y = Symbol.for("react.forward_ref"), W = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), l = Symbol.for("react.lazy"), p = Symbol.for("react.activity"), N = Symbol.for("react.client.reference"), A = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, G = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
243
243
|
return null;
|
|
244
244
|
};
|
|
245
245
|
E = {
|
|
246
|
-
react_stack_bottom_frame: function(
|
|
247
|
-
return
|
|
246
|
+
react_stack_bottom_frame: function(s) {
|
|
247
|
+
return s();
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
|
-
var P,
|
|
250
|
+
var P, D = {}, F = E.react_stack_bottom_frame.bind(
|
|
251
251
|
E,
|
|
252
|
-
|
|
253
|
-
)(),
|
|
254
|
-
B.Fragment = u, B.jsx = function(
|
|
255
|
-
var
|
|
252
|
+
c
|
|
253
|
+
)(), X = O(a(c)), g = {};
|
|
254
|
+
B.Fragment = u, B.jsx = function(s, i, f) {
|
|
255
|
+
var k = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
256
256
|
return x(
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
257
|
+
s,
|
|
258
|
+
i,
|
|
259
|
+
f,
|
|
260
260
|
!1,
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
k ? Error("react-stack-top-frame") : F,
|
|
262
|
+
k ? O(a(s)) : X
|
|
263
263
|
);
|
|
264
|
-
}, B.jsxs = function(
|
|
265
|
-
var
|
|
264
|
+
}, B.jsxs = function(s, i, f) {
|
|
265
|
+
var k = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
266
266
|
return x(
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
s,
|
|
268
|
+
i,
|
|
269
|
+
f,
|
|
270
270
|
!0,
|
|
271
|
-
|
|
272
|
-
|
|
271
|
+
k ? Error("react-stack-top-frame") : F,
|
|
272
|
+
k ? O(a(s)) : X
|
|
273
273
|
);
|
|
274
274
|
};
|
|
275
275
|
})()), B;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
function
|
|
279
|
-
return
|
|
277
|
+
var te;
|
|
278
|
+
function fe() {
|
|
279
|
+
return te || (te = 1, process.env.NODE_ENV === "production" ? Z.exports = ve() : Z.exports = pe()), Z.exports;
|
|
280
280
|
}
|
|
281
|
-
var e =
|
|
282
|
-
const ae =
|
|
283
|
-
function
|
|
284
|
-
const [
|
|
281
|
+
var e = fe();
|
|
282
|
+
const ae = me(null);
|
|
283
|
+
function xe({ engine: n, initialSnapshot: t, children: r, devTools: a = !1 }) {
|
|
284
|
+
const [o, c] = T(t);
|
|
285
285
|
L(() => {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
286
|
+
if (a)
|
|
287
|
+
return ie(n, () => c(n.getSnapshot())), () => {
|
|
288
|
+
delete window.doodle;
|
|
289
|
+
};
|
|
290
|
+
}, [n, a]);
|
|
291
|
+
const d = j(
|
|
292
|
+
(u) => {
|
|
293
|
+
const h = n.selectChoice(u);
|
|
294
|
+
c(h);
|
|
291
295
|
},
|
|
292
296
|
[n]
|
|
293
|
-
), m =
|
|
294
|
-
(
|
|
295
|
-
const
|
|
296
|
-
|
|
297
|
+
), m = j(
|
|
298
|
+
(u) => {
|
|
299
|
+
const h = n.talkTo(u);
|
|
300
|
+
c(h);
|
|
297
301
|
},
|
|
298
302
|
[n]
|
|
299
|
-
),
|
|
300
|
-
(
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
+
), v = j(
|
|
304
|
+
(u) => {
|
|
305
|
+
const h = n.takeItem(u);
|
|
306
|
+
c(h);
|
|
303
307
|
},
|
|
304
308
|
[n]
|
|
305
|
-
),
|
|
306
|
-
(
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
+
), b = j(
|
|
310
|
+
(u) => {
|
|
311
|
+
const h = n.travelTo(u);
|
|
312
|
+
c(h);
|
|
309
313
|
},
|
|
310
314
|
[n]
|
|
311
|
-
),
|
|
312
|
-
(
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
+
), x = j(
|
|
316
|
+
(u, h) => {
|
|
317
|
+
const $ = n.writeNote(u, h);
|
|
318
|
+
c($);
|
|
315
319
|
},
|
|
316
320
|
[n]
|
|
317
|
-
),
|
|
318
|
-
(
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
+
), _ = j(
|
|
322
|
+
(u) => {
|
|
323
|
+
const h = n.deleteNote(u);
|
|
324
|
+
c(h);
|
|
321
325
|
},
|
|
322
326
|
[n]
|
|
323
|
-
),
|
|
324
|
-
(
|
|
325
|
-
const
|
|
326
|
-
|
|
327
|
+
), C = j(
|
|
328
|
+
(u) => {
|
|
329
|
+
const h = n.setLocale(u);
|
|
330
|
+
c(h);
|
|
327
331
|
},
|
|
328
332
|
[n]
|
|
329
|
-
),
|
|
330
|
-
(
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
+
), E = j(() => n.saveGame(), [n]), w = j(
|
|
334
|
+
(u) => {
|
|
335
|
+
const h = n.loadGame(u);
|
|
336
|
+
c(h);
|
|
333
337
|
},
|
|
334
338
|
[n]
|
|
335
|
-
),
|
|
336
|
-
snapshot:
|
|
339
|
+
), S = {
|
|
340
|
+
snapshot: o,
|
|
337
341
|
actions: {
|
|
338
|
-
selectChoice:
|
|
342
|
+
selectChoice: d,
|
|
339
343
|
talkTo: m,
|
|
340
|
-
takeItem:
|
|
341
|
-
travelTo:
|
|
342
|
-
writeNote:
|
|
343
|
-
deleteNote:
|
|
344
|
-
setLocale:
|
|
345
|
-
saveGame:
|
|
346
|
-
loadGame:
|
|
344
|
+
takeItem: v,
|
|
345
|
+
travelTo: b,
|
|
346
|
+
writeNote: x,
|
|
347
|
+
deleteNote: _,
|
|
348
|
+
setLocale: C,
|
|
349
|
+
saveGame: E,
|
|
350
|
+
loadGame: w
|
|
347
351
|
}
|
|
348
352
|
};
|
|
349
|
-
return /* @__PURE__ */ e.jsx(ae.Provider, { value:
|
|
353
|
+
return /* @__PURE__ */ e.jsx(ae.Provider, { value: S, children: r });
|
|
350
354
|
}
|
|
351
355
|
function re() {
|
|
352
|
-
const n =
|
|
356
|
+
const n = he(ae);
|
|
353
357
|
if (!n)
|
|
354
358
|
throw new Error("useGame must be used within a GameProvider");
|
|
355
359
|
return n;
|
|
356
360
|
}
|
|
357
|
-
function le(n,
|
|
358
|
-
var
|
|
361
|
+
function le(n, t = {}) {
|
|
362
|
+
var I;
|
|
359
363
|
const {
|
|
360
364
|
audioBasePath: r = "/audio",
|
|
361
365
|
masterVolume: a = 1,
|
|
362
|
-
musicVolume:
|
|
363
|
-
soundVolume:
|
|
364
|
-
voiceVolume:
|
|
365
|
-
crossfadeDuration:
|
|
366
|
-
} =
|
|
366
|
+
musicVolume: o = 0.7,
|
|
367
|
+
soundVolume: c = 0.8,
|
|
368
|
+
voiceVolume: d = 1,
|
|
369
|
+
crossfadeDuration: m = 1e3
|
|
370
|
+
} = t, [v, b] = T(a), [x, _] = T(o), [C, E] = T(c), [w, S] = T(d), u = U(null), h = U(null), $ = U(null), M = U(null);
|
|
367
371
|
L(() => {
|
|
368
|
-
const
|
|
369
|
-
|
|
370
|
-
const
|
|
371
|
-
return
|
|
372
|
-
|
|
372
|
+
const l = new Audio();
|
|
373
|
+
l.loop = !0, u.current = l;
|
|
374
|
+
const p = new Audio();
|
|
375
|
+
return h.current = p, () => {
|
|
376
|
+
M.current && clearInterval(M.current), l.pause(), p.pause(), l.src = "", p.src = "";
|
|
373
377
|
};
|
|
374
378
|
}, []), L(() => {
|
|
375
|
-
const
|
|
376
|
-
if (!
|
|
377
|
-
const
|
|
378
|
-
if (
|
|
379
|
-
if (
|
|
380
|
-
|
|
379
|
+
const l = u.current;
|
|
380
|
+
if (!l) return;
|
|
381
|
+
const p = n.music;
|
|
382
|
+
if (p !== $.current)
|
|
383
|
+
if ($.current = p, !p)
|
|
384
|
+
Y(l, m);
|
|
381
385
|
else {
|
|
382
|
-
const
|
|
383
|
-
|
|
386
|
+
const N = `${r}/music/${p}`;
|
|
387
|
+
q(l, N, m);
|
|
384
388
|
}
|
|
385
|
-
|
|
386
|
-
}, [n.music,
|
|
387
|
-
var
|
|
388
|
-
const
|
|
389
|
-
if (!
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
-
console.warn("Voice playback failed:",
|
|
389
|
+
l.volume = v * x;
|
|
390
|
+
}, [n.music, v, x, r, m]), L(() => {
|
|
391
|
+
var N;
|
|
392
|
+
const l = h.current;
|
|
393
|
+
if (!l) return;
|
|
394
|
+
const p = (N = n.dialogue) == null ? void 0 : N.voice;
|
|
395
|
+
p && (l.pause(), l.currentTime = 0, l.src = `${r}/voice/${p}`, l.volume = v * w, l.play().catch((A) => {
|
|
396
|
+
console.warn("Voice playback failed:", A);
|
|
393
397
|
}));
|
|
394
|
-
}, [(
|
|
395
|
-
n.pendingSounds.length !== 0 && n.pendingSounds.forEach((
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
console.warn("Sound playback failed:",
|
|
398
|
+
}, [(I = n.dialogue) == null ? void 0 : I.voice, v, w, r]), L(() => {
|
|
399
|
+
n.pendingSounds.length !== 0 && n.pendingSounds.forEach((l) => {
|
|
400
|
+
const p = new Audio(`${r}/sfx/${l}`);
|
|
401
|
+
p.volume = v * C, p.play().catch((N) => {
|
|
402
|
+
console.warn("Sound playback failed:", N);
|
|
399
403
|
});
|
|
400
404
|
});
|
|
401
|
-
}, [n.pendingSounds,
|
|
402
|
-
const
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
}).catch((
|
|
407
|
-
console.warn("Music playback failed:",
|
|
405
|
+
}, [n.pendingSounds, v, C, r]);
|
|
406
|
+
const q = (l, p, N) => {
|
|
407
|
+
Y(l, N / 2).then(() => {
|
|
408
|
+
l.src = p, l.load(), l.volume = 0, l.play().then(() => {
|
|
409
|
+
W(l, N / 2, v * x);
|
|
410
|
+
}).catch((A) => {
|
|
411
|
+
console.warn("Music playback failed:", A);
|
|
408
412
|
});
|
|
409
413
|
});
|
|
410
|
-
},
|
|
411
|
-
const
|
|
414
|
+
}, Y = (l, p) => new Promise((N) => {
|
|
415
|
+
const A = l.volume, V = 20, G = p / V, O = A / V;
|
|
412
416
|
let P = 0;
|
|
413
|
-
const
|
|
414
|
-
P++,
|
|
415
|
-
},
|
|
416
|
-
|
|
417
|
-
}),
|
|
418
|
-
const
|
|
419
|
-
let
|
|
417
|
+
const D = setInterval(() => {
|
|
418
|
+
P++, l.volume = Math.max(0, A - O * P), P >= V && (clearInterval(D), l.pause(), l.currentTime = 0, N());
|
|
419
|
+
}, G);
|
|
420
|
+
M.current = D;
|
|
421
|
+
}), W = (l, p, N) => {
|
|
422
|
+
const V = p / 20, G = N / 20;
|
|
423
|
+
let O = 0;
|
|
420
424
|
const P = setInterval(() => {
|
|
421
|
-
|
|
422
|
-
},
|
|
423
|
-
|
|
425
|
+
O++, l.volume = Math.min(N, G * O), O >= 20 && clearInterval(P);
|
|
426
|
+
}, V);
|
|
427
|
+
M.current = P;
|
|
424
428
|
};
|
|
425
429
|
return {
|
|
426
|
-
setMasterVolume:
|
|
427
|
-
setMusicVolume:
|
|
430
|
+
setMasterVolume: b,
|
|
431
|
+
setMusicVolume: _,
|
|
428
432
|
setSoundVolume: E,
|
|
429
|
-
setVoiceVolume:
|
|
433
|
+
setVoiceVolume: S,
|
|
430
434
|
stopAll: () => {
|
|
431
|
-
u.current && (u.current.pause(), u.current.currentTime = 0),
|
|
435
|
+
u.current && (u.current.pause(), u.current.currentTime = 0), h.current && (h.current.pause(), h.current.currentTime = 0);
|
|
432
436
|
}
|
|
433
437
|
};
|
|
434
438
|
}
|
|
435
|
-
const
|
|
439
|
+
const je = {
|
|
436
440
|
click: "click.ogg",
|
|
437
441
|
menuOpen: "menu_open.ogg",
|
|
438
442
|
menuClose: "menu_close.ogg"
|
|
439
443
|
};
|
|
440
|
-
function
|
|
444
|
+
function Ne(n = {}) {
|
|
441
445
|
const {
|
|
442
|
-
enabled:
|
|
446
|
+
enabled: t = !0,
|
|
443
447
|
basePath: r = "/audio/ui",
|
|
444
448
|
volume: a = 0.5,
|
|
445
|
-
sounds:
|
|
446
|
-
} = n, [
|
|
447
|
-
(
|
|
448
|
-
if (!
|
|
449
|
-
const u = new Audio(`${r}/${
|
|
450
|
-
u.volume =
|
|
449
|
+
sounds: o = {}
|
|
450
|
+
} = n, [c, d] = T(t), [m, v] = T(a), b = U({ ...je, ...o }), x = j(
|
|
451
|
+
(S) => {
|
|
452
|
+
if (!c || !S) return;
|
|
453
|
+
const u = new Audio(`${r}/${S}`);
|
|
454
|
+
u.volume = m, u.play().catch(() => {
|
|
451
455
|
});
|
|
452
456
|
},
|
|
453
|
-
[
|
|
454
|
-
),
|
|
455
|
-
(
|
|
456
|
-
const u =
|
|
457
|
+
[c, m, r]
|
|
458
|
+
), _ = j(
|
|
459
|
+
(S) => {
|
|
460
|
+
const u = b.current[S];
|
|
457
461
|
u && x(u);
|
|
458
462
|
},
|
|
459
463
|
[x]
|
|
460
|
-
),
|
|
464
|
+
), C = j(() => x(b.current.click), [x]), E = j(() => x(b.current.menuOpen), [x]), w = j(() => x(b.current.menuClose), [x]);
|
|
461
465
|
return {
|
|
462
|
-
playClick:
|
|
466
|
+
playClick: C,
|
|
463
467
|
playMenuOpen: E,
|
|
464
468
|
playMenuClose: w,
|
|
465
|
-
playSound:
|
|
466
|
-
setEnabled:
|
|
467
|
-
setVolume:
|
|
468
|
-
enabled:
|
|
469
|
-
volume:
|
|
469
|
+
playSound: _,
|
|
470
|
+
setEnabled: d,
|
|
471
|
+
setVolume: v,
|
|
472
|
+
enabled: c,
|
|
473
|
+
volume: m
|
|
470
474
|
};
|
|
471
475
|
}
|
|
472
|
-
function
|
|
473
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `dialogue-box ${
|
|
476
|
+
function ge({ dialogue: n, className: t = "" }) {
|
|
477
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `dialogue-box ${t}`, children: [
|
|
474
478
|
n.portrait && /* @__PURE__ */ e.jsx("div", { className: "dialogue-portrait", children: /* @__PURE__ */ e.jsx("img", { src: n.portrait, alt: n.speakerName }) }),
|
|
475
479
|
/* @__PURE__ */ e.jsxs("div", { className: "dialogue-content", children: [
|
|
476
480
|
/* @__PURE__ */ e.jsx("div", { className: "dialogue-speaker", children: n.speakerName }),
|
|
@@ -478,19 +482,19 @@ function Ne({ dialogue: n, className: s = "" }) {
|
|
|
478
482
|
] })
|
|
479
483
|
] });
|
|
480
484
|
}
|
|
481
|
-
function be({ choices: n, onSelectChoice:
|
|
485
|
+
function be({ choices: n, onSelectChoice: t, className: r = "" }) {
|
|
482
486
|
return n.length === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: `choice-list ${r}`, children: n.map((a) => /* @__PURE__ */ e.jsx(
|
|
483
487
|
"button",
|
|
484
488
|
{
|
|
485
489
|
className: "choice-button",
|
|
486
|
-
onClick: () =>
|
|
490
|
+
onClick: () => t(a.id),
|
|
487
491
|
children: a.text
|
|
488
492
|
},
|
|
489
493
|
a.id
|
|
490
494
|
)) });
|
|
491
495
|
}
|
|
492
|
-
function
|
|
493
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `location-view ${
|
|
496
|
+
function Se({ location: n, className: t = "" }) {
|
|
497
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `location-view ${t}`, children: [
|
|
494
498
|
n.banner && /* @__PURE__ */ e.jsx("div", { className: "location-banner", children: /* @__PURE__ */ e.jsx("img", { src: n.banner, alt: n.name }) }),
|
|
495
499
|
/* @__PURE__ */ e.jsxs("div", { className: "location-content", children: [
|
|
496
500
|
/* @__PURE__ */ e.jsx("h1", { className: "location-name", children: n.name }),
|
|
@@ -498,9 +502,9 @@ function ge({ location: n, className: s = "" }) {
|
|
|
498
502
|
] })
|
|
499
503
|
] });
|
|
500
504
|
}
|
|
501
|
-
function
|
|
505
|
+
function ke({
|
|
502
506
|
characters: n,
|
|
503
|
-
onTalkTo:
|
|
507
|
+
onTalkTo: t,
|
|
504
508
|
className: r = ""
|
|
505
509
|
}) {
|
|
506
510
|
return n.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: `character-list ${r}`, children: [
|
|
@@ -509,7 +513,7 @@ function Se({
|
|
|
509
513
|
"button",
|
|
510
514
|
{
|
|
511
515
|
className: "character-card",
|
|
512
|
-
onClick: () =>
|
|
516
|
+
onClick: () => t(a.id),
|
|
513
517
|
children: [
|
|
514
518
|
a.portrait && /* @__PURE__ */ e.jsx(
|
|
515
519
|
"img",
|
|
@@ -526,23 +530,23 @@ function Se({
|
|
|
526
530
|
)) })
|
|
527
531
|
] });
|
|
528
532
|
}
|
|
529
|
-
function
|
|
530
|
-
const [r, a] =
|
|
531
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `inventory ${
|
|
533
|
+
function ye({ items: n, className: t = "" }) {
|
|
534
|
+
const [r, a] = T(null);
|
|
535
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `inventory ${t}`, children: [
|
|
532
536
|
/* @__PURE__ */ e.jsx("h2", { children: "Inventory" }),
|
|
533
|
-
n.length === 0 ? /* @__PURE__ */ e.jsx("p", { className: "inventory-empty", children: "No items" }) : /* @__PURE__ */ e.jsx("div", { className: "inventory-grid", children: n.map((
|
|
537
|
+
n.length === 0 ? /* @__PURE__ */ e.jsx("p", { className: "inventory-empty", children: "No items" }) : /* @__PURE__ */ e.jsx("div", { className: "inventory-grid", children: n.map((o) => /* @__PURE__ */ e.jsxs(
|
|
534
538
|
"div",
|
|
535
539
|
{
|
|
536
540
|
className: "inventory-item",
|
|
537
|
-
onClick: () => a(
|
|
541
|
+
onClick: () => a(o),
|
|
538
542
|
children: [
|
|
539
|
-
|
|
540
|
-
/* @__PURE__ */ e.jsx("div", { className: "item-name", children:
|
|
543
|
+
o.icon && /* @__PURE__ */ e.jsx("img", { src: o.icon, alt: o.name, className: "item-icon" }),
|
|
544
|
+
/* @__PURE__ */ e.jsx("div", { className: "item-name", children: o.name })
|
|
541
545
|
]
|
|
542
546
|
},
|
|
543
|
-
|
|
547
|
+
o.id
|
|
544
548
|
)) }),
|
|
545
|
-
r && /* @__PURE__ */ e.jsx("div", { className: "item-modal-overlay", onClick: () => a(null), children: /* @__PURE__ */ e.jsxs("div", { className: "item-modal", onClick: (
|
|
549
|
+
r && /* @__PURE__ */ e.jsx("div", { className: "item-modal-overlay", onClick: () => a(null), children: /* @__PURE__ */ e.jsxs("div", { className: "item-modal", onClick: (o) => o.stopPropagation(), children: [
|
|
546
550
|
r.image && /* @__PURE__ */ e.jsx("img", { src: r.image, alt: r.name, className: "item-modal-image" }),
|
|
547
551
|
/* @__PURE__ */ e.jsx("h3", { className: "item-modal-name", children: r.name }),
|
|
548
552
|
/* @__PURE__ */ e.jsx("p", { className: "item-modal-description", children: r.description }),
|
|
@@ -550,7 +554,7 @@ function ke({ items: n, className: s = "" }) {
|
|
|
550
554
|
] }) })
|
|
551
555
|
] });
|
|
552
556
|
}
|
|
553
|
-
function
|
|
557
|
+
function Ee({ quests: n, entries: t, className: r = "" }) {
|
|
554
558
|
return /* @__PURE__ */ e.jsxs("div", { className: `journal ${r}`, children: [
|
|
555
559
|
/* @__PURE__ */ e.jsx("h2", { children: "Journal" }),
|
|
556
560
|
n.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "journal-quests", children: [
|
|
@@ -561,17 +565,17 @@ function ye({ quests: n, entries: s, className: r = "" }) {
|
|
|
561
565
|
/* @__PURE__ */ e.jsx("div", { className: "quest-stage", children: a.currentStageDescription })
|
|
562
566
|
] }, a.id))
|
|
563
567
|
] }),
|
|
564
|
-
|
|
568
|
+
t.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "journal-entries", children: [
|
|
565
569
|
/* @__PURE__ */ e.jsx("h3", { children: "Entries" }),
|
|
566
|
-
|
|
570
|
+
t.map((a) => /* @__PURE__ */ e.jsxs("div", { className: `journal-entry journal-category-${a.category}`, children: [
|
|
567
571
|
/* @__PURE__ */ e.jsx("div", { className: "entry-title", children: a.title }),
|
|
568
572
|
/* @__PURE__ */ e.jsx("div", { className: "entry-text", children: a.text })
|
|
569
573
|
] }, a.id))
|
|
570
574
|
] }),
|
|
571
|
-
n.length === 0 &&
|
|
575
|
+
n.length === 0 && t.length === 0 && /* @__PURE__ */ e.jsx("p", { className: "journal-empty", children: "No entries yet" })
|
|
572
576
|
] });
|
|
573
577
|
}
|
|
574
|
-
function
|
|
578
|
+
function we({ map: n, onTravelTo: t, className: r = "" }) {
|
|
575
579
|
return n ? /* @__PURE__ */ e.jsxs("div", { className: `map-view ${r}`, children: [
|
|
576
580
|
/* @__PURE__ */ e.jsx("h2", { children: n.name }),
|
|
577
581
|
/* @__PURE__ */ e.jsxs("div", { className: "map-container", style: { position: "relative" }, children: [
|
|
@@ -585,7 +589,7 @@ function Ee({ map: n, onTravelTo: s, className: r = "" }) {
|
|
|
585
589
|
left: `${a.x}px`,
|
|
586
590
|
top: `${a.y}px`
|
|
587
591
|
},
|
|
588
|
-
onClick: () => !a.isCurrent &&
|
|
592
|
+
onClick: () => !a.isCurrent && t(a.id),
|
|
589
593
|
disabled: a.isCurrent,
|
|
590
594
|
title: a.name,
|
|
591
595
|
children: a.name
|
|
@@ -597,139 +601,139 @@ function Ee({ map: n, onTravelTo: s, className: r = "" }) {
|
|
|
597
601
|
}
|
|
598
602
|
function Te({
|
|
599
603
|
notifications: n,
|
|
600
|
-
className:
|
|
604
|
+
className: t = ""
|
|
601
605
|
}) {
|
|
602
|
-
return n.length === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: `notification-area ${
|
|
606
|
+
return n.length === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: `notification-area ${t}`, children: n.map((r, a) => /* @__PURE__ */ e.jsx("div", { className: "notification", children: r }, a)) });
|
|
603
607
|
}
|
|
604
|
-
function
|
|
608
|
+
function _e({
|
|
605
609
|
onSave: n,
|
|
606
|
-
onLoad:
|
|
610
|
+
onLoad: t,
|
|
607
611
|
storageKey: r = "doodle-engine-save",
|
|
608
612
|
className: a = ""
|
|
609
613
|
}) {
|
|
610
|
-
const [
|
|
611
|
-
const
|
|
612
|
-
localStorage.setItem(r, JSON.stringify(
|
|
613
|
-
},
|
|
614
|
-
const
|
|
615
|
-
if (!
|
|
616
|
-
|
|
614
|
+
const [o, c] = T(""), d = () => {
|
|
615
|
+
const b = n();
|
|
616
|
+
localStorage.setItem(r, JSON.stringify(b)), c("Saved!"), setTimeout(() => c(""), 2e3);
|
|
617
|
+
}, m = () => {
|
|
618
|
+
const b = localStorage.getItem(r);
|
|
619
|
+
if (!b) {
|
|
620
|
+
c("No save found"), setTimeout(() => c(""), 2e3);
|
|
617
621
|
return;
|
|
618
622
|
}
|
|
619
|
-
const x = JSON.parse(
|
|
620
|
-
|
|
621
|
-
},
|
|
623
|
+
const x = JSON.parse(b);
|
|
624
|
+
t(x), c("Loaded!"), setTimeout(() => c(""), 2e3);
|
|
625
|
+
}, v = localStorage.getItem(r) !== null;
|
|
622
626
|
return /* @__PURE__ */ e.jsxs("div", { className: `save-load-panel ${a}`, children: [
|
|
623
|
-
/* @__PURE__ */ e.jsx("button", { className: "save-button", onClick:
|
|
624
|
-
/* @__PURE__ */ e.jsx("button", { className: "load-button", onClick:
|
|
625
|
-
|
|
627
|
+
/* @__PURE__ */ e.jsx("button", { className: "save-button", onClick: d, children: "Save" }),
|
|
628
|
+
/* @__PURE__ */ e.jsx("button", { className: "load-button", onClick: m, disabled: !v, children: "Load" }),
|
|
629
|
+
o && /* @__PURE__ */ e.jsx("span", { className: "save-load-message", children: o })
|
|
626
630
|
] });
|
|
627
631
|
}
|
|
628
|
-
function
|
|
629
|
-
const { snapshot:
|
|
630
|
-
le(
|
|
631
|
-
const a = Object.entries(
|
|
632
|
+
function Ce({ className: n = "" }) {
|
|
633
|
+
const { snapshot: t, actions: r } = re();
|
|
634
|
+
le(t);
|
|
635
|
+
const a = Object.entries(t.variables).filter(([o]) => !o.startsWith("_"));
|
|
632
636
|
return /* @__PURE__ */ e.jsxs("div", { className: `game-renderer ${n}`, children: [
|
|
633
|
-
/* @__PURE__ */ e.jsx(Te, { notifications:
|
|
637
|
+
/* @__PURE__ */ e.jsx(Te, { notifications: t.notifications }),
|
|
634
638
|
/* @__PURE__ */ e.jsxs("div", { className: "game-main", children: [
|
|
635
|
-
/* @__PURE__ */ e.jsx(
|
|
636
|
-
|
|
637
|
-
/* @__PURE__ */ e.jsx(
|
|
638
|
-
/* @__PURE__ */ e.jsx(be, { choices:
|
|
639
|
+
/* @__PURE__ */ e.jsx(Se, { location: t.location }),
|
|
640
|
+
t.dialogue && /* @__PURE__ */ e.jsxs("div", { className: "dialogue-container", children: [
|
|
641
|
+
/* @__PURE__ */ e.jsx(ge, { dialogue: t.dialogue }),
|
|
642
|
+
/* @__PURE__ */ e.jsx(be, { choices: t.choices, onSelectChoice: r.selectChoice })
|
|
639
643
|
] }),
|
|
640
|
-
!
|
|
641
|
-
|
|
644
|
+
!t.dialogue && /* @__PURE__ */ e.jsx(
|
|
645
|
+
ke,
|
|
642
646
|
{
|
|
643
|
-
characters:
|
|
647
|
+
characters: t.charactersHere,
|
|
644
648
|
onTalkTo: r.talkTo
|
|
645
649
|
}
|
|
646
650
|
)
|
|
647
651
|
] }),
|
|
648
652
|
/* @__PURE__ */ e.jsxs("div", { className: "game-sidebar", children: [
|
|
649
|
-
/* @__PURE__ */ e.jsx(
|
|
653
|
+
/* @__PURE__ */ e.jsx(_e, { onSave: r.saveGame, onLoad: r.loadGame }),
|
|
650
654
|
a.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "resources", children: [
|
|
651
655
|
/* @__PURE__ */ e.jsx("h2", { children: "Resources" }),
|
|
652
|
-
/* @__PURE__ */ e.jsx("ul", { className: "resources-list", children: a.map(([
|
|
653
|
-
/* @__PURE__ */ e.jsx("span", { className: "resource-name", children:
|
|
654
|
-
/* @__PURE__ */ e.jsx("span", { className: "resource-value", children:
|
|
655
|
-
] },
|
|
656
|
+
/* @__PURE__ */ e.jsx("ul", { className: "resources-list", children: a.map(([o, c]) => /* @__PURE__ */ e.jsxs("li", { className: "resource-entry", children: [
|
|
657
|
+
/* @__PURE__ */ e.jsx("span", { className: "resource-name", children: o }),
|
|
658
|
+
/* @__PURE__ */ e.jsx("span", { className: "resource-value", children: c })
|
|
659
|
+
] }, o)) })
|
|
656
660
|
] }),
|
|
657
|
-
|
|
661
|
+
t.party.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "party", children: [
|
|
658
662
|
/* @__PURE__ */ e.jsx("h2", { children: "Party" }),
|
|
659
|
-
/* @__PURE__ */ e.jsx("ul", { className: "party-list", children:
|
|
663
|
+
/* @__PURE__ */ e.jsx("ul", { className: "party-list", children: t.party.map((o) => /* @__PURE__ */ e.jsx("li", { className: "party-member", children: /* @__PURE__ */ e.jsx("span", { className: "party-member-name", children: o.name }) }, o.id)) })
|
|
660
664
|
] }),
|
|
661
|
-
/* @__PURE__ */ e.jsx(
|
|
662
|
-
/* @__PURE__ */ e.jsx(
|
|
663
|
-
|
|
665
|
+
/* @__PURE__ */ e.jsx(ye, { items: t.inventory }),
|
|
666
|
+
/* @__PURE__ */ e.jsx(Ee, { quests: t.quests, entries: t.journal }),
|
|
667
|
+
t.map && /* @__PURE__ */ e.jsx(we, { map: t.map, onTravelTo: r.travelTo })
|
|
664
668
|
] })
|
|
665
669
|
] });
|
|
666
670
|
}
|
|
667
|
-
function
|
|
671
|
+
function Re({
|
|
668
672
|
logoSrc: n,
|
|
669
|
-
title:
|
|
673
|
+
title: t,
|
|
670
674
|
onComplete: r,
|
|
671
675
|
duration: a = 2e3,
|
|
672
|
-
className:
|
|
676
|
+
className: o = ""
|
|
673
677
|
}) {
|
|
674
678
|
return L(() => {
|
|
675
|
-
const
|
|
676
|
-
return () => clearTimeout(
|
|
677
|
-
}, [r, a]), /* @__PURE__ */ e.jsxs("div", { className: `splash-screen ${
|
|
678
|
-
n && /* @__PURE__ */ e.jsx("img", { src: n, alt:
|
|
679
|
-
|
|
679
|
+
const c = setTimeout(r, a);
|
|
680
|
+
return () => clearTimeout(c);
|
|
681
|
+
}, [r, a]), /* @__PURE__ */ e.jsxs("div", { className: `splash-screen ${o}`, onClick: r, children: [
|
|
682
|
+
n && /* @__PURE__ */ e.jsx("img", { src: n, alt: t || "", className: "splash-logo" }),
|
|
683
|
+
t && /* @__PURE__ */ e.jsx("h1", { className: "splash-title", children: t }),
|
|
680
684
|
/* @__PURE__ */ e.jsx("div", { className: "splash-loading", children: "Loading..." })
|
|
681
685
|
] });
|
|
682
686
|
}
|
|
683
|
-
function
|
|
687
|
+
function Ae({
|
|
684
688
|
title: n = "Doodle Engine",
|
|
685
|
-
subtitle:
|
|
689
|
+
subtitle: t,
|
|
686
690
|
logoSrc: r,
|
|
687
691
|
hasSaveData: a,
|
|
688
|
-
onNewGame:
|
|
689
|
-
onContinue:
|
|
690
|
-
onSettings:
|
|
691
|
-
className:
|
|
692
|
+
onNewGame: o,
|
|
693
|
+
onContinue: c,
|
|
694
|
+
onSettings: d,
|
|
695
|
+
className: m = ""
|
|
692
696
|
}) {
|
|
693
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `title-screen ${
|
|
697
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `title-screen ${m}`, children: [
|
|
694
698
|
r && /* @__PURE__ */ e.jsx("img", { src: r, alt: n, className: "title-logo" }),
|
|
695
699
|
/* @__PURE__ */ e.jsx("h1", { className: "title-heading", children: n }),
|
|
696
|
-
|
|
700
|
+
t && /* @__PURE__ */ e.jsx("p", { className: "title-subtitle", children: t }),
|
|
697
701
|
/* @__PURE__ */ e.jsxs("div", { className: "title-menu", children: [
|
|
698
|
-
/* @__PURE__ */ e.jsx("button", { className: "title-button", onClick:
|
|
699
|
-
a && /* @__PURE__ */ e.jsx("button", { className: "title-button", onClick:
|
|
700
|
-
/* @__PURE__ */ e.jsx("button", { className: "title-button", onClick:
|
|
702
|
+
/* @__PURE__ */ e.jsx("button", { className: "title-button", onClick: o, children: "New Game" }),
|
|
703
|
+
a && /* @__PURE__ */ e.jsx("button", { className: "title-button", onClick: c, children: "Continue" }),
|
|
704
|
+
/* @__PURE__ */ e.jsx("button", { className: "title-button", onClick: d, children: "Settings" })
|
|
701
705
|
] })
|
|
702
706
|
] });
|
|
703
707
|
}
|
|
704
|
-
function
|
|
708
|
+
function Oe({
|
|
705
709
|
onResume: n,
|
|
706
|
-
onSave:
|
|
710
|
+
onSave: t,
|
|
707
711
|
onLoad: r,
|
|
708
712
|
onSettings: a,
|
|
709
|
-
onQuitToTitle:
|
|
710
|
-
className:
|
|
713
|
+
onQuitToTitle: o,
|
|
714
|
+
className: c = ""
|
|
711
715
|
}) {
|
|
712
|
-
return /* @__PURE__ */ e.jsx("div", { className: `pause-menu-overlay ${
|
|
716
|
+
return /* @__PURE__ */ e.jsx("div", { className: `pause-menu-overlay ${c}`, children: /* @__PURE__ */ e.jsxs("div", { className: "pause-menu", children: [
|
|
713
717
|
/* @__PURE__ */ e.jsx("h2", { className: "pause-title", children: "Paused" }),
|
|
714
718
|
/* @__PURE__ */ e.jsxs("div", { className: "pause-buttons", children: [
|
|
715
719
|
/* @__PURE__ */ e.jsx("button", { className: "pause-button", onClick: n, children: "Resume" }),
|
|
716
|
-
/* @__PURE__ */ e.jsx("button", { className: "pause-button", onClick:
|
|
720
|
+
/* @__PURE__ */ e.jsx("button", { className: "pause-button", onClick: t, children: "Save" }),
|
|
717
721
|
/* @__PURE__ */ e.jsx("button", { className: "pause-button", onClick: r, children: "Load" }),
|
|
718
722
|
/* @__PURE__ */ e.jsx("button", { className: "pause-button", onClick: a, children: "Settings" }),
|
|
719
|
-
/* @__PURE__ */ e.jsx("button", { className: "pause-button pause-button-quit", onClick:
|
|
723
|
+
/* @__PURE__ */ e.jsx("button", { className: "pause-button pause-button-quit", onClick: o, children: "Quit to Title" })
|
|
720
724
|
] })
|
|
721
725
|
] }) });
|
|
722
726
|
}
|
|
723
727
|
function oe({
|
|
724
728
|
audioControls: n,
|
|
725
|
-
uiSoundControls:
|
|
729
|
+
uiSoundControls: t,
|
|
726
730
|
availableLocales: r,
|
|
727
731
|
currentLocale: a,
|
|
728
|
-
onLocaleChange:
|
|
729
|
-
onBack:
|
|
730
|
-
className:
|
|
732
|
+
onLocaleChange: o,
|
|
733
|
+
onBack: c,
|
|
734
|
+
className: d = ""
|
|
731
735
|
}) {
|
|
732
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `settings-panel ${
|
|
736
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `settings-panel ${d}`, children: [
|
|
733
737
|
/* @__PURE__ */ e.jsx("h2", { className: "settings-title", children: "Settings" }),
|
|
734
738
|
/* @__PURE__ */ e.jsxs("div", { className: "settings-section", children: [
|
|
735
739
|
/* @__PURE__ */ e.jsx("h3", { children: "Audio" }),
|
|
@@ -765,33 +769,33 @@ function oe({
|
|
|
765
769
|
onChange: n.setVoiceVolume
|
|
766
770
|
}
|
|
767
771
|
),
|
|
768
|
-
|
|
772
|
+
t && /* @__PURE__ */ e.jsx(
|
|
769
773
|
Q,
|
|
770
774
|
{
|
|
771
775
|
label: "UI Sounds",
|
|
772
|
-
value:
|
|
773
|
-
onChange:
|
|
776
|
+
value: t.volume,
|
|
777
|
+
onChange: t.setVolume
|
|
774
778
|
}
|
|
775
779
|
)
|
|
776
780
|
] }),
|
|
777
|
-
r && r.length > 1 &&
|
|
781
|
+
r && r.length > 1 && o && /* @__PURE__ */ e.jsxs("div", { className: "settings-section", children: [
|
|
778
782
|
/* @__PURE__ */ e.jsx("h3", { children: "Language" }),
|
|
779
783
|
/* @__PURE__ */ e.jsx(
|
|
780
784
|
"select",
|
|
781
785
|
{
|
|
782
786
|
className: "settings-locale-select",
|
|
783
787
|
value: a,
|
|
784
|
-
onChange: (
|
|
785
|
-
children: r.map((
|
|
788
|
+
onChange: (m) => o(m.target.value),
|
|
789
|
+
children: r.map((m) => /* @__PURE__ */ e.jsx("option", { value: m.code, children: m.label }, m.code))
|
|
786
790
|
}
|
|
787
791
|
)
|
|
788
792
|
] }),
|
|
789
|
-
/* @__PURE__ */ e.jsx("button", { className: "settings-back-button", onClick:
|
|
793
|
+
/* @__PURE__ */ e.jsx("button", { className: "settings-back-button", onClick: c, children: "Back" })
|
|
790
794
|
] });
|
|
791
795
|
}
|
|
792
796
|
function Q({
|
|
793
797
|
label: n,
|
|
794
|
-
value:
|
|
798
|
+
value: t,
|
|
795
799
|
onChange: r
|
|
796
800
|
}) {
|
|
797
801
|
return /* @__PURE__ */ e.jsxs("div", { className: "volume-slider", children: [
|
|
@@ -803,31 +807,31 @@ function Q({
|
|
|
803
807
|
min: "0",
|
|
804
808
|
max: "1",
|
|
805
809
|
step: "0.05",
|
|
806
|
-
defaultValue:
|
|
810
|
+
defaultValue: t,
|
|
807
811
|
onChange: (a) => r(parseFloat(a.target.value)),
|
|
808
812
|
className: "volume-input"
|
|
809
813
|
}
|
|
810
814
|
)
|
|
811
815
|
] });
|
|
812
816
|
}
|
|
813
|
-
function
|
|
817
|
+
function Pe({
|
|
814
818
|
src: n,
|
|
815
|
-
basePath:
|
|
819
|
+
basePath: t = "/video",
|
|
816
820
|
onComplete: r,
|
|
817
821
|
className: a = ""
|
|
818
822
|
}) {
|
|
819
|
-
const
|
|
823
|
+
const o = U(null);
|
|
820
824
|
return L(() => {
|
|
821
|
-
const
|
|
822
|
-
(
|
|
825
|
+
const c = (d) => {
|
|
826
|
+
(d.key === "Escape" || d.key === " " || d.key === "Enter") && (d.preventDefault(), r());
|
|
823
827
|
};
|
|
824
|
-
return window.addEventListener("keydown",
|
|
828
|
+
return window.addEventListener("keydown", c), () => window.removeEventListener("keydown", c);
|
|
825
829
|
}, [r]), /* @__PURE__ */ e.jsxs("div", { className: `video-player-overlay ${a}`, children: [
|
|
826
830
|
/* @__PURE__ */ e.jsx(
|
|
827
831
|
"video",
|
|
828
832
|
{
|
|
829
|
-
ref:
|
|
830
|
-
src: `${
|
|
833
|
+
ref: o,
|
|
834
|
+
src: `${t}/${n}`,
|
|
831
835
|
autoPlay: !0,
|
|
832
836
|
onEnded: r,
|
|
833
837
|
className: "video-player-video"
|
|
@@ -843,29 +847,30 @@ function Oe({
|
|
|
843
847
|
)
|
|
844
848
|
] });
|
|
845
849
|
}
|
|
846
|
-
function
|
|
850
|
+
function Ie({
|
|
847
851
|
registry: n,
|
|
848
|
-
config:
|
|
852
|
+
config: t,
|
|
849
853
|
title: r = "Doodle Engine",
|
|
850
854
|
subtitle: a,
|
|
851
|
-
logoSrc:
|
|
852
|
-
splashDuration:
|
|
853
|
-
uiSounds:
|
|
854
|
-
audioOptions:
|
|
855
|
-
storageKey:
|
|
856
|
-
availableLocales:
|
|
855
|
+
logoSrc: o,
|
|
856
|
+
splashDuration: c = 2e3,
|
|
857
|
+
uiSounds: d,
|
|
858
|
+
audioOptions: m,
|
|
859
|
+
storageKey: v = "doodle-engine-save",
|
|
860
|
+
availableLocales: b,
|
|
857
861
|
videoBasePath: x = "/video",
|
|
858
|
-
className:
|
|
862
|
+
className: _ = "",
|
|
863
|
+
devTools: C = !1
|
|
859
864
|
}) {
|
|
860
|
-
const [
|
|
861
|
-
|
|
862
|
-
),
|
|
863
|
-
const
|
|
864
|
-
currentLocation:
|
|
865
|
-
currentTime: { ...
|
|
866
|
-
flags: { ...
|
|
867
|
-
variables: { ...
|
|
868
|
-
inventory: [...
|
|
865
|
+
const [E, w] = T(c > 0 ? "splash" : "title"), [S, u] = T(!1), [h, $] = T(!1), [M, q] = T("title"), [Y, W] = T(null), [R, I] = T(null), l = Ne(
|
|
866
|
+
d === !1 ? { enabled: !1 } : d
|
|
867
|
+
), p = localStorage.getItem(v) !== null, N = j(() => {
|
|
868
|
+
const g = {
|
|
869
|
+
currentLocation: t.startLocation,
|
|
870
|
+
currentTime: { ...t.startTime },
|
|
871
|
+
flags: { ...t.startFlags },
|
|
872
|
+
variables: { ...t.startVariables },
|
|
873
|
+
inventory: [...t.startInventory],
|
|
869
874
|
questProgress: {},
|
|
870
875
|
unlockedJournalEntries: [],
|
|
871
876
|
playerNotes: [],
|
|
@@ -878,42 +883,42 @@ function Me({
|
|
|
878
883
|
pendingVideo: null,
|
|
879
884
|
currentLocale: "en"
|
|
880
885
|
};
|
|
881
|
-
return new
|
|
882
|
-
}, [n,
|
|
883
|
-
|
|
884
|
-
const
|
|
885
|
-
|
|
886
|
-
}, [
|
|
887
|
-
|
|
888
|
-
const
|
|
889
|
-
if (!
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
}, [
|
|
893
|
-
if (!
|
|
894
|
-
|
|
895
|
-
const
|
|
896
|
-
localStorage.setItem(
|
|
897
|
-
}, [
|
|
898
|
-
const
|
|
899
|
-
if (!
|
|
900
|
-
|
|
901
|
-
const
|
|
902
|
-
|
|
903
|
-
}, [
|
|
904
|
-
|
|
905
|
-
}, [
|
|
906
|
-
|
|
907
|
-
}, [
|
|
908
|
-
|
|
909
|
-
}, [
|
|
886
|
+
return new ue(n, g);
|
|
887
|
+
}, [n, t]), A = j(() => {
|
|
888
|
+
l.playClick();
|
|
889
|
+
const g = N(), s = g.newGame(t);
|
|
890
|
+
I({ engine: g, snapshot: s }), w("playing");
|
|
891
|
+
}, [N, t, l]), V = j(() => {
|
|
892
|
+
l.playClick();
|
|
893
|
+
const g = localStorage.getItem(v);
|
|
894
|
+
if (!g) return;
|
|
895
|
+
const s = JSON.parse(g), i = N(), f = i.loadGame(s);
|
|
896
|
+
I({ engine: i, snapshot: f }), w("playing");
|
|
897
|
+
}, [N, v, l]), G = j(() => {
|
|
898
|
+
if (!R) return;
|
|
899
|
+
l.playClick();
|
|
900
|
+
const g = R.engine.saveGame();
|
|
901
|
+
localStorage.setItem(v, JSON.stringify(g)), u(!1);
|
|
902
|
+
}, [R, v, l]), O = j(() => {
|
|
903
|
+
const g = localStorage.getItem(v);
|
|
904
|
+
if (!g || !R) return;
|
|
905
|
+
l.playClick();
|
|
906
|
+
const s = JSON.parse(g), i = R.engine.loadGame(s);
|
|
907
|
+
I({ engine: R.engine, snapshot: i }), u(!1);
|
|
908
|
+
}, [R, v, l]), P = j(() => {
|
|
909
|
+
l.playClick(), u(!1), $(!1), I(null), w("title");
|
|
910
|
+
}, [l]), D = j((g) => {
|
|
911
|
+
l.playMenuOpen(), q(g), $(!0), g === "pause" && u(!1);
|
|
912
|
+
}, [l]), F = j(() => {
|
|
913
|
+
l.playMenuClose(), $(!1), M === "pause" && u(!0);
|
|
914
|
+
}, [M, l]);
|
|
910
915
|
L(() => {
|
|
911
|
-
if (
|
|
912
|
-
const
|
|
913
|
-
|
|
916
|
+
if (E !== "playing") return;
|
|
917
|
+
const g = (s) => {
|
|
918
|
+
s.key === "Escape" && (s.preventDefault(), h ? F() : (S ? l.playMenuClose() : l.playMenuOpen(), u((i) => !i)));
|
|
914
919
|
};
|
|
915
|
-
return window.addEventListener("keydown",
|
|
916
|
-
}, [
|
|
920
|
+
return window.addEventListener("keydown", g), () => window.removeEventListener("keydown", g);
|
|
921
|
+
}, [E, S, h, F, l]);
|
|
917
922
|
const X = {
|
|
918
923
|
setMasterVolume: () => {
|
|
919
924
|
},
|
|
@@ -926,141 +931,148 @@ function Me({
|
|
|
926
931
|
stopAll: () => {
|
|
927
932
|
}
|
|
928
933
|
};
|
|
929
|
-
return
|
|
930
|
-
|
|
934
|
+
return E === "splash" ? /* @__PURE__ */ e.jsx("div", { className: `game-shell ${_}`, children: /* @__PURE__ */ e.jsx(
|
|
935
|
+
Re,
|
|
931
936
|
{
|
|
932
|
-
logoSrc:
|
|
937
|
+
logoSrc: o,
|
|
933
938
|
title: r,
|
|
934
|
-
onComplete: () =>
|
|
935
|
-
duration:
|
|
939
|
+
onComplete: () => w("title"),
|
|
940
|
+
duration: c
|
|
936
941
|
}
|
|
937
|
-
) }) :
|
|
942
|
+
) }) : E === "title" ? /* @__PURE__ */ e.jsx("div", { className: `game-shell ${_}`, children: h ? /* @__PURE__ */ e.jsx(
|
|
938
943
|
oe,
|
|
939
944
|
{
|
|
940
945
|
audioControls: X,
|
|
941
|
-
uiSoundControls:
|
|
942
|
-
availableLocales:
|
|
943
|
-
onBack:
|
|
946
|
+
uiSoundControls: d !== !1 ? l : void 0,
|
|
947
|
+
availableLocales: b,
|
|
948
|
+
onBack: F
|
|
944
949
|
}
|
|
945
950
|
) : /* @__PURE__ */ e.jsx(
|
|
946
|
-
|
|
951
|
+
Ae,
|
|
947
952
|
{
|
|
948
953
|
title: r,
|
|
949
954
|
subtitle: a,
|
|
950
|
-
logoSrc:
|
|
951
|
-
hasSaveData:
|
|
952
|
-
onNewGame:
|
|
953
|
-
onContinue:
|
|
954
|
-
onSettings: () =>
|
|
955
|
+
logoSrc: o,
|
|
956
|
+
hasSaveData: p,
|
|
957
|
+
onNewGame: A,
|
|
958
|
+
onContinue: V,
|
|
959
|
+
onSettings: () => D("title")
|
|
955
960
|
}
|
|
956
|
-
) }) :
|
|
957
|
-
|
|
961
|
+
) }) : R ? /* @__PURE__ */ e.jsx("div", { className: `game-shell ${_}`, children: /* @__PURE__ */ e.jsx(xe, { engine: R.engine, initialSnapshot: R.snapshot, devTools: C, children: /* @__PURE__ */ e.jsx(
|
|
962
|
+
$e,
|
|
958
963
|
{
|
|
959
|
-
audioOptions:
|
|
960
|
-
uiSoundControls:
|
|
961
|
-
showPauseMenu:
|
|
962
|
-
showSettings:
|
|
963
|
-
availableLocales:
|
|
964
|
+
audioOptions: m,
|
|
965
|
+
uiSoundControls: d !== !1 ? l : void 0,
|
|
966
|
+
showPauseMenu: S,
|
|
967
|
+
showSettings: h,
|
|
968
|
+
availableLocales: b,
|
|
964
969
|
videoBasePath: x,
|
|
965
|
-
pendingVideo:
|
|
966
|
-
setPendingVideo:
|
|
970
|
+
pendingVideo: Y,
|
|
971
|
+
setPendingVideo: W,
|
|
967
972
|
onPause: () => {
|
|
968
|
-
|
|
973
|
+
l.playMenuOpen(), u(!0);
|
|
969
974
|
},
|
|
970
975
|
onResume: () => {
|
|
971
|
-
|
|
976
|
+
l.playMenuClose(), u(!1);
|
|
972
977
|
},
|
|
973
|
-
onSave:
|
|
974
|
-
onLoad:
|
|
975
|
-
onSettings: () =>
|
|
976
|
-
onQuitToTitle:
|
|
977
|
-
onCloseSettings:
|
|
978
|
+
onSave: G,
|
|
979
|
+
onLoad: O,
|
|
980
|
+
onSettings: () => D("pause"),
|
|
981
|
+
onQuitToTitle: P,
|
|
982
|
+
onCloseSettings: F
|
|
978
983
|
}
|
|
979
984
|
) }) }) : null;
|
|
980
985
|
}
|
|
981
|
-
function
|
|
986
|
+
function $e({
|
|
982
987
|
audioOptions: n,
|
|
983
|
-
uiSoundControls:
|
|
988
|
+
uiSoundControls: t,
|
|
984
989
|
showPauseMenu: r,
|
|
985
990
|
showSettings: a,
|
|
986
|
-
availableLocales:
|
|
987
|
-
videoBasePath:
|
|
988
|
-
pendingVideo:
|
|
989
|
-
setPendingVideo:
|
|
990
|
-
onPause:
|
|
991
|
-
onResume:
|
|
991
|
+
availableLocales: o,
|
|
992
|
+
videoBasePath: c,
|
|
993
|
+
pendingVideo: d,
|
|
994
|
+
setPendingVideo: m,
|
|
995
|
+
onPause: v,
|
|
996
|
+
onResume: b,
|
|
992
997
|
onSave: x,
|
|
993
|
-
onLoad:
|
|
994
|
-
onSettings:
|
|
998
|
+
onLoad: _,
|
|
999
|
+
onSettings: C,
|
|
995
1000
|
onQuitToTitle: E,
|
|
996
1001
|
onCloseSettings: w
|
|
997
1002
|
}) {
|
|
998
|
-
const { snapshot:
|
|
1003
|
+
const { snapshot: S, actions: u } = re(), h = le(S, n);
|
|
999
1004
|
return L(() => {
|
|
1000
|
-
|
|
1001
|
-
}, [
|
|
1002
|
-
|
|
1003
|
-
|
|
1005
|
+
S.pendingVideo && m(S.pendingVideo);
|
|
1006
|
+
}, [S.pendingVideo, m]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1007
|
+
d && /* @__PURE__ */ e.jsx(
|
|
1008
|
+
Pe,
|
|
1004
1009
|
{
|
|
1005
|
-
src:
|
|
1006
|
-
basePath:
|
|
1007
|
-
onComplete: () =>
|
|
1010
|
+
src: d,
|
|
1011
|
+
basePath: c,
|
|
1012
|
+
onComplete: () => m(null)
|
|
1008
1013
|
}
|
|
1009
1014
|
),
|
|
1010
|
-
/* @__PURE__ */ e.jsx(
|
|
1011
|
-
!r && !a && !
|
|
1015
|
+
/* @__PURE__ */ e.jsx(Ce, {}),
|
|
1016
|
+
!r && !a && !d && /* @__PURE__ */ e.jsx(
|
|
1012
1017
|
"button",
|
|
1013
1018
|
{
|
|
1014
1019
|
className: "game-shell-menu-button",
|
|
1015
|
-
onClick:
|
|
1020
|
+
onClick: v,
|
|
1016
1021
|
"aria-label": "Menu",
|
|
1017
1022
|
children: "Menu"
|
|
1018
1023
|
}
|
|
1019
1024
|
),
|
|
1020
1025
|
r && /* @__PURE__ */ e.jsx(
|
|
1021
|
-
|
|
1026
|
+
Oe,
|
|
1022
1027
|
{
|
|
1023
|
-
onResume:
|
|
1028
|
+
onResume: b,
|
|
1024
1029
|
onSave: x,
|
|
1025
|
-
onLoad:
|
|
1026
|
-
onSettings:
|
|
1030
|
+
onLoad: _,
|
|
1031
|
+
onSettings: C,
|
|
1027
1032
|
onQuitToTitle: E
|
|
1028
1033
|
}
|
|
1029
1034
|
),
|
|
1030
1035
|
a && /* @__PURE__ */ e.jsx(
|
|
1031
1036
|
oe,
|
|
1032
1037
|
{
|
|
1033
|
-
audioControls:
|
|
1034
|
-
uiSoundControls:
|
|
1035
|
-
availableLocales:
|
|
1036
|
-
currentLocale: (
|
|
1038
|
+
audioControls: h,
|
|
1039
|
+
uiSoundControls: t,
|
|
1040
|
+
availableLocales: o,
|
|
1041
|
+
currentLocale: (S.time, void 0),
|
|
1037
1042
|
onLocaleChange: u.setLocale,
|
|
1038
1043
|
onBack: w
|
|
1039
1044
|
}
|
|
1040
1045
|
)
|
|
1041
1046
|
] });
|
|
1042
1047
|
}
|
|
1048
|
+
function Le({ message: n = "Loading...", className: t = "" }) {
|
|
1049
|
+
return /* @__PURE__ */ e.jsx("div", { className: `loading-screen ${t}`, children: /* @__PURE__ */ e.jsxs("div", { className: "loading-screen-content", children: [
|
|
1050
|
+
/* @__PURE__ */ e.jsx("div", { className: "loading-screen-spinner" }),
|
|
1051
|
+
/* @__PURE__ */ e.jsx("p", { className: "loading-screen-message", children: n })
|
|
1052
|
+
] }) });
|
|
1053
|
+
}
|
|
1043
1054
|
export {
|
|
1044
|
-
|
|
1055
|
+
ke as CharacterList,
|
|
1045
1056
|
be as ChoiceList,
|
|
1046
|
-
|
|
1057
|
+
ge as DialogueBox,
|
|
1047
1058
|
ae as GameContext,
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1059
|
+
xe as GameProvider,
|
|
1060
|
+
Ce as GameRenderer,
|
|
1061
|
+
Ie as GameShell,
|
|
1062
|
+
ye as Inventory,
|
|
1063
|
+
Ee as Journal,
|
|
1064
|
+
Le as LoadingScreen,
|
|
1065
|
+
Se as LocationView,
|
|
1066
|
+
we as MapView,
|
|
1055
1067
|
Te as NotificationArea,
|
|
1056
|
-
|
|
1057
|
-
|
|
1068
|
+
Oe as PauseMenu,
|
|
1069
|
+
_e as SaveLoadPanel,
|
|
1058
1070
|
oe as SettingsPanel,
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1071
|
+
Re as SplashScreen,
|
|
1072
|
+
Ae as TitleScreen,
|
|
1073
|
+
Fe as VERSION,
|
|
1074
|
+
Pe as VideoPlayer,
|
|
1063
1075
|
le as useAudioManager,
|
|
1064
1076
|
re as useGame,
|
|
1065
|
-
|
|
1077
|
+
Ne as useUISounds
|
|
1066
1078
|
};
|