@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
@@ -246,6 +246,14 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
246
246
  const isConstructorLike = (fn) => {
247
247
  return typeof fn === "function" && typeof fn.prototype !== "undefined";
248
248
  };
249
+ ValidUtils2.isUrl = (str) => {
250
+ try {
251
+ new URL(str);
252
+ return true;
253
+ } catch (_) {
254
+ return false;
255
+ }
256
+ };
249
257
  ValidUtils2.isFrozen = (obj) => {
250
258
  return Object.isFrozen(obj);
251
259
  };
@@ -682,57 +690,70 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
682
690
  if (Path2.isFunctionScript(path2) || Path2.isArrowFunctionScript(path2)) {
683
691
  return path2;
684
692
  }
685
- if (path2.includes(" ? ") && path2.includes(" : ")) {
686
- const parts = path2.split(/(\s+\?\s+|\s+:\s+)/);
687
- const result = parts.map((part, index) => {
688
- if (index === 0) {
689
- const tokens2 = part.match(/[^?.[\]]+|\[[^\]]*\]/g);
690
- if (tokens2 && tokens2.length > 1) {
691
- return tokens2.join("?.");
692
- }
693
+ const nullishCoalescingPlaceholder = "__NULLISH_COALESCING__";
694
+ const hasNullishCoalescing = path2.includes("??");
695
+ let tempPath = path2;
696
+ if (hasNullishCoalescing) {
697
+ tempPath = tempPath.replace(/\?\?/g, nullishCoalescingPlaceholder);
698
+ }
699
+ const ternaryMatch = tempPath.match(/\?\s+[^:]*:/);
700
+ if (ternaryMatch) {
701
+ const questionMarkIndex = tempPath.indexOf("?");
702
+ const colonIndex = tempPath.indexOf(":", questionMarkIndex);
703
+ if (questionMarkIndex !== -1 && colonIndex !== -1) {
704
+ const charAfterQuestion = tempPath.charAt(questionMarkIndex + 1);
705
+ if (charAfterQuestion === " " || charAfterQuestion === " " || charAfterQuestion === "\n") {
706
+ const condition = tempPath.substring(0, questionMarkIndex).trim();
707
+ const trueBranch = tempPath.substring(questionMarkIndex + 1, colonIndex).trim();
708
+ const falseBranch = tempPath.substring(colonIndex + 1).trim();
709
+ const processedCondition = Path2.toOptionalChainPath(condition);
710
+ const processedTrueBranch = Path2.toOptionalChainPath(trueBranch);
711
+ const processedFalseBranch = Path2.toOptionalChainPath(falseBranch);
712
+ const finalResult = `${processedCondition} ? ${processedTrueBranch} : ${processedFalseBranch}`;
713
+ return hasNullishCoalescing ? finalResult.replace(new RegExp(nullishCoalescingPlaceholder, "g"), "??") : finalResult;
693
714
  }
694
- return part;
695
- });
696
- return result.join("");
715
+ }
697
716
  }
698
- if (path2.includes("(")) {
717
+ if (tempPath.includes("(")) {
699
718
  const functionCallMatches = [];
700
- let tempPath = path2;
719
+ let workingPath = tempPath;
701
720
  let counter = 0;
702
721
  const functionCallRegex = /(\w+)\(([^()]*(?:\([^()]*\)[^()]*)*)\)/g;
703
722
  let match;
704
- while ((match = functionCallRegex.exec(path2)) !== null) {
723
+ while ((match = functionCallRegex.exec(tempPath)) !== null) {
705
724
  const fullMatch = match[0];
706
725
  const funcName = match[1];
707
726
  const funcArgs = match[2];
708
727
  const placeholder = `__FUNC_CALL_${counter}__`;
709
- const processedArgs = funcArgs ? Path2.toOptionalChainPath(funcArgs) : "";
728
+ let processedArgs = funcArgs ? Path2.toOptionalChainPath(funcArgs) : "";
729
+ processedArgs = processedArgs.replace(/\?\.\s*$/, "");
710
730
  const processedFuncCall = `${funcName}?.(${processedArgs})`;
711
731
  functionCallMatches.push({
712
732
  original: fullMatch,
713
733
  processed: processedFuncCall,
714
734
  placeholder
715
735
  });
716
- tempPath = tempPath.replace(fullMatch, placeholder);
736
+ workingPath = workingPath.replace(fullMatch, placeholder);
717
737
  counter++;
718
738
  }
719
- const tokens2 = tempPath.match(/[^?.[\]]+|\[[^\]]*\]/g);
739
+ const tokens2 = workingPath.match(/[^?.[\]]+|\[[^\]]*\]/g);
720
740
  let processedPath = "";
721
741
  if (tokens2 && tokens2.length > 1) {
722
742
  processedPath = tokens2.join("?.");
723
743
  } else {
724
- processedPath = tempPath;
744
+ processedPath = workingPath;
725
745
  }
726
746
  for (const funcMatch of functionCallMatches) {
727
747
  processedPath = processedPath.replace(funcMatch.placeholder, funcMatch.processed);
728
748
  }
729
- return processedPath;
749
+ return hasNullishCoalescing ? processedPath.replace(new RegExp(nullishCoalescingPlaceholder, "g"), "??") : processedPath;
730
750
  }
731
- const tokens = path2.match(/[^?.[\]]+|\[[^\]]*\]/g);
751
+ const tokens = tempPath.match(/[^?.[\]]+|\[[^\]]*\]/g);
732
752
  if (!tokens) {
733
- return path2;
753
+ return hasNullishCoalescing ? path2 : path2;
734
754
  }
735
- return tokens.join("?.");
755
+ const result = tokens.join("?.");
756
+ return hasNullishCoalescing ? result.replace(new RegExp(nullishCoalescingPlaceholder, "g"), "??") : result;
736
757
  };
737
758
  Path2.removeOptionalChainOperator = (path2) => {
738
759
  if (!path2) {
@@ -1205,19 +1226,64 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
1205
1226
  const paths = this.fullPath.split("?");
1206
1227
  return paths[1] ?? "";
1207
1228
  }
1229
+ getQueryParamDecodeURI(key) {
1230
+ const p = this.queryParamsDecodeURI;
1231
+ if (key) {
1232
+ return p[key];
1233
+ } else {
1234
+ return p;
1235
+ }
1236
+ }
1237
+ getQueryParamDecodeURIFirst(key) {
1238
+ const param = this.getQueryParamDecodeURI(key);
1239
+ if (Array.isArray(param)) {
1240
+ return param[0];
1241
+ } else {
1242
+ return param;
1243
+ }
1244
+ }
1245
+ getQueryParam(key) {
1246
+ const p = this.queryParams;
1247
+ if (key) {
1248
+ return p[key];
1249
+ } else {
1250
+ return p;
1251
+ }
1252
+ }
1253
+ getQueryParamFirst(key) {
1254
+ const param = this.getQueryParam(key);
1255
+ if (Array.isArray(param)) {
1256
+ return param[0];
1257
+ } else {
1258
+ return param;
1259
+ }
1260
+ }
1208
1261
  get queryParams() {
1209
1262
  const param = {};
1210
1263
  this.query.split("&")?.forEach((it) => {
1211
1264
  const a = it.split("=");
1212
- param[a[0]] = a[1];
1265
+ if (param[a[0]]) {
1266
+ if (Array.isArray(param[a[0]])) {
1267
+ param[a[0]].push(a[1]);
1268
+ } else {
1269
+ param[a[0]] = [param[a[0]], a[1]];
1270
+ }
1271
+ } else {
1272
+ param[a[0]] = a[1];
1273
+ }
1213
1274
  });
1214
1275
  return param;
1215
1276
  }
1216
- get queryParamsAfterDecodeURI() {
1277
+ get queryParamsDecodeURI() {
1217
1278
  const params = this.queryParams;
1218
1279
  for (const key in params) {
1219
1280
  if (params.hasOwnProperty(key)) {
1220
- params[key] = decodeURIComponent(params[key]);
1281
+ const param = params[key];
1282
+ if (Array.isArray(param)) {
1283
+ params[key] = param.map((p) => decodeURIComponent(p));
1284
+ } else {
1285
+ params[key] = decodeURIComponent(param);
1286
+ }
1221
1287
  }
1222
1288
  }
1223
1289
  return params;
@@ -2607,9 +2673,19 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
2607
2673
  ConvertUtils22.jsonToMap = (jsonStr) => {
2608
2674
  return new Map(JSON.parse(jsonStr));
2609
2675
  };
2676
+ ConvertUtils22.toUrl = (data) => {
2677
+ try {
2678
+ return new URL(data);
2679
+ } catch (e) {
2680
+ throw new Error(`Invalid URL string: ${data}`);
2681
+ }
2682
+ };
2610
2683
  ConvertUtils22.decodeURIString = (data) => {
2611
2684
  return decodeURIComponent(data);
2612
2685
  };
2686
+ ConvertUtils22.encodeURIString = (data) => {
2687
+ return encodeURIComponent(data);
2688
+ };
2613
2689
  ConvertUtils22.objToStrMap = (obj) => {
2614
2690
  const strMap = /* @__PURE__ */ new Map();
2615
2691
  for (const k of Object.keys(obj)) {
@@ -2977,6 +3053,29 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
2977
3053
  ConvertUtils22.stringJsonToKeyPairs = (stringJson) => {
2978
3054
  return Array.from(stringJson.matchAll(/(\w+):\s*([^,}]+)/g)).map((match) => ({ key: match[1], value: match[2] }));
2979
3055
  };
3056
+ ConvertUtils22.stringToBase64 = (str) => {
3057
+ return btoa(str);
3058
+ };
3059
+ ConvertUtils22.uint8ArrayToBase64 = (bytes) => {
3060
+ let binary = "";
3061
+ const len = bytes.byteLength;
3062
+ for (let i = 0; i < len; i++) {
3063
+ binary += String.fromCharCode(bytes[i]);
3064
+ }
3065
+ return btoa(binary);
3066
+ };
3067
+ ConvertUtils22.base64ToString = (base64) => {
3068
+ return atob(base64);
3069
+ };
3070
+ ConvertUtils22.base64ToUint8Array = (base64) => {
3071
+ const binaryString = atob(base64);
3072
+ const len = binaryString.length;
3073
+ const bytes = new Uint8Array(len);
3074
+ for (let i = 0; i < len; i++) {
3075
+ bytes[i] = binaryString.charCodeAt(i);
3076
+ }
3077
+ return bytes;
3078
+ };
2980
3079
  })(ConvertUtils || (ConvertUtils = {}));
2981
3080
 
2982
3081
  // ../simple-boot/dist/esm/lifecycle/OnSimCreate.js
@@ -3101,17 +3200,37 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
3101
3200
  return this.routerChains[0];
3102
3201
  }
3103
3202
  get firstRouteChainValue() {
3104
- return this.firstRouteChain.getValue();
3203
+ return this.firstRouteChain?.getValue();
3105
3204
  }
3106
3205
  get lastRouteChain() {
3107
3206
  return this.routerChains[this.routerChains.length - 1];
3108
3207
  }
3109
3208
  get lastRouteChainValue() {
3110
- return this.lastRouteChain.getValue();
3209
+ return this.lastRouteChain?.getValue();
3111
3210
  }
3112
3211
  hasActivateInLastRoute(obj) {
3113
3212
  return this.lastRouteChainValue?.hasActivate(obj) === true;
3114
3213
  }
3214
+ getQueryParamDecodeURI(key) {
3215
+ if (this.intent) {
3216
+ return this.intent.getQueryParamDecodeURI(key);
3217
+ }
3218
+ }
3219
+ getQueryParamDecodeURIFirst(key) {
3220
+ if (this.intent) {
3221
+ return this.intent.getQueryParamDecodeURIFirst(key);
3222
+ }
3223
+ }
3224
+ getQueryParam(key) {
3225
+ if (this.intent) {
3226
+ return this.intent.getQueryParam(key);
3227
+ }
3228
+ }
3229
+ getQueryParamFirst(key) {
3230
+ if (this.intent) {
3231
+ return this.intent.getQueryParamFirst(key);
3232
+ }
3233
+ }
3115
3234
  get queryParams() {
3116
3235
  if (this.intent) {
3117
3236
  return this.intent.queryParams;
@@ -3119,7 +3238,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
3119
3238
  }
3120
3239
  get queryParamsAfterDecodeURI() {
3121
3240
  if (this.intent) {
3122
- return this.intent.queryParamsAfterDecodeURI;
3241
+ return this.intent.queryParamsDecodeURI;
3123
3242
  }
3124
3243
  }
3125
3244
  };
@@ -3138,7 +3257,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
3138
3257
  };
3139
3258
  })(RouterAction || (RouterAction = {}));
3140
3259
 
3141
- // ../core/dist/esm/message/Subscriber..js
3260
+ // ../core/dist/esm/message/Subscriber.js
3142
3261
  var Subscriber = class {
3143
3262
  constructor(destination) {
3144
3263
  this.destination = destination;
@@ -4243,6 +4362,53 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4243
4362
  }
4244
4363
  };
4245
4364
 
