@dooboostore/simple-boot-http-server-ssr 1.0.13 → 1.0.14

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 (52) hide show
  1. package/README.MD +1 -3
  2. package/dist/cjs/filters/IntentSchemeFilter.js.map +2 -2
  3. package/dist/cjs/filters/SSRDomParserFilter.js +186 -0
  4. package/dist/cjs/filters/SSRDomParserFilter.js.map +7 -0
  5. package/dist/cjs/initializers/DomParserInitializer.js +79 -0
  6. package/dist/cjs/initializers/DomParserInitializer.js.map +7 -0
  7. package/dist/cjs/proxy/SymbolIntentApiServiceProxy.js +85 -73
  8. package/dist/cjs/proxy/SymbolIntentApiServiceProxy.js.map +2 -2
  9. package/dist/cjs/proxy/SymbolIntentApiServiceProxyBase.js +2 -77
  10. package/dist/cjs/proxy/SymbolIntentApiServiceProxyBase.js.map +2 -2
  11. package/dist/esm/filters/IntentSchemeFilter.js.map +2 -2
  12. package/dist/esm/filters/SSRDomParserFilter.js +163 -0
  13. package/dist/esm/filters/SSRDomParserFilter.js.map +7 -0
  14. package/dist/esm/initializers/DomParserInitializer.js +46 -0
  15. package/dist/esm/initializers/DomParserInitializer.js.map +7 -0
  16. package/dist/esm/proxy/SymbolIntentApiServiceProxy.js +85 -73
  17. package/dist/esm/proxy/SymbolIntentApiServiceProxy.js.map +2 -2
  18. package/dist/esm/proxy/SymbolIntentApiServiceProxyBase.js +2 -77
  19. package/dist/esm/proxy/SymbolIntentApiServiceProxyBase.js.map +2 -2
  20. package/dist/esm-bundle/dooboostore-simple-boot-http-server-ssr.esm.js +701 -481
  21. package/dist/esm-bundle/dooboostore-simple-boot-http-server-ssr.esm.js.map +4 -4
  22. package/dist/types/filters/IntentSchemeFilter.d.ts.map +1 -1
  23. package/dist/types/filters/SSRDomParserFilter.d.ts +57 -0
  24. package/dist/types/filters/SSRDomParserFilter.d.ts.map +1 -0
  25. package/dist/types/initializers/DomParserInitializer.d.ts +11 -0
  26. package/dist/types/initializers/DomParserInitializer.d.ts.map +1 -0
  27. package/dist/types/proxy/SymbolIntentApiServiceProxy.d.ts +2 -0
  28. package/dist/types/proxy/SymbolIntentApiServiceProxy.d.ts.map +1 -1
  29. package/dist/types/proxy/SymbolIntentApiServiceProxyBase.d.ts +0 -8
  30. package/dist/types/proxy/SymbolIntentApiServiceProxyBase.d.ts.map +1 -1
  31. package/dist/umd-bundle/dooboostore-simple-boot-http-server-ssr.umd.js +701 -481
  32. package/dist/umd-bundle/dooboostore-simple-boot-http-server-ssr.umd.js.map +4 -4
  33. package/package.json +10 -9
  34. package/src/filters/IntentSchemeFilter.ts +51 -48
  35. package/src/filters/SSRDomParserFilter.ts +233 -0
  36. package/src/initializers/DomParserInitializer.ts +70 -0
  37. package/src/proxy/SymbolIntentApiServiceProxy.ts +100 -116
  38. package/src/proxy/SymbolIntentApiServiceProxyBase.ts +7 -85
  39. package/tsconfig.json +2 -1
  40. package/src/node_modules/.bin/acorn +0 -17
  41. package/src/node_modules/.bin/browserslist +0 -17
  42. package/src/node_modules/.bin/eslint +0 -17
  43. package/src/node_modules/.bin/jest +0 -17
  44. package/src/node_modules/.bin/ts-jest +0 -17
  45. package/src/node_modules/.bin/ts-node +0 -17
  46. package/src/node_modules/.bin/ts-node-cwd +0 -17
  47. package/src/node_modules/.bin/ts-node-esm +0 -17
  48. package/src/node_modules/.bin/ts-node-script +0 -17
  49. package/src/node_modules/.bin/ts-node-transpile-only +0 -17
  50. package/src/node_modules/.bin/ts-script +0 -17
  51. package/src/node_modules/.bin/tsc +0 -17
  52. package/src/node_modules/.bin/tsserver +0 -17
@@ -218,6 +218,14 @@ var ValidUtils;
218
218
  const isConstructorLike = (fn) => {
219
219
  return typeof fn === "function" && typeof fn.prototype !== "undefined";
220
220
  };
221
+ ValidUtils2.isUrl = (str) => {
222
+ try {
223
+ new URL(str);
224
+ return true;
225
+ } catch (_) {
226
+ return false;
227
+ }
228
+ };
221
229
  ValidUtils2.isFrozen = (obj) => {
222
230
  return Object.isFrozen(obj);
223
231
  };
@@ -654,57 +662,70 @@ var ObjectUtils;
654
662
  if (Path2.isFunctionScript(path2) || Path2.isArrowFunctionScript(path2)) {
655
663
  return path2;
656
664
  }
657
- if (path2.includes(" ? ") && path2.includes(" : ")) {
658
- const parts = path2.split(/(\s+\?\s+|\s+:\s+)/);
659
- const result = parts.map((part, index) => {
660
- if (index === 0) {
661
- const tokens2 = part.match(/[^?.[\]]+|\[[^\]]*\]/g);
662
- if (tokens2 && tokens2.length > 1) {
663
- return tokens2.join("?.");
664
- }
665
+ const nullishCoalescingPlaceholder = "__NULLISH_COALESCING__";
666
+ const hasNullishCoalescing = path2.includes("??");
667
+ let tempPath = path2;
668
+ if (hasNullishCoalescing) {
669
+ tempPath = tempPath.replace(/\?\?/g, nullishCoalescingPlaceholder);
670
+ }
671
+ const ternaryMatch = tempPath.match(/\?\s+[^:]*:/);
672
+ if (ternaryMatch) {
673
+ const questionMarkIndex = tempPath.indexOf("?");
674
+ const colonIndex = tempPath.indexOf(":", questionMarkIndex);
675
+ if (questionMarkIndex !== -1 && colonIndex !== -1) {
676
+ const charAfterQuestion = tempPath.charAt(questionMarkIndex + 1);
677
+ if (charAfterQuestion === " " || charAfterQuestion === " " || charAfterQuestion === "\n") {
678
+ const condition = tempPath.substring(0, questionMarkIndex).trim();
679
+ const trueBranch = tempPath.substring(questionMarkIndex + 1, colonIndex).trim();
680
+ const falseBranch = tempPath.substring(colonIndex + 1).trim();
681
+ const processedCondition = Path2.toOptionalChainPath(condition);
682
+ const processedTrueBranch = Path2.toOptionalChainPath(trueBranch);
683
+ const processedFalseBranch = Path2.toOptionalChainPath(falseBranch);
684
+ const finalResult = `${processedCondition} ? ${processedTrueBranch} : ${processedFalseBranch}`;
685
+ return hasNullishCoalescing ? finalResult.replace(new RegExp(nullishCoalescingPlaceholder, "g"), "??") : finalResult;
665
686
  }
666
- return part;
667
- });
668
- return result.join("");
687
+ }
669
688
  }
670
- if (path2.includes("(")) {
689
+ if (tempPath.includes("(")) {
671
690
  const functionCallMatches = [];
672
- let tempPath = path2;
691
+ let workingPath = tempPath;
673
692
  let counter = 0;
674
693
  const functionCallRegex = /(\w+)\(([^()]*(?:\([^()]*\)[^()]*)*)\)/g;
675
694
  let match;
676
- while ((match = functionCallRegex.exec(path2)) !== null) {
695
+ while ((match = functionCallRegex.exec(tempPath)) !== null) {
677
696
  const fullMatch = match[0];
678
697
  const funcName = match[1];
679
698
  const funcArgs = match[2];
680
699
  const placeholder = `__FUNC_CALL_${counter}__`;
681
- const processedArgs = funcArgs ? Path2.toOptionalChainPath(funcArgs) : "";
700
+ let processedArgs = funcArgs ? Path2.toOptionalChainPath(funcArgs) : "";
701
+ processedArgs = processedArgs.replace(/\?\.\s*$/, "");
682
702
  const processedFuncCall = `${funcName}?.(${processedArgs})`;
683
703
  functionCallMatches.push({
684
704
  original: fullMatch,
685
705
  processed: processedFuncCall,
686
706
  placeholder
687
707
  });
688
- tempPath = tempPath.replace(fullMatch, placeholder);
708
+ workingPath = workingPath.replace(fullMatch, placeholder);
689
709
  counter++;
690
710
  }
691
- const tokens2 = tempPath.match(/[^?.[\]]+|\[[^\]]*\]/g);
711
+ const tokens2 = workingPath.match(/[^?.[\]]+|\[[^\]]*\]/g);
692
712
  let processedPath = "";
693
713
  if (tokens2 && tokens2.length > 1) {
694
714
  processedPath = tokens2.join("?.");
695
715
  } else {
696
- processedPath = tempPath;
716
+ processedPath = workingPath;
697
717
  }
698
718
  for (const funcMatch of functionCallMatches) {
699
719
  processedPath = processedPath.replace(funcMatch.placeholder, funcMatch.processed);
700
720
  }
701
- return processedPath;
721
+ return hasNullishCoalescing ? processedPath.replace(new RegExp(nullishCoalescingPlaceholder, "g"), "??") : processedPath;
702
722
  }
703
- const tokens = path2.match(/[^?.[\]]+|\[[^\]]*\]/g);
723
+ const tokens = tempPath.match(/[^?.[\]]+|\[[^\]]*\]/g);
704
724
  if (!tokens) {
705
- return path2;
725
+ return hasNullishCoalescing ? path2 : path2;
706
726
  }
707
- return tokens.join("?.");
727
+ const result = tokens.join("?.");
728
+ return hasNullishCoalescing ? result.replace(new RegExp(nullishCoalescingPlaceholder, "g"), "??") : result;
708
729
  };
