@rpgjs/client 5.0.0-alpha.22 → 5.0.0-alpha.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/Game/Object.d.ts +2 -0
  2. package/dist/RpgClientEngine.d.ts +115 -9
  3. package/dist/components/gui/mobile/index.d.ts +8 -0
  4. package/dist/components/prebuilt/index.d.ts +1 -0
  5. package/dist/index.d.ts +5 -0
  6. package/dist/index.js +13 -8
  7. package/dist/index.js.map +1 -1
  8. package/dist/index10.js +1 -1
  9. package/dist/index11.js +6 -5
  10. package/dist/index11.js.map +1 -1
  11. package/dist/index12.js +2 -2
  12. package/dist/index13.js +102 -10
  13. package/dist/index13.js.map +1 -1
  14. package/dist/index14.js +67 -9
  15. package/dist/index14.js.map +1 -1
  16. package/dist/index15.js +10 -263
  17. package/dist/index15.js.map +1 -1
  18. package/dist/index16.js +9 -97
  19. package/dist/index16.js.map +1 -1
  20. package/dist/index17.js +300 -89
  21. package/dist/index17.js.map +1 -1
  22. package/dist/index18.js +63 -80
  23. package/dist/index18.js.map +1 -1
  24. package/dist/index19.js +96 -348
  25. package/dist/index19.js.map +1 -1
  26. package/dist/index2.js +176 -24
  27. package/dist/index2.js.map +1 -1
  28. package/dist/index20.js +360 -17
  29. package/dist/index20.js.map +1 -1
  30. package/dist/index21.js +19 -50
  31. package/dist/index21.js.map +1 -1
  32. package/dist/index22.js +212 -5
  33. package/dist/index22.js.map +1 -1
  34. package/dist/index23.js +6 -395
  35. package/dist/index23.js.map +1 -1
  36. package/dist/index24.js +4 -39
  37. package/dist/index24.js.map +1 -1
  38. package/dist/index25.js +19 -20
  39. package/dist/index25.js.map +1 -1
  40. package/dist/index26.js +43 -2624
  41. package/dist/index26.js.map +1 -1
  42. package/dist/index27.js +5 -110
  43. package/dist/index27.js.map +1 -1
  44. package/dist/index28.js +394 -65
  45. package/dist/index28.js.map +1 -1
  46. package/dist/index29.js +40 -15
  47. package/dist/index29.js.map +1 -1
  48. package/dist/index3.js +3 -3
  49. package/dist/index30.js +21 -23
  50. package/dist/index30.js.map +1 -1
  51. package/dist/index31.js +2624 -86
  52. package/dist/index31.js.map +1 -1
  53. package/dist/index32.js +107 -34
  54. package/dist/index32.js.map +1 -1
  55. package/dist/index33.js +69 -22
  56. package/dist/index33.js.map +1 -1
  57. package/dist/index34.js +19 -3
  58. package/dist/index34.js.map +1 -1
  59. package/dist/index35.js +21 -329
  60. package/dist/index35.js.map +1 -1
  61. package/dist/index36.js +91 -30
  62. package/dist/index36.js.map +1 -1
  63. package/dist/index37.js +37 -7
  64. package/dist/index37.js.map +1 -1
  65. package/dist/index38.js +22 -9
  66. package/dist/index38.js.map +1 -1
  67. package/dist/index39.js +139 -10
  68. package/dist/index39.js.map +1 -1
  69. package/dist/index4.js +3 -3
  70. package/dist/index40.js +16 -6
  71. package/dist/index40.js.map +1 -1
  72. package/dist/index41.js +1 -325
  73. package/dist/index41.js.map +1 -1
  74. package/dist/index42.js +530 -3680
  75. package/dist/index42.js.map +1 -1
  76. package/dist/index43.js +24 -67
  77. package/dist/index43.js.map +1 -1
  78. package/dist/index44.js +9 -184
  79. package/dist/index44.js.map +1 -1
  80. package/dist/index45.js +6 -503
  81. package/dist/index45.js.map +1 -1
  82. package/dist/index46.js +325 -2
  83. package/dist/index46.js.map +1 -1
  84. package/dist/index47.js +3687 -17
  85. package/dist/index47.js.map +1 -1
  86. package/dist/index48.js +69 -202
  87. package/dist/index48.js.map +1 -1
  88. package/dist/index49.js +182 -7
  89. package/dist/index49.js.map +1 -1
  90. package/dist/index5.js +1 -1
  91. package/dist/index50.js +497 -106
  92. package/dist/index50.js.map +1 -1
  93. package/dist/index51.js +48 -130
  94. package/dist/index51.js.map +1 -1
  95. package/dist/index52.js +17 -134
  96. package/dist/index52.js.map +1 -1
  97. package/dist/index53.js +3 -109
  98. package/dist/index53.js.map +1 -1
  99. package/dist/index54.js +9 -138
  100. package/dist/index54.js.map +1 -1
  101. package/dist/index55.js +111 -7
  102. package/dist/index55.js.map +1 -1
  103. package/dist/index56.js +130 -48
  104. package/dist/index56.js.map +1 -1
  105. package/dist/index57.js +137 -0
  106. package/dist/index57.js.map +1 -0
  107. package/dist/index58.js +112 -0
  108. package/dist/index58.js.map +1 -0
  109. package/dist/index59.js +9 -0
  110. package/dist/index59.js.map +1 -0
  111. package/dist/index6.js +1 -1
  112. package/dist/index7.js +1 -1
  113. package/dist/index8.js +17 -2
  114. package/dist/index8.js.map +1 -1
  115. package/dist/index9.js +10 -27
  116. package/dist/index9.js.map +1 -1
  117. package/dist/services/keyboardControls.d.ts +1 -2
  118. package/dist/services/mmorpg.d.ts +1 -1
  119. package/dist/services/standalone.d.ts +1 -1
  120. package/package.json +9 -9
  121. package/src/Game/Object.ts +8 -0
  122. package/src/Gui/Gui.ts +4 -31
  123. package/src/RpgClientEngine.ts +193 -20
  124. package/src/components/character.ce +146 -9
  125. package/src/components/gui/mobile/index.ts +24 -0
  126. package/src/components/gui/mobile/mobile.ce +80 -0
  127. package/src/components/prebuilt/index.ts +1 -0
  128. package/src/components/prebuilt/light-halo.ce +148 -0
  129. package/src/components/scenes/canvas.ce +2 -2
  130. package/src/components/scenes/event-layer.ce +1 -0
  131. package/src/components/scenes/transition.ce +60 -0
  132. package/src/index.ts +6 -1
  133. package/src/module.ts +15 -0
  134. package/src/services/keyboardControls.ts +1 -1