4365
+ // ../simple-boot/dist/esm/intent/IntentSubscribe.js
4366
+ var isIntentSubscribe = (obj) => {
4367
+ return !!obj && typeof obj.intentSubscribe === "function";
4368
+ };
4369
+
4370
+ // ../simple-boot/dist/esm/decorators/cache/CacheDecorator.js
4371
+ var CacheMetadataKey = Symbol("Cache");
4372
+
4373
+ // ../simple-boot/dist/esm/decorators/event/EventListener.js
4374
+ var EventListenerMetadataKey = Symbol("EventListener");
4375
+
4376
+ // ../simple-boot/dist/esm/decorators/validate/Validation.js
4377
+ var ValidMetadataKey = Symbol("ValidMetadataKey");
4378
+ var getValidIndex = (target, propertyKey) => {
4379
+ if (target !== null && void 0 !== target && typeof target === "object") {
4380
+ target = target.constructor;
4381
+ }
4382
+ if (propertyKey) {
4383
+ const parameters = Reflect.getOwnMetadata(ValidMetadataKey, target, propertyKey);
4384
+ return parameters ?? [];
4385
+ } else {
4386
+ return ReflectUtils.getMetadata(ValidMetadataKey, target) ?? [];
4387
+ }
4388
+ };
4389
+ var ValidationMetadataKey = Symbol("ValidationMetadataKey");
4390
+ var getValidators = (target) => {
4391
+ if (target !== null && void 0 !== target && typeof target === "object") {
4392
+ target = target.constructor;
4393
+ }
4394
+ return ReflectUtils.getMetadata(ValidationMetadataKey, target) ?? [];
4395
+ };
4396
+ var execValidationInValid = (obj) => {
4397
+ return execValidation(obj).filter((it) => !it.valid);
4398
+ };
4399
+ var execValidation = (obj) => {
4400
+ const validators = getValidators(obj);
4401
+ const reesults = [];
4402
+ validators.forEach((it) => {
4403
+ reesults.push({
4404
+ name: it.propertyKey,
4405
+ valid: it.validator(it.propertyKey, it),
4406
+ message: ""
4407
+ });
4408
+ });
4409
+ return reesults;
4410
+ };
4411
+
4246
4412
  // ../simple-boot/dist/esm/intent/IntentManager.js
4247
4413
  var __decorate2 = function(decorators, target, key, desc) {
4248
4414
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -4284,7 +4450,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4284
4450
  } else if (typeof it === "string") {
4285
4451
  it = new Intent(it, data);
4286
4452
  }
4287
- let intent = it;
4453
+ const intent = it;
4288
4454
  const r = [];
4289
4455
  if (!routerMatch) {
4290
4456
  if (intent.symbols) {
@@ -4303,7 +4469,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4303
4469
  }
4304
4470
  });
4305
4471
  this.subject.next(it);
4306
- targetInstances.forEach((data2) => {
4472
+ for (let data2 of targetInstances) {
4307
4473
  let orNewSim = data2;
4308
4474
  if (orNewSim) {
4309
4475
  if (intent.paths.length > 0) {
@@ -4315,6 +4481,18 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4315
4481
  lastProp = i;
4316
4482
  });
4317
4483
  if (orNewSim && typeof orNewSim === "function") {
4484
+ const injects = getInject(callthis, orNewSim.name);
4485
+ if (injects) {
4486
+ for (const inject of injects) {
4487
+ let v = this.simstanceManager.findLastSim(inject.config).getValue();
4488
+ if (typeof inject.config.returnFactory === "function") {
4489
+ v = await inject.config.returnFactory({ instance: callthis, methodName: orNewSim.name, parameter: intent.data }, v);
4490
+ } else if (typeof inject.config.returnFactory === "string") {
4491
+ v = await v[inject.config.returnFactory]({ instance: callthis, methodName: orNewSim.name, parameter: intent.data }, v);
4492
+ }
4493
+ intent.data[inject.index] = v;
4494
+ }
4495
+ }
4318
4496
  if (PublishType.DATA_PARAMETERS === intent.publishType) {
4319
4497
  r.push(orNewSim.call(callthis, intent.data));
4320
4498
  } else if (PublishType.INLINE_DATA_PARAMETERS === intent.publishType) {
@@ -4328,15 +4506,22 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4328
4506
  }
4329
4507
  } else {
4330
4508
  if (PublishType.DATA_PARAMETERS === intent.publishType) {
4331
- r.push(orNewSim?.intentSubscribe?.(intent.data));
4509
+ if (isIntentSubscribe(orNewSim)) {
4510
+ r.push(orNewSim.intentSubscribe(intent.data));
4511
+ }
4332
4512
  } else if (PublishType.INLINE_DATA_PARAMETERS === intent.publishType) {
4333
- r.push(orNewSim?.intentSubscribe?.(...intent.data));
4513
+ if (isIntentSubscribe(orNewSim)) {
4514
+ r.push(orNewSim.intentSubscribe(...intent.data));
4515
+ }
4334
4516
  } else {
4335
- r.push(orNewSim?.intentSubscribe?.(intent));
4517
+ if (isIntentSubscribe(orNewSim)) {
4518
+ r.push(orNewSim?.intentSubscribe?.(intent));
4519
+ }
4336
4520
  }
4337
4521
  }
4338
4522
  }
4339
- });
4523
+ }
4524
+ ;
4340
4525
  return r;
4341
4526
  }
4342
4527
  };
@@ -4348,6 +4533,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4348
4533
  // ../simple-boot-http-server/dist/esm/codes/HttpStatus.js
