@rpgjs/server 5.0.0-beta.2 → 5.0.0-beta.3

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.
@@ -1,3 +1,10 @@
1
+ //#region ../../node_modules/.pnpm/@signe+sync@2.9.0/node_modules/@signe/sync/dist/chunk-7QVYU63E.js
2
+ var __defProp$2 = Object.defineProperty;
3
+ var __name$2 = (target, value) => __defProp$2(target, "name", {
4
+ value,
5
+ configurable: true
6
+ });
7
+ //#endregion
1
8
  //#region ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
2
9
  /******************************************************************************
3
10
  Copyright (c) Microsoft Corporation.
@@ -1607,15 +1614,15 @@ function handleReset(reset, on) {
1607
1614
  return innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);
1608
1615
  }
1609
1616
  //#endregion
1610
- //#region ../../node_modules/.pnpm/@signe+reactive@2.8.3/node_modules/@signe/reactive/dist/index.js
1611
- var __defProp$2 = Object.defineProperty;
1612
- var __name$2 = (target, value) => __defProp$2(target, "name", {
1617
+ //#region ../../node_modules/.pnpm/@signe+reactive@2.9.0/node_modules/@signe/reactive/dist/index.js
1618
+ var __defProp$1 = Object.defineProperty;
1619
+ var __name$1 = (target, value) => __defProp$1(target, "name", {
1613
1620
  value,
1614
1621
  configurable: true
1615
1622
  });
1616
1623
  var ArraySubject = class extends BehaviorSubject {
1617
1624
  static {
1618
- __name$2(this, "ArraySubject");
1625
+ __name$1(this, "ArraySubject");
1619
1626
  }
1620
1627
  _items = [];
1621
1628
  constructor(items = []) {
@@ -1627,7 +1634,7 @@ var ArraySubject = class extends BehaviorSubject {
1627
1634
  }
1628
1635
  createProxy(items) {
1629
1636
  this._items = new Proxy(items, {
1630
- get: /* @__PURE__ */ __name$2((target, prop, receiver) => {
1637
+ get: /* @__PURE__ */ __name$1((target, prop, receiver) => {
1631
1638
  const origMethod = target[prop];
1632
1639
  if (typeof origMethod === "function") return (...args) => {
1633
1640
  let changeType = "update";
@@ -1683,7 +1690,7 @@ var ArraySubject = class extends BehaviorSubject {
1683
1690
  };
1684
1691
  return Reflect.get(target, prop, receiver);
1685
1692
  }, "get"),
1686
- set: /* @__PURE__ */ __name$2((target, prop, value) => {
1693
+ set: /* @__PURE__ */ __name$1((target, prop, value) => {
1687
1694
  const index = !isNaN(Number(prop)) ? Number(prop) : void 0;
1688
1695
  target[prop] = value;
1689
1696
  this.next({
@@ -1706,12 +1713,12 @@ var ArraySubject = class extends BehaviorSubject {
1706
1713
  });
1707
1714
  }
1708
1715
  };
1709
- var isArraySubject = /* @__PURE__ */ __name$2((value) => {
1716
+ var isArraySubject = /* @__PURE__ */ __name$1((value) => {
1710
1717
  return "_items" in value;
1711
1718
  }, "isArraySubject");
1712
1719
  var ObjectSubject = class extends BehaviorSubject {
1713
1720
  static {
1714
- __name$2(this, "ObjectSubject");
1721
+ __name$1(this, "ObjectSubject");
1715
1722
  }
1716
1723
  _obj;
1717
1724
  constructor(obj = {}) {
@@ -1723,10 +1730,10 @@ var ObjectSubject = class extends BehaviorSubject {
1723
1730
  }
1724
1731
  createProxy(obj) {
1725
1732
  this._obj = new Proxy(obj, {
1726
- get: /* @__PURE__ */ __name$2((target, prop, receiver) => {
1733
+ get: /* @__PURE__ */ __name$1((target, prop, receiver) => {
1727
1734
  return Reflect.get(target, prop, receiver);
1728
1735
  }, "get"),
1729
- set: /* @__PURE__ */ __name$2((target, prop, value, receiver) => {
1736
+ set: /* @__PURE__ */ __name$1((target, prop, value, receiver) => {
1730
1737
  const key = prop;
1731
1738
  const changeType = key in target ? "update" : "add";
1732
1739
  target[key] = value;
@@ -1737,7 +1744,7 @@ var ObjectSubject = class extends BehaviorSubject {
1737
1744
  });
1738
1745
  return true;
1739
1746
  }, "set"),
1740
- deleteProperty: /* @__PURE__ */ __name$2((target, prop) => {
1747
+ deleteProperty: /* @__PURE__ */ __name$1((target, prop) => {
1741
1748
  const key = prop;
1742
1749
  if (key in target) {
1743
1750
  const value = target[key];
@@ -1764,10 +1771,10 @@ var ObjectSubject = class extends BehaviorSubject {
1764
1771
  });
1765
1772
  }
1766
1773
  };
1767
- var isObjectSubject = /* @__PURE__ */ __name$2((value) => {
1774
+ var isObjectSubject = /* @__PURE__ */ __name$1((value) => {
1768
1775
  return "_obj" in value;
1769
1776
  }, "isObjectSubject");
1770
- var reactiveStore = (/* @__PURE__ */ __name$2(() => {
1777
+ var reactiveStore = (/* @__PURE__ */ __name$1(() => {
1771
1778
  const globalKey = "__REACTIVE_STORE__";
1772
1779
  if (typeof globalThis !== "undefined") {
1773
1780
  if (!globalThis[globalKey]) globalThis[globalKey] = {
@@ -1793,7 +1800,7 @@ var reactiveStore = (/* @__PURE__ */ __name$2(() => {
1793
1800
  };
1794
1801
  return globalObj[globalKey];
1795
1802
  }, "getGlobalReactiveStore"))();
1796
- var trackDependency = /* @__PURE__ */ __name$2((signal2) => {
1803
+ var trackDependency = /* @__PURE__ */ __name$1((signal2) => {
1797
1804
  if (reactiveStore.currentDependencyTracker) reactiveStore.currentDependencyTracker(signal2);
1798
1805
  }, "trackDependency");
1799
1806
  function signal(defaultValue, options) {
@@ -1801,12 +1808,12 @@ function signal(defaultValue, options) {
1801
1808
  if (Array.isArray(defaultValue)) subject = new ArraySubject(defaultValue);
1802
1809
  else if (typeof defaultValue === "object" && defaultValue !== null) subject = new ObjectSubject(defaultValue);
1803
1810
  else subject = new BehaviorSubject(defaultValue);
1804
- const getValue = /* @__PURE__ */ __name$2(() => {
1811
+ const getValue = /* @__PURE__ */ __name$1(() => {
1805
1812
  if (subject instanceof ArraySubject) return subject.items;
1806
1813
  else if (subject instanceof ObjectSubject) return subject.obj;
1807
1814
  return subject.value;
1808
1815
  }, "getValue");
1809
- const fn = /* @__PURE__ */ __name$2(function() {
1816
+ const fn = /* @__PURE__ */ __name$1(function() {
1810
1817
  trackDependency(fn);
1811
1818
  return getValue();
1812
1819
  }, "fn");
@@ -1846,15 +1853,15 @@ function signal(defaultValue, options) {
1846
1853
  fn._subject = subject;
1847
1854
  return fn;
1848
1855
  }
1849
- __name$2(signal, "signal");
1856
+ __name$1(signal, "signal");
1850
1857
  function isSignal(value) {
1851
1858
  return !!(value && value.observable);
1852
1859
  }
1853
- __name$2(isSignal, "isSignal");
1860
+ __name$1(isSignal, "isSignal");
1854
1861
  function isComputed(value) {
1855
1862
  return isSignal(value) && !!value.dependencies;
1856
1863
  }
1857
- __name$2(isComputed, "isComputed");
1864
+ __name$1(isComputed, "isComputed");
1858
1865
  function computed(computeFunction, disposableFn) {
1859
1866
  const dependencies = /* @__PURE__ */ new Set();
1860
1867
  let init = true;
@@ -1873,7 +1880,7 @@ function computed(computeFunction, disposableFn) {
1873
1880
  }
1874
1881
  return dep.observable;
1875
1882
  })).pipe(filter(() => !init), map(() => computeFunction()), finalize(() => disposableFn?.()));
1876
- const fn = /* @__PURE__ */ __name$2(function() {
1883
+ const fn = /* @__PURE__ */ __name$1(function() {
1877
1884
  trackDependency(fn);
1878
1885
  return lastComputedValue;
1879
1886
  }, "fn");
@@ -1886,7 +1893,7 @@ function computed(computeFunction, disposableFn) {
1886
1893
  init = false;
1887
1894
  return fn;
1888
1895
  }
1889
- __name$2(computed, "computed");
1896
+ __name$1(computed, "computed");
1890
1897
  function linkedSignal(computationOrOptions, simpleOptions) {
1891
1898
  const dependencies = /* @__PURE__ */ new Set();
1892
1899
  let init = true;
@@ -1910,7 +1917,7 @@ function linkedSignal(computationOrOptions, simpleOptions) {
1910
1917
  equalFn = options.equal;
1911
1918
  if (typeof sourceSignal === "function" && !isSignal(sourceSignal)) {
1912
1919
  const sourceFn = sourceSignal;
1913
- computeFunction = /* @__PURE__ */ __name$2(() => {
1920
+ computeFunction = /* @__PURE__ */ __name$1(() => {
1914
1921
  const sourceValue = sourceFn();
1915
1922
  if (computationFn.length > 1) {
1916
1923
  const result = computationFn(sourceValue, previousValue);
@@ -1930,7 +1937,7 @@ function linkedSignal(computationOrOptions, simpleOptions) {
1930
1937
  }, "computeFunction");
1931
1938
  } else {
1932
1939
  const source = typeof sourceSignal === "function" ? sourceSignal : sourceSignal;
1933
- computeFunction = /* @__PURE__ */ __name$2(() => {
1940
+ computeFunction = /* @__PURE__ */ __name$1(() => {
1934
1941
  const sourceValue = source();
1935
1942
  if (computationFn.length > 1) {
1936
1943
  const result = computationFn(sourceValue, previousValue);
@@ -1983,7 +1990,7 @@ function linkedSignal(computationOrOptions, simpleOptions) {
1983
1990
  return lastComputedValue;
1984
1991
  }));
1985
1992
  else linkedObservable = subject.asObservable().pipe(filter(() => !init));
1986
- const fn = /* @__PURE__ */ __name$2(function() {
1993
+ const fn = /* @__PURE__ */ __name$1(function() {
1987
1994
  trackDependency(fn);
1988
1995
  if (isOverridden && dependencies.size > 0) {
1989
1996
  if (overrideDepVersion !== depVersion) {
@@ -2046,7 +2053,7 @@ function linkedSignal(computationOrOptions, simpleOptions) {
2046
2053
  init = false;
2047
2054
  return fn;
2048
2055
  }
2049
- __name$2(linkedSignal, "linkedSignal");
2056
+ __name$1(linkedSignal, "linkedSignal");
2050
2057
  function untracked(fn) {
2051
2058
  const prevDepTracker = reactiveStore.currentDependencyTracker;
2052
2059
  const prevSubTracker = reactiveStore.currentSubscriptionsTracker;
@@ -2059,35 +2066,28 @@ function untracked(fn) {
2059
2066
  reactiveStore.currentSubscriptionsTracker = prevSubTracker;
2060
2067
  }
2061
2068
  }
2062
- __name$2(untracked, "untracked");
2069
+ __name$1(untracked, "untracked");
2063
2070
  function effect(fn) {
2064
2071
  fn["isEffect"] = true;
2065
2072
  return computed(fn);
2066
2073
  }
2067
- __name$2(effect, "effect");
2074
+ __name$1(effect, "effect");
2068
2075
  //#endregion
2069
- //#region ../../node_modules/.pnpm/@signe+sync@2.8.3/node_modules/@signe/sync/dist/chunk-7QVYU63E.js
2070
- var __defProp$1 = Object.defineProperty;
2071
- var __name$1 = (target, value) => __defProp$1(target, "name", {
2072
- value,
2073
- configurable: true
2074
- });
2075
- //#endregion
2076
- //#region ../../node_modules/.pnpm/@signe+sync@2.8.3/node_modules/@signe/sync/dist/index.js
2076
+ //#region ../../node_modules/.pnpm/@signe+sync@2.9.0/node_modules/@signe/sync/dist/index.js
2077
2077
  function isFunction$1(val) {
2078
2078
  return {}.toString.call(val) === "[object Function]";
2079
2079
  }
2080
- __name$1(isFunction$1, "isFunction");
2080
+ __name$2(isFunction$1, "isFunction");
2081
2081
  function isClass(obj) {
2082
2082
  return typeof obj === "function" && obj.prototype && obj.prototype.constructor === obj;
2083
2083
  }
2084
- __name$1(isClass, "isClass");
2085
- var isObject = /* @__PURE__ */ __name$1((item) => item && typeof item === "object" && !Array.isArray(item) && item !== null, "isObject");
2084
+ __name$2(isClass, "isClass");
2085
+ var isObject = /* @__PURE__ */ __name$2((item) => item && typeof item === "object" && !Array.isArray(item) && item !== null, "isObject");
2086
2086
  function isInstanceOfClass(value) {
2087
2087
  if (value === null || typeof value !== "object" || value === void 0 || Array.isArray(value)) return false;
2088
2088
  return Object.getPrototypeOf(value) !== Object.prototype;
2089
2089
  }
2090
- __name$1(isInstanceOfClass, "isInstanceOfClass");
2090
+ __name$2(isInstanceOfClass, "isInstanceOfClass");
2091
2091
  function generateShortUUID() {
2092
2092
  const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
2093
2093
  let uuid = "";
@@ -2097,8 +2097,30 @@ function generateShortUUID() {
2097
2097
  }
2098
2098
  return uuid;
2099
2099
  }
2100
- __name$1(generateShortUUID, "generateShortUUID");
2100
+ __name$2(generateShortUUID, "generateShortUUID");
2101
2101
  var DELETE_TOKEN = "$delete";
2102
+ var syncClass = /* @__PURE__ */ __name$2((instance, options = {}) => {
2103
+ const cacheSync = /* @__PURE__ */ new Map();
2104
+ const cachePersist = /* @__PURE__ */ new Map();
2105
+ instance.$valuesChanges = {
2106
+ set: /* @__PURE__ */ __name$2((path, value) => {
2107
+ cacheSync.set(path, value);
2108
+ options.onSync?.(cacheSync);
2109
+ }, "set"),
2110
+ setPersist: /* @__PURE__ */ __name$2((path, value) => {
2111
+ if (path == "") path = ".";
2112
+ cachePersist.set(path, value);
2113
+ options.onPersist?.(cachePersist);
2114
+ }, "setPersist"),
2115
+ has: /* @__PURE__ */ __name$2((path) => {
2116
+ return cacheSync.has(path);
2117
+ }, "has"),
2118
+ get: /* @__PURE__ */ __name$2((path) => {
2119
+ return cacheSync.get(path);
2120
+ }, "get")
2121
+ };
2122
+ createSyncClass(instance);
2123
+ }, "syncClass");
2102
2124
  function createStatesSnapshot(instance) {
2103
2125
  let persistObject = {};
2104
2126
  if (instance?.$snapshot) for (const key of instance.$snapshot.keys()) {
@@ -2110,9 +2132,9 @@ function createStatesSnapshot(instance) {
2110
2132
  }
2111
2133
  return persistObject;
2112
2134
  }
2113
- __name$1(createStatesSnapshot, "createStatesSnapshot");
2135
+ __name$2(createStatesSnapshot, "createStatesSnapshot");
2114
2136
  var SNAPSHOT_SKIP = Symbol("snapshot-skip");
2115
- var serializeSnapshotDeep = /* @__PURE__ */ __name$1((value, path, options, seen) => {
2137
+ var serializeSnapshotDeep = /* @__PURE__ */ __name$2((value, path, options, seen) => {
2116
2138
  if (isSignal(value)) return serializeSnapshotDeep(value(), path, options, seen);
2117
2139
  if (value instanceof Map) return SNAPSHOT_SKIP;
2118
2140
  if (options.filter && !options.filter(value, path)) return SNAPSHOT_SKIP;
@@ -2150,14 +2172,14 @@ function createStatesSnapshotDeep(instance, options = {}) {
2150
2172
  }
2151
2173
  return persistObject;
2152
2174
  }
2153
- __name$1(createStatesSnapshotDeep, "createStatesSnapshotDeep");
2175
+ __name$2(createStatesSnapshotDeep, "createStatesSnapshotDeep");
2154
2176
  function setMetadata(target, key, value) {
2155
2177
  const propId = target.constructor._propertyMetadata?.get(key);
2156
2178
  if (propId) if (isSignal(target[propId])) target[propId].set(value);
2157
2179
  else target[propId] = value;
2158
2180
  }
2159
- __name$1(setMetadata, "setMetadata");
2160
- var createSyncClass = /* @__PURE__ */ __name$1((currentClass, parentKey = null, parentClass = null, path = "") => {
2181
+ __name$2(setMetadata, "setMetadata");
2182
+ var createSyncClass = /* @__PURE__ */ __name$2((currentClass, parentKey = null, parentClass = null, path = "") => {
2161
2183
  currentClass.$path = path;
2162
2184
  if (parentClass) currentClass.$valuesChanges = parentClass.$valuesChanges;
2163
2185
  if (parentKey) setMetadata(currentClass, "id", parentKey);
@@ -2183,10 +2205,10 @@ var createSyncClass = /* @__PURE__ */ __name$1((currentClass, parentKey = null,
2183
2205
  });
2184
2206
  }
2185
2207
  }, "createSyncClass");
2186
- var type = /* @__PURE__ */ __name$1((_signal, path, options = {}, currentInstance) => {
2208
+ var type = /* @__PURE__ */ __name$2((_signal, path, options = {}, currentInstance) => {
2187
2209
  const { syncToClient = true, persist: persist2 = true, transform } = options;
2188
2210
  let init = true;
2189
- const handleObjectSubject = /* @__PURE__ */ __name$1((value, propPath) => {
2211
+ const handleObjectSubject = /* @__PURE__ */ __name$2((value, propPath) => {
2190
2212
  const newPath = `${propPath}${value.key ? `.${value.key}` : ""}`;
2191
2213
  if ([
2192
2214
  "add",
@@ -2197,7 +2219,7 @@ var type = /* @__PURE__ */ __name$1((_signal, path, options = {}, currentInstanc
2197
2219
  else savePath(newPath, value.value);
2198
2220
  else if (value.type === "remove") savePath(newPath, DELETE_TOKEN);
2199
2221
  }, "handleObjectSubject");
2200
- const handleArraySubject = /* @__PURE__ */ __name$1((value, propPath) => {
2222
+ const handleArraySubject = /* @__PURE__ */ __name$2((value, propPath) => {
2201
2223
  if (value.type === "reset" && Array.isArray(value.items)) {
2202
2224
  value.items.forEach((item, index) => {
2203
2225
  const newPath2 = `${propPath}.${index}`;
@@ -2213,12 +2235,12 @@ var type = /* @__PURE__ */ __name$1((_signal, path, options = {}, currentInstanc
2213
2235
  else savePath(newPath, firstItem);
2214
2236
  else if (value.type === "remove") savePath(newPath, DELETE_TOKEN);
2215
2237
  }, "handleArraySubject");
2216
- const savePath = /* @__PURE__ */ __name$1((propPath, value) => {
2238
+ const savePath = /* @__PURE__ */ __name$2((propPath, value) => {
2217
2239
  const transformedValue = transform && value !== "$delete" ? transform(value) : value;
2218
2240
  if (syncToClient) currentInstance.$valuesChanges.set(propPath, transformedValue);
2219
2241
  if (persist2 && currentInstance.$path !== void 0) currentInstance.$valuesChanges.setPersist(transformedValue == "$delete" ? propPath : currentInstance.$path, transformedValue);
2220
2242
  }, "savePath");
2221
- const setupSubscription = /* @__PURE__ */ __name$1((signal, signalPath) => {
2243
+ const setupSubscription = /* @__PURE__ */ __name$2((signal, signalPath) => {
2222
2244
  if (!isSignal(signal)) return;
2223
2245
  if (syncToClient && currentInstance.$valuesChanges) {
2224
2246
  const initialValue = signal();
@@ -2270,10 +2292,10 @@ function sync(options) {
2270
2292
  return function(target, propertyKey) {
2271
2293
  const privatePropertyKey = `__${propertyKey}`;
2272
2294
  Object.defineProperty(target, propertyKey, {
2273
- get: /* @__PURE__ */ __name$1(function() {
2295
+ get: /* @__PURE__ */ __name$2(function() {
2274
2296
  return this[privatePropertyKey];
2275
2297
  }, "getter"),
2276
- set: /* @__PURE__ */ __name$1(function(newVal) {
2298
+ set: /* @__PURE__ */ __name$2(function(newVal) {
2277
2299
  this[privatePropertyKey] = type(newVal, propertyKey, {
2278
2300
  classType,
2279
2301
  persist: persist2,
@@ -2286,14 +2308,14 @@ function sync(options) {
2286
2308
  });
2287
2309
  };
2288
2310
  }
2289
- __name$1(sync, "sync");
2311
+ __name$2(sync, "sync");
2290
2312
  function id() {
2291
2313
  return function(target, propertyKey) {
2292
2314
  if (!target.constructor._propertyMetadata) target.constructor._propertyMetadata = /* @__PURE__ */ new Map();
2293
2315
  target.constructor._propertyMetadata.set("id", propertyKey);
2294
2316
  };
2295
2317
  }
2296
- __name$1(id, "id");
2318
+ __name$2(id, "id");
2297
2319
  function users(options) {
2298
2320
  return function(target, propertyKey) {
2299
2321
  if (!target.constructor._propertyMetadata) target.constructor._propertyMetadata = /* @__PURE__ */ new Map();
@@ -2301,14 +2323,14 @@ function users(options) {
2301
2323
  sync(options)(target, propertyKey);
2302
2324
  };
2303
2325
  }
2304
- __name$1(users, "users");
2326
+ __name$2(users, "users");
2305
2327
  function persist() {
2306
2328
  return sync({
2307
2329
  persist: true,
2308
2330
  syncToClient: false
2309
2331
  });
2310
2332
  }
2311
- __name$1(persist, "persist");
2333
+ __name$2(persist, "persist");
2312
2334
  function connected() {
2313
2335
  return function(target, propertyKey) {
2314
2336
  if (!target.constructor._propertyMetadata) target.constructor._propertyMetadata = /* @__PURE__ */ new Map();
@@ -2316,16 +2338,16 @@ function connected() {
2316
2338
  sync({ persist: false })(target, propertyKey);
2317
2339
  };
2318
2340
  }
2319
- __name$1(connected, "connected");
2341
+ __name$2(connected, "connected");
2320
2342
  function load(rootInstance, values, valueIsObject) {
2321
2343
  if (valueIsObject) loadFromObject(rootInstance, values);
2322
2344
  else loadFromPaths(rootInstance, values);
2323
2345
  }
2324
- __name$1(load, "load");
2346
+ __name$2(load, "load");
2325
2347
  function loadFromPaths(rootInstance, values) {
2326
2348
  for (const [path, value] of Object.entries(values)) loadValue(rootInstance, path.split("."), value);
2327
2349
  }
2328
- __name$1(loadFromPaths, "loadFromPaths");
2350
+ __name$2(loadFromPaths, "loadFromPaths");
2329
2351
  function loadFromObject(rootInstance, values, currentPath = "") {
2330
2352
  for (let key in values) {
2331
2353
  const value = values[key];
@@ -2334,7 +2356,7 @@ function loadFromObject(rootInstance, values, currentPath = "") {
2334
2356
  else loadValue(rootInstance, newPath.split("."), value);
2335
2357
  }
2336
2358
  }
2337
- __name$1(loadFromObject, "loadFromObject");
2359
+ __name$2(loadFromObject, "loadFromObject");
2338
2360
  function loadValue(rootInstance, parts, value) {
2339
2361
  let current = rootInstance;
2340
2362
  for (let i = 0; i < parts.length; i++) {
@@ -2358,7 +2380,7 @@ function loadValue(rootInstance, parts, value) {
2358
2380
  }
2359
2381
  }
2360
2382
  }
2361
- __name$1(loadValue, "loadValue");
2383
+ __name$2(loadValue, "loadValue");
2362
2384
  function getByPath(root, path) {
2363
2385
  const parts = path.split(".");
2364
2386
  let current = root;
@@ -2369,14 +2391,14 @@ function getByPath(root, path) {
2369
2391
  }
2370
2392
  return current;
2371
2393
  }
2372
- __name$1(getByPath, "getByPath");
2394
+ __name$2(getByPath, "getByPath");
2373
2395
  //#endregion
2374
- //#region \0@oxc-project+runtime@0.122.0/helpers/decorateMetadata.js
2396
+ //#region \0@oxc-project+runtime@0.127.0/helpers/decorateMetadata.js
2375
2397
  function __decorateMetadata(k, v) {
2376
2398
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2377
2399
  }
2378
2400
  //#endregion
2379
- //#region \0@oxc-project+runtime@0.122.0/helpers/decorate.js
2401
+ //#region \0@oxc-project+runtime@0.127.0/helpers/decorate.js
2380
2402
  function __decorate(decorators, target, key, desc) {
2381
2403
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2382
2404
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8276,7 +8298,7 @@ var ProjectileMovement = class {
8276
8298
  this.finished = false;
8277
8299
  this.currentHeight = 0;
8278
8300
  this.verticalVelocity = 0;
8279
- this.options = {
8301
+ const defaults = {
8280
8302
  speed: options.speed,
8281
8303
  direction: options.direction,
8282
8304
  initialHeight: 0,
@@ -8284,7 +8306,10 @@ var ProjectileMovement = class {
8284
8306
  gravity: 30,
8285
8307
  maxBounces: 0,
8286
8308
  bounciness: .6,
8287
- drag: 0,
8309
+ drag: 0
8310
+ };
8311
+ this.options = {
8312
+ ...defaults,
8288
8313
  ...options
8289
8314
  };
8290
8315
  const magnitude = Math.hypot(this.options.direction.x, this.options.direction.y);
@@ -10831,7 +10856,10 @@ async function enrichMapWithParsedTiledData(payload, options = {}) {
10831
10856
  const mapDoc = await resolveMapDocument(payload.id, mapDefinition, options);
10832
10857
  if (!mapDoc.xml) return;
10833
10858
  try {
10834
- const TiledParser = (await import("@canvasengine/tiled"))?.TiledParser;
10859
+ const TiledParser = (await import(
10860
+ /* @vite-ignore */
10861
+ "@canvasengine/tiled"
10862
+ ))?.TiledParser;
10835
10863
  if (!TiledParser) return;
10836
10864
  const parsedMap = new TiledParser(mapDoc.xml).parseMap();
10837
10865
  const tilesets = Array.isArray(parsedMap?.tilesets) ? parsedMap.tilesets : [];
@@ -11013,6 +11041,6 @@ function provideServerModules(modules) {
11013
11041
  });
11014
11042
  }
11015
11043
  //#endregion
11016
- export { RpgCommonPlayer as $, isArray as A, ProjectileMovement as B, SDEF as C, arrayFlat as D, PrebuiltGui as E, ModulesToken as F, Knockback as G, PathFollow as H, RpgModule as I, Entity as J, IceMovement as K, WorldMapsManager as L, isInstanceOf as M, isString as N, arrayUniq as O, random as P, Direction as Q, RpgCommonMap as R, PDEF as S, PerlinNoise2D as T, Oscillate as U, ProjectileType as V, LinearRepulsion as W, Vector2 as X, EntityState as Y, RpgShape as Z, ATK as _, isMapUpdateAuthorized as a, finalize as at, MAXHP as b, updateMap as c, map as ct, context$1 as d, createErrorClass as dt, Skill as et, inject as f, AGI as g, injector as h, createMapUpdateHeaders as i, signal as it, isFunction as j, capitalize as k, context as l, BehaviorSubject as lt, inject$1 as m, MAP_UPDATE_TOKEN_ENV as n, __decorate as nt, readMapUpdateToken as o, filter as ot, setInject as p, Dash as q, MAP_UPDATE_TOKEN_HEADER as r, __decorateMetadata as rt, resolveMapUpdateToken as s, combineLatest as st, provideServerModules as t, Item as tt, clearInject as u, Observable as ut, DEX as v, STR as w, MAXSP as x, INT as y, SeekAvoid as z };
11044
+ export { RpgCommonPlayer as $, isArray as A, createErrorClass as At, ProjectileMovement as B, SDEF as C, isSignal as Ct, arrayFlat as D, finalize as Dt, PrebuiltGui as E, untracked as Et, ModulesToken as F, Knockback as G, PathFollow as H, RpgModule as I, Entity as J, IceMovement as K, WorldMapsManager as L, isInstanceOf as M, isString as N, arrayUniq as O, combineLatest as Ot, random as P, Direction as Q, RpgCommonMap as R, PDEF as S, isObjectSubject as St, PerlinNoise2D as T, signal as Tt, Oscillate as U, ProjectileType as V, LinearRepulsion as W, Vector2 as X, EntityState as Y, RpgShape as Z, ATK as _, ObjectSubject as _t, isMapUpdateAuthorized as a, createStatesSnapshot as at, MAXHP as b, isArraySubject as bt, updateMap as c, getByPath as ct, context$1 as d, persist as dt, Skill as et, inject as f, sync as ft, AGI as g, ArraySubject as gt, injector as h, users as ht, createMapUpdateHeaders as i, DELETE_TOKEN as it, isFunction as j, capitalize as k, BehaviorSubject as kt, context as l, id as lt, inject$1 as m, type as mt, MAP_UPDATE_TOKEN_ENV as n, __decorate as nt, readMapUpdateToken as o, createStatesSnapshotDeep as ot, setInject as p, syncClass as pt, Dash as q, MAP_UPDATE_TOKEN_HEADER as r, __decorateMetadata as rt, resolveMapUpdateToken as s, generateShortUUID as st, provideServerModules as t, Item as tt, clearInject as u, load as ut, DEX as v, computed as vt, STR as w, linkedSignal as wt, MAXSP as x, isComputed as xt, INT as y, effect as yt, SeekAvoid as z };
11017
11045
 
11018
- //# sourceMappingURL=module-CaCW1SDh.js.map
11046
+ //# sourceMappingURL=module-BmvXIvlE.js.map