package/dist/index17.js CHANGED
@@ -1,97 +1,308 @@
1
- import { Howler } from 'canvasengine';
1
+ import { useProps, useDefineProps, computed, signal, on, animatedSignal, mount, tick, h, Container, loop, Sprite, cond } from 'canvasengine';
2
+ import { combineLatest, map, startWith, pairwise, filter, lastValueFrom } from 'rxjs';
3
+ import { Particle } from '@canvasengine/presets';
4
+ import { Direction, ModulesToken } from '@rpgjs/common';
5
+ import { RpgClientEngine } from './index2.js';
6
+ import { inject } from './index6.js';
7
+ import { RpgGui } from './index9.js';
2
8
 
3
- const SOUND_METADATA_KEY = Symbol("rpgjs:sound");
4
- function Sound(options) {
5
- return function(constructor) {
6
- const metadata = {
7
- id: options.id,
8
- sound: options.sound,
9
- sounds: options.sounds,
10
- loop: options.loop,
11
- volume: options.volume
9
+ function component($$props) {
10
+ useProps($$props);
11
+ const defineProps = useDefineProps($$props);
12
+ var __assign = (this && this.__assign) || function () {
13
+ __assign = Object.assign || function(t) {
14
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
15
+ s = arguments[i];
16
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
17
+ t[p] = s[p];
18
+ }
19
+ return t;
12
20
  };
13
- constructor[SOUND_METADATA_KEY] = metadata;
14
- return constructor;
15
- };
16
- }
17
- function getSoundMetadata(soundClass) {
18
- return soundClass[SOUND_METADATA_KEY];
19
- }
20
- class RpgSound {
21
- static {
22
- this.engine = null;
23
- }
24
- /**
25
- * Initialize RpgSound with the engine instance
26
- *
27
- * This is called automatically by the engine during initialization.
28
- *
29
- * @param engine - The RpgClientEngine instance
30
- */
31
- static init(engine) {
32
- RpgSound.engine = engine;
33
- }
34
- /**
35
- * Get a sound by its ID
36
- *
37
- * Retrieves a Howler sound instance from the engine's sound cache.
38
- * The sound must be registered beforehand (via @Sound decorator or manually).
39
- *
40
- * @param id - The sound identifier
41
- * @returns The Howler sound instance, or undefined if not found
42
- *
43
- * @example
44
- * ```ts
45
- * // Get and play a sound
46
- * const sound = RpgSound.get('town-music');
47
- * if (sound) {
48
- * sound.play();
49
- * }
50
- *
51
- * // Chain methods
52
- * RpgSound.get('battle-theme')?.volume(0.8).play();
53
- * ```
54
- */
55
- static get(id) {
56
- if (!RpgSound.engine) {
57
- console.warn("RpgSound not initialized. Make sure the engine has started.");
58
- return void 0;
21
+ return __assign.apply(this, arguments);
22
+ };
23
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
24
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
25
+ return new (P || (P = Promise))(function (resolve, reject) {
26
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
27
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
28
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
29
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
30
+ });
31
+ };
32
+ var __generator = (this && this.__generator) || function (thisArg, body) {
33
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
34
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
35
+ function verb(n) { return function (v) { return step([n, v]); }; }
36
+ function step(op) {
37
+ if (f) throw new TypeError("Generator is already executing.");
38
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
39
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
40
+ if (y = 0, t) op = [op[0] & 2, t.value];
41
+ switch (op[0]) {
42
+ case 0: case 1: t = op; break;
43
+ case 4: _.label++; return { value: op[1], done: false };
44
+ case 5: _.label++; y = op[1]; op = [0]; continue;
45
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
46
+ default:
47
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
48
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
49
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
50
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
51
+ if (t[2]) _.ops.pop();
52
+ _.trys.pop(); continue;
53
+ }
54
+ op = body.call(thisArg, _);
55
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
56
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
59
57
  }
60
- const sound = RpgSound.engine.sounds.get(id);
61
- if (!sound) {
62
- console.warn(`Sound with id "${id}" not found`);
63
- return void 0;
58
+ };
59
+ var _a = defineProps(), object = _a.object, id = _a.id;
60
+ var client = inject(RpgClientEngine);
61
+ var hooks = inject(ModulesToken);
62
+ var guiService = inject(RpgGui);
63
+ client.spritesheets;
64
+ var playerId = client.playerId;
65
+ var componentsBehind = client.spriteComponentsBehind;
66
+ var componentsInFront = client.spriteComponentsInFront;
67
+ var isMe = computed(function () { return id() === playerId; });
68
+ var normalizeComponent = function (comp) {
69
+ var componentRef;
70
+ var propsValue;
71
+ var dependenciesFn;
72
+ // If it's a direct component reference
73
+ if (typeof comp === 'function' || (comp && typeof comp === 'object' && !comp.component)) {
74
+ componentRef = comp;
75
+ propsValue = undefined;
76
+ dependenciesFn = undefined;
64
77
  }
65
- if (sound && typeof sound.play === "function") {
66
- return sound;
78
+ // If it's a configuration object with component and props
79
+ else if (comp && typeof comp === 'object' && comp.component) {
80
+ componentRef = comp.component;
81
+ // Support both "data" (legacy) and "props" (new) for backward compatibility
82
+ propsValue = comp.props !== undefined ? comp.props : comp.data;
83
+ dependenciesFn = comp.dependencies;
67
84
  }
68
- if (sound && sound.src) {
69
- return sound;
85
+ // Fallback: treat as direct component
86
+ else {
87
+ componentRef = comp;
88
+ propsValue = undefined;
89
+ dependenciesFn = undefined;
70
90
  }
71
- return sound;
72
- }
73
- /**
74
- * Global Howler instance for managing all sounds
75
- *
76
- * Provides access to Howler.js global methods for controlling all sounds
77
- * at once (volume, mute, etc.).
78
- *
79
- * @example
80
- * ```ts
81
- * // Set global volume to 20%
82
- * RpgSound.global.volume(0.2)
83
- *
84
- * // Mute all sounds
85
- * RpgSound.global.mute(true)
86
- *
87
- * // Unmute all sounds
88
- * RpgSound.global.mute(false)
89
- * ```
90
- */
91
- static get global() {
92
- return Howler;
93
- }
94
- }
91
+ // Return props directly (object or function), not as computed
92
+ // The computed will be created in the template when needed
93
+ return {
94
+ component: componentRef,
95
+ props: typeof propsValue === 'function' ? propsValue(object) : propsValue || {},
96
+ dependencies: dependenciesFn ? dependenciesFn(object) : []
97
+ };
98
+ };
99
+ var normalizeComponents = function (components) {
100
+ return components.map(function (comp) { return normalizeComponent(comp); });
101
+ };
102
+ var normalizedComponentsBehind = computed(function () {
103
+ return normalizeComponents(componentsBehind());
104
+ });
105
+ var normalizedComponentsInFront = computed(function () {
106
+ return normalizeComponents(componentsInFront());
107
+ });
108
+ var shouldFollowCamera = computed(function () {
109
+ var cameraTargetId = client.cameraFollowTargetId();
110
+ // If a target is explicitly set, only follow if this sprite is the target
111
+ if (cameraTargetId !== null) {
112
+ return id() === cameraTargetId;
113
+ }
114
+ // Otherwise, follow the current player (default behavior)
115
+ return isMe();
116
+ });
117
+ var attachedGuis = computed(function () {
118
+ return guiService.getAttachedGuis();
119
+ });
120
+ var shouldDisplayAttachedGui = computed(function () {
121
+ return guiService.shouldDisplayAttachedGui(id());
122
+ });
123
+ var x = object.x, y = object.y, tint = object.tint, direction = object.direction, animationName = object.animationName, animationCurrentIndex = object.animationCurrentIndex, emitParticleTrigger = object.emitParticleTrigger, particleName = object.particleName; object.graphics; var hitbox = object.hitbox, isConnected = object.isConnected, graphicsSignals = object.graphicsSignals, flashTrigger = object.flashTrigger;
124
+ var flashType = signal('alpha');
125
+ var flashDuration = signal(300);
126
+ var flashCycles = signal(1);
127
+ var flashAlpha = signal(0.3);
128
+ var flashTint = signal(0xffffff);
129
+ on(flashTrigger, function (data) {
130
+ if (data && typeof data === 'object') {
131
+ if (data.type !== undefined)
132
+ flashType.set(data.type);
133
+ if (data.duration !== undefined)
134
+ flashDuration.set(data.duration);
135
+ if (data.cycles !== undefined)
136
+ flashCycles.set(data.cycles);
137
+ if (data.alpha !== undefined)
138
+ flashAlpha.set(data.alpha);
139
+ if (data.tint !== undefined)
140
+ flashTint.set(data.tint);
141
+ }
142
+ });
143
+ var flashConfig = computed(function () { return ({
144
+ trigger: flashTrigger,
145
+ type: flashType(),
146
+ duration: flashDuration(),
147
+ cycles: flashCycles(),
148
+ alpha: flashAlpha(),
149
+ tint: flashTint(),
150
+ }); });
151
+ var particleSettings = client.particleSettings;
152
+ var canControls = function () { return isMe() && object.canMove(); };
153
+ var keyboardControls = client.globalConfig.keyboardControls;
154
+ var visible = computed(function () {
155
+ if (object.type === 'event') {
156
+ return true;
157
+ }
158
+ return isConnected();
159
+ });
160
+ var controls = signal({
161
+ down: {
162
+ repeat: true,
163
+ bind: keyboardControls.down,
164
+ keyDown: function () {
165
+ if (canControls())
166
+ client.processInput({ input: Direction.Down });
167
+ },
168
+ },
169
+ up: {
170
+ repeat: true,
171
+ bind: keyboardControls.up,
172
+ keyDown: function () {
173
+ if (canControls())
174
+ client.processInput({ input: Direction.Up });
175
+ },
176
+ },
177
+ left: {
178
+ repeat: true,
179
+ bind: keyboardControls.left,
180
+ keyDown: function () {
181
+ if (canControls())
182
+ client.processInput({ input: Direction.Left });
183
+ },
184
+ },
185
+ right: {
186
+ repeat: true,
187
+ bind: keyboardControls.right,
188
+ keyDown: function () {
189
+ if (canControls())
190
+ client.processInput({ input: Direction.Right });
191
+ },
192
+ },
193
+ action: {
194
+ bind: keyboardControls.action,
195
+ keyDown: function () {
196
+ if (canControls()) {
197
+ client.processAction({ action: 'action' });
198
+ // particleName.set('hit')
199
+ // emitParticleTrigger.start()
200
+ // object.flash('red')
201
+ }
202
+ },
203
+ },
204
+ gamepad: {
205
+ enabled: true
206
+ }
207
+ });
208
+ var smoothX = animatedSignal(x(), {
209
+ duration: isMe() ? 0 : 0
210
+ });
211
+ var smoothY = animatedSignal(y(), {
212
+ duration: isMe() ? 0 : 0,
213
+ });
214
+ var realAnimationName = signal(animationName());
215
+ var xSubscription = x.observable.subscribe(function (value) {
216
+ smoothX.set(value);
217
+ });
218
+ var ySubscription = y.observable.subscribe(function (value) {
219
+ smoothY.set(value);
220
+ });
221
+ var sheet = function (graphicObject) {
222
+ return {
223
+ definition: graphicObject,
224
+ playing: realAnimationName,
225
+ params: {
226
+ direction: direction
227
+ },
228
+ onFinish: function () {
229
+ animationCurrentIndex.update(function (index) { return index + 1; });
230
+ }
231
+ };
232
+ };
233
+ var movementAnimations = ['walk', 'stand'];
234
+ var epsilon = 0;
235
+ var stateX$ = smoothX.animatedState.observable;
236
+ var stateY$ = smoothY.animatedState.observable;
237
+ var animationName$ = animationName.observable;
238
+ var moving$ = combineLatest([stateX$, stateY$]).pipe(map(function (_a) {
239
+ var sx = _a[0], sy = _a[1];
240
+ var xFinished = Math.abs(sx.value.current - sx.value.end) <= epsilon;
241
+ var yFinished = Math.abs(sy.value.current - sy.value.end) <= epsilon;
242
+ return !xFinished || !yFinished; // moving if X or Y is not finished
243
+ }), startWith(false));
244
+ var animationChange$ = animationName$.pipe(startWith(animationName()), pairwise(), filter(function (_a) {
245
+ var prev = _a[0], curr = _a[1];
246
+ return prev !== curr;
247
+ }));
248
+ var animationMovementSubscription = combineLatest([animationChange$, moving$]).subscribe(function (_a) {
249
+ var _b = _a[0]; _b[0]; var curr = _b[1], isMoving = _a[1];
250
+ if (curr == 'stand' && !isMoving) {
251
+ realAnimationName.set(curr);
252
+ }
253
+ else if (curr == 'walk' && isMoving) {
254
+ realAnimationName.set(curr);
255
+ }
256
+ else if (!movementAnimations.includes(curr)) {
257
+ realAnimationName.set(curr);
258
+ }
259
+ if (!isMoving && object.animationIsPlaying && object.animationIsPlaying()) {
260
+ if (movementAnimations.includes(curr)) {
261
+ if (typeof object.resetAnimationState === 'function') {
262
+ object.resetAnimationState();
263
+ }
264
+ }
265
+ }
266
+ });
267
+ var onBeforeDestroy = function () { return __awaiter(void 0, void 0, void 0, function () {
268
+ return __generator(this, function (_a) {
269
+ switch (_a.label) {
270
+ case 0:
271
+ animationMovementSubscription.unsubscribe();
272
+ xSubscription.unsubscribe();
273
+ ySubscription.unsubscribe();
274
+ return [4 /*yield*/, lastValueFrom(hooks.callHooks("client-sprite-onDestroy", object))];
275
+ case 1:
276
+ _a.sent();
277
+ return [4 /*yield*/, lastValueFrom(hooks.callHooks("client-sceneMap-onRemoveSprite", client.sceneMap, object))];
278
+ case 2:
279
+ _a.sent();
280
+ return [2 /*return*/];
281
+ }
282
+ });
283
+ }); };
284
+ mount(function (element) {
285
+ hooks.callHooks("client-sprite-onAdd", object).subscribe();
286
+ hooks.callHooks("client-sceneMap-onAddSprite", client.sceneMap, object).subscribe();
287
+ if (isMe())
288
+ client.setKeyboardControls(element.directives.controls);
289
+ });
290
+ var onAttachedGuiFinish = function (gui, data) {
291
+ guiService.guiClose(gui.name, data);
292
+ };
293
+ var onAttachedGuiInteraction = function (gui, name, data) {
294
+ guiService.guiInteraction(gui.name, name, data);
295
+ };
296
+ tick(function () {
297
+ hooks.callHooks("client-sprite-onUpdate").subscribe();
298
+ });
299
+ let $this = h(Container, { x: smoothX, y: smoothY, zIndex: y, viewportFollow: shouldFollowCamera, controls, onBeforeDestroy, visible }, [loop(normalizedComponentsBehind, compConfig => h(Container, null, h(compConfig.component, { object, ...compConfig.props }))), h(Particle, { emit: emitParticleTrigger, settings: particleSettings, zIndex: 1000, name: particleName }), h(Container, null, loop(graphicsSignals, graphicObj => h(Sprite, { sheet: sheet(graphicObj), direction, tint, hitbox, flash: flashConfig }))), loop(normalizedComponentsInFront, compConfig => h(Container, { dependencies: compConfig.dependencies }, h(compConfig.component, { object, ...compConfig.props }))), loop(attachedGuis, attachedGui => cond(shouldDisplayAttachedGui, () => h(Container, null, h(attachedGui.component, { ...attachedGui.data(), dependencies: attachedGui.dependencies, object: object, onFinish: (data) => {
300
+ onAttachedGuiFinish(attachedGui, data);
301
+ }, onInteraction: (name, data) => {
302
+ onAttachedGuiInteraction(attachedGui, name, data);
303
+ } }))))]);
304
+ return $this
305
+ }
95
306
 
96
- export { RpgSound, Sound, getSoundMetadata };
307
+ export { component as default };
97
308
  //# sourceMappingURL=index17.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index17.js","sources":["../src/Sound.ts"],"sourcesContent":["import { Howler } from 'canvasengine';\nimport { RpgClientEngine } from './RpgClientEngine';\nimport { inject } from './core/inject';\n\n/**\n * Sound decorator options\n * \n * Defines the configuration for a sound that can be played in the game.\n * The sound can be a single file or multiple files (for different formats).\n * \n * @interface SoundOptions\n */\nexport interface SoundOptions {\n /**\n * Sound identifier. Used to retrieve the sound later with RpgSound.get()\n * \n * @type {string}\n */\n id?: string;\n\n /**\n * Single sound file path. Use require() to wrap the path.\n * \n * @type {string}\n * @example\n * sound: require('./assets/sound.ogg')\n */\n sound?: string;\n\n /**\n * Multiple sounds with different IDs. The key is the sound ID and the value is the file path.\n * Use require() to wrap each path.\n * \n * @type {{ [id: string]: string }}\n * @example\n * sounds: {\n * hero: require('./assets/hero.ogg'),\n * monster: require('./assets/monster.ogg')\n * }\n */\n sounds?: { [id: string]: string };\n\n /**\n * Whether the sound should loop when it finishes playing.\n * \n * @type {boolean}\n * @default false\n */\n loop?: boolean;\n\n /**\n * Volume level (0.0 to 1.0).\n * \n * @type {number}\n * @default 1.0\n */\n volume?: number;\n}\n\n/**\n * Metadata stored on the class decorated with @Sound\n * \n * @interface SoundMetadata\n */\ninterface SoundMetadata {\n id?: string;\n sound?: string;\n sounds?: { [id: string]: string };\n loop?: boolean;\n volume?: number;\n}\n\nconst SOUND_METADATA_KEY = Symbol('rpgjs:sound');\n\n/**\n * Sound decorator\n * \n * Decorates a class to define a sound configuration. The decorated class can be\n * added to the RpgClient module configuration, and the sound will be automatically\n * registered and available through RpgSound.get().\n * \n * ## Design\n * \n * The decorator stores metadata on the class that is later used by the module loader\n * to register sounds with the engine. The sound is created using Howler.js for\n * advanced audio features like looping, volume control, and cross-browser compatibility.\n * \n * @param options - Sound configuration options\n * \n * @example\n * ```ts\n * import { Sound } from '@rpgjs/client'\n * \n * @Sound({\n * id: 'town-music',\n * sound: require('./sound/town.ogg'),\n * loop: true,\n * volume: 0.5\n * })\n * export class TownMusic {}\n * \n * // Multiple sounds in one class\n * @Sound({\n * sounds: {\n * hero: require('./assets/hero.ogg'),\n * monster: require('./assets/monster.ogg')\n * },\n * loop: true\n * })\n * export class CharacterSounds {}\n * ```\n */\nexport function Sound(options: SoundOptions) {\n return function <T extends { new (...args: any[]): {} }>(constructor: T) {\n const metadata: SoundMetadata = {\n id: options.id,\n sound: options.sound,\n sounds: options.sounds,\n loop: options.loop,\n volume: options.volume,\n };\n\n // Store metadata on the class\n (constructor as any)[SOUND_METADATA_KEY] = metadata;\n\n return constructor;\n };\n}\n\n/**\n * Get sound metadata from a decorated class\n * \n * @param soundClass - The class decorated with @Sound\n * @returns The sound metadata or undefined\n */\nexport function getSoundMetadata(soundClass: any): SoundMetadata | undefined {\n return (soundClass as any)[SOUND_METADATA_KEY];\n}\n\n/**\n * RpgSound class\n * \n * Provides a unified API to manage sounds in the game. Uses Howler.js internally\n * for advanced audio features. Sounds can be retrieved by ID and controlled\n * using Howler.js methods.\n * \n * ## Design\n * \n * RpgSound acts as a facade over Howler.js, providing easy access to sounds\n * registered in the engine. It supports both individual sound control and\n * global sound management (volume, mute, etc.).\n * \n * @example\n * ```ts\n * import { RpgSound } from '@rpgjs/client'\n * \n * // Play a sound\n * RpgSound.get('town-music').play()\n * \n * // Control volume\n * RpgSound.get('town-music').volume(0.5)\n * \n * // Stop a sound\n * RpgSound.get('town-music').stop()\n * \n * // Global volume control\n * RpgSound.global.volume(0.2)\n * ```\n */\nexport class RpgSound {\n private static engine: RpgClientEngine | null = null;\n\n /**\n * Initialize RpgSound with the engine instance\n * \n * This is called automatically by the engine during initialization.\n * \n * @param engine - The RpgClientEngine instance\n */\n static init(engine: RpgClientEngine): void {\n RpgSound.engine = engine;\n }\n\n /**\n * Get a sound by its ID\n * \n * Retrieves a Howler sound instance from the engine's sound cache.\n * The sound must be registered beforehand (via @Sound decorator or manually).\n * \n * @param id - The sound identifier\n * @returns The Howler sound instance, or undefined if not found\n * \n * @example\n * ```ts\n * // Get and play a sound\n * const sound = RpgSound.get('town-music');\n * if (sound) {\n * sound.play();\n * }\n * \n * // Chain methods\n * RpgSound.get('battle-theme')?.volume(0.8).play();\n * ```\n */\n static get(id: string): any {\n if (!RpgSound.engine) {\n console.warn('RpgSound not initialized. Make sure the engine has started.');\n return undefined;\n }\n\n const sound = RpgSound.engine.sounds.get(id);\n if (!sound) {\n console.warn(`Sound with id \"${id}\" not found`);\n return undefined;\n }\n\n // If the sound is a Howler instance, return it directly\n if (sound && typeof sound.play === 'function') {\n return sound;\n }\n\n // If the sound has a src property, try to create a Howler instance\n if (sound && sound.src) {\n // This should have been handled during addSound, but just in case\n return sound;\n }\n\n return sound;\n }\n\n /**\n * Global Howler instance for managing all sounds\n * \n * Provides access to Howler.js global methods for controlling all sounds\n * at once (volume, mute, etc.).\n * \n * @example\n * ```ts\n * // Set global volume to 20%\n * RpgSound.global.volume(0.2)\n * \n * // Mute all sounds\n * RpgSound.global.mute(true)\n * \n * // Unmute all sounds\n * RpgSound.global.mute(false)\n * ```\n */\n static get global(): typeof Howler {\n return Howler;\n }\n}\n\n"],"names":[],"mappings":";;AAwEA,MAAM,kBAAA,GAAqB,OAAO,aAAa,CAAA;AAwCxC,SAAS,MAAM,OAAA,EAAuB;AAC3C,EAAA,OAAO,SAAkD,WAAA,EAAgB;AACvE,IAAA,MAAM,QAAA,GAA0B;AAAA,MAC9B,IAAI,OAAA,CAAQ,EAAA;AAAA,MACZ,OAAO,OAAA,CAAQ,KAAA;AAAA,MACf,QAAQ,OAAA,CAAQ,MAAA;AAAA,MAChB,MAAM,OAAA,CAAQ,IAAA;AAAA,MACd,QAAQ,OAAA,CAAQ;AAAA,KAClB;AAGA,IAAC,WAAA,CAAoB,kBAAkB,CAAA,GAAI,QAAA;AAE3C,IAAA,OAAO,WAAA;AAAA,EACT,CAAA;AACF;AAQO,SAAS,iBAAiB,UAAA,EAA4C;AAC3E,EAAA,OAAQ,WAAmB,kBAAkB,CAAA;AAC/C;AAgCO,MAAM,QAAA,CAAS;AAAA,EACpB;AAAA,IAAA,IAAA,CAAe,MAAA,GAAiC,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAShD,OAAO,KAAK,MAAA,EAA+B;AACzC,IAAA,QAAA,CAAS,MAAA,GAAS,MAAA;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBA,OAAO,IAAI,EAAA,EAAiB;AAC1B,IAAA,IAAI,CAAC,SAAS,MAAA,EAAQ;AACpB,MAAA,OAAA,CAAQ,KAAK,6DAA6D,CAAA;AAC1E,MAAA,OAAO,MAAA;AAAA,IACT;AAEA,IAAA,MAAM,KAAA,GAAQ,QAAA,CAAS,MAAA,CAAO,MAAA,CAAO,IAAI,EAAE,CAAA;AAC3C,IAAA,IAAI,CAAC,KAAA,EAAO;AACV,MAAA,OAAA,CAAQ,IAAA,CAAK,CAAA,eAAA,EAAkB,EAAE,CAAA,WAAA,CAAa,CAAA;AAC9C,MAAA,OAAO,MAAA;AAAA,IACT;AAGA,IAAA,IAAI,KAAA,IAAS,OAAO,KAAA,CAAM,IAAA,KAAS,UAAA,EAAY;AAC7C,MAAA,OAAO,KAAA;AAAA,IACT;AAGA,IAAA,IAAI,KAAA,IAAS,MAAM,GAAA,EAAK;AAEtB,MAAA,OAAO,KAAA;AAAA,IACT;AAEA,IAAA,OAAO,KAAA;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoBA,WAAW,MAAA,GAAwB;AACjC,IAAA,OAAO,MAAA;AAAA,EACT;AACF;;;;"}
1
+ {"version":3,"file":"index17.js","sources":["../src/components/character.ce"],"sourcesContent":["<Container x={smoothX} y={smoothY} zIndex={y} viewportFollow={shouldFollowCamera} controls onBeforeDestroy visible >\n @for (compConfig of normalizedComponentsBehind) {\n <Container>\n <compConfig.component object ...compConfig.props />\n </Container>\n } \n <Particle emit={@emitParticleTrigger} settings={@particleSettings} zIndex={1000} name={particleName} />\n <Container>\n @for (graphicObj of graphicsSignals) {\n <Sprite \n sheet={@sheet(@graphicObj)} \n direction \n tint \n hitbox \n flash={flashConfig}\n />\n }\n </Container>\n @for (compConfig of normalizedComponentsInFront) {\n <Container dependencies={@compConfig.@dependencies}>\n <compConfig.component object ...compConfig.props />\n </Container>\n }\n @for (attachedGui of attachedGuis) {\n @if (shouldDisplayAttachedGui) {\n <Container>\n <attachedGui.component ...attachedGui.data() dependencies={@attachedGui.@dependencies} object={object} onFinish={(data) => {\n onAttachedGuiFinish(attachedGui, data)\n }} onInteraction={(name, data) => {\n onAttachedGuiInteraction(attachedGui, name, data)\n }} />\n </Container>\n }\n }\n</Container>\n\n<script>\n import { signal, effect, mount, computed, tick, animatedSignal, on } from \"canvasengine\";\n\n import { lastValueFrom, combineLatest, pairwise, filter, map, startWith } from \"rxjs\";\n import { Particle } from \"@canvasengine/presets\";\n import { GameEngineToken, ModulesToken } from \"@rpgjs/common\";\n import { RpgClientEngine } from \"../RpgClientEngine\";\n import { inject } from \"../core/inject\"; \n import { Direction } from \"@rpgjs/common\";\n import Hit from \"./effects/hit.ce\";\n import PlayerComponents from \"./player-components.ce\";\n import { RpgGui } from \"../Gui/Gui\";\n\n const { object, id } = defineProps();\n\n const client = inject(RpgClientEngine);\n const hooks = inject(ModulesToken);\n const guiService = inject(RpgGui);\n\n const spritesheets = client.spritesheets;\n const playerId = client.playerId;\n const componentsBehind = client.spriteComponentsBehind;\n const componentsInFront = client.spriteComponentsInFront;\n const isMe = computed(() => id() === playerId);\n\n /**\n * Normalize a single sprite component configuration\n * \n * Handles both direct component references and configuration objects with optional props and dependencies.\n * Extracts the component reference and creates a computed function that returns the props.\n * \n * ## Design\n * \n * Supports two formats:\n * 1. Direct component: `ShadowComponent`\n * 2. Configuration object: `{ component: LightHalo, props: {...}, dependencies: (object) => [...] }`\n * \n * The normalization process:\n * - Extracts the actual component from either format\n * - Extracts dependencies function if provided\n * - Creates a computed function that returns props (static object or dynamic function result)\n * - Returns a normalized object with `component`, `props`, and `dependencies`\n * \n * @param comp - Component reference or configuration object\n * @returns Normalized component configuration with component, props, and dependencies\n * \n * @example\n * ```ts\n * // Direct component\n * normalizeComponent(ShadowComponent)\n * // => { component: ShadowComponent, props: {}, dependencies: undefined }\n * \n * // With static props\n * normalizeComponent({ component: LightHalo, props: { radius: 30 } })\n * // => { component: LightHalo, props: { radius: 30 }, dependencies: undefined }\n * \n * // With dynamic props and dependencies\n * normalizeComponent({ \n * component: HealthBar, \n * props: (object) => ({ hp: object.hp(), maxHp: object.param.maxHp() }),\n * dependencies: (object) => [object.hp, object.param.maxHp]\n * })\n * // => { component: HealthBar, props: {...}, dependencies: (object) => [...] }\n * ```\n */\n const normalizeComponent = (comp) => {\n let componentRef;\n let propsValue;\n let dependenciesFn;\n \n // If it's a direct component reference\n if (typeof comp === 'function' || (comp && typeof comp === 'object' && !comp.component)) {\n componentRef = comp;\n propsValue = undefined;\n dependenciesFn = undefined;\n }\n // If it's a configuration object with component and props\n else if (comp && typeof comp === 'object' && comp.component) {\n componentRef = comp.component;\n // Support both \"data\" (legacy) and \"props\" (new) for backward compatibility\n propsValue = comp.props !== undefined ? comp.props : comp.data;\n dependenciesFn = comp.dependencies;\n }\n // Fallback: treat as direct component\n else {\n componentRef = comp;\n propsValue = undefined;\n dependenciesFn = undefined;\n }\n \n // Return props directly (object or function), not as computed\n // The computed will be created in the template when needed\n return {\n component: componentRef,\n props: typeof propsValue === 'function' ? propsValue(object) : propsValue || {},\n dependencies: dependenciesFn ? dependenciesFn(object) : []\n };\n };\n\n /**\n * Normalize an array of sprite components\n * \n * Applies normalization to each component in the array using `normalizeComponent`.\n * \n * @param components - Array of component references or configuration objects\n * @returns Array of normalized component configurations\n */\n const normalizeComponents = (components) => {\n return components.map((comp) => normalizeComponent(comp));\n };\n\n\n /**\n * Normalized components to render behind sprites\n * Handles both direct component references and configuration objects with optional props and dependencies\n * \n * Supports multiple formats:\n * 1. Direct component: `ShadowComponent`\n * 2. Configuration object: `{ component: LightHalo, props: {...} }`\n * 3. With dynamic props: `{ component: LightHalo, props: (object) => {...} }`\n * 4. With dependencies: `{ component: HealthBar, dependencies: (object) => [object.hp, object.param.maxHp] }`\n * \n * Components with dependencies will only be displayed when all dependencies are resolved (!= undefined).\n * The object is passed to the dependencies function to allow sprite-specific dependency resolution.\n * \n * @example\n * ```ts\n * // Direct component\n * componentsBehind: [ShadowComponent]\n * \n * // With static props\n * componentsBehind: [{ component: LightHalo, props: { radius: 30 } }]\n * \n * // With dynamic props and dependencies\n * componentsBehind: [{ \n * component: HealthBar, \n * props: (object) => ({ hp: object.hp(), maxHp: object.param.maxHp() }),\n * dependencies: (object) => [object.hp, object.param.maxHp]\n * }]\n * ```\n */\n const normalizedComponentsBehind = computed(() => {\n return normalizeComponents(componentsBehind());\n });\n\n /**\n * Normalized components to render in front of sprites\n * Handles both direct component references and configuration objects with optional props and dependencies\n * \n * See `normalizedComponentsBehind` for format details.\n * Components with dependencies will only be displayed when all dependencies are resolved.\n */\n const normalizedComponentsInFront = computed(() => {\n return normalizeComponents(componentsInFront());\n });\n \n /**\n * Determine if the camera should follow this sprite\n * \n * The camera follows this sprite if:\n * - It's explicitly set as the camera follow target, OR\n * - It's the current player and no explicit target is set (default behavior)\n */\n const shouldFollowCamera = computed(() => {\n const cameraTargetId = client.cameraFollowTargetId();\n // If a target is explicitly set, only follow if this sprite is the target\n if (cameraTargetId !== null) {\n return id() === cameraTargetId;\n }\n // Otherwise, follow the current player (default behavior)\n return isMe();\n });\n\n /**\n * Get all attached GUI components that should be rendered on sprites\n * These are GUIs with attachToSprite: true\n */\n const attachedGuis = computed(() => {\n return guiService.getAttachedGuis();\n });\n\n /**\n * Check if attached GUIs should be displayed for this sprite\n * This is controlled by showAttachedGui/hideAttachedGui on the server\n */\n const shouldDisplayAttachedGui = computed(() => {\n return guiService.shouldDisplayAttachedGui(id());\n });\n\n const { \n x, \n y, \n tint, \n direction, \n animationName, \n animationCurrentIndex,\n emitParticleTrigger, \n particleName, \n graphics, \n hitbox,\n isConnected,\n graphicsSignals,\n flashTrigger\n } = object;\n\n /**\n * Flash configuration signals for dynamic options\n * These signals are updated when the flash trigger is activated with options\n */\n const flashType = signal<'alpha' | 'tint' | 'both'>('alpha');\n const flashDuration = signal(300);\n const flashCycles = signal(1);\n const flashAlpha = signal(0.3);\n const flashTint = signal(0xffffff);\n\n /**\n * Listen to flash trigger to update configuration dynamically\n * When flash is triggered with options, update the signals\n */\n on(flashTrigger, (data) => {\n if (data && typeof data === 'object') {\n if (data.type !== undefined) flashType.set(data.type);\n if (data.duration !== undefined) flashDuration.set(data.duration);\n if (data.cycles !== undefined) flashCycles.set(data.cycles);\n if (data.alpha !== undefined) flashAlpha.set(data.alpha);\n if (data.tint !== undefined) flashTint.set(data.tint);\n }\n });\n\n /**\n * Flash configuration for the sprite\n * \n * This configuration is used by the flash directive to create visual feedback effects.\n * The flash trigger is exposed through the object, allowing both server events and\n * client-side code to trigger flash animations. Options can be passed dynamically\n * through the trigger, which updates the reactive signals.\n */\n const flashConfig = computed(() => ({\n trigger: flashTrigger,\n type: flashType(),\n duration: flashDuration(),\n cycles: flashCycles(),\n alpha: flashAlpha(),\n tint: flashTint(),\n }));\n\n const particleSettings = client.particleSettings;\n\n const canControls = () => isMe() && object.canMove()\n const keyboardControls = client.globalConfig.keyboardControls;\n\n const visible = computed(() => {\n if (object.type === 'event') {\n return true\n }\n return isConnected()\n });\n\n const controls = signal({\n down: {\n repeat: true,\n bind: keyboardControls.down,\n keyDown() {\n if (canControls()) client.processInput({ input: Direction.Down })\n },\n },\n up: {\n repeat: true,\n bind: keyboardControls.up,\n keyDown() {\n if (canControls()) client.processInput({ input: Direction.Up })\n },\n },\n left: {\n repeat: true,\n bind: keyboardControls.left,\n keyDown() {\n if (canControls()) client.processInput({ input: Direction.Left })\n },\n },\n right: {\n repeat: true,\n bind: keyboardControls.right,\n keyDown() {\n if (canControls()) client.processInput({ input: Direction.Right })\n },\n },\n action: {\n bind: keyboardControls.action,\n keyDown() {\n if (canControls()) {\n client.processAction({ action: 'action' })\n // particleName.set('hit') \n // emitParticleTrigger.start()\n // object.flash('red')\n }\n },\n },\n gamepad: {\n enabled: true\n }\n });\n\n const smoothX = animatedSignal(x(), {\n duration: isMe() ? 0 : 0\n });\n\n const smoothY = animatedSignal(y(), {\n duration: isMe() ? 0 : 0,\n });\n\n const realAnimationName = signal(animationName());\n\n const xSubscription = x.observable.subscribe((value) => {\n smoothX.set(value);\n });\n\n const ySubscription = y.observable.subscribe((value) => {\n smoothY.set(value);\n });\n \n const sheet = (graphicObject) => {\n return {\n definition: graphicObject,\n playing: realAnimationName,\n params: {\n direction\n },\n onFinish() {\n animationCurrentIndex.update(index => index + 1)\n }\n };\n }\n\n // Combine animation change detection with movement state from smoothX/smoothY\n const movementAnimations = ['walk', 'stand'];\n const epsilon = 0; // movement threshold to consider the easing still running\n\n const stateX$ = smoothX.animatedState.observable;\n const stateY$ = smoothY.animatedState.observable;\n const animationName$ = animationName.observable;\n\n const moving$ = combineLatest([stateX$, stateY$]).pipe(\n map(([sx, sy]) => {\n const xFinished = Math.abs(sx.value.current - sx.value.end) <= epsilon;\n const yFinished = Math.abs(sy.value.current - sy.value.end) <= epsilon;\n return !xFinished || !yFinished; // moving if X or Y is not finished\n }),\n startWith(false)\n );\n\n const animationChange$ = animationName$.pipe(\n startWith(animationName()),\n pairwise(),\n filter(([prev, curr]) => prev !== curr)\n );\n\n const animationMovementSubscription = combineLatest([animationChange$, moving$]).subscribe(([[prev, curr], isMoving]) => {\n if (curr == 'stand' && !isMoving) {\n realAnimationName.set(curr);\n }\n else if (curr == 'walk' && isMoving) {\n realAnimationName.set(curr);\n }\n else if (!movementAnimations.includes(curr)) {\n realAnimationName.set(curr);\n }\n if (!isMoving && object.animationIsPlaying && object.animationIsPlaying()) {\n if (movementAnimations.includes(curr)) {\n if (typeof object.resetAnimationState === 'function') {\n object.resetAnimationState();\n }\n }\n }\n });\n\n /**\n * Cleanup subscriptions and call hooks before sprite destruction.\n *\n * # Design\n * - Prevent memory leaks by unsubscribing from all local subscriptions created in this component.\n * - Execute destruction hooks to notify modules and scene map of sprite removal.\n *\n * @example\n * await onBeforeDestroy();\n */\n const onBeforeDestroy = async () => {\n animationMovementSubscription.unsubscribe();\n xSubscription.unsubscribe();\n ySubscription.unsubscribe();\n await lastValueFrom(hooks.callHooks(\"client-sprite-onDestroy\", object)) \n await lastValueFrom(hooks.callHooks(\"client-sceneMap-onRemoveSprite\", client.sceneMap, object))\n }\n\n mount((element) => {\n hooks.callHooks(\"client-sprite-onAdd\", object).subscribe()\n hooks.callHooks(\"client-sceneMap-onAddSprite\", client.sceneMap, object).subscribe()\n if (isMe()) client.setKeyboardControls(element.directives.controls)\n })\n\n /**\n * Handle attached GUI finish event\n * \n * @param gui - The GUI instance\n * @param data - Data passed from the GUI component\n */\n const onAttachedGuiFinish = (gui, data) => {\n guiService.guiClose(gui.name, data);\n };\n\n /**\n * Handle attached GUI interaction event\n * \n * @param gui - The GUI instance\n * @param name - Interaction name\n * @param data - Interaction data\n */\n const onAttachedGuiInteraction = (gui, name, data) => {\n guiService.guiInteraction(gui.name, name, data);\n };\n\n tick(() => {\n hooks.callHooks(\"client-sprite-onUpdate\").subscribe()\n })\n</script>"],"names":[],"mappings":";;;;;;;;AAcqB,SAAS,SAAS,CAAC,OAAO,EAAE;AACjD,QAAuB,QAAQ,CAAC,OAAO;AACvC,QAAQ,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO;AAClD,QAAQ,IAAI,QAAQ,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,YAAY;AAC9D,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,EAAE;AAC5C,QAAQ,KAAK,IAAI,CAAC,EAAE,CA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