@dooboostore/simple-boot-http-server 1.0.17 → 1.0.18

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 (328) hide show
  1. package/dist/cjs/SimpleBootHttpServer.js +930 -2
  2. package/dist/cjs/SimpleBootHttpServer.js.map +7 -0
  3. package/dist/cjs/codes/HttpHeaders.js +71 -1
  4. package/dist/cjs/codes/HttpHeaders.js.map +7 -0
  5. package/dist/cjs/codes/HttpMethod.js +41 -1
  6. package/dist/cjs/codes/HttpMethod.js.map +7 -0
  7. package/dist/cjs/codes/HttpStatus.js +49 -1
  8. package/dist/cjs/codes/HttpStatus.js.map +7 -0
  9. package/dist/cjs/codes/Mimes.js +57 -1
  10. package/dist/cjs/codes/Mimes.js.map +7 -0
  11. package/dist/cjs/codes/index.js +145 -1
  12. package/dist/cjs/codes/index.js.map +7 -0
  13. package/dist/cjs/decorators/MethodMapping.js +265 -2
  14. package/dist/cjs/decorators/MethodMapping.js.map +7 -0
  15. package/dist/cjs/decorators/index.js +267 -2
  16. package/dist/cjs/decorators/index.js.map +7 -0
  17. package/dist/cjs/endpoints/CrossDomainHeaderEndPoint.js +55 -1
  18. package/dist/cjs/endpoints/CrossDomainHeaderEndPoint.js.map +7 -0
  19. package/dist/cjs/endpoints/EndPoint.js +18 -1
  20. package/dist/cjs/endpoints/EndPoint.js.map +7 -0
  21. package/dist/cjs/endpoints/HeaderEndPoint.js +41 -1
  22. package/dist/cjs/endpoints/HeaderEndPoint.js.map +7 -0
  23. package/dist/cjs/endpoints/index.js +73 -1
  24. package/dist/cjs/endpoints/index.js.map +7 -0
  25. package/dist/cjs/errors/BadRequestError.js +45 -1
  26. package/dist/cjs/errors/BadRequestError.js.map +7 -0
  27. package/dist/cjs/errors/ForbiddenError.js +45 -1
  28. package/dist/cjs/errors/ForbiddenError.js.map +7 -0
  29. package/dist/cjs/errors/HttpError.js +36 -1
  30. package/dist/cjs/errors/HttpError.js.map +7 -0
  31. package/dist/cjs/errors/InternalServerError.js +45 -1
  32. package/dist/cjs/errors/InternalServerError.js.map +7 -0
  33. package/dist/cjs/errors/NotFoundError.js +45 -1
  34. package/dist/cjs/errors/NotFoundError.js.map +7 -0
  35. package/dist/cjs/errors/UnauthorizedError.js +45 -1
  36. package/dist/cjs/errors/UnauthorizedError.js.map +7 -0
  37. package/dist/cjs/errors/index.js +83 -1
  38. package/dist/cjs/errors/index.js.map +7 -0
  39. package/dist/cjs/filters/CacheFilter.js +153 -1
  40. package/dist/cjs/filters/CacheFilter.js.map +7 -0
  41. package/dist/cjs/filters/Filter.js +18 -1
  42. package/dist/cjs/filters/Filter.js.map +7 -0
  43. package/dist/cjs/filters/HttpStatusFilter.js +44 -1
  44. package/dist/cjs/filters/HttpStatusFilter.js.map +7 -0
  45. package/dist/cjs/filters/OpenApi3Filter.js +83 -2
  46. package/dist/cjs/filters/OpenApi3Filter.js.map +7 -0
  47. package/dist/cjs/filters/ResourceFilter.js +91 -2
  48. package/dist/cjs/filters/ResourceFilter.js.map +7 -0
  49. package/dist/cjs/filters/ThrowFilter.js +47 -1
  50. package/dist/cjs/filters/ThrowFilter.js.map +7 -0
  51. package/dist/cjs/filters/index.js +318 -2
  52. package/dist/cjs/filters/index.js.map +7 -0
  53. package/dist/cjs/index.js +1756 -2
  54. package/dist/cjs/index.js.map +7 -0
  55. package/dist/cjs/inject/InjectSituationType.js +33 -1
  56. package/dist/cjs/inject/InjectSituationType.js.map +7 -0
  57. package/dist/cjs/inject/index.js +35 -1
  58. package/dist/cjs/inject/index.js.map +7 -0
  59. package/dist/cjs/lifecycle/OnInit.js +18 -1
  60. package/dist/cjs/lifecycle/OnInit.js.map +7 -0
  61. package/dist/cjs/lifecycle/index.js +18 -1
  62. package/dist/cjs/lifecycle/index.js.map +7 -0
  63. package/dist/cjs/models/RequestResponse.js +500 -1
  64. package/dist/cjs/models/RequestResponse.js.map +7 -0
  65. package/dist/cjs/models/datas/HeaderData.js +35 -1
  66. package/dist/cjs/models/datas/HeaderData.js.map +7 -0
  67. package/dist/cjs/models/datas/MultipartData.js +18 -1
  68. package/dist/cjs/models/datas/MultipartData.js.map +7 -0
  69. package/dist/cjs/models/datas/ReqHeader.js +31 -1
  70. package/dist/cjs/models/datas/ReqHeader.js.map +7 -0
  71. package/dist/cjs/models/datas/Resource.js +550 -2
  72. package/dist/cjs/models/datas/Resource.js.map +7 -0
  73. package/dist/cjs/models/datas/body/ReqFormUrlBody.js +31 -1
  74. package/dist/cjs/models/datas/body/ReqFormUrlBody.js.map +7 -0
  75. package/dist/cjs/models/datas/body/ReqJsonBody.js +31 -1
  76. package/dist/cjs/models/datas/body/ReqJsonBody.js.map +7 -0
  77. package/dist/cjs/models/datas/body/ReqMultipartFormBody.js +34 -1
  78. package/dist/cjs/models/datas/body/ReqMultipartFormBody.js.map +7 -0
  79. package/dist/cjs/models/index.js +593 -2
  80. package/dist/cjs/models/index.js.map +7 -0
  81. package/dist/cjs/models/method/patch/PatchJson.js +49 -2
  82. package/dist/cjs/models/method/patch/PatchJson.js.map +7 -0
  83. package/dist/cjs/option/HttpServerOption.js +67 -1
  84. package/dist/cjs/option/HttpServerOption.js.map +7 -0
  85. package/dist/cjs/option/index.js +69 -1
  86. package/dist/cjs/option/index.js.map +7 -0
  87. package/dist/cjs/resolvers/Resolver.js +18 -1
  88. package/dist/cjs/resolvers/Resolver.js.map +7 -0
  89. package/dist/cjs/resolvers/{ResourceResorver.d.ts → ResourceResolver.d.ts} +2 -2
  90. package/dist/cjs/resolvers/{ResourceResorver.d.ts.map → ResourceResolver.d.ts.map} +1 -1
  91. package/dist/cjs/resolvers/ResourceResolver.js +571 -0
  92. package/dist/cjs/resolvers/ResourceResolver.js.map +7 -0
  93. package/dist/cjs/resolvers/index.d.ts +1 -1
  94. package/dist/cjs/resolvers/index.js +571 -2
  95. package/dist/cjs/resolvers/index.js.map +7 -0
  96. package/dist/cjs/session/SessionManager.js +577 -1
  97. package/dist/cjs/session/SessionManager.js.map +7 -0
  98. package/dist/cjs/session/index.js +579 -1
  99. package/dist/cjs/session/index.js.map +7 -0
  100. package/dist/esm/SimpleBootHttpServer.js +906 -2
  101. package/dist/esm/SimpleBootHttpServer.js.map +7 -0
  102. package/dist/esm/codes/HttpHeaders.js +47 -1
  103. package/dist/esm/codes/HttpHeaders.js.map +7 -0
  104. package/dist/esm/codes/HttpMethod.js +17 -1
  105. package/dist/esm/codes/HttpMethod.js.map +7 -0
  106. package/dist/esm/codes/HttpStatus.js +25 -1
  107. package/dist/esm/codes/HttpStatus.js.map +7 -0
  108. package/dist/esm/codes/Mimes.js +33 -1
  109. package/dist/esm/codes/Mimes.js.map +7 -0
  110. package/dist/esm/codes/index.js +116 -1
  111. package/dist/esm/codes/index.js.map +7 -0
  112. package/dist/esm/decorators/MethodMapping.js +211 -2
  113. package/dist/esm/decorators/MethodMapping.js.map +7 -0
  114. package/dist/esm/decorators/index.js +211 -2
  115. package/dist/esm/decorators/index.js.map +7 -0
  116. package/dist/esm/endpoints/CrossDomainHeaderEndPoint.js +31 -1
  117. package/dist/esm/endpoints/CrossDomainHeaderEndPoint.js.map +7 -0
  118. package/dist/esm/endpoints/EndPoint.js +1 -0
  119. package/dist/esm/endpoints/EndPoint.js.map +7 -0
  120. package/dist/esm/endpoints/HeaderEndPoint.js +17 -1
  121. package/dist/esm/endpoints/HeaderEndPoint.js.map +7 -0
  122. package/dist/esm/endpoints/index.js +46 -1
  123. package/dist/esm/endpoints/index.js.map +7 -0
  124. package/dist/esm/errors/BadRequestError.js +19 -1
  125. package/dist/esm/errors/BadRequestError.js.map +7 -0
  126. package/dist/esm/errors/ForbiddenError.js +19 -1
  127. package/dist/esm/errors/ForbiddenError.js.map +7 -0
  128. package/dist/esm/errors/HttpError.js +12 -1
  129. package/dist/esm/errors/HttpError.js.map +7 -0
  130. package/dist/esm/errors/InternalServerError.js +19 -1
  131. package/dist/esm/errors/InternalServerError.js.map +7 -0
  132. package/dist/esm/errors/NotFoundError.js +19 -1
  133. package/dist/esm/errors/NotFoundError.js.map +7 -0
  134. package/dist/esm/errors/UnauthorizedError.js +19 -1
  135. package/dist/esm/errors/UnauthorizedError.js.map +7 -0
  136. package/dist/esm/errors/index.js +52 -1
  137. package/dist/esm/errors/index.js.map +7 -0
  138. package/dist/esm/filters/CacheFilter.js +129 -1
  139. package/dist/esm/filters/CacheFilter.js.map +7 -0
  140. package/dist/esm/filters/Filter.js +1 -0
  141. package/dist/esm/filters/Filter.js.map +7 -0
  142. package/dist/esm/filters/HttpStatusFilter.js +20 -1
  143. package/dist/esm/filters/HttpStatusFilter.js.map +7 -0
  144. package/dist/esm/filters/OpenApi3Filter.js +57 -2
  145. package/dist/esm/filters/OpenApi3Filter.js.map +7 -0
  146. package/dist/esm/filters/ResourceFilter.js +57 -2
  147. package/dist/esm/filters/ResourceFilter.js.map +7 -0
  148. package/dist/esm/filters/ThrowFilter.js +23 -1
  149. package/dist/esm/filters/ThrowFilter.js.map +7 -0
  150. package/dist/esm/filters/index.js +278 -2
  151. package/dist/esm/filters/index.js.map +7 -0
  152. package/dist/esm/index.js +1662 -2
  153. package/dist/esm/index.js.map +7 -0
  154. package/dist/esm/inject/InjectSituationType.js +9 -1
  155. package/dist/esm/inject/InjectSituationType.js.map +7 -0
  156. package/dist/esm/inject/index.js +9 -1
  157. package/dist/esm/inject/index.js.map +7 -0
  158. package/dist/esm/lifecycle/OnInit.js +1 -0
  159. package/dist/esm/lifecycle/OnInit.js.map +7 -0
  160. package/dist/esm/lifecycle/index.js +1 -0
  161. package/dist/esm/lifecycle/index.js.map +7 -0
  162. package/dist/esm/models/RequestResponse.js +475 -1
  163. package/dist/esm/models/RequestResponse.js.map +7 -0
  164. package/dist/esm/models/datas/HeaderData.js +11 -1
  165. package/dist/esm/models/datas/HeaderData.js.map +7 -0
  166. package/dist/esm/models/datas/MultipartData.js +1 -0
  167. package/dist/esm/models/datas/MultipartData.js.map +7 -0
  168. package/dist/esm/models/datas/ReqHeader.js +7 -1
  169. package/dist/esm/models/datas/ReqHeader.js.map +7 -0
  170. package/dist/esm/models/datas/Resource.js +516 -2
  171. package/dist/esm/models/datas/Resource.js.map +7 -0
  172. package/dist/esm/models/datas/body/ReqFormUrlBody.js +7 -1
  173. package/dist/esm/models/datas/body/ReqFormUrlBody.js.map +7 -0
  174. package/dist/esm/models/datas/body/ReqJsonBody.js +7 -1
  175. package/dist/esm/models/datas/body/ReqJsonBody.js.map +7 -0
  176. package/dist/esm/models/datas/body/ReqMultipartFormBody.js +10 -1
  177. package/dist/esm/models/datas/body/ReqMultipartFormBody.js.map +7 -0
  178. package/dist/esm/models/index.js +549 -2
  179. package/dist/esm/models/index.js.map +7 -0
  180. package/dist/esm/models/method/patch/PatchJson.js +15 -2
  181. package/dist/esm/models/method/patch/PatchJson.js.map +7 -0
  182. package/dist/esm/option/HttpServerOption.d.ts +1 -1
  183. package/dist/esm/option/HttpServerOption.js +43 -1
  184. package/dist/esm/option/HttpServerOption.js.map +7 -0
  185. package/dist/esm/option/index.js +43 -1
  186. package/dist/esm/option/index.js.map +7 -0
  187. package/dist/esm/resolvers/Resolver.js +1 -0
  188. package/dist/esm/resolvers/Resolver.js.map +7 -0
  189. package/dist/esm/resolvers/{ResourceResorver.d.ts → ResourceResolver.d.ts} +2 -2
  190. package/dist/esm/resolvers/{ResourceResorver.d.ts.map → ResourceResolver.d.ts.map} +1 -1
  191. package/dist/esm/resolvers/ResourceResolver.js +538 -0
  192. package/dist/esm/resolvers/ResourceResolver.js.map +7 -0
  193. package/dist/esm/resolvers/index.d.ts +1 -1
  194. package/dist/esm/resolvers/index.js +538 -2
  195. package/dist/esm/resolvers/index.js.map +7 -0
  196. package/dist/esm/session/SessionManager.js +553 -1
  197. package/dist/esm/session/SessionManager.js.map +7 -0
  198. package/dist/esm/session/index.js +553 -1
  199. package/dist/esm/session/index.js.map +7 -0
  200. package/dist/esm-bundle/dooboostore-simple-boot-http-server.esm.js +1662 -2
  201. package/dist/esm-bundle/dooboostore-simple-boot-http-server.esm.js.map +7 -0
  202. package/dist/umd-bundle/dooboostore-simple-boot-http-server.umd.js +1699 -2
  203. package/dist/umd-bundle/dooboostore-simple-boot-http-server.umd.js.map +7 -0
  204. package/package.json +24 -21
  205. package/dist/cjs/SimpleBootHttpServer.js.LICENSE.txt +0 -20
  206. package/dist/cjs/decorators/MethodMapping.js.LICENSE.txt +0 -16
  207. package/dist/cjs/decorators/index.js.LICENSE.txt +0 -16
  208. package/dist/cjs/filters/OpenApi3Filter.js.LICENSE.txt +0 -16
  209. package/dist/cjs/filters/ResourceFilter.js.LICENSE.txt +0 -13
  210. package/dist/cjs/filters/index.js.LICENSE.txt +0 -30
  211. package/dist/cjs/index.js.LICENSE.txt +0 -46
  212. package/dist/cjs/models/datas/Resource.js.LICENSE.txt +0 -13
  213. package/dist/cjs/models/index.js.LICENSE.txt +0 -25
  214. package/dist/cjs/models/method/patch/PatchJson.js.LICENSE.txt +0 -11
  215. package/dist/cjs/resolvers/ResourceResorver.js +0 -2
  216. package/dist/cjs/resolvers/ResourceResorver.js.LICENSE.txt +0 -13
  217. package/dist/cjs/resolvers/index.js.LICENSE.txt +0 -13
  218. package/dist/esm/SimpleBootHttpServer.js.LICENSE.txt +0 -20
  219. package/dist/esm/decorators/MethodMapping.js.LICENSE.txt +0 -16
  220. package/dist/esm/decorators/index.js.LICENSE.txt +0 -16
  221. package/dist/esm/filters/OpenApi3Filter.js.LICENSE.txt +0 -16
  222. package/dist/esm/filters/ResourceFilter.js.LICENSE.txt +0 -13
  223. package/dist/esm/filters/index.js.LICENSE.txt +0 -30
  224. package/dist/esm/index.js.LICENSE.txt +0 -46
  225. package/dist/esm/models/datas/Resource.js.LICENSE.txt +0 -13
  226. package/dist/esm/models/index.js.LICENSE.txt +0 -25
  227. package/dist/esm/models/method/patch/PatchJson.js.LICENSE.txt +0 -11
  228. package/dist/esm/resolvers/ResourceResorver.js +0 -2
  229. package/dist/esm/resolvers/ResourceResorver.js.LICENSE.txt +0 -13
  230. package/dist/esm/resolvers/index.js.LICENSE.txt +0 -13
  231. package/dist/esm-bundle/dooboostore-simple-boot-http-server.esm.js.LICENSE.txt +0 -54
  232. package/dist/umd-bundle/SimpleBootHttpServer.d.ts +0 -14
  233. package/dist/umd-bundle/SimpleBootHttpServer.d.ts.map +0 -1
  234. package/dist/umd-bundle/codes/HttpHeaders.d.ts +0 -42
  235. package/dist/umd-bundle/codes/HttpHeaders.d.ts.map +0 -1
  236. package/dist/umd-bundle/codes/HttpMethod.d.ts +0 -12
  237. package/dist/umd-bundle/codes/HttpMethod.d.ts.map +0 -1
  238. package/dist/umd-bundle/codes/HttpStatus.d.ts +0 -45
  239. package/dist/umd-bundle/codes/HttpStatus.d.ts.map +0 -1
  240. package/dist/umd-bundle/codes/Mimes.d.ts +0 -28
  241. package/dist/umd-bundle/codes/Mimes.d.ts.map +0 -1
  242. package/dist/umd-bundle/codes/index.d.ts +0 -5
  243. package/dist/umd-bundle/codes/index.d.ts.map +0 -1
  244. package/dist/umd-bundle/decorators/MethodMapping.d.ts +0 -74
  245. package/dist/umd-bundle/decorators/MethodMapping.d.ts.map +0 -1
  246. package/dist/umd-bundle/decorators/index.d.ts +0 -2
  247. package/dist/umd-bundle/decorators/index.d.ts.map +0 -1
  248. package/dist/umd-bundle/dooboostore-simple-boot-http-server.umd.js.LICENSE.txt +0 -54
  249. package/dist/umd-bundle/endpoints/CrossDomainHeaderEndPoint.d.ts +0 -16
  250. package/dist/umd-bundle/endpoints/CrossDomainHeaderEndPoint.d.ts.map +0 -1
  251. package/dist/umd-bundle/endpoints/EndPoint.d.ts +0 -7
  252. package/dist/umd-bundle/endpoints/EndPoint.d.ts.map +0 -1
  253. package/dist/umd-bundle/endpoints/HeaderEndPoint.d.ts +0 -12
  254. package/dist/umd-bundle/endpoints/HeaderEndPoint.d.ts.map +0 -1
  255. package/dist/umd-bundle/endpoints/index.d.ts +0 -4
  256. package/dist/umd-bundle/endpoints/index.d.ts.map +0 -1
  257. package/dist/umd-bundle/errors/BadRequestError.d.ts +0 -8
  258. package/dist/umd-bundle/errors/BadRequestError.d.ts.map +0 -1
  259. package/dist/umd-bundle/errors/ForbiddenError.d.ts +0 -8
  260. package/dist/umd-bundle/errors/ForbiddenError.d.ts.map +0 -1
  261. package/dist/umd-bundle/errors/HttpError.d.ts +0 -12
  262. package/dist/umd-bundle/errors/HttpError.d.ts.map +0 -1
  263. package/dist/umd-bundle/errors/InternalServerError.d.ts +0 -8
  264. package/dist/umd-bundle/errors/InternalServerError.d.ts.map +0 -1
  265. package/dist/umd-bundle/errors/NotFoundError.d.ts +0 -8
  266. package/dist/umd-bundle/errors/NotFoundError.d.ts.map +0 -1
  267. package/dist/umd-bundle/errors/UnauthorizedError.d.ts +0 -8
  268. package/dist/umd-bundle/errors/UnauthorizedError.d.ts.map +0 -1
  269. package/dist/umd-bundle/errors/index.d.ts +0 -7
  270. package/dist/umd-bundle/errors/index.d.ts.map +0 -1
  271. package/dist/umd-bundle/filters/CacheFilter.d.ts +0 -45
  272. package/dist/umd-bundle/filters/CacheFilter.d.ts.map +0 -1
  273. package/dist/umd-bundle/filters/Filter.d.ts +0 -17
  274. package/dist/umd-bundle/filters/Filter.d.ts.map +0 -1
  275. package/dist/umd-bundle/filters/HttpStatusFilter.d.ts +0 -20
  276. package/dist/umd-bundle/filters/HttpStatusFilter.d.ts.map +0 -1
  277. package/dist/umd-bundle/filters/OpenApi3Filter.d.ts +0 -142
  278. package/dist/umd-bundle/filters/OpenApi3Filter.d.ts.map +0 -1
  279. package/dist/umd-bundle/filters/ResourceFilter.d.ts +0 -24
  280. package/dist/umd-bundle/filters/ResourceFilter.d.ts.map +0 -1
  281. package/dist/umd-bundle/filters/ThrowFilter.d.ts +0 -19
  282. package/dist/umd-bundle/filters/ThrowFilter.d.ts.map +0 -1
  283. package/dist/umd-bundle/filters/index.d.ts +0 -7
  284. package/dist/umd-bundle/filters/index.d.ts.map +0 -1
  285. package/dist/umd-bundle/index.d.ts +0 -13
  286. package/dist/umd-bundle/index.d.ts.map +0 -1
  287. package/dist/umd-bundle/inject/InjectSituationType.d.ts +0 -4
  288. package/dist/umd-bundle/inject/InjectSituationType.d.ts.map +0 -1
  289. package/dist/umd-bundle/inject/index.d.ts +0 -2
  290. package/dist/umd-bundle/inject/index.d.ts.map +0 -1
  291. package/dist/umd-bundle/lifecycle/OnInit.d.ts +0 -5
  292. package/dist/umd-bundle/lifecycle/OnInit.d.ts.map +0 -1
  293. package/dist/umd-bundle/lifecycle/index.d.ts +0 -2
  294. package/dist/umd-bundle/lifecycle/index.d.ts.map +0 -1
  295. package/dist/umd-bundle/models/RequestResponse.d.ts +0 -100
  296. package/dist/umd-bundle/models/RequestResponse.d.ts.map +0 -1
  297. package/dist/umd-bundle/models/datas/HeaderData.d.ts +0 -10
  298. package/dist/umd-bundle/models/datas/HeaderData.d.ts.map +0 -1
  299. package/dist/umd-bundle/models/datas/MultipartData.d.ts +0 -12
  300. package/dist/umd-bundle/models/datas/MultipartData.d.ts.map +0 -1
  301. package/dist/umd-bundle/models/datas/ReqHeader.d.ts +0 -68
  302. package/dist/umd-bundle/models/datas/ReqHeader.d.ts.map +0 -1
  303. package/dist/umd-bundle/models/datas/Resource.d.ts +0 -11
  304. package/dist/umd-bundle/models/datas/Resource.d.ts.map +0 -1
  305. package/dist/umd-bundle/models/datas/body/ReqFormUrlBody.d.ts +0 -4
  306. package/dist/umd-bundle/models/datas/body/ReqFormUrlBody.d.ts.map +0 -1
  307. package/dist/umd-bundle/models/datas/body/ReqJsonBody.d.ts +0 -4
  308. package/dist/umd-bundle/models/datas/body/ReqJsonBody.d.ts.map +0 -1
  309. package/dist/umd-bundle/models/datas/body/ReqMultipartFormBody.d.ts +0 -6
  310. package/dist/umd-bundle/models/datas/body/ReqMultipartFormBody.d.ts.map +0 -1
  311. package/dist/umd-bundle/models/index.d.ts +0 -10
  312. package/dist/umd-bundle/models/index.d.ts.map +0 -1
  313. package/dist/umd-bundle/models/method/patch/PatchJson.d.ts +0 -8
  314. package/dist/umd-bundle/models/method/patch/PatchJson.d.ts.map +0 -1
  315. package/dist/umd-bundle/option/HttpServerOption.d.ts +0 -83
  316. package/dist/umd-bundle/option/HttpServerOption.d.ts.map +0 -1
  317. package/dist/umd-bundle/option/index.d.ts +0 -2
  318. package/dist/umd-bundle/option/index.d.ts.map +0 -1
  319. package/dist/umd-bundle/resolvers/Resolver.d.ts +0 -5
  320. package/dist/umd-bundle/resolvers/Resolver.d.ts.map +0 -1
  321. package/dist/umd-bundle/resolvers/ResourceResorver.d.ts +0 -6
  322. package/dist/umd-bundle/resolvers/ResourceResorver.d.ts.map +0 -1
  323. package/dist/umd-bundle/resolvers/index.d.ts +0 -3
  324. package/dist/umd-bundle/resolvers/index.d.ts.map +0 -1
  325. package/dist/umd-bundle/session/SessionManager.d.ts +0 -57
  326. package/dist/umd-bundle/session/SessionManager.d.ts.map +0 -1
  327. package/dist/umd-bundle/session/index.d.ts +0 -2
  328. package/dist/umd-bundle/session/index.d.ts.map +0 -1
