@dooboostore/simple-boot-http-server 1.0.24 → 1.0.26

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 (190) hide show
  1. package/README.md +113 -0
  2. package/dist/cjs/SimpleBootHttpServer.js +16 -4
  3. package/dist/cjs/SimpleBootHttpServer.js.map +2 -2
  4. package/dist/cjs/bundle-entry.js +34 -24
  5. package/dist/cjs/bundle-entry.js.map +2 -2
  6. package/dist/cjs/decorators/MethodMapping.js +33 -3
  7. package/dist/cjs/decorators/MethodMapping.js.map +2 -2
  8. package/dist/cjs/errors/BadRequestError.js +2 -1
  9. package/dist/cjs/errors/BadRequestError.js.map +2 -2
  10. package/dist/cjs/errors/ForbiddenError.js +2 -1
  11. package/dist/cjs/errors/ForbiddenError.js.map +2 -2
  12. package/dist/cjs/errors/InternalServerError.js +2 -1
  13. package/dist/cjs/errors/InternalServerError.js.map +2 -2
  14. package/dist/cjs/errors/NotFoundError.js +2 -1
  15. package/dist/cjs/errors/NotFoundError.js.map +2 -2
  16. package/dist/cjs/errors/UnauthorizedError.js +2 -1
  17. package/dist/cjs/errors/UnauthorizedError.js.map +2 -2
  18. package/dist/cjs/filters/IntentSchemeFilter.js +1 -2
  19. package/dist/cjs/filters/IntentSchemeFilter.js.map +2 -2
  20. package/dist/cjs/filters/ResourceFilter.js +3 -2
  21. package/dist/cjs/filters/ResourceFilter.js.map +2 -2
  22. package/dist/cjs/filters/index.js +3 -1
  23. package/dist/cjs/filters/index.js.map +2 -2
  24. package/dist/cjs/index.js +2 -0
  25. package/dist/cjs/index.js.map +2 -2
  26. package/dist/cjs/inject/InjectSituationType.js +1 -1
  27. package/dist/cjs/inject/InjectSituationType.js.map +2 -2
  28. package/dist/cjs/models/RequestResponse.js +19 -2
  29. package/dist/cjs/models/RequestResponse.js.map +2 -2
  30. package/dist/cjs/models/datas/body/index.js +28 -0
  31. package/dist/cjs/models/datas/body/index.js.map +7 -0
  32. package/dist/cjs/models/datas/index.js +32 -0
  33. package/dist/cjs/models/datas/index.js.map +7 -0
  34. package/dist/cjs/models/datas/{body → path}/ReqPathData.js.map +1 -1
  35. package/dist/cjs/models/datas/{search → path}/ReqSearchParamsObj.js.map +1 -1
  36. package/dist/cjs/models/datas/path/index.js +24 -0
  37. package/dist/cjs/models/datas/path/index.js.map +7 -0
  38. package/dist/cjs/models/index.js +4 -16
  39. package/dist/cjs/models/index.js.map +2 -2
  40. package/dist/cjs/models/method/index.js +22 -0
  41. package/dist/cjs/models/method/index.js.map +7 -0
  42. package/dist/cjs/models/method/patch/index.js +22 -0
  43. package/dist/cjs/models/method/patch/index.js.map +7 -0
  44. package/dist/cjs/option/HttpServerOption.js.map +2 -2
  45. package/dist/cjs/proxy/SymbolIntentApiServiceProxy.js +98 -95
  46. package/dist/cjs/proxy/SymbolIntentApiServiceProxy.js.map +3 -3
  47. package/dist/cjs/proxy/SymbolIntentApiServiceProxyBase.js +1 -1
  48. package/dist/cjs/proxy/SymbolIntentApiServiceProxyBase.js.map +2 -2
  49. package/dist/cjs/proxy/TopicProtocolApiServiceProxy.js +244 -266
  50. package/dist/cjs/proxy/TopicProtocolApiServiceProxy.js.map +3 -3
  51. package/dist/cjs/websocket/WebSocketClient.js +2 -1
  52. package/dist/cjs/websocket/WebSocketClient.js.map +2 -2
  53. package/dist/esm/SimpleBootHttpServer.js +16 -4
  54. package/dist/esm/SimpleBootHttpServer.js.map +2 -2
  55. package/dist/esm/bundle-entry.js +14 -12
  56. package/dist/esm/bundle-entry.js.map +2 -2
  57. package/dist/esm/decorators/MethodMapping.js +22 -2
  58. package/dist/esm/decorators/MethodMapping.js.map +2 -2
  59. package/dist/esm/errors/BadRequestError.js +2 -1
  60. package/dist/esm/errors/BadRequestError.js.map +2 -2
  61. package/dist/esm/errors/ForbiddenError.js +2 -1
  62. package/dist/esm/errors/ForbiddenError.js.map +2 -2
  63. package/dist/esm/errors/InternalServerError.js +2 -1
  64. package/dist/esm/errors/InternalServerError.js.map +2 -2
  65. package/dist/esm/errors/NotFoundError.js +2 -1
  66. package/dist/esm/errors/NotFoundError.js.map +2 -2
  67. package/dist/esm/errors/UnauthorizedError.js +2 -1
  68. package/dist/esm/errors/UnauthorizedError.js.map +2 -2
  69. package/dist/esm/filters/IntentSchemeFilter.js +2 -3
  70. package/dist/esm/filters/IntentSchemeFilter.js.map +2 -2
  71. package/dist/esm/filters/ResourceFilter.js +3 -2
  72. package/dist/esm/filters/ResourceFilter.js.map +2 -2
  73. package/dist/esm/filters/index.js +1 -0
  74. package/dist/esm/filters/index.js.map +2 -2
  75. package/dist/esm/index.js +1 -0
  76. package/dist/esm/index.js.map +2 -2
  77. package/dist/esm/inject/InjectSituationType.js +1 -1
  78. package/dist/esm/inject/InjectSituationType.js.map +2 -2
  79. package/dist/esm/models/RequestResponse.js +19 -2
  80. package/dist/esm/models/RequestResponse.js.map +2 -2
  81. package/dist/esm/models/datas/body/index.js +5 -0
  82. package/dist/esm/models/datas/body/index.js.map +7 -0
  83. package/dist/esm/models/datas/index.js +7 -0
  84. package/dist/esm/models/datas/index.js.map +7 -0
  85. package/dist/esm/models/datas/{body → path}/ReqPathData.js.map +1 -1
  86. package/dist/esm/models/datas/{search → path}/ReqSearchParamsObj.js.map +1 -1
  87. package/dist/esm/models/datas/path/index.js +3 -0
  88. package/dist/esm/models/datas/path/index.js.map +7 -0
  89. package/dist/esm/models/index.js +2 -8
  90. package/dist/esm/models/index.js.map +2 -2
  91. package/dist/esm/models/method/index.js +2 -0
  92. package/dist/esm/models/method/index.js.map +7 -0
  93. package/dist/esm/models/method/patch/index.js +2 -0
  94. package/dist/esm/models/method/patch/index.js.map +7 -0
  95. package/dist/esm/option/HttpServerOption.js.map +2 -2
  96. package/dist/esm/proxy/SymbolIntentApiServiceProxy.js +98 -95
  97. package/dist/esm/proxy/SymbolIntentApiServiceProxy.js.map +3 -3
  98. package/dist/esm/proxy/SymbolIntentApiServiceProxyBase.js +2 -2
  99. package/dist/esm/proxy/SymbolIntentApiServiceProxyBase.js.map +2 -2
  100. package/dist/esm/proxy/TopicProtocolApiServiceProxy.js +244 -266
  101. package/dist/esm/proxy/TopicProtocolApiServiceProxy.js.map +3 -3
  102. package/dist/esm/websocket/WebSocketClient.js +3 -2
  103. package/dist/esm/websocket/WebSocketClient.js.map +2 -2
  104. package/dist/esm-bundle/dooboostore-simple-boot-http-server.esm.js +19374 -4956
  105. package/dist/esm-bundle/dooboostore-simple-boot-http-server.esm.js.map +4 -4
  106. package/dist/types/SimpleBootHttpServer.d.ts +1 -1
  107. package/dist/types/SimpleBootHttpServer.d.ts.map +1 -1
  108. package/dist/types/bundle-entry.d.ts +7 -12
  109. package/dist/types/bundle-entry.d.ts.map +1 -1
  110. package/dist/types/decorators/MethodMapping.d.ts +10 -0
  111. package/dist/types/decorators/MethodMapping.d.ts.map +1 -1
  112. package/dist/types/errors/BadRequestError.d.ts +2 -2
  113. package/dist/types/errors/BadRequestError.d.ts.map +1 -1
  114. package/dist/types/errors/ForbiddenError.d.ts +2 -2
  115. package/dist/types/errors/ForbiddenError.d.ts.map +1 -1
  116. package/dist/types/errors/InternalServerError.d.ts +2 -2
  117. package/dist/types/errors/InternalServerError.d.ts.map +1 -1
  118. package/dist/types/errors/NotFoundError.d.ts +2 -2
  119. package/dist/types/errors/NotFoundError.d.ts.map +1 -1
  120. package/dist/types/errors/UnauthorizedError.d.ts +2 -2
  121. package/dist/types/errors/UnauthorizedError.d.ts.map +1 -1
  122. package/dist/types/filters/ResourceFilter.d.ts.map +1 -1
  123. package/dist/types/filters/index.d.ts +1 -0
  124. package/dist/types/filters/index.d.ts.map +1 -1
  125. package/dist/types/index.d.ts +1 -0
  126. package/dist/types/index.d.ts.map +1 -1
  127. package/dist/types/inject/InjectSituationType.d.ts.map +1 -1
  128. package/dist/types/models/RequestResponse.d.ts +3 -1
  129. package/dist/types/models/RequestResponse.d.ts.map +1 -1
  130. package/dist/types/models/datas/body/index.d.ts +5 -0
  131. package/dist/types/models/datas/body/index.d.ts.map +1 -0
  132. package/dist/types/models/datas/index.d.ts +7 -0
  133. package/dist/types/models/datas/index.d.ts.map +1 -0
  134. package/dist/types/models/datas/{body → path}/ReqPathData.d.ts.map +1 -1
  135. package/dist/types/models/datas/path/ReqSearchParamsObj.d.ts.map +1 -0
  136. package/dist/types/models/datas/path/index.d.ts +3 -0
  137. package/dist/types/models/datas/path/index.d.ts.map +1 -0
  138. package/dist/types/models/index.d.ts +2 -8
  139. package/dist/types/models/index.d.ts.map +1 -1
  140. package/dist/types/models/method/index.d.ts +2 -0
  141. package/dist/types/models/method/index.d.ts.map +1 -0
  142. package/dist/types/models/method/patch/index.d.ts +2 -0
  143. package/dist/types/models/method/patch/index.d.ts.map +1 -0
  144. package/dist/types/option/HttpServerOption.d.ts +6 -2
  145. package/dist/types/option/HttpServerOption.d.ts.map +1 -1
  146. package/dist/types/proxy/SymbolIntentApiServiceProxy.d.ts +6 -8
  147. package/dist/types/proxy/SymbolIntentApiServiceProxy.d.ts.map +1 -1
  148. package/dist/types/proxy/TopicProtocolApiServiceProxy.d.ts +5 -15
  149. package/dist/types/proxy/TopicProtocolApiServiceProxy.d.ts.map +1 -1
  150. package/dist/types/websocket/WebSocketClient.d.ts.map +1 -1
  151. package/dist/umd-bundle/dooboostore-simple-boot-http-server.umd.js +19340 -4928
  152. package/dist/umd-bundle/dooboostore-simple-boot-http-server.umd.js.map +4 -4
  153. package/dist/umd-bundle/websocket-client.umd.js +378 -1468
  154. package/dist/umd-bundle/websocket-client.umd.js.map +4 -4
  155. package/package.json +8 -8
  156. package/src/SimpleBootHttpServer.ts +20 -6
  157. package/src/bundle-entry.ts +12 -12
  158. package/src/decorators/MethodMapping.ts +13 -1
  159. package/src/errors/BadRequestError.ts +7 -3
  160. package/src/errors/ForbiddenError.ts +7 -3
  161. package/src/errors/InternalServerError.ts +7 -3
  162. package/src/errors/NotFoundError.ts +7 -3
  163. package/src/errors/UnauthorizedError.ts +7 -3
  164. package/src/filters/IntentSchemeFilter.ts +2 -2
  165. package/src/filters/ResourceFilter.ts +5 -2
  166. package/src/filters/index.ts +1 -0
  167. package/src/index.ts +1 -0
  168. package/src/inject/InjectSituationType.ts +1 -1
  169. package/src/models/RequestResponse.ts +28 -2
  170. package/src/models/datas/body/index.ts +4 -0
  171. package/src/models/datas/index.ts +6 -0
  172. package/src/models/datas/path/index.ts +2 -0
  173. package/src/models/index.ts +2 -8
  174. package/src/models/method/index.ts +1 -0
  175. package/src/models/method/patch/index.ts +1 -0
  176. package/src/option/HttpServerOption.ts +4 -2
  177. package/src/proxy/SymbolIntentApiServiceProxy.ts +103 -97
  178. package/src/proxy/SymbolIntentApiServiceProxyBase.ts +2 -2
  179. package/src/proxy/TopicProtocolApiServiceProxy.ts +260 -275
  180. package/src/websocket/WebSocketClient.ts +3 -2
  181. package/README.MD +0 -62
  182. package/dist/types/models/datas/search/ReqSearchParamsObj.d.ts.map +0 -1
  183. /package/dist/cjs/models/datas/{body → path}/ReqPathData.js +0 -0
  184. /package/dist/cjs/models/datas/{search → path}/ReqSearchParamsObj.js +0 -0
  185. /package/dist/esm/models/datas/{body → path}/ReqPathData.js +0 -0
  186. /package/dist/esm/models/datas/{search → path}/ReqSearchParamsObj.js +0 -0
  187. /package/dist/types/models/datas/{body → path}/ReqPathData.d.ts +0 -0
  188. /package/dist/types/models/datas/{search → path}/ReqSearchParamsObj.d.ts +0 -0
  189. /package/src/models/datas/{body → path}/ReqPathData.ts +0 -0
  190. /package/src/models/datas/{search → path}/ReqSearchParamsObj.ts +0 -0