709
730
  Path2.removeOptionalChainOperator = (path2) => {
710
731
  if (!path2) {
@@ -1177,19 +1198,64 @@ var Intent = class {
1177
1198
  const paths = this.fullPath.split("?");
1178
1199
  return paths[1] ?? "";
1179
1200
  }
1201
+ getQueryParamDecodeURI(key) {
1202
+ const p = this.queryParamsDecodeURI;
1203
+ if (key) {
1204
+ return p[key];
1205
+ } else {
1206
+ return p;
1207
+ }
1208
+ }
1209
+ getQueryParamDecodeURIFirst(key) {
1210
+ const param = this.getQueryParamDecodeURI(key);
1211
+ if (Array.isArray(param)) {
1212
+ return param[0];
1213
+ } else {
1214
+ return param;
1215
+ }
1216
+ }
1217
+ getQueryParam(key) {
1218
+ const p = this.queryParams;
1219
+ if (key) {
1220
+ return p[key];
1221
+ } else {
1222
+ return p;
1223
+ }
1224
+ }
1225
+ getQueryParamFirst(key) {
1226
+ const param = this.getQueryParam(key);
1227
+ if (Array.isArray(param)) {
1228
+ return param[0];
1229
+ } else {
1230
+ return param;
1231
+ }
1232
+ }
1180
1233
  get queryParams() {
1181
1234
  const param = {};
1182
1235
  this.query.split("&")?.forEach((it) => {
1183
1236
  const a = it.split("=");
1184
- param[a[0]] = a[1];
1237
+ if (param[a[0]]) {
1238
+ if (Array.isArray(param[a[0]])) {
1239
+ param[a[0]].push(a[1]);
1240
+ } else {
1241
+ param[a[0]] = [param[a[0]], a[1]];
1242
+ }
1243
+ } else {
1244
+ param[a[0]] = a[1];
1245
+ }
1185
1246
  });
1186
1247
  return param;
1187
1248
  }
1188
- get queryParamsAfterDecodeURI() {
1249
+ get queryParamsDecodeURI() {
1189
1250
  const params = this.queryParams;
1190
1251
  for (const key in params) {
1191
1252
  if (params.hasOwnProperty(key)) {
1192
- params[key] = decodeURIComponent(params[key]);
1253
+ const param = params[key];
1254
+ if (Array.isArray(param)) {
1255
+ params[key] = param.map((p) => decodeURIComponent(p));
1256
+ } else {
1257
+ params[key] = decodeURIComponent(param);
1258
+ }
1193
1259
  }
1194
1260
  }
1195
1261
  return params;
@@ -2579,9 +2645,19 @@ var ConvertUtils;
2579
2645
  ConvertUtils22.jsonToMap = (jsonStr) => {
2580
2646
  return new Map(JSON.parse(jsonStr));
2581
2647
  };
2648
+ ConvertUtils22.toUrl = (data) => {
2649
+ try {
2650
+ return new URL(data);
2651
+ } catch (e) {
2652
+ throw new Error(`Invalid URL string: ${data}`);
2653
+ }
2654
+ };
2582
2655
  ConvertUtils22.decodeURIString = (data) => {
2583
2656
  return decodeURIComponent(data);
2584
2657
  };
2658
+ ConvertUtils22.encodeURIString = (data) => {
2659
+ return encodeURIComponent(data);
2660
+ };
2585
2661
  ConvertUtils22.objToStrMap = (obj) => {
2586
2662
  const strMap = /* @__PURE__ */ new Map();
2587
2663
  for (const k of Object.keys(obj)) {
@@ -2949,6 +3025,29 @@ var ConvertUtils;
2949
3025
  ConvertUtils22.stringJsonToKeyPairs = (stringJson) => {
2950
3026
  return Array.from(stringJson.matchAll(/(\w+):\s*([^,}]+)/g)).map((match) => ({ key: match[1], value: match[2] }));
2951
3027
  };
3028
+ ConvertUtils22.stringToBase64 = (str) => {
3029
+ return btoa(str);
3030
+ };
3031
+ ConvertUtils22.uint8ArrayToBase64 = (bytes) => {
3032
+ let binary = "";
3033
+ const len = bytes.byteLength;
3034
+ for (let i = 0; i < len; i++) {
3035
+ binary += String.fromCharCode(bytes[i]);
3036
+ }
3037
+ return btoa(binary);
3038
+ };
3039
+ ConvertUtils22.base64ToString = (base64) => {
3040
+ return atob(base64);
3041
+ };
3042
+ ConvertUtils22.base64ToUint8Array = (base64) => {
3043
+ const binaryString = atob(base64);
3044
+ const len = binaryString.length;
3045
+ const bytes = new Uint8Array(len);
3046
+ for (let i = 0; i < len; i++) {
3047
+ bytes[i] = binaryString.charCodeAt(i);
3048
+ }
3049
+ return bytes;
3050
+ };
2952
3051
  })(ConvertUtils || (ConvertUtils = {}));
2953
3052
 
2954
3053
  // ../simple-boot/dist/esm/lifecycle/OnSimCreate.js
@@ -3073,17 +3172,37 @@ var RouterModule = class {
3073
3172
  return this.routerChains[0];
3074
3173
  }
3075
3174
  get firstRouteChainValue() {
3076
- return this.firstRouteChain.getValue();
3175
+ return this.firstRouteChain?.getValue();
3077
3176
  }
3078
3177
  get lastRouteChain() {
3079
3178
  return this.routerChains[this.routerChains.length - 1];
3080
3179
  }
3081
3180
  get lastRouteChainValue() {
3082
- return this.lastRouteChain.getValue();
3181
+ return this.lastRouteChain?.getValue();
3083
3182
  }
3084
3183
  hasActivateInLastRoute(obj) {
3085
3184
  return this.lastRouteChainValue?.hasActivate(obj) === true;
3086
3185
  }
3186
+ getQueryParamDecodeURI(key) {
3187
+ if (this.intent) {
3188
+ return this.intent.getQueryParamDecodeURI(key);
3189
+ }
3190
+ }
3191
+ getQueryParamDecodeURIFirst(key) {
3192
+ if (this.intent) {
3193
+ return this.intent.getQueryParamDecodeURIFirst(key);
3194
+ }
3195
+ }
3196
+ getQueryParam(key) {
3197
+ if (this.intent) {
3198
+ return this.intent.getQueryParam(key);
3199
+ }
3200
+ }
3201
+ getQueryParamFirst(key) {
3202
+ if (this.intent) {
3203
+ return this.intent.getQueryParamFirst(key);
3204
+ }
3205
+ }
3087
3206
  get queryParams() {
3088
3207
  if (this.intent) {
3089
3208
  return this.intent.queryParams;
@@ -3091,7 +3210,7 @@ var RouterModule = class {
3091
3210
  }
3092
3211
  get queryParamsAfterDecodeURI() {
3093
3212
  if (this.intent) {
3094
- return this.intent.queryParamsAfterDecodeURI;
3213
+ return this.intent.queryParamsDecodeURI;
3095
3214
  }
3096
3215
  }
3097
3216
  };
@@ -3110,7 +3229,7 @@ var RouterAction;
3110
3229
  };
3111
3230
  })(RouterAction || (RouterAction = {}));
3112
3231
 
3113
- // ../core/dist/esm/message/Subscriber..js
3232
+ // ../core/dist/esm/message/Subscriber.js
3114
3233
  var Subscriber = class {
3115
3234
  constructor(destination) {
3116
3235
  this.destination = destination;
@@ -4215,6 +4334,53 @@ var SimstanceManager = class _SimstanceManager {
4215
4334
  }
4216
4335
  };
4217
4336
 
4337
+ // ../simple-boot/dist/esm/intent/IntentSubscribe.js
4338
+ var isIntentSubscribe = (obj) => {
4339
+ return !!obj && typeof obj.intentSubscribe === "function";
4340
+ };
4341
+
4342
+ // ../simple-boot/dist/esm/decorators/cache/CacheDecorator.js
4343
+ var CacheMetadataKey = Symbol("Cache");
4344
+
4345
+ // ../simple-boot/dist/esm/decorators/event/EventListener.js
4346
+ var EventListenerMetadataKey = Symbol("EventListener");
4347
+
4348
+ // ../simple-boot/dist/esm/decorators/validate/Validation.js
4349
+ var ValidMetadataKey = Symbol("ValidMetadataKey");
4350
+ var getValidIndex = (target, propertyKey) => {
4351
+ if (target !== null && void 0 !== target && typeof target === "object") {
4352
+ target = target.constructor;
4353
+ }
4354
+ if (propertyKey) {
4355
+ const parameters = Reflect.getOwnMetadata(ValidMetadataKey, target, propertyKey);
4356
+ return parameters ?? [];
4357
+ } else {
4358
+ return ReflectUtils.getMetadata(ValidMetadataKey, target) ?? [];
4359
+ }
4360
+ };
4361
+ var ValidationMetadataKey = Symbol("ValidationMetadataKey");
4362
+ var getValidators = (target) => {
4363
+ if (target !== null && void 0 !== target && typeof target === "object") {
4364
+ target = target.constructor;
4365
+ }
4366
+ return ReflectUtils.getMetadata(ValidationMetadataKey, target) ?? [];
4367
+ };
4368
+ var execValidationInValid = (obj) => {
4369
+ return execValidation(obj).filter((it) => !it.valid);
4370
+ };
4371
+ var execValidation = (obj) => {
4372
+ const validators = getValidators(obj);
4373
+ const reesults = [];
4374
+ validators.forEach((it) => {
4375
+ reesults.push({
4376
+ name: it.propertyKey,
4377
+ valid: it.validator(it.propertyKey, it),
4378
+ message: ""
4379
+ });
4380
+ });
4381
+ return reesults;
4382
+ };
4383
+
4218
4384
  // ../simple-boot/dist/esm/intent/IntentManager.js
4219
4385
  var __decorate2 = function(decorators, target, key, desc) {
4220
4386
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -4256,7 +4422,7 @@ var IntentManager = class IntentManager2 {
4256
4422
  } else if (typeof it === "string") {
4257
4423
  it = new Intent(it, data);
4258
4424
  }
4259
- let intent = it;
4425
+ const intent = it;
4260
4426
  const r = [];
4261
4427
  if (!routerMatch) {
4262
4428
  if (intent.symbols) {
@@ -4275,7 +4441,7 @@ var IntentManager = class IntentManager2 {
4275
4441
  }
4276
4442
  });
4277
4443
  this.subject.next(it);
4278
- targetInstances.forEach((data2) => {
4444
+ for (let data2 of targetInstances) {
4279
4445
  let orNewSim = data2;
4280
4446
  if (orNewSim) {
4281
4447
  if (intent.paths.length > 0) {
@@ -4287,6 +4453,18 @@ var IntentManager = class IntentManager2 {
4287
4453
  lastProp = i;
4288
4454
  });
4289
4455
  if (orNewSim && typeof orNewSim === "function") {
4456
+ const injects = getInject(callthis, orNewSim.name);
4457
+ if (injects) {
4458
+ for (const inject of injects) {
4459
+ let v = this.simstanceManager.findLastSim(inject.config).getValue();
4460
+ if (typeof inject.config.returnFactory === "function") {
4461
+ v = await inject.config.returnFactory({ instance: callthis, methodName: orNewSim.name, parameter: intent.data }, v);
4462
+ } else if (typeof inject.config.returnFactory === "string") {
4463
+ v = await v[inject.config.returnFactory]({ instance: callthis, methodName: orNewSim.name, parameter: intent.data }, v);
4464
+ }
4465
+ intent.data[inject.index] = v;
4466
+ }
4467
+ }
4290
4468
  if (PublishType.DATA_PARAMETERS === intent.publishType) {
4291
4469
  r.push(orNewSim.call(callthis, intent.data));
4292
4470
  } else if (PublishType.INLINE_DATA_PARAMETERS === intent.publishType) {
@@ -4300,15 +4478,22 @@ var IntentManager = class IntentManager2 {
4300
4478
  }
4301
4479
  } else {
4302
4480
  if (PublishType.DATA_PARAMETERS === intent.publishType) {
4303
- r.push(orNewSim?.intentSubscribe?.(intent.data));
4481
+ if (isIntentSubscribe(orNewSim)) {
4482
+ r.push(orNewSim.intentSubscribe(intent.data));
4483
+ }
4304
4484
  } else if (PublishType.INLINE_DATA_PARAMETERS === intent.publishType) {
4305
- r.push(orNewSim?.intentSubscribe?.(...intent.data));
4485
+ if (isIntentSubscribe(orNewSim)) {
4486
+ r.push(orNewSim.intentSubscribe(...intent.data));
4487
+ }
4306
4488
  } else {
4307
- r.push(orNewSim?.intentSubscribe?.(intent));
4489
+ if (isIntentSubscribe(orNewSim)) {
4490
+ r.push(orNewSim?.intentSubscribe?.(intent));
4491
+ }
4308
4492
  }
4309
4493
  }
4310
4494
  }
4311
- });
4495
+ }
4496
+ ;
4312
4497
  return r;
4313
4498
  }
4314
4499
  };
@@ -4320,6 +4505,7 @@ IntentManager = __decorate2([
4320
4505
  // ../simple-boot-http-server/dist/esm/codes/HttpStatus.js
4321
4506
  var HttpStatus = /* @__PURE__ */ ((HttpStatus2) => {
4322
4507
  HttpStatus2[HttpStatus2["Ok"] = 200] = "Ok";
4508
+ HttpStatus2[HttpStatus2["MultipleChoices"] = 300] = "MultipleChoices";
4323
4509
  HttpStatus2[HttpStatus2["MovedPermanently"] = 301] = "MovedPermanently";
4324
4510
  HttpStatus2[HttpStatus2["Found"] = 302] = "Found";
4325
4511
  HttpStatus2[HttpStatus2["SeeOther"] = 303] = "SeeOther";
@@ -4498,7 +4684,7 @@ var NotFoundError = class extends HttpError {
4498
4684
 
4499
4685
  // ../core/dist/esm/string/StringUtils.js
4500
4686
  var StringUtils;
4501
- (function(StringUtils2) {
4687
+ ((StringUtils2) => {
4502
4688
  StringUtils2.deleteEnter = (data) => {
4503
4689
  return data.replace(/\r?\n/g, "");
4504
4690
  };
@@ -4541,8 +4727,7 @@ var StringUtils;
4541
4727
  return s;
4542
4728
  };
4543
4729
  StringUtils2.unescape = (html) => {
4544
- if (!html)
4545
- return "";
4730
+ if (!html) return "";
4546
4731
  const htmlEntity = {
4547
4732
  quot: '"',
4548
4733
  amp: "&",
@@ -4592,8 +4777,7 @@ var StringUtils;
4592
4777
  return formatString.replace(/\${([^{}]*)}/g, (matched, piece) => String(object[piece] ?? matched));
4593
4778
  };
4594
4779
  StringUtils2.ellipsis = (text, length) => {
4595
- if (text.length > length)
4596
- return `${text.slice(0, length)}...`;
4780
+ if (text.length > length) return `${text.slice(0, length)}...`;
4597
4781
  return text;
4598
4782
  };
4599
4783
  StringUtils2.appendPostposition = (text, { vowel, consonant }) => {
@@ -4886,6 +5070,29 @@ var Promises;
4886
5070
  await Promise.all(executing);
4887
5071
  return results;
4888
5072
  };
5073
+ Promises2.retry = async (factory, config) => {
5074
+ const initialDelay = config.delay?.initialDelay ?? 0;
5075
+ const retryDelay = config.delay?.retryDelay ?? 0;
5076
+ if (initialDelay > 0) {
5077
+ await (0, Promises2.sleep)(initialDelay);
5078
+ }
5079
+ let lastError;
5080
+ for (let attempt = 0; attempt <= config.retry; attempt++) {
5081
+ try {
5082
+ return await factory(attempt, lastError);
5083
+ } catch (error) {
5084
+ lastError = error;
5085
+ if (attempt === config.retry) {
5086
+ break;
5087
+ }
5088
+ config.onRetry?.(error, attempt + 1);
5089
+ if (retryDelay > 0) {
5090
+ await (0, Promises2.sleep)(retryDelay);
5091
+ }
5092
+ }
5093
+ }
5094
+ throw lastError;
5095
+ };
4889
5096
  let Result;
4890
5097
  ((Result2) => {
4891
5098
  async function awaitWrap(promise) {
@@ -5403,11 +5610,11 @@ var _EventManager = class _EventManager2 {
5403
5610
  findAttrElements(fragment, config) {
5404
5611
  const elements = /* @__PURE__ */ new Set();
5405
5612
  const addAttributes = config?.applyEvents?.map((it) => it.attrName) ?? [];
5406
- addAttributes.concat([..._EventManager2.attrNames]).forEach((attrName) => {
5407
- fragment?.querySelectorAll(`[${attrName}]`).forEach((it) => {
5408
- elements.add(it);
5409
- });
5410
- });
5613
+ const attrs = addAttributes.concat([..._EventManager2.attrNames]).filter(Boolean);
5614
+ if (attrs.length) {
5615
+ const selector = attrs.map((a) => `[${a}]`).join(",");
5616
+ fragment?.querySelectorAll(selector).forEach((it) => elements.add(it));
5617
+ }
5411
5618
  return elements;
5412
5619
  }
5413
5620
  applyEvent(obj, childNodes, config) {
@@ -5419,7 +5626,7 @@ var _EventManager = class _EventManager2 {
5419
5626
  this.procAttr(childNodes, _EventManager2.valueAttrName, (it, attribute) => {
5420
5627
  const script = attribute;
5421
5628
  if (script) {
5422
- const data = ScriptUtils.evaluateReturn(script, obj);
5629
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5423
5630
  if (it.value !== data) {
5424
5631
  it.value = data;
5425
5632
  }
@@ -5428,7 +5635,7 @@ var _EventManager = class _EventManager2 {
5428
5635
  this.procAttr(childNodes, _EventManager2.checkedAttrName, (it, attribute) => {
5429
5636
  const script = attribute;
5430
5637
  if (script) {
5431
- const data = ScriptUtils.evaluateReturn(script, obj);
5638
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5432
5639
  if (it.checked !== data) {
5433
5640
  it.checked = data;
5434
5641
  }
@@ -5437,7 +5644,7 @@ var _EventManager = class _EventManager2 {
5437
5644
  this.procAttr(childNodes, _EventManager2.selectedAttrName, (it, attribute) => {
5438
5645
  const script = attribute;
5439
5646
  if (script) {
5440
- const data = ScriptUtils.evaluateReturn(script, obj);
5647
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5441
5648
  if (it.selected !== data) {
5442
5649
  it.selected = data;
5443
5650
  }
@@ -5446,7 +5653,7 @@ var _EventManager = class _EventManager2 {
5446
5653
  this.procAttr(childNodes, _EventManager2.readonlyAttrName, (it, attribute) => {
5447
5654
  const script = attribute;
5448
5655
  if (script) {
5449
- const data = ScriptUtils.evaluateReturn(script, obj);
5656
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5450
5657
  if (it.readOnly !== data) {
5451
5658
  it.readOnly = data;
5452
5659
  }
@@ -5455,7 +5662,7 @@ var _EventManager = class _EventManager2 {
5455
5662
  this.procAttr(childNodes, _EventManager2.disabledAttrName, (it, attribute) => {
5456
5663
  const script = attribute;
5457
5664
  if (script) {
5458
- const data = ScriptUtils.evaluateReturn(script, obj);
5665
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5459
5666
  if (it.disabled !== data) {
5460
5667
  it.disabled = data;
5461
5668
  }
@@ -5464,7 +5671,7 @@ var _EventManager = class _EventManager2 {
5464
5671
  this.procAttr(childNodes, _EventManager2.hiddenAttrName, (it, attribute) => {
5465
5672
  const script = attribute;
5466
5673
  if (script) {
5467
- const data = ScriptUtils.evaluateReturn(script, obj);
5674
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5468
5675
  if (it.hidden !== data) {
5469
5676
  it.hidden = data;
5470
5677
  }
@@ -5473,7 +5680,7 @@ var _EventManager = class _EventManager2 {
5473
5680
  this.procAttr(childNodes, _EventManager2.requiredAttrName, (it, attribute) => {
5474
5681
  const script = attribute;
5475
5682
  if (script) {
5476
- const data = ScriptUtils.evaluateReturn(script, obj);
5683
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5477
5684
  if (it.required !== data) {
5478
5685
  it.required = data;
5479
5686
  }
@@ -5482,7 +5689,7 @@ var _EventManager = class _EventManager2 {
5482
5689
  this.procAttr(childNodes, _EventManager2.openAttrName, (it, attribute) => {
5483
5690
  const script = attribute;
5484
5691
  if (script) {
5485
- const data = ScriptUtils.evaluateReturn(script, obj);
5692
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5486
5693
  if (it.open !== data) {
5487
5694
  it.open = data;
5488
5695
  }
@@ -5493,17 +5700,27 @@ var _EventManager = class _EventManager2 {
5493
5700
  map.forEach((v, k) => {
5494
5701
  const variablePaths = v.variablePaths;
5495
5702
  let targetScript = v.originalAttrValue;
5496
- variablePaths.forEach((it2) => {
5497
- let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
5498
- targetScript = targetScript.replaceAll(it2.origin, `\${${r}}`);
5499
- });
5500
- const data = ObjectUtils.Script.evaluate(`const $element = this.element; return ${"`" + targetScript + "`"} `, Object.assign(obj, {
5703
+ let script;
5704
+ if (v.isStringTemplate) {
5705
+ variablePaths.forEach((it2) => {
5706
+ let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
5707
+ targetScript = targetScript.replaceAll(it2.origin, `\${${r}}`);
5708
+ });
5709
+ script = "`" + targetScript + "`";
5710
+ } else {
5711
+ variablePaths.forEach((it2) => {
5712
+ let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
5713
+ targetScript = targetScript.replaceAll(it2.origin, `${r}`);
5714
+ });
5715
+ script = targetScript;
5716
+ }
5717
+ const data = ObjectUtils.Script.evaluate(`const $element = this.element; return ${script}`, Object.assign(obj, {
5501
5718
  __render: Object.freeze({
5502
5719
  element: it,
5503
5720
  attribute: ElementUtils.getAttributeToObject(it)
5504
5721
  })
5505
5722
  }));
5506
- if (data === null) {
5723
+ if (data === null || data === void 0) {
5507
5724
  it.removeAttribute(k);
5508
5725
  } else {
5509
5726
  it.setAttribute(k, data);
@@ -5522,19 +5739,19 @@ var _EventManager = class _EventManager2 {
5522
5739
  const mapScript = it.getAttribute(`${linkInfo.name}:map`);
5523
5740
  let bindObj = obj;
5524
5741
  if (ownerVariablePathName) {
5525
- bindObj = ScriptUtils.evaluateReturn(ownerVariablePathName, obj);
5742
+ bindObj = ObjectUtils.Script.evaluateReturn(ownerVariablePathName, obj);
5526
5743
  }
5527
5744
  const getValue = this.getValue(obj, varName, bindObj);
5528
5745
  if (typeof getValue === "function" && getValue) {
5529
5746
  let setValue = it[linkInfo.property];
5530
5747
  if (mapScript) {
5531
- setValue = ScriptUtils.evaluate(`${this.getBindScript(config)} return ${mapScript}`, Object.assign(bindObj, { __render: Object.freeze({ element: it, target: bindObj, range: Range.range, value: setValue, scripts: _EventManager2.setBindProperty(config?.scripts, obj), ...config?.eventVariables }) }));
5748
+ setValue = ObjectUtils.Script.evaluate(`${this.getBindScript(config)} return ${mapScript}`, Object.assign(bindObj, { __render: Object.freeze({ element: it, target: bindObj, range: Range.range, value: setValue, scripts: _EventManager2.setBindProperty(config?.scripts, obj), ...config?.eventVariables }) }));
5532
5749
  }
5533
5750
  getValue(setValue);
5534
5751
  } else if (getValue) {
5535
5752
  let setValue = getValue;
5536
5753
  if (mapScript) {
5537
- setValue = ScriptUtils.evaluate(`${this.getBindScript(config)} return ${mapScript}`, Object.assign(bindObj, { __render: Object.freeze({ element: it, target: bindObj, range: Range.range, value: setValue, scripts: _EventManager2.setBindProperty(config?.scripts, obj), ...config?.eventVariables }) }));
5754
+ setValue = ObjectUtils.Script.evaluate(`${this.getBindScript(config)} return ${mapScript}`, Object.assign(bindObj, { __render: Object.freeze({ element: it, target: bindObj, range: Range.range, value: setValue, scripts: _EventManager2.setBindProperty(config?.scripts, obj), ...config?.eventVariables }) }));
5538
5755
  }
5539
5756
  if (setValue === null) {
5540
5757
  it.removeAttribute(linkInfo.property);
@@ -5557,10 +5774,10 @@ var _EventManager = class _EventManager2 {
5557
5774
  const filterScript = element.getAttribute(`${attr}:filter`);
5558
5775
  let filter2 = true;
5559
5776
  if (filterScript) {
5560
- filter2 = ScriptUtils.evaluate(`${this.getBindScript(config)} return ${filterScript}`, context) ?? false;
5777
+ filter2 = ObjectUtils.Script.evaluate(`${this.getBindScript(config)} return ${filterScript}`, context) ?? false;
5561
5778
  }
5562
5779
  if (filter2) {
5563
- ScriptUtils.evaluate(`${this.getBindScript(config)} ${script}`, context);
5780
+ ObjectUtils.Script.evaluate(`${this.getBindScript(config)} ${script}`, context);
5564
5781
  }
5565
5782
  };
5566
5783
  element.addEventListener(eventName, handler);
@@ -5572,7 +5789,7 @@ var _EventManager = class _EventManager2 {
5572
5789
  script = "return " + script;
5573
5790
  }
5574
5791
  if (script) {
5575
- ScriptUtils.evaluate(`${this.getBindScript(config)}; ${script} `, Object.assign(obj, {
5792
+ ObjectUtils.Script.evaluate(`${this.getBindScript(config)}; ${script} `, Object.assign(obj, {
5576
5793
  __render: Object.freeze({
5577
5794
  element: it,
5578
5795
  attribute: ElementUtils.getAttributeToObject(it),
@@ -5598,7 +5815,7 @@ var _EventManager = class _EventManager2 {
5598
5815
  script = "return " + script;
5599
5816
  }
5600
5817
  if (script) {
5601
- ScriptUtils.evaluate(`${this.getBindScript(config)}; ${script} `, Object.assign(obj, {
5818
+ ObjectUtils.Script.evaluate(`${this.getBindScript(config)}; ${script} `, Object.assign(obj, {
5602
5819
  __render: Object.freeze({
5603
5820
  element: it,
5604
5821
  attribute: ElementUtils.getAttributeToObject(it),
@@ -5615,21 +5832,29 @@ var _EventManager = class _EventManager2 {
5615
5832
  script = "return " + script;
5616
5833
  }
5617
5834
  if (_EventManager2.isUsingThisVar(script, varName) || varName === void 0) {
5618
- const data = ScriptUtils.evaluate(`const $element = this.__render.element; ${script} `, Object.assign(obj, {
5835
+ const data = ObjectUtils.Script.evaluate(`const $element = this.__render.element; ${script} `, Object.assign(obj, {
5619
5836
  __render: Object.freeze({
5620
5837
  element: it,
5621
5838
  attribute: ElementUtils.getAttributeToObject(it)
5622
5839
  })
5623
5840
  }));
5624
5841
  if (typeof data === "string") {
5625
- it.setAttribute("style", data);
5842
+ data.split(";").forEach((sit) => {
5843
+ const [key, value] = sit.split(":").map((s) => s.trim());
5844
+ if (key && value) {
5845
+ it.style[key] = value;
5846
+ }
5847
+ });
5626
5848
  } else if (Array.isArray(data)) {
5627
- it.setAttribute("style", data.join(";"));
5849
+ data.forEach((sit) => {
5850
+ const [key, value] = sit.split(":").map((s) => s.trim());
5851
+ if (key && value) {
5852
+ it.style[key] = value;
5853
+ }
5854
+ });
5628
5855
  } else {
5629
5856
  for (const [key, value] of Object.entries(data)) {
5630
- if (it instanceof HTMLElement) {
5631
- it.style[key] = String(value);
5632
- }
5857
+ it.style[key] = value === null ? null : String(value);
5633
5858
  }
5634
5859
  }
5635
5860
  }
@@ -5640,29 +5865,77 @@ var _EventManager = class _EventManager2 {
5640
5865
  script = "return " + script;
5641
5866
  }
5642
5867
  if (_EventManager2.isUsingThisVar(script, varName) || varName === void 0) {
5643
- const data = ScriptUtils.evaluate(`const $element = this.element; ${script} `, Object.assign(obj, {
5868
+ const data = ObjectUtils.Script.evaluate(`const $element = this.element; ${script} `, Object.assign(obj, {
5644
5869
  __render: Object.freeze({
5645
5870
  element: it,
5646
5871
  attribute: ElementUtils.getAttributeToObject(it)
5647
5872
  })
5648
5873
  }));
5649
5874
  if (typeof data === "string") {
5650
- it.setAttribute("class", data);
5875
+ data.split(" ").forEach((cit) => it.classList.add(cit.trim()));
5651
5876
  } else if (Array.isArray(data)) {
5652
- it.setAttribute("class", data.join(" "));
5877
+ data.forEach((cit) => it.classList.add(cit.trim()));
5653
5878
  } else {
5654
5879
  for (const [key, value] of Object.entries(data)) {
5655
5880
  if (it instanceof HTMLElement) {
5656
5881
  if (value) {
5657
- it.classList.add(key);
5882
+ it.classList.add(key.trim());
5658
5883
  } else {
5659
- it.classList.remove(key);
5884
+ it.classList.remove(key.trim());
5660
5885
  }
5661
5886
  }
5662
5887
  }
5663
5888
  }
5664
5889
  }
5665
5890
  });
5891
+ this.procAttr(elements, _EventManager2.valueAttrName, (it, attribute) => {
5892
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5893
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5894
+ if (it.value !== data) it.value = data;
5895
+ }
5896
+ });
5897
+ this.procAttr(elements, _EventManager2.checkedAttrName, (it, attribute) => {
5898
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5899
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5900
+ if (it.checked !== data) it.checked = data;
5901
+ }
5902
+ });
5903
+ this.procAttr(elements, _EventManager2.selectedAttrName, (it, attribute) => {
5904
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5905
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5906
+ if (it.selected !== data) it.selected = data;
5907
+ }
5908
+ });
5909
+ this.procAttr(elements, _EventManager2.readonlyAttrName, (it, attribute) => {
5910
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5911
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5912
+ if (it.readOnly !== data) it.readOnly = data;
5913
+ }
5914
+ });
5915
+ this.procAttr(elements, _EventManager2.disabledAttrName, (it, attribute) => {
5916
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5917
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5918
+ if (it.disabled !== data) it.disabled = data;
5919
+ }
5920
+ });
5921
+ this.procAttr(elements, _EventManager2.hiddenAttrName, (it, attribute) => {
5922
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5923
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5924
+ if (it.hidden !== data) it.hidden = data;
5925
+ }
5926
+ });
5927
+ this.procAttr(elements, _EventManager2.requiredAttrName, (it, attribute) => {
5928
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5929
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5930
+ if (it.required !== data) it.required = data;
5931
+ }
5932
+ });
5933
+ this.procAttr(elements, _EventManager2.openAttrName, (it, attribute) => {
5934
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5935
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5936
+ if (it.open !== data) it.open = data;
5937
+ }
5938
+ });
5666
5939
  }
5667
5940
  procAttr(elements = /* @__PURE__ */ new Set(), attrName, callBack) {
5668
5941
  const sets = /* @__PURE__ */ new Set();
@@ -5878,7 +6151,7 @@ var Dr = class extends OperatorExecuterAttrRequire {
5878
6151
  const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
5879
6152
  const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
5880
6153
  const newTemp = this.source.config.window.document.createElement("temp");
5881
- ScriptUtils.evaluate(`
6154
+ ObjectUtils.Script.evaluate(`
5882
6155
  ${this.render.bindScript}
5883
6156
  const n = $element.cloneNode(true);
5884
6157
  var destIt = ${this.elementSource.attrs.drItOption};
@@ -6036,7 +6309,7 @@ var isOnDrThisBind = (obj) => {
6036
6309
  var DrThis = class extends OperatorExecuterAttrRequire {
6037
6310
  async executeAttrRequire(attr) {
6038
6311
  const optionIf = this.elementSource.attrs.drDetectIfOption ?? this.elementSource.attrs.drIfOption;
6039
- const ok = ScriptUtils.evaluate(`
6312
+ const ok = ObjectUtils.Script.evaluate(`
6040
6313
  ${this.render.bindScript}
6041
6314
  try {
6042
6315
  const ok = ${this.elementSource.attrs.drThis};
@@ -6372,9 +6645,9 @@ var DrForm = class extends OperatorExecuterAttrRequire {
6372
6645
  }
6373
6646
  async executeAttrRequire(attr) {
6374
6647
  RawSet.drFormOtherMoveAttr(this.elementSource.element, "name", "temp-name", this.source.config);
6375
- const data = ScriptUtils.evaluateReturn(`${attr}`, this.source.obj);
6648
+ const data = ObjectUtils.Script.evaluateReturn(`${attr}`, this.source.obj);
6376
6649
  const childs = Array.from(this.elementSource.element.querySelectorAll("[name]"));
6377
- const fromName = ScriptUtils.evaluateReturn(this.elementSource.element.getAttribute(`${RawSet.DR_FORM_NAME}:name`) ?? "", this.source.obj);
6650
+ const fromName = ObjectUtils.Script.evaluateReturn(this.elementSource.element.getAttribute(`${RawSet.DR_FORM_NAME}:name`) ?? "", this.source.obj);
6378
6651
  const thisName = fromName ?? this.elementSource.element.getAttribute("name");
6379
6652
  if (childs.length <= 0 && thisName) {
6380
6653
  childs.push(this.elementSource.element);
@@ -6387,10 +6660,10 @@ var DrForm = class extends OperatorExecuterAttrRequire {
6387
6660
  const eventName = it.getAttribute(`${RawSet.DR_FORM_NAME}:event`) ?? "change";
6388
6661
  const validatorName = it.getAttribute(`${RawSet.DR_FORM_NAME}:validator`);
6389
6662
  const attrEventName = EventManager.attrPrefix + "event-" + eventName;
6390
- let varpath = ScriptUtils.evaluateReturn(this.elementSource.element.getAttribute(`${RawSet.DR_FORM_NAME}:name`) ?? "", this.source.obj) ?? it.getAttribute("name");
6663
+ let varpath = ObjectUtils.Script.evaluateReturn(this.elementSource.element.getAttribute(`${RawSet.DR_FORM_NAME}:name`) ?? "", this.source.obj) ?? it.getAttribute("name");
6391
6664
  if (varpath != null) {
6392
6665
  if (validatorName) {
6393
- ScriptUtils.evaluate(
6666
+ ObjectUtils.Script.evaluate(
6394
6667
  `
6395
6668
  ${this.render.bindScript}
6396
6669
  const validator = typeof ${validatorName} ==='function' ? new ${validatorName}() : ${validatorName};
@@ -6408,7 +6681,7 @@ var DrForm = class extends OperatorExecuterAttrRequire {
6408
6681
  );
6409
6682
  }
6410
6683
  varpath = `${attr}['${varpath}']`;
6411
- const data2 = ScriptUtils.evaluateReturn(`${varpath}`, this.source.obj);
6684
+ const data2 = ObjectUtils.Script.evaluateReturn(`${varpath}`, this.source.obj);
6412
6685
  if (data2 instanceof ValidatorArray) {
6413
6686
  it.setAttribute(attrEventName, `${varpath}.setArrayValue($target, $target.value, $event); ${it.getAttribute(attrEventName) ?? ""};`);
6414
6687
  data2.addValidator(it.value, it);
@@ -6469,7 +6742,7 @@ var DrInnerHTML = class extends OperatorExecuterAttrRequire {
6469
6742
  }
6470
6743
  async executeAttrRequire(attr) {
6471
6744
  const newTemp = this.source.config.window.document.createElement("temp");
6472
- ScriptUtils.evaluate(`
6745
+ ObjectUtils.Script.evaluate(`
6473
6746
  ${this.render.bindScript}
6474
6747
  const n = $element.cloneNode(true);
6475
6748
  ${this.elementSource.attrs.drBeforeOption ?? ""}
@@ -6508,7 +6781,7 @@ var DrFor = class extends OperatorExecuterAttrRequire {
6508
6781
  const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
6509
6782
  const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
6510
6783
  const newTemp = this.source.config.window.document.createElement("temp");
6511
- ScriptUtils.evaluate(`
6784
+ ObjectUtils.Script.evaluate(`
6512
6785
  ${this.render.bindScript}
6513
6786
  ${this.elementSource.attrs.drBeforeOption ?? ""}
6514
6787
  for(${attr}) {
@@ -6557,6 +6830,10 @@ var DrForOf = class extends OperatorExecuterAttrRequire {
6557
6830
  const variableName = this.elementSource.element.getAttribute(RawSet.DR_VARIABLE_NAME_OPTIONNAME);
6558
6831
  const itemVariableName = this.elementSource.element.getAttribute(RawSet.DR_ITEM_VARIABLE_NAME_OPTIONNAME);
6559
6832
  const itemIndexVariableName = this.elementSource.element.getAttribute(RawSet.DR_ITEM_INDEX_VARIABLE_NAME_OPTIONNAME);
6833
+ const hasVariableName = this.elementSource.element.hasAttribute(RawSet.DR_VARIABLE_NAME_OPTIONNAME);
6834
+ const hasItemVariableName = this.elementSource.element.hasAttribute(RawSet.DR_ITEM_VARIABLE_NAME_OPTIONNAME);
6835
+ const hasItemIndexVariableName = this.elementSource.element.hasAttribute(RawSet.DR_ITEM_INDEX_VARIABLE_NAME_OPTIONNAME);
6836
+ const t0 = performance.now();
6560
6837
  ObjectUtils.Script.evaluate(`
6561
6838
  ${this.render.bindScript}
6562
6839
  ${this.elementSource.attrs.drBeforeOption ?? ""}
@@ -6564,6 +6841,7 @@ var DrForOf = class extends OperatorExecuterAttrRequire {
6564
6841
  const forOf = ${ObjectUtils.Path.toOptionalChainPath(attr)};
6565
6842
  const forOfStr = \`${attr}\`.trim();
6566
6843
  // console.log('forOf---',forOf);
6844
+ // debugger;
6567
6845
  if (forOf) {
6568
6846
  for(const it of forOf) {
6569
6847
  i++;
@@ -6582,16 +6860,39 @@ var DrForOf = class extends OperatorExecuterAttrRequire {
6582
6860
  const n = this.__render.element.cloneNode(true);
6583
6861
  Object.entries(this.__render.drAttr).filter(([k,v]) => k !== 'drForOf' && k !== 'drNextOption' && v).forEach(([k, v]) => n.setAttribute(this.__render.drAttrsOriginName[k], v));
6584
6862
  n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replace(/\\#it\\#/g, destIt).replace(/\\#nearForOfIt\\#/g, destIt).replace(/\\#it\\#/g, destIt).replace(/\\#nearForOfIndex\\#/g, i)))
6585
- if ('${variableName}') {
6863
+ if (${hasVariableName} && '${variableName}') {
6586
6864
  n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replaceAll('#${variableName}#', forOfStr)));
6587
6865
  }
6588
- if ('${itemVariableName}') {
6866
+ if (${hasItemVariableName} && '${itemVariableName}') {
6589
6867
  n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replaceAll('#${itemVariableName}#', destIt)));
6590
6868
  }
6591
- if ('${itemIndexVariableName}') {
6869
+ if (${hasItemIndexVariableName} && '${itemIndexVariableName}') {
6592
6870
  n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replaceAll('#${itemIndexVariableName}#', i)));
6593
6871
  }
6594
6872
 
6873
+ const hasDrOptionAttr = n.hasAttribute('${RawSet.DR_ATTR_OPTIONNAME}');
6874
+ if (hasDrOptionAttr) {
6875
+ const drOptionAttr = n.getAttribute('${RawSet.DR_ATTR_OPTIONNAME}');
6876
+ const drOptionAttrResult = $scriptUtils.evaluateReturn(drOptionAttr, this);
6877
+ Array.from(Object.entries(drOptionAttrResult??{})).forEach(([k,v])=>{
6878
+ if (v === null) {
6879
+ n.removeAttribute(k);
6880
+ } else {
6881
+ n.setAttribute(k,v);
6882
+ }
6883
+ })
6884
+
6885
+ }
6886
+ const hasDrOptionIf = n.hasAttribute('${RawSet.DR_IF_OPTIONNAME}');
6887
+ if (hasDrOptionIf) {
6888
+ const drOptionIf = n.getAttribute('${RawSet.DR_IF_OPTIONNAME}');
6889
+ const e = $scriptUtils.evaluateReturn(drOptionIf, this);
6890
+ if(!e) {
6891
+ continue;
6892
+ }
6893
+
6894
+ }
6895
+
6595
6896
  const drOptionAttr = n.getAttribute('${RawSet.DR_DETECT_ATTR_OPTIONNAME}');
6596
6897
  if (drOptionAttr) {
6597
6898
  const drOptionAttrResult = $scriptUtils.evaluateReturn(drOptionAttr, this);
@@ -6614,13 +6915,13 @@ var DrForOf = class extends OperatorExecuterAttrRequire {
6614
6915
  }
6615
6916
 
6616
6917
  n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt).replace(/\\#index\\#/g, i);
6617
- if ('${variableName}') {
6918
+ if (${hasVariableName} && '${variableName}') {
6618
6919
  n.innerHTML = n.innerHTML.replaceAll('#${variableName}#', forOfStr);
6619
6920
  }
6620
- if ('${itemVariableName}') {
6921
+ if (${hasItemVariableName} && '${itemVariableName}') {
6621
6922
  n.innerHTML = n.innerHTML.replaceAll('#${itemVariableName}#', destIt);
6622
6923
  }
6623
- if ('${itemIndexVariableName}') {
6924
+ if (${hasItemIndexVariableName} && '${itemIndexVariableName}') {
6624
6925
  n.innerHTML = n.innerHTML.replaceAll('#${itemIndexVariableName}#', i);
6625
6926
  }
6626
6927
 
@@ -6674,7 +6975,7 @@ var DrAppender = class extends OperatorExecuterAttrRequire {
6674
6975
  const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
6675
6976
  const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
6676
6977
  const newTemp = this.source.config.window.document.createElement("temp");
6677
- ScriptUtils.evaluate(`
6978
+ ObjectUtils.Script.evaluate(`
6678
6979
  try{
6679
6980
  ${this.render.bindScript}
6680
6981
  ${this.elementSource.attrs.drBeforeOption ?? ""}
@@ -6732,7 +7033,7 @@ var DrRepeat = class extends OperatorExecuterAttrRequire {
6732
7033
  const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
6733
7034
  const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
6734
7035
  const newTemp = this.source.config.window.document.createElement("temp");
6735
- ScriptUtils.evaluate(`
7036
+ ObjectUtils.Script.evaluate(`
6736
7037
  ${this.render.bindScript}
6737
7038
  ${this.elementSource.attrs.drBeforeOption ?? ""}
6738
7039
  var i = 0;
@@ -6787,9 +7088,18 @@ var DrTargetElement = class extends OperatorExecuter {
6787
7088
  super(rawSet, render, returnContainer, elementSource, source, afterCallBack, false);
6788
7089
  }
6789
7090
  async execute() {
6790
- const targetElement = this.source.config?.targetElements?.find(
6791
- (it) => it.name.toLowerCase() === this.elementSource.element.tagName.toLowerCase()
6792
- );
7091
+ let targetElement = void 0;
7092
+ let isTargetElementElement = this.elementSource.element.tagName.toLowerCase() === RawSet.DR_TARGET_ELEMENT_ELEMENTNAME.toLowerCase();
7093
+ if (isTargetElementElement) {
7094
+ const targetElementTagName = this.elementSource.element.getAttribute(`${RawSet.DR_TARGET_ELEMENT_ELEMENTNAME}:is`)?.toLowerCase();
7095
+ targetElement = this.source.config?.targetElements?.find(
7096
+ (it) => it.name.toLowerCase() === targetElementTagName
7097
+ );
7098
+ } else {
7099
+ targetElement = this.source.config?.targetElements?.find(
7100
+ (it) => it.name.toLowerCase() === this.elementSource.element.tagName.toLowerCase()
7101
+ );
7102
+ }
6793
7103
  if (targetElement) {
6794
7104
  if (this.rawSet.point.start instanceof this.source.config.window.HTMLMetaElement && this.rawSet.point.end instanceof this.source.config.window.HTMLMetaElement) {
6795
7105
  this.rawSet.point.start.setAttribute("this-path", `this.__domrender_components.${this.rawSet.uuid}`);
@@ -6809,7 +7119,7 @@ var DrTargetElement = class extends OperatorExecuter {
6809
7119
  this.rawSet.detect = {
6810
7120
  action: () => {
6811
7121
  const script = `var $component = this.__render.component; var $element = this.__render.element; var $innerHTML = this.__render.innerHTML; var $attribute = this.__render.attribute; ${detectAction} `;
6812
- ScriptUtils.evaluate(
7122
+ ObjectUtils.Script.evaluate(
6813
7123
  script,
6814
7124
  Object.assign(this.source.obj, {
6815
7125
  __render: this.rawSet.dataSet.render
@@ -6890,7 +7200,7 @@ var DrStripElement = class extends OperatorExecuterAttrRequire {
6890
7200
  }
6891
7201
  async executeAttrRequire(attr) {
6892
7202
  const newTemp = this.source.config.window.document.createElement("temp");
6893
- ScriptUtils.evaluate(`
7203
+ ObjectUtils.Script.evaluate(`
6894
7204
  ${this.render.bindScript}
6895
7205
  ${this.elementSource.attrs.drBeforeOption ?? ""}
6896
7206
  const n = $element.cloneNode(true);
@@ -6952,7 +7262,7 @@ var DrThisProperty = class extends OperatorExecuterAttrRequire {
6952
7262
  const newTemp = this.source.config.window.document.createElement("temp");
6953
7263
  const dictioanry = ScriptUtils.evaluateReturn(attr, this.source.obj);
6954
7264
  const dictionaryKey = this.elementSource.attrs.drKeyOption ?? "";
6955
- ScriptUtils.evaluate(`
7265
+ ObjectUtils.Script.evaluate(`
6956
7266
  ${this.render.bindScript}
6957
7267
  ${this.elementSource.attrs.drBeforeOption ?? ""}
6958
7268
  var i = 0;
@@ -7460,7 +7770,7 @@ var DrTargetElementIsElement = class extends OperatorExecuter {
7460
7770
  this.rawSet.detect = {
7461
7771
  action: () => {
7462
7772
  const script = `var $component = this.__render.component; var $element = this.__render.element; var $innerHTML = this.__render.innerHTML; var $attribute = this.__render.attribute; ${detectAction} `;
7463
- ScriptUtils.evaluate(script, Object.assign(this.source.obj, {
7773
+ ObjectUtils.Script.evaluate(script, Object.assign(this.source.obj, {
7464
7774
  __render: this.rawSet.dataSet.render
7465
7775
  }));
7466
7776
  }
@@ -7518,7 +7828,7 @@ var NodeUtils;
7518
7828
  NodeUtils2.replaceNode = (targetNode, newNode) => {
7519
7829
  return targetNode.parentNode?.replaceChild(newNode, targetNode);
7520
7830
  };
7521
- NodeUtils2.addNode = (targetNode, newNode) => {
7831
+ NodeUtils2.insertAfter = (targetNode, newNode) => {
7522
7832
  return targetNode.parentNode?.insertBefore(newNode, targetNode.nextSibling);
7523
7833
  };
7524
7834
  NodeUtils2.cloneNode = (element, deep) => {
@@ -7632,10 +7942,49 @@ var _RawSet = class _RawSet2 {
7632
7942
  });
7633
7943
  return usingTriggerVariables;
7634
7944
  }
7635
- // 중요 render 처리 부분
7636
- // public async render(obj: any, config: DomRenderConfig): Promise<RawSet[]> {
7637
- // }
7638
7945
  async render(obj, config) {
7946
+ if (this.dataSet.fragment.childNodes.length === 1 && this.dataSet.fragment.childNodes[0].nodeType === Node.TEXT_NODE) {
7947
+ const textContent = this.dataSet.fragment.childNodes[0].textContent;
7948
+ if (textContent) {
7949
+ const runText = _RawSet2.expressionGroups(textContent)[0][1];
7950
+ const __render = {
7951
+ rawSet: this,
7952
+ scripts: EventManager.setBindProperty(config?.scripts, obj),
7953
+ router: config?.router,
7954
+ range: Range.range,
7955
+ element: this.dataSet.fragment.childNodes[0],
7956
+ attribute: {},
7957
+ rootObject: obj,
7958
+ scriptUtils: ObjectUtils.Script,
7959
+ nearThis: this.findNearThis(obj),
7960
+ parentThis: this.findParentThis(obj),
7961
+ bindScript: ` /** render **/
7962
+ const ${EventManager.SCRIPTS_VARNAME} = this.__render.scripts;
7963
+ const ${EventManager.RAWSET_VARNAME} = this.__render.rawSet;
7964
+ const ${EventManager.ELEMENT_VARNAME} = this.__render.element;
7965
+ const ${EventManager.ATTRIBUTE_VARNAME} = this.__render.attribute;
7966
+ const ${EventManager.RANGE_VARNAME} = this.__render.range;
7967
+ const ${EventManager.ROUTER_VARNAME} = this.__render.router;
7968
+ const ${EventManager.NEAR_THIS_VARNAME} = this.__render.nearThis;
7969
+ const ${EventManager.PARENT_THIS_VARNAME} = this.__render.parentThis;
7970
+ const ${EventManager.SCRIPT_UTILS_VARNAME} = this.__render.scriptUtils;
7971
+ const ${EventManager.ROOT_OBJECT_VARNAME} = this.__render.rootObject;
7972
+ `
7973
+ };
7974
+ try {
7975
+ const newValue = ObjectUtils.Script.evaluateReturn({
7976
+ bodyScript: __render.bindScript,
7977
+ returnScript: runText
7978
+ }, Object.assign(obj, { __render }));
7979
+ const newValueStr = String(newValue);
7980
+ if (this.lastRenderedValue === newValueStr) {
7981
+ return { raws: [], executedOperators: [] };
7982
+ }
7983
+ this.lastRenderedValue = newValueStr;
7984
+ } catch (e) {
7985
+ }
7986
+ }
7987
+ }
7639
7988
  const genNode = config.window.document.importNode(this.dataSet.fragment, true);
7640
7989
  const raws = [];
7641
7990
  const onAttrInitCallBacks = [];
@@ -7678,18 +8027,15 @@ var _RawSet = class _RawSet2 {
7678
8027
  const runText = _RawSet2.expressionGroups(textContent)[0][1];
7679
8028
  let newNode;
7680
8029
  if (textContent?.startsWith("#")) {
7681
- const r = ObjectUtils.Script.evaluate(
7682
- `${__render.bindScript} return ${runText}`,
8030
+ const r = ObjectUtils.Script.evaluateReturn(
8031
+ { bodyScript: __render.bindScript, returnScript: runText },
7683
8032
  Object.assign(obj, { __render })
7684
8033
  );
7685
8034
  const template = config.window.document.createElement("template");
7686
8035
  template.innerHTML = r;
7687
8036
  newNode = template.content;
7688
8037
  } else {
7689
- const r = ObjectUtils.Script.evaluate(
7690
- `${__render.bindScript} return ${runText}`,
7691
- Object.assign(obj, { __render })
7692
- );
8038
+ const r = ObjectUtils.Script.evaluateReturn({ bodyScript: __render.bindScript, returnScript: runText }, Object.assign(obj, { __render }));
7693
8039
  newNode = config.window.document.createTextNode(r);
7694
8040
  }
7695
8041
  cNode.parentNode?.replaceChild(newNode, cNode);
@@ -7728,140 +8074,23 @@ var _RawSet = class _RawSet2 {
7728
8074
  };
7729
8075
  drAttrs.push(drAttr);
7730
8076
  const operators = [
7731
- new DrPre(
7732
- this,
7733
- __render,
7734
- { raws, fag },
7735
- { element, attrName: _RawSet2.DR_PRE_NAME, attr: drAttr.drPre, attrs: drAttr },
7736
- { config, obj, operatorAround: config.operatorAround?.drPre },
7737
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7738
- ),
7739
- new Dr(
7740
- this,
7741
- __render,
7742
- { raws, fag },
7743
- { element, attrName: _RawSet2.DR_NAME, attr: drAttr.dr, attrs: drAttr },
7744
- { config, obj, operatorAround: config.operatorAround?.dr },
7745
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7746
- ),
8077
+ new DrPre(this, __render, { raws, fag }, { element, attrName: _RawSet2.DR_PRE_NAME, attr: drAttr.drPre, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drPre }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8078
+ new Dr(this, __render, { raws, fag }, { element, attrName: _RawSet2.DR_NAME, attr: drAttr.dr, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.dr }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
7747
8079
  // new Dr(this, __render, {raws, fag}, {element, attrName: EventManager.onRenderedInitAttrName, attr: drAttr.dr, attrs: drAttr}, {config, obj, operatorAround: config.operatorAround?.dr}, {onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks}),
7748
- new DrIf(
7749
- this,
7750
- __render,
7751
- { raws, fag },
7752
- { element, attrName: _RawSet2.DR_IF_NAME, attr: drAttr.drIf, attrs: drAttr },
7753
- { config, obj, operatorAround: config.operatorAround?.drIf },
7754
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7755
- ),
7756
- new DrStripElement(
7757
- this,
7758
- __render,
7759
- { raws, fag },
7760
- { element, attrName: _RawSet2.DR_STRIP_NAME, attr: drAttr.drStripElement, attrs: drAttr },
7761
- { config, obj, operatorAround: config.operatorAround?.drThis },
7762
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7763
- ),
7764
- new DrThis(
7765
- this,
7766
- __render,
7767
- { raws, fag },
7768
- { element, attrName: _RawSet2.DR_THIS_NAME, attr: drAttr.drThis, attrs: drAttr },
7769
- { config, obj, operatorAround: config.operatorAround?.drThis },
7770
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7771
- ),
7772
- new DrForm(
7773
- this,
7774
- __render,
7775
- { raws, fag },
7776
- { element, attrName: _RawSet2.DR_FOR_NAME, attr: drAttr.drForm, attrs: drAttr },
7777
- { config, obj, operatorAround: config.operatorAround?.drForm },
7778
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7779
- ),
7780
- new DrInnerText(
7781
- this,
7782
- __render,
7783
- { raws, fag },
7784
- { element, attrName: _RawSet2.DR_INNERTEXT_NAME, attr: drAttr.drInnerText, attrs: drAttr },
7785
- { config, obj, operatorAround: config.operatorAround?.drInnerText },
7786
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7787
- ),
7788
- new DrInnerHTML(
7789
- this,
7790
- __render,
7791
- { raws, fag },
7792
- { element, attrName: _RawSet2.DR_INNERHTML_NAME, attr: drAttr.drInnerHTML, attrs: drAttr },
7793
- { config, obj, operatorAround: config.operatorAround?.drInnerHTML },
7794
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7795
- ),
7796
- new DrFor(
7797
- this,
7798
- __render,
7799
- { raws, fag },
7800
- { element, attrName: _RawSet2.DR_FOR_NAME, attr: drAttr.drFor, attrs: drAttr },
7801
- { config, obj, operatorAround: config.operatorAround?.drFor },
7802
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7803
- ),
7804
- new DrForOf(
7805
- this,
7806
- __render,
7807
- { raws, fag },
7808
- { element, attrName: _RawSet2.DR_FOR_OF_NAME, attr: drAttr.drForOf, attrs: drAttr },
7809
- { config, obj, operatorAround: config.operatorAround?.drForOf },
7810
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7811
- ),
7812
- new DrThisProperty(
7813
- this,
7814
- __render,
7815
- { raws, fag },
7816
- { element, attrName: _RawSet2.DR_THIS_PROPERTY_NAME, attr: drAttr.drThisProperty, attrs: drAttr },
7817
- { config, obj, operatorAround: config.operatorAround?.drThisProperty },
7818
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7819
- ),
7820
- new DrAppender(
7821
- this,
7822
- __render,
7823
- { raws, fag },
7824
- { element, attrName: _RawSet2.DR_APPENDER_NAME, attr: drAttr.drAppender, attrs: drAttr },
7825
- { config, obj, operatorAround: config.operatorAround?.drAppender },
7826
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7827
- ),
7828
- new DrRepeat(
7829
- this,
7830
- __render,
7831
- { raws, fag },
7832
- { element, attrName: _RawSet2.DR_REPEAT_NAME, attr: drAttr.drRepeat, attrs: drAttr },
7833
- { config, obj, operatorAround: config.operatorAround?.drRepeat },
7834
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7835
- ),
7836
- new DrTargetElementIsElement(
7837
- this,
7838
- __render,
7839
- { raws, fag },
7840
- {
7841
- element,
7842
- attrName: _RawSet2.DR_REPLACE_TARGET_ELEMENT_IS_NAME,
7843
- attr: drAttr.drReplaceTargetElementIs,
7844
- attrs: drAttr
7845
- },
7846
- { config, obj },
7847
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7848
- ),
7849
- new DrTargetElement(
7850
- this,
7851
- __render,
7852
- { raws, fag },
7853
- { element, attrs: drAttr },
7854
- { config, obj },
7855
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7856
- ),
7857
- new DrTargetAttr(
7858
- this,
7859
- __render,
7860
- { raws, fag },
7861
- { element, attrs: drAttr },
7862
- { config, obj },
7863
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7864
- )
8080
+ new DrIf(this, __render, { raws, fag }, { element, attrName: _RawSet2.DR_IF_NAME, attr: drAttr.drIf, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drIf }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8081
+ new DrStripElement(this, __render, { raws, fag }, { element, attrName: _RawSet2.DR_STRIP_NAME, attr: drAttr.drStripElement, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drThis }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8082
+ new DrThis(this, __render, { raws, fag }, { element, attrName: _RawSet2.DR_THIS_NAME, attr: drAttr.drThis, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drThis }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8083
+ new DrForm(this, __render, { raws, fag }, { element, attrName: _RawSet2.DR_FOR_NAME, attr: drAttr.drForm, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drForm }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8084
+ new DrInnerText(this, __render, { raws, fag }, { element, attrName: _RawSet2.DR_INNERTEXT_NAME, attr: drAttr.drInnerText, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drInnerText }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8085
+ new DrInnerHTML(this, __render, { raws, fag }, { element, attrName: _RawSet2.DR_INNERHTML_NAME, attr: drAttr.drInnerHTML, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drInnerHTML }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8086
+ new DrFor(this, __render, { raws, fag }, { element, attrName: _RawSet2.DR_FOR_NAME, attr: drAttr.drFor, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drFor }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8087
+ new DrForOf(this, __render, { raws, fag }, { element, attrName: _RawSet2.DR_FOR_OF_NAME, attr: drAttr.drForOf, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drForOf }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8088
+ new DrThisProperty(this, __render, { raws, fag }, { element, attrName: _RawSet2.DR_THIS_PROPERTY_NAME, attr: drAttr.drThisProperty, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drThisProperty }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8089
+ new DrAppender(this, __render, { raws, fag }, { element, attrName: _RawSet2.DR_APPENDER_NAME, attr: drAttr.drAppender, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drAppender }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8090
+ new DrRepeat(this, __render, { raws, fag }, { element, attrName: _RawSet2.DR_REPEAT_NAME, attr: drAttr.drRepeat, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drRepeat }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8091
+ new DrTargetElementIsElement(this, __render, { raws, fag }, { element, attrName: _RawSet2.DR_REPLACE_TARGET_ELEMENT_IS_NAME, attr: drAttr.drReplaceTargetElementIs, attrs: drAttr }, { config, obj }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8092
+ new DrTargetElement(this, __render, { raws, fag }, { element, attrs: drAttr }, { config, obj }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8093
+ new DrTargetAttr(this, __render, { raws, fag }, { element, attrs: drAttr }, { config, obj }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks })
7865
8094
  ];
7866
8095
  for (const operator of operators) {
7867
8096
  const state = await operator.start();
@@ -7924,6 +8153,7 @@ var _RawSet = class _RawSet2 {
7924
8153
  }
7925
8154
  });
7926
8155
  }
8156
+ console.groupEnd();
7927
8157
  return { raws, executedOperators };
7928
8158
  }
7929
8159
  // 중요 스타일 적용 부분
@@ -8042,7 +8272,7 @@ var _RawSet = class _RawSet2 {
8042
8272
  }
8043
8273
  if (element2.hasAttribute(EventManager.attrAttrName)) {
8044
8274
  const script = element2.getAttribute(EventManager.attrAttrName) ?? "";
8045
- const keyValuePairs = Array.from(script.matchAll(/(\w+):\s*([^,}]+)/g)).map((match) => ({
8275
+ const keyValuePairs = Array.from(script.matchAll(/['"]?([\w-_]+)['"]?:\s*([^,}]+)/g)).map((match) => ({
8046
8276
  key: match[1],
8047
8277
  value: match[2]
8048
8278
  }));
@@ -8052,20 +8282,22 @@ var _RawSet = class _RawSet2 {
8052
8282
  }
8053
8283
  const targetElementIs = element2.getAttribute(_RawSet2.DR_REPLACE_TARGET_ELEMENT_IS_NAME);
8054
8284
  const targetElementNames = config.targetElements?.map((it) => it.name.toLowerCase()) ?? [];
8285
+ targetElementNames.push(..._RawSet2.DR_ELEMENTS);
8055
8286
  const isElement = targetElementNames.includes(element2.tagName.toLowerCase()) || targetElementNames.includes(targetElementIs?.toLowerCase());
8056
8287
  const targetAttrNames = (config.targetAttrs?.map((it) => it.name) ?? []).concat([..._RawSet2.DR_ATTRIBUTES]);
8057
8288
  const normalAttrs = /* @__PURE__ */ new Map();
8058
8289
  const linkVariables = /* @__PURE__ */ new Map();
8059
8290
  const linkNames = EventManager.linkAttrs.map((it) => it.name);
8060
8291
  const isAttr = element2.getAttributeNames().filter((it) => !EventManager.noDetectAttr.includes(it)).filter((it) => {
8061
- const value = element2.getAttribute(it);
8292
+ const value = element2.getAttribute(it)?.trim();
8062
8293
  if (value && linkNames.includes(it)) {
8063
8294
  linkVariables.set(it, value);
8064
8295
  } else if (value && _RawSet2.isExpression(value)) {
8065
8296
  const variablePaths = _RawSet2.expressionGroups(value).map((it2) => ({
8066
- origin: it2[0],
8067
- inner: it2[1]
8297
+ origin: it2[0].trim(),
8298
+ inner: it2[1].trim()
8068
8299
  }));
8300
+ const isStringTemplate = variablePaths.length > 1 || variablePaths[0] && variablePaths[0].origin !== value;
8069
8301
  let targetScript = value;
8070
8302
  variablePaths.forEach((it2) => {
8071
8303
  let r3 = it2.inner.replace(/#[^#]*#/g, "({})");
@@ -8078,7 +8310,7 @@ var _RawSet = class _RawSet2 {
8078
8310
  } else {
8079
8311
  element2.setAttribute(it, cval);
8080
8312
  }
8081
- normalAttrs.set(it, { originalAttrValue: value, variablePaths });
8313
+ normalAttrs.set(it, { originalAttrValue: value, variablePaths, isStringTemplate });
8082
8314
  }
8083
8315
  const isTargetAttr = targetAttrNames.includes(it.toLowerCase());
8084
8316
  return isTargetAttr;
@@ -8149,7 +8381,8 @@ var _RawSet = class _RawSet2 {
8149
8381
  lasterIndex = regexArr.index + it.content.length;
8150
8382
  }
8151
8383
  template.content.append(config.window.document.createTextNode(text.substring(lasterIndex, text.length)));
8152
- currentNode2?.parentNode?.replaceChild(template.content, currentNode2);
8384
+ const p = currentNode2?.parentNode;
8385
+ p?.replaceChild(template.content, currentNode2);
8153
8386
  } else if (currentNode2.nodeType === Node2.ELEMENT_NODE) {
8154
8387
  const uuid = `${RandomUtils.alphabet(40)}`;
8155
8388
  const element2 = currentNode2;
@@ -8158,6 +8391,7 @@ var _RawSet = class _RawSet2 {
8158
8391
  const startEndPoint = _RawSet2.createStartEndPoint({ node: element2, id: uuid, type: elementType }, config);
8159
8392
  const targetElementIs = element2.getAttribute(_RawSet2.DR_REPLACE_TARGET_ELEMENT_IS_NAME);
8160
8393
  const targetElementNames = config.targetElements?.map((it) => it.name.toLowerCase()) ?? [];
8394
+ targetElementNames.push(..._RawSet2.DR_ELEMENTS);
8161
8395
  const isElement = targetElementNames.includes(element2.tagName.toLowerCase()) || targetElementNames.includes(targetElementIs?.toLowerCase());
8162
8396
  const targetAttrNames = (config.targetAttrs?.map((it) => it.name) ?? []).concat(_RawSet2.DR_ATTRIBUTES);
8163
8397
  const isAttr = element2.getAttributeNames().filter((it) => targetAttrNames.includes(it.toLowerCase())).length > 0;
@@ -8520,9 +8754,11 @@ var _RawSet = class _RawSet2 {
8520
8754
  if (templateReplacements.length > 0) {
8521
8755
  targetElement.innerHTML = StringUtils.replaceSequentially(targetElement.innerHTML, templateReplacements);
8522
8756
  }
8757
+ const componentName = targetElement.getAttribute(_RawSet2.DR_VARIABLE_NAME_OPTIONNAME) ?? "component";
8523
8758
  const optionThisName = targetElement.getAttribute(_RawSet2.DR_THIS_NAME_OPTIONNAME);
8524
8759
  targetElement.getAttributeNames().forEach((it) => targetElement.setAttribute(it, targetElement.getAttribute(it).replace(/#this#/g, drThis)));
8525
8760
  const thisRandom = this.drThisEncoding(targetElement, drThis, { asIs: /@this@/g });
8761
+ targetElement.innerHTML = targetElement.innerHTML.replaceAll(`#${componentName}#`, drThis);
8526
8762
  if (optionThisName) {
8527
8763
  targetElement.innerHTML = targetElement.innerHTML.replaceAll(`@${optionThisName}@`, drThis);
8528
8764
  }
@@ -8696,7 +8932,8 @@ var _RawSet = class _RawSet2 {
8696
8932
  );
8697
8933
  if (data && innerHTMLThisRandom) {
8698
8934
  const template2 = config.window.document.createElement("template");
8699
- template2.innerHTML = ElementUtils.toInnerHTML(data, { document: config.window.document }).replace(RegExp(innerHTMLThisRandom, "g"), "this.");
8935
+ let s = ElementUtils.toInnerHTML(data, { document: config.window.document });
8936
+ template2.innerHTML = s.replace(RegExp(innerHTMLThisRandom, "g"), "this.");
8700
8937
  ;
8701
8938
  data = template2.content;
8702
8939
  }
@@ -8736,22 +8973,17 @@ var _RawSet = class _RawSet2 {
8736
8973
  new Map(JSON.parse(normalAttribute)).forEach((v, k) => {
8737
8974
  const variablePaths = v.variablePaths;
8738
8975
  let targetScript = v.originalAttrValue.trim();
8739
- let checktargetScript = v.originalAttrValue.trim();
8740
- variablePaths.forEach((it) => {
8741
- checktargetScript = targetScript.replaceAll(it.origin, "");
8742
- });
8743
- let isScriptValue = checktargetScript.length === 0 && variablePaths.length === 1;
8744
- if (isScriptValue) {
8745
- let r = ObjectUtils.Path.toOptionalChainPath(variablePaths[0].inner);
8746
- targetScript = targetScript.replaceAll(variablePaths[0].origin, r);
8747
- } else {
8976
+ if (v.isStringTemplate) {
8748
8977
  variablePaths.forEach((it) => {
8749
8978
  let r = ObjectUtils.Path.toOptionalChainPath(it.inner);
8750
8979
  targetScript = targetScript.replaceAll(it.origin, `\${${r}}`);
8751
8980
  });
8981
+ } else {
8982
+ let r = ObjectUtils.Path.toOptionalChainPath(variablePaths[0].inner);
8983
+ targetScript = targetScript.replaceAll(variablePaths[0].origin, r);
8752
8984
  }
8753
8985
  const cval = ObjectUtils.Script.evaluateReturn(
8754
- { bodyScript: config.script, returnScript: isScriptValue ? targetScript : "`" + targetScript + "`" },
8986
+ { bodyScript: config.script, returnScript: v.isStringTemplate ? "`" + targetScript + "`" : targetScript },
8755
8987
  Object.assign(config.obj, config.renderData ? { __render: config.renderData } : void 0)
8756
8988
  );
8757
8989
  attribute[k] = cval;
@@ -8775,6 +9007,7 @@ _RawSet.DR_INNERTEXT_NAME = "dr-inner-text";
8775
9007
  _RawSet.DR_DETECT_NAME = "dr-detect";
8776
9008
  _RawSet.DR_STRIP_NAME = "dr-strip";
8777
9009
  _RawSet.DR_REPLACE_TARGET_ELEMENT_IS_NAME = "dr-replace-target-element-is";
9010
+ _RawSet.DR_TARGET_ELEMENT_ELEMENTNAME = "dr-target-element";
8778
9011
  _RawSet.DR_DETECT_IF_OPTIONNAME = "dr-detect-option-if";
8779
9012
  _RawSet.DR_DETECT_FILTER_OPTIONNAME = "dr-detect-option-filter";
8780
9013
  _RawSet.DR_DETECT_ATTR_OPTIONNAME = "dr-detect-option-attr";
@@ -8831,6 +9064,9 @@ _RawSet.drAttrsOriginName = {
8831
9064
  drKeyOption: _RawSet.DR_KEY_OPTIONNAME
8832
9065
  };
8833
9066
  _RawSet.DR_TAGS = [];
9067
+ _RawSet.DR_ELEMENTS = [
9068
+ _RawSet.DR_TARGET_ELEMENT_ELEMENTNAME
9069
+ ];
8834
9070
  _RawSet.DR_ATTRIBUTES = [
8835
9071
  _RawSet.DR_NAME,
8836
9072
  _RawSet.DR_APPENDER_NAME,
@@ -8844,7 +9080,7 @@ _RawSet.DR_ATTRIBUTES = [
8844
9080
  _RawSet.DR_INNERHTML_NAME,
8845
9081
  _RawSet.DR_INNERTEXT_NAME,
8846
9082
  _RawSet.DR_REPEAT_NAME,
8847
- _RawSet.DR_DETECT_NAME,
9083
+ // RawSet.DR_DETECT_NAME, // TODO: DrDetect 오퍼레이터 구현 필요
8848
9084
  _RawSet.DR_STRIP_NAME
8849
9085
  ];
8850
9086
  var RawSet = _RawSet;
@@ -8852,10 +9088,7 @@ var RawSet = _RawSet;
8852
9088
  // ../dom-render/dist/esm/decorators/DomRenderNoProxy.js
8853
9089
  var DomRenderNoProxyKey = "DomRender:NoProxy";
8854
9090
  var getDomRenderNoProxy = (target, propertyKey) => {
8855
- if (propertyKey === void 0) {
8856
- return Reflect.getMetadata(DomRenderNoProxyKey, target);
8857
- }
8858
- return Reflect.getMetadata(DomRenderNoProxyKey, target, propertyKey);
9091
+ return ReflectUtils.getMetadata(DomRenderNoProxyKey, target, propertyKey);
8859
9092
  };
8860
9093
  var isDomRenderNoProxy = (target, propertyKey) => {
8861
9094
  return ValidUtils.isNullOrUndefined(target) || getDomRenderNoProxy(target, propertyKey) === true;
@@ -8900,6 +9133,11 @@ var isOnRawSetRendered = (obj) => {
8900
9133
  return typeof obj?.onRawSetRendered === "function";
8901
9134
  };
8902
9135
 
9136
+ // ../dom-render/dist/esm/lifecycle/OnChildRawSetRendered.js
9137
+ var isOnChildRawSetRendered = (obj) => {
9138
+ return typeof obj?.onChildRawSetRendered === "function";
9139
+ };
9140
+
8903
9141
  // ../dom-render/dist/esm/DomRenderProxy.js
8904
9142
  var excludeGetSetPropertys = [
8905
9143
  "onBeforeReturnGet",
@@ -8931,6 +9169,7 @@ var getDomRenderConfig = (obj) => {
8931
9169
  return void 0;
8932
9170
  };
8933
9171
  var DomRenderProxy = class _DomRenderProxy {
9172
+ // public name = Math.random();
8934
9173
  constructor(_domRender_origin, target, _domRender_config) {
8935
9174
  this._domRender_origin = _domRender_origin;
8936
9175
  this._domRender_config = _domRender_config;
@@ -9019,7 +9258,7 @@ var DomRenderProxy = class _DomRenderProxy {
9019
9258
  const onInit = target.getAttribute?.(RawSet.DR_ON_INIT_ARGUMENTS_OPTIONNAME);
9020
9259
  let initParam;
9021
9260
  if (onCreate) {
9022
- initParam = ScriptUtils.evaluateReturn(onCreate, this._domRender_proxy);
9261
+ initParam = ObjectUtils.Script.evaluateReturn(onCreate, this._domRender_proxy);
9023
9262
  }
9024
9263
  if (isOnInitRender(this._domRender_proxy)) {
9025
9264
  await this._domRender_proxy.onInitRender(
@@ -9048,46 +9287,65 @@ var DomRenderProxy = class _DomRenderProxy {
9048
9287
  }
9049
9288
  const removeRawSets = [];
9050
9289
  const rawSets = raws ?? this.getRawSets();
9051
- for (const it of rawSets) {
9052
- it.getUsingTriggerVariables(this._domRender_config).forEach((path2) => {
9053
- this.addRawSet(path2, it);
9054
- });
9055
- let renderResult;
9056
- if (it.isConnected) {
9057
- const targetAttrMap = it.point.node?.getAttribute?.(EventManager.normalAttrMapAttrName);
9058
- if (it.detect?.action) {
9059
- it.detect.action();
9060
- } else if (it.type === RawSetType.TARGET_ELEMENT && it.dataSet?.render?.currentThis && fullPathStr && targetAttrMap) {
9061
- new Map(JSON.parse(targetAttrMap)).forEach((v, k) => {
9062
- var _a7;
9063
- const isUsing = v.variablePaths.some((it2) => EventManager.isUsingThisVar(it2.inner, `this.${fullPathStr}`));
9064
- if (isUsing) {
9065
- const targetAttrObject = RawSet.getAttributeObject(it.point.node, {
9066
- script: it.dataSet?.render?.renderScript ?? "",
9067
- obj: Object.assign(this._domRender_proxy ?? {}, { __render: it.dataSet?.render })
9068
- });
9069
- (_a7 = it.dataSet).render ?? (_a7.render = {});
9070
- it.dataSet.render.attribute = targetAttrObject;
9071
- if (isOnChangeAttrRender(it.dataSet?.render?.currentThis)) {
9072
- it.dataSet?.render?.currentThis?.onChangeAttrRender?.(k, targetAttrObject[k], { rawSet: it });
9290
+ const CHUNK_SIZE = 50;
9291
+ const chunks = [];
9292
+ const rawSetsArray = Array.from(rawSets);
9293
+ for (let i = 0; i < rawSetsArray.length; i += CHUNK_SIZE) {
9294
+ chunks.push(rawSetsArray.slice(i, i + CHUNK_SIZE));
9295
+ }
9296
+ for (const chunk of chunks) {
9297
+ const promises2 = chunk.map(async (it) => {
9298
+ it.getUsingTriggerVariables(this._domRender_config).forEach((path2) => {
9299
+ this.addRawSet(path2, it);
9300
+ });
9301
+ let renderResult;
9302
+ if (it.isConnected) {
9303
+ const targetAttrMap = it.point.node?.getAttribute?.(EventManager.normalAttrMapAttrName);
9304
+ if (it.detect?.action) {
9305
+ it.detect.action();
9306
+ } else if (it.type === RawSetType.TARGET_ELEMENT && it.dataSet?.render?.currentThis && fullPathStr && targetAttrMap) {
9307
+ const attrStart = performance.now();
9308
+ new Map(JSON.parse(targetAttrMap)).forEach((v, k) => {
9309
+ var _a7;
9310
+ const isUsing = v.variablePaths.some((it2) => EventManager.isUsingThisVar(it2.inner, `this.${fullPathStr}`));
9311
+ if (isUsing) {
9312
+ const targetAttrObject = RawSet.getAttributeObject(it.point.node, {
9313
+ script: it.dataSet?.render?.renderScript ?? "",
9314
+ obj: Object.assign(this._domRender_proxy ?? {}, { __render: it.dataSet?.render })
9315
+ });
9316
+ (_a7 = it.dataSet).render ?? (_a7.render = {});
9317
+ it.dataSet.render.attribute = targetAttrObject;
9318
+ if (isOnChangeAttrRender(it.dataSet?.render?.currentThis)) {
9319
+ it.dataSet?.render?.currentThis?.onChangeAttrRender?.(k, targetAttrObject[k], { rawSet: it });
9320
+ }
9073
9321
  }
9322
+ });
9323
+ const attrEnd = performance.now();
9324
+ } else {
9325
+ const renderStart = performance.now();
9326
+ const rawSets2 = await it.render(this._domRender_proxy, this._domRender_config);
9327
+ const renderEnd = performance.now();
9328
+ renderResult = rawSets2;
9329
+ if (rawSets2 && rawSets2.raws.length > 0) {
9330
+ await this.render(rawSets2.raws);
9074
9331
  }
9075
- });
9076
- } else {
9077
- const rawSets2 = await it.render(this._domRender_proxy, this._domRender_config);
9078
- renderResult = rawSets2;
9079
- if (rawSets2 && rawSets2.raws.length > 0) {
9080
- await this.render(rawSets2.raws);
9081
9332
  }
9333
+ } else {
9334
+ removeRawSets.push(it);
9082
9335
  }
9083
- } else {
9084
- removeRawSets.push(it);
9085
- }
9086
- const t = it.findNearThis(this._domRender_proxy);
9087
- if (isOnRawSetRendered(t)) {
9088
- await t.onRawSetRendered(it, { path: fullPathStr, renderResult });
9336
+ const t = it.findNearThis(this._domRender_proxy);
9337
+ if (isOnRawSetRendered(t)) {
9338
+ await t.onRawSetRendered(it, { path: fullPathStr, value: ObjectUtils.Script.evaluateReturn(`this.${fullPathStr}`, this._domRender_proxy), root: this._domRender_proxy, renderResult });
9339
+ }
9340
+ });
9341
+ await Promise.all(promises2);
9342
+ if (chunks.length > 1) {
9343
+ await new Promise((resolve) => requestAnimationFrame(resolve));
9089
9344
  }
9090
9345
  }
9346
+ if (isOnChildRawSetRendered(this._domRender_proxy)) {
9347
+ await this._domRender_proxy.onChildRawSetRendered();
9348
+ }
9091
9349
  if (removeRawSets.length > 0) {
9092
9350
  this.removeRawSet(...removeRawSets);
9093
9351
  }
@@ -9102,12 +9360,15 @@ var DomRenderProxy = class _DomRenderProxy {
9102
9360
  // return current;
9103
9361
  // }
9104
9362
  root(pathInfos, value, lastDoneExecute = true) {
9363
+ const rootStartTime = Date.now();
9364
+ const pathKey = pathInfos.flat().map((i) => i.path).join(".");
9105
9365
  const fullPaths = [];
9106
9366
  if (this._domRender_ref.size > 0) {
9107
9367
  this._domRender_ref.forEach((it, key) => {
9108
9368
  if ("_DomRender_isProxy" in key) {
9109
9369
  it.forEach((sit) => {
9110
9370
  try {
9371
+ const recursiveStartTime = Date.now();
9111
9372
  const concat = pathInfos.concat([[{ path: sit, obj: key }]]);
9112
9373
  const items = key._DomRender_proxy?.root(
9113
9374
  concat,
@@ -9121,6 +9382,7 @@ var DomRenderProxy = class _DomRenderProxy {
9121
9382
  }
9122
9383
  });
9123
9384
  } else {
9385
+ const pathProcessStartTime = Date.now();
9124
9386
  const strings = pathInfos.reverse().map((it) => it.map((it2) => it2.path).join(","));
9125
9387
  const fullPathStr = strings.map((it) => isNaN(Number(it)) ? "." + it : `[${it}]`).join("").slice(1);
9126
9388
  if (lastDoneExecute) {
@@ -9128,10 +9390,13 @@ var DomRenderProxy = class _DomRenderProxy {
9128
9390
  const front = strings.slice(0, strings.length - 1).map((it) => isNaN(Number(it)) ? "." + it : `[${it}]`).join("");
9129
9391
  const lastPropertyName = strings[strings.length - 1];
9130
9392
  const path2 = "this" + front;
9131
- const data = ScriptUtils.evaluateReturn(ObjectUtils.Path.toOptionalChainPath(path2), this._domRender_proxy);
9393
+ const data = ObjectUtils.Script.evaluateReturn(ObjectUtils.Path.toOptionalChainPath(path2), this._domRender_proxy);
9394
+ const promiseStartTime = Date.now();
9132
9395
  new Promise(async (resolve) => {
9396
+ const promiseInnerStartTime = Date.now();
9133
9397
  let rData = [];
9134
9398
  const firstPathStr = front.slice(1);
9399
+ const dictionaryCheckStartTime = Date.now();
9135
9400
  const firstTargets = this._rawSets.get(firstPathStr);
9136
9401
  const firstTargetDictionary = [];
9137
9402
  firstTargets?.forEach((it) => {
@@ -9173,6 +9438,7 @@ var DomRenderProxy = class _DomRenderProxy {
9173
9438
  rData = await this.render(rawSets);
9174
9439
  }
9175
9440
  }
9441
+ const renderStartTime = Date.now();
9176
9442
  if (lastPropertyName === "length" && Array.isArray(data)) {
9177
9443
  const aIterable = this._rawSets.get(firstPathStr);
9178
9444
  if (aIterable) {
@@ -9181,13 +9447,17 @@ var DomRenderProxy = class _DomRenderProxy {
9181
9447
  } else if (iterable) {
9182
9448
  rData = await this.render(Array.from(iterable), fullPathStr);
9183
9449
  }
9450
+ const eventProcessStartTime = Date.now();
9184
9451
  const Node2 = this._domRender_config.window.Node;
9185
9452
  this._targets.forEach((it) => {
9186
9453
  if (it.nodeType === Node2.DOCUMENT_FRAGMENT_NODE || it.nodeType === Node2.ELEMENT_NODE) {
9454
+ const findAttrStartTime = Date.now();
9187
9455
  const targets = this._domRender_config.eventManager.findAttrElements(
9188
9456
  it,
9189
9457
  this._domRender_config
9190
9458
  );
9459
+ const targetCount = targets?.size || targets?.length || 0;
9460
+ const changeVarStartTime = Date.now();
9191
9461
  this._domRender_config.eventManager.changeVar(
9192
9462
  this._domRender_proxy,
9193
9463
  targets,
@@ -9197,7 +9467,7 @@ var DomRenderProxy = class _DomRenderProxy {
9197
9467
  }
9198
9468
  });
9199
9469
  if (rData?.length > 0 && isOnChildRenderedByProperty(data)) {
9200
- const propertyValue = ScriptUtils.evaluateReturn(`this.${lastPropertyName}`, data);
9470
+ const propertyValue = ObjectUtils.Script.evaluateReturn(`this.${lastPropertyName}`, data);
9201
9471
  data.onChildRenderedByProperty(lastPropertyName, propertyValue);
9202
9472
  }
9203
9473
  resolve(rData);
@@ -9213,6 +9483,7 @@ var DomRenderProxy = class _DomRenderProxy {
9213
9483
  target[p] = value;
9214
9484
  return true;
9215
9485
  }
9486
+ let start = performance.now();
9216
9487
  if (typeof p === "string") {
9217
9488
  value = this.proxy(receiver, value, p);
9218
9489
  }
@@ -9235,14 +9506,23 @@ var DomRenderProxy = class _DomRenderProxy {
9235
9506
  }).forEach((it) => {
9236
9507
  const variablePaths = it.valueScript.variablePaths;
9237
9508
  let targetScript = it.valueScript.originalAttrValue;
9238
- variablePaths.forEach((it2) => {
9239
- let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
9240
- targetScript = targetScript.replaceAll(it2.origin, `\${${r}}`);
9241
- });
9242
- const value1 = ObjectUtils.Script.evaluateReturn("`" + targetScript + "`", it.pathInfo.obj);
9243
- if (value1 === null) {
9509
+ let script;
9510
+ if (it.valueScript.isStringTemplate) {
9511
+ variablePaths.forEach((it2) => {
9512
+ let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
9513
+ targetScript = targetScript.replaceAll(it2.origin, `\${${r}}`);
9514
+ });
9515
+ script = "`" + targetScript + "`";
9516
+ } else {
9517
+ variablePaths.forEach((it2) => {
9518
+ let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
9519
+ targetScript = targetScript.replaceAll(it2.origin, `${r}`);
9520
+ });
9521
+ script = targetScript;
9522
+ }
9523
+ const value1 = ObjectUtils.Script.evaluateReturn(script, it.pathInfo.obj);
9524
+ if (value1 === null || value1 === void 0) {
9244
9525
  elementInfo.element.removeAttribute(it.key);
9245
- elementInfo.element[it.key] = null;
9246
9526
  } else {
9247
9527
  elementInfo.element.setAttribute(it.key, value1);
9248
9528
  elementInfo.element[it.key] = value1;
@@ -9252,11 +9532,11 @@ var DomRenderProxy = class _DomRenderProxy {
9252
9532
  );
9253
9533
  DocumentUtils.querySelectorAllByAttributeName(rootElement, EventManager.linkTargetMapAttrName)?.forEach(
9254
9534
  (elementInfo) => {
9255
- const targets = new Map(ScriptUtils.evaluateReturn(elementInfo.value));
9535
+ const targets = new Map(ObjectUtils.Script.evaluateReturn(elementInfo.value));
9256
9536
  Array.from(targets.entries()).filter(([key, value2]) => value2.trim()).filter(isDefined).flatMap(([key, valueScript]) => {
9257
9537
  return fullPathInfo.flat().filter((it) => valueScript.includes(`this.${it.path}`)).flatMap((it) => ({ key, valueScript, pathInfo: it }));
9258
9538
  }).forEach((info) => {
9259
- const value1 = ScriptUtils.evaluateReturn(info.valueScript, info.pathInfo.obj);
9539
+ const value1 = ObjectUtils.Script.evaluateReturn(info.valueScript, info.pathInfo.obj);
9260
9540
  const applyAttributeName = EventManager.linkAttrs.find((it) => it.name === info.key);
9261
9541
  if (applyAttributeName) {
9262
9542
  if (value1 === null) {
@@ -9434,46 +9714,47 @@ function filter(predicate) {
9434
9714
  }
9435
9715
 
9436
9716
  // ../core/dist/esm/message/operators/first.js
9437
- var EmptyError = class extends Error {
9438
- constructor() {
9439
- super("no elements in sequence");
9440
- this.name = "EmptyError";
9441
- }
9442
- };
9443
- function first(predicate) {
9717
+ function first(predicate, defaultValue) {
9444
9718
  return (source) => {
9445
9719
  return new Observable((subscriber) => {
9446
9720
  let index = 0;
9447
- let found = false;
9448
- const sourceSubscription = source.subscribe({
9721
+ let hasValue = false;
9722
+ const subscription = source.subscribe({
9449
9723
  next: (value) => {
9450
- if (found) return;
9451
- const passed = predicate ? predicate(value, index++) : true;
9452
- if (passed) {
9453
- found = true;
9724
+ if (hasValue) {
9725
+ return;
9726
+ }
9727
+ const shouldEmit = predicate ? predicate(value, index++) : true;
9728
+ if (shouldEmit) {
9729
+ hasValue = true;
9454
9730
  subscriber.next(value);
9455
9731
  subscriber.complete();
9456
- sourceSubscription.unsubscribe();
9732
+ subscription.unsubscribe();
9457
9733
  }
9458
9734
  },
9459
9735
  error: (err) => {
9460
- subscriber.error(err);
9736
+ if (!hasValue) {
9737
+ subscriber.error(err);
9738
+ }
9461
9739
  },
9462
9740
  complete: () => {
9463
- if (!found) {
9464
- subscriber.error(new EmptyError());
9741
+ if (!hasValue) {
9742
+ if (defaultValue !== void 0) {
9743
+ subscriber.next(defaultValue);
9744
+ subscriber.complete();
9745
+ } else {
9746
+ subscriber.error(new Error("no elements in sequence"));
9747
+ }
9465
9748
  }
9466
9749
  }
9467
9750
  });
9468
- return () => {
9469
- sourceSubscription.unsubscribe();
9470
- };
9751
+ return subscription;
9471
9752
  });
9472
9753
  };
9473
9754
  }
9474
9755
 
9475
9756
  // ../core/dist/esm/message/internal/lastValueFrom.js
9476
- var EmptyError2 = class extends Error {
9757
+ var EmptyError = class extends Error {
9477
9758
  constructor(message = "No elements in sequence") {
9478
9759
  super(message);
9479
9760
  this.name = "EmptyError";
@@ -9493,7 +9774,7 @@ function firstValueFrom(source) {
9493
9774
  error: reject,
9494
9775
  complete: () => {
9495
9776
  if (!_hasValue) {
9496
- reject(new EmptyError2());
9777
+ reject(new EmptyError());
9497
9778
  }
9498
9779
  }
9499
9780
  });
@@ -9876,10 +10157,10 @@ var Alert = class {
9876
10157
  this.alertService = alertService;
9877
10158
  this.config = config;
9878
10159
  this.isActive = false;
9879
- this.activeBefore = [];
9880
- this.activeAfter = [];
9881
- this.deActiveBefore = [];
9882
- this.deActiveAfter = [];
10160
+ this.activateBefore = [];
10161
+ this.activateAfter = [];
10162
+ this.deActivateBefore = [];
10163
+ this.deActivateAfter = [];
9883
10164
  this.data = /* @__PURE__ */ new Map();
9884
10165
  if (config?.uuid) {
9885
10166
  this.uuid = config.uuid;
@@ -9888,16 +10169,16 @@ var Alert = class {
9888
10169
  }
9889
10170
  }
9890
10171
  addOpenBefore(fn) {
9891
- this.activeBefore.push(fn);
10172
+ this.activateBefore.push(fn);
9892
10173
  }
9893
10174
  addOpenAfter(fn) {
9894
- this.activeAfter.push(fn);
10175
+ this.activateAfter.push(fn);
9895
10176
  }
9896
10177
  addCloseBefore(fn) {
9897
- this.deActiveBefore.push(fn);
10178
+ this.deActivateBefore.push(fn);
9898
10179
  }
9899
10180
  addCloseAfter(fn) {
9900
- this.deActiveAfter.push(fn);
10181
+ this.deActivateAfter.push(fn);
9901
10182
  }
9902
10183
  setData(key, value) {
9903
10184
  this.data.set(key, value);
@@ -9905,35 +10186,35 @@ var Alert = class {
9905
10186
  getData(key) {
9906
10187
  return this.data.get(key);
9907
10188
  }
9908
- async active() {
10189
+ async activate() {
9909
10190
  try {
9910
- await Promise.allSettled(this.activeBefore.map((it) => it())).then((it) => {
10191
+ await Promise.allSettled(this.activateBefore.map((it) => it())).then((it) => {
9911
10192
  this.result = this.make();
9912
10193
  this.alertService?.publish({ action: AlertAction.ACTIVE, alert: this });
9913
10194
  this.isActive = true;
9914
10195
  if (this.config?.closeTime !== void 0 && this.config?.closeTime > 0) {
9915
10196
  setTimeout(() => {
9916
- this.inActive();
10197
+ this.deActivate();
9917
10198
  }, this.config.closeTime);
9918
10199
  }
9919
- this.config?.active?.(this.result, this);
10200
+ this.config?.activate?.(this.result, this);
9920
10201
  });
9921
10202
  } catch (e) {
9922
10203
  } finally {
9923
- await Promise.allSettled(this.activeAfter.map((it) => it())).then((it) => {
10204
+ await Promise.allSettled(this.activateAfter.map((it) => it())).then((it) => {
9924
10205
  });
9925
10206
  }
9926
10207
  }
9927
- async inActive() {
10208
+ async deActivate() {
9928
10209
  try {
9929
- await Promise.allSettled(this.deActiveBefore.map((it) => it())).then((it) => {
10210
+ await Promise.allSettled(this.deActivateBefore.map((it) => it())).then((it) => {
9930
10211
  this.alertService?.publish({ action: AlertAction.IN_ACTIVE, alert: this });
9931
10212
  this.isActive = false;
9932
- this.config?.deActive?.(this.result, this);
10213
+ this.config?.deActivate?.(this.result, this);
9933
10214
  });
9934
10215
  } catch (e) {
9935
10216
  } finally {
9936
- await Promise.allSettled(this.deActiveAfter.map((it) => it())).then((it) => {
10217
+ await Promise.allSettled(this.deActivateAfter.map((it) => it())).then((it) => {
9937
10218
  });
9938
10219
  }
9939
10220
  }
@@ -10436,7 +10717,7 @@ var ApiService = class ApiService2 extends HttpJsonFetcher {
10436
10717
  const alert = this.alertService?.progress({ title: config.config.config.title });
10437
10718
  if (alert) {
10438
10719
  pipe.progress = alert;
10439
- alert.active();
10720
+ alert.activate();
10440
10721
  }
10441
10722
  }
10442
10723
  }
@@ -10444,7 +10725,7 @@ var ApiService = class ApiService2 extends HttpJsonFetcher {
10444
10725
  this.subject.next({ type: "success", config, pipe });
10445
10726
  config.config?.config?.callBackSuccess?.(config, pipe);
10446
10727
  if (config.config?.config?.alertSuccessMsg) {
10447
- this.alertService?.success({ title: config.config.config.title })?.active();
10728
+ this.alertService?.success({ title: config.config.config.title })?.activate();
10448
10729
  }
10449
10730
  }
10450
10731
  afterSuccessTransform(config, pipe) {
@@ -10452,7 +10733,7 @@ var ApiService = class ApiService2 extends HttpJsonFetcher {
10452
10733
  finally(config, pipe) {
10453
10734
  this.subject.next({ type: "final", config, pipe });
10454
10735
  config.config?.config?.callBackFinal?.(config, pipe);
10455
- pipe.progress?.inActive();
10736
+ pipe.progress?.deActivate();
10456
10737
  }
10457
10738
  error(config, pipe, e) {
10458
10739
  console.log("error", e);
@@ -10461,7 +10742,7 @@ var ApiService = class ApiService2 extends HttpJsonFetcher {
10461
10742
  if (config.config?.config?.alertErrorMsg) {
10462
10743
  this.alertService?.danger({
10463
10744
  title: `${config.config.config.title ? config.config.config.title : ""}${e.message ? `(${e.message})` : ""}`
10464
- })?.active();
10745
+ })?.activate();
10465
10746
  }
10466
10747
  if (config.config?.config?.enableErrorConsole) {
10467
10748
  console.error(`apiService Error ${config?.config?.config?.title}`, e);
@@ -10495,97 +10776,14 @@ var __decorate9 = function(decorators, target, key, desc) {
10495
10776
  var __metadata6 = function(k, v) {
10496
10777
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10497
10778
  };
10779
+ var SymbolIntentApiServiceProxy_1;
10498
10780
  var _a6;
10499
- var SymbolIntentApiServiceProxy = class SymbolIntentApiServiceProxy2 {
10781
+ var SymbolIntentApiServiceProxy = SymbolIntentApiServiceProxy_1 = class SymbolIntentApiServiceProxy2 {
10500
10782
  constructor(apiService) {
10501
10783
  this.apiService = apiService;
10502
- console.log("-------apiService", apiService);
10503
- }
10504
- get(target, prop, receiver) {
10505
- const simConfig = getSim(target);
10506
- const apiService = this.apiService;
10507
- const value = Reflect.get(target, prop, receiver);
10508
- if (typeof value === "function" && simConfig?.symbol) {
10509
- return function(...args) {
10510
- const f = value;
10511
- const p = (userConfig) => {
10512
- const headers = { ...userConfig?.headers ?? {}, ...makeIntentHeaderBySymbol(simConfig.symbol) };
10513
- const method = userConfig?.method ?? "post";
10514
- if (method === "post" && userConfig?.multipartFormData) {
10515
- return apiService.post({
10516
- target: `/${String(prop)}`,
10517
- config: {
10518
- bypassTransform: userConfig?.bypassTransform,
10519
- transformText: userConfig?.transformText,
10520
- fetch: {
10521
- credentials: "include",
10522
- headers,
10523
- body: ConvertUtils.toFormData(userConfig?.body)
10524
- }
10525
- }
10526
- });
10527
- } else if (method === "post") {
10528
- return apiService.postJson({
10529
- target: `/${String(prop)}`,
10530
- config: {
10531
- bypassTransform: userConfig?.bypassTransform,
10532
- transformText: userConfig?.transformText,
10533
- fetch: {
10534
- credentials: "include",
10535
- headers,
10536
- body: userConfig?.body
10537
- }
10538
- }
10539
- });
10540
- } else if (method === "petch") {
10541
- return apiService.patchJson({
10542
- target: `/${String(prop)}`,
10543
- config: {
10544
- bypassTransform: userConfig?.bypassTransform,
10545
- transformText: userConfig?.transformText,
10546
- fetch: {
10547
- credentials: "include",
10548
- headers,
10549
- body: userConfig?.body
10550
- }
10551
- }
10552
- });
10553
- } else {
10554
- return apiService[method]({
10555
- // return apiService.head({
10556
- target: { url: `/${String(prop)}`, searchParams: userConfig?.body },
10557
- config: {
10558
- bypassTransform: userConfig?.bypassTransform,
10559
- transformText: userConfig?.transformText,
10560
- fetch: {
10561
- credentials: "include",
10562
- headers
10563
- }
10564
- }
10565
- });
10566
- }
10567
- };
10568
- args.push(p);
10569
- return Reflect.apply(f, target, args);
10570
- };
10571
- }
10572
- return Reflect.get(target, prop, receiver);
10573
10784
  }
10574
- apply(target, thisArg, argArray) {
10575
- console.log("SymbolIntentApiServiceProxy apply");
10576
- return Reflect.apply(target, thisArg, argArray);
10577
- }
10578
- };
10579
- SymbolIntentApiServiceProxy = __decorate9([
10580
- Sim,
10581
- __metadata6("design:paramtypes", [typeof (_a6 = typeof ApiService !== "undefined" && ApiService) === "function" ? _a6 : Object])
10582
- ], SymbolIntentApiServiceProxy);
10583
-
10584
- // src/proxy/SymbolIntentApiServiceProxyBase.ts
10585
- var SymbolIntentApiServiceProxyBase = class {
10586
- // 생성자는 프록시될 대상 객체(target)와 의존성을 주입받습니다.
10587
- constructor(apiService) {
10588
- const handler = {
10785
+ static createHandler(apiService) {
10786
+ return {
10589
10787
  get(target, prop, receiver) {
10590
10788
  const simConfig = getSim(target);
10591
10789
  const value = Reflect.get(target, prop, receiver);
@@ -10601,6 +10799,7 @@ var SymbolIntentApiServiceProxyBase = class {
10601
10799
  config: {
10602
10800
  bypassTransform: userConfig?.bypassTransform,
10603
10801
  transformText: userConfig?.transformText,
10802
+ config: userConfig?.config,
10604
10803
  fetch: {
10605
10804
  credentials: "include",
10606
10805
  headers,
@@ -10614,6 +10813,7 @@ var SymbolIntentApiServiceProxyBase = class {
10614
10813
  config: {
10615
10814
  bypassTransform: userConfig?.bypassTransform,
10616
10815
  transformText: userConfig?.transformText,
10816
+ config: userConfig?.config,
10617
10817
  fetch: {
10618
10818
  credentials: "include",
10619
10819
  headers,
@@ -10627,6 +10827,7 @@ var SymbolIntentApiServiceProxyBase = class {
10627
10827
  config: {
10628
10828
  bypassTransform: userConfig?.bypassTransform,
10629
10829
  transformText: userConfig?.transformText,
10830
+ config: userConfig?.config,
10630
10831
  fetch: {
10631
10832
  credentials: "include",
10632
10833
  headers,
@@ -10640,6 +10841,7 @@ var SymbolIntentApiServiceProxyBase = class {
10640
10841
  config: {
10641
10842
  bypassTransform: userConfig?.bypassTransform,
10642
10843
  transformText: userConfig?.transformText,
10844
+ config: userConfig?.config,
10643
10845
  fetch: {
10644
10846
  credentials: "include",
10645
10847
  headers
@@ -10655,10 +10857,28 @@ var SymbolIntentApiServiceProxyBase = class {
10655
10857
  return Reflect.get(target, prop, receiver);
10656
10858
  },
10657
10859
  apply(target, thisArg, argArray) {
10658
- console.log("SymbolIntentApiServiceProxyBase apply (from handler)");
10860
+ console.log("SymbolIntentApiServiceProxy apply");
10659
10861
  return Reflect.apply(target, thisArg, argArray);
10660
10862
  }
10661
10863
  };
10864
+ }
10865
+ get(target, prop, receiver) {
10866
+ return SymbolIntentApiServiceProxy_1.createHandler(this.apiService).get(target, prop, receiver);
10867
+ }
10868
+ apply(target, thisArg, argArray) {
10869
+ return SymbolIntentApiServiceProxy_1.createHandler(this.apiService).apply(target, thisArg, argArray);
10870
+ }
10871
+ };
10872
+ SymbolIntentApiServiceProxy = SymbolIntentApiServiceProxy_1 = __decorate9([
10873
+ Sim,
10874
+ __metadata6("design:paramtypes", [typeof (_a6 = typeof ApiService !== "undefined" && ApiService) === "function" ? _a6 : Object])
10875
+ ], SymbolIntentApiServiceProxy);
10876
+
10877
+ // src/proxy/SymbolIntentApiServiceProxyBase.ts
10878
+ var SymbolIntentApiServiceProxyBase = class {
10879
+ // 생성자는 프록시될 대상 객체(target)와 의존성을 주입받습니다.
10880
+ constructor(apiService) {
10881
+ const handler = SymbolIntentApiServiceProxy.createHandler(apiService);
10662
10882
  return new Proxy(this, handler);
10663
10883
  }
10664
10884
  };
@@ -10705,6 +10925,7 @@ var FileUtils;
10705
10925
  constructor(_data) {
10706
10926
  this._data = _data;
10707
10927
  this.updateStats();
10928
+ this.etcData = _data.etcData;
10708
10929
  }
10709
10930
  get originalName() {
10710
10931
  return this._data.originalName;
@@ -10754,10 +10975,11 @@ var FileUtils;
10754
10975
  }
10755
10976
  FileUtils2.File = File;
10756
10977
  FileUtils2.writeFile = async (buffer, config) => {
10978
+ config ?? (config = {});
10757
10979
  config.path ?? (config.path = `${node_os.tmpdir()}/${RandomUtils.uuid4()}_${Date.now()}`);
10758
10980
  await node_fs.promises.mkdir(config.path.substring(0, config.path.lastIndexOf("/")), { recursive: true });
10759
10981
  await node_fs.promises.writeFile(config.path, buffer);
10760
- return new File({ path: config.path, originalName: config.originalName });
10982
+ return new File({ path: config.path, originalName: config.originalName, etcData: config.etcData });
10761
10983
  };
10762
10984
  FileUtils2.path = (path2) => {
10763
10985
  return Array.isArray(path2) ? node_path.join(...path2) : path2;
@@ -10807,6 +11029,14 @@ var FileUtils;
10807
11029
  const p = FileUtils2.path(path2);
10808
11030
  return node_fs.promises.readFile(p, config?.option);
10809
11031
  };
11032
+ FileUtils2.readJsonSync = (path2) => {
11033
+ const json = FileUtils2.readStringSync(path2);
11034
+ return JSON.parse(json);
11035
+ };
11036
+ FileUtils2.readJsonAsync = async (path2) => {
11037
+ const json = await FileUtils2.readStringAsync(path2);
11038
+ return JSON.parse(json);
11039
+ };
10810
11040
  FileUtils2.readStringSync = (path2) => {
10811
11041
  const p = FileUtils2.path(path2);
10812
11042
  return node_fs.readFileSync(p, "utf-8");
@@ -10995,7 +11225,7 @@ var RequestResponse = class _RequestResponse {
10995
11225
  const formData = {};
10996
11226
  for (const it of m) {
10997
11227
  if (it.isFile) {
10998
- formData[it.name] = await FileUtils.writeFile(it.value, { originalName: it.filename });
11228
+ formData[it.name] = await FileUtils.writeFile(it.value, { originalName: it.filename, etcData: it });
10999
11229
  } else {
11000
11230
  const target = formData[it.name];
11001
11231
  if (Array.isArray(target)) {
@@ -11311,6 +11541,11 @@ var RequestResponse = class _RequestResponse {
11311
11541
  // // this.res.write(chunk);
11312
11542
  // return this.createRequestResponseChain();
11313
11543
  // }
11544
+ resRedirect(statusCode, location) {
11545
+ this.res.statusCode = statusCode;
11546
+ this.res.setHeader(HttpHeaders.Location, location);
11547
+ this.res.end();
11548
+ }
11314
11549
  resWriteHead(statusCode, headers) {
11315
11550
  return this.createRequestResponseChain(this.res.writeHead(statusCode, headers));
11316
11551
  }
@@ -11365,6 +11600,7 @@ var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
11365
11600
  // ../simple-boot-http-server/dist/esm/decorators/MethodMapping.js
11366
11601
  var UrlMappingSituationType = /* @__PURE__ */ ((UrlMappingSituationType2) => {
11367
11602
  UrlMappingSituationType2["REQ_JSON_BODY"] = "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_JSON_BODY";
11603
+ UrlMappingSituationType2["REQ_URL_SEARCH_PARAMS_OBJ"] = "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_URL_SEARCH_PARAMS_OBJ";
11368
11604
  UrlMappingSituationType2["REQ_FORM_URL_BODY"] = "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_FORM_URL_BODY";
11369
11605
  return UrlMappingSituationType2;
11370
11606
  })(UrlMappingSituationType || {});
@@ -11386,42 +11622,6 @@ var ReqMultipartFormBody = class {
11386
11622
  }
11387
11623
  };
11388
11624
 
11389
- // ../simple-boot/dist/esm/decorators/validate/Validation.js
11390
- var ValidMetadataKey = Symbol("ValidMetadataKey");
11391
- var getValidIndex = (target, propertyKey) => {
11392
- if (target !== null && void 0 !== target && typeof target === "object") {
11393
- target = target.constructor;
11394
- }
11395
- if (propertyKey) {
11396
- const parameters = Reflect.getOwnMetadata(ValidMetadataKey, target, propertyKey);
11397
- return parameters ?? [];
11398
- } else {
11399
- return ReflectUtils.getMetadata(ValidMetadataKey, target) ?? [];
11400
- }
11401
- };
11402
- var ValidationMetadataKey = Symbol("ValidationMetadataKey");
11403
- var getValidators = (target) => {
11404
- if (target !== null && void 0 !== target && typeof target === "object") {
11405
- target = target.constructor;
11406
- }
11407
- return ReflectUtils.getMetadata(ValidationMetadataKey, target) ?? [];
11408
- };
11409
- var execValidationInValid = (obj) => {
11410
- return execValidation(obj).filter((it) => !it.valid);
11411
- };
11412
- var execValidation = (obj) => {
11413
- const validators = getValidators(obj);
11414
- const reesults = [];
11415
- validators.forEach((it) => {
11416
- reesults.push({
11417
- name: it.propertyKey,
11418
- valid: it.validator(it.propertyKey, it),
11419
- message: ""
11420
- });
11421
- });
11422
- return reesults;
11423
- };
11424
-
11425
11625
  // ../simple-boot/dist/esm/errors/ValidException.js
11426
11626
  var ValidException = class {
11427
11627
  constructor(result) {
@@ -11520,6 +11720,10 @@ var InjectSituationType;
11520
11720
  InjectSituationType2.TransactionManager = Symbol("TransactionManager");
11521
11721
  })(InjectSituationType || (InjectSituationType = {}));
11522
11722
 
11723
+ // ../simple-boot-http-server/dist/esm/models/datas/search/ReqSearchParamsObj.js
11724
+ var ReqSearchParamsObj = class {
11725
+ };
11726
+
11523
11727
  // ../simple-boot-http-server/dist/esm/SimpleBootHttpServer.js
11524
11728
  var SimpleBootHttpServer = class extends SimpleApplication {
11525
11729
  constructor(option = new HttpServerOption()) {
@@ -11655,6 +11859,7 @@ var SimpleBootHttpServer = class extends SimpleApplication {
11655
11859
  const validIndexs = getValidIndex(moduleInstance, it.propertyKey);
11656
11860
  if (injects) {
11657
11861
  const isJson = injects.find((it2) => it2.config?.situationType === UrlMappingSituationType.REQ_JSON_BODY);
11862
+ const isSearchParamsObj = injects.find((it2) => it2.config?.situationType === UrlMappingSituationType.REQ_URL_SEARCH_PARAMS_OBJ);
11658
11863
  const isFormUrl = injects.find((it2) => it2.config?.situationType === UrlMappingSituationType.REQ_FORM_URL_BODY);
11659
11864
  const isTransactionManager = injects.find((it2) => it2.config?.situationType === InjectSituationType.TransactionManager);
11660
11865
  const siturationContainers = new SituationTypeContainers();
@@ -11674,6 +11879,19 @@ var SimpleBootHttpServer = class extends SimpleApplication {
11674
11879
  data: data2
11675
11880
  }));
11676
11881
  }
11882
+ if (isSearchParamsObj) {
11883
+ let data2 = rr.reqUrlSearchParamsObj;
11884
+ if (validIndexs.includes(isSearchParamsObj.index)) {
11885
+ const inValid = execValidationInValid(data2);
11886
+ if ((inValid?.length ?? 0) > 0) {
11887
+ throw new ValidException(inValid);
11888
+ }
11889
+ }
11890
+ siturationContainers.push(new SituationTypeContainer({
11891
+ situationType: UrlMappingSituationType.REQ_URL_SEARCH_PARAMS_OBJ,
11892
+ data: data2
11893
+ }));
11894
+ }
11677
11895
  if (isFormUrl) {
11678
11896
  let data2 = await rr.reqBodyFormUrlData();
11679
11897
  if (isFormUrl.type) {
@@ -11703,6 +11921,8 @@ var SimpleBootHttpServer = class extends SimpleApplication {
11703
11921
  otherStorage.set(ReqFormUrlBody, await rr.reqBodyReqFormUrlBody());
11704
11922
  } else if (paramType === ReqJsonBody) {
11705
11923
  otherStorage.set(ReqJsonBody, await rr.reqBodyReqJsonBody());
11924
+ } else if (paramType === ReqSearchParamsObj) {
11925
+ otherStorage.set(ReqSearchParamsObj, rr.reqUrlSearchParamsObj);
11706
11926
  } else if (paramType === URLSearchParams3) {
11707
11927
  otherStorage.set(URLSearchParams3, rr.reqUrlSearchParams);
11708
11928
  } else if (paramType === ReqMultipartFormBody) {