4349
4534
  var HttpStatus = /* @__PURE__ */ ((HttpStatus2) => {
4350
4535
  HttpStatus2[HttpStatus2["Ok"] = 200] = "Ok";
4536
+ HttpStatus2[HttpStatus2["MultipleChoices"] = 300] = "MultipleChoices";
4351
4537
  HttpStatus2[HttpStatus2["MovedPermanently"] = 301] = "MovedPermanently";
4352
4538
  HttpStatus2[HttpStatus2["Found"] = 302] = "Found";
4353
4539
  HttpStatus2[HttpStatus2["SeeOther"] = 303] = "SeeOther";
@@ -4526,7 +4712,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4526
4712
 
4527
4713
  // ../core/dist/esm/string/StringUtils.js
4528
4714
  var StringUtils;
4529
- (function(StringUtils2) {
4715
+ ((StringUtils2) => {
4530
4716
  StringUtils2.deleteEnter = (data) => {
4531
4717
  return data.replace(/\r?\n/g, "");
4532
4718
  };
@@ -4569,8 +4755,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4569
4755
  return s;
4570
4756
  };
4571
4757
  StringUtils2.unescape = (html) => {
4572
- if (!html)
4573
- return "";
4758
+ if (!html) return "";
4574
4759
  const htmlEntity = {
4575
4760
  quot: '"',
4576
4761
  amp: "&",
@@ -4620,8 +4805,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4620
4805
  return formatString.replace(/\${([^{}]*)}/g, (matched, piece) => String(object[piece] ?? matched));
4621
4806
  };
4622
4807
  StringUtils2.ellipsis = (text, length) => {
4623
- if (text.length > length)
4624
- return `${text.slice(0, length)}...`;
4808
+ if (text.length > length) return `${text.slice(0, length)}...`;
4625
4809
  return text;
4626
4810
  };
4627
4811
  StringUtils2.appendPostposition = (text, { vowel, consonant }) => {
@@ -4914,6 +5098,29 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4914
5098
  await Promise.all(executing);
4915
5099
  return results;
4916
5100
  };
5101
+ Promises2.retry = async (factory, config) => {
5102
+ const initialDelay = config.delay?.initialDelay ?? 0;
5103
+ const retryDelay = config.delay?.retryDelay ?? 0;
5104
+ if (initialDelay > 0) {
5105
+ await (0, Promises2.sleep)(initialDelay);
5106
+ }
5107
+ let lastError;
5108
+ for (let attempt = 0; attempt <= config.retry; attempt++) {
5109
+ try {
5110
+ return await factory(attempt, lastError);
5111
+ } catch (error) {
5112
+ lastError = error;
5113
+ if (attempt === config.retry) {
5114
+ break;
5115
+ }
5116
+ config.onRetry?.(error, attempt + 1);
5117
+ if (retryDelay > 0) {
5118
+ await (0, Promises2.sleep)(retryDelay);
5119
+ }
5120
+ }
5121
+ }
5122
+ throw lastError;
5123
+ };
4917
5124
  let Result;
4918
5125
  ((Result2) => {
4919
5126
  async function awaitWrap(promise) {
@@ -5431,11 +5638,11 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5431
5638
  findAttrElements(fragment, config) {
5432
5639
  const elements = /* @__PURE__ */ new Set();
5433
5640
  const addAttributes = config?.applyEvents?.map((it) => it.attrName) ?? [];
5434
- addAttributes.concat([..._EventManager2.attrNames]).forEach((attrName) => {
5435
- fragment?.querySelectorAll(`[${attrName}]`).forEach((it) => {
5436
- elements.add(it);
5437
- });
5438
- });
5641
+ const attrs = addAttributes.concat([..._EventManager2.attrNames]).filter(Boolean);
5642
+ if (attrs.length) {
5643
+ const selector = attrs.map((a) => `[${a}]`).join(",");
5644
+ fragment?.querySelectorAll(selector).forEach((it) => elements.add(it));
5645
+ }
5439
5646
  return elements;
5440
5647
  }
5441
5648
  applyEvent(obj, childNodes, config) {
@@ -5447,7 +5654,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5447
5654
  this.procAttr(childNodes, _EventManager2.valueAttrName, (it, attribute) => {
5448
5655
  const script = attribute;
5449
5656
  if (script) {
5450
- const data = ScriptUtils.evaluateReturn(script, obj);
5657
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5451
5658
  if (it.value !== data) {
5452
5659
  it.value = data;
5453
5660
  }
@@ -5456,7 +5663,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5456
5663
  this.procAttr(childNodes, _EventManager2.checkedAttrName, (it, attribute) => {
5457
5664
  const script = attribute;
5458
5665
  if (script) {
5459
- const data = ScriptUtils.evaluateReturn(script, obj);
5666
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5460
5667
  if (it.checked !== data) {
5461
5668
  it.checked = data;
5462
5669
  }
@@ -5465,7 +5672,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5465
5672
  this.procAttr(childNodes, _EventManager2.selectedAttrName, (it, attribute) => {
5466
5673
  const script = attribute;
5467
5674
  if (script) {
5468
- const data = ScriptUtils.evaluateReturn(script, obj);
5675
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5469
5676
  if (it.selected !== data) {
5470
5677
  it.selected = data;
5471
5678
  }
@@ -5474,7 +5681,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5474
5681
  this.procAttr(childNodes, _EventManager2.readonlyAttrName, (it, attribute) => {
5475
5682
  const script = attribute;
5476
5683
  if (script) {
5477
- const data = ScriptUtils.evaluateReturn(script, obj);
5684
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5478
5685
  if (it.readOnly !== data) {
5479
5686
  it.readOnly = data;
5480
5687
  }
@@ -5483,7 +5690,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5483
5690
  this.procAttr(childNodes, _EventManager2.disabledAttrName, (it, attribute) => {
5484
5691
  const script = attribute;
5485
5692
  if (script) {
5486
- const data = ScriptUtils.evaluateReturn(script, obj);
5693
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5487
5694
  if (it.disabled !== data) {
5488
5695
  it.disabled = data;
5489
5696
  }
@@ -5492,7 +5699,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5492
5699
  this.procAttr(childNodes, _EventManager2.hiddenAttrName, (it, attribute) => {
5493
5700
  const script = attribute;
5494
5701
  if (script) {
5495
- const data = ScriptUtils.evaluateReturn(script, obj);
5702
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5496
5703
  if (it.hidden !== data) {
5497
5704
  it.hidden = data;
5498
5705
  }
@@ -5501,7 +5708,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5501
5708
  this.procAttr(childNodes, _EventManager2.requiredAttrName, (it, attribute) => {
5502
5709
  const script = attribute;
5503
5710
  if (script) {
5504
- const data = ScriptUtils.evaluateReturn(script, obj);
5711
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5505
5712
  if (it.required !== data) {
5506
5713
  it.required = data;
5507
5714
  }
@@ -5510,7 +5717,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5510
5717
  this.procAttr(childNodes, _EventManager2.openAttrName, (it, attribute) => {
5511
5718
  const script = attribute;
5512
5719
  if (script) {
5513
- const data = ScriptUtils.evaluateReturn(script, obj);
5720
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5514
5721
  if (it.open !== data) {
5515
5722
  it.open = data;
5516
5723
  }
@@ -5521,17 +5728,27 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5521
5728
  map.forEach((v, k) => {
5522
5729
  const variablePaths = v.variablePaths;
5523
5730
  let targetScript = v.originalAttrValue;
5524
- variablePaths.forEach((it2) => {
5525
- let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
5526
- targetScript = targetScript.replaceAll(it2.origin, `\${${r}}`);
5527
- });
5528
- const data = ObjectUtils.Script.evaluate(`const $element = this.element; return ${"`" + targetScript + "`"} `, Object.assign(obj, {
5731
+ let script;
5732
+ if (v.isStringTemplate) {
5733
+ variablePaths.forEach((it2) => {
5734
+ let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
5735
+ targetScript = targetScript.replaceAll(it2.origin, `\${${r}}`);
5736
+ });
5737
+ script = "`" + targetScript + "`";
5738
+ } else {
5739
+ variablePaths.forEach((it2) => {
5740
+ let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
5741
+ targetScript = targetScript.replaceAll(it2.origin, `${r}`);
5742
+ });
5743
+ script = targetScript;
5744
+ }
5745
+ const data = ObjectUtils.Script.evaluate(`const $element = this.element; return ${script}`, Object.assign(obj, {
5529
5746
  __render: Object.freeze({
5530
5747
  element: it,
5531
5748
  attribute: ElementUtils.getAttributeToObject(it)
5532
5749
  })
5533
5750
  }));
5534
- if (data === null) {
5751
+ if (data === null || data === void 0) {
5535
5752
  it.removeAttribute(k);
5536
5753
  } else {
5537
5754
  it.setAttribute(k, data);
@@ -5550,19 +5767,19 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5550
5767
  const mapScript = it.getAttribute(`${linkInfo.name}:map`);
5551
5768
  let bindObj = obj;
5552
5769
  if (ownerVariablePathName) {
5553
- bindObj = ScriptUtils.evaluateReturn(ownerVariablePathName, obj);
5770
+ bindObj = ObjectUtils.Script.evaluateReturn(ownerVariablePathName, obj);
5554
5771
  }
5555
5772
  const getValue = this.getValue(obj, varName, bindObj);
5556
5773
  if (typeof getValue === "function" && getValue) {
5557
5774
  let setValue = it[linkInfo.property];
5558
5775
  if (mapScript) {
5559
- 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 }) }));
5776
+ 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 }) }));
5560
5777
  }
5561
5778
  getValue(setValue);
5562
5779
  } else if (getValue) {
5563
5780
  let setValue = getValue;
5564
5781
  if (mapScript) {
5565
- 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 }) }));
5782
+ 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 }) }));
5566
5783
  }
5567
5784
  if (setValue === null) {
5568
5785
  it.removeAttribute(linkInfo.property);
@@ -5585,10 +5802,10 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5585
5802
  const filterScript = element.getAttribute(`${attr}:filter`);
5586
5803
  let filter2 = true;
5587
5804
  if (filterScript) {
5588
- filter2 = ScriptUtils.evaluate(`${this.getBindScript(config)} return ${filterScript}`, context) ?? false;
5805
+ filter2 = ObjectUtils.Script.evaluate(`${this.getBindScript(config)} return ${filterScript}`, context) ?? false;
5589
5806
  }
5590
5807
  if (filter2) {
5591
- ScriptUtils.evaluate(`${this.getBindScript(config)} ${script}`, context);
5808
+ ObjectUtils.Script.evaluate(`${this.getBindScript(config)} ${script}`, context);
5592
5809
  }
5593
5810
  };
5594
5811
  element.addEventListener(eventName, handler);
@@ -5600,7 +5817,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5600
5817
  script = "return " + script;
5601
5818
  }
5602
5819
  if (script) {
5603
- ScriptUtils.evaluate(`${this.getBindScript(config)}; ${script} `, Object.assign(obj, {
5820
+ ObjectUtils.Script.evaluate(`${this.getBindScript(config)}; ${script} `, Object.assign(obj, {
5604
5821
  __render: Object.freeze({
5605
5822
  element: it,
5606
5823
  attribute: ElementUtils.getAttributeToObject(it),
@@ -5626,7 +5843,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5626
5843
  script = "return " + script;
5627
5844
  }
5628
5845
  if (script) {
5629
- ScriptUtils.evaluate(`${this.getBindScript(config)}; ${script} `, Object.assign(obj, {
5846
+ ObjectUtils.Script.evaluate(`${this.getBindScript(config)}; ${script} `, Object.assign(obj, {
5630
5847
  __render: Object.freeze({
5631
5848
  element: it,
5632
5849
  attribute: ElementUtils.getAttributeToObject(it),
@@ -5643,21 +5860,29 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5643
5860
  script = "return " + script;
5644
5861
  }
5645
5862
  if (_EventManager2.isUsingThisVar(script, varName) || varName === void 0) {
5646
- const data = ScriptUtils.evaluate(`const $element = this.__render.element; ${script} `, Object.assign(obj, {
5863
+ const data = ObjectUtils.Script.evaluate(`const $element = this.__render.element; ${script} `, Object.assign(obj, {
5647
5864
  __render: Object.freeze({
5648
5865
  element: it,
5649
5866
  attribute: ElementUtils.getAttributeToObject(it)
5650
5867
  })
5651
5868
  }));
5652
5869
  if (typeof data === "string") {
5653
- it.setAttribute("style", data);
5870
+ data.split(";").forEach((sit) => {
5871
+ const [key, value] = sit.split(":").map((s) => s.trim());
5872
+ if (key && value) {
5873
+ it.style[key] = value;
5874
+ }
5875
+ });
5654
5876
  } else if (Array.isArray(data)) {
5655
- it.setAttribute("style", data.join(";"));
5877
+ data.forEach((sit) => {
5878
+ const [key, value] = sit.split(":").map((s) => s.trim());
5879
+ if (key && value) {
5880
+ it.style[key] = value;
5881
+ }
5882
+ });
5656
5883
  } else {
5657
5884
  for (const [key, value] of Object.entries(data)) {
5658
- if (it instanceof HTMLElement) {
5659
- it.style[key] = String(value);
5660
- }
5885
+ it.style[key] = value === null ? null : String(value);
5661
5886
  }
5662
5887
  }
5663
5888
  }
@@ -5668,29 +5893,77 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5668
5893
  script = "return " + script;
5669
5894
  }
5670
5895
  if (_EventManager2.isUsingThisVar(script, varName) || varName === void 0) {
5671
- const data = ScriptUtils.evaluate(`const $element = this.element; ${script} `, Object.assign(obj, {
5896
+ const data = ObjectUtils.Script.evaluate(`const $element = this.element; ${script} `, Object.assign(obj, {
5672
5897
  __render: Object.freeze({
5673
5898
  element: it,
5674
5899
  attribute: ElementUtils.getAttributeToObject(it)
5675
5900
  })
5676
5901
  }));
5677
5902
  if (typeof data === "string") {
5678
- it.setAttribute("class", data);
5903
+ data.split(" ").forEach((cit) => it.classList.add(cit.trim()));
5679
5904
  } else if (Array.isArray(data)) {
5680
- it.setAttribute("class", data.join(" "));
5905
+ data.forEach((cit) => it.classList.add(cit.trim()));
5681
5906
  } else {
5682
5907
  for (const [key, value] of Object.entries(data)) {
5683
5908
  if (it instanceof HTMLElement) {
5684
5909
  if (value) {
5685
- it.classList.add(key);
5910
+ it.classList.add(key.trim());
5686
5911
  } else {
5687
- it.classList.remove(key);
5912
+ it.classList.remove(key.trim());
5688
5913
  }
5689
5914
  }
5690
5915
  }
5691
5916
  }
5692
5917
  }
5693
5918
  });
5919
+ this.procAttr(elements, _EventManager2.valueAttrName, (it, attribute) => {
5920
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5921
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5922
+ if (it.value !== data) it.value = data;
5923
+ }
5924
+ });
5925
+ this.procAttr(elements, _EventManager2.checkedAttrName, (it, attribute) => {
5926
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5927
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5928
+ if (it.checked !== data) it.checked = data;
5929
+ }
5930
+ });
5931
+ this.procAttr(elements, _EventManager2.selectedAttrName, (it, attribute) => {
5932
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5933
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5934
+ if (it.selected !== data) it.selected = data;
5935
+ }
5936
+ });
5937
+ this.procAttr(elements, _EventManager2.readonlyAttrName, (it, attribute) => {
5938
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5939
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5940
+ if (it.readOnly !== data) it.readOnly = data;
5941
+ }
5942
+ });
5943
+ this.procAttr(elements, _EventManager2.disabledAttrName, (it, attribute) => {
5944
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5945
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5946
+ if (it.disabled !== data) it.disabled = data;
5947
+ }
5948
+ });
5949
+ this.procAttr(elements, _EventManager2.hiddenAttrName, (it, attribute) => {
5950
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5951
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5952
+ if (it.hidden !== data) it.hidden = data;
5953
+ }
5954
+ });
5955
+ this.procAttr(elements, _EventManager2.requiredAttrName, (it, attribute) => {
5956
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5957
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5958
+ if (it.required !== data) it.required = data;
5959
+ }
5960
+ });
5961
+ this.procAttr(elements, _EventManager2.openAttrName, (it, attribute) => {
5962
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5963
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5964
+ if (it.open !== data) it.open = data;
5965
+ }
5966
+ });
5694
5967
  }
5695
5968
  procAttr(elements = /* @__PURE__ */ new Set(), attrName, callBack) {
5696
5969
  const sets = /* @__PURE__ */ new Set();
@@ -5906,7 +6179,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5906
6179
  const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
5907
6180
  const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
5908
6181
  const newTemp = this.source.config.window.document.createElement("temp");
5909
- ScriptUtils.evaluate(`
6182
+ ObjectUtils.Script.evaluate(`
5910
6183
  ${this.render.bindScript}
5911
6184
  const n = $element.cloneNode(true);
5912
6185
  var destIt = ${this.elementSource.attrs.drItOption};
@@ -6064,7 +6337,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6064
6337
  var DrThis = class extends OperatorExecuterAttrRequire {
6065
6338
  async executeAttrRequire(attr) {
6066
6339
  const optionIf = this.elementSource.attrs.drDetectIfOption ?? this.elementSource.attrs.drIfOption;
6067
- const ok = ScriptUtils.evaluate(`
6340
+ const ok = ObjectUtils.Script.evaluate(`
6068
6341
  ${this.render.bindScript}
6069
6342
  try {
6070
6343
  const ok = ${this.elementSource.attrs.drThis};
@@ -6400,9 +6673,9 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6400
6673
  }
6401
6674
  async executeAttrRequire(attr) {
6402
6675
  RawSet.drFormOtherMoveAttr(this.elementSource.element, "name", "temp-name", this.source.config);
6403
- const data = ScriptUtils.evaluateReturn(`${attr}`, this.source.obj);
6676
+ const data = ObjectUtils.Script.evaluateReturn(`${attr}`, this.source.obj);
6404
6677
  const childs = Array.from(this.elementSource.element.querySelectorAll("[name]"));
6405
- const fromName = ScriptUtils.evaluateReturn(this.elementSource.element.getAttribute(`${RawSet.DR_FORM_NAME}:name`) ?? "", this.source.obj);
6678
+ const fromName = ObjectUtils.Script.evaluateReturn(this.elementSource.element.getAttribute(`${RawSet.DR_FORM_NAME}:name`) ?? "", this.source.obj);
6406
6679
  const thisName = fromName ?? this.elementSource.element.getAttribute("name");
6407
6680
  if (childs.length <= 0 && thisName) {
6408
6681
  childs.push(this.elementSource.element);
@@ -6415,10 +6688,10 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6415
6688
  const eventName = it.getAttribute(`${RawSet.DR_FORM_NAME}:event`) ?? "change";
6416
6689
  const validatorName = it.getAttribute(`${RawSet.DR_FORM_NAME}:validator`);
6417
6690
  const attrEventName = EventManager.attrPrefix + "event-" + eventName;
6418
- let varpath = ScriptUtils.evaluateReturn(this.elementSource.element.getAttribute(`${RawSet.DR_FORM_NAME}:name`) ?? "", this.source.obj) ?? it.getAttribute("name");
6691
+ let varpath = ObjectUtils.Script.evaluateReturn(this.elementSource.element.getAttribute(`${RawSet.DR_FORM_NAME}:name`) ?? "", this.source.obj) ?? it.getAttribute("name");
6419
6692
  if (varpath != null) {
6420
6693
  if (validatorName) {
6421
- ScriptUtils.evaluate(
6694
+ ObjectUtils.Script.evaluate(
6422
6695
  `
6423
6696
  ${this.render.bindScript}
6424
6697
  const validator = typeof ${validatorName} ==='function' ? new ${validatorName}() : ${validatorName};
@@ -6436,7 +6709,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6436
6709
  );
6437
6710
  }
6438
6711
  varpath = `${attr}['${varpath}']`;
6439
- const data2 = ScriptUtils.evaluateReturn(`${varpath}`, this.source.obj);
6712
+ const data2 = ObjectUtils.Script.evaluateReturn(`${varpath}`, this.source.obj);
6440
6713
  if (data2 instanceof ValidatorArray) {
6441
6714
  it.setAttribute(attrEventName, `${varpath}.setArrayValue($target, $target.value, $event); ${it.getAttribute(attrEventName) ?? ""};`);
6442
6715
  data2.addValidator(it.value, it);
@@ -6497,7 +6770,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6497
6770
  }
6498
6771
  async executeAttrRequire(attr) {
6499
6772
  const newTemp = this.source.config.window.document.createElement("temp");
6500
- ScriptUtils.evaluate(`
6773
+ ObjectUtils.Script.evaluate(`
6501
6774
  ${this.render.bindScript}
6502
6775
  const n = $element.cloneNode(true);
6503
6776
  ${this.elementSource.attrs.drBeforeOption ?? ""}
@@ -6536,7 +6809,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6536
6809
  const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
6537
6810
  const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
6538
6811
  const newTemp = this.source.config.window.document.createElement("temp");
6539
- ScriptUtils.evaluate(`
6812
+ ObjectUtils.Script.evaluate(`
6540
6813
  ${this.render.bindScript}
6541
6814
  ${this.elementSource.attrs.drBeforeOption ?? ""}
6542
6815
  for(${attr}) {
@@ -6585,6 +6858,10 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6585
6858
  const variableName = this.elementSource.element.getAttribute(RawSet.DR_VARIABLE_NAME_OPTIONNAME);
6586
6859
  const itemVariableName = this.elementSource.element.getAttribute(RawSet.DR_ITEM_VARIABLE_NAME_OPTIONNAME);
6587
6860
  const itemIndexVariableName = this.elementSource.element.getAttribute(RawSet.DR_ITEM_INDEX_VARIABLE_NAME_OPTIONNAME);
6861
+ const hasVariableName = this.elementSource.element.hasAttribute(RawSet.DR_VARIABLE_NAME_OPTIONNAME);
6862
+ const hasItemVariableName = this.elementSource.element.hasAttribute(RawSet.DR_ITEM_VARIABLE_NAME_OPTIONNAME);
6863
+ const hasItemIndexVariableName = this.elementSource.element.hasAttribute(RawSet.DR_ITEM_INDEX_VARIABLE_NAME_OPTIONNAME);
6864
+ const t0 = performance.now();
6588
6865
  ObjectUtils.Script.evaluate(`
6589
6866
  ${this.render.bindScript}
6590
6867
  ${this.elementSource.attrs.drBeforeOption ?? ""}
@@ -6592,6 +6869,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6592
6869
  const forOf = ${ObjectUtils.Path.toOptionalChainPath(attr)};
6593
6870
  const forOfStr = \`${attr}\`.trim();
6594
6871
  // console.log('forOf---',forOf);
6872
+ // debugger;
6595
6873
  if (forOf) {
6596
6874
  for(const it of forOf) {
6597
6875
  i++;
@@ -6610,16 +6888,39 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6610
6888
  const n = this.__render.element.cloneNode(true);
6611
6889
  Object.entries(this.__render.drAttr).filter(([k,v]) => k !== 'drForOf' && k !== 'drNextOption' && v).forEach(([k, v]) => n.setAttribute(this.__render.drAttrsOriginName[k], v));
6612
6890
  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)))
6613
- if ('${variableName}') {
6891
+ if (${hasVariableName} && '${variableName}') {
6614
6892
  n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replaceAll('#${variableName}#', forOfStr)));
6615
6893
  }
6616
- if ('${itemVariableName}') {
6894
+ if (${hasItemVariableName} && '${itemVariableName}') {
6617
6895
  n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replaceAll('#${itemVariableName}#', destIt)));
6618
6896
  }
6619
- if ('${itemIndexVariableName}') {
6897
+ if (${hasItemIndexVariableName} && '${itemIndexVariableName}') {
6620
6898
  n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replaceAll('#${itemIndexVariableName}#', i)));
6621
6899
  }
6622
6900
 
6901
+ const hasDrOptionAttr = n.hasAttribute('${RawSet.DR_ATTR_OPTIONNAME}');
6902
+ if (hasDrOptionAttr) {
6903
+ const drOptionAttr = n.getAttribute('${RawSet.DR_ATTR_OPTIONNAME}');
6904
+ const drOptionAttrResult = $scriptUtils.evaluateReturn(drOptionAttr, this);
6905
+ Array.from(Object.entries(drOptionAttrResult??{})).forEach(([k,v])=>{
6906
+ if (v === null) {
6907
+ n.removeAttribute(k);
6908
+ } else {
6909
+ n.setAttribute(k,v);
6910
+ }
6911
+ })
6912
+
6913
+ }
6914
+ const hasDrOptionIf = n.hasAttribute('${RawSet.DR_IF_OPTIONNAME}');
6915
+ if (hasDrOptionIf) {
6916
+ const drOptionIf = n.getAttribute('${RawSet.DR_IF_OPTIONNAME}');
6917
+ const e = $scriptUtils.evaluateReturn(drOptionIf, this);
6918
+ if(!e) {
6919
+ continue;
6920
+ }
6921
+
6922
+ }
6923
+
6623
6924
  const drOptionAttr = n.getAttribute('${RawSet.DR_DETECT_ATTR_OPTIONNAME}');
6624
6925
  if (drOptionAttr) {
6625
6926
  const drOptionAttrResult = $scriptUtils.evaluateReturn(drOptionAttr, this);
@@ -6642,13 +6943,13 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6642
6943
  }
6643
6944
 
6644
6945
  n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt).replace(/\\#index\\#/g, i);
6645
- if ('${variableName}') {
6946
+ if (${hasVariableName} && '${variableName}') {
6646
6947
  n.innerHTML = n.innerHTML.replaceAll('#${variableName}#', forOfStr);
6647
6948
  }
6648
- if ('${itemVariableName}') {
6949
+ if (${hasItemVariableName} && '${itemVariableName}') {
6649
6950
  n.innerHTML = n.innerHTML.replaceAll('#${itemVariableName}#', destIt);
6650
6951
  }
6651
- if ('${itemIndexVariableName}') {
6952
+ if (${hasItemIndexVariableName} && '${itemIndexVariableName}') {
6652
6953
  n.innerHTML = n.innerHTML.replaceAll('#${itemIndexVariableName}#', i);
6653
6954
  }
6654
6955
 
@@ -6702,7 +7003,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6702
7003
  const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
6703
7004
  const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
6704
7005
  const newTemp = this.source.config.window.document.createElement("temp");
6705
- ScriptUtils.evaluate(`
7006
+ ObjectUtils.Script.evaluate(`
6706
7007
  try{
6707
7008
  ${this.render.bindScript}
6708
7009
  ${this.elementSource.attrs.drBeforeOption ?? ""}
@@ -6760,7 +7061,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6760
7061
  const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
6761
7062
  const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
6762
7063
  const newTemp = this.source.config.window.document.createElement("temp");
6763
- ScriptUtils.evaluate(`
7064
+ ObjectUtils.Script.evaluate(`
6764
7065
  ${this.render.bindScript}
6765
7066
  ${this.elementSource.attrs.drBeforeOption ?? ""}
6766
7067
  var i = 0;
@@ -6815,9 +7116,18 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6815
7116
  super(rawSet, render, returnContainer, elementSource, source, afterCallBack, false);
6816
7117
  }
6817
7118
  async execute() {
6818
- const targetElement = this.source.config?.targetElements?.find(
6819
- (it) => it.name.toLowerCase() === this.elementSource.element.tagName.toLowerCase()
6820
- );
7119
+ let targetElement = void 0;
7120
+ let isTargetElementElement = this.elementSource.element.tagName.toLowerCase() === RawSet.DR_TARGET_ELEMENT_ELEMENTNAME.toLowerCase();
7121
+ if (isTargetElementElement) {
7122
+ const targetElementTagName = this.elementSource.element.getAttribute(`${RawSet.DR_TARGET_ELEMENT_ELEMENTNAME}:is`)?.toLowerCase();
7123
+ targetElement = this.source.config?.targetElements?.find(
7124
+ (it) => it.name.toLowerCase() === targetElementTagName
7125
+ );
7126
+ } else {
7127
+ targetElement = this.source.config?.targetElements?.find(
7128
+ (it) => it.name.toLowerCase() === this.elementSource.element.tagName.toLowerCase()
7129
+ );
7130
+ }
6821
7131
  if (targetElement) {
6822
7132
  if (this.rawSet.point.start instanceof this.source.config.window.HTMLMetaElement && this.rawSet.point.end instanceof this.source.config.window.HTMLMetaElement) {
6823
7133
  this.rawSet.point.start.setAttribute("this-path", `this.__domrender_components.${this.rawSet.uuid}`);
@@ -6837,7 +7147,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6837
7147
  this.rawSet.detect = {
6838
7148
  action: () => {
6839
7149
  const script = `var $component = this.__render.component; var $element = this.__render.element; var $innerHTML = this.__render.innerHTML; var $attribute = this.__render.attribute; ${detectAction} `;
6840
- ScriptUtils.evaluate(
7150
+ ObjectUtils.Script.evaluate(
6841
7151
  script,
6842
7152
  Object.assign(this.source.obj, {
6843
7153
  __render: this.rawSet.dataSet.render
@@ -6918,7 +7228,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6918
7228
  }
6919
7229
  async executeAttrRequire(attr) {
6920
7230
  const newTemp = this.source.config.window.document.createElement("temp");
6921
- ScriptUtils.evaluate(`
7231
+ ObjectUtils.Script.evaluate(`
6922
7232
  ${this.render.bindScript}
6923
7233
  ${this.elementSource.attrs.drBeforeOption ?? ""}
6924
7234
  const n = $element.cloneNode(true);
@@ -6980,7 +7290,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6980
7290
  const newTemp = this.source.config.window.document.createElement("temp");
6981
7291
  const dictioanry = ScriptUtils.evaluateReturn(attr, this.source.obj);
6982
7292
  const dictionaryKey = this.elementSource.attrs.drKeyOption ?? "";
6983
- ScriptUtils.evaluate(`
7293
+ ObjectUtils.Script.evaluate(`
6984
7294
  ${this.render.bindScript}
6985
7295
  ${this.elementSource.attrs.drBeforeOption ?? ""}
6986
7296
  var i = 0;
@@ -7488,7 +7798,7 @@ ${indentStr}}`;
7488
7798
  this.rawSet.detect = {
7489
7799
  action: () => {
7490
7800
  const script = `var $component = this.__render.component; var $element = this.__render.element; var $innerHTML = this.__render.innerHTML; var $attribute = this.__render.attribute; ${detectAction} `;
7491
- ScriptUtils.evaluate(script, Object.assign(this.source.obj, {
7801
+ ObjectUtils.Script.evaluate(script, Object.assign(this.source.obj, {
7492
7802
  __render: this.rawSet.dataSet.render
7493
7803
  }));
7494
7804
  }
@@ -7546,7 +7856,7 @@ ${indentStr}}`;
7546
7856
  NodeUtils2.replaceNode = (targetNode, newNode) => {
7547
7857
  return targetNode.parentNode?.replaceChild(newNode, targetNode);
7548
7858
  };
7549
- NodeUtils2.addNode = (targetNode, newNode) => {
7859
+ NodeUtils2.insertAfter = (targetNode, newNode) => {
7550
7860
  return targetNode.parentNode?.insertBefore(newNode, targetNode.nextSibling);
7551
7861
  };
7552
7862
  NodeUtils2.cloneNode = (element, deep) => {
@@ -7660,10 +7970,49 @@ ${indentStr}}`;
7660
7970
  });
7661
7971
  return usingTriggerVariables;
7662
7972
  }
7663
- // 중요 render 처리 부분
7664
- // public async render(obj: any, config: DomRenderConfig): Promise<RawSet[]> {
7665
- // }
7666
7973
  async render(obj, config) {
7974
+ if (this.dataSet.fragment.childNodes.length === 1 && this.dataSet.fragment.childNodes[0].nodeType === Node.TEXT_NODE) {
7975
+ const textContent = this.dataSet.fragment.childNodes[0].textContent;
7976
+ if (textContent) {
7977
+ const runText = _RawSet2.expressionGroups(textContent)[0][1];
7978
+ const __render = {
7979
+ rawSet: this,
7980
+ scripts: EventManager.setBindProperty(config?.scripts, obj),
7981
+ router: config?.router,
7982
+ range: Range.range,
7983
+ element: this.dataSet.fragment.childNodes[0],
7984
+ attribute: {},
7985
+ rootObject: obj,
7986
+ scriptUtils: ObjectUtils.Script,
7987
+ nearThis: this.findNearThis(obj),
7988
+ parentThis: this.findParentThis(obj),
7989
+ bindScript: ` /** render **/
7990
+ const ${EventManager.SCRIPTS_VARNAME} = this.__render.scripts;
7991
+ const ${EventManager.RAWSET_VARNAME} = this.__render.rawSet;
7992
+ const ${EventManager.ELEMENT_VARNAME} = this.__render.element;
7993
+ const ${EventManager.ATTRIBUTE_VARNAME} = this.__render.attribute;
7994
+ const ${EventManager.RANGE_VARNAME} = this.__render.range;
7995
+ const ${EventManager.ROUTER_VARNAME} = this.__render.router;
7996
+ const ${EventManager.NEAR_THIS_VARNAME} = this.__render.nearThis;
7997
+ const ${EventManager.PARENT_THIS_VARNAME} = this.__render.parentThis;
7998
+ const ${EventManager.SCRIPT_UTILS_VARNAME} = this.__render.scriptUtils;
7999
+ const ${EventManager.ROOT_OBJECT_VARNAME} = this.__render.rootObject;
8000
+ `
8001
+ };
8002
+ try {
8003
+ const newValue = ObjectUtils.Script.evaluateReturn({
8004
+ bodyScript: __render.bindScript,
8005
+ returnScript: runText
8006
+ }, Object.assign(obj, { __render }));
8007
+ const newValueStr = String(newValue);
8008
+ if (this.lastRenderedValue === newValueStr) {
8009
+ return { raws: [], executedOperators: [] };
8010
+ }
8011
+ this.lastRenderedValue = newValueStr;
8012
+ } catch (e) {
8013
+ }
8014
+ }
8015
+ }
7667
8016
  const genNode = config.window.document.importNode(this.dataSet.fragment, true);
7668
8017
  const raws = [];
7669
8018
  const onAttrInitCallBacks = [];
@@ -7706,18 +8055,15 @@ ${indentStr}}`;
7706
8055
  const runText = _RawSet2.expressionGroups(textContent)[0][1];
7707
8056
  let newNode;
7708
8057
  if (textContent?.startsWith("#")) {
7709
- const r = ObjectUtils.Script.evaluate(
7710
- `${__render.bindScript} return ${runText}`,
8058
+ const r = ObjectUtils.Script.evaluateReturn(
8059
+ { bodyScript: __render.bindScript, returnScript: runText },
7711
8060
  Object.assign(obj, { __render })
7712
8061
  );
7713
8062
  const template = config.window.document.createElement("template");
7714
8063
  template.innerHTML = r;
7715
8064
  newNode = template.content;
7716
8065
  } else {
7717
- const r = ObjectUtils.Script.evaluate(
7718
- `${__render.bindScript} return ${runText}`,
7719
- Object.assign(obj, { __render })
7720
- );
8066
+ const r = ObjectUtils.Script.evaluateReturn({ bodyScript: __render.bindScript, returnScript: runText }, Object.assign(obj, { __render }));
7721
8067
  newNode = config.window.document.createTextNode(r);
7722
8068
  }
7723
8069
  cNode.parentNode?.replaceChild(newNode, cNode);
@@ -7756,140 +8102,23 @@ ${indentStr}}`;
7756
8102
  };
7757
8103
  drAttrs.push(drAttr);
7758
8104
  const operators = [
7759
- new DrPre(
7760
- this,
7761
- __render,
7762
- { raws, fag },
7763
- { element, attrName: _RawSet2.DR_PRE_NAME, attr: drAttr.drPre, attrs: drAttr },
7764
- { config, obj, operatorAround: config.operatorAround?.drPre },
7765
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7766
- ),
7767
- new Dr(
7768
- this,
7769
- __render,
7770
- { raws, fag },
7771
- { element, attrName: _RawSet2.DR_NAME, attr: drAttr.dr, attrs: drAttr },
7772
- { config, obj, operatorAround: config.operatorAround?.dr },
7773
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7774
- ),
8105
+ 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 }),
8106
+ 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 }),
7775
8107
  // new Dr(this, __render, {raws, fag}, {element, attrName: EventManager.onRenderedInitAttrName, attr: drAttr.dr, attrs: drAttr}, {config, obj, operatorAround: config.operatorAround?.dr}, {onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks}),
7776
- new DrIf(
7777
- this,
7778
- __render,
7779
- { raws, fag },
7780
- { element, attrName: _RawSet2.DR_IF_NAME, attr: drAttr.drIf, attrs: drAttr },
7781
- { config, obj, operatorAround: config.operatorAround?.drIf },
7782
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7783
- ),
7784
- new DrStripElement(
7785
- this,
7786
- __render,
7787
- { raws, fag },
7788
- { element, attrName: _RawSet2.DR_STRIP_NAME, attr: drAttr.drStripElement, attrs: drAttr },
7789
- { config, obj, operatorAround: config.operatorAround?.drThis },
7790
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7791
- ),
7792
- new DrThis(
7793
- this,
7794
- __render,
7795
- { raws, fag },
7796
- { element, attrName: _RawSet2.DR_THIS_NAME, attr: drAttr.drThis, attrs: drAttr },
7797
- { config, obj, operatorAround: config.operatorAround?.drThis },
7798
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7799
- ),
7800
- new DrForm(
7801
- this,
7802
- __render,
7803
- { raws, fag },
7804
- { element, attrName: _RawSet2.DR_FOR_NAME, attr: drAttr.drForm, attrs: drAttr },
7805
- { config, obj, operatorAround: config.operatorAround?.drForm },
7806
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7807
- ),
7808
- new DrInnerText(
7809
- this,
7810
- __render,
7811
- { raws, fag },
7812
- { element, attrName: _RawSet2.DR_INNERTEXT_NAME, attr: drAttr.drInnerText, attrs: drAttr },
7813
- { config, obj, operatorAround: config.operatorAround?.drInnerText },
7814
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7815
- ),
7816
- new DrInnerHTML(
7817
- this,
7818
- __render,
7819
- { raws, fag },
7820
- { element, attrName: _RawSet2.DR_INNERHTML_NAME, attr: drAttr.drInnerHTML, attrs: drAttr },
7821
- { config, obj, operatorAround: config.operatorAround?.drInnerHTML },
7822
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7823
- ),
7824
- new DrFor(
7825
- this,
7826
- __render,
7827
- { raws, fag },
7828
- { element, attrName: _RawSet2.DR_FOR_NAME, attr: drAttr.drFor, attrs: drAttr },
7829
- { config, obj, operatorAround: config.operatorAround?.drFor },
7830
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7831
- ),
7832
- new DrForOf(
7833
- this,
7834
- __render,
7835
- { raws, fag },
7836
- { element, attrName: _RawSet2.DR_FOR_OF_NAME, attr: drAttr.drForOf, attrs: drAttr },
7837
- { config, obj, operatorAround: config.operatorAround?.drForOf },
7838
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7839
- ),
7840
- new DrThisProperty(
7841
- this,
7842
- __render,
7843
- { raws, fag },
7844
- { element, attrName: _RawSet2.DR_THIS_PROPERTY_NAME, attr: drAttr.drThisProperty, attrs: drAttr },
7845
- { config, obj, operatorAround: config.operatorAround?.drThisProperty },
7846
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7847
- ),
7848
- new DrAppender(
7849
- this,
7850
- __render,
7851
- { raws, fag },
7852
- { element, attrName: _RawSet2.DR_APPENDER_NAME, attr: drAttr.drAppender, attrs: drAttr },
7853
- { config, obj, operatorAround: config.operatorAround?.drAppender },
7854
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7855
- ),
7856
- new DrRepeat(
7857
- this,
7858
- __render,
7859
- { raws, fag },
7860
- { element, attrName: _RawSet2.DR_REPEAT_NAME, attr: drAttr.drRepeat, attrs: drAttr },
7861
- { config, obj, operatorAround: config.operatorAround?.drRepeat },
7862
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7863
- ),
7864
- new DrTargetElementIsElement(
7865
- this,
7866
- __render,
7867
- { raws, fag },
7868
- {
7869
- element,
7870
- attrName: _RawSet2.DR_REPLACE_TARGET_ELEMENT_IS_NAME,
7871
- attr: drAttr.drReplaceTargetElementIs,
7872
- attrs: drAttr
7873
- },
7874
- { config, obj },
7875
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7876
- ),
7877
- new DrTargetElement(
7878
- this,
7879
- __render,
7880
- { raws, fag },
7881
- { element, attrs: drAttr },
7882
- { config, obj },
7883
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7884
- ),
7885
- new DrTargetAttr(
7886
- this,
7887
- __render,
7888
- { raws, fag },
7889
- { element, attrs: drAttr },
7890
- { config, obj },
7891
- { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
7892
- )
8108
+ 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 }),
8109
+ 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 }),
8110
+ 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 }),
8111
+ 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 }),
8112
+ 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 }),
8113
+ 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 }),
8114
+ 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 }),
8115
+ 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 }),
8116
+ 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 }),
8117
+ 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 }),
8118
+ 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 }),
8119
+ 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 }),
8120
+ new DrTargetElement(this, __render, { raws, fag }, { element, attrs: drAttr }, { config, obj }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
8121
+ new DrTargetAttr(this, __render, { raws, fag }, { element, attrs: drAttr }, { config, obj }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks })
7893
8122
  ];
7894
8123
  for (const operator of operators) {
7895
8124
  const state = await operator.start();
@@ -7952,6 +8181,7 @@ ${indentStr}}`;
7952
8181
  }
7953
8182
  });
7954
8183
  }
8184
+ console.groupEnd();
7955
8185
  return { raws, executedOperators };
7956
8186
  }
7957
8187
  // 중요 스타일 적용 부분
@@ -8070,7 +8300,7 @@ ${indentStr}}`;
8070
8300
  }
8071
8301
  if (element2.hasAttribute(EventManager.attrAttrName)) {
8072
8302
  const script = element2.getAttribute(EventManager.attrAttrName) ?? "";
8073
- const keyValuePairs = Array.from(script.matchAll(/(\w+):\s*([^,}]+)/g)).map((match) => ({
8303
+ const keyValuePairs = Array.from(script.matchAll(/['"]?([\w-_]+)['"]?:\s*([^,}]+)/g)).map((match) => ({
8074
8304
  key: match[1],
8075
8305
  value: match[2]
8076
8306
  }));
@@ -8080,20 +8310,22 @@ ${indentStr}}`;
8080
8310
  }
8081
8311
  const targetElementIs = element2.getAttribute(_RawSet2.DR_REPLACE_TARGET_ELEMENT_IS_NAME);
8082
8312
  const targetElementNames = config.targetElements?.map((it) => it.name.toLowerCase()) ?? [];
8313
+ targetElementNames.push(..._RawSet2.DR_ELEMENTS);
8083
8314
  const isElement = targetElementNames.includes(element2.tagName.toLowerCase()) || targetElementNames.includes(targetElementIs?.toLowerCase());
8084
8315
  const targetAttrNames = (config.targetAttrs?.map((it) => it.name) ?? []).concat([..._RawSet2.DR_ATTRIBUTES]);
8085
8316
  const normalAttrs = /* @__PURE__ */ new Map();
8086
8317
  const linkVariables = /* @__PURE__ */ new Map();
8087
8318
  const linkNames = EventManager.linkAttrs.map((it) => it.name);
8088
8319
  const isAttr = element2.getAttributeNames().filter((it) => !EventManager.noDetectAttr.includes(it)).filter((it) => {
8089
- const value = element2.getAttribute(it);
8320
+ const value = element2.getAttribute(it)?.trim();
8090
8321
  if (value && linkNames.includes(it)) {
8091
8322
  linkVariables.set(it, value);
8092
8323
  } else if (value && _RawSet2.isExpression(value)) {
8093
8324
  const variablePaths = _RawSet2.expressionGroups(value).map((it2) => ({
8094
- origin: it2[0],
8095
- inner: it2[1]
8325
+ origin: it2[0].trim(),
8326
+ inner: it2[1].trim()
8096
8327
  }));
8328
+ const isStringTemplate = variablePaths.length > 1 || variablePaths[0] && variablePaths[0].origin !== value;
8097
8329
  let targetScript = value;
8098
8330
  variablePaths.forEach((it2) => {
8099
8331
  let r3 = it2.inner.replace(/#[^#]*#/g, "({})");
@@ -8106,7 +8338,7 @@ ${indentStr}}`;
8106
8338
  } else {
8107
8339
  element2.setAttribute(it, cval);
8108
8340
  }
8109
- normalAttrs.set(it, { originalAttrValue: value, variablePaths });
8341
+ normalAttrs.set(it, { originalAttrValue: value, variablePaths, isStringTemplate });
8110
8342
  }
8111
8343
  const isTargetAttr = targetAttrNames.includes(it.toLowerCase());
8112
8344
  return isTargetAttr;
@@ -8177,7 +8409,8 @@ ${indentStr}}`;
8177
8409
  lasterIndex = regexArr.index + it.content.length;
8178
8410
  }
8179
8411
  template.content.append(config.window.document.createTextNode(text.substring(lasterIndex, text.length)));
8180
- currentNode2?.parentNode?.replaceChild(template.content, currentNode2);
8412
+ const p = currentNode2?.parentNode;
8413
+ p?.replaceChild(template.content, currentNode2);
8181
8414
  } else if (currentNode2.nodeType === Node2.ELEMENT_NODE) {
8182
8415
  const uuid = `${RandomUtils.alphabet(40)}`;
8183
8416
  const element2 = currentNode2;
@@ -8186,6 +8419,7 @@ ${indentStr}}`;
8186
8419
  const startEndPoint = _RawSet2.createStartEndPoint({ node: element2, id: uuid, type: elementType }, config);
8187
8420
  const targetElementIs = element2.getAttribute(_RawSet2.DR_REPLACE_TARGET_ELEMENT_IS_NAME);
8188
8421
  const targetElementNames = config.targetElements?.map((it) => it.name.toLowerCase()) ?? [];
8422
+ targetElementNames.push(..._RawSet2.DR_ELEMENTS);
8189
8423
  const isElement = targetElementNames.includes(element2.tagName.toLowerCase()) || targetElementNames.includes(targetElementIs?.toLowerCase());
8190
8424
  const targetAttrNames = (config.targetAttrs?.map((it) => it.name) ?? []).concat(_RawSet2.DR_ATTRIBUTES);
8191
8425
  const isAttr = element2.getAttributeNames().filter((it) => targetAttrNames.includes(it.toLowerCase())).length > 0;
@@ -8548,9 +8782,11 @@ ${indentStr}}`;
8548
8782
  if (templateReplacements.length > 0) {
8549
8783
  targetElement.innerHTML = StringUtils.replaceSequentially(targetElement.innerHTML, templateReplacements);
8550
8784
  }
8785
+ const componentName = targetElement.getAttribute(_RawSet2.DR_VARIABLE_NAME_OPTIONNAME) ?? "component";
8551
8786
  const optionThisName = targetElement.getAttribute(_RawSet2.DR_THIS_NAME_OPTIONNAME);
8552
8787
  targetElement.getAttributeNames().forEach((it) => targetElement.setAttribute(it, targetElement.getAttribute(it).replace(/#this#/g, drThis)));
8553
8788
  const thisRandom = this.drThisEncoding(targetElement, drThis, { asIs: /@this@/g });
8789
+ targetElement.innerHTML = targetElement.innerHTML.replaceAll(`#${componentName}#`, drThis);
8554
8790
  if (optionThisName) {
8555
8791
  targetElement.innerHTML = targetElement.innerHTML.replaceAll(`@${optionThisName}@`, drThis);
8556
8792
  }
@@ -8724,7 +8960,8 @@ ${indentStr}}`;
8724
8960
  );
8725
8961
  if (data && innerHTMLThisRandom) {
8726
8962
  const template2 = config.window.document.createElement("template");
8727
- template2.innerHTML = ElementUtils.toInnerHTML(data, { document: config.window.document }).replace(RegExp(innerHTMLThisRandom, "g"), "this.");
8963
+ let s = ElementUtils.toInnerHTML(data, { document: config.window.document });
8964
+ template2.innerHTML = s.replace(RegExp(innerHTMLThisRandom, "g"), "this.");
8728
8965
  ;
8729
8966
  data = template2.content;
8730
8967
  }
@@ -8764,22 +9001,17 @@ ${indentStr}}`;
8764
9001
  new Map(JSON.parse(normalAttribute)).forEach((v, k) => {
8765
9002
  const variablePaths = v.variablePaths;
8766
9003
  let targetScript = v.originalAttrValue.trim();
8767
- let checktargetScript = v.originalAttrValue.trim();
8768
- variablePaths.forEach((it) => {
8769
- checktargetScript = targetScript.replaceAll(it.origin, "");
8770
- });
8771
- let isScriptValue = checktargetScript.length === 0 && variablePaths.length === 1;
8772
- if (isScriptValue) {
8773
- let r = ObjectUtils.Path.toOptionalChainPath(variablePaths[0].inner);
8774
- targetScript = targetScript.replaceAll(variablePaths[0].origin, r);
8775
- } else {
9004
+ if (v.isStringTemplate) {
8776
9005
  variablePaths.forEach((it) => {
8777
9006
  let r = ObjectUtils.Path.toOptionalChainPath(it.inner);
8778
9007
  targetScript = targetScript.replaceAll(it.origin, `\${${r}}`);
8779
9008
  });
9009
+ } else {
9010
+ let r = ObjectUtils.Path.toOptionalChainPath(variablePaths[0].inner);
9011
+ targetScript = targetScript.replaceAll(variablePaths[0].origin, r);
8780
9012
  }
8781
9013
  const cval = ObjectUtils.Script.evaluateReturn(
8782
- { bodyScript: config.script, returnScript: isScriptValue ? targetScript : "`" + targetScript + "`" },
9014
+ { bodyScript: config.script, returnScript: v.isStringTemplate ? "`" + targetScript + "`" : targetScript },
8783
9015
  Object.assign(config.obj, config.renderData ? { __render: config.renderData } : void 0)
8784
9016
  );
8785
9017
  attribute[k] = cval;
@@ -8803,6 +9035,7 @@ ${indentStr}}`;
8803
9035
  _RawSet.DR_DETECT_NAME = "dr-detect";
8804
9036
  _RawSet.DR_STRIP_NAME = "dr-strip";
8805
9037
  _RawSet.DR_REPLACE_TARGET_ELEMENT_IS_NAME = "dr-replace-target-element-is";
9038
+ _RawSet.DR_TARGET_ELEMENT_ELEMENTNAME = "dr-target-element";
8806
9039
  _RawSet.DR_DETECT_IF_OPTIONNAME = "dr-detect-option-if";
8807
9040
  _RawSet.DR_DETECT_FILTER_OPTIONNAME = "dr-detect-option-filter";
8808
9041
  _RawSet.DR_DETECT_ATTR_OPTIONNAME = "dr-detect-option-attr";
@@ -8859,6 +9092,9 @@ ${indentStr}}`;
8859
9092
  drKeyOption: _RawSet.DR_KEY_OPTIONNAME
8860
9093
  };
8861
9094
  _RawSet.DR_TAGS = [];
9095
+ _RawSet.DR_ELEMENTS = [
9096
+ _RawSet.DR_TARGET_ELEMENT_ELEMENTNAME
9097
+ ];
8862
9098
  _RawSet.DR_ATTRIBUTES = [
8863
9099
  _RawSet.DR_NAME,
8864
9100
  _RawSet.DR_APPENDER_NAME,
@@ -8872,7 +9108,7 @@ ${indentStr}}`;
8872
9108
  _RawSet.DR_INNERHTML_NAME,
8873
9109
  _RawSet.DR_INNERTEXT_NAME,
8874
9110
  _RawSet.DR_REPEAT_NAME,
8875
- _RawSet.DR_DETECT_NAME,
9111
+ // RawSet.DR_DETECT_NAME, // TODO: DrDetect 오퍼레이터 구현 필요
8876
9112
  _RawSet.DR_STRIP_NAME
8877
9113
  ];
8878
9114
  var RawSet = _RawSet;
@@ -8880,10 +9116,7 @@ ${indentStr}}`;
8880
9116
  // ../dom-render/dist/esm/decorators/DomRenderNoProxy.js
8881
9117
  var DomRenderNoProxyKey = "DomRender:NoProxy";
8882
9118
  var getDomRenderNoProxy = (target, propertyKey) => {
8883
- if (propertyKey === void 0) {
8884
- return Reflect.getMetadata(DomRenderNoProxyKey, target);
8885
- }
8886
- return Reflect.getMetadata(DomRenderNoProxyKey, target, propertyKey);
9119
+ return ReflectUtils.getMetadata(DomRenderNoProxyKey, target, propertyKey);
8887
9120
  };
8888
9121
  var isDomRenderNoProxy = (target, propertyKey) => {
8889
9122
  return ValidUtils.isNullOrUndefined(target) || getDomRenderNoProxy(target, propertyKey) === true;
@@ -8928,6 +9161,11 @@ ${indentStr}}`;
8928
9161
  return typeof obj?.onRawSetRendered === "function";
8929
9162
  };
8930
9163
 
9164
+ // ../dom-render/dist/esm/lifecycle/OnChildRawSetRendered.js
9165
+ var isOnChildRawSetRendered = (obj) => {
9166
+ return typeof obj?.onChildRawSetRendered === "function";
9167
+ };
9168
+
8931
9169
  // ../dom-render/dist/esm/DomRenderProxy.js
8932
9170
  var excludeGetSetPropertys = [
8933
9171
  "onBeforeReturnGet",
@@ -8959,6 +9197,7 @@ ${indentStr}}`;
8959
9197
  return void 0;
8960
9198
  };
8961
9199
  var DomRenderProxy = class _DomRenderProxy {
9200
+ // public name = Math.random();
8962
9201
  constructor(_domRender_origin, target, _domRender_config) {
8963
9202
  this._domRender_origin = _domRender_origin;
8964
9203
  this._domRender_config = _domRender_config;
@@ -9047,7 +9286,7 @@ ${indentStr}}`;
9047
9286
  const onInit = target.getAttribute?.(RawSet.DR_ON_INIT_ARGUMENTS_OPTIONNAME);
9048
9287
  let initParam;
9049
9288
  if (onCreate) {
9050
- initParam = ScriptUtils.evaluateReturn(onCreate, this._domRender_proxy);
9289
+ initParam = ObjectUtils.Script.evaluateReturn(onCreate, this._domRender_proxy);
9051
9290
  }
9052
9291
  if (isOnInitRender(this._domRender_proxy)) {
9053
9292
  await this._domRender_proxy.onInitRender(
@@ -9076,46 +9315,65 @@ ${indentStr}}`;
9076
9315
  }
9077
9316
  const removeRawSets = [];
9078
9317
  const rawSets = raws ?? this.getRawSets();
9079
- for (const it of rawSets) {
9080
- it.getUsingTriggerVariables(this._domRender_config).forEach((path2) => {
9081
- this.addRawSet(path2, it);
9082
- });
9083
- let renderResult;
9084
- if (it.isConnected) {
9085
- const targetAttrMap = it.point.node?.getAttribute?.(EventManager.normalAttrMapAttrName);
9086
- if (it.detect?.action) {
9087
- it.detect.action();
9088
- } else if (it.type === RawSetType.TARGET_ELEMENT && it.dataSet?.render?.currentThis && fullPathStr && targetAttrMap) {
9089
- new Map(JSON.parse(targetAttrMap)).forEach((v, k) => {
9090
- var _a7;
9091
- const isUsing = v.variablePaths.some((it2) => EventManager.isUsingThisVar(it2.inner, `this.${fullPathStr}`));
9092
- if (isUsing) {
9093
- const targetAttrObject = RawSet.getAttributeObject(it.point.node, {
9094
- script: it.dataSet?.render?.renderScript ?? "",
9095
- obj: Object.assign(this._domRender_proxy ?? {}, { __render: it.dataSet?.render })
9096
- });
9097
- (_a7 = it.dataSet).render ?? (_a7.render = {});
9098
- it.dataSet.render.attribute = targetAttrObject;
9099
- if (isOnChangeAttrRender(it.dataSet?.render?.currentThis)) {
9100
- it.dataSet?.render?.currentThis?.onChangeAttrRender?.(k, targetAttrObject[k], { rawSet: it });
9318
+ const CHUNK_SIZE = 50;
9319
+ const chunks = [];
9320
+ const rawSetsArray = Array.from(rawSets);
9321
+ for (let i = 0; i < rawSetsArray.length; i += CHUNK_SIZE) {
9322
+ chunks.push(rawSetsArray.slice(i, i + CHUNK_SIZE));
9323
+ }
9324
+ for (const chunk of chunks) {
9325
+ const promises2 = chunk.map(async (it) => {
9326
+ it.getUsingTriggerVariables(this._domRender_config).forEach((path2) => {
9327
+ this.addRawSet(path2, it);
9328
+ });
9329
+ let renderResult;
9330
+ if (it.isConnected) {
9331
+ const targetAttrMap = it.point.node?.getAttribute?.(EventManager.normalAttrMapAttrName);
9332
+ if (it.detect?.action) {
9333
+ it.detect.action();
9334
+ } else if (it.type === RawSetType.TARGET_ELEMENT && it.dataSet?.render?.currentThis && fullPathStr && targetAttrMap) {
9335
+ const attrStart = performance.now();
9336
+ new Map(JSON.parse(targetAttrMap)).forEach((v, k) => {
9337
+ var _a7;
9338
+ const isUsing = v.variablePaths.some((it2) => EventManager.isUsingThisVar(it2.inner, `this.${fullPathStr}`));
9339
+ if (isUsing) {
9340
+ const targetAttrObject = RawSet.getAttributeObject(it.point.node, {
9341
+ script: it.dataSet?.render?.renderScript ?? "",
9342
+ obj: Object.assign(this._domRender_proxy ?? {}, { __render: it.dataSet?.render })
9343
+ });
9344
+ (_a7 = it.dataSet).render ?? (_a7.render = {});
9345
+ it.dataSet.render.attribute = targetAttrObject;
9346
+ if (isOnChangeAttrRender(it.dataSet?.render?.currentThis)) {
9347
+ it.dataSet?.render?.currentThis?.onChangeAttrRender?.(k, targetAttrObject[k], { rawSet: it });
9348
+ }
9101
9349
  }
9350
+ });
9351
+ const attrEnd = performance.now();
9352
+ } else {
9353
+ const renderStart = performance.now();
9354
+ const rawSets2 = await it.render(this._domRender_proxy, this._domRender_config);
9355
+ const renderEnd = performance.now();
9356
+ renderResult = rawSets2;
9357
+ if (rawSets2 && rawSets2.raws.length > 0) {
9358
+ await this.render(rawSets2.raws);
9102
9359
  }
9103
- });
9104
- } else {
9105
- const rawSets2 = await it.render(this._domRender_proxy, this._domRender_config);
9106
- renderResult = rawSets2;
9107
- if (rawSets2 && rawSets2.raws.length > 0) {
9108
- await this.render(rawSets2.raws);
9109
9360
  }
9361
+ } else {
9362
+ removeRawSets.push(it);
9110
9363
  }
9111
- } else {
9112
- removeRawSets.push(it);
9113
- }
9114
- const t = it.findNearThis(this._domRender_proxy);
9115
- if (isOnRawSetRendered(t)) {
9116
- await t.onRawSetRendered(it, { path: fullPathStr, renderResult });
9364
+ const t = it.findNearThis(this._domRender_proxy);
9365
+ if (isOnRawSetRendered(t)) {
9366
+ await t.onRawSetRendered(it, { path: fullPathStr, value: ObjectUtils.Script.evaluateReturn(`this.${fullPathStr}`, this._domRender_proxy), root: this._domRender_proxy, renderResult });
9367
+ }
9368
+ });
9369
+ await Promise.all(promises2);
9370
+ if (chunks.length > 1) {
9371
+ await new Promise((resolve) => requestAnimationFrame(resolve));
9117
9372
  }
9118
9373
  }
9374
+ if (isOnChildRawSetRendered(this._domRender_proxy)) {
9375
+ await this._domRender_proxy.onChildRawSetRendered();
9376
+ }
9119
9377
  if (removeRawSets.length > 0) {
9120
9378
  this.removeRawSet(...removeRawSets);
9121
9379
  }
@@ -9130,12 +9388,15 @@ ${indentStr}}`;
9130
9388
  // return current;
9131
9389
  // }
9132
9390
  root(pathInfos, value, lastDoneExecute = true) {
9391
+ const rootStartTime = Date.now();
9392
+ const pathKey = pathInfos.flat().map((i) => i.path).join(".");
9133
9393
  const fullPaths = [];
9134
9394
  if (this._domRender_ref.size > 0) {
9135
9395
  this._domRender_ref.forEach((it, key) => {
9136
9396
  if ("_DomRender_isProxy" in key) {
9137
9397
  it.forEach((sit) => {
9138
9398
  try {
9399
+ const recursiveStartTime = Date.now();
9139
9400
  const concat = pathInfos.concat([[{ path: sit, obj: key }]]);
9140
9401
  const items = key._DomRender_proxy?.root(
9141
9402
  concat,
@@ -9149,6 +9410,7 @@ ${indentStr}}`;
9149
9410
  }
9150
9411
  });
9151
9412
  } else {
9413
+ const pathProcessStartTime = Date.now();
9152
9414
  const strings = pathInfos.reverse().map((it) => it.map((it2) => it2.path).join(","));
9153
9415
  const fullPathStr = strings.map((it) => isNaN(Number(it)) ? "." + it : `[${it}]`).join("").slice(1);
9154
9416
  if (lastDoneExecute) {
@@ -9156,10 +9418,13 @@ ${indentStr}}`;
9156
9418
  const front = strings.slice(0, strings.length - 1).map((it) => isNaN(Number(it)) ? "." + it : `[${it}]`).join("");
9157
9419
  const lastPropertyName = strings[strings.length - 1];
9158
9420
  const path2 = "this" + front;
9159
- const data = ScriptUtils.evaluateReturn(ObjectUtils.Path.toOptionalChainPath(path2), this._domRender_proxy);
9421
+ const data = ObjectUtils.Script.evaluateReturn(ObjectUtils.Path.toOptionalChainPath(path2), this._domRender_proxy);
9422
+ const promiseStartTime = Date.now();
9160
9423
  new Promise(async (resolve) => {
9424
+ const promiseInnerStartTime = Date.now();
9161
9425
  let rData = [];
9162
9426
  const firstPathStr = front.slice(1);
9427
+ const dictionaryCheckStartTime = Date.now();
9163
9428
  const firstTargets = this._rawSets.get(firstPathStr);
9164
9429
  const firstTargetDictionary = [];
9165
9430
  firstTargets?.forEach((it) => {
@@ -9201,6 +9466,7 @@ ${indentStr}}`;
9201
9466
  rData = await this.render(rawSets);
9202
9467
  }
9203
9468
  }
9469
+ const renderStartTime = Date.now();
9204
9470
  if (lastPropertyName === "length" && Array.isArray(data)) {
9205
9471
  const aIterable = this._rawSets.get(firstPathStr);
9206
9472
  if (aIterable) {
@@ -9209,13 +9475,17 @@ ${indentStr}}`;
9209
9475
  } else if (iterable) {
9210
9476
  rData = await this.render(Array.from(iterable), fullPathStr);
9211
9477
  }
9478
+ const eventProcessStartTime = Date.now();
9212
9479
  const Node2 = this._domRender_config.window.Node;
9213
9480
  this._targets.forEach((it) => {
9214
9481
  if (it.nodeType === Node2.DOCUMENT_FRAGMENT_NODE || it.nodeType === Node2.ELEMENT_NODE) {
9482
+ const findAttrStartTime = Date.now();
9215
9483
  const targets = this._domRender_config.eventManager.findAttrElements(
9216
9484
  it,
9217
9485
  this._domRender_config
9218
9486
  );
9487
+ const targetCount = targets?.size || targets?.length || 0;
9488
+ const changeVarStartTime = Date.now();
9219
9489
  this._domRender_config.eventManager.changeVar(
9220
9490
  this._domRender_proxy,
9221
9491
  targets,
@@ -9225,7 +9495,7 @@ ${indentStr}}`;
9225
9495
  }
9226
9496
  });
9227
9497
  if (rData?.length > 0 && isOnChildRenderedByProperty(data)) {
9228
- const propertyValue = ScriptUtils.evaluateReturn(`this.${lastPropertyName}`, data);
9498
+ const propertyValue = ObjectUtils.Script.evaluateReturn(`this.${lastPropertyName}`, data);
9229
9499
  data.onChildRenderedByProperty(lastPropertyName, propertyValue);
9230
9500
  }
9231
9501
  resolve(rData);
@@ -9241,6 +9511,7 @@ ${indentStr}}`;
9241
9511
  target[p] = value;
9242
9512
  return true;
9243
9513
  }
9514
+ let start = performance.now();
9244
9515
  if (typeof p === "string") {
9245
9516
  value = this.proxy(receiver, value, p);
9246
9517
  }
@@ -9263,14 +9534,23 @@ ${indentStr}}`;
9263
9534
  }).forEach((it) => {
9264
9535
  const variablePaths = it.valueScript.variablePaths;
9265
9536
  let targetScript = it.valueScript.originalAttrValue;
9266
- variablePaths.forEach((it2) => {
9267
- let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
9268
- targetScript = targetScript.replaceAll(it2.origin, `\${${r}}`);
9269
- });
9270
- const value1 = ObjectUtils.Script.evaluateReturn("`" + targetScript + "`", it.pathInfo.obj);
9271
- if (value1 === null) {
9537
+ let script;
9538
+ if (it.valueScript.isStringTemplate) {
9539
+ variablePaths.forEach((it2) => {
9540
+ let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
9541
+ targetScript = targetScript.replaceAll(it2.origin, `\${${r}}`);
9542
+ });
9543
+ script = "`" + targetScript + "`";
9544
+ } else {
9545
+ variablePaths.forEach((it2) => {
9546
+ let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
9547
+ targetScript = targetScript.replaceAll(it2.origin, `${r}`);
9548
+ });
9549
+ script = targetScript;
9550
+ }
9551
+ const value1 = ObjectUtils.Script.evaluateReturn(script, it.pathInfo.obj);
9552
+ if (value1 === null || value1 === void 0) {
9272
9553
  elementInfo.element.removeAttribute(it.key);
9273
- elementInfo.element[it.key] = null;
9274
9554
  } else {
9275
9555
  elementInfo.element.setAttribute(it.key, value1);
9276
9556
  elementInfo.element[it.key] = value1;
@@ -9280,11 +9560,11 @@ ${indentStr}}`;
9280
9560
  );
9281
9561
  DocumentUtils.querySelectorAllByAttributeName(rootElement, EventManager.linkTargetMapAttrName)?.forEach(
9282
9562
  (elementInfo) => {
9283
- const targets = new Map(ScriptUtils.evaluateReturn(elementInfo.value));
9563
+ const targets = new Map(ObjectUtils.Script.evaluateReturn(elementInfo.value));
9284
9564
  Array.from(targets.entries()).filter(([key, value2]) => value2.trim()).filter(isDefined).flatMap(([key, valueScript]) => {
9285
9565
  return fullPathInfo.flat().filter((it) => valueScript.includes(`this.${it.path}`)).flatMap((it) => ({ key, valueScript, pathInfo: it }));
9286
9566
  }).forEach((info) => {
9287
- const value1 = ScriptUtils.evaluateReturn(info.valueScript, info.pathInfo.obj);
9567
+ const value1 = ObjectUtils.Script.evaluateReturn(info.valueScript, info.pathInfo.obj);
9288
9568
  const applyAttributeName = EventManager.linkAttrs.find((it) => it.name === info.key);
9289
9569
  if (applyAttributeName) {
9290
9570
  if (value1 === null) {
@@ -9462,46 +9742,47 @@ ${indentStr}}`;
9462
9742
  }
9463
9743
 
9464
9744
  // ../core/dist/esm/message/operators/first.js
9465
- var EmptyError = class extends Error {
9466
- constructor() {
9467
- super("no elements in sequence");
9468
- this.name = "EmptyError";
9469
- }
9470
- };
9471
- function first(predicate) {
9745
+ function first(predicate, defaultValue) {
9472
9746
  return (source) => {
9473
9747
  return new Observable((subscriber) => {
9474
9748
  let index = 0;
9475
- let found = false;
9476
- const sourceSubscription = source.subscribe({
9749
+ let hasValue = false;
9750
+ const subscription = source.subscribe({
9477
9751
  next: (value) => {
9478
- if (found) return;
9479
- const passed = predicate ? predicate(value, index++) : true;
9480
- if (passed) {
9481
- found = true;
9752
+ if (hasValue) {
9753
+ return;
9754
+ }
9755
+ const shouldEmit = predicate ? predicate(value, index++) : true;
9756
+ if (shouldEmit) {
9757
+ hasValue = true;
9482
9758
  subscriber.next(value);
9483
9759
  subscriber.complete();
9484
- sourceSubscription.unsubscribe();
9760
+ subscription.unsubscribe();
9485
9761
  }
9486
9762
  },
9487
9763
  error: (err) => {
9488
- subscriber.error(err);
9764
+ if (!hasValue) {
9765
+ subscriber.error(err);
9766
+ }
9489
9767
  },
9490
9768
  complete: () => {
9491
- if (!found) {
9492
- subscriber.error(new EmptyError());
9769
+ if (!hasValue) {
9770
+ if (defaultValue !== void 0) {
9771
+ subscriber.next(defaultValue);
9772
+ subscriber.complete();
9773
+ } else {
9774
+ subscriber.error(new Error("no elements in sequence"));
9775
+ }
9493
9776
  }
9494
9777
  }
9495
9778
  });
9496
- return () => {
9497
- sourceSubscription.unsubscribe();
9498
- };
9779
+ return subscription;
9499
9780
  });
9500
9781
  };
9501
9782
  }
9502
9783
 
9503
9784
  // ../core/dist/esm/message/internal/lastValueFrom.js
9504
- var EmptyError2 = class extends Error {
9785
+ var EmptyError = class extends Error {
9505
9786
  constructor(message = "No elements in sequence") {
9506
9787
  super(message);
9507
9788
  this.name = "EmptyError";
@@ -9521,7 +9802,7 @@ ${indentStr}}`;
9521
9802
  error: reject,
9522
9803
  complete: () => {
9523
9804
  if (!_hasValue) {
9524
- reject(new EmptyError2());
9805
+ reject(new EmptyError());
9525
9806
  }
9526
9807
  }
9527
9808
  });
@@ -9904,10 +10185,10 @@ ${indentStr}}`;
9904
10185
  this.alertService = alertService;
9905
10186
  this.config = config;
9906
10187
  this.isActive = false;
9907
- this.activeBefore = [];
9908
- this.activeAfter = [];
9909
- this.deActiveBefore = [];
9910
- this.deActiveAfter = [];
10188
+ this.activateBefore = [];
10189
+ this.activateAfter = [];
10190
+ this.deActivateBefore = [];
10191
+ this.deActivateAfter = [];
9911
10192
  this.data = /* @__PURE__ */ new Map();
9912
10193
  if (config?.uuid) {
9913
10194
  this.uuid = config.uuid;
@@ -9916,16 +10197,16 @@ ${indentStr}}`;
9916
10197
  }
9917
10198
  }
9918
10199
  addOpenBefore(fn) {
9919
- this.activeBefore.push(fn);
10200
+ this.activateBefore.push(fn);
9920
10201
  }
9921
10202
  addOpenAfter(fn) {
9922
- this.activeAfter.push(fn);
10203
+ this.activateAfter.push(fn);
9923
10204
  }
9924
10205
  addCloseBefore(fn) {
9925
- this.deActiveBefore.push(fn);
10206
+ this.deActivateBefore.push(fn);
9926
10207
  }
9927
10208
  addCloseAfter(fn) {
9928
- this.deActiveAfter.push(fn);
10209
+ this.deActivateAfter.push(fn);
9929
10210
  }
9930
10211
  setData(key, value) {
9931
10212
  this.data.set(key, value);
@@ -9933,35 +10214,35 @@ ${indentStr}}`;
9933
10214
  getData(key) {
9934
10215
  return this.data.get(key);
9935
10216
  }
9936
- async active() {
10217
+ async activate() {
9937
10218
  try {
9938
- await Promise.allSettled(this.activeBefore.map((it) => it())).then((it) => {
10219
+ await Promise.allSettled(this.activateBefore.map((it) => it())).then((it) => {
9939
10220
  this.result = this.make();
9940
10221
  this.alertService?.publish({ action: AlertAction.ACTIVE, alert: this });
9941
10222
  this.isActive = true;
9942
10223
  if (this.config?.closeTime !== void 0 && this.config?.closeTime > 0) {
9943
10224
  setTimeout(() => {
9944
- this.inActive();
10225
+ this.deActivate();
9945
10226
  }, this.config.closeTime);
9946
10227
  }
9947
- this.config?.active?.(this.result, this);
10228
+ this.config?.activate?.(this.result, this);
9948
10229
  });
9949
10230
  } catch (e) {
9950
10231
  } finally {
9951
- await Promise.allSettled(this.activeAfter.map((it) => it())).then((it) => {
10232
+ await Promise.allSettled(this.activateAfter.map((it) => it())).then((it) => {
9952
10233
  });
9953
10234
  }
9954
10235
  }
9955
- async inActive() {
10236
+ async deActivate() {
9956
10237
  try {
9957
- await Promise.allSettled(this.deActiveBefore.map((it) => it())).then((it) => {
10238
+ await Promise.allSettled(this.deActivateBefore.map((it) => it())).then((it) => {
9958
10239
  this.alertService?.publish({ action: AlertAction.IN_ACTIVE, alert: this });
9959
10240
  this.isActive = false;
9960
- this.config?.deActive?.(this.result, this);
10241
+ this.config?.deActivate?.(this.result, this);
9961
10242
  });
9962
10243
  } catch (e) {
9963
10244
  } finally {
9964
- await Promise.allSettled(this.deActiveAfter.map((it) => it())).then((it) => {
10245
+ await Promise.allSettled(this.deActivateAfter.map((it) => it())).then((it) => {
9965
10246
  });
9966
10247
  }
9967
10248
  }
@@ -10464,7 +10745,7 @@ ${indentStr}}`;
10464
10745
  const alert = this.alertService?.progress({ title: config.config.config.title });
10465
10746
  if (alert) {
10466
10747
  pipe.progress = alert;
10467
- alert.active();
10748
+ alert.activate();
10468
10749
  }
10469
10750
  }
10470
10751
  }
@@ -10472,7 +10753,7 @@ ${indentStr}}`;
10472
10753
  this.subject.next({ type: "success", config, pipe });
10473
10754
  config.config?.config?.callBackSuccess?.(config, pipe);
10474
10755
  if (config.config?.config?.alertSuccessMsg) {
10475
- this.alertService?.success({ title: config.config.config.title })?.active();
10756
+ this.alertService?.success({ title: config.config.config.title })?.activate();
10476
10757
  }
10477
10758
  }
10478
10759
  afterSuccessTransform(config, pipe) {
@@ -10480,7 +10761,7 @@ ${indentStr}}`;
10480
10761
  finally(config, pipe) {
10481
10762
  this.subject.next({ type: "final", config, pipe });
10482
10763
  config.config?.config?.callBackFinal?.(config, pipe);
10483
- pipe.progress?.inActive();
10764
+ pipe.progress?.deActivate();
10484
10765
  }
10485
10766
  error(config, pipe, e) {
10486
10767
  console.log("error", e);
@@ -10489,7 +10770,7 @@ ${indentStr}}`;
10489
10770
  if (config.config?.config?.alertErrorMsg) {
10490
10771
  this.alertService?.danger({
10491
10772
  title: `${config.config.config.title ? config.config.config.title : ""}${e.message ? `(${e.message})` : ""}`
10492
- })?.active();
10773
+ })?.activate();
10493
10774
  }
10494
10775
  if (config.config?.config?.enableErrorConsole) {
10495
10776
  console.error(`apiService Error ${config?.config?.config?.title}`, e);
@@ -10523,97 +10804,14 @@ ${indentStr}}`;
10523
10804
  var __metadata6 = function(k, v) {
10524
10805
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10525
10806
  };
10807
+ var SymbolIntentApiServiceProxy_1;
10526
10808
  var _a6;
10527
- var SymbolIntentApiServiceProxy = class SymbolIntentApiServiceProxy2 {
10809
+ var SymbolIntentApiServiceProxy = SymbolIntentApiServiceProxy_1 = class SymbolIntentApiServiceProxy2 {
10528
10810
  constructor(apiService) {
10529
10811
  this.apiService = apiService;
10530
- console.log("-------apiService", apiService);
10531
10812
  }
10532
- get(target, prop, receiver) {
10533
- const simConfig = getSim(target);
10534
- const apiService = this.apiService;
10535
- const value = Reflect.get(target, prop, receiver);
10536
- if (typeof value === "function" && simConfig?.symbol) {
10537
- return function(...args) {
10538
- const f = value;
10539
- const p = (userConfig) => {
10540
- const headers = { ...userConfig?.headers ?? {}, ...makeIntentHeaderBySymbol(simConfig.symbol) };
10541
- const method = userConfig?.method ?? "post";
10542
- if (method === "post" && userConfig?.multipartFormData) {
10543
- return apiService.post({
10544
- target: `/${String(prop)}`,
10545
- config: {
10546
- bypassTransform: userConfig?.bypassTransform,
10547
- transformText: userConfig?.transformText,
10548
- fetch: {
10549
- credentials: "include",
10550
- headers,
10551
- body: ConvertUtils.toFormData(userConfig?.body)
10552
- }
10553
- }
10554
- });
10555
- } else if (method === "post") {
10556
- return apiService.postJson({
10557
- target: `/${String(prop)}`,
10558
- config: {
10559
- bypassTransform: userConfig?.bypassTransform,
10560
- transformText: userConfig?.transformText,
10561
- fetch: {
10562
- credentials: "include",
10563
- headers,
10564
- body: userConfig?.body
10565
- }
10566
- }
10567
- });
10568
- } else if (method === "petch") {
10569
- return apiService.patchJson({
10570
- target: `/${String(prop)}`,
10571
- config: {
10572
- bypassTransform: userConfig?.bypassTransform,
10573
- transformText: userConfig?.transformText,
10574
- fetch: {
10575
- credentials: "include",
10576
- headers,
10577
- body: userConfig?.body
10578
- }
10579
- }
10580
- });
10581
- } else {
10582
- return apiService[method]({
10583
- // return apiService.head({
10584
- target: { url: `/${String(prop)}`, searchParams: userConfig?.body },
10585
- config: {
10586
- bypassTransform: userConfig?.bypassTransform,
10587
- transformText: userConfig?.transformText,
10588
- fetch: {
10589
- credentials: "include",
10590
- headers
10591
- }
10592
- }
10593
- });
10594
- }
10595
- };
10596
- args.push(p);
10597
- return Reflect.apply(f, target, args);
10598
- };
10599
- }
10600
- return Reflect.get(target, prop, receiver);
10601
- }
10602
- apply(target, thisArg, argArray) {
10603
- console.log("SymbolIntentApiServiceProxy apply");
10604
- return Reflect.apply(target, thisArg, argArray);
10605
- }
10606
- };
10607
- SymbolIntentApiServiceProxy = __decorate9([
10608
- Sim,
10609
- __metadata6("design:paramtypes", [typeof (_a6 = typeof ApiService !== "undefined" && ApiService) === "function" ? _a6 : Object])
10610
- ], SymbolIntentApiServiceProxy);
10611
-
10612
- // src/proxy/SymbolIntentApiServiceProxyBase.ts
10613
- var SymbolIntentApiServiceProxyBase = class {
10614
- // 생성자는 프록시될 대상 객체(target)와 의존성을 주입받습니다.
10615
- constructor(apiService) {
10616
- const handler = {
10813
+ static createHandler(apiService) {
10814
+ return {
10617
10815
  get(target, prop, receiver) {
10618
10816
  const simConfig = getSim(target);
10619
10817
  const value = Reflect.get(target, prop, receiver);
@@ -10629,6 +10827,7 @@ ${indentStr}}`;
10629
10827
  config: {
10630
10828
  bypassTransform: userConfig?.bypassTransform,
10631
10829
  transformText: userConfig?.transformText,
10830
+ config: userConfig?.config,
10632
10831
  fetch: {
10633
10832
  credentials: "include",
10634
10833
  headers,
@@ -10642,6 +10841,7 @@ ${indentStr}}`;
10642
10841
  config: {
10643
10842
  bypassTransform: userConfig?.bypassTransform,
10644
10843
  transformText: userConfig?.transformText,
10844
+ config: userConfig?.config,
10645
10845
  fetch: {
10646
10846
  credentials: "include",
10647
10847
  headers,
@@ -10655,6 +10855,7 @@ ${indentStr}}`;
10655
10855
  config: {
10656
10856
  bypassTransform: userConfig?.bypassTransform,
10657
10857
  transformText: userConfig?.transformText,
10858
+ config: userConfig?.config,
10658
10859
  fetch: {
10659
10860
  credentials: "include",
10660
10861
  headers,
@@ -10668,6 +10869,7 @@ ${indentStr}}`;
10668
10869
  config: {
10669
10870
  bypassTransform: userConfig?.bypassTransform,
10670
10871
  transformText: userConfig?.transformText,
10872
+ config: userConfig?.config,
10671
10873
  fetch: {
10672
10874
  credentials: "include",
10673
10875
  headers
@@ -10683,10 +10885,28 @@ ${indentStr}}`;
10683
10885
  return Reflect.get(target, prop, receiver);
10684
10886
  },
10685
10887
  apply(target, thisArg, argArray) {
10686
- console.log("SymbolIntentApiServiceProxyBase apply (from handler)");
10888
+ console.log("SymbolIntentApiServiceProxy apply");
10687
10889
  return Reflect.apply(target, thisArg, argArray);
10688
10890
  }
10689
10891
  };
10892
+ }
10893
+ get(target, prop, receiver) {
10894
+ return SymbolIntentApiServiceProxy_1.createHandler(this.apiService).get(target, prop, receiver);
10895
+ }
10896
+ apply(target, thisArg, argArray) {
10897
+ return SymbolIntentApiServiceProxy_1.createHandler(this.apiService).apply(target, thisArg, argArray);
10898
+ }
10899
+ };
10900
+ SymbolIntentApiServiceProxy = SymbolIntentApiServiceProxy_1 = __decorate9([
10901
+ Sim,
10902
+ __metadata6("design:paramtypes", [typeof (_a6 = typeof ApiService !== "undefined" && ApiService) === "function" ? _a6 : Object])
10903
+ ], SymbolIntentApiServiceProxy);
10904
+
10905
+ // src/proxy/SymbolIntentApiServiceProxyBase.ts
10906
+ var SymbolIntentApiServiceProxyBase = class {
10907
+ // 생성자는 프록시될 대상 객체(target)와 의존성을 주입받습니다.
10908
+ constructor(apiService) {
10909
+ const handler = SymbolIntentApiServiceProxy.createHandler(apiService);
10690
10910
  return new Proxy(this, handler);
10691
10911
  }
10692
10912
  };
@@ -10733,6 +10953,7 @@ ${indentStr}}`;
10733
10953
  constructor(_data) {
10734
10954
  this._data = _data;
10735
10955
  this.updateStats();
10956
+ this.etcData = _data.etcData;
10736
10957
  }
10737
10958
  get originalName() {
10738
10959
  return this._data.originalName;
@@ -10782,10 +11003,11 @@ ${indentStr}}`;
10782
11003
  }
10783
11004
  FileUtils2.File = File;
10784
11005
  FileUtils2.writeFile = async (buffer, config) => {
11006
+ config ?? (config = {});
10785
11007
  config.path ?? (config.path = `${node_os.tmpdir()}/${RandomUtils.uuid4()}_${Date.now()}`);
10786
11008
  await node_fs.promises.mkdir(config.path.substring(0, config.path.lastIndexOf("/")), { recursive: true });
10787
11009
  await node_fs.promises.writeFile(config.path, buffer);
10788
- return new File({ path: config.path, originalName: config.originalName });
11010
+ return new File({ path: config.path, originalName: config.originalName, etcData: config.etcData });
10789
11011
  };
10790
11012
  FileUtils2.path = (path2) => {
10791
11013
  return Array.isArray(path2) ? node_path.join(...path2) : path2;
@@ -10835,6 +11057,14 @@ ${indentStr}}`;
10835
11057
  const p = FileUtils2.path(path2);
10836
11058
  return node_fs.promises.readFile(p, config?.option);
10837
11059
  };
11060
+ FileUtils2.readJsonSync = (path2) => {
11061
+ const json = FileUtils2.readStringSync(path2);
11062
+ return JSON.parse(json);
11063
+ };
11064
+ FileUtils2.readJsonAsync = async (path2) => {
11065
+ const json = await FileUtils2.readStringAsync(path2);
11066
+ return JSON.parse(json);
11067
+ };
10838
11068
  FileUtils2.readStringSync = (path2) => {
10839
11069
  const p = FileUtils2.path(path2);
10840
11070
  return node_fs.readFileSync(p, "utf-8");
@@ -11023,7 +11253,7 @@ ${indentStr}}`;
11023
11253
  const formData = {};
11024
11254
  for (const it of m) {
11025
11255
  if (it.isFile) {
11026
- formData[it.name] = await FileUtils.writeFile(it.value, { originalName: it.filename });
11256
+ formData[it.name] = await FileUtils.writeFile(it.value, { originalName: it.filename, etcData: it });
11027
11257
  } else {
11028
11258
  const target = formData[it.name];
11029
11259
  if (Array.isArray(target)) {
@@ -11339,6 +11569,11 @@ ${indentStr}}`;
11339
11569
  // // this.res.write(chunk);
11340
11570
  // return this.createRequestResponseChain();
11341
11571
  // }
11572
+ resRedirect(statusCode, location) {
11573
+ this.res.statusCode = statusCode;
11574
+ this.res.setHeader(HttpHeaders.Location, location);
11575
+ this.res.end();
11576
+ }
11342
11577
  resWriteHead(statusCode, headers) {
11343
11578
  return this.createRequestResponseChain(this.res.writeHead(statusCode, headers));
11344
11579
  }
@@ -11393,6 +11628,7 @@ ${indentStr}}`;
11393
11628
  // ../simple-boot-http-server/dist/esm/decorators/MethodMapping.js
11394
11629
  var UrlMappingSituationType = /* @__PURE__ */ ((UrlMappingSituationType2) => {
11395
11630
  UrlMappingSituationType2["REQ_JSON_BODY"] = "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_JSON_BODY";
11631
+ UrlMappingSituationType2["REQ_URL_SEARCH_PARAMS_OBJ"] = "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_URL_SEARCH_PARAMS_OBJ";
11396
11632
  UrlMappingSituationType2["REQ_FORM_URL_BODY"] = "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_FORM_URL_BODY";
11397
11633
  return UrlMappingSituationType2;
11398
11634
  })(UrlMappingSituationType || {});
@@ -11414,42 +11650,6 @@ ${indentStr}}`;
11414
11650
  }
11415
11651
  };
11416
11652
 
11417
- // ../simple-boot/dist/esm/decorators/validate/Validation.js
11418
- var ValidMetadataKey = Symbol("ValidMetadataKey");
11419
- var getValidIndex = (target, propertyKey) => {
11420
- if (target !== null && void 0 !== target && typeof target === "object") {
11421
- target = target.constructor;
11422
- }
11423
- if (propertyKey) {
11424
- const parameters = Reflect.getOwnMetadata(ValidMetadataKey, target, propertyKey);
11425
- return parameters ?? [];
11426
- } else {
11427
- return ReflectUtils.getMetadata(ValidMetadataKey, target) ?? [];
11428
- }
11429
- };
11430
- var ValidationMetadataKey = Symbol("ValidationMetadataKey");
11431
- var getValidators = (target) => {
11432
- if (target !== null && void 0 !== target && typeof target === "object") {
11433
- target = target.constructor;
11434
- }
11435
- return ReflectUtils.getMetadata(ValidationMetadataKey, target) ?? [];
11436
- };
11437
- var execValidationInValid = (obj) => {
11438
- return execValidation(obj).filter((it) => !it.valid);
11439
- };
11440
- var execValidation = (obj) => {
11441
- const validators = getValidators(obj);
11442
- const reesults = [];
11443
- validators.forEach((it) => {
11444
- reesults.push({
11445
- name: it.propertyKey,
11446
- valid: it.validator(it.propertyKey, it),
11447
- message: ""
11448
- });
11449
- });
11450
- return reesults;
11451
- };
11452
-
11453
11653
  // ../simple-boot/dist/esm/errors/ValidException.js
11454
11654
  var ValidException = class {
11455
11655
  constructor(result) {
@@ -11548,6 +11748,10 @@ ${indentStr}}`;
11548
11748
  InjectSituationType2.TransactionManager = Symbol("TransactionManager");
11549
11749
  })(InjectSituationType || (InjectSituationType = {}));
11550
11750
 
11751
+ // ../simple-boot-http-server/dist/esm/models/datas/search/ReqSearchParamsObj.js
11752
+ var ReqSearchParamsObj = class {
11753
+ };
11754
+
11551
11755
  // ../simple-boot-http-server/dist/esm/SimpleBootHttpServer.js
11552
11756
  var SimpleBootHttpServer = class extends SimpleApplication {
11553
11757
  constructor(option = new HttpServerOption()) {
@@ -11683,6 +11887,7 @@ ${indentStr}}`;
11683
11887
  const validIndexs = getValidIndex(moduleInstance, it.propertyKey);
11684
11888
  if (injects) {
11685
11889
  const isJson = injects.find((it2) => it2.config?.situationType === UrlMappingSituationType.REQ_JSON_BODY);
11890
+ const isSearchParamsObj = injects.find((it2) => it2.config?.situationType === UrlMappingSituationType.REQ_URL_SEARCH_PARAMS_OBJ);
11686
11891
  const isFormUrl = injects.find((it2) => it2.config?.situationType === UrlMappingSituationType.REQ_FORM_URL_BODY);
11687
11892
  const isTransactionManager = injects.find((it2) => it2.config?.situationType === InjectSituationType.TransactionManager);
11688
11893
  const siturationContainers = new SituationTypeContainers();
@@ -11702,6 +11907,19 @@ ${indentStr}}`;
11702
11907
  data: data2
11703
11908
  }));
11704
11909
  }
11910
+ if (isSearchParamsObj) {
11911
+ let data2 = rr.reqUrlSearchParamsObj;
11912
+ if (validIndexs.includes(isSearchParamsObj.index)) {
11913
+ const inValid = execValidationInValid(data2);
11914
+ if ((inValid?.length ?? 0) > 0) {
11915
+ throw new ValidException(inValid);
11916
+ }
11917
+ }
11918
+ siturationContainers.push(new SituationTypeContainer({
11919
+ situationType: UrlMappingSituationType.REQ_URL_SEARCH_PARAMS_OBJ,
11920
+ data: data2
11921
+ }));
11922
+ }
11705
11923
  if (isFormUrl) {
11706
11924
  let data2 = await rr.reqBodyFormUrlData();
11707
11925
  if (isFormUrl.type) {
@@ -11731,6 +11949,8 @@ ${indentStr}}`;
11731
11949
  otherStorage.set(ReqFormUrlBody, await rr.reqBodyReqFormUrlBody());
11732
11950
  } else if (paramType === ReqJsonBody) {
11733
11951
  otherStorage.set(ReqJsonBody, await rr.reqBodyReqJsonBody());
11952
+ } else if (paramType === ReqSearchParamsObj) {
11953
+ otherStorage.set(ReqSearchParamsObj, rr.reqUrlSearchParamsObj);
11734
11954
  } else if (paramType === import_url2.URLSearchParams) {
11735
11955
  otherStorage.set(import_url2.URLSearchParams, rr.reqUrlSearchParams);
11736
11956
  } else if (paramType === ReqMultipartFormBody) {