@@ -7,11 +7,11 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
7
7
  for (var name in all)
8
8
  __defProp(target, name, { get: all[name], enumerable: true });
9
9
  };
10
- var __copyProps = (to, from2, except, desc) => {
11
- if (from2 && typeof from2 === "object" || typeof from2 === "function") {
12
- for (let key of __getOwnPropNames(from2))
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
13
  if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
15
  }
16
16
  return to;
17
17
  };
@@ -20,6 +20,7 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
20
20
  // src/websocket/WebSocketClient.ts
21
21
  var WebSocketClient_exports = {};
22
22
  __export(WebSocketClient_exports, {
23
+ ActionExpression: () => ActionExpression,
23
24
  Advice: () => Advice,
24
25
  AllCheckedValidatorArray: () => AllCheckedValidatorArray,
25
26
  AllUnCheckedValidatorArray: () => AllUnCheckedValidatorArray,
@@ -44,8 +45,10 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
44
45
  CountUnCheckedValidatorArray: () => CountUnCheckedValidatorArray,
45
46
  CssNode: () => CssNode,
46
47
  CssParser: () => CssParser,
48
+ DEFAULT_EXPRESSION_CONFIG: () => DEFAULT_EXPRESSION_CONFIG,
47
49
  DateUtils: () => DateUtils,
48
50
  Ellipse: () => Ellipse,
51
+ EmptyError: () => EmptyError,
49
52
  EmptyValidator: () => EmptyValidator,
50
53
  ExcludeCheckedValidatorArray: () => ExcludeCheckedValidatorArray,
51
54
  Expression: () => Expression,
@@ -64,8 +67,6 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
64
67
  LoggerLevel: () => LoggerLevel,
65
68
  MathUtil: () => MathUtil,
66
69
  MemoryStorage: () => MemoryStorage,
67
- MessageInternal: () => internal_exports,
68
- MessageOperator: () => operators_exports,
69
70
  MultipleValidator: () => MultipleValidator,
70
71
  NonPassValidator: () => NonPassValidator,
71
72
  NotEmptyValidator: () => NotEmptyValidator,
@@ -119,7 +120,17 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
119
120
  WebSocketClient: () => WebSocketClient,
120
121
  WrapPolygons: () => WrapPolygons,
121
122
  WrapRects: () => WrapRects,
123
+ concat: () => concat,
122
124
  debounce: () => debounce,
125
+ debounceTimeIntervalLock: () => debounceTimeIntervalLock,
126
+ defer: () => defer,
127
+ empty: () => empty,
128
+ firstValueFrom: () => firstValueFrom,
129
+ fromArray: () => fromArray,
130
+ fromEvent: () => fromEvent,
131
+ fromPromise: () => fromPromise,
132
+ getExpression: () => getExpression,
133
+ interval: () => interval,
123
134
  isAtRule: () => isAtRule,
124
135
  isCssCommentItem: () => isCssCommentItem,
125
136
  isCssDeclarationItem: () => isCssDeclarationItem,
@@ -130,8 +141,20 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
130
141
  isRule: () => isRule,
131
142
  isSizeType: () => isSizeType,
132
143
  isStyleRule: () => isStyleRule,
133
- throttle: () => throttle2,
134
- throttleTime: () => throttleTime
144
+ lastValueFrom: () => lastValueFrom,
145
+ merge: () => merge,
146
+ never: () => never,
147
+ of: () => of,
148
+ range: () => range,
149
+ skip: () => skip,
150
+ startWith: () => startWith,
151
+ take: () => take,
152
+ takeWhile: () => takeWhile,
153
+ throttle: () => throttle,
154
+ throttleTime: () => throttleTime,
155
+ throwError: () => throwError,
156
+ timer: () => timer,
157
+ toPromise: () => toPromise
135
158
  });
136
159
 
137
160
  // ../core/dist/esm/valid/ValidUtils.js
@@ -184,11 +207,11 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
184
207
  ValidUtils2.isNullOrUndefined = (data) => {
185
208
  return data == null || void 0 === data;
186
209
  };
