@rs-x/core 0.4.9 → 0.4.11

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 (3) hide show
  1. package/dist/index.d.ts +25 -26
  2. package/dist/index.js +1188 -1189
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
 
4
- // lib/deep-clone/deep-clone-value-getter.ts
4
+ // lib/deep-clone/deep-clone-except.ts
5
5
  import { Observable } from "rxjs";
6
6
 
7
7
  // lib/dependency-injection.ts
@@ -44,6 +44,147 @@ function overrideMultiInjectServices(container, multiInjectToken, services) {
44
44
  }
45
45
  __name(overrideMultiInjectServices, "overrideMultiInjectServices");
46
46
 
47
+ // lib/index-value-accessor/array-index-accessor.ts
48
+ function _ts_decorate(decorators, target, key, desc) {
49
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
51
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
52
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
53
+ }
54
+ __name(_ts_decorate, "_ts_decorate");
55
+ var ArrayIndexAccessor = class {
56
+ static {
57
+ __name(this, "ArrayIndexAccessor");
58
+ }
59
+ priority = 5;
60
+ isAsync() {
61
+ return false;
62
+ }
63
+ getIndexes(array) {
64
+ return array.keys();
65
+ }
66
+ hasValue(array, index) {
67
+ return this.getValue(array, index) !== void 0;
68
+ }
69
+ getResolvedValue(array, index) {
70
+ return array[index];
71
+ }
72
+ getValue(array, index) {
73
+ return this.getResolvedValue(array, index);
74
+ }
75
+ setValue(array, index, value) {
76
+ array[index] = value;
77
+ }
78
+ applies(array) {
79
+ return Array.isArray(array);
80
+ }
81
+ };
82
+ ArrayIndexAccessor = _ts_decorate([
83
+ injectable()
84
+ ], ArrayIndexAccessor);
85
+
86
+ // lib/index-value-accessor/date-property-accessor.interface.ts
87
+ var dataProperties = [
88
+ "year",
89
+ "utcYear",
90
+ "month",
91
+ "utcMonth",
92
+ "date",
93
+ "utcDate",
94
+ "hours",
95
+ "utcHours",
96
+ "minutes",
97
+ "utcMinutes",
98
+ "seconds",
99
+ "utcSeconds",
100
+ "milliseconds",
101
+ "utcMilliseconds",
102
+ "time"
103
+ ];
104
+
105
+ // lib/index-value-accessor/date-property-accessor.ts
106
+ function _ts_decorate2(decorators, target, key, desc) {
107
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
108
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
109
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
110
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
111
+ }
112
+ __name(_ts_decorate2, "_ts_decorate");
113
+ var DatePropertyAccessor = class {
114
+ static {
115
+ __name(this, "DatePropertyAccessor");
116
+ }
117
+ priority = 0;
118
+ _setter = {
119
+ year: /* @__PURE__ */ __name((date, value) => date.setFullYear(value), "year"),
120
+ utcYear: /* @__PURE__ */ __name((date, value) => date.setUTCFullYear(value), "utcYear"),
121
+ month: /* @__PURE__ */ __name((date, value) => date.setMonth(value), "month"),
122
+ utcMonth: /* @__PURE__ */ __name((date, value) => date.setUTCMonth(value), "utcMonth"),
123
+ date: /* @__PURE__ */ __name((date, value) => date.setDate(value), "date"),
124
+ utcDate: /* @__PURE__ */ __name((date, value) => date.setUTCDate(value), "utcDate"),
125
+ hours: /* @__PURE__ */ __name((date, value) => date.setHours(value), "hours"),
126
+ utcHours: /* @__PURE__ */ __name((date, value) => date.setUTCHours(value), "utcHours"),
127
+ minutes: /* @__PURE__ */ __name((date, value) => date.setMinutes(value), "minutes"),
128
+ utcMinutes: /* @__PURE__ */ __name((date, value) => date.setUTCMinutes(value), "utcMinutes"),
129
+ seconds: /* @__PURE__ */ __name((date, value) => date.setSeconds(value), "seconds"),
130
+ utcSeconds: /* @__PURE__ */ __name((date, value) => date.setUTCSeconds(value), "utcSeconds"),
131
+ milliseconds: /* @__PURE__ */ __name((date, value) => date.setMilliseconds(value), "milliseconds"),
132
+ utcMilliseconds: /* @__PURE__ */ __name((date, value) => date.setUTCMilliseconds(value), "utcMilliseconds"),
133
+ time: /* @__PURE__ */ __name((date, value) => date.setTime(value), "time")
134
+ };
135
+ _getters = {
136
+ year: /* @__PURE__ */ __name((date) => date.getFullYear(), "year"),
137
+ utcYear: /* @__PURE__ */ __name((date) => date.getUTCFullYear(), "utcYear"),
138
+ month: /* @__PURE__ */ __name((date) => date.getMonth(), "month"),
139
+ utcMonth: /* @__PURE__ */ __name((date) => date.getUTCMonth(), "utcMonth"),
140
+ date: /* @__PURE__ */ __name((date) => date.getDate(), "date"),
141
+ utcDate: /* @__PURE__ */ __name((date) => date.getUTCDate(), "utcDate"),
142
+ hours: /* @__PURE__ */ __name((date) => date.getHours(), "hours"),
143
+ utcHours: /* @__PURE__ */ __name((date) => date.getUTCHours(), "utcHours"),
144
+ minutes: /* @__PURE__ */ __name((date) => date.getMinutes(), "minutes"),
145
+ utcMinutes: /* @__PURE__ */ __name((date) => date.getUTCMinutes(), "utcMinutes"),
146
+ seconds: /* @__PURE__ */ __name((date) => date.getSeconds(), "seconds"),
147
+ utcSeconds: /* @__PURE__ */ __name((date) => date.getUTCSeconds(), "utcSeconds"),
148
+ milliseconds: /* @__PURE__ */ __name((date) => date.getMilliseconds(), "milliseconds"),
149
+ utcMilliseconds: /* @__PURE__ */ __name((date) => date.getUTCMilliseconds(), "utcMilliseconds"),
150
+ time: /* @__PURE__ */ __name((date) => date.getTime(), "time")
151
+ };
152
+ isAsync() {
153
+ return false;
154
+ }
155
+ getIndexes() {
156
+ return dataProperties.values();
157
+ }
158
+ hasValue(context, index) {
159
+ return this.getValue(context, index) !== void 0;
160
+ }
161
+ getResolvedValue(context, index) {
162
+ return this.getValue(context, index);
163
+ }
164
+ getValue(date, index) {
165
+ return this._getters[index]?.(date);
166
+ }
167
+ setValue(date, index, value) {
168
+ this._setter[index]?.(date, value);
169
+ }
170
+ applies(context, index) {
171
+ return context instanceof Date && !!this._getters[index];
172
+ }
173
+ };
174
+ DatePropertyAccessor = _ts_decorate2([
175
+ injectable()
176
+ ], DatePropertyAccessor);
177
+
178
+ // lib/exceptions/unsupported-exception.ts
179
+ var UnsupportedException = class extends Error {
180
+ static {
181
+ __name(this, "UnsupportedException");
182
+ }
183
+ constructor(message) {
184
+ super(message);
185
+ }
186
+ };
187
+
47
188
  // lib/rs-x-core.injection-tokens.ts