@@ -1 +1,579 @@
1
- (()=>{"use strict";var t={426:(t,e,r)=>{r.d(e,{T:()=>o});var i,n={d:(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},s={};n.d(s,{T:()=>i}),function(t){t.toString=function(t,e){return null==t?"":"string"==typeof t?t:t.toString(e?.encoding??"utf-8",e?.start,e?.end)},t.toBuffer=(t,e)=>"base64"===e?.encoding?(t=t.split(";base64,").pop()||"",Buffer.from(t,"base64")):Buffer.from(t)}(i||(i={}));const o=s.T},889:(t,e,r)=>{r.d(e,{n:()=>l});var i={9284:(t,e,r)=>{var i;r.d(e,{U:()=>i}),function(t){t.isArrowFunction=t=>"function"==typeof t&&void 0===t.prototype&&!t.toString().startsWith("class"),t.isPlainObject=t=>null!==t&&"object"==typeof t&&t.constructor===Object,t.isFrozen=t=>Object.isFrozen(t),t.isSealed=t=>Object.isSealed(t),t.isFrozenOrSealed=e=>t.isFrozen(e)||t.isSealed(e),t.isFrozenAndSealed=e=>t.isFrozen(e)&&t.isSealed(e),t.isNotFrozen=t=>!Object.isFrozen(t),t.isNotSealed=t=>!Object.isSealed(t),t.isNotFrozenOrSealed=e=>!t.isFrozen(e)&&!t.isSealed(e),t.isNotFrozenAndSealed=e=>!t.isFrozen(e)||!t.isSealed(e),t.isNullOrUndefined=t=>null==t||void 0===t,t.isConstructor=t=>"function"==typeof t&&void 0!==t.prototype&&t.prototype.constructor===t,t.isFunction=e=>"function"==typeof e&&!t.isConstructor(e),t.isNullish=e=>t.isNotNullish(e),t.isNotNullish=e=>Array.isArray(e)||t.isString(e)?e.length>0:e instanceof Set||e instanceof Map?e.size>0:"object"==typeof e&&null!==e?Object.keys(e).length>0:null!=e,t.isNotNullUndefined=t=>null!=t,t.isNull=t=>null===t,t.isUndefined=t=>void 0===t,t.isArray=e=>!t.isNullOrUndefined(e)&&"[object Array]"===Object.prototype.toString.call(e).trim(),t.isStringNumber=t=>"number"==typeof t?!isNaN(t):"string"==typeof t&&""!==t.trim()&&!isNaN(Number(t)),t.isNumber=e=>!t.isNullOrUndefined(e)&&"[object Number]"===Object.prototype.toString.call(e).trim(),t.isIterator=t=>null!=t&&"function"==typeof t[Symbol.iterator],t.isString=e=>!t.isNullOrUndefined(e)&&"[object String]"===Object.prototype.toString.call(e).trim(),t.isObject=e=>!t.isNullOrUndefined(e)&&"[object Object]"===Object.prototype.toString.call(e).trim(),t.isMap=e=>!t.isNullOrUndefined(e)&&"[object Map]"===Object.prototype.toString.call(e).trim(),t.isEmpty=e=>!!t.isNullOrUndefined(e)||(t.isArray(e)?0===e.length:t.isString(e)?0===e.trim().length:t.isMap(e)?0===e.size:!!t.isObject(e)&&0===Object.keys(e).length),t.isSet=t=>t instanceof Set,t.isNullishFiltered=t=>Array.isArray(t)?t.every(t=>null!=t):null!=t,t.isFalsyFiltered=t=>Array.isArray(t)?t.every(t=>t):!!t,t.includeValue=(t,e)=>Object.values(t).includes(e),t.includeKey=(t,e)=>Object.keys(t).includes(e),t.lastConsonantLetter=t=>(t.charCodeAt(t.length-1)-44032)%28>0,t.inRange=(t,e,r)=>e<=t&&t<=r,t.isBase64=t=>{let e=t;const r=t.split(";base64,");if(r.length>1)e=r[1];else if(t.startsWith("data:")){const r=t.indexOf(",");r>-1&&(e=t.substring(r+1))}return""===e||e.length,/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}(i||(i={}))}},n={};function s(t){var e=n[t];if(void 0!==e)return e.exports;var r=n[t]={exports:{}};return i[t](r,r.exports,s),r.exports}s.d=(t,e)=>{for(var r in e)s.o(e,r)&&!s.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var o={};s.d(o,{n:()=>a});var a,h=s(9284);!function(t){t.uniqueInts=(e,r,i)=>{const n=[];if(i>r-e)throw new Error("Count is greater than the range of unique integers");for(;n.length<i;){const i=t.int(e,r);n.includes(i)||n.push(i)}return n},t.chance=t=>{if(t<0||t>1)throw new Error("Percentage must be between 0 and 1");return Math.random()<t},t.int=(e,r)=>Math.floor(t.float(e,r)),t.float=(t,e)=>h.U.isNullOrUndefined(t)?Math.random():!h.U.isNullOrUndefined(t)&&h.U.isNullOrUndefined(e)?Math.random()*(t||0):Math.random()*((e||0)-(t||0))+(t||0),t.uuid=(t="xxxx-xxxx-xxxx-xxxx")=>t.replace(/[xy]/g,function(t){const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}),t.uuid4=()=>{let t,e="";for(t=0;t<32;t+=1)switch(t){case 8:case 20:e+="-",e+=(16*Math.random()|0).toString(16);break;case 12:e+="-",e+="4";break;case 16:e+="-",e+=(4*Math.random()|8).toString(16);break;default:e+=(16*Math.random()|0).toString(16)}return e},t.hex=()=>{const t="0123456789ABCDEF".split("");let e="";for(let r=0;r<6;r++)e+=t[Math.floor(16*Math.random())];return e},t.rgb=()=>{const t="0123456789ABCDEF".split("");let e="#";for(let r=0;r<6;r++)e+=t[Math.floor(16*Math.random())];return e},t.rgba=()=>{const t="0123456789ABCDEF".split("");let e="#";for(let r=0;r<8;r++)e+=t[Math.floor(16*Math.random())];return e},t.alphabet=t=>{const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");let r="";for(let i=0;i<t;i++)r+=e[Math.floor(Math.random()*e.length)];return r}}(a||(a={}));const l=o.n},1022:(t,e,r)=>{r.d(e,{ReqJsonBody:()=>i});class i{}},1262:(t,e,r)=>{r.d(e,{SessionManager:()=>s});var i=r(889),n=r(3500);class s{constructor(t){this.option=t,this.sessions=new Map,this.sessionOption=t.sessionOption,setInterval(async()=>{const t=await this.getSessionUUIDs();for(const e of t){const t=await this.getSessionDataSet(e);t&&this.isExpired(t.access)&&await this.deleteSession(e)}},this.sessionOption.expiredTime)}async getSessionUUIDs(){return this.sessionOption.provider?.uuids?this.sessionOption.provider.uuids():Array.from(this.sessions.keys())}async deleteSession(t){this.sessionOption.provider?.delete?this.sessionOption.provider.delete(t):this.sessions.delete(t)}async getSessionDataSet(t){return this.sessionOption.provider?.get?this.sessionOption.provider.get(t):this.sessions.get(t)}async setSessionDataSet(t,e){this.sessionOption.provider?.set?this.sessionOption.provider.set(t,e):this.sessions.set(t,e)}isExpired(t,e=Date.now()){return e-t>=this.option.sessionOption.expiredTime}makeUUID(){return i.n.uuid("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")}async session(t){let e;e=t instanceof n.RequestResponse?t.reqCookieGet(this.sessionOption.key)??this.makeUUID():"string"==typeof t?t:this.makeUUID();let r=await this.getSessionDataSet(e);const i=Date.now();return r?(this.isExpired(r.access,i)&&delete r.data,r.access=i):r={access:i},await this.setSessionDataSet(e,r),{uuid:e,dataSet:r}}}},3055:(t,e,r)=>{r.d(e,{i:()=>g});const i=require("node:module"),n=(0,i.createRequire)("file:///Users/hyunhakim/workspace/dooboostore/source/dooboostore-develop/dooboostore-develop.github.io/source/packages/@dooboostore/core-node/dist/esm/file/FileUtils.js")("node:os"),s=(0,i.createRequire)("file:///Users/hyunhakim/workspace/dooboostore/source/dooboostore-develop/dooboostore-develop.github.io/source/packages/@dooboostore/core-node/dist/esm/file/FileUtils.js")("node:fs"),o=(0,i.createRequire)("file:///Users/hyunhakim/workspace/dooboostore/source/dooboostore-develop/dooboostore-develop.github.io/source/packages/@dooboostore/core-node/dist/esm/file/FileUtils.js")("node:path");var a={9284:(t,e,r)=>{var i;r.d(e,{U:()=>i}),function(t){t.isArrowFunction=t=>"function"==typeof t&&void 0===t.prototype&&!t.toString().startsWith("class"),t.isPlainObject=t=>null!==t&&"object"==typeof t&&t.constructor===Object,t.isFrozen=t=>Object.isFrozen(t),t.isSealed=t=>Object.isSealed(t),t.isFrozenOrSealed=e=>t.isFrozen(e)||t.isSealed(e),t.isFrozenAndSealed=e=>t.isFrozen(e)&&t.isSealed(e),t.isNotFrozen=t=>!Object.isFrozen(t),t.isNotSealed=t=>!Object.isSealed(t),t.isNotFrozenOrSealed=e=>!t.isFrozen(e)&&!t.isSealed(e),t.isNotFrozenAndSealed=e=>!t.isFrozen(e)||!t.isSealed(e),t.isNullOrUndefined=t=>null==t||void 0===t,t.isConstructor=t=>"function"==typeof t&&void 0!==t.prototype&&t.prototype.constructor===t,t.isFunction=e=>"function"==typeof e&&!t.isConstructor(e),t.isNullish=e=>t.isNotNullish(e),t.isNotNullish=e=>Array.isArray(e)||t.isString(e)?e.length>0:e instanceof Set||e instanceof Map?e.size>0:"object"==typeof e&&null!==e?Object.keys(e).length>0:null!=e,t.isNotNullUndefined=t=>null!=t,t.isNull=t=>null===t,t.isUndefined=t=>void 0===t,t.isArray=e=>!t.isNullOrUndefined(e)&&"[object Array]"===Object.prototype.toString.call(e).trim(),t.isStringNumber=t=>"number"==typeof t?!isNaN(t):"string"==typeof t&&""!==t.trim()&&!isNaN(Number(t)),t.isNumber=e=>!t.isNullOrUndefined(e)&&"[object Number]"===Object.prototype.toString.call(e).trim(),t.isIterator=t=>null!=t&&"function"==typeof t[Symbol.iterator],t.isString=e=>!t.isNullOrUndefined(e)&&"[object String]"===Object.prototype.toString.call(e).trim(),t.isObject=e=>!t.isNullOrUndefined(e)&&"[object Object]"===Object.prototype.toString.call(e).trim(),t.isMap=e=>!t.isNullOrUndefined(e)&&"[object Map]"===Object.prototype.toString.call(e).trim(),t.isEmpty=e=>!!t.isNullOrUndefined(e)||(t.isArray(e)?0===e.length:t.isString(e)?0===e.trim().length:t.isMap(e)?0===e.size:!!t.isObject(e)&&0===Object.keys(e).length),t.isSet=t=>t instanceof Set,t.isNullishFiltered=t=>Array.isArray(t)?t.every(t=>null!=t):null!=t,t.isFalsyFiltered=t=>Array.isArray(t)?t.every(t=>t):!!t,t.includeValue=(t,e)=>Object.values(t).includes(e),t.includeKey=(t,e)=>Object.keys(t).includes(e),t.lastConsonantLetter=t=>(t.charCodeAt(t.length-1)-44032)%28>0,t.inRange=(t,e,r)=>e<=t&&t<=r,t.isBase64=t=>{let e=t;const r=t.split(";base64,");if(r.length>1)e=r[1];else if(t.startsWith("data:")){const r=t.indexOf(",");r>-1&&(e=t.substring(r+1))}return""===e||e.length,/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}(i||(i={}))}},h={};function l(t){var e=h[t];if(void 0!==e)return e.exports;var r=h[t]={exports:{}};return a[t](r,r.exports,l),r.exports}l.d=(t,e)=>{for(var r in e)l.o(e,r)&&!l.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},l.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var c={};l.d(c,{n:()=>u});var u,d,y=l(9284);(d=u||(u={})).uniqueInts=(t,e,r)=>{const i=[];if(r>e-t)throw new Error("Count is greater than the range of unique integers");for(;i.length<r;){const r=d.int(t,e);i.includes(r)||i.push(r)}return i},d.chance=t=>{if(t<0||t>1)throw new Error("Percentage must be between 0 and 1");return Math.random()<t},d.int=(t,e)=>Math.floor(d.float(t,e)),d.float=(t,e)=>y.U.isNullOrUndefined(t)?Math.random():!y.U.isNullOrUndefined(t)&&y.U.isNullOrUndefined(e)?Math.random()*(t||0):Math.random()*((e||0)-(t||0))+(t||0),d.uuid=(t="xxxx-xxxx-xxxx-xxxx")=>t.replace(/[xy]/g,function(t){const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}),d.uuid4=()=>{let t,e="";for(t=0;t<32;t+=1)switch(t){case 8:case 20:e+="-",e+=(16*Math.random()|0).toString(16);break;case 12:e+="-",e+="4";break;case 16:e+="-",e+=(4*Math.random()|8).toString(16);break;default:e+=(16*Math.random()|0).toString(16)}return e},d.hex=()=>{const t="0123456789ABCDEF".split("");let e="";for(let r=0;r<6;r++)e+=t[Math.floor(16*Math.random())];return e},d.rgb=()=>{const t="0123456789ABCDEF".split("");let e="#";for(let r=0;r<6;r++)e+=t[Math.floor(16*Math.random())];return e},d.rgba=()=>{const t="0123456789ABCDEF".split("");let e="#";for(let r=0;r<8;r++)e+=t[Math.floor(16*Math.random())];return e},d.alphabet=t=>{const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");let r="";for(let i=0;i<t;i++)r+=e[Math.floor(Math.random()*e.length)];return r};const p=c.n;var g;!function(t){class e{constructor(t){this._data=t,this.updateStats()}get originalName(){return this._data.originalName}get directory(){return this._data.path.substring(0,this._data.path.lastIndexOf("/"))}get fileName(){return this._data.path.substring(this._data.path.lastIndexOf("/")+1)}get path(){return this._data.path}get extension(){const t=this._data.path.substring(this._data.path.lastIndexOf(".")+1);return t.length>0?t:void 0}async updateStats(){const t=await s.promises.stat(this._data.path);this.size=t.size}async delete(){await s.promises.unlink(this._data.path),this._data.path="",this.size=void 0}async copy(t){await s.promises.copyFile(this._data.path,t),this._data.path=t,this.size=(await s.promises.stat(t)).size}async move(t){const e=t.substring(0,t.lastIndexOf("/"));await s.promises.mkdir(e,{recursive:!0}),await s.promises.rename(this._data.path,t),this._data.path=t,this.size=(await s.promises.stat(t)).size}async rename(t){const e=`${this.directory}/${t}`;await s.promises.rename(this._data.path,e),this.size=(await s.promises.stat(e)).size,this._data.path=e}}t.File=e,t.writeFile=async(t,r)=>(r.path??(r.path=`${n.tmpdir()}/${p.uuid4()}_${Date.now()}`),await s.promises.mkdir(r.path.substring(0,r.path.lastIndexOf("/")),{recursive:!0}),await s.promises.writeFile(r.path,t),new e({path:r.path,originalName:r.originalName})),t.path=t=>Array.isArray(t)?o.join(...t):t,t.existsSync=(e,r)=>{const i=t.path(e);return s.existsSync(i)?(r?.existes?.(i),!0):(r?.noExistes?.(i),!1)},t.mkdirSync=(e,r)=>{t.existsSync(e,{noExistes:t=>{s.mkdirSync(t,r)}})},t.mkdir=async(e,r)=>new Promise((i,n)=>{t.existsSync(e,{noExistes:t=>{s.mkdirSync(t,r),i(t)},existes:t=>{i(t)}})}),t.readSync=(e,r)=>{const i=t.path(e);return r?.option?s.readFileSync(i,r.option):s.readFileSync(i)},t.read=async(e,r)=>{const i=t.path(e);return s.readFile(i,r.option)},t.write=(e,r)=>{const i=t.path(r.path);return r.options?s.writeFileSync(i,e,r.options):s.writeFileSync(i,e),i},t.writeAppend=(e,r)=>{const i=t.path(r.path);return r.options?s.appendFileSync(i,e,r.options):s.appendFileSync(i,e),i},t.deleteSync=(e,r)=>{const i=t.path(e);t.existsSync(i)&&(r?.options?s.rmSync(i,r?.options):s.rmSync(i))},t.deleteDirSync=(e,r)=>{const i=t.path(e);t.existsSync(i)&&(r?.options?s.rmdirSync(i,r?.options):s.rmdirSync(i))},t.deleteFileSync=e=>{const r=t.path(e);t.existsSync(r)&&s.unlinkSync(r)},t.copySync=(e,r,i)=>{const n=t.path(e),o=t.path(r);s.cpSync(n,o,i)}}(g||(g={}))},3106:t=>{t.exports=require("zlib")},3500:(t,e,r)=>{r.d(e,{RequestResponse:()=>N});var i=r(7953),n={532:(t,e,r)=>{r.d(e,{r:()=>l});var i={3056:(t,e,r)=>{r.d(e,{$:()=>i});var i,n=r(9284);!function(t){t.deleteEnter=t=>t.replace(/\r?\n/g,""),t.pickEmoji=t=>t.match(/[\p{Emoji}]/gu)??[],t.regexExec=(t,e)=>{let r=t.exec(e);const i=[];for(;r;)i.push(r),r=t.exec(r.input);return i},t.regexExecArrayReplace=(e,r,i)=>((Array.isArray(r)?r:t.regexExec(r,e)).reverse().forEach(t=>{const r="string"==typeof i?i:i(t);e=e.substr(0,t.index)+e.substr(t.index).replace(t[0],r)}),e),t.escapeSpecialCharacterRegExp=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t.trim=t=>t.trim(),t.rsubString=(t,e)=>t.substring(t.length-e,t.length),t.lsubString=(t,e)=>t.substring(0,e),t.lpad=(e,r,i)=>{for(;r>i.length;)i=e+i;return t.rsubString(i,r)},t.rpad=(e,r,i)=>{for(;r>i.length;)i+=e;return t.lsubString(i,r)},t.lappend=(t,e)=>{let r="",i=0;for(;i++<t;)r+=e;return r},t.unescape=t=>{if(!t)return"";const e={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿","#x27":"'"};return t.replace(/&((?:(?:[a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});?)+);/gi,(t,r)=>r.toLowerCase().split(";").map(r=>r in e?e[r]:t).join(""))},t.executeExpression=(t,e)=>t.replace(/\${([^{}]*)}/g,(t,r)=>String(e[r]??t)),t.ellipsis=(t,e)=>t.length>e?`${t.slice(0,e)}...`:t,t.appendPostposition=(t,{vowel:e,consonant:r})=>`${t}${n.U.lastConsonantLetter(t)?r:e}`}(i||(i={}))},9284:(t,e,r)=>{var i;r.d(e,{U:()=>i}),function(t){t.isArrowFunction=t=>"function"==typeof t&&void 0===t.prototype&&!t.toString().startsWith("class"),t.isPlainObject=t=>null!==t&&"object"==typeof t&&t.constructor===Object,t.isFrozen=t=>Object.isFrozen(t),t.isSealed=t=>Object.isSealed(t),t.isFrozenOrSealed=e=>t.isFrozen(e)||t.isSealed(e),t.isFrozenAndSealed=e=>t.isFrozen(e)&&t.isSealed(e),t.isNotFrozen=t=>!Object.isFrozen(t),t.isNotSealed=t=>!Object.isSealed(t),t.isNotFrozenOrSealed=e=>!t.isFrozen(e)&&!t.isSealed(e),t.isNotFrozenAndSealed=e=>!t.isFrozen(e)||!t.isSealed(e),t.isNullOrUndefined=t=>null==t||void 0===t,t.isConstructor=t=>"function"==typeof t&&void 0!==t.prototype&&t.prototype.constructor===t,t.isFunction=e=>"function"==typeof e&&!t.isConstructor(e),t.isNullish=e=>t.isNotNullish(e),t.isNotNullish=e=>Array.isArray(e)||t.isString(e)?e.length>0:e instanceof Set||e instanceof Map?e.size>0:"object"==typeof e&&null!==e?Object.keys(e).length>0:null!=e,t.isNotNullUndefined=t=>null!=t,t.isNull=t=>null===t,t.isUndefined=t=>void 0===t,t.isArray=e=>!t.isNullOrUndefined(e)&&"[object Array]"===Object.prototype.toString.call(e).trim(),t.isStringNumber=t=>"number"==typeof t?!isNaN(t):"string"==typeof t&&""!==t.trim()&&!isNaN(Number(t)),t.isNumber=e=>!t.isNullOrUndefined(e)&&"[object Number]"===Object.prototype.toString.call(e).trim(),t.isIterator=t=>null!=t&&"function"==typeof t[Symbol.iterator],t.isString=e=>!t.isNullOrUndefined(e)&&"[object String]"===Object.prototype.toString.call(e).trim(),t.isObject=e=>!t.isNullOrUndefined(e)&&"[object Object]"===Object.prototype.toString.call(e).trim(),t.isMap=e=>!t.isNullOrUndefined(e)&&"[object Map]"===Object.prototype.toString.call(e).trim(),t.isEmpty=e=>!!t.isNullOrUndefined(e)||(t.isArray(e)?0===e.length:t.isString(e)?0===e.trim().length:t.isMap(e)?0===e.size:!!t.isObject(e)&&0===Object.keys(e).length),t.isSet=t=>t instanceof Set,t.isNullishFiltered=t=>Array.isArray(t)?t.every(t=>null!=t):null!=t,t.isFalsyFiltered=t=>Array.isArray(t)?t.every(t=>t):!!t,t.includeValue=(t,e)=>Object.values(t).includes(e),t.includeKey=(t,e)=>Object.keys(t).includes(e),t.lastConsonantLetter=t=>(t.charCodeAt(t.length-1)-44032)%28>0,t.inRange=(t,e,r)=>e<=t&&t<=r,t.isBase64=t=>{let e=t;const r=t.split(";base64,");if(r.length>1)e=r[1];else if(t.startsWith("data:")){const r=t.indexOf(",");r>-1&&(e=t.substring(r+1))}return""===e||e.length,/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}(i||(i={}))}},n={};function s(t){var e=n[t];if(void 0!==e)return e.exports;var r=n[t]={exports:{}};return i[t](r,r.exports,s),r.exports}s.d=(t,e)=>{for(var r in e)s.o(e,r)&&!s.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var o={};s.d(o,{r:()=>a});var a,h=s(3056);!function(t){let e,r;t.bindExpression=(t,e)=>(t??"").replace(/\$\{([\s\S.]*?)\}/g,(t,r)=>{const[i,n]=r.split(":"),s=e[i];return s?"function"==typeof s?s(e[n]):s:""}),function(t){t.isExpression=t=>/[$#]\{([\s\S.]*?)\}[$#]/g.test(t??""),t.expressionGroups=t=>h.$.regexExec(/[$#]\{([\s\S.]*?)\}[$#]/g,t??"")}(e=t.Group||(t.Group={})),function(t){t.pathNameData=(t,e)=>{const r=t.split("/"),i=e.split("/");if(r.length!==i.length)return;const n={};for(let t=0;t<i.length;t++){const e=i[t],s=r[t],o=/^\{(.+)\}$/g.exec(e);if(!o){if(e!==s)return;continue}const[a,h]=o[1].split(":");if(h&&!new RegExp(h).test(s))return;n[a]=s}return n}}(r=t.Path||(t.Path={}))}(a||(a={}));const l=o.r}},s={};function o(t){var e=s[t];if(void 0!==e)return e.exports;var r=s[t]={exports:{}};return n[t](r,r.exports,o),r.exports}o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var a={};o.d(a,{J:()=>c,M:()=>h});var h,l=o(532);!function(t){t.DATA_PARAMETERS="DATA_PARAMETERS",t.INLINE_DATA_PARAMETERS="INLINE_DATA_PARAMETERS"}(h||(h={}));class c{constructor(t,e,r){if(this.uri=t,this.data=e,this.event=r,this.sessionData=new Map,"string"==typeof t){const e=t.match(/^Symbol\.for\((.+)\):\/(.*)$/);if(e){const t=Symbol.for(e[1]);this.uri={symbol:t,uri:e[2]}}}}get symbols(){if("object"==typeof this.uri)return Array.isArray(this.uri.symbol)?this.uri.symbol:[this.uri.symbol]}get scheme(){if("string"==typeof this.uri){const t=this.uri.split("://");return t.length>1?t[0]:void 0}}get paths(){return this.pathname.split("/")??[]}get fullPath(){const t=("string"==typeof this.uri?this.uri:this.uri.uri).split("://");return t[t.length>=2?1:0]??""}get pathname(){return this.fullPath.split("?")[0]}get query(){return this.fullPath.split("?")[1]??""}get queryParams(){const t={};return this.query.split("&")?.forEach(e=>{const r=e.split("=");t[r[0]]=r[1]}),t}get queryParamsAfterDecodeURI(){const t=this.queryParams;for(const e in t)t.hasOwnProperty(e)&&(t[e]=decodeURIComponent(t[e]));return t}getPathnameData(t){return l.r.Path.pathNameData(this.pathname,t)}get isSymbolScheme(){return void 0!==this.symbols}}const u=a.J;var d=r(7016);const y=require("buffer");var p=r(6377),g=r(1022),f=r(9434),m=r(5884),b=r(3055),x={2676:(t,e,r)=>{r.d(e,{B:()=>i});var i,n=r(7855),s=r(9284);!function(t){let e,r;t.constructorName=t=>t&&t.constructor&&t.constructor.name?t.constructor.name:t&&t.name?t.name:void 0,t.deepCopy=t=>t instanceof Map?new Map(JSON.parse(JSON.stringify(Array.from(t.entries())))):t instanceof Set?new Set(JSON.parse(JSON.stringify(Array.from(t.values())))):s.U.isNullOrUndefined(t)?t:JSON.parse(JSON.stringify(t)),t.allProtoTypeName=(e,r)=>{let i=[];if(e){const n=Object.getPrototypeOf(e);n&&(i=Object.keys(n)||[]).length>0&&(i=i.concat(t.allProtoTypeName(n,r)))}let n=i.filter(t=>"constructor"!==t);if(r&&e){const t=Object.getPrototypeOf(e);n=n.filter(e=>r(e,t?.[e]))}return n},t.uniqueKeys=t=>Array.from(new Set((Array.isArray(t)?t:[t]).flatMap(t=>Object.keys(t)))),t.ownPropertyNames=t=>{const e=[];if(t)if(t.prototype)e.push(...Object.getOwnPropertyNames(Object.getPrototypeOf(t)));else{const r=Object.getPrototypeOf(t);e.push(...Object.getOwnPropertyNames(r))}return e.filter(t=>"constructor"!==t)},t.protoTypeName=t=>{let e=[];if(t){const r=Object.getPrototypeOf(t);e=Object.keys(r)||[]}return e.filter(t=>"constructor"!==t)},t.protoTypes=t=>{const e=[];if(t){const r=Object.getPrototypeOf(t);(Object.keys(r)||[]).filter(t=>"constructor"!==t).forEach(t=>{e.push(r[t])})}return e},t.seal=t=>Object.seal(t),t.isPrototypeOfTarget=(t,e)=>!(!t||!e)&&Object.prototype.isPrototypeOf.call(t.prototype,e),t.prototypeOfDepth=(t,e)=>{let r=t;const i=[];if(e)do{if(r=Object.getPrototypeOf(r),r?.constructor===e)break;i.push(r)}while(r);return i},t.allProtoType=t=>{const e=(t,r=[])=>(t.prototype&&(r.push(t),e(Object.getPrototypeOf(t),r)),r);return e(t)},t.prototypeOf=t=>Object.getPrototypeOf(t),t.prototypeKeyMap=t=>{const e=new Map;if(t){const r=Object.getPrototypeOf(t);(Object.keys(r)||[]).filter(t=>"constructor"!==t).forEach(t=>{e.set(r[t],t)})}return e},t.prototypeName=(e,r)=>t.prototypeKeyMap(e).get(r),t.pickRandomKey=t=>{const e=Object.keys(t);return e[Math.floor(Math.random()*e.length)]},t.pickRandomValue=t=>{const e=Object.keys(t);return t[e[Math.floor(Math.random()*e.length)]]},t.pickRandomKeyValue=t=>{const e=Object.keys(t),r=e[Math.floor(Math.random()*e.length)];return{key:r,value:t[r]}},t.keyValues=t=>Object.keys(t).map(e=>({key:e,value:t[e]})),t.entries=t=>Object.entries(t),t.values=t=>Object.values(t),t.keys=t=>Object.keys(t),t.keyLength=e=>t.keys(e).length,t.toDeleteUndefinedAndNull=(t,e)=>{const r=t=>Array.isArray(t)?t.filter(t=>null!=t).map(r):t&&"object"==typeof t?e?.deep?Object.fromEntries(Object.entries(t).filter(([t,e])=>null!=e).map(([t,e])=>[t,r(e)])):Object.fromEntries(Object.entries(t).filter(([t,e])=>null!=e)):t;return r(t)},function(t){t.isFunctionScript=t=>t.trim().startsWith("function"),t.isArrowFunctionScript=t=>/^\s*\([^)]*\)\s*=>/.test(t),t.toOptionalChainPath=e=>{if(!e)return"";if(e.trim().startsWith("{")&&e.trim().endsWith("}"))return e;if(t.isFunctionScript(e)||t.isArrowFunctionScript(e))return e;if(e.includes(" ? ")&&e.includes(" : ")){const t=e.split(/(\s+\?\s+|\s+:\s+)/).map((t,e)=>{if(0===e){const e=t.match(/[^?.[\]]+|\[[^\]]*\]/g);if(e&&e.length>1)return e.join("?.")}return t});return t.join("")}if(e.includes("(")){const r=[];let i=e,n=0;const s=/(\w+)\(([^()]*(?:\([^()]*\)[^()]*)*)\)/g;let o;for(;null!==(o=s.exec(e));){const e=o[0],s=o[1],a=o[2],h=`__FUNC_CALL_${n}__`,l=`${s}?.(${a?t.toOptionalChainPath(a):""})`;r.push({original:e,processed:l,placeholder:h}),i=i.replace(e,h),n++}const a=i.match(/[^?.[\]]+|\[[^\]]*\]/g);let h="";h=a&&a.length>1?a.join("?."):i;for(const t of r)h=h.replace(t.placeholder,t.processed);return h}const r=e.match(/[^?.[\]]+|\[[^\]]*\]/g);return r?r.join("?."):e},t.removeOptionalChainOperator=t=>t?t.replace(/\?\./g,".").replace(/\.\[/g,"["):"";const e=t=>{const e=[],r=/\.([^.\[]+)|\[(\d+)\]|\[(['"])(.*?)\3\]/g;let i,n=0;const s=t.match(r);if(s&&(s?.index??0)>0)e.push(t.substring(0,s.index)),n=s.index;else if(!s&&t.length>0)return e.push(t),e;for(;null!==(i=r.exec(t));){if(i.index>n){const r=t.substring(n,i.index);r.startsWith(".")?e.push(r.substring(1)):e.push(r)}i[1]?e.push(i[1]):i[2]?e.push(parseInt(i[2],10)):i[4]&&e.push(i[4]),n=r.lastIndex}if(n<t.length){const r=t.substring(n);r.startsWith(".")?e.push(r.substring(1)):e.push(r)}return e};t.to=e=>{const r={};return Object.entries(e).forEach(([e,i])=>{t.set(r,e,i)}),r},t.set=(t,r,i)=>{const n=e(r);let s=t;for(let t=0;t<n.length;t++){const e=n[t];if(t===n.length-1)s[e]=i;else{const r=n[t+1];if("number"==typeof r){if(Array.isArray(s[e])||(s[e]=[]),Array.isArray(s[e]))for(;s[e].length<=r;)s[e].push({})}else"object"==typeof s[e]&&null!==s[e]||(s[e]={});s=s[e]}}},t.get=(t,r,i)=>{const n=e(r);let s=t;for(let t=0;t<n.length;t++){const e=n[t];if(null==s)return i;if("object"!=typeof s||null===s||!(e in s))return i;s=s[e]}return s},t.deletePath=(t,r)=>{const i=e(r);if(0===i.length)return!1;let n=t;for(let t=0;t<i.length-1;t++){const e=i[t];if(null==n)return!1;if("object"!=typeof n||null===n||!(e in n))return!1;n=n[e]}const s=i[i.length-1];return null!==n&&"object"==typeof n&&s in n&&(Array.isArray(n)&&"number"==typeof s?n.splice(s,1):delete n[s],!0)},t.availablePath=(t,e)=>{const r=[],i=t=>"number"==typeof t?"["+t+"]":/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(t)?t:"['"+t+"']",n=(t,s,o)=>{null!==t&&"object"==typeof t&&(o.has(t)||(o.add(t),Array.isArray(t)?t.forEach((t,a)=>{const h=i(a),l=s?`${s}${h}`:h;e&&!e(l,t)||r.push(l),n(t,l,o)}):Object.keys(t).forEach(a=>{const h=i(a);let l;l=h.startsWith("[")?s?`${s}${h}`:h:s?`${s}.${h}`:h,e&&!e(l,t[a])||r.push(l),n(t[a],l,o)})))};return n(t,"",new Set),r},t.detectPathFromScript=(t,e)=>{const r=new Set;class i{constructor(t){this.prefix=t,this.usingVars=r}set(t,e,r,i){return!0}get(t,e,r){if("symbol"==typeof e)return this.createSafeProxy(this.prefix);let i;const n=String(e);return i=isNaN(Number(n))?this.prefix?`${this.prefix}.${n}`:n:this.prefix?`${this.prefix}[${n}]`:n,i&&this.usingVars.add(i),this.createSafeProxy(i)}apply(t,e,r){return this.createSafeProxy(this.prefix)}createSafeProxy(t){const e=new i(t);return new Proxy(()=>{},{get:(r,i,n)=>i===Symbol.toPrimitive?()=>"":"valueOf"===i?()=>e.createSafeProxy(t):"toString"===i?()=>"":e.get(r,i,n),set:e.set.bind(e),apply:e.apply.bind(e)})}}const n={window:new Proxy(()=>{},new i("window")),document:new Proxy(()=>{},new i("document")),console:new Proxy(()=>{},new i("console"))},s=new Proxy(()=>{},new i("this"));try{new Function("window","document","console",`"use strict"; ${t}; `).call(s,n.window,n.document,n.console)}catch(t){console.error("detectPathFromScript error:",t)}if(e?.excludeThis){const t=new Set;return r.forEach(e=>{"this"!==e&&(e.startsWith("this.")?t.add(e.substring(5)):t.add(e))}),t}return r}}(e=t.Path||(t.Path={})),t.toDeleteKey=(e,r)=>{const i={...e};return t.deleteKey(i,r),i},t.deleteKey=(t,e)=>{e.filter(t=>(0,n.O)(t)).forEach(e=>{delete t[e]})},function(t){t.evalReturn=(e,r={})=>{let i="",n="";return"object"==typeof e?(i=e.bodyScript,n=e.returnScript):n=e,t.eval(`${i}; return ${n} `,r)},t.eval=(t,e={})=>{try{return Function(`"use strict"; ${t} `).bind(e)()}catch(e){return console.error("eval error",e),void console.error(t)}}}(r=t.Script||(t.Script={}))}(i||(i={}))},3205:(t,e,r)=>{r.d(e,{O:()=>s});var i=r(7553),n=r(9244);class s extends i.M{constructor(t){super(),this.volume=0,this.mass=0,this.e=0,this.rotate=0,this.width=0,this.height=0,this.transform=[1,0,0,1,0,0],this.color={r:0,g:0,b:0,a:255},this.updateObjWithDefaults(t)}copyObj(){return new s({x:this.x,y:this.y,z:this.z,volume:this.volume,mass:this.mass,e:this.e,rotate:this.rotate,width:this.width,height:this.height,transform:[...this.transform],color:{...this.color},data:{...this.data}})}updateObjWithDefaults(t){if(t){this.x=t.x??this.x,this.y=t.y??this.y,this.z=t.z??this.z,this.volume=t.volume??this.volume,this.mass=t.mass??this.mass,this.e=t.e??this.e,this.rotate=t.rotate??this.rotate,this.width=t.width??this.width,this.height=t.height??this.height,this.transform=[...t.transform??this.transform],this.color={...t.color??this.color};const e=t.data??this.data;this.data=e?{...e}:void 0}}setObj(t){if(t){this.x=t.x??0,this.y=t.y??0,this.z=t.z??0,this.volume=t.volume??0,this.mass=t.mass??0,this.e=t.e??0,this.rotate=t.rotate??0,this.width=t.width??0,this.height=t.height??0,this.transform=[...t.transform??[1,0,0,1,0,0]],this.color={...t.color??{r:0,g:0,b:0,a:255}};const e=t.data;this.data=e?{...e}:void 0}}toRect(){return new n.r(this.x,this.y,this.width,this.height)}}},3599:(t,e,r)=>{r.d(e,{z:()=>i});var i,n=r(8741),s=r(7553),o=r(3205),a=r(4068);!function(t){t.getMinByObjectArray=(t,e)=>{let r;if(e&&t&&t.length>0){r=t[0][e];for(let i=1;i<t.length;i++)r=Math.min(r,t[i][e])}return r},t.hypot=(...t)=>Math.hypot(...t),t.pythagorean=(t,e)=>Math.sqrt(t*t+e*e),t.getMaxByObjectArray=(t,e)=>{let r;if(e&&t&&t.length>0){r=t[0][e];for(let i=1;i<t.length;i++)r=Math.max(r,t[i][e])}return r},t.sum=t=>t.reduce((t,e)=>t+e,0),t.avg=e=>e.length>0?t.sum(e)/e.length:0,t.minMax=(t,e)=>Math.min(Math.max(t,e.min),e.max),t.max=t=>t.length>0?Math.max(...t):void 0,t.min=t=>t.length>0?Math.min(...t):void 0,t.getSumByObjectArray=(t,e)=>{let r=0;if(e&&t&&t.length>0)for(let i=0;i<t.length;i++)r+=t[i][e];return r},t.radians=(t,{type:e="degreeAngle"})=>"ratio"===e?2*t*Math.PI:"percent"===e?t/100*2*Math.PI:t/180*Math.PI,t.degrees=(t,{type:e="degreeAngle"})=>"ratio"===e?360*t:"percent"===e?t/100*360:180*t/Math.PI,t.ratio=(t,e,r=1)=>r*(e/t),t.getBetweenLength=(t,e)=>e-t,t.getPercentByTotal=(t,e)=>e/t*100,t.getRatioByTotal=(t,e)=>e/t,t.getValueByTotalInPercent=(t,e)=>t*e/100,t.getValueByTotalInRatio=(t,e)=>t*e,t.getValuePercentUp=(t,e)=>t*(1+e/100),t.getValueRatioUp=(t,e)=>t*(1+e),t.getValuePercentDown=(t,e)=>t*(1-e/100),t.getValueRatioDown=(t,e)=>t*(1-e),t.beziers=(e,r)=>{const i=new Array(r).fill(void 0);for(let n=0;n<i.length;n++)i[n]=t.bezier(e,r,n);return i},t.bezier=(e,r,i)=>{if(e&&e.length>0){const o=e.map(t=>new s.M(t.x,t.y,t.z)),a=[];return o.reduce((t,e)=>{const n=t.toSub(e).div(r).mult(i+1);return a.push(t.toSub(n)),e}),a.length<=1?a[0]:t.bezier(a.map(t=>new n.M(t)),r,i)}return new s.M},t.cubicBezier=function(e,r,i){if(e.start instanceof o.O&&e.end instanceof o.O){const n=t.cubicBezier({start:e.start.x,end:e.end.x},r,i),s=t.cubicBezier({start:e.start.y,end:e.end.y},r,i),a=t.cubicBezier({start:e.start.z,end:e.end.z},r,i),h=t.cubicBezier({start:e.start.volume,end:e.end.volume},r,i),l=t.cubicBezier({start:e.start.mass,end:e.end.mass},r,i),c=t.cubicBezier({start:e.start.e,end:e.end.e},r,i),u=t.cubicBezier({start:e.start.rotate,end:e.end.rotate},r,i),d=t.cubicBezier({start:e.start.width,end:e.end.width},r,i),y=t.cubicBezier({start:e.start.height,end:e.end.height},r,i),p=t.cubicBezier({start:e.start.transform[0],end:e.end.transform[0]},r,i),g=t.cubicBezier({start:e.start.transform[1],end:e.end.transform[1]},r,i),f=t.cubicBezier({start:e.start.transform[2],end:e.end.transform[2]},r,i),m=t.cubicBezier({start:e.start.transform[3],end:e.end.transform[3]},r,i),b=t.cubicBezier({start:e.start.transform[4],end:e.end.transform[4]},r,i),x=t.cubicBezier({start:e.start.transform[5],end:e.end.transform[5]},r,i),S=t.cubicBezier({start:e.start.color.r??0,end:e.end.color.r??0},r,i),O=t.cubicBezier({start:e.start.color.g??0,end:e.end.color.g??0},r,i),w=t.cubicBezier({start:e.start.color.b??0,end:e.end.color.b??0},r,i),v=t.cubicBezier({start:e.start.color.a??255,end:e.end.color.a??255},r,i);return n.map((t,e)=>{const r=new o.O({x:t,y:s[e],z:a[e]});return r.volume=h[e],r.mass=l[e],r.e=c[e],r.rotate=u[e],r.width=d[e],r.height=y[e],r.transform=[p[e],g[e],f[e],m[e],b[e],x[e]],r.color={r:S[e],g:O[e],b:w[e],a:v[e]},r})}if(e.start instanceof n.M&&e.end instanceof n.M){const s=t.cubicBezier({start:e.start.x,end:e.end.x},r,i),o=t.cubicBezier({start:e.start.y,end:e.end.y},r,i),a=t.cubicBezier({start:e.start.z,end:e.end.z},r,i);return s.map((t,e)=>new n.M(t,o[e],a[e]))}const{start:s,end:a}=e,{frame:h}=r;let{p1x:l,p1y:c,p2x:u,p2y:d}=Array.isArray(i)?{p1x:i[0],p1y:i[1],p2x:i[2],p2y:i[3]}:i;l="random"===l?Math.random():l,c="random"===c?Math.random():c,u="random"===u?Math.random():u,d="random"===d?Math.random():d;const y=[],p=a-s,g=t=>{const e=Number(t*t),r=Number(e*t),i=Number(1-t),n=Number(i*i);return 0*Number(n*i)+3*n*t*Number(c)+3*i*e*Number(d)+1*r},f=h+1;for(let t=1;t<f;t++){const e=s+p*g(t/f);y.push(e)}return y},t.diff=(t,e)=>Math.abs(t-e),t.distSqToLineSegment=(t,e,r)=>{const i=(e.x-r.x)**2+(e.y-r.y)**2;if(0===i)return(t.x-e.x)**2+(t.y-e.y)**2;let n=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/i;n=Math.max(0,Math.min(1,n));const s=e.x+n*(r.x-e.x),o=e.y+n*(r.y-e.y);return(t.x-s)**2+(t.y-o)**2},t.rotatePoint=(t,e,r)=>{const i=t.x-e.x,n=t.y-e.y,s=i*Math.cos(r)-n*Math.sin(r),o=i*Math.sin(r)+n*Math.cos(r);return new a.P(s+e.x,o+e.y)}}(i||(i={}))},4068:(t,e,r)=>{r.d(e,{P:()=>i});class i{constructor(t,e){"object"==typeof t?(this.x=t.x??0,this.y=t.y??0):(this.x=t??0,this.y=e??0)}copy(){return new i(this.x,this.y)}}},5275:(t,e,r)=>{r.d(e,{s:()=>i});const i=t=>!!t&&"number"==typeof t.width&&"number"==typeof t.height},7553:(t,e,r)=>{r.d(e,{M:()=>s});var i=r(8741),n=r(4068);class s{constructor(t,e,r){t instanceof i.M?(this.x=t.x,this.y=t.y,this.z=t.z):"object"==typeof t?(this.x=t.x??0,this.y=t.y??0,this.z=t.z??0):(this.x=t??0,this.y=e??0,this.z=r??0)}set(t,e=0,r=0){return t instanceof s||t instanceof i.M?this.set(t.x||0,t.y||0,t.z||0):(this.x=t,this.y=e,this.z=r),this}get(){return new s(this.x,this.y,this.z)}mag(){const t=this.x,e=this.y,r=this.z;return Math.sqrt(t*t+e*e+r*r)}add(t,e=0,r=0){t instanceof s||t instanceof i.M?(this.x+=t.x,this.y+=t.y,this.z+=t.z):(this.x+=t,this.y+=e,this.z+=r)}toAdd(t,e){return new s(t.x+e.x,t.y+e.y,t.x+e.y)}sub(t,e=0,r=0){t instanceof s||t instanceof i.M?(this.x-=t.x,this.y-=t.y,this.z-=t.z):(this.x-=t,this.y-=e,this.z-=r)}toSub(t){const e=this;return new s(e.x-t.x,e.y-t.y,e.z-t.z)}mult(t){return t instanceof s||t instanceof i.M?(this.x*=t.x,this.y*=t.y,this.z*=t.z):(this.x*=t,this.y*=t,this.z*=t),this}toMult(t){const e=this;return new s(e.x*=t.x,e.y*=t.y,e.z*=t.z)}div(t){return t instanceof s||t instanceof i.M?(this.x/=t.x,this.y/=t.y,this.z/=t.z):(this.x/=t,this.y/=t,this.z/=t),this}toDiv(t){const e=this.get();return e.x/=t,e.y/=t,e.z/=t,e}dist(t){const e=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+r*r+i*i)}toDist(t){const e=this,r=e.x-t.x,i=e.y-t.y,n=e.z-t.z;return Math.sqrt(r*r+i*i+n*n)}dot(t,e,r){return t instanceof s||t instanceof i.M?this.x*t.x+this.y*t.y+this.z*t.z:this.x*t+this.y*e+this.z*r}cross(t){const e=this.x,r=this.y,i=this.z;return new s(r*t.z-t.y*i,i*t.x-t.z*e,e*t.y-t.x*r)}normalize(){const t=this.mag();t>0&&this.div(t)}limit(t){this.mag()>t&&(this.normalize(),this.mult(t))}heading2D(){return-Math.atan2(-this.y,this.x)}random2D(){return this.fromAngle(Math.random()*(2*Math.PI))}fromAngle(t,e=1){return new s(e*Math.cos(t),e*Math.sin(t),0)}fromAngles(t,e,r=1){const i=Math.cos(e),n=Math.sin(e),o=Math.cos(t),a=Math.sin(t);return new s(r*a*n,-r*o,r*a*i)}array(){return[this.x,this.y,this.z]}toPoint3D(){return new i.M(this.x,this.y,this.z)}toPoint2D(){return new n.P(this.x,this.y)}copy(){return new s(this.x,this.y,this.z)}toString(){return"["+this.x+", "+this.y+", "+this.z+"]"}}},7855:(t,e,r)=>{r.d(e,{O:()=>i});const i=t=>null!=t},8741:(t,e,r)=>{r.d(e,{M:()=>s});var i=r(7553),n=r(4068);class s extends n.P{constructor(t,e,r){t instanceof i.M?(super(t.x,t.y),this.z=t.z):"object"==typeof t?(super({x:t.x??0,y:t.y??0}),this.z=t.z??0):(super(t,e),this.z=r??0)}copy(){return new s(this.x,this.y,this.z)}}},9244:(t,e,r)=>{r.d(e,{r:()=>o});var i=r(4068),n=r(3599),s=r(5275);class o{constructor(t,e,r=0,n=0){(0,s.s)(t)?(this._start=new i.P(0,0),this._width=t.width,this._height=t.height):"object"==typeof t&&"object"==typeof e?(this._start=t instanceof i.P?t:new i.P(t.x,t.y),this.end=e instanceof i.P?e:new i.P(e.x,e.y)):"object"==typeof t&&"number"==typeof e?(this._start=t instanceof i.P?t:new i.P(t.x,t.y),this._width=e,this._height=r):"number"==typeof t&&"number"==typeof e&&(this._start=new i.P(t,e),this._width=r,this._height=n)}valueLinkControl(t){let e,r=!1;var i;return"object"==typeof(i=t)&&"value"in i&&"noLink"in i?(e=t.value,r=t.noLink):e=t,{value:e,noLink:r}}get width(){return this._width}get height(){return this._height}get start(){return this._start.copy()}set width(t){this.setWidth(t)}setWidth(t){let{value:e,noLink:r}=this.valueLinkControl(t);const i=n.z.getPercentByTotal(this._width,e);this._width=e,this.applyWidthPercentLinks({value:i,noLink:r})}set height(t){this.setHeight(t)}setHeight(t){let{value:e,noLink:r}=this.valueLinkControl(t);const i=n.z.getPercentByTotal(this._height,e);this._height=e,this.applyHeightPercentLinks({value:i,noLink:r})}set start(t){let{value:e,noLink:r}=this.valueLinkControl(t);const s=new i.P({x:n.z.getPercentByTotal(this._start.x,e.x),y:n.z.getPercentByTotal(this._start.y,e.y)});this._start=e,this.applyStartPercentLinks({value:s,noLink:r})}setWidthFromEnd(t){let{value:e,noLink:r}=this.valueLinkControl(t);const i=n.z.getPercentByTotal(this.start.x,e);this._start.x=this.end.x-e,this.applyStartXPercentLinks({value:i,noLink:r})}set widthFromEnd(t){this.setWidthFromEnd(t)}setHeightFromEnd(t){let{value:e,noLink:r}=this.valueLinkControl(t);const i=this.end.y-e,s=n.z.getPercentByTotal(this.start.y,i);this._start.y=i,this.applyStartYPercentLinks({value:s,noLink:r})}set heightFromEnd(t){this.setHeightFromEnd(t)}setWidthFromCenter(t){let{value:e,noLink:r}=this.valueLinkControl(t);const i=this.center.x-e/2,s=n.z.getPercentByTotal(this.start.x,i);this._start.x=i,this.applyStartXPercentLinks(s)}set widthFromCenter(t){this.setWidthFromCenter(t)}setHeightFromCenter(t){let{value:e,noLink:r}=this.valueLinkControl(t);const i=this.center.y-e/2,s=n.z.getPercentByTotal(this.start.y,i);this._start.y=i,this.applyStartYPercentLinks(s)}set heightFromCenter(t){let{value:e,noLink:r}=this.valueLinkControl(t);const i=this.center.y-e/2,s=n.z.getPercentByTotal(this.start.y,i);this._start.y=i,this.applyStartYPercentLinks(s)}set x(t){this.setX(t)}setX(t){let{value:e,noLink:r}=this.valueLinkControl(t);const i=e-this._start.x,s=n.z.getPercentByTotal(this.width,i);this._start.x=e,this.applyStartXPercentLinks({value:s,noLink:r})}set y(t){this.setY(t)}setY(t){let{value:e,noLink:r}=this.valueLinkControl(t);const i=e-this._start.y,s=n.z.getPercentByTotal(this.height,i);this._start.y=e,this.applyStartYPercentLinks({value:s,noLink:r})}applyWidthPercentLinks(t){let{value:e,noLink:r}=this.valueLinkControl(t);!this.linkRects||"boolean"==typeof r&&r||Array.from(this.linkRects.values()).filter(t=>"boolean"==typeof r||t!==r).forEach(t=>{t.setWidthByWidthPercent({value:e,noLink:this})})}applyHeightPercentLinks(t){let{value:e,noLink:r}=this.valueLinkControl(t);!this.linkRects||"boolean"==typeof r&&r||Array.from(this.linkRects.values()).filter(t=>"boolean"==typeof r||t!==r).forEach(t=>{t.setHeightByHeightPercent({value:e,noLink:this})})}applyStartPercentLinks(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.applyStartXPercentLinks({value:e.x,noLink:r}),this.applyStartYPercentLinks({value:e.y,noLink:r})}applyStartXPercentLinks(t){let{value:e,noLink:r}=this.valueLinkControl(t);!this.linkRects||"boolean"==typeof r&&r||Array.from(this.linkRects.values()).filter(t=>"boolean"==typeof r||t!==r).forEach(t=>{t.addXByWidthPercent({value:e,noLink:this})})}applyStartYPercentLinks(t){let{value:e,noLink:r}=this.valueLinkControl(t);!this.linkRects||"boolean"==typeof r&&r||Array.from(this.linkRects.values()).filter(t=>"boolean"==typeof r||t!==r).forEach(t=>{t.addYByHeightPercent({value:e,noLink:this})})}hasLink(t){return this.linkRects?.has(t)}isLinked(){return!!this.linkRects?.size}addLink(...t){this.linkRects??(this.linkRects=new Set),t.filter(t=>!this.linkRects?.has(t)).forEach(t=>{this.linkRects?.add(t),t.addLink(this)})}setLinks(t){this.unLinkAll(),this.addLink(...t)}unLinkAll(){this.linkRects&&(Array.from(this.linkRects.values()).forEach(t=>{this.unLink(t)}),this.linkRects.clear())}unLink(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.linkRects&&this.linkRects.delete(e),r||e.unLink({value:this,noLink:this})}addWidthPercent(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setWidth({value:this.width+n.z.getValueByTotalInPercent(this.width,e),noLink:r})}addHeightPercent(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setHeight({value:this.height+n.z.getValueByTotalInPercent(this.height,e),noLink:r})}addWidthRatio(t){this.width=this.width+n.z.getValueByTotalInRatio(this.width,t)}addHeightRatio(t){this.height=this.height+n.z.getValueByTotalInRatio(this.height,t)}addXPercent(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setX({value:this.x+n.z.getValueByTotalInPercent(this.width,e),noLink:r})}addYPercent(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setY({value:this.y+n.z.getValueByTotalInPercent(this.height,e),noLink:r})}addXRatio(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setX({value:this.x+n.z.getValueByTotalInRatio(this.width,e),noLink:r})}addYRatio(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setY({value:this.y+n.z.getValueByTotalInRatio(this.height,e),noLink:r})}set endX(t){const e=t-this.x;this.width=e}set endXPercent(t){this.endX=n.z.getValueByTotalInPercent(this.width,t)}set endYPercent(t){this.endY=n.z.getValueByTotalInPercent(this.height,t)}set endY(t){this.height=t-this.y}set end(t){this.width=t.x-this.x,this.height=t.y-this.y}get x(){return this.start.x}get y(){return this.start.y}get endX(){return this.end.x}get endY(){return this.end.y}to(t){const e=this.copy();return e.start=t,e}toRotate(t,{rotatePoint:e=this.center,type:r="degreeAngle"}){const s=n.z.radians(t,{type:r}),o=e instanceof i.P?e:new i.P(e.x,e.y);return[this.leftTop,this.rightTop,this.rightBottom,this.leftBottom].map(t=>n.z.rotatePoint(t,o,s))}get center(){return new i.P(this.start.x+this.width/2,this.start.y+this.height/2)}get end(){return new i.P(this.start.x+this.width,this.start.y+this.height)}get leftTop(){return this.start.copy()}get leftBottom(){return new i.P(this.start.x,this.end.y)}get rightTop(){return new i.P(this.end.x,this.start.y)}get rightBottom(){return this.end}copy(){return new o(this.x,this.y,this.width,this.height)}getWidthPercent(t){return n.z.getPercentByTotal(this.width,t)}getWidthRatio(t){return n.z.getRatioByTotal(this.width,t)}getWidthByPercent(t){return n.z.getValueByTotalInPercent(this.width,t)}getWidthByRatio(t){return n.z.getValueByTotalInRatio(this.width,t)}getHeightPercent(t){return n.z.getPercentByTotal(this.height,t)}getHeightRatio(t){return n.z.getRatioByTotal(this.height,t)}getHeightByPercent(t){return n.z.getValueByTotalInPercent(this.height,t)}getHeightByRatio(t){return n.z.getValueByTotalInRatio(this.height,t)}getXPercent(t){return n.z.getPercentByTotal(this.width,t-this.x)}getXRatio(t){return n.z.getRatioByTotal(this.width,t-this.x)}getXByPercent(t){return this.x+n.z.getValueByTotalInPercent(this.width,t)}getXByRatio(t){return this.x+n.z.getValueByTotalInRatio(this.width,t)}getYPercent(t){return n.z.getPercentByTotal(this.height,t-this.y)}getYRatio(t){return n.z.getRatioByTotal(this.height,t-this.y)}getYByPercent(t){return this.y+n.z.getValueByTotalInPercent(this.height,t)}getYByRatio(t){return this.y+n.z.getValueByTotalInRatio(this.height,t)}getPercent(t){return new i.P(this.getXPercent(t.x),this.getYPercent(t.y))}toScaleByWidth(t){const e=this.height/this.width;return new o(this.x,this.y,t,t*e)}toScaleByHeight(t){const e=this.width/this.height;return new o(this.x,this.y,t*e,t)}toRatio(t){return new o(this.getXRatio(t.x),this.getYRatio(t.y),this.getWidthRatio(t instanceof o?t.width:t.w),this.getHeightRatio(t instanceof o?t.height:t.h))}getRatio(t){return new i.P(this.getXRatio(t.x),this.getYRatio(t.y))}getByPercent(t){return new i.P(this.getXByPercent(t.x),this.getYByPercent(t.y))}getByRatio(t){return new i.P(this.getXByRatio(t.x),this.getYByRatio(t.y))}getDiffX(t){return t-this.x}getDiffY(t){return t-this.y}getDiffLeft(t){this.getDiffX(t)}getDiffTop(t){this.getDiffY(t)}getDiffRight(t){return t-this.end.x}getDiffBottom(t){return t-this.end.y}getDiffWidth(t){return t-this.width}getDiffHeight(t){return t-this.height}toDiff(t){return new o(t.x-this.x,t.y-this.y,t.width-this.width,t.height-this.height)}setXByWidthPercent(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setX({value:n.z.getValueByTotalInPercent(this.width,e),noLink:r})}set xByWidthPercent(t){this.setXByWidthPercent(t)}setXByWidthRatio(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setX({value:n.z.getValueByTotalInRatio(this.width,e),noLink:r})}set xByWidthRatio(t){this.setXByWidthRatio(t)}setYByHeightPercent(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setY({value:n.z.getValueByTotalInPercent(this.height,e),noLink:r})}set yByHeightPercent(t){this.setYByHeightPercent(t)}setYByHeightRatio(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setY({value:n.z.getValueByTotalInRatio(this.height,e),noLink:r})}set yByHeightRatio(t){this.setYByHeightRatio(t)}addXByWidthPercent(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setX({value:this.x+n.z.getValueByTotalInPercent(this.width,e),noLink:r})}addXByWidthRatio(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setX({value:this.x+n.z.getValueByTotalInRatio(this.width,e),noLink:r})}addYByHeightPercent(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setY({value:this.y+n.z.getValueByTotalInPercent(this.height,e),noLink:r})}addYByHeightRatio(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setY({value:this.y+n.z.getValueByTotalInRatio(this.height,e),noLink:r})}setWidthByWidthPercent(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setWidth({value:n.z.getValueByTotalInPercent(this.width,e),noLink:r})}set widthByWidthPercent(t){this.setWidthByWidthPercent(t)}setWidthByWidthRatio(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setWidth({value:n.z.getValueByTotalInRatio(this.width,e),noLink:r})}set widthByWidthRatio(t){this.setWidthByWidthRatio(t)}setHeightByHeightPercent(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setHeight({value:n.z.getValueByTotalInPercent(this.height,e),noLink:r})}set heightByHeightPercent(t){this.setHeightByHeightPercent(t)}setHeightByHeightRatio(t){let{value:e,noLink:r}=this.valueLinkControl(t);this.setHeight({value:n.z.getValueByTotalInRatio(this.height,e),noLink:r})}set heightByHeightRatio(t){this.setHeightByHeightRatio(t)}copyByPercent(t,e){return new o(this.x,this.y,n.z.getValueByTotalInPercent(this.width,t),n.z.getValueByTotalInPercent(this.height,e??t))}copyByRatio(t,e){return new o(this.x,this.y,n.z.getValueByTotalInRatio(this.width,t),n.z.getValueByTotalInRatio(this.height,e??t))}isIn(t){return t instanceof o?this.isIn(t.start)&&this.isIn(t.end):t.x>=this.start.x&&t.x<=this.end.x&&t.y>=this.start.y&&t.y<=this.end.y}isOut(t){return t instanceof o?!this.isOverlap(t):!this.isIn(t)}isOverlap(t){return t instanceof o?!(this.endX<t.x||this.x>t.endX||this.endY<t.y||this.y>t.endY):this.isIn(t)}toString(){return`x:${this.x}, y:${this.y}, width: ${this.width}, height: ${this.height}`}}},9284:(t,e,r)=>{var i;r.d(e,{U:()=>i}),function(t){t.isArrowFunction=t=>"function"==typeof t&&void 0===t.prototype&&!t.toString().startsWith("class"),t.isPlainObject=t=>null!==t&&"object"==typeof t&&t.constructor===Object,t.isFrozen=t=>Object.isFrozen(t),t.isSealed=t=>Object.isSealed(t),t.isFrozenOrSealed=e=>t.isFrozen(e)||t.isSealed(e),t.isFrozenAndSealed=e=>t.isFrozen(e)&&t.isSealed(e),t.isNotFrozen=t=>!Object.isFrozen(t),t.isNotSealed=t=>!Object.isSealed(t),t.isNotFrozenOrSealed=e=>!t.isFrozen(e)&&!t.isSealed(e),t.isNotFrozenAndSealed=e=>!t.isFrozen(e)||!t.isSealed(e),t.isNullOrUndefined=t=>null==t||void 0===t,t.isConstructor=t=>"function"==typeof t&&void 0!==t.prototype&&t.prototype.constructor===t,t.isFunction=e=>"function"==typeof e&&!t.isConstructor(e),t.isNullish=e=>t.isNotNullish(e),t.isNotNullish=e=>Array.isArray(e)||t.isString(e)?e.length>0:e instanceof Set||e instanceof Map?e.size>0:"object"==typeof e&&null!==e?Object.keys(e).length>0:null!=e,t.isNotNullUndefined=t=>null!=t,t.isNull=t=>null===t,t.isUndefined=t=>void 0===t,t.isArray=e=>!t.isNullOrUndefined(e)&&"[object Array]"===Object.prototype.toString.call(e).trim(),t.isStringNumber=t=>"number"==typeof t?!isNaN(t):"string"==typeof t&&""!==t.trim()&&!isNaN(Number(t)),t.isNumber=e=>!t.isNullOrUndefined(e)&&"[object Number]"===Object.prototype.toString.call(e).trim(),t.isIterator=t=>null!=t&&"function"==typeof t[Symbol.iterator],t.isString=e=>!t.isNullOrUndefined(e)&&"[object String]"===Object.prototype.toString.call(e).trim(),t.isObject=e=>!t.isNullOrUndefined(e)&&"[object Object]"===Object.prototype.toString.call(e).trim(),t.isMap=e=>!t.isNullOrUndefined(e)&&"[object Map]"===Object.prototype.toString.call(e).trim(),t.isEmpty=e=>!!t.isNullOrUndefined(e)||(t.isArray(e)?0===e.length:t.isString(e)?0===e.trim().length:t.isMap(e)?0===e.size:!!t.isObject(e)&&0===Object.keys(e).length),t.isSet=t=>t instanceof Set,t.isNullishFiltered=t=>Array.isArray(t)?t.every(t=>null!=t):null!=t,t.isFalsyFiltered=t=>Array.isArray(t)?t.every(t=>t):!!t,t.includeValue=(t,e)=>Object.values(t).includes(e),t.includeKey=(t,e)=>Object.keys(t).includes(e),t.lastConsonantLetter=t=>(t.charCodeAt(t.length-1)-44032)%28>0,t.inRange=(t,e,r)=>e<=t&&t<=r,t.isBase64=t=>{let e=t;const r=t.split(";base64,");if(r.length>1)e=r[1];else if(t.startsWith("data:")){const r=t.indexOf(",");r>-1&&(e=t.substring(r+1))}return""===e||e.length,/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}(i||(i={}))}},S={};function O(t){var e=S[t];if(void 0!==e)return e.exports;var r=S[t]={exports:{}};return x[t](r,r.exports,O),r.exports}O.d=(t,e)=>{for(var r in e)O.o(e,r)&&!O.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},O.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var w={};O.d(w,{T:()=>v});var v,k=O(9284),z=O(4068),A=O(8741),P=O(9244),j=O(2676);!function(t){t.objToGetURL=t=>Object.keys(t).reduce((e,r,i)=>`${e}${0!==i?"&":""}${r}=${t[r]}`,""),t.mapToJson=t=>JSON.stringify(Array.from(t.entries()).reduce((t,[e,r])=>(t[e]=r,t),{})),t.jsonToMap=t=>new Map(JSON.parse(t)),t.decodeURIString=t=>decodeURIComponent(t),t.objToStrMap=t=>{const e=new Map;for(const r of Object.keys(t))e.set(r,t[r]);return e},t.jsonToStrMap=e=>t.objToStrMap(JSON.parse(e)),t.strToObject=t=>JSON.parse(t),t.objToJson=t=>JSON.stringify(t),t.objToMap=t=>{const e=new Map;return Object.keys(t).forEach(r=>{e.set(r,t[r])}),e},t.mapToObj=t=>{const e={};return t.forEach((t,r)=>{e[r]=t}),e},t.snakeToCamelCase=t=>t.replace(/_([a-z])/g,(t,e)=>e.toUpperCase()),t.camelToSnakeCase=t=>t.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase(),t.toFormData=function(t){const e=new FormData;for(const r in t)e.append(r,t[r]);return e},t.toObject=function(e,r){if(e instanceof URLSearchParams){const t={};return e.forEach((e,i)=>{r?.firstValue&&void 0===t[i]?t[i]=e:r?.firstValue||(t[i]?Array.isArray(t[i])?t[i].push(e):t[i]=[t[i],e]:t[i]=e)}),t}if(e instanceof FormData){const t=t=>{const e={};for(const r of t.keys()){const i=t.getAll(r);e[r]=i.length>1?i:i[0]}return e};return t(e)}if(e&&"function"==typeof e[Symbol.iterator])return Object.fromEntries(e);if(Array.isArray(e))return Object.fromEntries(e);if(k.U.isMap(e)){const r=e;e=t.mapToObj(r)}if(k.U.isArray(e)){const r=e;for(let e=0;e<r.length;e++)r[e]=t.toObject(r[e])}if(k.U.isObject(e))for(const r in e)e[r]=t.toObject(e[r]);return e},t.toArray=t=>t instanceof Set?Array.from(t.values()):Array.isArray(t)?t:t?[t]:[],t.flatArray=(...t)=>t.flatMap(t=>t instanceof Object&&Symbol.iterator in t?Array.from(t):[t]),t.iteratorToArray=t=>Array.from(t),t.toJson=e=>{const r=t.toObject(e);return JSON.stringify(r)},t.concatenateToAttribute=e=>t.concatenateToString(e,"="," ","'"),t.concatenateToParameter=e=>t.concatenateToString(e,"=","&",""),t.concatenateToString=(t,e="=",r=" ",i="")=>{const n=[];for(const r in t){const s=t[r];s&&n.push(r.toString()+e+i+s+i)}return n.join(r)},t.specialCharsToEscape=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t.decodeHTMLEscape=t=>t.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&#x2F;/g,"/"),t.copyObject=(t,e={})=>({...t,...e}),t.copyArrayWithAddition=(t,e)=>[...t,...e||[]],t.hexToInt=t=>(t.startsWith("#")&&(t=t.slice(1)),3===t.length&&(t=t.split("").map(t=>t+t).join("")),parseInt(t,16)),t.toHex=t=>(t<0&&(t=4294967295+t+1),(t=Number(t.toFixed(0))).toString(16).padStart(2,"0").toUpperCase()),t.toHexColor=e=>`#${t.toHex(e.r??0)}${t.toHex(e.g??0)}${t.toHex(e.b??0)}${t.toHex(e.a??255)}`,t.avgColor=t=>{const e=t.reduce((t,e)=>(t.r+=e.r??0,t.g+=e.g??0,t.b+=e.b??0,t.a+=e.a??0,t),{r:0,g:0,b:0,a:0});return{r:Math.floor(e.r/t.length),g:Math.floor(e.g/t.length),b:Math.floor(e.b/t.length),a:Math.floor(e.a/t.length)}},t.toRGBA=t=>{t??(t="#000000FF");const e=t.replace("#","");return{r:parseInt(e.slice(0,2)||"0",16),g:parseInt(e.slice(2,4)||"0",16),b:parseInt(e.slice(4,6)||"0",16),a:e.length>6?parseInt(e.slice(6,8)||"0",16):255}},t.minMaxCenterAvg=t=>{const e={},r=j.B.uniqueKeys(t);for(const i of r){const r=t.map(t=>t[i]),n=Math.min(...r),s=Math.max(...r),o=(n+s)/2,a=r.reduce((t,e)=>t+e,0)/r.length;e[i]={min:n,max:s,center:o,avg:a,diff:s-n}}return e},t.minMaxCenterRectAvg2D=t=>{const e=new z.P(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),r=new z.P(Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);let i=new z.P(0,0);t.forEach(t=>{e.x=Math.min(e.x,t.x),e.y=Math.min(e.y,t.y),r.x=Math.max(r.x,t.x),r.y=Math.max(r.y,t.y),i.x+=t.x,i.y+=t.y});const n=new z.P((e.x+r.x)/2,(e.y+r.y)/2),s=new z.P(i.x/t.length,i.y/t.length),o=new P.r(e.x,e.y,r.x-e.x,r.y-e.y);return{min:e,max:r,center:n,avg:s,minMaxRect:o}},t.minMaxCenterAvg3D=t=>{const e=new A.M(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r=new A.M(Number.MIN_VALUE,Number.MIN_VALUE,Number.MIN_VALUE);let i=new A.M(0,0,0);t.forEach(t=>{e.x=Math.min(e.x,t.x),e.y=Math.min(e.y,t.y),e.z=Math.max(e.z,t.z),r.x=Math.max(r.x,t.x),r.y=Math.max(r.y,t.y),r.z=Math.max(r.z,t.y),i.x+=t.x,i.y+=t.y,i.z+=t.z});const n=new A.M((e.x+r.x)/2,(e.y+r.y)/2,(e.z+r.z)/2),s=new A.M(i.x/t.length,i.y/t.length,i.z/t.length);return{min:e,max:r,center:n,avg:s}},t.roundRectRadiiToFullRadii=t=>t?1===t.length?[t[0]??0,t[0]??0,t[0]??0,t[0]??0]:2===t.length?[t[0]??0,t[1]??0,t[0]??0,t[1]??0]:3===t.length?[t[0]??0,t[1]??0,t[2]??0,t[1]??0]:t:[0,0,0,0],t.toArrayDirectionChange=t=>{if(!t||0===t.length||!t[0]||0===t[0].length)return[];const e=[],r=t[0].length,i=t.length;for(let n=0;n<r;n++){const r=[];for(let e=0;e<i;e++)r.push(t[e][n]);e.push(r)}return e},t.groupByMap=(t,e)=>t.reduce((t,r)=>{const i=e(r),n=t.get(i)||[];return n.push(r),t.set(i,n),t},new Map),t.groupByObject=(e,r)=>{const i=t.groupByMap(e,r);return Object.fromEntries(i)},t.toURLSearchParams=t=>{const e=new URLSearchParams;if("string"==typeof t)new URLSearchParams(t).forEach((t,r)=>{e.append(r,t)});else if("object"==typeof t){const r=t instanceof URLSearchParams?t.entries():Array.isArray(t)?t:Object.entries(t);for(const[t,i]of Array.from(r))Array.isArray(i)?i.forEach(r=>e.append(t,r)):e.append(t,i)}return e},t.stringJsonToKeyPairs=t=>Array.from(t.matchAll(/(\w+):\s*([^,}]+)/g)).map(t=>({key:t[1],value:t[2]}))}(v||(v={}));const M=w.T;var B=r(426);class N{constructor(t,e,r){t instanceof N?(this.req=t.req,this.res=t.res,this.config=r):(this.req=t,this.res=e,this.config=r)}get reqSocket(){return this.req.socket}get reqCookieMap(){let t=this.reqHeader(i.HttpHeaders.Cookie)??"";Array.isArray(t)&&(t=t.join(";"));const e=new Map;return t.split(";").map(t=>t.trim().split("=")).forEach(t=>{e.set(t[0],t[1])}),e}reqCookieGet(t){return this.reqCookieMap.get(t)}get reqRemoteAddress(){const t=this.req.headers["x-forwarded-for"];let e=this.req.socket.remoteAddress;return Array.isArray(t)?e=t.join(",").split(",").shift():"string"==typeof t&&(e=t.split(",").shift()),e}get reqUrlObject(){return new d.URL(this.reqUrl,`${this.reqSocket?"https://":"http"}${this.reqHost??"localhost"}`)}get reqUrlPathName(){return this.reqUrlObj().pathname??""}get reqUrl(){return this.req.url??""}reqUrlObj(t){return new d.URL(`${t?.scheme??"http"}://${t?.host?t?.host:this.reqHeaderFirst(i.HttpHeaders.Host)??"localhost"}${this.req.url??""}`)}get reqUrlSearchParamTuples(){return Array.from(this.reqUrlObj().searchParams)}get reqUrlSearchParams(){return this.reqUrlObj().searchParams}get reqUrlSearchParamsObj(){const t=this.reqUrlObj().searchParams;return M.toObject(t)}get reqPathSearchParamUrl(){const t=this.reqUrlObj();return t.pathname+(t.searchParams.toString()?"?"+t.searchParams.toString():"")}get reqReadable(){return this.req.readable}get reqIntent(){return new u(this.reqPathSearchParamUrl)}reqHasContentTypeHeader(t){return(this.reqHeaderFirst(i.HttpHeaders.ContentType)??"").toLowerCase().indexOf(t.toLocaleLowerCase())>-1}reqHasAcceptHeader(t){return(this.reqHeaderFirst(i.HttpHeaders.Accept)??"").toLowerCase().indexOf(t.toLocaleLowerCase())>-1}reqBodyData(){return new Promise((t,e)=>{if(this.reqReadable){const r=[];this.req.on("data",t=>r.push(t)),this.req.on("error",t=>e(t)),this.req.on("end",()=>{this.reqBodyChunk=y.Buffer.concat(r),t(this.reqBodyChunk)})}else t(this.reqBodyChunk??y.Buffer.alloc(0))})}resBodyData(){return this.resWriteChunk}async reqBodyMultipartFormDataObject(){const t=await this.reqBodyMultipartFormData(),e={};for(const r of t)if(r.isFile)e[r.name]=await b.i.writeFile(r.value,{originalName:r.filename});else{const t=e[r.name];Array.isArray(t)?t.push(r.value):e[r.name]="string"==typeof t?[t,r.value]:r.value}return e}reqBodyMultipartFormData(){return new Promise((t,e)=>{const r=this.req.headers["content-type"];if(!r||!r.startsWith("multipart/form-data"))return e(new Error("Invalid Content-Type. Expected multipart/form-data."));const i=r.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!i)return e(new Error("Boundary not found in Content-Type header."));const n=i[1]||i[2];if(!n)return e(new Error("Failed to extract boundary."));const s=y.Buffer.from(`--${n}`),o=y.Buffer.from("\r\n"),a=y.Buffer.from("\r\n\r\n"),h=[];let l=0;this.req.on("data",t=>{h.push(t),l+=t.length}),this.req.on("error",t=>{e(t)}),this.req.on("end",()=>{if(0===l)return t([]);const r=y.Buffer.concat(h,l),i=[];let n=0,c=r.indexOf(s,n);if(-1===c)return e(new Error("Initial boundary not found."));for(n=c+s.length,r.slice(n,n+o.length).equals(o)&&(n+=o.length);n<r.length;){const t=r.indexOf(s,n);if(-1===t)break;let e=t;e>o.length&&r.slice(e-o.length,e).equals(o)&&(e-=o.length);const h=r.slice(n,e),l=h.indexOf(a);if(-1===l){if(console.warn("Skipping malformed part: no header/body separator found."),n=t+s.length,r.slice(n,n+o.length).equals(o)&&(n+=o.length),"--"===r.slice(n,n+2).toString())break;continue}const c=h.slice(0,l),u=h.slice(l+a.length),d=c.toString("utf-8"),y={};d.split("\r\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const r=t.substring(0,e).trim().toLowerCase(),i=t.substring(e+1).trim();y[r]=i}});const p=y["content-disposition"];if(!p){if(console.warn("Skipping part: no Content-Disposition header."),n=t+s.length,r.slice(n,n+o.length).equals(o)&&(n+=o.length),"--"===r.slice(n,n+2).toString())break;continue}const g=p.match(/name="([^"]+)"/i),f=p.match(/filename="([^"]+)"/i),m=g?g[1]:null,b=f?f[1]:null,x=y["content-type"]||null;if(m){const t=!!b,e={name:m,isFile:t,filename:b,contentType:x,value:t?u:u.toString("utf-8")};i.push(e)}else console.warn("Skipping part: 'name' not found in Content-Disposition.");if(n=t+s.length,r.slice(n,n+o.length).equals(o)&&(n+=o.length),"--"===r.slice(n,n+2).toString())break}t(i)})})}async reqBodyStringData(){return(await this.reqBodyData()).toString()}async reqBodyJsonData(){return JSON.parse(await this.reqBodyStringData())}async reqBodyFormUrlData(){const t=await this.reqBodyStringData(),e={};return Array.from(new d.URLSearchParams(t).entries()).forEach(([t,r])=>{const i=e[t];Array.isArray(i)?i.push(r):e[t]="string"==typeof i?[i,r]:r}),e}async reqBodyReqFormUrlBody(){const t=await this.reqBodyFormUrlData();return Object.assign(new p.ReqFormUrlBody,t)}async reqBodyReqJsonBody(){const t=await this.reqBodyStringData();return Object.assign(new g.ReqJsonBody,t?JSON.parse(t):{})}resBodyJsonData(){const t=B.T.toString(this.resBodyData());return t?JSON.parse(t):null}resBodyStringData(){return B.T.toString(this.resBodyData())}reqMethod(){return this.req.method?.toUpperCase()}reqHeader(t){return this.req.headers[t.toLowerCase()]}get reqHost(){return this.reqHeaderFirst(i.HttpHeaders.Host)}get reqHeaderObj(){const t=new f.ReqHeader;return Object.entries(this.req.headers).forEach(([e,r])=>{t[e]=r}),t}reqHeaderFirst(t,e){const r=this.req.headers[t.toLowerCase()];return r&&Array.isArray(r)?r[0]??e:r??e}reqAuthorizationHeader(){return this.reqHeaderFirst(i.HttpHeaders.Authorization)}reqRefreshTokenHeader(){return this.reqHeaderFirst(i.HttpHeaders.Authorization)}resStatusCode(t){return t?(this.res.statusCode=t,new L(this.req,this.res,this.config,this.res.statusCode)):this.res.statusCode}resHeader(t){return this.res.getHeader(t.toLowerCase())}resHeaderFirst(t,e){const r=this.res.getHeader(t.toLowerCase());return r&&Array.isArray(r)?r[0]??e:r??e}async reqSession(){return this.config.sessionManager?(await this.config.sessionManager.session(this)).dataSet.data:Promise.reject(new Error("Not SessionManager"))}reqSessionSet(t,e){this.reqSession[t]=e}reqSessionGet(t){const e=this.reqSession;if(e)return e[t]}resSetStatusCode(t){return this.res.statusCode=t,this.createRequestResponseChain(this.res.statusCode)}resWrite(t,e="utf8"){return this.resWriteChunk=t,this.createRequestResponseChain(this.resWriteChunk)}resWriteJson(t,e="utf8"){return this.resWrite(JSON.stringify(t),e)}resSetHeader(t,e){return this.createRequestResponseChain(this.res.setHeader(t.toLowerCase(),e))}resAddHeader(t,e){const r=this.res.getHeader(t.toLowerCase()),i=Array.isArray(r)?r.concat(e):r?[r.toString(),...[].concat(e)]:e;return this.createRequestResponseChain(this.res.setHeader(t.toLowerCase(),i))}resSetHeaders(t){return Object.entries(t).forEach(([t,e])=>this.resSetHeader(t,e)),this.createRequestResponseChain()}resAddHeaders(t){return Object.entries(t).forEach(([t,e])=>this.resAddHeader(t,e)),this.createRequestResponseChain()}async resEndChunk(){const t=this.reqHeaderFirst(i.HttpHeaders.AcceptEncoding);let e=this.resWriteChunk;t?.includes("gzip")&&(e=await(0,m.gzip)(e),this.resSetHeader(i.HttpHeaders.ContentEncoding,"gzip")),this.res.end(e)}async resEnd(t){this.resWriteChunk=t??this.resWriteChunk,this.req.readable?(await this.reqBodyData(),await this.resEndChunk()):await this.resEndChunk()}resWriteHead(t,e){return this.createRequestResponseChain(this.res.writeHead(t,e))}resWriteHeadEnd(t,e){this.createRequestResponseChain(this.res.writeHead(t,e)),this.res.end()}resIsDone(){return this.res.finished||this.res.writableEnded||this.res.headersSent}createRequestResponseChain(t){const e=new L(this.req,this.res,this.config,t);return e.resWriteChunk=this.resWriteChunk,e.reqBodyChunk=this.reqBodyChunk,e}}class L extends N{constructor(t,e,r,i){super(t,e,r),this.result=i}}},5884:(t,e,r)=>{var i=r(3106);t.exports={gzip:function(t,e){return new Promise(function(r,n){i.gzip(t,e,function(t,e){t?n(Error(t)):r(e)})})},ungzip:function(t,e){return new Promise(function(r,n){i.gunzip(t,e,function(t,e){t?n(Error(t)):r(e)})})}}},6377:(t,e,r)=>{r.d(e,{ReqFormUrlBody:()=>i});class i{}},7016:t=>{t.exports=require("url")},7953:(t,e,r)=>{var i;r.d(e,{HttpHeaders:()=>i}),function(t){t.ContentLength="Content-Length",t.ContentType="Content-Type",t.ContentEncoding="Content-Encoding",t.Accept="Accept",t.Authorization="Authorization",t.CacheControl="Cache-Control",t.Connection="Connection",t.Date="Date",t.Host="Host",t.Pragma="Pragma",t.Trailer="Trailer",t.TransferEncoding="Transfer-Encoding",t.Upgrade="Upgrade",t.Via="Via",t.Warning="Warning",t.AcceptCharset="Accept-Charset",t.AcceptEncoding="Accept-Encoding",t.AcceptLanguage="Accept-Language",t.AccessControlAllowOrigin="Access-Control-Allow-Origin",t.AccessControlAllowMethods="Access-Control-Allow-Methods",t.AccessControlAllowHeaders="Access-Control-Allow-Headers",t.AccessControlExposeHeaders="Access-Control-Expose-Headers",t.Expect="Expect",t.From="From",t.MaxForwards="Max-Forwards",t.Referer="Referer",t.UserAgent="User-Agent",t.Cookie="Cookie",t.SetCookie="Set-Cookie",t.Cookie2="Cookie2",t.SetCookie2="Set-Cookie2",t.Location="Location",t.IfModifiedSince="If-Modified-Since",t.IfUnmodifiedSince="If-Unmodified-Since",t.IfMatch="If-Match",t.IfNoneMatch="If-None-Match",t.IfRange="If-Range",t.Allow="Allow",t.Server="Server"}(i||(i={}))},9434:(t,e,r)=>{r.d(e,{ReqHeader:()=>i});class i{}}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,r),s.exports}r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};r.r(i),r.d(i,{SessionManager:()=>n.SessionManager});var n=r(1262);module.exports=i})();
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/session/index.ts
20
+ var session_exports = {};
21
+ __export(session_exports, {
22
+ SessionManager: () => SessionManager
23
+ });
24
+ module.exports = __toCommonJS(session_exports);
25
+
26
+ // src/session/SessionManager.ts
27
+ var import_RandomUtils = require("@dooboostore/core/random/RandomUtils");
28
+
29
+ // src/models/RequestResponse.ts
30
+ var import_Intent = require("@dooboostore/simple-boot/intent/Intent");
31
+ var import_url = require("url");
32
+ var import_buffer = require("buffer");
33
+
34
+ // src/models/datas/body/ReqFormUrlBody.ts
35
+ var ReqFormUrlBody = class {
36
+ };
37
+
38
+ // src/models/datas/body/ReqJsonBody.ts
39
+ var ReqJsonBody = class {
40
+ };
41
+
42
+ // src/models/datas/ReqHeader.ts
43
+ var ReqHeader = class {
44
+ };
45
+
46
+ // src/models/RequestResponse.ts
47
+ var import_node_gzip = require("node-gzip");
48
+ var import_FileUtils = require("@dooboostore/core-node/file/FileUtils");
49
+ var import_ConvertUtils = require("@dooboostore/core/convert/ConvertUtils");
50
+ var import_ConvertUtils2 = require("@dooboostore/core-node/convert/ConvertUtils");
51
+ var RequestResponse = class _RequestResponse {
52
+ // protected sessionManager?: SessionManager;
53
+ // constructor(req: IncomingMessage, res: ServerResponse);
54
+ // constructor(req: RequestResponse);
55
+ // constructor(req: IncomingMessage, res: ServerResponse, sessionManager?: SessionManager);
56
+ // constructor(req: IncomingMessage | RequestResponse, res?: ServerResponse, sessionManager?: SessionManager) {
57
+ // // this.req = req;
58
+ // // this.res = res;
59
+ // if (req instanceof RequestResponse) {
60
+ // this.req = req.req;
61
+ // this.res = req.res;
62
+ // this.sessionManager = req.sessionManager;
63
+ // } else {
64
+ // this.req = req;
65
+ // this.res = res!;
66
+ // this.sessionManager = sessionManager;
67
+ // }
68
+ // }
69
+ constructor(req, res, config) {
70
+ if (req instanceof _RequestResponse) {
71
+ this.req = req.req;
72
+ this.res = req.res;
73
+ this.config = config;
74
+ } else {
75
+ this.req = req;
76
+ this.res = res;
77
+ this.config = config;
78
+ }
79
+ }
80
+ get reqSocket() {
81
+ return this.req.socket;
82
+ }
83
+ get reqCookieMap() {
84
+ let cookies = this.reqHeader("Cookie" /* Cookie */) ?? "";
85
+ if (Array.isArray(cookies)) {
86
+ cookies = cookies.join(";");
87
+ }
88
+ const map = /* @__PURE__ */ new Map();
89
+ cookies.split(";").map((it) => it.trim().split("=")).forEach((it) => {
90
+ map.set(it[0], it[1]);
91
+ });
92
+ return map;
93
+ }
94
+ reqCookieGet(key) {
95
+ return this.reqCookieMap.get(key);
96
+ }
97
+ get reqRemoteAddress() {
98
+ const ipHeader = this.req.headers["x-forwarded-for"];
99
+ let ip = this.req.socket.remoteAddress;
100
+ if (Array.isArray(ipHeader)) {
101
+ ip = ipHeader.join(",").split(",").shift();
102
+ } else if (typeof ipHeader === "string") {
103
+ ip = ipHeader.split(",").shift();
104
+ }
105
+ return ip;
106
+ }
107
+ get reqUrlObject() {
108
+ return new import_url.URL(this.reqUrl, `${this.reqSocket ? "https://" : "http"}${this.reqHost ?? "localhost"}`);
109
+ }
110
+ get reqUrlPathName() {
111
+ return this.reqUrlObj().pathname ?? "";
112
+ }
113
+ get reqUrl() {
114
+ return this.req.url ?? "";
115
+ }
116
+ reqUrlObj(config) {
117
+ return new import_url.URL(`${config?.scheme ?? "http"}://${config?.host ? config?.host : this.reqHeaderFirst("Host" /* Host */) ?? "localhost"}${this.req.url ?? ""}`);
118
+ }
119
+ get reqUrlSearchParamTuples() {
120
+ return Array.from(this.reqUrlObj().searchParams);
121
+ }
122
+ get reqUrlSearchParams() {
123
+ return this.reqUrlObj().searchParams;
124
+ }
125
+ get reqUrlSearchParamsObj() {
126
+ const entries = this.reqUrlObj().searchParams;
127
+ return import_ConvertUtils.ConvertUtils.toObject(entries);
128
+ }
129
+ get reqPathSearchParamUrl() {
130
+ const reqUrlObj = this.reqUrlObj();
131
+ return reqUrlObj.pathname + (reqUrlObj.searchParams.toString() ? "?" + reqUrlObj.searchParams.toString() : "");
132
+ }
133
+ get reqReadable() {
134
+ return this.req.readable;
135
+ }
136
+ get reqIntent() {
137
+ return new import_Intent.Intent(this.reqPathSearchParamUrl);
138
+ }
139
+ reqHasContentTypeHeader(mime) {
140
+ return (this.reqHeaderFirst("Content-Type" /* ContentType */) ?? "").toLowerCase().indexOf(mime.toLocaleLowerCase()) > -1;
141
+ }
142
+ reqHasAcceptHeader(mime) {
143
+ return (this.reqHeaderFirst("Accept" /* Accept */) ?? "").toLowerCase().indexOf(mime.toLocaleLowerCase()) > -1;
144
+ }
145
+ reqBodyData() {
146
+ return new Promise((resolve, reject) => {
147
+ if (this.reqReadable) {
148
+ const data = [];
149
+ this.req.on("data", (chunk) => data.push(chunk));
150
+ this.req.on("error", (err) => reject(err));
151
+ this.req.on("end", () => {
152
+ this.reqBodyChunk = import_buffer.Buffer.concat(data);
153
+ resolve(this.reqBodyChunk);
154
+ });
155
+ } else {
156
+ resolve(this.reqBodyChunk ?? import_buffer.Buffer.alloc(0));
157
+ }
158
+ });
159
+ }
160
+ resBodyData() {
161
+ return this.resWriteChunk;
162
+ }
163
+ async reqBodyMultipartFormDataObject() {
164
+ const m = await this.reqBodyMultipartFormData();
165
+ const formData = {};
166
+ for (const it of m) {
167
+ if (it.isFile) {
168
+ formData[it.name] = await import_FileUtils.FileUtils.writeFile(it.value, { originalName: it.filename });
169
+ } else {
170
+ const target = formData[it.name];
171
+ if (Array.isArray(target)) {
172
+ target.push(it.value);
173
+ } else if (typeof target === "string") {
174
+ formData[it.name] = [target, it.value];
175
+ } else {
176
+ formData[it.name] = it.value;
177
+ }
178
+ }
179
+ }
180
+ ;
181
+ return formData;
182
+ }
183
+ reqBodyMultipartFormData() {
184
+ return new Promise((resolve, reject) => {
185
+ const contentTypeHeader = this.req.headers["content-type"];
186
+ if (!contentTypeHeader || !contentTypeHeader.startsWith("multipart/form-data")) {
187
+ return reject(new Error("Invalid Content-Type. Expected multipart/form-data."));
188
+ }
189
+ const boundaryMatch = contentTypeHeader.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
190
+ if (!boundaryMatch) {
191
+ return reject(new Error("Boundary not found in Content-Type header."));
192
+ }
193
+ const boundary = boundaryMatch[1] || boundaryMatch[2];
194
+ if (!boundary) {
195
+ return reject(new Error("Failed to extract boundary."));
196
+ }
197
+ const boundaryBuffer = import_buffer.Buffer.from(`--${boundary}`);
198
+ const crlfBuffer = import_buffer.Buffer.from("\r\n");
199
+ const doubleCrlfBuffer = import_buffer.Buffer.from("\r\n\r\n");
200
+ const chunks = [];
201
+ let totalLength = 0;
202
+ this.req.on("data", (chunk) => {
203
+ chunks.push(chunk);
204
+ totalLength += chunk.length;
205
+ });
206
+ this.req.on("error", (err) => {
207
+ reject(err);
208
+ });
209
+ this.req.on("end", () => {
210
+ if (totalLength === 0) {
211
+ return resolve([]);
212
+ }
213
+ const fullBuffer = import_buffer.Buffer.concat(chunks, totalLength);
214
+ const parsedParts = [];
215
+ let currentPosition = 0;
216
+ let boundaryStartIndex = fullBuffer.indexOf(boundaryBuffer, currentPosition);
217
+ if (boundaryStartIndex === -1) {
218
+ return reject(new Error("Initial boundary not found."));
219
+ }
220
+ currentPosition = boundaryStartIndex + boundaryBuffer.length;
221
+ if (fullBuffer.slice(currentPosition, currentPosition + crlfBuffer.length).equals(crlfBuffer)) {
222
+ currentPosition += crlfBuffer.length;
223
+ }
224
+ while (currentPosition < fullBuffer.length) {
225
+ const nextBoundaryIndex = fullBuffer.indexOf(boundaryBuffer, currentPosition);
226
+ if (nextBoundaryIndex === -1) {
227
+ break;
228
+ }
229
+ let partEndIndex = nextBoundaryIndex;
230
+ if (partEndIndex > crlfBuffer.length && fullBuffer.slice(partEndIndex - crlfBuffer.length, partEndIndex).equals(crlfBuffer)) {
231
+ partEndIndex -= crlfBuffer.length;
232
+ }
233
+ const partBuffer = fullBuffer.slice(currentPosition, partEndIndex);
234
+ const headerBodySeparatorIndex = partBuffer.indexOf(doubleCrlfBuffer);
235
+ if (headerBodySeparatorIndex === -1) {
236
+ console.warn("Skipping malformed part: no header/body separator found.");
237
+ currentPosition = nextBoundaryIndex + boundaryBuffer.length;
238
+ if (fullBuffer.slice(currentPosition, currentPosition + crlfBuffer.length).equals(crlfBuffer)) {
239
+ currentPosition += crlfBuffer.length;
240
+ }
241
+ if (fullBuffer.slice(currentPosition, currentPosition + 2).toString() === "--") break;
242
+ continue;
243
+ }
244
+ const headerBuffer = partBuffer.slice(0, headerBodySeparatorIndex);
245
+ const bodyBuffer = partBuffer.slice(headerBodySeparatorIndex + doubleCrlfBuffer.length);
246
+ const headersStr = headerBuffer.toString("utf-8");
247
+ const headers = {};
248
+ headersStr.split("\r\n").forEach((line) => {
249
+ const colonIndex = line.indexOf(":");
250
+ if (colonIndex > 0) {
251
+ const key = line.substring(0, colonIndex).trim().toLowerCase();
252
+ const value = line.substring(colonIndex + 1).trim();
253
+ headers[key] = value;
254
+ }
255
+ });
256
+ const contentDisposition = headers["content-disposition"];
257
+ if (!contentDisposition) {
258
+ console.warn("Skipping part: no Content-Disposition header.");
259
+ currentPosition = nextBoundaryIndex + boundaryBuffer.length;
260
+ if (fullBuffer.slice(currentPosition, currentPosition + crlfBuffer.length).equals(crlfBuffer)) {
261
+ currentPosition += crlfBuffer.length;
262
+ }
263
+ if (fullBuffer.slice(currentPosition, currentPosition + 2).toString() === "--") break;
264
+ continue;
265
+ }
266
+ const nameMatch = contentDisposition.match(/name="([^"]+)"/i);
267
+ const filenameMatch = contentDisposition.match(/filename="([^"]+)"/i);
268
+ const name = nameMatch ? nameMatch[1] : null;
269
+ const filename = filenameMatch ? filenameMatch[1] : null;
270
+ const contentType = headers["content-type"] || null;
271
+ if (name) {
272
+ const isFile = !!filename;
273
+ const multipartData = {
274
+ name,
275
+ isFile,
276
+ // filename이 있으면 파일로 간주
277
+ filename,
278
+ contentType,
279
+ value: isFile ? bodyBuffer : bodyBuffer.toString("utf-8")
280
+ };
281
+ parsedParts.push(multipartData);
282
+ } else {
283
+ console.warn("Skipping part: 'name' not found in Content-Disposition.");
284
+ }
285
+ currentPosition = nextBoundaryIndex + boundaryBuffer.length;
286
+ if (fullBuffer.slice(currentPosition, currentPosition + crlfBuffer.length).equals(crlfBuffer)) {
287
+ currentPosition += crlfBuffer.length;
288
+ }
289
+ if (fullBuffer.slice(currentPosition, currentPosition + 2).toString() === "--") {
290
+ break;
291
+ }
292
+ }
293
+ resolve(parsedParts);
294
+ });
295
+ });
296
+ }
297
+ async reqBodyStringData() {
298
+ const data = (await this.reqBodyData()).toString();
299
+ return data;
300
+ }
301
+ async reqBodyJsonData() {
302
+ return JSON.parse(await this.reqBodyStringData());
303
+ }
304
+ async reqBodyFormUrlData() {
305
+ const data = await this.reqBodyStringData();
306
+ const formData = {};
307
+ Array.from(new import_url.URLSearchParams(data).entries()).forEach(([k, v]) => {
308
+ const target = formData[k];
309
+ if (Array.isArray(target)) {
310
+ target.push(v);
311
+ } else if (typeof target === "string") {
312
+ formData[k] = [target, v];
313
+ } else {
314
+ formData[k] = v;
315
+ }
316
+ });
317
+ return formData;
318
+ }
319
+ async reqBodyReqFormUrlBody() {
320
+ const data = await this.reqBodyFormUrlData();
321
+ return Object.assign(new ReqFormUrlBody(), data);
322
+ }
323
+ async reqBodyReqJsonBody() {
324
+ const data = await this.reqBodyStringData();
325
+ return Object.assign(new ReqJsonBody(), data ? JSON.parse(data) : {});
326
+ }
327
+ // reqBodyReqMultipartFormBody(): Promise<ReqMultipartFormBody> {
328
+ // return this.reqBodyMultipartFormData().then(it => new ReqMultipartFormBody(it))
329
+ // }
330
+ resBodyJsonData() {
331
+ const data = import_ConvertUtils2.ConvertUtils.toString(this.resBodyData());
332
+ return data ? JSON.parse(data) : null;
333
+ }
334
+ resBodyStringData() {
335
+ return import_ConvertUtils2.ConvertUtils.toString(this.resBodyData());
336
+ }
337
+ reqMethod() {
338
+ return this.req.method?.toUpperCase();
339
+ }
340
+ reqHeader(key) {
341
+ return this.req.headers[key.toLowerCase()];
342
+ }
343
+ get reqHost() {
344
+ return this.reqHeaderFirst("Host" /* Host */);
345
+ }
346
+ get reqHeaderObj() {
347
+ const h = new ReqHeader();
348
+ Object.entries(this.req.headers).forEach(([k, v]) => {
349
+ h[k] = v;
350
+ });
351
+ return h;
352
+ }
353
+ reqHeaderFirst(key, defaultValue) {
354
+ const header = this.req.headers[key.toLowerCase()];
355
+ if (header && Array.isArray(header)) {
356
+ return header[0] ?? defaultValue;
357
+ } else {
358
+ return header ?? defaultValue;
359
+ }
360
+ }
361
+ reqAuthorizationHeader() {
362
+ return this.reqHeaderFirst("Authorization" /* Authorization */);
363
+ }
364
+ reqRefreshTokenHeader() {
365
+ return this.reqHeaderFirst("Authorization" /* Authorization */);
366
+ }
367
+ // eslint-disable-next-line no-dupe-class-members
368
+ resStatusCode(code) {
369
+ if (code) {
370
+ this.res.statusCode = code;
371
+ return new RequestResponseChain(this.req, this.res, this.config, this.res.statusCode);
372
+ } else {
373
+ return this.res.statusCode;
374
+ }
375
+ }
376
+ resHeader(key) {
377
+ return this.res.getHeader(key.toLowerCase());
378
+ }
379
+ resHeaderFirst(key, defaultValue) {
380
+ const header = this.res.getHeader(key.toLowerCase());
381
+ if (header && Array.isArray(header)) {
382
+ return header[0] ?? defaultValue;
383
+ } else {
384
+ return header ?? defaultValue;
385
+ }
386
+ }
387
+ async reqSession() {
388
+ if (this.config.sessionManager) {
389
+ return (await this.config.sessionManager.session(this)).dataSet.data;
390
+ } else {
391
+ return Promise.reject(new Error("Not SessionManager"));
392
+ }
393
+ }
394
+ reqSessionSet(key, value) {
395
+ this.reqSession[key] = value;
396
+ }
397
+ reqSessionGet(key) {
398
+ const session = this.reqSession;
399
+ if (session) {
400
+ return session[key];
401
+ }
402
+ }
403
+ resSetStatusCode(statusCode) {
404
+ this.res.statusCode = statusCode;
405
+ return this.createRequestResponseChain(this.res.statusCode);
406
+ }
407
+ // resEnd() {
408
+ // this.res.end();
409
+ // }
410
+ // eslint-disable-next-line no-undef
411
+ resWrite(chunk, encoding = "utf8") {
412
+ this.resWriteChunk = chunk;
413
+ return this.createRequestResponseChain(this.resWriteChunk);
414
+ }
415
+ // eslint-disable-next-line no-undef
416
+ resWriteJson(chunk, encoding = "utf8") {
417
+ return this.resWrite(JSON.stringify(chunk), encoding);
418
+ }
419
+ resSetHeader(key, value) {
420
+ return this.createRequestResponseChain(this.res.setHeader(key.toLowerCase(), value));
421
+ }
422
+ resAddHeader(key, value) {
423
+ const existingValue = this.res.getHeader(key.toLowerCase());
424
+ const newValue = Array.isArray(existingValue) ? existingValue.concat(value) : existingValue ? [existingValue.toString(), ...[].concat(value)] : value;
425
+ return this.createRequestResponseChain(this.res.setHeader(key.toLowerCase(), newValue));
426
+ }
427
+ resSetHeaders(headers) {
428
+ Object.entries(headers).forEach(([key, value]) => this.resSetHeader(key, value));
429
+ return this.createRequestResponseChain();
430
+ }
431
+ resAddHeaders(headers) {
432
+ Object.entries(headers).forEach(([key, value]) => this.resAddHeader(key, value));
433
+ return this.createRequestResponseChain();
434
+ }
435
+ // 마지막 종료될때 타는거.
436
+ async resEndChunk() {
437
+ const encoding = this.reqHeaderFirst("Accept-Encoding" /* AcceptEncoding */);
438
+ let data = this.resWriteChunk;
439
+ if (encoding?.includes("gzip")) {
440
+ data = await (0, import_node_gzip.gzip)(data);
441
+ this.resSetHeader("Content-Encoding" /* ContentEncoding */, "gzip");
442
+ }
443
+ this.res.end(data);
444
+ }
445
+ async resEnd(chunk) {
446
+ this.resWriteChunk = chunk ?? this.resWriteChunk;
447
+ if (this.req.readable) {
448
+ await this.reqBodyData();
449
+ await this.resEndChunk();
450
+ } else {
451
+ await this.resEndChunk();
452
+ }
453
+ }
454
+ // writeContinue(callback?: () => void) {
455
+ // this.res.writeContinue(callback);
456
+ // return new RequestResponseChain(this.req, this.res);
457
+ // }
458
+ // reqWrite(chunk?: any) {
459
+ // this.resWriteChunk = chunk;
460
+ // // this.res.write(chunk);
461
+ // return this.createRequestResponseChain();
462
+ // }
463
+ resWriteHead(statusCode, headers) {
464
+ return this.createRequestResponseChain(this.res.writeHead(statusCode, headers));
465
+ }
466
+ resWriteHeadEnd(statusCode, headers) {
467
+ this.createRequestResponseChain(this.res.writeHead(statusCode, headers));
468
+ this.res.end();
469
+ }
470
+ resIsDone() {
471
+ return this.res.finished || this.res.writableEnded || this.res.headersSent;
472
+ }
473
+ createRequestResponseChain(data) {
474
+ const requestResponseChain = new RequestResponseChain(this.req, this.res, this.config, data);
475
+ requestResponseChain.resWriteChunk = this.resWriteChunk;
476
+ requestResponseChain.reqBodyChunk = this.reqBodyChunk;
477
+ return requestResponseChain;
478
+ }
479
+ // res.on("readable", () => {
480
+ // console.log('readable???')
481
+ // });
482
+ // res.on('complete', function (details) {
483
+ // var size = details.req.bytes;
484
+ // console.log('complete-->', size)
485
+ // });
486
+ // res.on('finish', function() {
487
+ // console.log('finish??');
488
+ // });
489
+ // res.on('end', () => {
490
+ // console.log('end--?')
491
+ // });
492
+ };
493
+ var RequestResponseChain = class extends RequestResponse {
494
+ constructor(req, res, config, result) {
495
+ super(req, res, config);
496
+ this.result = result;
497
+ }
498
+ };
499
+
500
+ // src/session/SessionManager.ts
501
+ var SessionManager = class {
502
+ constructor(option) {
503
+ this.option = option;
504
+ this.sessions = /* @__PURE__ */ new Map();
505
+ this.sessionOption = option.sessionOption;
506
+ setInterval(async () => {
507
+ const uuids = await this.getSessionUUIDs();
508
+ for (const uuid of uuids) {
509
+ const dataSet = await this.getSessionDataSet(uuid);
510
+ if (dataSet && this.isExpired(dataSet.access)) {
511
+ await this.deleteSession(uuid);
512
+ }
513
+ }
514
+ }, this.sessionOption.expiredTime);
515
+ }
516
+ async getSessionUUIDs() {
517
+ if (this.sessionOption.provider?.uuids) {
518
+ return this.sessionOption.provider.uuids();
519
+ } else {
520
+ return Array.from(this.sessions.keys());
521
+ }
522
+ }
523
+ async deleteSession(uuid) {
524
+ if (this.sessionOption.provider?.delete) {
525
+ this.sessionOption.provider.delete(uuid);
526
+ } else {
527
+ this.sessions.delete(uuid);
528
+ }
529
+ }
530
+ async getSessionDataSet(uuid) {
531
+ if (this.sessionOption.provider?.get) {
532
+ return this.sessionOption.provider.get(uuid);
533
+ } else {
534
+ return this.sessions.get(uuid);
535
+ }
536
+ }
537
+ async setSessionDataSet(uuid, dataSet) {
538
+ if (this.sessionOption.provider?.set) {
539
+ this.sessionOption.provider.set(uuid, dataSet);
540
+ } else {
541
+ this.sessions.set(uuid, dataSet);
542
+ }
543
+ }
544
+ isExpired(access, now = Date.now()) {
545
+ return now - access >= this.option.sessionOption.expiredTime;
546
+ }
547
+ makeUUID() {
548
+ return import_RandomUtils.RandomUtils.uuid("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
549
+ }
550
+ async session(rrOrUUID) {
551
+ let uuid;
552
+ if (rrOrUUID instanceof RequestResponse) {
553
+ uuid = rrOrUUID.reqCookieGet(this.sessionOption.key) ?? this.makeUUID();
554
+ } else if (typeof rrOrUUID === "string") {
555
+ uuid = rrOrUUID;
556
+ } else {
557
+ uuid = this.makeUUID();
558
+ }
559
+ let dataSet = await this.getSessionDataSet(uuid);
560
+ const now = Date.now();
561
+ if (dataSet) {
562
+ if (this.isExpired(dataSet.access, now)) {
563
+ delete dataSet.data;
564
+ }
565
+ dataSet.access = now;
566
+ } else {
567
+ dataSet = {
568
+ access: now
569
+ };
570
+ }
571
+ await this.setSessionDataSet(uuid, dataSet);
572
+ return { uuid, dataSet };
573
+ }
574
+ };
575
+ // Annotate the CommonJS export names for ESM import in node:
576
+ 0 && (module.exports = {
577
+ SessionManager
578
+ });
579
+ //# sourceMappingURL=index.js.map