187
- ValidUtils2.isConstructor = (obj) => {
188
- return typeof obj === "function" && obj.prototype !== void 0 && obj.prototype.constructor === obj;
210
+ ValidUtils2.isClassType = (obj) => {
211
+ return typeof obj === "function" && /^\s*class\s+/.test(obj.toString());
189
212
  };
190
- ValidUtils2.isFunction = (obj) => {
191
- return typeof obj === "function" && !(0, ValidUtils2.isConstructor)(obj);
213
+ ValidUtils2.isFunctionType = (obj) => {
214
+ return typeof obj === "function";
192
215
  };
193
216
  ValidUtils2.isNullish = (data) => {
194
217
  return ValidUtils2.isNotNullish(data);
@@ -337,6 +360,13 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
337
360
  // ../core/dist/esm/array/ArrayUtils.js
338
361
  var ArrayUtils;
339
362
  ((ArrayUtils2) => {
363
+ ArrayUtils2.split = (data, length) => {
364
+ const result = [];
365
+ for (let i = 0; i < data.length; i += length) {
366
+ result.push(data.slice(i, i + length));
367
+ }
368
+ return result;
369
+ };
340
370
  ArrayUtils2.create2DArray = (rows, cols, initialValue) => {
341
371
  const array = [];
342
372
  for (let row = 0; row < rows; row++) {
@@ -471,7 +501,7 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
471
501
  })(ArrayUtils || (ArrayUtils = {}));
472
502
 
473
503
  // ../core/dist/esm/types.js
474
- var isDefined = (value) => value !== void 0 && value !== null;
504
+ var isDefined = ValidUtils.isDefined;
475
505
 
476
506
  // ../core/dist/esm/parser/path/ObjectPathParser.js
477
507
  var Token = class {
@@ -3107,6 +3137,10 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
3107
3137
  const rotatedY = translatedX * Math.sin(angleInRadians) + translatedY * Math.cos(angleInRadians);
3108
3138
  return new Point2D(rotatedX + center.x, rotatedY + center.y);
3109
3139
  };
3140
+ MathUtil2.quadraticBezier = (p0, p1, p2, t) => {
3141
+ const mt = 1 - t;
3142
+ return mt * mt * p0 + 2 * mt * t * p1 + t * t * p2;
3143
+ };
3110
3144
  })(MathUtil || (MathUtil = {}));
3111
3145
 
3112
3146
  // ../core/dist/esm/convert/ConvertUtils.js
@@ -3115,10 +3149,10 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
3115
3149
  ConvertUtils2.objToGetURL = (obj) => {
3116
3150
  return Object.keys(obj).reduce((prev, key, i) => `${prev}${i !== 0 ? "&" : ""}${key}=${obj[key]}`, "");
3117
3151
  };
3118
- ConvertUtils2.mapToJson = (map2) => {
3152
+ ConvertUtils2.mapToJson = (map) => {
3119
3153
  return JSON.stringify(
3120
3154
  Array.from(
3121
- map2.entries()
3155
+ map.entries()
3122
3156
  ).reduce((o, [key, value]) => {
3123
3157
  o[key] = value;
3124
3158
  return o;
@@ -3164,9 +3198,9 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
3164
3198
  });
3165
3199
  return mp;
3166
3200
  };
3167
- ConvertUtils2.mapToObj = (map2) => {
3201
+ ConvertUtils2.mapToObj = (map) => {
3168
3202
  const obj = {};
3169
- map2.forEach((v, k) => {
3203
+ map.forEach((v, k) => {
3170
3204
  obj[k] = v;
3171
3205
  });
3172
3206
  return obj;
@@ -3219,8 +3253,8 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
3219
3253
  return Object.fromEntries(obj);
3220
3254
  } else {
3221
3255
  if (ValidUtils.isMap(obj)) {
3222
- const map2 = obj;
3223
- obj = ConvertUtils2.mapToObj(map2);
3256
+ const map = obj;
3257
+ obj = ConvertUtils2.mapToObj(map);
3224
3258
  }
3225
3259
  if (ValidUtils.isArray(obj)) {
3226
3260
  const arr = obj;
@@ -3475,17 +3509,17 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
3475
3509
  return result;
3476
3510
  };
3477
3511
  ConvertUtils2.groupByMap = (array, keySelector) => {
3478
- return array.reduce((map2, item) => {
3512
+ return array.reduce((map, item) => {
3479
3513
  const key = keySelector(item);
3480
- const group = map2.get(key) || [];
3514
+ const group = map.get(key) || [];
3481
3515
  group.push(item);
3482
- map2.set(key, group);
3483
- return map2;
3516
+ map.set(key, group);
3517
+ return map;
3484
3518
  }, /* @__PURE__ */ new Map());
3485
3519
  };
3486
3520
  ConvertUtils2.groupByObject = (array, keySelector) => {
3487
- const map2 = (0, ConvertUtils2.groupByMap)(array, keySelector);
3488
- return Object.fromEntries(map2);
3521
+ const map = (0, ConvertUtils2.groupByMap)(array, keySelector);
3522
+ return Object.fromEntries(map);
3489
3523
  };
3490
3524
  ConvertUtils2.toURLSearchParams = (data) => {
3491
3525
  const searchParams = new URLSearchParams();
@@ -3975,32 +4009,6 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
3975
4009
  }
3976
4010
  };
3977
4011
 
3978
- // ../core/dist/esm/message/internal/index.js
3979
- var internal_exports = {};
3980
- __export(internal_exports, {
3981
- EmptyError: () => EmptyError,
3982
- concat: () => concat,
3983
- defer: () => defer,
3984
- empty: () => empty,
3985
- firstValueFrom: () => firstValueFrom,
3986
- fromArray: () => fromArray,
3987
- fromEvent: () => fromEvent,
3988
- fromPromise: () => fromPromise,
3989
- interval: () => interval,
3990
- lastValueFrom: () => lastValueFrom,
3991
- merge: () => merge,
3992
- never: () => never,
3993
- of: () => of,
3994
- range: () => range,
3995
- skip: () => skip,
3996
- startWith: () => startWith,
3997
- take: () => take,
3998
- takeWhile: () => takeWhile,
3999
- throwError: () => throwError,
4000
- timer: () => timer,
4001
- toPromise: () => toPromise
4002
- });
4003
-
4004
4012
  // ../core/dist/esm/message/internal/interval.js
4005
4013
  function interval(period = 0) {
4006
4014
  if (period < 0) {
@@ -4225,1197 +4233,12 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
4225
4233
  return (source) => {
4226
4234
  return new Observable((subscriber) => {
4227
4235
  let skipped = 0;
4228
- const subscription = source.subscribe({
4229
- next: (value) => {
4230
- if (skipped < count) {
4231
- skipped++;
4232
- } else {
4233
- subscriber.next(value);
4234
- }
4235
- },
4236
- error: (err) => {
4237
- subscriber.error(err);
4238
- },
4239
- complete: () => {
4240
- subscriber.complete();
4241
- }
4242
- });
4243
- return subscription;
4244
- });
4245
- };
4246
- }
4247
-
4248
- // ../core/dist/esm/message/internal/takeWhile.js
4249
- function takeWhile(predicate, inclusive = false) {
4250
- return (source) => {
4251
- return new Observable((subscriber) => {
4252
- let index = 0;
4253
- const subscription = source.subscribe({
4254
- next: (value) => {
4255
- const result = predicate(value, index++);
4256
- if (result) {
4257
- subscriber.next(value);
4258
- } else {
4259
- if (inclusive) {
4260
- subscriber.next(value);
4261
- }
4262
- subscriber.complete();
4263
- }
4264
- },
4265
- error: (err) => {
4266
- subscriber.error(err);
4267
- },
4268
- complete: () => {
4269
- subscriber.complete();
4270
- }
4271
- });
4272
- return subscription;
4273
- });
4274
- };
4275
- }
4276
-
4277
- // ../core/dist/esm/message/internal/startWith.js
4278
- function startWith(...values) {
4279
- return (source) => {
4280
- return new Observable((subscriber) => {
4281
- for (const value of values) {
4282
- subscriber.next(value);
4283
- }
4284
- const subscription = source.subscribe({
4285
- next: (value) => {
4286
- subscriber.next(value);
4287
- },
4288
- error: (err) => {
4289
- subscriber.error(err);
4290
- },
4291
- complete: () => {
4292
- subscriber.complete();
4293
- }
4294
- });
4295
- return subscription;
4296
- });
4297
- };
4298
- }
4299
-
4300
- // ../core/dist/esm/message/internal/concat.js
4301
- function concat(...observables) {
4302
- return new Observable((subscriber) => {
4303
- let currentIndex = 0;
4304
- let currentSubscription;
4305
- function subscribeToNext() {
4306
- if (currentIndex >= observables.length) {
4307
- subscriber.complete();
4308
- return;
4309
- }
4310
- const currentObservable = observables[currentIndex++];
4311
- currentSubscription = currentObservable.subscribe({
4312
- next: (value) => {
4313
- subscriber.next(value);
4314
- },
4315
- error: (err) => {
4316
- subscriber.error(err);
4317
- },
4318
- complete: () => {
4319
- subscribeToNext();
4320
- }
4321
- });
4322
- }
4323
- subscribeToNext();
4324
- return () => {
4325
- if (currentSubscription) {
4326
- currentSubscription.unsubscribe();
4327
- }
4328
- };
4329
- });
4330
- }
4331
-
4332
- // ../core/dist/esm/message/internal/merge.js
4333
- function merge(...observables) {
4334
- return new Observable((subscriber) => {
4335
- if (observables.length === 0) {
4336
- subscriber.complete();
4337
- return;
4338
- }
4339
- let completedCount = 0;
4340
- const subscriptions = [];
4341
- for (const observable of observables) {
4342
- const subscription = observable.subscribe({
4343
- next: (value) => {
4344
- subscriber.next(value);
4345
- },
4346
- error: (err) => {
4347
- subscriber.error(err);
4348
- },
4349
- complete: () => {
4350
- completedCount++;
4351
- if (completedCount === observables.length) {
4352
- subscriber.complete();
4353
- }
4354
- }
4355
- });
4356
- subscriptions.push(subscription);
4357
- }
4358
- return () => {
4359
- subscriptions.forEach((sub) => sub.unsubscribe());
4360
- };
4361
- });
4362
- }
4363
-
4364
- // ../core/dist/esm/message/internal/fromEvent.js
4365
- function fromEvent(target, eventName) {
4366
- return new Observable((subscriber) => {
4367
- const handler = (event) => {
4368
- subscriber.next(event);
4369
- };
4370
- target.addEventListener(eventName, handler);
4371
- return () => {
4372
- target.removeEventListener(eventName, handler);
4373
- };
4374
- });
4375
- }
4376
-
4377
- // ../core/dist/esm/message/internal/toPromise.js
4378
- function toPromise(source) {
4379
- return new Promise((resolve, reject) => {
4380
- let _hasValue = false;
4381
- let _value;
4382
- source.subscribe({
4383
- next: (value) => {
4384
- _value = value;
4385
- _hasValue = true;
4386
- },
4387
- error: reject,
4388
- complete: () => {
4389
- if (_hasValue) {
4390
- resolve(_value);
4391
- } else {
4392
- reject(new EmptyError());
4393
- }
4394
- }
4395
- });
4396
- });
4397
- }
4398
-
4399
- // ../core/dist/esm/message/operators/index.js
4400
- var operators_exports = {};
4401
- __export(operators_exports, {
4402
- EmptyError: () => EmptyError2,
4403
- SequenceError: () => SequenceError,
4404
- TimeoutError: () => TimeoutError,
4405
- bufferTime: () => bufferTime,
4406
- catchError: () => catchError,
4407
- concatMap: () => concatMap,
4408
- debounceTime: () => debounceTime,
4409
- delay: () => delay,
4410
- distinctUntilChanged: () => distinctUntilChanged,
4411
- filter: () => filter,
4412
- finalize: () => finalize,
4413
- find: () => find,
4414
- first: () => first,
4415
- from: () => from,
4416
- interval: () => interval2,
4417
- map: () => map,
4418
- mergeMap: () => mergeMap,
4419
- reduce: () => reduce,
4420
- retry: () => retry,
4421
- scan: () => scan,
4422
- share: () => share,
4423
- single: () => single,
4424
- skip: () => skip2,
4425
- skipWhile: () => skipWhile,
4426
- switchMap: () => switchMap,
4427
- take: () => take2,
4428
- takeLast: () => takeLast,
4429
- takeUntil: () => takeUntil,
4430
- takeWhile: () => takeWhile2,
4431
- tap: () => tap,
4432
- throttle: () => throttle,
4433
- timeout: () => timeout
4434
- });
4435
-
4436
- // ../core/dist/esm/message/operators/bufferTime.js
4437
- function bufferTime(bufferTimeSpan, config) {
4438
- return (source) => {
4439
- return new Observable((subscriber) => {
4440
- const bufferCreationInterval = config?.bufferCreationInterval;
4441
- const maxBufferSize = config?.maxBufferSize;
4442
- const skipEmpty = config?.skipEmpty ?? false;
4443
- const setIntervalFn = config?.setInterval || setInterval;
4444
- const setTimeoutFn = config?.setTimeout || setTimeout;
4445
- const clearIntervalFn = config?.clearInterval || clearInterval;
4446
- const clearTimeoutFn = config?.clearTimeout || clearTimeout;
4447
- if (bufferCreationInterval === void 0 || bufferCreationInterval === null) {
4448
- let buffer = [];
4449
- const intervalId = setIntervalFn(() => {
4450
- if (!skipEmpty || buffer.length > 0) {
4451
- subscriber.next(buffer);
4452
- }
4453
- buffer = [];
4454
- }, bufferTimeSpan);
4455
- const sourceSubscription2 = source.subscribe({
4456
- next: (value) => {
4457
- buffer.push(value);
4458
- if (maxBufferSize && buffer.length >= maxBufferSize) {
4459
- subscriber.next(buffer);
4460
- buffer = [];
4461
- }
4462
- },
4463
- error: (err) => {
4464
- subscriber.error(err);
4465
- clearIntervalFn(intervalId);
4466
- },
4467
- complete: () => {
4468
- if (!skipEmpty || buffer.length > 0) {
4469
- subscriber.next(buffer);
4470
- }
4471
- subscriber.complete();
4472
- clearIntervalFn(intervalId);
4473
- }
4474
- });
4475
- return () => {
4476
- sourceSubscription2.unsubscribe();
4477
- clearIntervalFn(intervalId);
4478
- };
4479
- }
4480
- const buffers = [];
4481
- let creationIntervalId;
4482
- const createBuffer = () => {
4483
- const newBuffer = [];
4484
- const timeoutId = setTimeoutFn(() => {
4485
- const index = buffers.findIndex((b) => b.timeoutId === timeoutId);
4486
- if (index !== -1) {
4487
- const [removed] = buffers.splice(index, 1);
4488
- if (!skipEmpty || removed.buffer.length > 0) {
4489
- subscriber.next(removed.buffer);
4490
- }
4491
- }
4492
- }, bufferTimeSpan);
4493
- buffers.push({ buffer: newBuffer, timeoutId });
4494
- };
4495
- createBuffer();
4496
- creationIntervalId = setIntervalFn(() => {
4497
- createBuffer();
4498
- }, bufferCreationInterval);
4499
- const sourceSubscription = source.subscribe({
4500
- next: (value) => {
4501
- for (const bufferObj of buffers) {
4502
- bufferObj.buffer.push(value);
4503
- if (maxBufferSize && bufferObj.buffer.length >= maxBufferSize) {
4504
- const index = buffers.indexOf(bufferObj);
4505
- if (index !== -1) {
4506
- buffers.splice(index, 1);
4507
- clearTimeoutFn(bufferObj.timeoutId);
4508
- subscriber.next(bufferObj.buffer);
4509
- }
4510
- }
4511
- }
4512
- },
4513
- error: (err) => {
4514
- subscriber.error(err);
4515
- clearIntervalFn(creationIntervalId);
4516
- buffers.forEach((b) => clearTimeoutFn(b.timeoutId));
4517
- },
4518
- complete: () => {
4519
- clearIntervalFn(creationIntervalId);
4520
- buffers.forEach((b) => {
4521
- clearTimeoutFn(b.timeoutId);
4522
- if (!skipEmpty || b.buffer.length > 0) {
4523
- subscriber.next(b.buffer);
4524
- }
4525
- });
4526
- subscriber.complete();
4527
- }
4528
- });
4529
- return () => {
4530
- sourceSubscription.unsubscribe();
4531
- clearIntervalFn(creationIntervalId);
4532
- buffers.forEach((b) => clearTimeoutFn(b.timeoutId));
4533
- };
4534
- });
4535
- };
4536
- }
4537
-
4538
- // ../core/dist/esm/message/operators/debounceTime.js
4539
- function debounceTime(duration, config) {
4540
- return (source) => {
4541
- return new Observable((subscriber) => {
4542
- const setTimeoutFn = config?.setTimeout || setTimeout;
4543
- const clearTimeoutFn = config?.clearTimeout || clearTimeout;
4544
- let timeoutId = null;
4545
- let lastValue;
4546
- let hasValue = false;
4547
- const subscription = source.subscribe({
4548
- next: (value) => {
4549
- clearTimeoutFn(timeoutId);
4550
- lastValue = value;
4551
- hasValue = true;
4552
- timeoutId = setTimeoutFn(() => {
4553
- if (hasValue) {
4554
- subscriber.next(lastValue);
4555
- hasValue = false;
4556
- }
4557
- }, duration);
4558
- },
4559
- error: (err) => {
4560
- clearTimeoutFn(timeoutId);
4561
- subscriber.error(err);
4562
- },
4563
- complete: () => {
4564
- clearTimeoutFn(timeoutId);
4565
- if (hasValue) {
4566
- subscriber.next(lastValue);
4567
- }
4568
- subscriber.complete();
4569
- }
4570
- });
4571
- return subscription;
4572
- });
4573
- };
4574
- }
4575
-
4576
- // ../core/dist/esm/message/operators/distinctUntilChanged.js
4577
- function distinctUntilChanged(comparator) {
4578
- return (source) => {
4579
- return new Observable((subscriber) => {
4580
- let hasValue = false;
4581
- let previousValue;
4582
- const subscription = source.subscribe({
4583
- next: (value) => {
4584
- const areEqual = hasValue ? comparator ? comparator(previousValue, value) : previousValue === value : false;
4585
- if (!areEqual) {
4586
- hasValue = true;
4587
- previousValue = value;
4588
- subscriber.next(value);
4589
- }
4590
- },
4591
- error: (err) => {
4592
- subscriber.error(err);
4593
- },
4594
- complete: () => {
4595
- subscriber.complete();
4596
- }
4597
- });
4598
- return subscription;
4599
- });
4600
- };
4601
- }
4602
-
4603
- // ../core/dist/esm/message/operators/filter.js
4604
- function filter(predicate) {
4605
- return (source) => {
4606
- return new Observable((subscriber) => {
4607
- let index = 0;
4608
- const subscription = source.subscribe({
4609
- next: (value) => {
4610
- try {
4611
- if (predicate(value, index++)) {
4612
- subscriber.next(value);
4613
- }
4614
- } catch (err) {
4615
- subscriber.error(err);
4616
- }
4617
- },
4618
- error: (err) => {
4619
- subscriber.error(err);
4620
- },
4621
- complete: () => {
4622
- subscriber.complete();
4623
- }
4624
- });
4625
- return subscription;
4626
- });
4627
- };
4628
- }
4629
-
4630
- // ../core/dist/esm/message/operators/from.js
4631
- function from(input) {
4632
- return new Observable((subscriber) => {
4633
- for (let i = 0; i < input.length; i++) {
4634
- subscriber.next(input[i]);
4635
- }
4636
- subscriber.complete();
4637
- });
4638
- }
4639
-
4640
- // ../core/dist/esm/message/operators/map.js
4641
- function map(project) {
4642
- return (source) => {
4643
- return new Observable((subscriber) => {
4644
- let index = 0;
4645
- const subscription = source.subscribe({
4646
- next: (value) => {
4647
- try {
4648
- subscriber.next(project(value, index++));
4649
- } catch (err) {
4650
- subscriber.error(err);
4651
- }
4652
- },
4653
- error: (err) => {
4654
- subscriber.error(err);
4655
- },
4656
- complete: () => {
4657
- subscriber.complete();
4658
- }
4659
- });
4660
- return subscription;
4661
- });
4662
- };
4663
- }
4664
-
4665
- // ../core/dist/esm/message/operators/skip.js
4666
- function skip2(count) {
4667
- return (source) => {
4668
- return new Observable((subscriber) => {
4669
- let skipped = 0;
4670
- const sourceSubscription = source.subscribe({
4671
- next: (value) => {
4672
- if (skipped < count) {
4673
- skipped++;
4674
- } else {
4675
- subscriber.next(value);
4676
- }
4677
- },
4678
- error: (err) => {
4679
- subscriber.error(err);
4680
- },
4681
- complete: () => {
4682
- subscriber.complete();
4683
- }
4684
- });
4685
- return () => {
4686
- sourceSubscription.unsubscribe();
4687
- };
4688
- });
4689
- };
4690
- }
4691
-
4692
- // ../core/dist/esm/message/operators/tap.js
4693
- function tap(observerOrNext, error, complete) {
4694
- return (source) => {
4695
- return new Observable((subscriber) => {
4696
- const partialObserver = {
4697
- next: typeof observerOrNext === "object" ? observerOrNext.next : observerOrNext,
4698
- error: typeof observerOrNext === "object" ? observerOrNext.error : error,
4699
- complete: typeof observerOrNext === "object" ? observerOrNext.complete : complete
4700
- };
4701
- const subscription = source.subscribe({
4702
- next: (value) => {
4703
- try {
4704
- partialObserver.next?.(value);
4705
- } catch (err) {
4706
- subscriber.error(err);
4707
- return;
4708
- }
4709
- subscriber.next(value);
4710
- },
4711
- error: (err) => {
4712
- try {
4713
- partialObserver.error?.(err);
4714
- } catch (e) {
4715
- subscriber.error(e);
4716
- return;
4717
- }
4718
- subscriber.error(err);
4719
- },
4720
- complete: () => {
4721
- try {
4722
- partialObserver.complete?.();
4723
- } catch (err) {
4724
- subscriber.error(err);
4725
- return;
4726
- }
4727
- subscriber.complete();
4728
- }
4729
- });
4730
- return subscription;
4731
- });
4732
- };
4733
- }
4734
-
4735
- // ../core/dist/esm/message/operators/switchMap.js
4736
- function switchMap(project) {
4737
- return (source) => {
4738
- return new Observable((subscriber) => {
4739
- let index = 0;
4740
- let innerSubscription = null;
4741
- let hasCompleted = false;
4742
- let outerCompleted = false;
4743
- const checkForComplete = () => {
4744
- if (outerCompleted && !innerSubscription) {
4745
- subscriber.complete();
4746
- }
4747
- };
4748
- const outerSubscription = source.subscribe({
4749
- next: (value) => {
4750
- if (innerSubscription) {
4751
- innerSubscription.unsubscribe();
4752
- innerSubscription = null;
4753
- }
4754
- try {
4755
- const innerObservable = project(value, index++);
4756
- let isInnerComplete = false;
4757
- let currentInnerSub = null;
4758
- const sub = innerObservable.subscribe({
4759
- next: (innerValue) => {
4760
- subscriber.next(innerValue);
4761
- },
4762
- error: (err) => {
4763
- subscriber.error(err);
4764
- },
4765
- complete: () => {
4766
- isInnerComplete = true;
4767
- if (innerSubscription === currentInnerSub) {
4768
- innerSubscription = null;
4769
- }
4770
- checkForComplete();
4771
- }
4772
- });
4773
- if (!isInnerComplete) {
4774
- currentInnerSub = sub;
4775
- innerSubscription = sub;
4776
- }
4777
- } catch (err) {
4778
- subscriber.error(err);
4779
- }
4780
- },
4781
- error: (err) => {
4782
- subscriber.error(err);
4783
- },
4784
- complete: () => {
4785
- outerCompleted = true;
4786
- checkForComplete();
4787
- }
4788
- });
4789
- return () => {
4790
- outerSubscription.unsubscribe();
4791
- if (innerSubscription) {
4792
- innerSubscription.unsubscribe();
4793
- }
4794
- };
4795
- });
4796
- };
4797
- }
4798
-
4799
- // ../core/dist/esm/message/operators/mergeMap.js
4800
- function mergeMap(project) {
4801
- return (source) => {
4802
- return new Observable((subscriber) => {
4803
- let index = 0;
4804
- let activeCount = 0;
4805
- let hasCompleted = false;
4806
- const innerSubscriptions = [];
4807
- const checkComplete = () => {
4808
- if (hasCompleted && activeCount === 0) {
4809
- subscriber.complete();
4810
- }
4811
- };
4812
- const sourceSubscription = source.subscribe({
4813
- next: (value) => {
4814
- activeCount++;
4815
- const currentIndex = index++;
4816
- try {
4817
- const projected = project(value, currentIndex);
4818
- const innerObservable = projected instanceof Promise ? new Observable((innerSubscriber) => {
4819
- projected.then((result) => {
4820
- innerSubscriber.next(result);
4821
- innerSubscriber.complete();
4822
- }).catch((err) => {
4823
- innerSubscriber.error(err);
4824
- });
4825
- }) : projected;
4826
- let isInnerComplete = false;
4827
- let innerSubscription = null;
4828
- const sub = innerObservable.subscribe({
4829
- next: (innerValue) => {
4830
- subscriber.next(innerValue);
4831
- },
4832
- error: (err) => {
4833
- activeCount--;
4834
- subscriber.error(err);
4835
- },
4836
- complete: () => {
4837
- activeCount--;
4838
- isInnerComplete = true;
4839
- if (innerSubscription) {
4840
- const idx = innerSubscriptions.indexOf(innerSubscription);
4841
- if (idx >= 0) {
4842
- innerSubscriptions.splice(idx, 1);
4843
- }
4844
- }
4845
- checkComplete();
4846
- }
4847
- });
4848
- if (!isInnerComplete) {
4849
- innerSubscription = sub;
4850
- innerSubscriptions.push(innerSubscription);
4851
- }
4852
- } catch (err) {
4853
- activeCount--;
4854
- subscriber.error(err);
4855
- }
4856
- },
4857
- error: (err) => {
4858
- subscriber.error(err);
4859
- },
4860
- complete: () => {
4861
- hasCompleted = true;
4862
- checkComplete();
4863
- }
4864
- });
4865
- return () => {
4866
- sourceSubscription.unsubscribe();
4867
- innerSubscriptions.forEach((sub) => sub.unsubscribe());
4868
- };
4869
- });
4870
- };
4871
- }
4872
-
4873
- // ../core/dist/esm/message/operators/concatMap.js
4874
- function concatMap(project) {
4875
- return (source) => {
4876
- return new Observable((subscriber) => {
4877
- let index = 0;
4878
- let buffer = [];
4879
- let activeInnerSubscription = null;
4880
- let hasCompleted = false;
4881
- const checkForComplete = () => {
4882
- if (hasCompleted && !activeInnerSubscription && buffer.length === 0) {
4883
- subscriber.complete();
4884
- }
4885
- };
4886
- const subscribeToNext = () => {
4887
- if (buffer.length === 0 || activeInnerSubscription) {
4888
- return;
4889
- }
4890
- const next = buffer.shift();
4891
- try {
4892
- const innerObservable = project(next.value, next.index);
4893
- let isInnerComplete = false;
4894
- const sub = innerObservable.subscribe({
4895
- next: (innerValue) => {
4896
- subscriber.next(innerValue);
4897
- },
4898
- error: (err) => {
4899
- activeInnerSubscription = null;
4900
- subscriber.error(err);
4901
- },
4902
- complete: () => {
4903
- isInnerComplete = true;
4904
- activeInnerSubscription = null;
4905
- subscribeToNext();
4906
- checkForComplete();
4907
- }
4908
- });
4909
- if (!isInnerComplete) {
4910
- activeInnerSubscription = sub;
4911
- }
4912
- } catch (err) {
4913
- activeInnerSubscription = null;
4914
- subscriber.error(err);
4915
- }
4916
- };
4917
- const outerSubscription = source.subscribe({
4918
- next: (value) => {
4919
- buffer.push({ value, index: index++ });
4920
- subscribeToNext();
4921
- },
4922
- error: (err) => {
4923
- subscriber.error(err);
4924
- },
4925
- complete: () => {
4926
- hasCompleted = true;
4927
- checkForComplete();
4928
- }
4929
- });
4930
- return () => {
4931
- outerSubscription.unsubscribe();
4932
- if (activeInnerSubscription) {
4933
- activeInnerSubscription.unsubscribe();
4934
- }
4935
- };
4936
- });
4937
- };
4938
- }
4939
-
4940
- // ../core/dist/esm/message/operators/catchError.js
4941
- function catchError(selector) {
4942
- return (source) => {
4943
- return new Observable((subscriber) => {
4944
- let subscription;
4945
- const subscribeToSource = () => {
4946
- subscription = source.subscribe({
4947
- next: (value) => {
4948
- subscriber.next(value);
4949
- },
4950
- error: (err) => {
4951
- try {
4952
- const result = selector(err, source);
4953
- let isInnerComplete = false;
4954
- const sub = result.subscribe({
4955
- next: (value) => {
4956
- subscriber.next(value);
4957
- },
4958
- error: (innerErr) => {
4959
- subscriber.error(innerErr);
4960
- },
4961
- complete: () => {
4962
- isInnerComplete = true;
4963
- subscriber.complete();
4964
- }
4965
- });
4966
- if (!isInnerComplete) {
4967
- subscription = sub;
4968
- }
4969
- } catch (selectorErr) {
4970
- subscriber.error(selectorErr);
4971
- }
4972
- },
4973
- complete: () => {
4974
- subscriber.complete();
4975
- }
4976
- });
4977
- };
4978
- subscribeToSource();
4979
- return () => {
4980
- if (subscription) {
4981
- subscription.unsubscribe();
4982
- }
4983
- };
4984
- });
4985
- };
4986
- }
4987
-
4988
- // ../core/dist/esm/message/operators/retry.js
4989
- function retry(count = 3) {
4990
- return (source) => {
4991
- return new Observable((subscriber) => {
4992
- let retryCount = 0;
4993
- let subscription;
4994
- const subscribeToSource = () => {
4995
- subscription = source.subscribe({
4996
- next: (value) => {
4997
- subscriber.next(value);
4998
- },
4999
- error: (err) => {
5000
- if (retryCount < count) {
5001
- retryCount++;
5002
- subscribeToSource();
5003
- } else {
5004
- subscriber.error(err);
5005
- }
5006
- },
5007
- complete: () => {
5008
- subscriber.complete();
5009
- }
5010
- });
5011
- };
5012
- subscribeToSource();
5013
- return () => {
5014
- if (subscription) {
5015
- subscription.unsubscribe();
5016
- }
5017
- };
5018
- });
5019
- };
5020
- }
5021
-
5022
- // ../core/dist/esm/message/operators/delay.js
5023
- function delay(delayMs, config) {
5024
- return (source) => {
5025
- return new Observable((subscriber) => {
5026
- const setTimeoutFn = config?.setTimeout || setTimeout;
5027
- const clearTimeoutFn = config?.clearTimeout || clearTimeout;
5028
- const timeouts = [];
5029
- const subscription = source.subscribe({
5030
- next: (value) => {
5031
- const timeoutId = setTimeoutFn(() => {
5032
- subscriber.next(value);
5033
- }, delayMs);
5034
- timeouts.push(timeoutId);
5035
- },
5036
- error: (err) => {
5037
- const timeoutId = setTimeoutFn(() => {
5038
- subscriber.error(err);
5039
- }, delayMs);
5040
- timeouts.push(timeoutId);
5041
- },
5042
- complete: () => {
5043
- const timeoutId = setTimeoutFn(() => {
5044
- subscriber.complete();
5045
- }, delayMs);
5046
- timeouts.push(timeoutId);
5047
- }
5048
- });
5049
- return () => {
5050
- subscription.unsubscribe();
5051
- timeouts.forEach((timeout2) => clearTimeoutFn(timeout2));
5052
- };
5053
- });
5054
- };
5055
- }
5056
-
5057
- // ../core/dist/esm/message/operators/timeout.js
5058
- var TimeoutError = class extends Error {
5059
- constructor(message = "Timeout has occurred") {
5060
- super(message);
5061
- this.name = "TimeoutError";
5062
- }
5063
- };
5064
- function timeout(due, config) {
5065
- return (source) => {
5066
- return new Observable((subscriber) => {
5067
- const setTimeoutFn = config?.setTimeout || setTimeout;
5068
- const clearTimeoutFn = config?.clearTimeout || clearTimeout;
5069
- let timeoutId;
5070
- let hasEmitted = false;
5071
- const resetTimeout = () => {
5072
- if (timeoutId) {
5073
- clearTimeoutFn(timeoutId);
5074
- }
5075
- timeoutId = setTimeoutFn(() => {
5076
- if (!hasEmitted) {
5077
- subscriber.error(new TimeoutError());
5078
- }
5079
- }, due);
5080
- };
5081
- resetTimeout();
5082
- const subscription = source.subscribe({
5083
- next: (value) => {
5084
- hasEmitted = true;
5085
- clearTimeoutFn(timeoutId);
5086
- subscriber.next(value);
5087
- resetTimeout();
5088
- },
5089
- error: (err) => {
5090
- clearTimeoutFn(timeoutId);
5091
- subscriber.error(err);
5092
- },
5093
- complete: () => {
5094
- clearTimeoutFn(timeoutId);
5095
- subscriber.complete();
5096
- }
5097
- });
5098
- return () => {
5099
- clearTimeoutFn(timeoutId);
5100
- subscription.unsubscribe();
5101
- };
5102
- });
5103
- };
5104
- }
5105
-
5106
- // ../core/dist/esm/message/operators/scan.js
5107
- function scan(accumulator, seed) {
5108
- return (source) => {
5109
- return new Observable((subscriber) => {
5110
- let hasAccumulator = arguments.length >= 2;
5111
- let acc = seed;
5112
- let index = 0;
5113
- const subscription = source.subscribe({
5114
- next: (value) => {
5115
- try {
5116
- if (!hasAccumulator) {
5117
- acc = value;
5118
- hasAccumulator = true;
5119
- } else {
5120
- acc = accumulator(acc, value, index);
5121
- }
5122
- subscriber.next(acc);
5123
- index++;
5124
- } catch (err) {
5125
- subscriber.error(err);
5126
- }
5127
- },
5128
- error: (err) => {
5129
- subscriber.error(err);
5130
- },
5131
- complete: () => {
5132
- subscriber.complete();
5133
- }
5134
- });
5135
- return subscription;
5136
- });
5137
- };
5138
- }
5139
-
5140
- // ../core/dist/esm/message/operators/reduce.js
5141
- function reduce(accumulator, seed) {
5142
- return (source) => {
5143
- return new Observable((subscriber) => {
5144
- let hasAccumulator = arguments.length >= 2;
5145
- let acc = seed;
5146
- let index = 0;
5147
- const subscription = source.subscribe({
5148
- next: (value) => {
5149
- try {
5150
- if (!hasAccumulator) {
5151
- acc = value;
5152
- hasAccumulator = true;
5153
- } else {
5154
- acc = accumulator(acc, value, index);
5155
- }
5156
- index++;
5157
- } catch (err) {
5158
- subscriber.error(err);
5159
- }
5160
- },
5161
- error: (err) => {
5162
- subscriber.error(err);
5163
- },
5164
- complete: () => {
5165
- if (hasAccumulator) {
5166
- subscriber.next(acc);
5167
- subscriber.complete();
5168
- } else {
5169
- subscriber.error(new Error("Reduce of empty sequence with no initial value"));
5170
- }
5171
- }
5172
- });
5173
- return subscription;
5174
- });
5175
- };
5176
- }
5177
-
5178
- // ../core/dist/esm/message/operators/share.js
5179
- function share() {
5180
- return (source) => {
5181
- let subject = null;
5182
- let sourceSubscription = null;
5183
- let refCount = 0;
5184
- let hasCompleted = false;
5185
- let hasErrored = false;
5186
- const reset = () => {
5187
- subject = null;
5188
- sourceSubscription = null;
5189
- hasCompleted = false;
5190
- hasErrored = false;
5191
- };
5192
- return new Observable((subscriber) => {
5193
- refCount++;
5194
- let isFirst = false;
5195
- if (!subject || hasCompleted || hasErrored) {
5196
- if (sourceSubscription) {
5197
- sourceSubscription.unsubscribe();
5198
- }
5199
- subject = new Subject();
5200
- hasCompleted = false;
5201
- hasErrored = false;
5202
- isFirst = true;
5203
- }
5204
- const subscription = subject.subscribe({
5205
- next: (value) => subscriber.next(value),
5206
- error: (err) => subscriber.error(err),
5207
- complete: () => subscriber.complete()
5208
- });
5209
- if (isFirst) {
5210
- const sub = source.subscribe({
5211
- next: (value) => {
5212
- if (subject) {
5213
- subject.next(value);
5214
- }
5215
- },
5216
- error: (err) => {
5217
- hasErrored = true;
5218
- const s = subject;
5219
- if (s) {
5220
- s.error(err);
5221
- }
5222
- if (refCount === 0) {
5223
- reset();
5224
- }
5225
- },
5226
- complete: () => {
5227
- hasCompleted = true;
5228
- const s = subject;
5229
- if (s) {
5230
- s.complete();
5231
- }
5232
- if (refCount === 0) {
5233
- reset();
5234
- }
5235
- }
5236
- });
5237
- if (!subject) {
5238
- sub.unsubscribe();
5239
- } else {
5240
- sourceSubscription = sub;
5241
- }
5242
- }
5243
- return () => {
5244
- refCount--;
5245
- subscription.unsubscribe();
5246
- if (refCount === 0) {
5247
- if (sourceSubscription) {
5248
- sourceSubscription.unsubscribe();
5249
- }
5250
- reset();
5251
- }
5252
- };
5253
- });
5254
- };
5255
- }
5256
-
5257
- // ../core/dist/esm/message/operators/finalize.js
5258
- function finalize(callback) {
5259
- return (source) => {
5260
- return new Observable((subscriber) => {
5261
- let executed = false;
5262
- const executeCallback = () => {
5263
- if (!executed) {
5264
- executed = true;
5265
- callback();
5266
- }
5267
- };
5268
- const subscription = source.subscribe({
5269
- next: (value) => {
5270
- subscriber.next(value);
5271
- },
5272
- error: (err) => {
5273
- try {
5274
- executeCallback();
5275
- } finally {
5276
- subscriber.error(err);
5277
- }
5278
- },
5279
- complete: () => {
5280
- try {
5281
- executeCallback();
5282
- } finally {
5283
- subscriber.complete();
5284
- }
5285
- }
5286
- });
5287
- return () => {
5288
- try {
5289
- subscription.unsubscribe();
5290
- } finally {
5291
- executeCallback();
5292
- }
5293
- };
5294
- });
5295
- };
5296
- }
5297
-
5298
- // ../core/dist/esm/message/operators/first.js
5299
- function first(predicate, defaultValue) {
5300
- return (source) => {
5301
- return new Observable((subscriber) => {
5302
- let index = 0;
5303
- let hasValue = false;
5304
- const subscription = source.subscribe({
5305
- next: (value) => {
5306
- if (hasValue) {
5307
- return;
5308
- }
5309
- const shouldEmit = predicate ? predicate(value, index++) : true;
5310
- if (shouldEmit) {
5311
- hasValue = true;
5312
- subscriber.next(value);
5313
- subscriber.complete();
5314
- subscription.unsubscribe();
5315
- }
5316
- },
5317
- error: (err) => {
5318
- if (!hasValue) {
5319
- subscriber.error(err);
5320
- }
5321
- },
5322
- complete: () => {
5323
- if (!hasValue) {
5324
- if (defaultValue !== void 0) {
5325
- subscriber.next(defaultValue);
5326
- subscriber.complete();
5327
- } else {
5328
- subscriber.error(new Error("no elements in sequence"));
5329
- }
5330
- }
5331
- }
5332
- });
5333
- return subscription;
5334
- });
5335
- };
5336
- }
5337
-
5338
- // ../core/dist/esm/message/operators/take.js
5339
- function take2(count) {
5340
- return (source) => {
5341
- return new Observable((subscriber) => {
5342
- let taken = 0;
5343
- if (count === 0) {
5344
- subscriber.complete();
5345
- return;
5346
- }
5347
- const sourceSubscription = source.subscribe({
5348
- next: (value) => {
5349
- if (taken < count) {
5350
- taken++;
5351
- subscriber.next(value);
5352
- if (taken === count) {
5353
- subscriber.complete();
5354
- sourceSubscription.unsubscribe();
5355
- }
5356
- }
5357
- },
5358
- error: (err) => {
5359
- subscriber.error(err);
5360
- },
5361
- complete: () => {
5362
- subscriber.complete();
5363
- }
5364
- });
5365
- return () => {
5366
- sourceSubscription.unsubscribe();
5367
- };
5368
- });
5369
- };
5370
- }
5371
-
5372
- // ../core/dist/esm/message/operators/find.js
5373
- function find(predicate) {
5374
- return (source) => {
5375
- return new Observable((subscriber) => {
5376
- let index = 0;
5377
- const sourceSubscription = source.subscribe({
5378
- next: (value) => {
5379
- try {
5380
- if (predicate(value, index++)) {
5381
- subscriber.next(value);
5382
- subscriber.complete();
5383
- sourceSubscription.unsubscribe();
5384
- }
5385
- } catch (err) {
5386
- subscriber.error(err);
5387
- }
5388
- },
5389
- error: (err) => {
5390
- subscriber.error(err);
5391
- },
5392
- complete: () => {
5393
- subscriber.complete();
5394
- }
5395
- });
5396
- return () => {
5397
- sourceSubscription.unsubscribe();
5398
- };
5399
- });
5400
- };
5401
- }
5402
-
5403
- // ../core/dist/esm/message/operators/takeWhile.js
5404
- function takeWhile2(predicate) {
5405
- return (source) => {
5406
- return new Observable((subscriber) => {
5407
- let index = 0;
5408
- const sourceSubscription = source.subscribe({
5409
- next: (value) => {
5410
- try {
5411
- if (predicate(value, index++)) {
5412
- subscriber.next(value);
5413
- } else {
5414
- subscriber.complete();
5415
- sourceSubscription.unsubscribe();
5416
- }
5417
- } catch (err) {
5418
- subscriber.error(err);
4236
+ const subscription = source.subscribe({
4237
+ next: (value) => {
4238
+ if (skipped < count) {
4239
+ skipped++;
4240
+ } else {
4241
+ subscriber.next(value);
5419
4242
  }
5420
4243
  },
5421
4244
  error: (err) => {
@@ -5425,72 +4248,48 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
5425
4248
  subscriber.complete();
5426
4249
  }
5427
4250
  });
5428
- return () => {
5429
- sourceSubscription.unsubscribe();
5430
- };
4251
+ return subscription;
5431
4252
  });
5432
4253
  };
5433
4254
  }
5434
4255
 
5435
- // ../core/dist/esm/message/operators/single.js
5436
- var EmptyError2 = class extends Error {
5437
- constructor(message = "No elements in single") {
5438
- super(message);
5439
- this.name = "EmptyError";
5440
- }
5441
- };
5442
- var SequenceError = class extends Error {
5443
- constructor(message) {
5444
- super(message);
5445
- this.name = "SequenceError";
5446
- }
5447
- };
5448
- function single(predicate) {
4256
+ // ../core/dist/esm/message/internal/takeWhile.js
4257
+ function takeWhile(predicate, inclusive = false) {
5449
4258
  return (source) => {
5450
4259
  return new Observable((subscriber) => {
5451
4260
  let index = 0;
5452
- let match;
5453
- let hasFound = false;
5454
- const sourceSubscription = source.subscribe({
4261
+ const subscription = source.subscribe({
5455
4262
  next: (value) => {
5456
- try {
5457
- if (predicate(value, index++)) {
5458
- if (hasFound) {
5459
- subscriber.error(new SequenceError("Sequence contains more than one element"));
5460
- sourceSubscription.unsubscribe();
5461
- } else {
5462
- match = value;
5463
- hasFound = true;
5464
- }
4263
+ const result = predicate(value, index++);
4264
+ if (result) {
4265
+ subscriber.next(value);
4266
+ } else {
4267
+ if (inclusive) {
4268
+ subscriber.next(value);
5465
4269
  }
5466
- } catch (err) {
5467
- subscriber.error(err);
4270
+ subscriber.complete();
5468
4271
  }
5469
4272
  },
5470
4273
  error: (err) => {
5471
4274
  subscriber.error(err);
5472
4275
  },
5473
4276
  complete: () => {
5474
- if (hasFound) {
5475
- subscriber.next(match);
5476
- subscriber.complete();
5477
- } else {
5478
- subscriber.error(new EmptyError2());
5479
- }
4277
+ subscriber.complete();
5480
4278
  }
5481
4279
  });
5482
- return () => {
5483
- sourceSubscription.unsubscribe();
5484
- };
4280
+ return subscription;
5485
4281
  });
5486
4282
  };
5487
4283
  }
5488
4284
 
5489
- // ../core/dist/esm/message/operators/takeUntil.js
5490
- function takeUntil(notifier) {
4285
+ // ../core/dist/esm/message/internal/startWith.js
4286
+ function startWith(...values) {
5491
4287
  return (source) => {
5492
4288
  return new Observable((subscriber) => {
5493
- const sourceSubscription = source.subscribe({
4289
+ for (const value of values) {
4290
+ subscriber.next(value);
4291
+ }
4292
+ const subscription = source.subscribe({
5494
4293
  next: (value) => {
5495
4294
  subscriber.next(value);
5496
4295
  },
@@ -5501,204 +4300,123 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
5501
4300
  subscriber.complete();
5502
4301
  }
5503
4302
  });
5504
- const notifierSubscription = notifier.subscribe({
5505
- next: () => {
5506
- subscriber.complete();
5507
- sourceSubscription.unsubscribe();
5508
- notifierSubscription.unsubscribe();
5509
- },
5510
- error: (err) => {
5511
- subscriber.error(err);
5512
- },
5513
- complete: () => {
5514
- }
5515
- });
5516
- return () => {
5517
- sourceSubscription.unsubscribe();
5518
- notifierSubscription.unsubscribe();
5519
- };
4303
+ return subscription;
5520
4304
  });
5521
4305
  };
5522
4306
  }
5523
4307
 
5524
- // ../core/dist/esm/message/operators/takeLast.js
5525
- function takeLast(count) {
5526
- return (source) => {
5527
- return new Observable((subscriber) => {
5528
- let buffer = [];
5529
- if (count === 0) {
4308
+ // ../core/dist/esm/message/internal/concat.js
4309
+ function concat(...observables) {
4310
+ return new Observable((subscriber) => {
4311
+ let currentIndex = 0;
4312
+ let currentSubscription;
4313
+ function subscribeToNext() {
4314
+ if (currentIndex >= observables.length) {
5530
4315
  subscriber.complete();
5531
4316
  return;
5532
4317
  }
5533
- const sourceSubscription = source.subscribe({
4318
+ const currentObservable = observables[currentIndex++];
4319
+ currentSubscription = currentObservable.subscribe({
5534
4320
  next: (value) => {
5535
- buffer.push(value);
5536
- if (buffer.length > count) {
5537
- buffer.shift();
5538
- }
4321
+ subscriber.next(value);
5539
4322
  },
5540
4323
  error: (err) => {
5541
4324
  subscriber.error(err);
5542
4325
  },
5543
4326
  complete: () => {
5544
- for (const value of buffer) {
5545
- subscriber.next(value);
5546
- }
5547
- subscriber.complete();
4327
+ subscribeToNext();
5548
4328
  }
5549
4329
  });
5550
- return () => {
5551
- sourceSubscription.unsubscribe();
5552
- };
5553
- });
5554
- };
4330
+ }
4331
+ subscribeToNext();
4332
+ return () => {
4333
+ if (currentSubscription) {
4334
+ currentSubscription.unsubscribe();
4335
+ }
4336
+ };
4337
+ });
5555
4338
  }
5556
4339
 
5557
- // ../core/dist/esm/message/operators/skipWhile.js
5558
- function skipWhile(predicate) {
5559
- return (source) => {
5560
- return new Observable((subscriber) => {
5561
- let index = 0;
5562
- let skipping = true;
5563
- const sourceSubscription = source.subscribe({
4340
+ // ../core/dist/esm/message/internal/merge.js
4341
+ function merge(...observables) {
4342
+ return new Observable((subscriber) => {
4343
+ if (observables.length === 0) {
4344
+ subscriber.complete();
4345
+ return;
4346
+ }
4347
+ let completedCount = 0;
4348
+ const subscriptions = [];
4349
+ for (const observable of observables) {
4350
+ const subscription = observable.subscribe({
5564
4351
  next: (value) => {
5565
- try {
5566
- if (skipping && predicate(value, index++)) {
5567
- } else {
5568
- skipping = false;
5569
- subscriber.next(value);
5570
- }
5571
- } catch (err) {
5572
- subscriber.error(err);
5573
- }
4352
+ subscriber.next(value);
5574
4353
  },
5575
4354
  error: (err) => {
5576
4355
  subscriber.error(err);
5577
4356
  },
5578
4357
  complete: () => {
5579
- subscriber.complete();
5580
- }
5581
- });
5582
- return () => {
5583
- sourceSubscription.unsubscribe();
5584
- };
5585
- });
5586
- };
5587
- }
5588
-
5589
- // ../core/dist/esm/message/operators/throttle.js
5590
- function throttle(durationSelector, config) {
5591
- const leading = config?.leading ?? true;
5592
- const trailing = config?.trailing ?? false;
5593
- return (source) => {
5594
- return new Observable((subscriber) => {
5595
- let throttled = false;
5596
- let trailingValue;
5597
- let hasTrailingValue = false;
5598
- let durationSubscription = null;
5599
- let isEndingThrottle = false;
5600
- const endThrottle = () => {
5601
- if (isEndingThrottle) {
5602
- return;
5603
- }
5604
- isEndingThrottle = true;
5605
- if (durationSubscription) {
5606
- durationSubscription.unsubscribe();
5607
- durationSubscription = null;
5608
- }
5609
- throttled = false;
5610
- if (trailing && hasTrailingValue) {
5611
- const valueToEmit = trailingValue;
5612
- hasTrailingValue = false;
5613
- trailingValue = void 0;
5614
- Promise.resolve().then(() => {
5615
- isEndingThrottle = false;
5616
- if (!subscriber.closed) {
5617
- subscriber.next(valueToEmit);
5618
- startThrottle(valueToEmit);
5619
- }
5620
- });
5621
- } else {
5622
- isEndingThrottle = false;
5623
- }
5624
- };
5625
- const startThrottle = (value) => {
5626
- if (throttled) {
5627
- return;
5628
- }
5629
- throttled = true;
5630
- try {
5631
- const duration = durationSelector(value);
5632
- durationSubscription = duration.subscribe({
5633
- next: () => {
5634
- endThrottle();
5635
- },
5636
- error: (err) => {
5637
- throttled = false;
5638
- if (durationSubscription) {
5639
- durationSubscription.unsubscribe();
5640
- durationSubscription = null;
5641
- }
5642
- subscriber.error(err);
5643
- },
5644
- complete: () => {
5645
- endThrottle();
5646
- }
5647
- });
5648
- } catch (err) {
5649
- throttled = false;
5650
- subscriber.error(err);
5651
- }
5652
- };
5653
- const sourceSubscription = source.subscribe({
5654
- next: (value) => {
5655
- if (!throttled) {
5656
- if (leading) {
5657
- subscriber.next(value);
5658
- } else if (trailing) {
5659
- trailingValue = value;
5660
- hasTrailingValue = true;
5661
- }
5662
- startThrottle(value);
5663
- } else if (trailing) {
5664
- trailingValue = value;
5665
- hasTrailingValue = true;
4358
+ completedCount++;
4359
+ if (completedCount === observables.length) {
4360
+ subscriber.complete();
5666
4361
  }
5667
- },
5668
- error: (err) => {
5669
- subscriber.error(err);
5670
- },
5671
- complete: () => {
5672
- subscriber.complete();
5673
4362
  }
5674
4363
  });
5675
- return () => {
5676
- sourceSubscription.unsubscribe();
5677
- if (durationSubscription) {
5678
- durationSubscription.unsubscribe();
5679
- }
5680
- };
5681
- });
5682
- };
4364
+ subscriptions.push(subscription);
4365
+ }
4366
+ return () => {
4367
+ subscriptions.forEach((sub) => sub.unsubscribe());
4368
+ };
4369
+ });
5683
4370
  }
5684
4371
 
5685
- // ../core/dist/esm/message/operators/interval.js
5686
- function interval2(period = 0, config) {
4372
+ // ../core/dist/esm/message/internal/fromEvent.js
4373
+ function fromEvent(target, eventName) {
5687
4374
  return new Observable((subscriber) => {
5688
- const setIntervalFn = config?.setInterval || setInterval;
5689
- const clearIntervalFn = config?.clearInterval || clearInterval;
5690
- let count = 0;
5691
- const intervalId = setIntervalFn(() => {
5692
- subscriber.next(count++);
5693
- }, period);
4375
+ const handler = (event) => {
4376
+ subscriber.next(event);
4377
+ };
4378
+ target.addEventListener(eventName, handler);
5694
4379
  return () => {
5695
- clearIntervalFn(intervalId);
4380
+ target.removeEventListener(eventName, handler);
5696
4381
  };
5697
4382
  });
5698
4383
  }
5699
4384
 
4385
+ // ../core/dist/esm/message/internal/toPromise.js
4386
+ function toPromise(source) {
4387
+ return new Promise((resolve, reject) => {
4388
+ let _hasValue = false;
4389
+ let _value;
4390
+ source.subscribe({
4391
+ next: (value) => {
4392
+ _value = value;
4393
+ _hasValue = true;
4394
+ },
4395
+ error: reject,
4396
+ complete: () => {
4397
+ if (_hasValue) {
4398
+ resolve(_value);
4399
+ } else {
4400
+ reject(new EmptyError());
4401
+ }
4402
+ }
4403
+ });
4404
+ });
4405
+ }
4406
+
5700
4407
  // ../core/dist/esm/message/index.js
5701
- var debounce = (fn, delay2, config) => {
4408
+ var debounceTimeIntervalLock = (unlockChecker, unlocked, intervalTime, config) => {
4409
+ const clearIntervalFn = config?.clearInterval || clearInterval;
4410
+ const setIntervalFn = config?.setInterval || setInterval;
4411
+ const nextIntervalId = setIntervalFn(() => {
4412
+ if (unlockChecker()) {
4413
+ clearIntervalFn(nextIntervalId);
4414
+ unlocked();
4415
+ }
4416
+ }, intervalTime);
4417
+ return nextIntervalId;
4418
+ };
4419
+ var debounce = (fn, delay, config) => {
5702
4420
  const setTimeoutFn = config?.setTimeout || setTimeout;
5703
4421
  const clearTimeoutFn = config?.clearTimeout || clearTimeout;
5704
4422
  let timer2 = null;
@@ -5709,10 +4427,10 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
5709
4427
  timer2 = setTimeoutFn(() => {
5710
4428
  fn(data);
5711
4429
  timer2 = null;
5712
- }, delay2);
4430
+ }, delay);
5713
4431
  };
5714
4432
  };
5715
- var throttleTime = (fn, delay2, config) => {
4433
+ var throttleTime = (fn, delay, config) => {
5716
4434
  const setTimeoutFn = config?.setTimeout || setTimeout;
5717
4435
  let timer2 = null;
5718
4436
  return (...args) => {
@@ -5720,15 +4438,15 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
5720
4438
  timer2 = setTimeoutFn(() => {
5721
4439
  fn(...args);
5722
4440
  timer2 = null;
5723
- }, delay2);
4441
+ }, delay);
5724
4442
  }
5725
4443
  };
5726
4444
  };
5727
- var throttle2 = (fn, delay2) => {
4445
+ var throttle = (fn, delay) => {
5728
4446
  let lastTime = 0;
5729
4447
  return (...args) => {
5730
4448
  const now = Date.now();
5731
- if (now - lastTime >= delay2) {
4449
+ if (now - lastTime >= delay) {
5732
4450
  fn(...args);
5733
4451
  lastTime = now;
5734
4452
  }
@@ -5838,7 +4556,7 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
5838
4556
  } catch (e) {
5839
4557
  const targetHas = Array.isArray(has) ? has : [has];
5840
4558
  for (let ha of targetHas) {
5841
- if (ValidUtils.isConstructor(ha)) {
4559
+ if (ValidUtils.isFunctionType(ha)) {
5842
4560
  if (e instanceof ha) {
5843
4561
  return e;
5844
4562
  }
@@ -5894,12 +4612,12 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
5894
4612
  }
5895
4613
  };
5896
4614
  };
5897
- Promises2.delayExecute = (value, delay2 = 0) => {
4615
+ Promises2.delayExecute = (value, delay = 0) => {
5898
4616
  return new Promise((resolve) => {
5899
4617
  setTimeout(async () => {
5900
4618
  const t = await value();
5901
4619
  resolve(t);
5902
- }, delay2);
4620
+ }, delay);
5903
4621
  });
5904
4622
  };
5905
4623
  Promises2.abortable = (executor, signal) => {
@@ -8321,7 +7039,7 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
8321
7039
  // ../core/dist/esm/schedule/Schedule.js
8322
7040
  var Schedule;
8323
7041
  ((Schedule2) => {
8324
- Schedule2.SYMBOL = Symbol("Schedule");
7042
+ Schedule2.SYMBOL = Symbol.for("core:schedule-token");
8325
7043
  })(Schedule || (Schedule = {}));
8326
7044
  var ScheduleBase = class {
8327
7045
  constructor() {
@@ -8755,6 +7473,17 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
8755
7473
  Reflect.defineMetadata(metadataKey, value, target);
8756
7474
  }
8757
7475
  };
7476
+ ReflectUtils2.copyMetadata = (from, to, propertyKey) => {
7477
+ const keys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from);
7478
+ for (const key of keys) {
7479
+ const data = propertyKey ? Reflect.getOwnMetadata(key, from, propertyKey) : Reflect.getOwnMetadata(key, from);
7480
+ if (propertyKey) {
7481
+ Reflect.defineMetadata(key, data, to, propertyKey);
7482
+ } else {
7483
+ Reflect.defineMetadata(key, data, to);
7484
+ }
7485
+ }
7486
+ };
8758
7487
  })(ReflectUtils || (ReflectUtils = {}));
8759
7488
 
8760
7489
  // ../core/dist/esm/function/FunctionUtils.js
@@ -8847,8 +7576,8 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
8847
7576
  }
8848
7577
  };
8849
7578
  var RangeIterator = class {
8850
- constructor(first2, last, step) {
8851
- this._current = this._first = first2;
7579
+ constructor(first, last, step) {
7580
+ this._current = this._first = first;
8852
7581
  this._last = last;
8853
7582
  this._step = step;
8854
7583
  }
@@ -8876,8 +7605,8 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
8876
7605
  }
8877
7606
  };
8878
7607
  var Range = class _Range {
8879
- constructor(first2, last, step = 1) {
8880
- this.first = first2;
7608
+ constructor(first, last, step = 1) {
7609
+ this.first = first;
8881
7610
  this.last = last;
8882
7611
  this.step = step;
8883
7612
  this.isRange = true;
@@ -8888,15 +7617,15 @@ var dooboostoreSimpleBootHttpServerWebSocketClient = (() => {
8888
7617
  map(callbackfn, thisArg) {
8889
7618
  return Array.from(this).map(callbackfn);
8890
7619
  }
8891
- static range(first2, last, step = 1) {
8892
- if (typeof first2 === "number" && last === void 0) {
8893
- return new _Range(0, first2, step);
8894
- } else if (typeof first2 === "string") {
8895
- const [_first, _last = "0"] = first2.split("..");
7620
+ static range(first, last, step = 1) {
7621
+ if (typeof first === "number" && last === void 0) {
7622
+ return new _Range(0, first, step);
7623
+ } else if (typeof first === "string") {
7624
+ const [_first, _last = "0"] = first.split("..");
8896
7625
  const [__last, _step = "1"] = _last.split(",");
8897
7626
  return new _Range(Number(_first.trim()), Number(__last.trim()), Number(_step.trim()));
8898
7627
  } else {
8899
- return new _Range(first2, last ?? 0, step);
7628
+ return new _Range(first, last ?? 0, step);
8900
7629
  }
8901
7630
  }
8902
7631
  };
@@ -10666,6 +9395,187 @@ ${indentStr}}`;
10666
9395
  })(Path = Expression2.Path || (Expression2.Path = {}));
10667
9396
  })(Expression || (Expression = {}));
10668
9397
 
9398
+ // ../core/dist/esm/expression/ActionExpression.js
9399
+ var DEFAULT_EXPRESSION_CONFIG = {
9400
+ "callReturn": { start: "{{=", end: "}}" },
9401
+ "call": { start: "{{@", end: "}}" },
9402
+ "replace": { start: "{{", end: "}}" }
9403
+ };
9404
+ var ActionExpression = class {
9405
+ constructor(value, config) {
9406
+ this.originalTemplate = value || "";
9407
+ this.idToMarker = /* @__PURE__ */ new Map();
9408
+ this.processedIds = /* @__PURE__ */ new Set();
9409
+ this.expressions = [];
9410
+ if (!value || typeof value !== "string") {
9411
+ this.maskingTemplate = this.originalTemplate;
9412
+ this.currentTemplate = this.originalTemplate;
9413
+ return;
9414
+ }
9415
+ this.maskingTemplate = value;
9416
+ this.currentTemplate = value;
9417
+ const exprConfig = {
9418
+ "callReturn": config?.expression?.["callReturn"] || DEFAULT_EXPRESSION_CONFIG["callReturn"],
9419
+ "call": config?.expression?.call || DEFAULT_EXPRESSION_CONFIG.call,
9420
+ "replace": config?.expression?.replace || DEFAULT_EXPRESSION_CONFIG.replace
9421
+ };
9422
+ const types = ["callReturn", "call", "replace"];
9423
+ types.sort((a, b) => {
9424
+ const startFirst = exprConfig[b].start;
9425
+ const startLast = exprConfig[a].start;
9426
+ const fLength = typeof startFirst === "string" ? startFirst.length : startFirst.source.length;
9427
+ const lLength = typeof startLast === "string" ? startLast.length : startLast.source.length;
9428
+ return fLength - lLength;
9429
+ });
9430
+ for (const type of types) {
9431
+ const marker = exprConfig[type];
9432
+ if (marker) {
9433
+ this.processExpressionType(type, marker.start, marker.end);
9434
+ }
9435
+ }
9436
+ this.sortExpressionsByPosition();
9437
+ this.maskingTemplate = this.currentTemplate;
9438
+ }
9439
+ sortExpressionsByPosition() {
9440
+ this.expressions.forEach((expr) => {
9441
+ const index = this.originalTemplate.indexOf(expr.original);
9442
+ expr.index = index >= 0 ? index : 0;
9443
+ });
9444
+ this.expressions.sort((a, b) => (a.index ?? 0) - (b.index ?? 0));
9445
+ }
9446
+ processExpressionType(type, start, end) {
9447
+ const getPattern = (v) => {
9448
+ if (v instanceof RegExp) {
9449
+ return v.source;
9450
+ }
9451
+ return v.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
9452
+ };
9453
+ const escapedStart = getPattern(start);
9454
+ const escapedEnd = getPattern(end);
9455
+ const regex = new RegExp(`${escapedStart}\\s*([\\s\\S]+?)\\s*${escapedEnd}`, "g");
9456
+ let match;
9457
+ const valueToMatch = this.currentTemplate;
9458
+ while ((match = regex.exec(valueToMatch)) !== null) {
9459
+ this.addExpression(match, type);
9460
+ }
9461
+ }
9462
+ addExpression(match, type) {
9463
+ const id = Math.random().toString(36).substr(2, 9);
9464
+ const original = match[0];
9465
+ const rawScript = match[1];
9466
+ const marker = `__EXPR_${id}__`;
9467
+ const expressionStart = original.substring(0, original.indexOf(rawScript));
9468
+ const expressionEnd = original.substring(original.indexOf(rawScript) + rawScript.length);
9469
+ this.idToMarker.set(id, marker);
9470
+ this.currentTemplate = this.currentTemplate.replace(original, marker);
9471
+ this.expressions.push({
9472
+ id,
9473
+ type,
9474
+ original,
9475
+ script: rawScript.trim(),
9476
+ expressionStart,
9477
+ expressionEnd
9478
+ });
9479
+ }
9480
+ replace(idOrExpr, valueOrCallback) {
9481
+ const id = typeof idOrExpr === "string" ? idOrExpr : idOrExpr.id;
9482
+ let expr;
9483
+ if (typeof valueOrCallback === "function") {
9484
+ expr = this.expressions.find((e) => e.id === id);
9485
+ if (!expr) return this.getUnprocessedTemplate();
9486
+ }
9487
+ const value = typeof valueOrCallback === "function" ? valueOrCallback(expr) : valueOrCallback;
9488
+ const marker = this.idToMarker.get(id);
9489
+ if (marker) {
9490
+ this.processedIds.add(id);
9491
+ this.currentTemplate = this.currentTemplate.replace(marker, value);
9492
+ }
9493
+ return this.getUnprocessedTemplate();
9494
+ }
9495
+ getExpressions(typeOrOptions) {
9496
+ if (!typeOrOptions) {
9497
+ return this.expressions;
9498
+ }
9499
+ if (typeof typeOrOptions === "string") {
9500
+ return this.expressions.filter((expr) => expr.type === typeOrOptions);
9501
+ }
9502
+ const options = typeOrOptions;
9503
+ return this.expressions.filter((expr) => {
9504
+ if (options.type && expr.type !== options.type) return false;
9505
+ return true;
9506
+ });
9507
+ }
9508
+ getFirstExpression(typeOrOptions) {
9509
+ if (!typeOrOptions) {
9510
+ return this.getExpressions()[0];
9511
+ }
9512
+ if (typeof typeOrOptions === "string") {
9513
+ return this.getExpressions(typeOrOptions)[0];
9514
+ }
9515
+ return this.getExpressions(typeOrOptions)[0];
9516
+ }
9517
+ getOriginalTemplate() {
9518
+ return this.originalTemplate;
9519
+ }
9520
+ getMaskingTemplate() {
9521
+ return this.maskingTemplate;
9522
+ }
9523
+ getCurrentTemplate() {
9524
+ return this.currentTemplate;
9525
+ }
9526
+ toResult() {
9527
+ return this.getUnprocessedTemplate();
9528
+ }
9529
+ getUnprocessedTemplate() {
9530
+ let result = this.currentTemplate;
9531
+ for (const expr of this.expressions) {
9532
+ if (!this.processedIds.has(expr.id)) {
9533
+ const m = this.idToMarker.get(expr.id);
9534
+ if (m) {
9535
+ result = result.replace(m, expr.original);
9536
+ }
9537
+ }
9538
+ }
9539
+ return result;
9540
+ }
9541
+ };
9542
+ function getExpression(value, config) {
9543
+ const ae = new ActionExpression(value, config);
9544
+ return {
9545
+ originalTemplate: ae.getOriginalTemplate(),
9546
+ maskingTemplate: ae.getMaskingTemplate(),
9547
+ expressions: ae.getExpressions(),
9548
+ replace: (id, value2) => ae.replace(id, value2)
9549
+ };
9550
+ }
9551
+
9552
+ // ../core/dist/esm/message/operators/filter.js
9553
+ function filter(predicate) {
9554
+ return (source) => {
9555
+ return new Observable((subscriber) => {
9556
+ let index = 0;
9557
+ const subscription = source.subscribe({
9558
+ next: (value) => {
9559
+ try {
9560
+ if (predicate(value, index++)) {
9561
+ subscriber.next(value);
9562
+ }
9563
+ } catch (err) {
9564
+ subscriber.error(err);
9565
+ }
9566
+ },
9567
+ error: (err) => {
9568
+ subscriber.error(err);
9569
+ },
9570
+ complete: () => {
9571
+ subscriber.complete();
9572
+ }
9573
+ });
9574
+ return subscription;
9575
+ });
9576
+ };
9577
+ }
9578
+
10669
9579
  // src/websocket/WebSocketClient.ts
10670
9580
  var WebSocketClient = class {
10671
9581
  constructor(connection, config) {
@@ -11132,7 +10042,7 @@ ${indentStr}}`;
11132
10042
  const value = { type: option?.type, uuid, requestUUID, body };
11133
10043
  self.sendMessage(value);
11134
10044
  }
11135
- return topicSubject.pipe(operators_exports.filter((data) => data && data.requestUUID === requestUUID));
10045
+ return topicSubject.pipe(filter((data) => data && data.requestUUID === requestUUID));
11136
10046
  },
11137
10047
  onUnsubscribe: (callback) => {
11138
10048
  onUnsubscribes.push(callback);