48
189
  var RsXCoreInjectionTokens = {
49
190
  IInjectionContainer: Symbol("IInjectionContainer"),
@@ -68,18 +209,18 @@ var RsXCoreInjectionTokens = {
68
209
  ILodashDeepClone: Symbol("ILodashDeepClone"),
69
210
  IDeepCloneList: Symbol("IDeepCloneList"),
70
211
  IResolvedValueCache: Symbol("IResolvedValueCache"),
71
- IDeepCloneValueGetter: Symbol("IDeepCloneValueGetter"),
72
- DefaultDeepCloneValueGetter: Symbol("DefaultDeepCloneValueGetter")
212
+ IDeepCloneExcept: Symbol("IDeepCloneExcept"),
213
+ DefaultDeepCloneExcept: Symbol("DefaultDeepCloneExcept")
73
214
  };
74
215
 
75
- // lib/deep-clone/deep-clone-value-getter.ts
76
- function _ts_decorate(decorators, target, key, desc) {
216
+ // lib/index-value-accessor/index-value-accessor.ts
217
+ function _ts_decorate3(decorators, target, key, desc) {
77
218
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
78
219
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
79
220
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
80
221
  return c > 3 && r && Object.defineProperty(target, key, r), r;
81
222
  }
82
- __name(_ts_decorate, "_ts_decorate");
223
+ __name(_ts_decorate3, "_ts_decorate");
83
224
  function _ts_metadata(k, v) {
84
225
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
85
226
  }
@@ -90,388 +231,97 @@ function _ts_param(paramIndex, decorator) {
90
231
  };
91
232
  }
92
233
  __name(_ts_param, "_ts_param");
93
- var DeepCloneValueGetter = class {
234
+ var IndexValueAccessor = class {
94
235
  static {
95
- __name(this, "DeepCloneValueGetter");
236
+ __name(this, "IndexValueAccessor");
96
237
  }
97
- _resolvedValueCache;
98
- constructor(_resolvedValueCache) {
99
- this._resolvedValueCache = _resolvedValueCache;
238
+ priority = 0;
239
+ _accessors;
240
+ constructor(accessors) {
241
+ this._accessors = [
242
+ ...accessors
243
+ ].sort((a, b) => b.priority - a.priority);
100
244
  }
101
- get(source) {
102
- if (source instanceof Promise || source instanceof Observable) {
103
- return this._resolvedValueCache.get(source);
245
+ getIndexes(context, index) {
246
+ return this.getIndexAccessor(context, index).getIndexes(context, index);
247
+ }
248
+ isAsync(context, index) {
249
+ return this.getIndexAccessor(context, index).isAsync(context, index);
250
+ }
251
+ hasValue(context, index) {
252
+ return this.getIndexAccessor(context, index).hasValue(context, index);
253
+ }
254
+ getResolvedValue(context, index) {
255
+ return this.getIndexAccessor(context, index).getResolvedValue(context, index);
256
+ }
257
+ getValue(context, index) {
258
+ return this.getIndexAccessor(context, index).getValue(context, index);
259
+ }
260
+ setValue(context, index, value) {
261
+ this.getIndexAccessor(context, index).setValue(context, index, value);
262
+ }
263
+ applies(context, index) {
264
+ return this.getIndexAccessor(context, index).applies(context, index);
265
+ }
266
+ getIndexAccessor(context, index) {
267
+ const accessor = this._accessors.find((accessor2) => accessor2.applies(context, index));
268
+ if (!accessor) {
269
+ if (typeof context === "object" && context !== null) {
270
+ throw new UnsupportedException(`No accessor found for ${context.constructor.name}.${String(index)}`);
271
+ } else {
272
+ throw new UnsupportedException(`No accessor found for non-object context: ${String(context)}.${String(index)}`);
273
+ }
104
274
  }
105
- return source;
275
+ return accessor;
106
276
  }
107
277
  };
108
- DeepCloneValueGetter = _ts_decorate([
278
+ IndexValueAccessor = _ts_decorate3([
109
279
  injectable(),
110
- _ts_param(0, inject(RsXCoreInjectionTokens.IResolvedValueCache)),
280
+ _ts_param(0, multiInject(RsXCoreInjectionTokens.IIndexValueAccessorList)),
111
281
  _ts_metadata("design:type", Function),
112
282
  _ts_metadata("design:paramtypes", [
113
- typeof IResolvedValueCache === "undefined" ? Object : IResolvedValueCache
283
+ Object
114
284
  ])
115
- ], DeepCloneValueGetter);
116
-
117
- // lib/deep-clone/deep-clone.decorator.ts
118
- function DeepClone(serviceToken) {
119
- return function(target) {
120
- registerMultiInjectService(InjectionContainer, target, {
121
- serviceToken,
122
- multiInjectToken: RsXCoreInjectionTokens.IDeepCloneList
123
- });
124
- };
125
- }
126
- __name(DeepClone, "DeepClone");
285
+ ], IndexValueAccessor);
127
286
 
128
- // lib/deep-clone/default-deep-clone.ts
129
- function _ts_decorate2(decorators, target, key, desc) {
287
+ // lib/index-value-accessor/map-key-accessor.ts
288
+ function _ts_decorate4(decorators, target, key, desc) {
130
289
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
131
290
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
132
291
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
133
292
  return c > 3 && r && Object.defineProperty(target, key, r), r;
134
293
  }
135
- __name(_ts_decorate2, "_ts_decorate");
136
- function _ts_metadata2(k, v) {
137
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
138
- }
139
- __name(_ts_metadata2, "_ts_metadata");
140
- function _ts_param2(paramIndex, decorator) {
141
- return function(target, key) {
142
- decorator(target, key, paramIndex);
143
- };
144
- }
145
- __name(_ts_param2, "_ts_param");
146
- var DefaultDeepClone = class {
294
+ __name(_ts_decorate4, "_ts_decorate");
295
+ var MapKeyAccessor = class {
147
296
  static {
148
- __name(this, "DefaultDeepClone");
297
+ __name(this, "MapKeyAccessor");
149
298
  }
150
- _deepCloneList;
151
- _deepCloneValueGetter;
152
- priority = 0;
153
- constructor(_deepCloneList, _deepCloneValueGetter) {
154
- this._deepCloneList = _deepCloneList;
155
- this._deepCloneValueGetter = _deepCloneValueGetter;
299
+ priority = 4;
300
+ getIndexes(map) {
301
+ return map.keys();
156
302
  }
157
- clone(source) {
158
- let error = null;
159
- const value = this._deepCloneValueGetter.get(source);
160
- for (let i = 0; i < this._deepCloneList.length; i++) {
161
- try {
162
- return this._deepCloneList[i].clone(value);
163
- } catch (e) {
164
- error = e;
165
- }
166
- }
167
- throw error;
303
+ isAsync() {
304
+ return false;
305
+ }
306
+ hasValue(map, key) {
307
+ return map.has(key);
308
+ }
309
+ getResolvedValue(map, key) {
310
+ return map.get(key);
311
+ }
312
+ getValue(map, key) {
313
+ return this.getResolvedValue(map, key);
314
+ }
315
+ setValue(map, key, value) {
316
+ map.set(key, value);
317
+ }
318
+ applies(map) {
319
+ return map instanceof Map;
168
320
  }
169
321
  };
170
- DefaultDeepClone = _ts_decorate2([
171
- injectable(),
172
- _ts_param2(0, multiInject(RsXCoreInjectionTokens.IDeepCloneList)),
173
- _ts_param2(1, inject(RsXCoreInjectionTokens.IDeepCloneValueGetter)),
174
- _ts_metadata2("design:type", Function),
175
- _ts_metadata2("design:paramtypes", [
176
- Object,
177
- typeof IDeepCloneValueGetter === "undefined" ? Object : IDeepCloneValueGetter
178
- ])
179
- ], DefaultDeepClone);
180
-
181
- // lib/deep-clone/lodash-deep-clone.ts
182
- import cloneDeepWith from "lodash.clonedeepwith";
183
- import { isObservable } from "rxjs";
184
- function _ts_decorate3(decorators, target, key, desc) {
185
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
186
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
187
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
188
- return c > 3 && r && Object.defineProperty(target, key, r), r;
189
- }
190
- __name(_ts_decorate3, "_ts_decorate");
191
- var LodashDeepClone = class {
192
- static {
193
- __name(this, "LodashDeepClone");
194
- }
195
- priority = 1;
196
- clone(source) {
197
- return cloneDeepWith(source, this.cloneExceptPredicate);
198
- }
199
- cloneExceptPredicate = /* @__PURE__ */ __name((value) => {
200
- if (value instanceof Promise || isObservable(value)) {
201
- return value;
202
- }
203
- return void 0;
204
- }, "cloneExceptPredicate");
205
- };
206
- LodashDeepClone = _ts_decorate3([
207
- injectable()
208
- ], LodashDeepClone);
209
-
210
- // lib/deep-clone/structured-deep-clone.ts
211
- function _ts_decorate4(decorators, target, key, desc) {
212
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
213
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
214
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
215
- return c > 3 && r && Object.defineProperty(target, key, r), r;
216
- }
217
- __name(_ts_decorate4, "_ts_decorate");
218
- var StructuredDeepClone = class {
219
- static {
220
- __name(this, "StructuredDeepClone");
221
- }
222
- priority = 2;
223
- clone(source) {
224
- return structuredClone(source);
225
- }
226
- };
227
- StructuredDeepClone = _ts_decorate4([
228
- injectable()
229
- ], StructuredDeepClone);
230
-
231
- // lib/equality-service/equality-service.ts
232
- import { createCustomEqual } from "fast-equals";
233
- import { isObservable as isObservable2 } from "rxjs";
234
- function _ts_decorate5(decorators, target, key, desc) {
235
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
236
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
237
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
238
- return c > 3 && r && Object.defineProperty(target, key, r), r;
239
- }
240
- __name(_ts_decorate5, "_ts_decorate");
241
- var EqualityService = class {
242
- static {
243
- __name(this, "EqualityService");
244
- }
245
- isEqual = createCustomEqual({
246
- createCustomConfig: /* @__PURE__ */ __name((baseConfig) => ({
247
- ...baseConfig,
248
- areObjectsEqual: /* @__PURE__ */ __name((a, b, equalityCheck) => {
249
- if (isObservable2(a) && isObservable2(b)) {
250
- return a === b;
251
- }
252
- return baseConfig.areObjectsEqual(a, b, equalityCheck);
253
- }, "areObjectsEqual")
254
- }), "createCustomConfig")
255
- });
256
- };
257
- EqualityService = _ts_decorate5([
258
- injectable()
259
- ], EqualityService);
260
-
261
- // lib/error-log/error-log.ts
262
- import { Subject } from "rxjs";
263
- function _ts_decorate6(decorators, target, key, desc) {
264
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
265
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
266
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
267
- return c > 3 && r && Object.defineProperty(target, key, r), r;
268
- }
269
- __name(_ts_decorate6, "_ts_decorate");
270
- function _ts_metadata3(k, v) {
271
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
272
- }
273
- __name(_ts_metadata3, "_ts_metadata");
274
- var ErrorLog = class {
275
- static {
276
- __name(this, "ErrorLog");
277
- }
278
- _error;
279
- constructor() {
280
- this._error = new Subject();
281
- }
282
- get error() {
283
- return this._error;
284
- }
285
- add(error) {
286
- console.error(error);
287
- this._error.next(error);
288
- }
289
- clear() {
290
- console.clear();
291
- }
292
- };
293
- ErrorLog = _ts_decorate6([
294
- injectable(),
295
- _ts_metadata3("design:type", Function),
296
- _ts_metadata3("design:paramtypes", [])
297
- ], ErrorLog);
298
-
299
- // lib/error-log/pretty-printer.ts
300
- function registerHandler(handler) {
301
- return {
302
- predicate: handler.predicate,
303
- action: /* @__PURE__ */ __name((value, level, quoteStrings) => handler.action(value, level, quoteStrings), "action")
304
- };
305
- }
306
- __name(registerHandler, "registerHandler");
307
- var PrettyPrinter = class {
308
- static {
309
- __name(this, "PrettyPrinter");
310
- }
311
- indent;
312
- handlers;
313
- constructor(indent = 4) {
314
- this.indent = indent;
315
- this.handlers = [
316
- registerHandler({
317
- predicate: /* @__PURE__ */ __name((v) => v === null || [
318
- "string",
319
- "number",
320
- "boolean",
321
- "bigint",
322
- "symbol",
323
- "undefined"
324
- ].includes(typeof v), "predicate"),
325
- action: /* @__PURE__ */ __name((v, level, quoteStrings) => [
326
- this.spaces(level) + this.formatPrimitive(v, quoteStrings ?? false)
327
- ], "action")
328
- }),
329
- registerHandler({
330
- predicate: /* @__PURE__ */ __name((v) => typeof v === "function", "predicate"),
331
- action: /* @__PURE__ */ __name((_, level) => [
332
- this.spaces(level) + "[[function]]"
333
- ], "action")
334
- }),
335
- registerHandler({
336
- predicate: Array.isArray,
337
- action: /* @__PURE__ */ __name((v, level, quoteStrings) => {
338
- if (v.length === 0) {
339
- return [
340
- this.spaces(level) + "[]"
341
- ];
342
- }
343
- const lines = [
344
- this.spaces(level) + "["
345
- ];
346
- for (let i = 0; i < v.length; i++) {
347
- const nested = this.toLines(v[i], level + 1, quoteStrings);
348
- lines.push(...nested);
349
- if (i < v.length - 1) {
350
- lines[lines.length - 1] += ",";
351
- }
352
- }
353
- lines.push(this.spaces(level) + "]");
354
- return lines;
355
- }, "action")
356
- }),
357
- registerHandler({
358
- predicate: /* @__PURE__ */ __name((v) => v instanceof Map, "predicate"),
359
- action: /* @__PURE__ */ __name((v, level, quoteStrings) => {
360
- if (v.size === 0) {
361
- return [
362
- this.spaces(level) + "{}"
363
- ];
364
- }
365
- const lines = [
366
- this.spaces(level) + "{"
367
- ];
368
- const next = this.spaces(level + 1);
369
- for (const [k, val] of v.entries()) {
370
- const nested = this.toLines(val, level + 1, quoteStrings);
371
- lines.push(`${next}${this.formatKey(k)}: ${nested[0].trimStart()}`);
372
- if (nested.length > 1) {
373
- lines.push(...nested.slice(1));
374
- }
375
- }
376
- lines.push(this.spaces(level) + "}");
377
- return lines;
378
- }, "action")
379
- }),
380
- registerHandler({
381
- predicate: /* @__PURE__ */ __name((v) => v instanceof Set, "predicate"),
382
- action: /* @__PURE__ */ __name((v, level, quoteStrings) => {
383
- if (v.size === 0) {
384
- return [
385
- this.spaces(level) + "{}"
386
- ];
387
- }
388
- const lines = [
389
- this.spaces(level) + "{"
390
- ];
391
- for (const item of v) {
392
- lines.push(...this.toLines(item, level + 1, quoteStrings));
393
- }
394
- lines.push(this.spaces(level) + "}");
395
- return lines;
396
- }, "action")
397
- }),
398
- registerHandler({
399
- predicate: /* @__PURE__ */ __name((v) => typeof v === "object" && v !== null && "toLines" in v, "predicate"),
400
- action: /* @__PURE__ */ __name((v, _level) => v.toLines(this.indent, _level), "action")
401
- }),
402
- registerHandler({
403
- predicate: /* @__PURE__ */ __name((v) => this.isCustomToString(v), "predicate"),
404
- action: /* @__PURE__ */ __name((v, level) => {
405
- const raw = v.toString(this.indent, level);
406
- const lines = Array.isArray(raw) ? raw : String(raw).split("\n");
407
- return lines.map((l) => this.spaces(level) + l);
408
- }, "action")
409
- }),
410
- registerHandler({
411
- predicate: /* @__PURE__ */ __name((v) => typeof v === "object" && v !== null && !Array.isArray(v), "predicate"),
412
- action: /* @__PURE__ */ __name((v, level, quoteStrings) => {
413
- const keys = Object.keys(v);
414
- if (keys.length === 0) {
415
- return [
416
- this.spaces(level) + "{}"
417
- ];
418
- }
419
- const lines = [
420
- this.spaces(level) + "{"
421
- ];
422
- const next = this.spaces(level + 1);
423
- for (const key of keys) {
424
- const nested = this.toLines(v[key], level + 1, quoteStrings);
425
- lines.push(`${next}${key}: ${nested[0].trimStart()}`);
426
- if (nested.length > 1) {
427
- lines.push(...nested.slice(1));
428
- }
429
- }
430
- lines.push(this.spaces(level) + "}");
431
- return lines;
432
- }, "action")
433
- })
434
- ];
435
- }
436
- toString(value, quoteStrings = true) {
437
- return this.toLines(value, 0, quoteStrings).join("\n");
438
- }
439
- toLines(value, level = 0, quoteStrings = true) {
440
- for (const handler of this.handlers) {
441
- if (handler.predicate(value)) {
442
- return handler.action(value, level, quoteStrings);
443
- }
444
- }
445
- return [
446
- this.spaces(level) + String(value)
447
- ];
448
- }
449
- formatPrimitive(value, quoteStrings) {
450
- if (typeof value === "string" && quoteStrings) {
451
- return `'${value}'`;
452
- }
453
- return String(value);
454
- }
455
- formatKey(key) {
456
- return typeof key === "string" ? key : String(key);
457
- }
458
- spaces(level) {
459
- return " ".repeat(this.indent * level);
460
- }
461
- isCustomToString(value) {
462
- if (typeof value !== "object" || value === null) return false;
463
- const proto = Object.getPrototypeOf(value);
464
- if (!proto) return false;
465
- const desc = Object.getOwnPropertyDescriptor(proto, "toString");
466
- return !!desc && typeof desc.value === "function" && desc.value !== Object.prototype.toString;
467
- }
468
- };
469
-
470
- // lib/error-log/print-value.ts
471
- function printValue(value) {
472
- console.log(new PrettyPrinter().toString(value, false));
473
- }
474
- __name(printValue, "printValue");
322
+ MapKeyAccessor = _ts_decorate4([
323
+ injectable()
324
+ ], MapKeyAccessor);
475
325
 
476
326
  // lib/exceptions/argument-exception.ts
477
327
  var ArgumentException = class extends Error {
@@ -671,78 +521,234 @@ var NullOrUndefinedException = class extends Error {
671
521
  // lib/exceptions/assertion.ts
672
522
  var Assertion = class {
673
523
  static {
674
- __name(this, "Assertion");
524
+ __name(this, "Assertion");
525
+ }
526
+ constructor() {
527
+ }
528
+ static assertIsFunction(value, name) {
529
+ if (!Type.isFunction(value)) {
530
+ const typeName = value && typeof value === "object" ? value.constructor?.name : typeof value;
531
+ throw new InvalidCastException(`${typeName}[${name}] is not a function`);
532
+ }
533
+ }
534
+ static assertNotNullOrUndefined(value, argumentName) {
535
+ if (Type.isNullOrUndefined(value)) {
536
+ throw new NullOrUndefinedException(argumentName);
537
+ }
538
+ }
539
+ static assertNotNullOrEmpty(value, argumentName) {
540
+ if (Type.isEmpty(value)) {
541
+ throw new NullOrEmptyException(argumentName);
542
+ }
543
+ }
544
+ };
545
+
546
+ // lib/exceptions/invalid-operation-exception.ts
547
+ var InvalidOperationException = class extends Error {
548
+ static {
549
+ __name(this, "InvalidOperationException");
550
+ }
551
+ constructor(message) {
552
+ super(message);
553
+ }
554
+ };
555
+
556
+ // lib/exceptions/parser-exception.ts
557
+ var ParserException = class extends Error {
558
+ static {
559
+ __name(this, "ParserException");
560
+ }
561
+ expression;
562
+ position;
563
+ constructor(expression, message, position) {
564
+ super(createMessage(expression, message, position ?? 0)), this.expression = expression, this.position = position;
565
+ }
566
+ };
567
+ function createMessage(expression, message, position) {
568
+ if (position >= 0) {
569
+ return `Invalid expression ${expression}. ${message}. Position ${position}`;
570
+ }
571
+ return `Invalid expression ${expression}. ${message}.`;
572
+ }
573
+ __name(createMessage, "createMessage");
574
+
575
+ // lib/exceptions/unexpected-exception.ts
576
+ var UnexpectedException = class extends Error {
577
+ static {
578
+ __name(this, "UnexpectedException");
579
+ }
580
+ constructor(message) {
581
+ super(message);
582
+ }
583
+ };
584
+
585
+ // lib/index-value-accessor/method-accessor.ts
586
+ function _ts_decorate5(decorators, target, key, desc) {
587
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
588
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
589
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
590
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
591
+ }
592
+ __name(_ts_decorate5, "_ts_decorate");
593
+ function _ts_metadata2(k, v) {
594
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
595
+ }
596
+ __name(_ts_metadata2, "_ts_metadata");
597
+ function _ts_param2(paramIndex, decorator) {
598
+ return function(target, key) {
599
+ decorator(target, key, paramIndex);
600
+ };
601
+ }
602
+ __name(_ts_param2, "_ts_param");
603
+ var MethodAccessor = class {
604
+ static {
605
+ __name(this, "MethodAccessor");
606
+ }
607
+ _functionCallResultCacheFactory;
608
+ priority = 6;
609
+ constructor(_functionCallResultCacheFactory) {
610
+ this._functionCallResultCacheFactory = _functionCallResultCacheFactory;
611
+ }
612
+ getIndexes() {
613
+ return [].values();
614
+ }
615
+ isAsync() {
616
+ return false;
617
+ }
618
+ hasValue(context, index) {
619
+ return this._functionCallResultCacheFactory.has(context, index);
620
+ }
621
+ getResolvedValue(context, index) {
622
+ return this.getValue(context, index);
623
+ }
624
+ getValue(context, index) {
625
+ return this._functionCallResultCacheFactory.get(context, index)?.result;
626
+ }
627
+ setValue(_, index) {
628
+ throw new UnsupportedException(`Cannot set method '${index}'`);
629
+ }
630
+ applies(context, index) {
631
+ if (typeof context !== "object" || context === null) {
632
+ return false;
633
+ }
634
+ const prop = context[index.functionName];
635
+ return Type.isFunction(prop) || Type.isArrowFunction(prop);
636
+ }
637
+ };
638
+ MethodAccessor = _ts_decorate5([
639
+ injectable(),
640
+ _ts_param2(0, inject(RsXCoreInjectionTokens.IFunctionCallResultCacheFactory)),
641
+ _ts_metadata2("design:type", Function),
642
+ _ts_metadata2("design:paramtypes", [
643
+ typeof IFunctionCallResultCacheFactory === "undefined" ? Object : IFunctionCallResultCacheFactory
644
+ ])
645
+ ], MethodAccessor);
646
+
647
+ // lib/index-value-accessor/observable-accessor.ts
648
+ import { BehaviorSubject, isObservable, Subject } from "rxjs";
649
+
650
+ // lib/types/set.ts
651
+ function replaceSetItemAt(set, oldValue, newValue) {
652
+ const values = Array.from(set);
653
+ const index = values.indexOf(oldValue);
654
+ if (index === -1) {
655
+ throw new RangeError("Index out of range");
656
+ }
657
+ values[index] = newValue;
658
+ set.clear();
659
+ values.forEach((value) => set.add(value));
660
+ return set;
661
+ }
662
+ __name(replaceSetItemAt, "replaceSetItemAt");
663
+
664
+ // lib/types/utc-date.ts
665
+ function utCDate(year, month = 0, date = 1, hours = 0, minutes = 0, seconds = 0, millisecond = 0) {
666
+ return new Date(Date.UTC(year, month, date, hours, minutes, seconds, millisecond));
667
+ }
668
+ __name(utCDate, "utCDate");
669
+
670
+ // lib/index-value-accessor/pending.ts
671
+ var PENDING = Symbol("pending");
672
+
673
+ // lib/index-value-accessor/observable-accessor.ts
674
+ function _ts_decorate6(decorators, target, key, desc) {
675
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
676
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
677
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
678
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
679
+ }
680
+ __name(_ts_decorate6, "_ts_decorate");
681
+ function _ts_metadata3(k, v) {
682
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
683
+ }
684
+ __name(_ts_metadata3, "_ts_metadata");
685
+ function _ts_param3(paramIndex, decorator) {
686
+ return function(target, key) {
687
+ decorator(target, key, paramIndex);
688
+ };
689
+ }
690
+ __name(_ts_param3, "_ts_param");
691
+ var ObservableAccessor = class {
692
+ static {
693
+ __name(this, "ObservableAccessor");
675
694
  }
676
- constructor() {
695
+ _resolvedValueCache;
696
+ priority = 2;
697
+ constructor(_resolvedValueCache) {
698
+ this._resolvedValueCache = _resolvedValueCache;
677
699
  }
678
- static assertIsFunction(value, name) {
679
- if (!Type.isFunction(value)) {
680
- const typeName = value && typeof value === "object" ? value.constructor?.name : typeof value;
681
- throw new InvalidCastException(`${typeName}[${name}] is not a function`);
682
- }
700
+ getIndexes() {
701
+ return [].values();
683
702
  }
684
- static assertNotNullOrUndefined(value, argumentName) {
685
- if (Type.isNullOrUndefined(value)) {
686
- throw new NullOrUndefinedException(argumentName);
687
- }
703
+ isAsync() {
704
+ return true;
688
705
  }
689
- static assertNotNullOrEmpty(value, argumentName) {
690
- if (Type.isEmpty(value)) {
691
- throw new NullOrEmptyException(argumentName);
706
+ getResolvedValue(context, index) {
707
+ if (context instanceof BehaviorSubject) return context.value;
708
+ const val = this.getIndexedValue(context, index);
709
+ if (val && typeof val === "object" || typeof val === "function") {
710
+ return this._resolvedValueCache.get(val) ?? PENDING;
692
711
  }
712
+ return PENDING;
693
713
  }
694
- };
695
-
696
- // lib/exceptions/invalid-operation-exception.ts
697
- var InvalidOperationException = class extends Error {
698
- static {
699
- __name(this, "InvalidOperationException");
700
- }
701
- constructor(message) {
702
- super(message);
703
- }
704
- };
705
-
706
- // lib/exceptions/parser-exception.ts
707
- var ParserException = class extends Error {
708
- static {
709
- __name(this, "ParserException");
714
+ hasValue(context, index) {
715
+ return this.getResolvedValue(context, index) !== PENDING;
710
716
  }
711
- expression;
712
- position;
713
- constructor(expression, message, position) {
714
- super(createMessage(expression, message, position ?? 0)), this.expression = expression, this.position = position;
717
+ getValue(context, index) {
718
+ return this.getIndexedValue(context, index);
715
719
  }
716
- };
717
- function createMessage(expression, message, position) {
718
- if (position >= 0) {
719
- return `Invalid expression ${expression}. ${message}. Position ${position}`;
720
+ setValue(context, index, value) {
721
+ const val = this.getIndexedValue(context, index);
722
+ if (val instanceof Subject) {
723
+ val.next(value);
724
+ return;
725
+ }
726
+ throw new UnsupportedException("Cannot set value for an observable");
720
727
  }
721
- return `Invalid expression ${expression}. ${message}.`;
722
- }
723
- __name(createMessage, "createMessage");
724
-
725
- // lib/exceptions/unexpected-exception.ts
726
- var UnexpectedException = class extends Error {
727
- static {
728
- __name(this, "UnexpectedException");
728
+ applies(context, index) {
729
+ const val = this.getIndexedValue(context, index);
730
+ return isObservable(val);
729
731
  }
730
- constructor(message) {
731
- super(message);
732
+ setLastValue(observable, value) {
733
+ this._resolvedValueCache.set(observable, value);
732
734
  }
733
- };
734
-
735
- // lib/exceptions/unsupported-exception.ts
736
- var UnsupportedException = class extends Error {
737
- static {
738
- __name(this, "UnsupportedException");
735
+ clearLastValue(observable) {
736
+ this._resolvedValueCache.delete(observable);
739
737
  }
740
- constructor(message) {
741
- super(message);
738
+ getIndexedValue(context, index) {
739
+ return (Type.toObject(context) ?? {})[index];
742
740
  }
743
741
  };
742
+ ObservableAccessor = _ts_decorate6([
743
+ injectable(),
744
+ _ts_param3(0, inject(RsXCoreInjectionTokens.IResolvedValueCache)),
745
+ _ts_metadata3("design:type", Function),
746
+ _ts_metadata3("design:paramtypes", [
747
+ typeof IResolvedValueCache === "undefined" ? Object : IResolvedValueCache
748
+ ])
749
+ ], ObservableAccessor);
744
750
 
745
- // lib/singleton-factory/singleton.factory.ts
751
+ // lib/index-value-accessor/promise-accessor.ts
746
752
  function _ts_decorate7(decorators, target, key, desc) {
747
753
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
748
754
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -754,948 +760,961 @@ function _ts_metadata4(k, v) {
754
760
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
755
761
  }
756
762
  __name(_ts_metadata4, "_ts_metadata");
757
- var SingletonFactory = class {
763
+ function _ts_param4(paramIndex, decorator) {
764
+ return function(target, key) {
765
+ decorator(target, key, paramIndex);
766
+ };
767
+ }
768
+ __name(_ts_param4, "_ts_param");
769
+ var PromiseAccessor = class {
758
770
  static {
759
- __name(this, "SingletonFactory");
771
+ __name(this, "PromiseAccessor");
760
772
  }
761
- _instances = /* @__PURE__ */ new Map();
762
- _referenceCounts = /* @__PURE__ */ new Map();
763
- constructor() {
773
+ _resolvedValueCache;
774
+ priority = 1;
775
+ constructor(_resolvedValueCache) {
776
+ this._resolvedValueCache = _resolvedValueCache;
764
777
  }
765
- exists(target) {
766
- for (const instance of this._instances.values()) {
767
- if (target === instance) {
768
- return true;
769
- }
770
- }
771
- return false;
778
+ getIndexes() {
779
+ return [].values();
772
780
  }
773
- toLines(indent = 4, level = 0) {
774
- const lines = [];
775
- const spaces = " ".repeat(indent * level);
776
- const spacesNext = " ".repeat(indent * (level + 1));
777
- const prettyPrinter = new PrettyPrinter();
778
- lines.push(spaces + "___________________________________________________________");
779
- lines.push(spaces + `${this.constructor.name}`);
780
- for (const [key, instance] of this._instances.entries()) {
781
- lines.push(spacesNext + "___________________________________________________________");
782
- lines.push(spacesNext + `key (ref. count = ${this._referenceCounts.get(key)}):`);
783
- const keyLines = prettyPrinter.toLines(key, level + 2, false);
784
- lines.push(...keyLines);
785
- lines.push(spacesNext + "instance:");
786
- const instanceLines = prettyPrinter.toLines(instance, level + 2, false);
787
- lines.push(...instanceLines);
788
- }
789
- return lines;
781
+ isAsync() {
782
+ return true;
790
783
  }
791
- toString(indent = 4, level = 0) {
792
- return this.toLines(indent, level).map((l) => " ".repeat(indent * level) + l).join("\n");
784
+ hasValue(context, index) {
785
+ const val = this.getIndexedValue(context, index);
786
+ return this.isCacheable(val) && this._resolvedValueCache.get(val) !== PENDING;
793
787
  }
794
- [Symbol.for("nodejs.util.inspect.custom")]() {
795
- return `${this.constructor.name}`;
788
+ getResolvedValue(context, index) {
789
+ const val = this.getIndexedValue(context, index);
790
+ return this.isCacheable(val) ? this._resolvedValueCache.get(val) ?? PENDING : PENDING;
796
791
  }
797
- get isEmpty() {
798
- return this._instances.size === 0;
792
+ getValue(context, index) {
793
+ return this.getIndexedValue(context, index);
799
794
  }
800
- ids() {
801
- return this._instances.keys();
795
+ setValue() {
796
+ throw new UnsupportedException("Cannot set value for a Promise");
802
797
  }
803
- getFromId(id) {
804
- return this._instances.get(id);
798
+ applies(context, index) {
799
+ const val = this.getIndexedValue(context, index);
800
+ return val instanceof Promise;
805
801
  }
806
- has(id) {
807
- return this._instances.has(id);
802
+ setLastValue(promise, value) {
803
+ this._resolvedValueCache.set(promise, value);
808
804
  }
809
- getFromData(data) {
810
- const id = this.getId(data);
811
- return id !== void 0 ? this.getFromId(id) : void 0;
805
+ clearLastValue(promise) {
806
+ this._resolvedValueCache.delete(promise);
812
807
  }
813
- dispose() {
814
- for (const id of this._instances.keys()) {
815
- this.release(id, true);
816
- }
817
- this._instances.clear();
818
- this._referenceCounts.clear();
819
- this.onDipose();
808
+ getIndexedValue(context, index) {
809
+ return (Type.toObject(context) ?? {})[index];
820
810
  }
821
- getOrCreate(data) {
822
- let instance = this.getFromId(this.getOrCreateId(data));
823
- if (instance === void 0) {
824
- instance = this.create(data).instance;
825
- }
826
- return instance;
811
+ isCacheable(value) {
812
+ return value !== null && (typeof value === "object" || typeof value === "function");
827
813
  }
828
- create(data) {
829
- const id = this.getOrCreateId(data);
830
- const instance = this.getOrCreateInstance(id, data);
831
- const result = {
832
- id,
833
- instance,
834
- referenceCount: this.updateReferenceCount(id, 1, instance)
835
- };
836
- if (result.referenceCount === 1) {
837
- this.onInstanceCreated(result.instance, data);
838
- }
839
- return result;
814
+ };
815
+ PromiseAccessor = _ts_decorate7([
816
+ injectable(),
817
+ _ts_param4(0, inject(RsXCoreInjectionTokens.IResolvedValueCache)),
818
+ _ts_metadata4("design:type", Function),
819
+ _ts_metadata4("design:paramtypes", [
820
+ typeof IResolvedValueCache === "undefined" ? Object : IResolvedValueCache
821
+ ])
822
+ ], PromiseAccessor);
823
+
824
+ // lib/index-value-accessor/property-value-accessor.ts
825
+ import { isObservable as isObservable2 } from "rxjs";
826
+ var PropertyValueAccessor = class {
827
+ static {
828
+ __name(this, "PropertyValueAccessor");
840
829
  }
841
- release(id, force) {
842
- const instance = this._instances.get(id);
843
- if (!instance) {
844
- return {
845
- instance: null,
846
- referenceCount: 0
847
- };
830
+ priority = 7;
831
+ isAsync() {
832
+ return false;
833
+ }
834
+ getIndexes(context) {
835
+ const obj = Type.toObject(context);
836
+ if (!obj) {
837
+ return [].values();
848
838
  }
849
- return {
850
- referenceCount: this.updateReferenceCount(id, -1, instance, force),
851
- instance
852
- };
839
+ return Object.keys(obj).filter((key) => !Type.isMethod(obj[key])).values();
853
840
  }
854
- get keys() {
855
- return Array.from(this._instances.keys());
841
+ hasValue(context, index) {
842
+ const val = this.getValue(context, index);
843
+ return val !== void 0;
856
844
  }
857
- onDisposeInstance = /* @__PURE__ */ __name((id, dispose) => {
858
- const { referenceCount } = this.release(id);
859
- if (referenceCount === 0) {
860
- dispose();
861
- }
862
- return referenceCount === 0;
863
- }, "onDisposeInstance");
864
- onDipose() {
845
+ getResolvedValue(context, index) {
846
+ return this.getValue(context, index);
865
847
  }
866
- onReleased() {
848
+ getValue(context, index) {
849
+ const obj = Type.toObject(context);
850
+ return obj ? obj[index] : void 0;
867
851
  }
868
- releaseInstance(_instance, _id) {
852
+ setValue(context, index, value) {
853
+ const obj = Type.toObject(context);
854
+ if (obj) {
855
+ obj[index] = value;
856
+ }
869
857
  }
870
- onInstanceCreated(_instance, _data) {
858
+ applies(context, index) {
859
+ const obj = Type.toObject(context);
860
+ if (!obj) {
861
+ return false;
862
+ }
863
+ return Type.hasProperty(obj, index) && !(obj instanceof Date) && !isObservable2(obj[index]) && !(obj[index] instanceof Promise);
871
864
  }
872
- getOrCreateId(data) {
873
- return this.getId(data) ?? this.createId(data);
865
+ };
866
+
867
+ // lib/index-value-accessor/resolved-value-cache.ts
868
+ function _ts_decorate8(decorators, target, key, desc) {
869
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
870
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
871
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
872
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
873
+ }
874
+ __name(_ts_decorate8, "_ts_decorate");
875
+ var ResolvedValueCache = class {
876
+ static {
877
+ __name(this, "ResolvedValueCache");
874
878
  }
875
- getReferenceCount(id) {
876
- return this._referenceCounts.get(id) ?? 0;
879
+ _resolvedValues = /* @__PURE__ */ new WeakMap();
880
+ set(source, value) {
881
+ this._resolvedValues.set(source, value);
877
882
  }
878
- updateReferenceCount(id, change, instance, forceRelease) {
879
- const referenceCount = this.getReferenceCount(id) + change;
880
- if (change === -1 && (forceRelease || referenceCount === 0)) {
881
- this._instances.delete(id);
882
- this._referenceCounts.delete(id);
883
- this.releaseInstance(instance, id);
884
- this.onReleased();
885
- } else if (referenceCount > 0) {
886
- this._referenceCounts.set(id, referenceCount);
887
- }
888
- return referenceCount;
883
+ get(source) {
884
+ return this._resolvedValues.get(source);
889
885
  }
890
- getOrCreateInstance(id, data) {
891
- let instance = this._instances.get(id);
892
- if (instance !== void 0) {
893
- return instance;
894
- }
895
- instance = this.createInstance(data, id);
896
- this._instances.set(id, instance);
897
- return instance;
886
+ delete(source) {
887
+ this._resolvedValues.delete(source);
898
888
  }
899
889
  };
900
- _ts_decorate7([
901
- preDestroy(),
902
- _ts_metadata4("design:type", Function),
903
- _ts_metadata4("design:paramtypes", []),
904
- _ts_metadata4("design:returntype", void 0)
905
- ], SingletonFactory.prototype, "dispose", null);
890
+ ResolvedValueCache = _ts_decorate8([
891
+ injectable()
892
+ ], ResolvedValueCache);
906
893
 
907
- // lib/function-call-index/function-call-index.ts
908
- var FunctionCallIndex = class {
894
+ // lib/index-value-accessor/set-key-accessor.ts
895
+ function _ts_decorate9(decorators, target, key, desc) {
896
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
897
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
898
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
899
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
900
+ }
901
+ __name(_ts_decorate9, "_ts_decorate");
902
+ var SetKeyAccessor = class {
909
903
  static {
910
- __name(this, "FunctionCallIndex");
904
+ __name(this, "SetKeyAccessor");
911
905
  }
912
- context;
913
- functionName;
914
- _sequenceWithId;
915
- _owner;
916
- _isDisposed = false;
917
- _id;
918
- constructor(context, functionName, _sequenceWithId, _owner) {
919
- this.context = context;
920
- this.functionName = functionName;
921
- this._sequenceWithId = _sequenceWithId;
922
- this._owner = _owner;
906
+ priority = 3;
907
+ getIndexes(set) {
908
+ return new Set(set).values();
923
909
  }
924
- get id() {
925
- if (!this._id) {
926
- this._id = `${this.functionName}${this._sequenceWithId.id}`;
927
- }
928
- return this._id;
910
+ isAsync() {
911
+ return false;
929
912
  }
930
- get argumentsId() {
931
- return this._sequenceWithId;
913
+ hasValue(set, key) {
914
+ return set.has(key);
932
915
  }
933
- dispose() {
934
- if (this._isDisposed) {
935
- return;
936
- }
937
- if (this._owner.canDispose?.()) {
938
- this._isDisposed = true;
939
- this._sequenceWithId.dispose();
940
- }
941
- this._owner.release();
916
+ getResolvedValue(set, key) {
917
+ return set.has(key) ? key : void 0;
918
+ }
919
+ getValue(set, key) {
920
+ return this.getResolvedValue(set, key);
921
+ }
922
+ setValue(set, key, value) {
923
+ replaceSetItemAt(set, key, value);
924
+ }
925
+ applies(map) {
926
+ return map instanceof Set;
942
927
  }
943
928
  };
929
+ SetKeyAccessor = _ts_decorate9([
930
+ injectable()
931
+ ], SetKeyAccessor);
944
932
 
945
- // lib/function-call-index/function-call-index.factory.ts
946
- function _ts_decorate8(decorators, target, key, desc) {
933
+ // lib/deep-clone/deep-clone-except.ts
934
+ function _ts_decorate10(decorators, target, key, desc) {
947
935
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
948
936
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
949
937
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
950
938
  return c > 3 && r && Object.defineProperty(target, key, r), r;
951
939
  }
952
- __name(_ts_decorate8, "_ts_decorate");
940
+ __name(_ts_decorate10, "_ts_decorate");
953
941
  function _ts_metadata5(k, v) {
954
942
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
955
943
  }
956
944
  __name(_ts_metadata5, "_ts_metadata");
957
- function _ts_param3(paramIndex, decorator) {
945
+ function _ts_param5(paramIndex, decorator) {
958
946
  return function(target, key) {
959
947
  decorator(target, key, paramIndex);
960
948
  };
961
949
  }
962
- __name(_ts_param3, "_ts_param");
963
- var FunctionCallIndexFactory = class extends SingletonFactory {
950
+ __name(_ts_param5, "_ts_param");
951
+ var DeepCloneValueExcept = class {
964
952
  static {
965
- __name(this, "FunctionCallIndexFactory");
966
- }
967
- _sequenceIdFactory;
968
- constructor(_sequenceIdFactory) {
969
- super(), this._sequenceIdFactory = _sequenceIdFactory;
970
- }
971
- getId(data) {
972
- return this._sequenceIdFactory.get(data.context, data.arguments);
953
+ __name(this, "DeepCloneValueExcept");
973
954
  }
974
- createInstance(data, id) {
975
- return new FunctionCallIndex(data.context, data.functionName, id, {
976
- canDispose: /* @__PURE__ */ __name(() => this.getReferenceCount(id) === 1, "canDispose"),
977
- release: /* @__PURE__ */ __name(() => this.release(id), "release")
978
- });
955
+ _resolvedValueCache;
956
+ constructor(_resolvedValueCache) {
957
+ this._resolvedValueCache = _resolvedValueCache;
979
958
  }
980
- createId(data) {
981
- const context = data.context;
982
- if (!context || typeof context !== "object") {
983
- throw new ArgumentException(`Expected context to be an object, got ${String(context)}`);
959
+ except(source) {
960
+ if (source instanceof Promise || source instanceof Observable) {
961
+ const value = this._resolvedValueCache.get(source);
962
+ return value === void 0 ? PENDING : value;
984
963
  }
985
- const fn = context[data.functionName];
986
- return this._sequenceIdFactory.create(fn, data.arguments);
987
- }
988
- releaseInstance(_, id) {
989
- id.dispose();
964
+ return void 0;
990
965
  }
991
966
  };
992
- FunctionCallIndexFactory = _ts_decorate8([
967
+ DeepCloneValueExcept = _ts_decorate10([
993
968
  injectable(),
994
- _ts_param3(0, inject(RsXCoreInjectionTokens.ISequenceIdFactory)),
969
+ _ts_param5(0, inject(RsXCoreInjectionTokens.IResolvedValueCache)),
995
970
  _ts_metadata5("design:type", Function),
996
971
  _ts_metadata5("design:paramtypes", [
997
- typeof ISequenceIdFactory === "undefined" ? Object : ISequenceIdFactory
972
+ typeof IResolvedValueCache === "undefined" ? Object : IResolvedValueCache
998
973
  ])
999
- ], FunctionCallIndexFactory);
974
+ ], DeepCloneValueExcept);
1000
975
 
1001
- // lib/function-call-result-cache/function-call-result-cache.factory.ts
1002
- function _ts_decorate9(decorators, target, key, desc) {
976
+ // lib/deep-clone/default-deep-clone.ts
977
+ function _ts_decorate11(decorators, target, key, desc) {
1003
978
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1004
979
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1005
980
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1006
981
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1007
982
  }
1008
- __name(_ts_decorate9, "_ts_decorate");
983
+ __name(_ts_decorate11, "_ts_decorate");
1009
984
  function _ts_metadata6(k, v) {
1010
985
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1011
986
  }
1012
987
  __name(_ts_metadata6, "_ts_metadata");
1013
- function _ts_param4(paramIndex, decorator) {
988
+ function _ts_param6(paramIndex, decorator) {
1014
989
  return function(target, key) {
1015
990
  decorator(target, key, paramIndex);
1016
991
  };
1017
992
  }
1018
- __name(_ts_param4, "_ts_param");
1019
- var FunctionCallResultCache = class FunctionCallResultCache2 {
1020
- static {
1021
- __name(this, "FunctionCallResultCache");
1022
- }
1023
- _disposeableIndex;
1024
- result;
1025
- _owner;
1026
- _isDisposed = false;
1027
- constructor(_disposeableIndex, result, _owner) {
1028
- this._disposeableIndex = _disposeableIndex;
1029
- this.result = result;
1030
- this._owner = _owner;
1031
- }
1032
- get index() {
1033
- return this._disposeableIndex;
1034
- }
1035
- dispose() {
1036
- if (this._isDisposed) {
1037
- return;
1038
- }
1039
- if (this._owner.canDispose?.()) {
1040
- this._disposeableIndex.dispose();
1041
- this._isDisposed = true;
1042
- }
1043
- this._owner.release();
1044
- }
1045
- };
1046
- var FunctionCallResultCacheForContextManager = class FunctionCallResultCacheForContextManager2 extends SingletonFactory {
1047
- static {
1048
- __name(this, "FunctionCallResultCacheForContextManager");
1049
- }
1050
- _context;
1051
- _functionCallIndexFactory;
1052
- releaseContext;
1053
- constructor(_context, _functionCallIndexFactory, releaseContext) {
1054
- super(), this._context = _context, this._functionCallIndexFactory = _functionCallIndexFactory, this.releaseContext = releaseContext;
1055
- }
1056
- getId(data) {
1057
- return this._functionCallIndexFactory.getFromData({
1058
- functionName: data.functionName,
1059
- context: this._context,
1060
- arguments: data.arguments
1061
- });
1062
- }
1063
- createInstance(data, id) {
1064
- return new FunctionCallResultCache(id, data.result, {
1065
- canDispose: /* @__PURE__ */ __name(() => this.getReferenceCount(id) === 1, "canDispose"),
1066
- release: /* @__PURE__ */ __name(() => this.release(id), "release")
1067
- });
1068
- }
1069
- createId(data) {
1070
- return this._functionCallIndexFactory.create({
1071
- functionName: data.functionName,
1072
- context: this._context,
1073
- arguments: data.arguments
1074
- }).instance;
1075
- }
1076
- releaseInstance(_, id) {
1077
- this._functionCallIndexFactory.release(id.argumentsId);
1078
- }
1079
- onReleased() {
1080
- this.releaseContext();
1081
- }
1082
- };
1083
- var FunctionCallResultCacheManager = class FunctionCallResultCacheManager2 extends SingletonFactory {
993
+ __name(_ts_param6, "_ts_param");
994
+ var DefaultDeepClone = class {
1084
995
  static {
1085
- __name(this, "FunctionCallResultCacheManager");
1086
- }
1087
- _functionCallIndexFactory;
1088
- constructor(_functionCallIndexFactory) {
1089
- super(), this._functionCallIndexFactory = _functionCallIndexFactory;
1090
- }
1091
- getId(contex) {
1092
- return this.createId(contex);
996
+ __name(this, "DefaultDeepClone");
1093
997
  }
1094
- createInstance(context, id) {
1095
- return new FunctionCallResultCacheForContextManager(context, this._functionCallIndexFactory, () => this.release(id));
998
+ _deepCloneList;
999
+ priority = 0;
1000
+ constructor(_deepCloneList) {
1001
+ this._deepCloneList = _deepCloneList;
1096
1002
  }
1097
- createId(contex) {
1098
- return contex;
1003
+ clone(source) {
1004
+ let error = null;
1005
+ for (let i = 0; i < this._deepCloneList.length; i++) {
1006
+ try {
1007
+ return this._deepCloneList[i].clone(source);
1008
+ } catch (e) {
1009
+ error = e;
1010
+ }
1011
+ }
1012
+ throw error;
1099
1013
  }
1100
1014
  };
1101
- var FunctionCallResultCacheFactory = class {
1015
+ DefaultDeepClone = _ts_decorate11([
1016
+ injectable(),
1017
+ _ts_param6(0, multiInject(RsXCoreInjectionTokens.IDeepCloneList)),
1018
+ _ts_metadata6("design:type", Function),
1019
+ _ts_metadata6("design:paramtypes", [
1020
+ Object
1021
+ ])
1022
+ ], DefaultDeepClone);
1023
+
1024
+ // lib/deep-clone/lodash-deep-clone.ts
1025
+ import cloneDeepWith from "lodash.clonedeepwith";
1026
+ function _ts_decorate12(decorators, target, key, desc) {
1027
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1028
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1029
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1030
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1031
+ }
1032
+ __name(_ts_decorate12, "_ts_decorate");
1033
+ function _ts_metadata7(k, v) {
1034
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1035
+ }
1036
+ __name(_ts_metadata7, "_ts_metadata");
1037
+ function _ts_param7(paramIndex, decorator) {
1038
+ return function(target, key) {
1039
+ decorator(target, key, paramIndex);
1040
+ };
1041
+ }
1042
+ __name(_ts_param7, "_ts_param");
1043
+ var LodashDeepClone = class {
1102
1044
  static {
1103
- __name(this, "FunctionCallResultCacheFactory");
1104
- }
1105
- _functionCallResultCacheManager;
1106
- constructor(functionCallIndexFactory) {
1107
- this._functionCallResultCacheManager = new FunctionCallResultCacheManager(functionCallIndexFactory);
1108
- }
1109
- create(context, result) {
1110
- return this._functionCallResultCacheManager.create(context).instance.create(result).instance;
1045
+ __name(this, "LodashDeepClone");
1111
1046
  }
1112
- has(context, index) {
1113
- return this._functionCallResultCacheManager.getFromId(context)?.has(index) ?? false;
1047
+ _deepCloneExcept;
1048
+ priority = 1;
1049
+ constructor(_deepCloneExcept) {
1050
+ this._deepCloneExcept = _deepCloneExcept;
1114
1051
  }
1115
- get(context, index) {
1116
- return this._functionCallResultCacheManager.getFromId(context)?.getFromId(index);
1052
+ clone(source) {
1053
+ return cloneDeepWith(source, this.cloneExceptPredicate);
1117
1054
  }
1055
+ cloneExceptPredicate = /* @__PURE__ */ __name((value) => {
1056
+ return this._deepCloneExcept.except(value);
1057
+ }, "cloneExceptPredicate");
1118
1058
  };
1119
- FunctionCallResultCacheFactory = _ts_decorate9([
1059
+ LodashDeepClone = _ts_decorate12([
1120
1060
  injectable(),
1121
- _ts_param4(0, inject(RsXCoreInjectionTokens.IFunctionCallIndexFactory)),
1122
- _ts_metadata6("design:type", Function),
1123
- _ts_metadata6("design:paramtypes", [
1124
- typeof IFunctionCallIndexFactory === "undefined" ? Object : IFunctionCallIndexFactory
1061
+ _ts_param7(0, inject(RsXCoreInjectionTokens.DefaultDeepCloneExcept)),
1062
+ _ts_metadata7("design:type", Function),
1063
+ _ts_metadata7("design:paramtypes", [
1064
+ typeof IDeepCloneExcept === "undefined" ? Object : IDeepCloneExcept
1125
1065
  ])
1126
- ], FunctionCallResultCacheFactory);
1066
+ ], LodashDeepClone);
1127
1067
 
1128
- // lib/guid/guid.factory.ts
1129
- function _ts_decorate10(decorators, target, key, desc) {
1068
+ // lib/deep-clone/structured-deep-clone.ts
1069
+ function _ts_decorate13(decorators, target, key, desc) {
1130
1070
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1131
1071
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1132
1072
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1133
1073
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1134
1074
  }
1135
- __name(_ts_decorate10, "_ts_decorate");
1136
- var GuidFactory = class {
1075
+ __name(_ts_decorate13, "_ts_decorate");
1076
+ var StructuredDeepClone = class {
1137
1077
  static {
1138
- __name(this, "GuidFactory");
1078
+ __name(this, "StructuredDeepClone");
1139
1079
  }
1140
- create() {
1141
- return crypto.randomUUID();
1080
+ priority = 2;
1081
+ clone(source) {
1082
+ return structuredClone(source);
1142
1083
  }
1143
1084
  };
1144
- GuidFactory = _ts_decorate10([
1085
+ StructuredDeepClone = _ts_decorate13([
1145
1086
  injectable()
1146
- ], GuidFactory);
1087
+ ], StructuredDeepClone);
1147
1088
 
1148
- // lib/index-value-accessor/array-index-accessor.ts
1149
- function _ts_decorate11(decorators, target, key, desc) {
1089
+ // lib/equality-service/equality-service.ts
1090
+ import { createCustomEqual } from "fast-equals";
1091
+ import { isObservable as isObservable3 } from "rxjs";
1092
+ function _ts_decorate14(decorators, target, key, desc) {
1150
1093
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1151
1094
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1152
1095
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1153
1096
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1154
1097
  }
1155
- __name(_ts_decorate11, "_ts_decorate");
1156
- var ArrayIndexAccessor = class {
1098
+ __name(_ts_decorate14, "_ts_decorate");
1099
+ var EqualityService = class {
1157
1100
  static {
1158
- __name(this, "ArrayIndexAccessor");
1101
+ __name(this, "EqualityService");
1159
1102
  }
1160
- priority = 5;
1161
- isAsync() {
1162
- return false;
1103
+ isEqual = createCustomEqual({
1104
+ createCustomConfig: /* @__PURE__ */ __name((baseConfig) => ({
1105
+ ...baseConfig,
1106
+ areObjectsEqual: /* @__PURE__ */ __name((a, b, equalityCheck) => {
1107
+ if (isObservable3(a) && isObservable3(b)) {
1108
+ return a === b;
1109
+ }
1110
+ return baseConfig.areObjectsEqual(a, b, equalityCheck);
1111
+ }, "areObjectsEqual")
1112
+ }), "createCustomConfig")
1113
+ });
1114
+ };
1115
+ EqualityService = _ts_decorate14([
1116
+ injectable()
1117
+ ], EqualityService);
1118
+
1119
+ // lib/error-log/error-log.ts
1120
+ import { Subject as Subject2 } from "rxjs";
1121
+ function _ts_decorate15(decorators, target, key, desc) {
1122
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1123
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1124
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1125
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1126
+ }
1127
+ __name(_ts_decorate15, "_ts_decorate");
1128
+ function _ts_metadata8(k, v) {
1129
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1130
+ }
1131
+ __name(_ts_metadata8, "_ts_metadata");
1132
+ var ErrorLog = class {
1133
+ static {
1134
+ __name(this, "ErrorLog");
1135
+ }
1136
+ _error;
1137
+ constructor() {
1138
+ this._error = new Subject2();
1139
+ }
1140
+ get error() {
1141
+ return this._error;
1142
+ }
1143
+ add(error) {
1144
+ console.error(error);
1145
+ this._error.next(error);
1146
+ }
1147
+ clear() {
1148
+ console.clear();
1149
+ }
1150
+ };
1151
+ ErrorLog = _ts_decorate15([
1152
+ injectable(),
1153
+ _ts_metadata8("design:type", Function),
1154
+ _ts_metadata8("design:paramtypes", [])
1155
+ ], ErrorLog);
1156
+
1157
+ // lib/error-log/pretty-printer.ts
1158
+ function registerHandler(handler) {
1159
+ return {
1160
+ predicate: handler.predicate,
1161
+ action: /* @__PURE__ */ __name((value, level, quoteStrings) => handler.action(value, level, quoteStrings), "action")
1162
+ };
1163
+ }
1164
+ __name(registerHandler, "registerHandler");
1165
+ var PrettyPrinter = class {
1166
+ static {
1167
+ __name(this, "PrettyPrinter");
1168
+ }
1169
+ indent;
1170
+ handlers;
1171
+ constructor(indent = 4) {
1172
+ this.indent = indent;
1173
+ this.handlers = [
1174
+ registerHandler({
1175
+ predicate: /* @__PURE__ */ __name((v) => v === null || [
1176
+ "string",
1177
+ "number",
1178
+ "boolean",
1179
+ "bigint",
1180
+ "symbol",
1181
+ "undefined"
1182
+ ].includes(typeof v), "predicate"),
1183
+ action: /* @__PURE__ */ __name((v, level, quoteStrings) => [
1184
+ this.spaces(level) + this.formatPrimitive(v, quoteStrings ?? false)
1185
+ ], "action")
1186
+ }),
1187
+ registerHandler({
1188
+ predicate: /* @__PURE__ */ __name((v) => typeof v === "function", "predicate"),
1189
+ action: /* @__PURE__ */ __name((_, level) => [
1190
+ this.spaces(level) + "[[function]]"
1191
+ ], "action")
1192
+ }),
1193
+ registerHandler({
1194
+ predicate: Array.isArray,
1195
+ action: /* @__PURE__ */ __name((v, level, quoteStrings) => {
1196
+ if (v.length === 0) {
1197
+ return [
1198
+ this.spaces(level) + "[]"
1199
+ ];
1200
+ }
1201
+ const lines = [
1202
+ this.spaces(level) + "["
1203
+ ];
1204
+ for (let i = 0; i < v.length; i++) {
1205
+ const nested = this.toLines(v[i], level + 1, quoteStrings);
1206
+ lines.push(...nested);
1207
+ if (i < v.length - 1) {
1208
+ lines[lines.length - 1] += ",";
1209
+ }
1210
+ }
1211
+ lines.push(this.spaces(level) + "]");
1212
+ return lines;
1213
+ }, "action")
1214
+ }),
1215
+ registerHandler({
1216
+ predicate: /* @__PURE__ */ __name((v) => v instanceof Map, "predicate"),
1217
+ action: /* @__PURE__ */ __name((v, level, quoteStrings) => {
1218
+ if (v.size === 0) {
1219
+ return [
1220
+ this.spaces(level) + "{}"
1221
+ ];
1222
+ }
1223
+ const lines = [
1224
+ this.spaces(level) + "{"
1225
+ ];
1226
+ const next = this.spaces(level + 1);
1227
+ for (const [k, val] of v.entries()) {
1228
+ const nested = this.toLines(val, level + 1, quoteStrings);
1229
+ lines.push(`${next}${this.formatKey(k)}: ${nested[0].trimStart()}`);
1230
+ if (nested.length > 1) {
1231
+ lines.push(...nested.slice(1));
1232
+ }
1233
+ }
1234
+ lines.push(this.spaces(level) + "}");
1235
+ return lines;
1236
+ }, "action")
1237
+ }),
1238
+ registerHandler({
1239
+ predicate: /* @__PURE__ */ __name((v) => v instanceof Set, "predicate"),
1240
+ action: /* @__PURE__ */ __name((v, level, quoteStrings) => {
1241
+ if (v.size === 0) {
1242
+ return [
1243
+ this.spaces(level) + "{}"
1244
+ ];
1245
+ }
1246
+ const lines = [
1247
+ this.spaces(level) + "{"
1248
+ ];
1249
+ for (const item of v) {
1250
+ lines.push(...this.toLines(item, level + 1, quoteStrings));
1251
+ }
1252
+ lines.push(this.spaces(level) + "}");
1253
+ return lines;
1254
+ }, "action")
1255
+ }),
1256
+ registerHandler({
1257
+ predicate: /* @__PURE__ */ __name((v) => typeof v === "object" && v !== null && "toLines" in v, "predicate"),
1258
+ action: /* @__PURE__ */ __name((v, _level) => v.toLines(this.indent, _level), "action")
1259
+ }),
1260
+ registerHandler({
1261
+ predicate: /* @__PURE__ */ __name((v) => this.isCustomToString(v), "predicate"),
1262
+ action: /* @__PURE__ */ __name((v, level) => {
1263
+ const raw = v.toString(this.indent, level);
1264
+ const lines = Array.isArray(raw) ? raw : String(raw).split("\n");
1265
+ return lines.map((l) => this.spaces(level) + l);
1266
+ }, "action")
1267
+ }),
1268
+ registerHandler({
1269
+ predicate: /* @__PURE__ */ __name((v) => typeof v === "object" && v !== null && !Array.isArray(v), "predicate"),
1270
+ action: /* @__PURE__ */ __name((v, level, quoteStrings) => {
1271
+ const keys = Object.keys(v);
1272
+ if (keys.length === 0) {
1273
+ return [
1274
+ this.spaces(level) + "{}"
1275
+ ];
1276
+ }
1277
+ const lines = [
1278
+ this.spaces(level) + "{"
1279
+ ];
1280
+ const next = this.spaces(level + 1);
1281
+ for (const key of keys) {
1282
+ const nested = this.toLines(v[key], level + 1, quoteStrings);
1283
+ lines.push(`${next}${key}: ${nested[0].trimStart()}`);
1284
+ if (nested.length > 1) {
1285
+ lines.push(...nested.slice(1));
1286
+ }
1287
+ }
1288
+ lines.push(this.spaces(level) + "}");
1289
+ return lines;
1290
+ }, "action")
1291
+ })
1292
+ ];
1163
1293
  }
1164
- getIndexes(array) {
1165
- return array.keys();
1294
+ toString(value, quoteStrings = true) {
1295
+ return this.toLines(value, 0, quoteStrings).join("\n");
1166
1296
  }
1167
- hasValue(array, index) {
1168
- return this.getValue(array, index) !== void 0;
1297
+ toLines(value, level = 0, quoteStrings = true) {
1298
+ for (const handler of this.handlers) {
1299
+ if (handler.predicate(value)) {
1300
+ return handler.action(value, level, quoteStrings);
1301
+ }
1302
+ }
1303
+ return [
1304
+ this.spaces(level) + String(value)
1305
+ ];
1169
1306
  }
1170
- getResolvedValue(array, index) {
1171
- return array[index];
1307
+ formatPrimitive(value, quoteStrings) {
1308
+ if (typeof value === "string" && quoteStrings) {
1309
+ return `'${value}'`;
1310
+ }
1311
+ return String(value);
1172
1312
  }
1173
- getValue(array, index) {
1174
- return this.getResolvedValue(array, index);
1313
+ formatKey(key) {
1314
+ return typeof key === "string" ? key : String(key);
1175
1315
  }
1176
- setValue(array, index, value) {
1177
- array[index] = value;
1316
+ spaces(level) {
1317
+ return " ".repeat(this.indent * level);
1178
1318
  }
1179
- applies(array) {
1180
- return Array.isArray(array);
1319
+ isCustomToString(value) {
1320
+ if (typeof value !== "object" || value === null) return false;
1321
+ const proto = Object.getPrototypeOf(value);
1322
+ if (!proto) return false;
1323
+ const desc = Object.getOwnPropertyDescriptor(proto, "toString");
1324
+ return !!desc && typeof desc.value === "function" && desc.value !== Object.prototype.toString;
1181
1325
  }
1182
1326
  };
1183
- ArrayIndexAccessor = _ts_decorate11([
1184
- injectable()
1185
- ], ArrayIndexAccessor);
1186
1327
 
1187
- // lib/index-value-accessor/date-property-accessor.interface.ts
1188
- var dataProperties = [
1189
- "year",
1190
- "utcYear",
1191
- "month",
1192
- "utcMonth",
1193
- "date",
1194
- "utcDate",
1195
- "hours",
1196
- "utcHours",
1197
- "minutes",
1198
- "utcMinutes",
1199
- "seconds",
1200
- "utcSeconds",
1201
- "milliseconds",
1202
- "utcMilliseconds",
1203
- "time"
1204
- ];
1328
+ // lib/error-log/print-value.ts
1329
+ function printValue(value) {
1330
+ console.log(new PrettyPrinter().toString(value, false));
1331
+ }
1332
+ __name(printValue, "printValue");
1205
1333
 
1206
- // lib/index-value-accessor/date-property-accessor.ts
1207
- function _ts_decorate12(decorators, target, key, desc) {
1334
+ // lib/singleton-factory/singleton.factory.ts
1335
+ function _ts_decorate16(decorators, target, key, desc) {
1208
1336
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1209
1337
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1210
1338
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1211
1339
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1212
1340
  }
1213
- __name(_ts_decorate12, "_ts_decorate");
1214
- var DatePropertyAccessor = class {
1341
+ __name(_ts_decorate16, "_ts_decorate");
1342
+ function _ts_metadata9(k, v) {
1343
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1344
+ }
1345
+ __name(_ts_metadata9, "_ts_metadata");
1346
+ var SingletonFactory = class {
1215
1347
  static {
1216
- __name(this, "DatePropertyAccessor");
1217
- }
1218
- priority = 0;
1219
- _setter = {
1220
- year: /* @__PURE__ */ __name((date, value) => date.setFullYear(value), "year"),
1221
- utcYear: /* @__PURE__ */ __name((date, value) => date.setUTCFullYear(value), "utcYear"),
1222
- month: /* @__PURE__ */ __name((date, value) => date.setMonth(value), "month"),
1223
- utcMonth: /* @__PURE__ */ __name((date, value) => date.setUTCMonth(value), "utcMonth"),
1224
- date: /* @__PURE__ */ __name((date, value) => date.setDate(value), "date"),
1225
- utcDate: /* @__PURE__ */ __name((date, value) => date.setUTCDate(value), "utcDate"),
1226
- hours: /* @__PURE__ */ __name((date, value) => date.setHours(value), "hours"),
1227
- utcHours: /* @__PURE__ */ __name((date, value) => date.setUTCHours(value), "utcHours"),
1228
- minutes: /* @__PURE__ */ __name((date, value) => date.setMinutes(value), "minutes"),
1229
- utcMinutes: /* @__PURE__ */ __name((date, value) => date.setUTCMinutes(value), "utcMinutes"),
1230
- seconds: /* @__PURE__ */ __name((date, value) => date.setSeconds(value), "seconds"),
1231
- utcSeconds: /* @__PURE__ */ __name((date, value) => date.setUTCSeconds(value), "utcSeconds"),
1232
- milliseconds: /* @__PURE__ */ __name((date, value) => date.setMilliseconds(value), "milliseconds"),
1233
- utcMilliseconds: /* @__PURE__ */ __name((date, value) => date.setUTCMilliseconds(value), "utcMilliseconds"),
1234
- time: /* @__PURE__ */ __name((date, value) => date.setTime(value), "time")
1235
- };
1236
- _getters = {
1237
- year: /* @__PURE__ */ __name((date) => date.getFullYear(), "year"),
1238
- utcYear: /* @__PURE__ */ __name((date) => date.getUTCFullYear(), "utcYear"),
1239
- month: /* @__PURE__ */ __name((date) => date.getMonth(), "month"),
1240
- utcMonth: /* @__PURE__ */ __name((date) => date.getUTCMonth(), "utcMonth"),
1241
- date: /* @__PURE__ */ __name((date) => date.getDate(), "date"),
1242
- utcDate: /* @__PURE__ */ __name((date) => date.getUTCDate(), "utcDate"),
1243
- hours: /* @__PURE__ */ __name((date) => date.getHours(), "hours"),
1244
- utcHours: /* @__PURE__ */ __name((date) => date.getUTCHours(), "utcHours"),
1245
- minutes: /* @__PURE__ */ __name((date) => date.getMinutes(), "minutes"),
1246
- utcMinutes: /* @__PURE__ */ __name((date) => date.getUTCMinutes(), "utcMinutes"),
1247
- seconds: /* @__PURE__ */ __name((date) => date.getSeconds(), "seconds"),
1248
- utcSeconds: /* @__PURE__ */ __name((date) => date.getUTCSeconds(), "utcSeconds"),
1249
- milliseconds: /* @__PURE__ */ __name((date) => date.getMilliseconds(), "milliseconds"),
1250
- utcMilliseconds: /* @__PURE__ */ __name((date) => date.getUTCMilliseconds(), "utcMilliseconds"),
1251
- time: /* @__PURE__ */ __name((date) => date.getTime(), "time")
1252
- };
1253
- isAsync() {
1254
- return false;
1348
+ __name(this, "SingletonFactory");
1255
1349
  }
1256
- getIndexes() {
1257
- return dataProperties.values();
1350
+ _instances = /* @__PURE__ */ new Map();
1351
+ _referenceCounts = /* @__PURE__ */ new Map();
1352
+ constructor() {
1258
1353
  }
1259
- hasValue(context, index) {
1260
- return this.getValue(context, index) !== void 0;
1354
+ exists(target) {
1355
+ for (const instance of this._instances.values()) {
1356
+ if (target === instance) {
1357
+ return true;
1358
+ }
1359
+ }
1360
+ return false;
1261
1361
  }
1262
- getResolvedValue(context, index) {
1263
- return this.getValue(context, index);
1362
+ toLines(indent = 4, level = 0) {
1363
+ const lines = [];
1364
+ const spaces = " ".repeat(indent * level);
1365
+ const spacesNext = " ".repeat(indent * (level + 1));
1366
+ const prettyPrinter = new PrettyPrinter();
1367
+ lines.push(spaces + "___________________________________________________________");
1368
+ lines.push(spaces + `${this.constructor.name}`);
1369
+ for (const [key, instance] of this._instances.entries()) {
1370
+ lines.push(spacesNext + "___________________________________________________________");
1371
+ lines.push(spacesNext + `key (ref. count = ${this._referenceCounts.get(key)}):`);
1372
+ const keyLines = prettyPrinter.toLines(key, level + 2, false);
1373
+ lines.push(...keyLines);
1374
+ lines.push(spacesNext + "instance:");
1375
+ const instanceLines = prettyPrinter.toLines(instance, level + 2, false);
1376
+ lines.push(...instanceLines);
1377
+ }
1378
+ return lines;
1264
1379
  }
1265
- getValue(date, index) {
1266
- return this._getters[index]?.(date);
1380
+ toString(indent = 4, level = 0) {
1381
+ return this.toLines(indent, level).map((l) => " ".repeat(indent * level) + l).join("\n");
1267
1382
  }
1268
- setValue(date, index, value) {
1269
- this._setter[index]?.(date, value);
1383
+ [Symbol.for("nodejs.util.inspect.custom")]() {
1384
+ return `${this.constructor.name}`;
1270
1385
  }
1271
- applies(context, index) {
1272
- return context instanceof Date && !!this._getters[index];
1386
+ get isEmpty() {
1387
+ return this._instances.size === 0;
1273
1388
  }
1274
- };
1275
- DatePropertyAccessor = _ts_decorate12([
1276
- injectable()
1277
- ], DatePropertyAccessor);
1278
-
1279
- // lib/index-value-accessor/index-value-accessor.ts
1280
- function _ts_decorate13(decorators, target, key, desc) {
1281
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1282
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1283
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1284
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1285
- }
1286
- __name(_ts_decorate13, "_ts_decorate");
1287
- function _ts_metadata7(k, v) {
1288
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1289
- }
1290
- __name(_ts_metadata7, "_ts_metadata");
1291
- function _ts_param5(paramIndex, decorator) {
1292
- return function(target, key) {
1293
- decorator(target, key, paramIndex);
1294
- };
1295
- }
1296
- __name(_ts_param5, "_ts_param");
1297
- var IndexValueAccessor = class {
1298
- static {
1299
- __name(this, "IndexValueAccessor");
1389
+ ids() {
1390
+ return this._instances.keys();
1300
1391
  }
1301
- priority = 0;
1302
- _accessors;
1303
- constructor(accessors) {
1304
- this._accessors = [
1305
- ...accessors
1306
- ].sort((a, b) => b.priority - a.priority);
1392
+ getFromId(id) {
1393
+ return this._instances.get(id);
1307
1394
  }
1308
- getIndexes(context, index) {
1309
- return this.getIndexAccessor(context, index).getIndexes(context, index);
1395
+ has(id) {
1396
+ return this._instances.has(id);
1310
1397
  }
1311
- isAsync(context, index) {
1312
- return this.getIndexAccessor(context, index).isAsync(context, index);
1398
+ getFromData(data) {
1399
+ const id = this.getId(data);
1400
+ return id !== void 0 ? this.getFromId(id) : void 0;
1313
1401
  }
1314
- hasValue(context, index) {
1315
- return this.getIndexAccessor(context, index).hasValue(context, index);
1402
+ dispose() {
1403
+ for (const id of this._instances.keys()) {
1404
+ this.release(id, true);
1405
+ }
1406
+ this._instances.clear();
1407
+ this._referenceCounts.clear();
1408
+ this.onDipose();
1316
1409
  }
1317
- getResolvedValue(context, index) {
1318
- return this.getIndexAccessor(context, index).getResolvedValue(context, index);
1410
+ getOrCreate(data) {
1411
+ let instance = this.getFromId(this.getOrCreateId(data));
1412
+ if (instance === void 0) {
1413
+ instance = this.create(data).instance;
1414
+ }
1415
+ return instance;
1319
1416
  }
1320
- getValue(context, index) {
1321
- return this.getIndexAccessor(context, index).getValue(context, index);
1417
+ create(data) {
1418
+ const id = this.getOrCreateId(data);
1419
+ const instance = this.getOrCreateInstance(id, data);
1420
+ const result = {
1421
+ id,
1422
+ instance,
1423
+ referenceCount: this.updateReferenceCount(id, 1, instance)
1424
+ };
1425
+ if (result.referenceCount === 1) {
1426
+ this.onInstanceCreated(result.instance, data);
1427
+ }
1428
+ return result;
1322
1429
  }
1323
- setValue(context, index, value) {
1324
- this.getIndexAccessor(context, index).setValue(context, index, value);
1430
+ release(id, force) {
1431
+ const instance = this._instances.get(id);
1432
+ if (!instance) {
1433
+ return {
1434
+ instance: null,
1435
+ referenceCount: 0
1436
+ };
1437
+ }
1438
+ return {
1439
+ referenceCount: this.updateReferenceCount(id, -1, instance, force),
1440
+ instance
1441
+ };
1325
1442
  }
1326
- applies(context, index) {
1327
- return this.getIndexAccessor(context, index).applies(context, index);
1443
+ get keys() {
1444
+ return Array.from(this._instances.keys());
1328
1445
  }
1329
- getIndexAccessor(context, index) {
1330
- const accessor = this._accessors.find((accessor2) => accessor2.applies(context, index));
1331
- if (!accessor) {
1332
- if (typeof context === "object" && context !== null) {
1333
- throw new UnsupportedException(`No accessor found for ${context.constructor.name}.${String(index)}`);
1334
- } else {
1335
- throw new UnsupportedException(`No accessor found for non-object context: ${String(context)}.${String(index)}`);
1336
- }
1446
+ onDisposeInstance = /* @__PURE__ */ __name((id, dispose) => {
1447
+ const { referenceCount } = this.release(id);
1448
+ if (referenceCount === 0) {
1449
+ dispose();
1337
1450
  }
1338
- return accessor;
1339
- }
1340
- };
1341
- IndexValueAccessor = _ts_decorate13([
1342
- injectable(),
1343
- _ts_param5(0, multiInject(RsXCoreInjectionTokens.IIndexValueAccessorList)),
1344
- _ts_metadata7("design:type", Function),
1345
- _ts_metadata7("design:paramtypes", [
1346
- Object
1347
- ])
1348
- ], IndexValueAccessor);
1349
-
1350
- // lib/index-value-accessor/map-key-accessor.ts
1351
- function _ts_decorate14(decorators, target, key, desc) {
1352
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1353
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1354
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1355
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1356
- }
1357
- __name(_ts_decorate14, "_ts_decorate");
1358
- var MapKeyAccessor = class {
1359
- static {
1360
- __name(this, "MapKeyAccessor");
1451
+ return referenceCount === 0;
1452
+ }, "onDisposeInstance");
1453
+ onDipose() {
1361
1454
  }
1362
- priority = 4;
1363
- getIndexes(map) {
1364
- return map.keys();
1455
+ onReleased() {
1365
1456
  }
1366
- isAsync() {
1367
- return false;
1457
+ releaseInstance(_instance, _id) {
1368
1458
  }
1369
- hasValue(map, key) {
1370
- return map.has(key);
1459
+ onInstanceCreated(_instance, _data) {
1371
1460
  }
1372
- getResolvedValue(map, key) {
1373
- return map.get(key);
1461
+ getOrCreateId(data) {
1462
+ return this.getId(data) ?? this.createId(data);
1374
1463
  }
1375
- getValue(map, key) {
1376
- return this.getResolvedValue(map, key);
1464
+ getReferenceCount(id) {
1465
+ return this._referenceCounts.get(id) ?? 0;
1377
1466
  }
1378
- setValue(map, key, value) {
1379
- map.set(key, value);
1467
+ updateReferenceCount(id, change, instance, forceRelease) {
1468
+ const referenceCount = this.getReferenceCount(id) + change;
1469
+ if (change === -1 && (forceRelease || referenceCount === 0)) {
1470
+ this._instances.delete(id);
1471
+ this._referenceCounts.delete(id);
1472
+ this.releaseInstance(instance, id);
1473
+ this.onReleased();
1474
+ } else if (referenceCount > 0) {
1475
+ this._referenceCounts.set(id, referenceCount);
1476
+ }
1477
+ return referenceCount;
1380
1478
  }
1381
- applies(map) {
1382
- return map instanceof Map;
1479
+ getOrCreateInstance(id, data) {
1480
+ let instance = this._instances.get(id);
1481
+ if (instance !== void 0) {
1482
+ return instance;
1483
+ }
1484
+ instance = this.createInstance(data, id);
1485
+ this._instances.set(id, instance);
1486
+ return instance;
1383
1487
  }
1384
1488
  };
1385
- MapKeyAccessor = _ts_decorate14([
1386
- injectable()
1387
- ], MapKeyAccessor);
1489
+ _ts_decorate16([
1490
+ preDestroy(),
1491
+ _ts_metadata9("design:type", Function),
1492
+ _ts_metadata9("design:paramtypes", []),
1493
+ _ts_metadata9("design:returntype", void 0)
1494
+ ], SingletonFactory.prototype, "dispose", null);
1388
1495
 
1389
- // lib/index-value-accessor/method-accessor.ts
1390
- function _ts_decorate15(decorators, target, key, desc) {
1391
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1392
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1393
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1394
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1395
- }
1396
- __name(_ts_decorate15, "_ts_decorate");
1397
- function _ts_metadata8(k, v) {
1398
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1399
- }
1400
- __name(_ts_metadata8, "_ts_metadata");
1401
- function _ts_param6(paramIndex, decorator) {
1402
- return function(target, key) {
1403
- decorator(target, key, paramIndex);
1404
- };
1405
- }
1406
- __name(_ts_param6, "_ts_param");
1407
- var MethodAccessor = class {
1496
+ // lib/function-call-index/function-call-index.ts
1497
+ var FunctionCallIndex = class {
1408
1498
  static {
1409
- __name(this, "MethodAccessor");
1410
- }
1411
- _functionCallResultCacheFactory;
1412
- priority = 6;
1413
- constructor(_functionCallResultCacheFactory) {
1414
- this._functionCallResultCacheFactory = _functionCallResultCacheFactory;
1415
- }
1416
- getIndexes() {
1417
- return [].values();
1418
- }
1419
- isAsync() {
1420
- return false;
1421
- }
1422
- hasValue(context, index) {
1423
- return this._functionCallResultCacheFactory.has(context, index);
1499
+ __name(this, "FunctionCallIndex");
1424
1500
  }
1425
- getResolvedValue(context, index) {
1426
- return this.getValue(context, index);
1501
+ context;
1502
+ functionName;
1503
+ _sequenceWithId;
1504
+ _owner;
1505
+ _isDisposed = false;
1506
+ _id;
1507
+ constructor(context, functionName, _sequenceWithId, _owner) {
1508
+ this.context = context;
1509
+ this.functionName = functionName;
1510
+ this._sequenceWithId = _sequenceWithId;
1511
+ this._owner = _owner;
1427
1512
  }
1428
- getValue(context, index) {
1429
- return this._functionCallResultCacheFactory.get(context, index)?.result;
1513
+ get id() {
1514
+ if (!this._id) {
1515
+ this._id = `${this.functionName}${this._sequenceWithId.id}`;
1516
+ }
1517
+ return this._id;
1430
1518
  }
1431
- setValue(_, index) {
1432
- throw new UnsupportedException(`Cannot set method '${index}'`);
1519
+ get argumentsId() {
1520
+ return this._sequenceWithId;
1433
1521
  }
1434
- applies(context, index) {
1435
- if (typeof context !== "object" || context === null) {
1436
- return false;
1522
+ dispose() {
1523
+ if (this._isDisposed) {
1524
+ return;
1437
1525
  }
1438
- const prop = context[index.functionName];
1439
- return Type.isFunction(prop) || Type.isArrowFunction(prop);
1526
+ if (this._owner.canDispose?.()) {
1527
+ this._isDisposed = true;
1528
+ this._sequenceWithId.dispose();
1529
+ }
1530
+ this._owner.release();
1440
1531
  }
1441
1532
  };
1442
- MethodAccessor = _ts_decorate15([
1443
- injectable(),
1444
- _ts_param6(0, inject(RsXCoreInjectionTokens.IFunctionCallResultCacheFactory)),
1445
- _ts_metadata8("design:type", Function),
1446
- _ts_metadata8("design:paramtypes", [
1447
- typeof IFunctionCallResultCacheFactory === "undefined" ? Object : IFunctionCallResultCacheFactory
1448
- ])
1449
- ], MethodAccessor);
1450
-
1451
- // lib/index-value-accessor/observable-accessor.ts
1452
- import { BehaviorSubject, isObservable as isObservable3, Subject as Subject2 } from "rxjs";
1453
-
1454
- // lib/types/set.ts
1455
- function replaceSetItemAt(set, oldValue, newValue) {
1456
- const values = Array.from(set);
1457
- const index = values.indexOf(oldValue);
1458
- if (index === -1) {
1459
- throw new RangeError("Index out of range");
1460
- }
1461
- values[index] = newValue;
1462
- set.clear();
1463
- values.forEach((value) => set.add(value));
1464
- return set;
1465
- }
1466
- __name(replaceSetItemAt, "replaceSetItemAt");
1467
-
1468
- // lib/types/utc-date.ts
1469
- function utCDate(year, month = 0, date = 1, hours = 0, minutes = 0, seconds = 0, millisecond = 0) {
1470
- return new Date(Date.UTC(year, month, date, hours, minutes, seconds, millisecond));
1471
- }
1472
- __name(utCDate, "utCDate");
1473
-
1474
- // lib/index-value-accessor/pending.ts
1475
- var PENDING = Symbol("pending");
1476
1533
 
1477
- // lib/index-value-accessor/observable-accessor.ts
1478
- function _ts_decorate16(decorators, target, key, desc) {
1534
+ // lib/function-call-index/function-call-index.factory.ts
1535
+ function _ts_decorate17(decorators, target, key, desc) {
1479
1536
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1480
1537
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1481
1538
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1482
1539
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1483
1540
  }
1484
- __name(_ts_decorate16, "_ts_decorate");
1485
- function _ts_metadata9(k, v) {
1541
+ __name(_ts_decorate17, "_ts_decorate");
1542
+ function _ts_metadata10(k, v) {
1486
1543
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1487
1544
  }
1488
- __name(_ts_metadata9, "_ts_metadata");
1489
- function _ts_param7(paramIndex, decorator) {
1545
+ __name(_ts_metadata10, "_ts_metadata");
1546
+ function _ts_param8(paramIndex, decorator) {
1490
1547
  return function(target, key) {
1491
1548
  decorator(target, key, paramIndex);
1492
1549
  };
1493
1550
  }
1494
- __name(_ts_param7, "_ts_param");
1495
- var ObservableAccessor = class {
1551
+ __name(_ts_param8, "_ts_param");
1552
+ var FunctionCallIndexFactory = class extends SingletonFactory {
1496
1553
  static {
1497
- __name(this, "ObservableAccessor");
1498
- }
1499
- _resolvedValueCache;
1500
- priority = 2;
1501
- constructor(_resolvedValueCache) {
1502
- this._resolvedValueCache = _resolvedValueCache;
1503
- }
1504
- getIndexes() {
1505
- return [].values();
1506
- }
1507
- isAsync() {
1508
- return true;
1509
- }
1510
- getResolvedValue(context, index) {
1511
- if (context instanceof BehaviorSubject) return context.value;
1512
- const val = this.getIndexedValue(context, index);
1513
- if (val && typeof val === "object" || typeof val === "function") {
1514
- return this._resolvedValueCache.get(val) ?? PENDING;
1515
- }
1516
- return PENDING;
1517
- }
1518
- hasValue(context, index) {
1519
- return this.getResolvedValue(context, index) !== PENDING;
1520
- }
1521
- getValue(context, index) {
1522
- return this.getIndexedValue(context, index);
1554
+ __name(this, "FunctionCallIndexFactory");
1523
1555
  }
1524
- setValue(context, index, value) {
1525
- const val = this.getIndexedValue(context, index);
1526
- if (val instanceof Subject2) {
1527
- val.next(value);
1528
- return;
1529
- }
1530
- throw new UnsupportedException("Cannot set value for an observable");
1556
+ _sequenceIdFactory;
1557
+ constructor(_sequenceIdFactory) {
1558
+ super(), this._sequenceIdFactory = _sequenceIdFactory;
1531
1559
  }
1532
- applies(context, index) {
1533
- const val = this.getIndexedValue(context, index);
1534
- return isObservable3(val);
1560
+ getId(data) {
1561
+ return this._sequenceIdFactory.get(data.context, data.arguments);
1535
1562
  }
1536
- setLastValue(observable, value) {
1537
- this._resolvedValueCache.set(observable, value);
1563
+ createInstance(data, id) {
1564
+ return new FunctionCallIndex(data.context, data.functionName, id, {
1565
+ canDispose: /* @__PURE__ */ __name(() => this.getReferenceCount(id) === 1, "canDispose"),
1566
+ release: /* @__PURE__ */ __name(() => this.release(id), "release")
1567
+ });
1538
1568
  }
1539
- clearLastValue(observable) {
1540
- this._resolvedValueCache.delete(observable);
1569
+ createId(data) {
1570
+ const context = data.context;
1571
+ if (!context || typeof context !== "object") {
1572
+ throw new ArgumentException(`Expected context to be an object, got ${String(context)}`);
1573
+ }
1574
+ const fn = context[data.functionName];
1575
+ return this._sequenceIdFactory.create(fn, data.arguments);
1541
1576
  }
1542
- getIndexedValue(context, index) {
1543
- return (Type.toObject(context) ?? {})[index];
1577
+ releaseInstance(_, id) {
1578
+ id.dispose();
1544
1579
  }
1545
1580
  };
1546
- ObservableAccessor = _ts_decorate16([
1581
+ FunctionCallIndexFactory = _ts_decorate17([
1547
1582
  injectable(),
1548
- _ts_param7(0, inject(RsXCoreInjectionTokens.IResolvedValueCache)),
1549
- _ts_metadata9("design:type", Function),
1550
- _ts_metadata9("design:paramtypes", [
1551
- typeof IResolvedValueCache === "undefined" ? Object : IResolvedValueCache
1583
+ _ts_param8(0, inject(RsXCoreInjectionTokens.ISequenceIdFactory)),
1584
+ _ts_metadata10("design:type", Function),
1585
+ _ts_metadata10("design:paramtypes", [
1586
+ typeof ISequenceIdFactory === "undefined" ? Object : ISequenceIdFactory
1552
1587
  ])
1553
- ], ObservableAccessor);
1588
+ ], FunctionCallIndexFactory);
1554
1589
 
1555
- // lib/index-value-accessor/promise-accessor.ts
1556
- function _ts_decorate17(decorators, target, key, desc) {
1590
+ // lib/function-call-result-cache/function-call-result-cache.factory.ts
1591
+ function _ts_decorate18(decorators, target, key, desc) {
1557
1592
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1558
1593
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1559
1594
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1560
1595
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1561
1596
  }
1562
- __name(_ts_decorate17, "_ts_decorate");
1563
- function _ts_metadata10(k, v) {
1597
+ __name(_ts_decorate18, "_ts_decorate");
1598
+ function _ts_metadata11(k, v) {
1564
1599
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1565
1600
  }
1566
- __name(_ts_metadata10, "_ts_metadata");
1567
- function _ts_param8(paramIndex, decorator) {
1601
+ __name(_ts_metadata11, "_ts_metadata");
1602
+ function _ts_param9(paramIndex, decorator) {
1568
1603
  return function(target, key) {
1569
1604
  decorator(target, key, paramIndex);
1570
1605
  };
1571
1606
  }
1572
- __name(_ts_param8, "_ts_param");
1573
- var PromiseAccessor = class {
1607
+ __name(_ts_param9, "_ts_param");
1608
+ var FunctionCallResultCache = class FunctionCallResultCache2 {
1574
1609
  static {
1575
- __name(this, "PromiseAccessor");
1576
- }
1577
- _resolvedValueCache;
1578
- priority = 1;
1579
- constructor(_resolvedValueCache) {
1580
- this._resolvedValueCache = _resolvedValueCache;
1581
- }
1582
- getIndexes() {
1583
- return [].values();
1610
+ __name(this, "FunctionCallResultCache");
1584
1611
  }
1585
- isAsync() {
1586
- return true;
1612
+ _disposeableIndex;
1613
+ result;
1614
+ _owner;
1615
+ _isDisposed = false;
1616
+ constructor(_disposeableIndex, result, _owner) {
1617
+ this._disposeableIndex = _disposeableIndex;
1618
+ this.result = result;
1619
+ this._owner = _owner;
1587
1620
  }
1588
- hasValue(context, index) {
1589
- const val = this.getIndexedValue(context, index);
1590
- return this.isCacheable(val) && this._resolvedValueCache.get(val) !== PENDING;
1621
+ get index() {
1622
+ return this._disposeableIndex;
1591
1623
  }
1592
- getResolvedValue(context, index) {
1593
- const val = this.getIndexedValue(context, index);
1594
- return this.isCacheable(val) ? this._resolvedValueCache.get(val) ?? PENDING : PENDING;
1624
+ dispose() {
1625
+ if (this._isDisposed) {
1626
+ return;
1627
+ }
1628
+ if (this._owner.canDispose?.()) {
1629
+ this._disposeableIndex.dispose();
1630
+ this._isDisposed = true;
1631
+ }
1632
+ this._owner.release();
1595
1633
  }
1596
- getValue(context, index) {
1597
- return this.getIndexedValue(context, index);
1634
+ };
1635
+ var FunctionCallResultCacheForContextManager = class FunctionCallResultCacheForContextManager2 extends SingletonFactory {
1636
+ static {
1637
+ __name(this, "FunctionCallResultCacheForContextManager");
1598
1638
  }
1599
- setValue() {
1600
- throw new UnsupportedException("Cannot set value for a Promise");
1639
+ _context;
1640
+ _functionCallIndexFactory;
1641
+ releaseContext;
1642
+ constructor(_context, _functionCallIndexFactory, releaseContext) {
1643
+ super(), this._context = _context, this._functionCallIndexFactory = _functionCallIndexFactory, this.releaseContext = releaseContext;
1601
1644
  }
1602
- applies(context, index) {
1603
- const val = this.getIndexedValue(context, index);
1604
- return val instanceof Promise;
1645
+ getId(data) {
1646
+ return this._functionCallIndexFactory.getFromData({
1647
+ functionName: data.functionName,
1648
+ context: this._context,
1649
+ arguments: data.arguments
1650
+ });
1605
1651
  }
1606
- setLastValue(promise, value) {
1607
- this._resolvedValueCache.set(promise, value);
1652
+ createInstance(data, id) {
1653
+ return new FunctionCallResultCache(id, data.result, {
1654
+ canDispose: /* @__PURE__ */ __name(() => this.getReferenceCount(id) === 1, "canDispose"),
1655
+ release: /* @__PURE__ */ __name(() => this.release(id), "release")
1656
+ });
1608
1657
  }
1609
- clearLastValue(promise) {
1610
- this._resolvedValueCache.delete(promise);
1658
+ createId(data) {
1659
+ return this._functionCallIndexFactory.create({
1660
+ functionName: data.functionName,
1661
+ context: this._context,
1662
+ arguments: data.arguments
1663
+ }).instance;
1611
1664
  }
1612
- getIndexedValue(context, index) {
1613
- return (Type.toObject(context) ?? {})[index];
1665
+ releaseInstance(_, id) {
1666
+ this._functionCallIndexFactory.release(id.argumentsId);
1614
1667
  }
1615
- isCacheable(value) {
1616
- return value !== null && (typeof value === "object" || typeof value === "function");
1668
+ onReleased() {
1669
+ this.releaseContext();
1617
1670
  }
1618
1671
  };
1619
- PromiseAccessor = _ts_decorate17([
1620
- injectable(),
1621
- _ts_param8(0, inject(RsXCoreInjectionTokens.IResolvedValueCache)),
1622
- _ts_metadata10("design:type", Function),
1623
- _ts_metadata10("design:paramtypes", [
1624
- typeof IResolvedValueCache === "undefined" ? Object : IResolvedValueCache
1625
- ])
1626
- ], PromiseAccessor);
1627
-
1628
- // lib/index-value-accessor/property-value-accessor.ts
1629
- import { isObservable as isObservable4 } from "rxjs";
1630
- var PropertyValueAccessor = class {
1672
+ var FunctionCallResultCacheManager = class FunctionCallResultCacheManager2 extends SingletonFactory {
1631
1673
  static {
1632
- __name(this, "PropertyValueAccessor");
1633
- }
1634
- priority = 7;
1635
- isAsync() {
1636
- return false;
1637
- }
1638
- getIndexes(context) {
1639
- const obj = Type.toObject(context);
1640
- if (!obj) {
1641
- return [].values();
1642
- }
1643
- return Object.keys(obj).filter((key) => !Type.isMethod(obj[key])).values();
1644
- }
1645
- hasValue(context, index) {
1646
- const val = this.getValue(context, index);
1647
- return val !== void 0;
1674
+ __name(this, "FunctionCallResultCacheManager");
1648
1675
  }
1649
- getResolvedValue(context, index) {
1650
- return this.getValue(context, index);
1676
+ _functionCallIndexFactory;
1677
+ constructor(_functionCallIndexFactory) {
1678
+ super(), this._functionCallIndexFactory = _functionCallIndexFactory;
1651
1679
  }
1652
- getValue(context, index) {
1653
- const obj = Type.toObject(context);
1654
- return obj ? obj[index] : void 0;
1680
+ getId(contex) {
1681
+ return this.createId(contex);
1655
1682
  }
1656
- setValue(context, index, value) {
1657
- const obj = Type.toObject(context);
1658
- if (obj) {
1659
- obj[index] = value;
1660
- }
1683
+ createInstance(context, id) {
1684
+ return new FunctionCallResultCacheForContextManager(context, this._functionCallIndexFactory, () => this.release(id));
1661
1685
  }
1662
- applies(context, index) {
1663
- const obj = Type.toObject(context);
1664
- if (!obj) {
1665
- return false;
1666
- }
1667
- return Type.hasProperty(obj, index) && !(obj instanceof Date) && !isObservable4(obj[index]) && !(obj[index] instanceof Promise);
1686
+ createId(contex) {
1687
+ return contex;
1668
1688
  }
1669
1689
  };
1670
-
1671
- // lib/index-value-accessor/resolved-value-cache.ts
1672
- function _ts_decorate18(decorators, target, key, desc) {
1673
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1674
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1675
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1676
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1677
- }
1678
- __name(_ts_decorate18, "_ts_decorate");
1679
- var ResolvedValueCache = class {
1690
+ var FunctionCallResultCacheFactory = class {
1680
1691
  static {
1681
- __name(this, "ResolvedValueCache");
1692
+ __name(this, "FunctionCallResultCacheFactory");
1682
1693
  }
1683
- _resolvedValues = /* @__PURE__ */ new WeakMap();
1684
- set(source, value) {
1685
- this._resolvedValues.set(source, value);
1694
+ _functionCallResultCacheManager;
1695
+ constructor(functionCallIndexFactory) {
1696
+ this._functionCallResultCacheManager = new FunctionCallResultCacheManager(functionCallIndexFactory);
1686
1697
  }
1687
- get(source) {
1688
- return this._resolvedValues.get(source);
1698
+ create(context, result) {
1699
+ return this._functionCallResultCacheManager.create(context).instance.create(result).instance;
1689
1700
  }
1690
- delete(source) {
1691
- this._resolvedValues.delete(source);
1701
+ has(context, index) {
1702
+ return this._functionCallResultCacheManager.getFromId(context)?.has(index) ?? false;
1703
+ }
1704
+ get(context, index) {
1705
+ return this._functionCallResultCacheManager.getFromId(context)?.getFromId(index);
1692
1706
  }
1693
1707
  };
1694
- ResolvedValueCache = _ts_decorate18([
1695
- injectable()
1696
- ], ResolvedValueCache);
1708
+ FunctionCallResultCacheFactory = _ts_decorate18([
1709
+ injectable(),
1710
+ _ts_param9(0, inject(RsXCoreInjectionTokens.IFunctionCallIndexFactory)),
1711
+ _ts_metadata11("design:type", Function),
1712
+ _ts_metadata11("design:paramtypes", [
1713
+ typeof IFunctionCallIndexFactory === "undefined" ? Object : IFunctionCallIndexFactory
1714
+ ])
1715
+ ], FunctionCallResultCacheFactory);
1697
1716
 
1698
- // lib/index-value-accessor/set-key-accessor.ts
1717
+ // lib/guid/guid.factory.ts
1699
1718
  function _ts_decorate19(decorators, target, key, desc) {
1700
1719
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1701
1720
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -1703,36 +1722,17 @@ function _ts_decorate19(decorators, target, key, desc) {
1703
1722
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1704
1723
  }
1705
1724
  __name(_ts_decorate19, "_ts_decorate");
1706
- var SetKeyAccessor = class {
1725
+ var GuidFactory = class {
1707
1726
  static {
1708
- __name(this, "SetKeyAccessor");
1709
- }
1710
- priority = 3;
1711
- getIndexes(set) {
1712
- return new Set(set).values();
1713
- }
1714
- isAsync() {
1715
- return false;
1716
- }
1717
- hasValue(set, key) {
1718
- return set.has(key);
1719
- }
1720
- getResolvedValue(set, key) {
1721
- return set.has(key) ? key : void 0;
1722
- }
1723
- getValue(set, key) {
1724
- return this.getResolvedValue(set, key);
1725
- }
1726
- setValue(set, key, value) {
1727
- replaceSetItemAt(set, key, value);
1727
+ __name(this, "GuidFactory");
1728
1728
  }
1729
- applies(map) {
1730
- return map instanceof Set;
1729
+ create() {
1730
+ return crypto.randomUUID();
1731
1731
  }
1732
1732
  };
1733
- SetKeyAccessor = _ts_decorate19([
1733
+ GuidFactory = _ts_decorate19([
1734
1734
  injectable()
1735
- ], SetKeyAccessor);
1735
+ ], GuidFactory);
1736
1736
 
1737
1737
  // lib/singleton-factory/singleton-factory-with-id-generation.ts
1738
1738
  var SingletonFactoryWithIdGeneration = class extends SingletonFactory {
@@ -1813,16 +1813,16 @@ function _ts_decorate20(decorators, target, key, desc) {
1813
1813
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1814
1814
  }
1815
1815
  __name(_ts_decorate20, "_ts_decorate");
1816
- function _ts_metadata11(k, v) {
1816
+ function _ts_metadata12(k, v) {
1817
1817
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1818
1818
  }
1819
- __name(_ts_metadata11, "_ts_metadata");
1820
- function _ts_param9(paramIndex, decorator) {
1819
+ __name(_ts_metadata12, "_ts_metadata");
1820
+ function _ts_param10(paramIndex, decorator) {
1821
1821
  return function(target, key) {
1822
1822
  decorator(target, key, paramIndex);
1823
1823
  };
1824
1824
  }
1825
- __name(_ts_param9, "_ts_param");
1825
+ __name(_ts_param10, "_ts_param");
1826
1826
  var RegistryNode = class RegistryNode2 {
1827
1827
  static {
1828
1828
  __name(this, "RegistryNode");
@@ -2001,15 +2001,15 @@ var SequenceIdFactory = class {
2001
2001
  };
2002
2002
  _ts_decorate20([
2003
2003
  preDestroy(),
2004
- _ts_metadata11("design:type", Function),
2005
- _ts_metadata11("design:paramtypes", []),
2006
- _ts_metadata11("design:returntype", void 0)
2004
+ _ts_metadata12("design:type", Function),
2005
+ _ts_metadata12("design:paramtypes", []),
2006
+ _ts_metadata12("design:returntype", void 0)
2007
2007
  ], SequenceIdFactory.prototype, "dispose", null);
2008
2008
  SequenceIdFactory = _ts_decorate20([
2009
2009
  injectable(),
2010
- _ts_param9(0, inject(RsXCoreInjectionTokens.IGuidFactory)),
2011
- _ts_metadata11("design:type", Function),
2012
- _ts_metadata11("design:paramtypes", [
2010
+ _ts_param10(0, inject(RsXCoreInjectionTokens.IGuidFactory)),
2011
+ _ts_metadata12("design:type", Function),
2012
+ _ts_metadata12("design:paramtypes", [
2013
2013
  typeof IGuidFactory === "undefined" ? Object : IGuidFactory
2014
2014
  ])
2015
2015
  ], SequenceIdFactory);
@@ -2070,8 +2070,8 @@ var RsXCoreModule = new ContainerModule((options) => {
2070
2070
  options.bind(RsXCoreInjectionTokens.IFunctionCallResultCacheFactory).to(FunctionCallResultCacheFactory).inSingletonScope();
2071
2071
  options.bind(RsXCoreInjectionTokens.IGuidFactory).to(GuidFactory).inSingletonScope();
2072
2072
  options.bind(RsXCoreInjectionTokens.IResolvedValueCache).to(ResolvedValueCache).inSingletonScope();
2073
- options.bind(RsXCoreInjectionTokens.IDeepCloneValueGetter).to(DeepCloneValueGetter).inSingletonScope();
2074
- options.bind(RsXCoreInjectionTokens.DefaultDeepCloneValueGetter).to(DeepCloneValueGetter).inSingletonScope();
2073
+ options.bind(RsXCoreInjectionTokens.IDeepCloneExcept).to(DeepCloneValueExcept).inSingletonScope();
2074
+ options.bind(RsXCoreInjectionTokens.DefaultDeepCloneExcept).to(DeepCloneValueExcept).inSingletonScope();
2075
2075
  registerMultiInjectServices(options, RsXCoreInjectionTokens.IIndexValueAccessorList, defaultIndexValueAccessorList);
2076
2076
  registerMultiInjectServices(options, RsXCoreInjectionTokens.IDeepCloneList, defaultDeeoCloneList);
2077
2077
  });
@@ -2162,8 +2162,7 @@ export {
2162
2162
  Container,
2163
2163
  ContainerModule,
2164
2164
  DatePropertyAccessor,
2165
- DeepClone,
2166
- DeepCloneValueGetter,
2165
+ DeepCloneValueExcept,
2167
2166
  DefaultDeepClone,
2168
2167
  EqualityService,
2169
2168
  ErrorLog,