@futdevpro/fsm-dynamo 1.5.43 → 1.5.44

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 (284) hide show
  1. package/lib/_collections/_constants/country-codes-ISO-3166.json +3239 -0
  2. package/lib/_collections/_constants/country-iso.d.ts +67 -0
  3. package/lib/_collections/_constants/country-iso.d.ts.map +1 -0
  4. package/lib/_collections/_constants/country-iso.js +47 -0
  5. package/lib/_collections/_constants/country-iso.js.map +1 -0
  6. package/lib/_collections/_constants/country-phone-code.d.ts +6 -0
  7. package/lib/_collections/_constants/country-phone-code.d.ts.map +1 -0
  8. package/lib/_collections/_constants/country-phone-code.js +3 -0
  9. package/lib/_collections/_constants/country-phone-code.js.map +1 -0
  10. package/lib/_collections/_constants/country-phone-codes.json +1202 -0
  11. package/lib/_collections/_constants/country-sub-divisions-ISO-3166.json +4994 -0
  12. package/lib/_collections/_tools/dynamo-location.d.ts +6 -0
  13. package/lib/_collections/_tools/dynamo-location.d.ts.map +1 -0
  14. package/lib/_collections/_tools/dynamo-location.js +40 -0
  15. package/lib/_collections/_tools/dynamo-location.js.map +1 -0
  16. package/lib/_collections/_tools/dynamo-log.d.ts +11 -0
  17. package/lib/_collections/_tools/dynamo-log.d.ts.map +1 -0
  18. package/lib/_collections/_tools/dynamo-log.js +59 -0
  19. package/lib/_collections/_tools/dynamo-log.js.map +1 -0
  20. package/lib/_collections/_tools/dynamo-random.d.ts +8 -0
  21. package/lib/_collections/_tools/dynamo-random.d.ts.map +1 -0
  22. package/lib/_collections/_tools/dynamo-random.js +60 -0
  23. package/lib/_collections/_tools/dynamo-random.js.map +1 -0
  24. package/lib/_collections/_tools/dynamo-regions.d.ts +16 -0
  25. package/lib/_collections/_tools/dynamo-regions.d.ts.map +1 -0
  26. package/lib/_collections/_tools/dynamo-regions.js +58 -0
  27. package/lib/_collections/_tools/dynamo-regions.js.map +1 -0
  28. package/lib/_collections/_tools/dynamo-round-list.d.ts +8 -0
  29. package/lib/_collections/_tools/dynamo-round-list.d.ts.map +1 -0
  30. package/lib/_collections/_tools/dynamo-round-list.js +39 -0
  31. package/lib/_collections/_tools/dynamo-round-list.js.map +1 -0
  32. package/lib/_collections/_tools/dynamo-shared.service.d.ts +73 -0
  33. package/lib/_collections/_tools/dynamo-shared.service.d.ts.map +1 -0
  34. package/lib/_collections/_tools/dynamo-shared.service.js +151 -0
  35. package/lib/_collections/_tools/dynamo-shared.service.js.map +1 -0
  36. package/lib/_collections/_tools/dynamo-time.d.ts +12 -0
  37. package/lib/_collections/_tools/dynamo-time.d.ts.map +1 -0
  38. package/lib/_collections/_tools/dynamo-time.js +41 -0
  39. package/lib/_collections/_tools/dynamo-time.js.map +1 -0
  40. package/lib/_collections/_tools/dynamo-trigonometry.d.ts +43 -0
  41. package/lib/_collections/_tools/dynamo-trigonometry.d.ts.map +1 -0
  42. package/lib/_collections/_tools/dynamo-trigonometry.js +62 -0
  43. package/lib/_collections/_tools/dynamo-trigonometry.js.map +1 -0
  44. package/lib/_collections/_tools/location.d.ts +6 -0
  45. package/lib/_collections/_tools/location.d.ts.map +1 -0
  46. package/lib/_collections/_tools/location.js +40 -0
  47. package/lib/_collections/_tools/location.js.map +1 -0
  48. package/lib/_collections/_tools/log.d.ts +10 -0
  49. package/lib/_collections/_tools/log.d.ts.map +1 -0
  50. package/lib/_collections/_tools/log.js +53 -0
  51. package/lib/_collections/_tools/log.js.map +1 -0
  52. package/lib/_collections/_tools/random.d.ts +8 -0
  53. package/lib/_collections/_tools/random.d.ts.map +1 -0
  54. package/lib/_collections/_tools/random.js +60 -0
  55. package/lib/_collections/_tools/random.js.map +1 -0
  56. package/lib/_collections/_tools/region-translator.d.ts +12 -0
  57. package/lib/_collections/_tools/region-translator.d.ts.map +1 -0
  58. package/lib/_collections/_tools/region-translator.js +48 -0
  59. package/lib/_collections/_tools/region-translator.js.map +1 -0
  60. package/lib/_collections/_tools/round-list.d.ts +8 -0
  61. package/lib/_collections/_tools/round-list.d.ts.map +1 -0
  62. package/lib/_collections/_tools/round-list.js +39 -0
  63. package/lib/_collections/_tools/round-list.js.map +1 -0
  64. package/lib/_collections/_tools/time.d.ts +12 -0
  65. package/lib/_collections/_tools/time.d.ts.map +1 -0
  66. package/lib/_collections/_tools/time.js +41 -0
  67. package/lib/_collections/_tools/time.js.map +1 -0
  68. package/lib/_collections/_tools/trigonometry.d.ts +43 -0
  69. package/lib/_collections/_tools/trigonometry.d.ts.map +1 -0
  70. package/lib/_collections/_tools/trigonometry.js +62 -0
  71. package/lib/_collections/_tools/trigonometry.js.map +1 -0
  72. package/lib/_collections/_tools/utilities.d.ts +32 -0
  73. package/lib/_collections/_tools/utilities.d.ts.map +1 -0
  74. package/lib/_collections/_tools/utilities.js +71 -0
  75. package/lib/_collections/_tools/utilities.js.map +1 -0
  76. package/lib/_collections/_tools/vector.d.ts +38 -0
  77. package/lib/_collections/_tools/vector.d.ts.map +1 -0
  78. package/lib/_collections/_tools/vector.js +107 -0
  79. package/lib/_collections/_tools/vector.js.map +1 -0
  80. package/lib/_collections/dynamo-shared.service.d.ts +87 -0
  81. package/lib/_collections/dynamo-shared.service.d.ts.map +1 -0
  82. package/lib/_collections/dynamo-shared.service.js +261 -0
  83. package/lib/_collections/dynamo-shared.service.js.map +1 -0
  84. package/lib/_collections/index.d.ts +11 -0
  85. package/lib/_collections/index.d.ts.map +1 -0
  86. package/lib/_collections/index.js +15 -0
  87. package/lib/_collections/index.js.map +1 -0
  88. package/lib/_constants/index.d.ts +4 -0
  89. package/lib/_constants/index.d.ts.map +1 -0
  90. package/lib/_constants/index.js +9 -0
  91. package/lib/_constants/index.js.map +1 -0
  92. package/lib/_constants/module-settings/test-module-settings.d.ts +3 -0
  93. package/lib/_constants/module-settings/test-module-settings.d.ts.map +1 -0
  94. package/lib/_constants/module-settings/test-module-settings.js +16 -0
  95. package/lib/_constants/module-settings/test-module-settings.js.map +1 -0
  96. package/lib/_constants/module-settings/usage-module-settings.d.ts +3 -0
  97. package/lib/_constants/module-settings/usage-module-settings.d.ts.map +1 -0
  98. package/lib/_constants/module-settings/usage-module-settings.js +13 -0
  99. package/lib/_constants/module-settings/usage-module-settings.js.map +1 -0
  100. package/lib/_constants/times.d.ts +8 -0
  101. package/lib/_constants/times.d.ts.map +1 -0
  102. package/lib/_constants/times.js +11 -0
  103. package/lib/_constants/times.js.map +1 -0
  104. package/lib/_enums/data-model-type.enum.d.ts +6 -0
  105. package/lib/_enums/data-model-type.enum.d.ts.map +1 -0
  106. package/lib/_enums/data-model-type.enum.js +10 -0
  107. package/lib/_enums/data-model-type.enum.js.map +1 -0
  108. package/lib/_enums/index.d.ts +3 -0
  109. package/lib/_enums/index.d.ts.map +1 -0
  110. package/lib/_enums/index.js +7 -0
  111. package/lib/_enums/index.js.map +1 -0
  112. package/lib/_enums/log-style.enum.d.ts +26 -0
  113. package/lib/_enums/log-style.enum.d.ts.map +1 -0
  114. package/lib/_enums/log-style.enum.js +30 -0
  115. package/lib/_enums/log-style.enum.js.map +1 -0
  116. package/lib/_enums/region.enum.d.ts +8 -0
  117. package/lib/_enums/region.enum.d.ts.map +1 -0
  118. package/lib/_enums/region.enum.js +12 -0
  119. package/lib/_enums/region.enum.js.map +1 -0
  120. package/lib/_enums/sub-region.enum.d.ts +20 -0
  121. package/lib/_enums/sub-region.enum.d.ts.map +1 -0
  122. package/lib/_enums/sub-region.enum.js +24 -0
  123. package/lib/_enums/sub-region.enum.js.map +1 -0
  124. package/lib/_models/control-models/country-iso.d.ts +16 -0
  125. package/lib/_models/control-models/country-iso.d.ts.map +1 -0
  126. package/lib/_models/control-models/country-iso.js +3 -0
  127. package/lib/_models/control-models/country-iso.js.map +1 -0
  128. package/lib/_models/control-models/country-phone-code.d.ts +6 -0
  129. package/lib/_models/control-models/country-phone-code.d.ts.map +1 -0
  130. package/lib/_models/control-models/country-phone-code.js +3 -0
  131. package/lib/_models/control-models/country-phone-code.js.map +1 -0
  132. package/lib/_models/control-models/daily-usage-data.d.ts +18 -0
  133. package/lib/_models/control-models/daily-usage-data.d.ts.map +1 -0
  134. package/lib/_models/control-models/daily-usage-data.js +22 -0
  135. package/lib/_models/control-models/daily-usage-data.js.map +1 -0
  136. package/lib/_models/control-models/dynamo-daily-usage-data.d.ts +18 -0
  137. package/lib/_models/control-models/dynamo-daily-usage-data.d.ts.map +1 -0
  138. package/lib/_models/control-models/dynamo-daily-usage-data.js +22 -0
  139. package/lib/_models/control-models/dynamo-daily-usage-data.js.map +1 -0
  140. package/lib/_models/control-models/dynamo-error.d.ts +263 -0
  141. package/lib/_models/control-models/dynamo-error.d.ts.map +1 -0
  142. package/lib/_models/control-models/dynamo-error.js +114 -0
  143. package/lib/_models/control-models/dynamo-error.js.map +1 -0
  144. package/lib/_models/control-models/dynamo-module-settings.d.ts +7 -0
  145. package/lib/_models/control-models/dynamo-module-settings.d.ts.map +1 -0
  146. package/lib/_models/control-models/dynamo-module-settings.js +3 -0
  147. package/lib/_models/control-models/dynamo-module-settings.js.map +1 -0
  148. package/lib/_models/control-models/dynamo-nts-data-params.d.ts +14 -0
  149. package/lib/_models/control-models/dynamo-nts-data-params.d.ts.map +1 -0
  150. package/lib/_models/control-models/dynamo-nts-data-params.js +19 -0
  151. package/lib/_models/control-models/dynamo-nts-data-params.js.map +1 -0
  152. package/lib/_models/control-models/dynamo-nts-data-property-params.d.ts +45 -0
  153. package/lib/_models/control-models/dynamo-nts-data-property-params.d.ts.map +1 -0
  154. package/lib/_models/control-models/dynamo-nts-data-property-params.js +61 -0
  155. package/lib/_models/control-models/dynamo-nts-data-property-params.js.map +1 -0
  156. package/lib/_models/control-models/dynamo-nts-error.d.ts +19 -0
  157. package/lib/_models/control-models/dynamo-nts-error.d.ts.map +1 -0
  158. package/lib/_models/control-models/dynamo-nts-error.js +190 -0
  159. package/lib/_models/control-models/dynamo-nts-error.js.map +1 -0
  160. package/lib/_models/control-models/dynamo-nts-module-settings.d.ts +7 -0
  161. package/lib/_models/control-models/dynamo-nts-module-settings.d.ts.map +1 -0
  162. package/lib/_models/control-models/dynamo-nts-module-settings.js +3 -0
  163. package/lib/_models/control-models/dynamo-nts-module-settings.js.map +1 -0
  164. package/lib/_models/control-models/dynamo-poll.d.ts +31 -0
  165. package/lib/_models/control-models/dynamo-poll.d.ts.map +1 -0
  166. package/lib/_models/control-models/dynamo-poll.js +90 -0
  167. package/lib/_models/control-models/dynamo-poll.js.map +1 -0
  168. package/lib/_models/control-models/dynamo-usage-action.d.ts +9 -0
  169. package/lib/_models/control-models/dynamo-usage-action.d.ts.map +1 -0
  170. package/lib/_models/control-models/dynamo-usage-action.js +13 -0
  171. package/lib/_models/control-models/dynamo-usage-action.js.map +1 -0
  172. package/lib/_models/control-models/dynamo-usage-data.d.ts +14 -0
  173. package/lib/_models/control-models/dynamo-usage-data.d.ts.map +1 -0
  174. package/lib/_models/control-models/dynamo-usage-data.js +16 -0
  175. package/lib/_models/control-models/dynamo-usage-data.js.map +1 -0
  176. package/lib/_models/control-models/dynamobe-data-params.d.ts +14 -0
  177. package/lib/_models/control-models/dynamobe-data-params.d.ts.map +1 -0
  178. package/lib/_models/control-models/dynamobe-data-params.js +19 -0
  179. package/lib/_models/control-models/dynamobe-data-params.js.map +1 -0
  180. package/lib/_models/control-models/dynamobe-data-property-params.d.ts +28 -0
  181. package/lib/_models/control-models/dynamobe-data-property-params.d.ts.map +1 -0
  182. package/lib/_models/control-models/dynamobe-data-property-params.js +57 -0
  183. package/lib/_models/control-models/dynamobe-data-property-params.js.map +1 -0
  184. package/lib/_models/control-models/dynamobe-error.d.ts +19 -0
  185. package/lib/_models/control-models/dynamobe-error.d.ts.map +1 -0
  186. package/lib/_models/control-models/dynamobe-error.js +188 -0
  187. package/lib/_models/control-models/dynamobe-error.js.map +1 -0
  188. package/lib/_models/control-models/geo-ip-location.d.ts +26 -0
  189. package/lib/_models/control-models/geo-ip-location.d.ts.map +1 -0
  190. package/lib/_models/control-models/geo-ip-location.js +3 -0
  191. package/lib/_models/control-models/geo-ip-location.js.map +1 -0
  192. package/lib/_models/control-models/location-coordinates.d.ts +5 -0
  193. package/lib/_models/control-models/location-coordinates.d.ts.map +1 -0
  194. package/lib/_models/control-models/location-coordinates.js +3 -0
  195. package/lib/_models/control-models/location-coordinates.js.map +1 -0
  196. package/lib/_models/control-models/random-weight.d.ts +5 -0
  197. package/lib/_models/control-models/random-weight.d.ts.map +1 -0
  198. package/lib/_models/control-models/random-weight.js +3 -0
  199. package/lib/_models/control-models/random-weight.js.map +1 -0
  200. package/lib/_models/control-models/subdivision-collection.d.ts +9 -0
  201. package/lib/_models/control-models/subdivision-collection.d.ts.map +1 -0
  202. package/lib/_models/control-models/subdivision-collection.js +3 -0
  203. package/lib/_models/control-models/subdivision-collection.js.map +1 -0
  204. package/lib/_models/control-models/subdivision-region-data.d.ts +45 -0
  205. package/lib/_models/control-models/subdivision-region-data.d.ts.map +1 -0
  206. package/lib/_models/control-models/subdivision-region-data.js +46 -0
  207. package/lib/_models/control-models/subdivision-region-data.js.map +1 -0
  208. package/lib/_models/control-models/usage-action.d.ts +9 -0
  209. package/lib/_models/control-models/usage-action.d.ts.map +1 -0
  210. package/lib/_models/control-models/usage-action.js +13 -0
  211. package/lib/_models/control-models/usage-action.js.map +1 -0
  212. package/lib/_models/control-models/usage-data.d.ts +14 -0
  213. package/lib/_models/control-models/usage-data.d.ts.map +1 -0
  214. package/lib/_models/control-models/usage-data.js +16 -0
  215. package/lib/_models/control-models/usage-data.js.map +1 -0
  216. package/lib/_models/data-models/custom-data.d.ts +16 -0
  217. package/lib/_models/data-models/custom-data.d.ts.map +1 -0
  218. package/lib/_models/data-models/custom-data.js +28 -0
  219. package/lib/_models/data-models/custom-data.js.map +1 -0
  220. package/lib/_models/data-models/dynamo-custom-data.d.ts +16 -0
  221. package/lib/_models/data-models/dynamo-custom-data.d.ts.map +1 -0
  222. package/lib/_models/data-models/dynamo-custom-data.js +28 -0
  223. package/lib/_models/data-models/dynamo-custom-data.js.map +1 -0
  224. package/lib/_models/data-models/dynamo-metadata.d.ts +17 -0
  225. package/lib/_models/data-models/dynamo-metadata.d.ts.map +1 -0
  226. package/lib/_models/data-models/dynamo-metadata.js +17 -0
  227. package/lib/_models/data-models/dynamo-metadata.js.map +1 -0
  228. package/lib/_models/data-models/dynamo-usage-session.d.ts +34 -0
  229. package/lib/_models/data-models/dynamo-usage-session.d.ts.map +1 -0
  230. package/lib/_models/data-models/dynamo-usage-session.js +53 -0
  231. package/lib/_models/data-models/dynamo-usage-session.js.map +1 -0
  232. package/lib/_models/data-models/metadata.d.ts +17 -0
  233. package/lib/_models/data-models/metadata.d.ts.map +1 -0
  234. package/lib/_models/data-models/metadata.js +17 -0
  235. package/lib/_models/data-models/metadata.js.map +1 -0
  236. package/lib/_models/data-models/usage-session.d.ts +34 -0
  237. package/lib/_models/data-models/usage-session.d.ts.map +1 -0
  238. package/lib/_models/data-models/usage-session.js +53 -0
  239. package/lib/_models/data-models/usage-session.js.map +1 -0
  240. package/lib/_models/index.d.ts +19 -0
  241. package/lib/_models/index.d.ts.map +1 -0
  242. package/lib/_models/index.js +25 -0
  243. package/lib/_models/index.js.map +1 -0
  244. package/lib/_modules/data-models.index.d.ts +3 -0
  245. package/lib/_modules/data-models.index.d.ts.map +1 -0
  246. package/lib/_modules/data-models.index.js +7 -0
  247. package/lib/_modules/data-models.index.js.map +1 -0
  248. package/lib/_modules/data-module.index.d.ts +5 -0
  249. package/lib/_modules/data-module.index.d.ts.map +1 -0
  250. package/lib/_modules/data-module.index.js +9 -0
  251. package/lib/_modules/data-module.index.js.map +1 -0
  252. package/lib/_modules/data-modules.index.d.ts +6 -0
  253. package/lib/_modules/data-modules.index.d.ts.map +1 -0
  254. package/lib/_modules/data-modules.index.js +10 -0
  255. package/lib/_modules/data-modules.index.js.map +1 -0
  256. package/lib/_modules/error-module.index.d.ts +2 -0
  257. package/lib/_modules/error-module.index.d.ts.map +1 -0
  258. package/lib/_modules/error-module.index.js +6 -0
  259. package/lib/_modules/error-module.index.js.map +1 -0
  260. package/lib/_modules/shared-service.index.d.ts +8 -0
  261. package/lib/_modules/shared-service.index.d.ts.map +1 -0
  262. package/lib/_modules/shared-service.index.js +12 -0
  263. package/lib/_modules/shared-service.index.js.map +1 -0
  264. package/lib/_modules/test-module.index.d.ts +3 -0
  265. package/lib/_modules/test-module.index.d.ts.map +1 -0
  266. package/lib/_modules/test-module.index.js +7 -0
  267. package/lib/_modules/test-module.index.js.map +1 -0
  268. package/lib/_modules/usage-module.index.d.ts +6 -0
  269. package/lib/_modules/usage-module.index.d.ts.map +1 -0
  270. package/lib/_modules/usage-module.index.js +10 -0
  271. package/lib/_modules/usage-module.index.js.map +1 -0
  272. package/lib/data-models.d.ts +3 -0
  273. package/lib/data-models.d.ts.map +1 -0
  274. package/lib/data-models.js +7 -0
  275. package/lib/data-models.js.map +1 -0
  276. package/lib/index.d.ts +5 -0
  277. package/lib/index.d.ts.map +1 -0
  278. package/lib/index.js +12 -0
  279. package/lib/index.js.map +1 -0
  280. package/lib/tsconfig.tsbuildinfo +3088 -0
  281. package/package.json +1 -1
  282. package/src/_collections/_constants/country-subdivisions/liberia.json +62 -0
  283. package/src/_collections/_constants/country-subdivisions/libyan-arab-jamahiriya.json +90 -0
  284. package/src/_collections/index.ts +2 -3
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Dynamo_Time = void 0;
4
+ const times_1 = require("../../_constants/times");
5
+ class Dynamo_Time {
6
+ static getAge(birthDate) {
7
+ return this.getYear(+new Date() - +new Date(birthDate));
8
+ }
9
+ static getYear(date) {
10
+ if (typeof date === 'string') {
11
+ date = new Date(date);
12
+ }
13
+ return (+date / times_1.year);
14
+ }
15
+ static getHour(date) {
16
+ if (typeof date === 'string') {
17
+ date = new Date(date);
18
+ }
19
+ return (+date / times_1.hour);
20
+ }
21
+ static getDateByAge(age) {
22
+ return new Date(+new Date() - (times_1.year * age));
23
+ }
24
+ static oneHourAgo() {
25
+ return new Date(+new Date() - times_1.hour);
26
+ }
27
+ static oneDayAgo() {
28
+ return new Date(+new Date() - times_1.day);
29
+ }
30
+ static oneWeekAgo() {
31
+ return new Date(+new Date() - times_1.week);
32
+ }
33
+ static oneMonthAgo() {
34
+ return new Date(+new Date() - times_1.month);
35
+ }
36
+ static oneYearAgo() {
37
+ return new Date(+new Date() - times_1.year);
38
+ }
39
+ }
40
+ exports.Dynamo_Time = Dynamo_Time;
41
+ //# sourceMappingURL=dynamo-time.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-time.js","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-time.ts"],"names":[],"mappings":";;;AACA,kDAAsE;AAEtE,MAAa,WAAW;IAEtB,MAAM,CAAC,MAAM,CAAC,SAAiC;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,IAA4B;QACzC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;SACvB;QACD,OAAO,CAAC,CAAC,IAAI,GAAI,YAAI,CAAC,CAAC;IACzB,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,IAA4B;QACzC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;SACvB;QACD,OAAO,CAAC,CAAC,IAAI,GAAI,YAAI,CAAC,CAAC;IACzB,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,GAAW;QAC7B,OAAO,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,GAAG,CAAC,YAAI,GAAG,GAAG,CAAC,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,CAAC,UAAU;QACf,OAAO,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,GAAG,YAAI,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,SAAS;QACd,OAAO,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,GAAG,WAAG,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,UAAU;QACf,OAAO,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,GAAG,YAAI,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,WAAW;QAChB,OAAO,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,GAAG,aAAK,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,UAAU;QACf,OAAO,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,GAAG,YAAI,CAAC,CAAC;IACtC,CAAC;CACF;AA3CD,kCA2CC"}
@@ -0,0 +1,43 @@
1
+ export declare class Dynamo_Trigonometry {
2
+ /**
3
+ * Befogó
4
+ * a Befogó mérete az átfogó, és a befogóval szemközti szög alapján
5
+ * a szemközti szög értéke opcionális
6
+ * (amennyiben nem adjuk meg, 45 fokos szöggel számolunk)
7
+ * @param c átfogó
8
+ * @param angle a befogó oldallal szemközti szög (fokban)
9
+ * @returns befogó
10
+ */
11
+ static getClamp(c: number, angle?: number): number;
12
+ /**
13
+ * Befogó
14
+ * a Befogó mérete az átfogó és a másik befogó alapján
15
+ * @param a befogó
16
+ * @param c átfogó
17
+ * @returns befogó
18
+ */
19
+ static getClampByClampAndHypotenuse(a: number, c: number): number;
20
+ /**
21
+ * Átfogó
22
+ * az Átfogó mérete a befogók alapján
23
+ * a második befogó értéke opcionális
24
+ * (amennyiben nem adjuk meg, egyenlő szárú háromszöggel számolunk)
25
+ * @param a egyik befogó
26
+ * @param b másik befogó
27
+ * @returns átfogó
28
+ */
29
+ static getHypotenuse(a: number, b?: number): number;
30
+ /**
31
+ * Szög fokmértéket átalakítja radiánsra
32
+ * @param angle szög fok
33
+ * @returns szög radiáns
34
+ */
35
+ static angleToRadians(angle: number): number;
36
+ /**
37
+ * Szög radiáns mértéket átalakítja fokra
38
+ * @param radians szög radiáns
39
+ * @returns szög fok
40
+ */
41
+ static radiansToAngle(radians: number): number;
42
+ }
43
+ //# sourceMappingURL=dynamo-trigonometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-trigonometry.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-trigonometry.ts"],"names":[],"mappings":"AACA,qBAAa,mBAAmB;IAE9B;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM;IAKlD;;;;;;OAMG;IACH,MAAM,CAAC,4BAA4B,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;IAOjE;;;;;;;;OAQG;IACH,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAKnD;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAI5C;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;CAG/C"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Dynamo_Trigonometry = void 0;
4
+ class Dynamo_Trigonometry {
5
+ /**
6
+ * Befogó
7
+ * a Befogó mérete az átfogó, és a befogóval szemközti szög alapján
8
+ * a szemközti szög értéke opcionális
9
+ * (amennyiben nem adjuk meg, 45 fokos szöggel számolunk)
10
+ * @param c átfogó
11
+ * @param angle a befogó oldallal szemközti szög (fokban)
12
+ * @returns befogó
13
+ */
14
+ static getClamp(c, angle) {
15
+ angle = angle !== undefined ? angle : 45;
16
+ return Math.sin(this.angleToRadians(angle)) * c;
17
+ }
18
+ /**
19
+ * Befogó
20
+ * a Befogó mérete az átfogó és a másik befogó alapján
21
+ * @param a befogó
22
+ * @param c átfogó
23
+ * @returns befogó
24
+ */
25
+ static getClampByClampAndHypotenuse(a, c) {
26
+ if (a > c) {
27
+ throw { errorMessage: `getClampByClampAndHypotenuse error hypotenuse is smaller than clamp (a:${a} > c:${c})` };
28
+ }
29
+ return Math.sqrt((c * c) - (a * a));
30
+ }
31
+ /**
32
+ * Átfogó
33
+ * az Átfogó mérete a befogók alapján
34
+ * a második befogó értéke opcionális
35
+ * (amennyiben nem adjuk meg, egyenlő szárú háromszöggel számolunk)
36
+ * @param a egyik befogó
37
+ * @param b másik befogó
38
+ * @returns átfogó
39
+ */
40
+ static getHypotenuse(a, b) {
41
+ b = b !== undefined ? b : a;
42
+ return Math.sqrt((a * a) + (b * b));
43
+ }
44
+ /**
45
+ * Szög fokmértéket átalakítja radiánsra
46
+ * @param angle szög fok
47
+ * @returns szög radiáns
48
+ */
49
+ static angleToRadians(angle) {
50
+ return angle * Math.PI / 180;
51
+ }
52
+ /**
53
+ * Szög radiáns mértéket átalakítja fokra
54
+ * @param radians szög radiáns
55
+ * @returns szög fok
56
+ */
57
+ static radiansToAngle(radians) {
58
+ return radians / Math.PI * 180;
59
+ }
60
+ }
61
+ exports.Dynamo_Trigonometry = Dynamo_Trigonometry;
62
+ //# sourceMappingURL=dynamo-trigonometry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-trigonometry.js","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-trigonometry.ts"],"names":[],"mappings":";;;AACA,MAAa,mBAAmB;IAE9B;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAQ,CAAC,CAAS,EAAE,KAAc;QACvC,KAAK,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;IAClD,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,4BAA4B,CAAC,CAAS,EAAE,CAAS;QACtD,IAAI,CAAC,GAAG,CAAC,EAAE;YACT,MAAM,EAAE,YAAY,EAAE,0EAA0E,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;SACjH;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,aAAa,CAAC,CAAS,EAAE,CAAU;QACxC,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,KAAa;QACjC,OAAO,KAAK,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,OAAe;QACnC,OAAO,OAAO,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;IACjC,CAAC;CACF;AA7DD,kDA6DC"}
@@ -0,0 +1,6 @@
1
+ import { LocationCoordinates } from '../../_models/control-models/location-coordinates';
2
+ export declare class Location {
3
+ static getDistanceInKilometres(from: LocationCoordinates, to: LocationCoordinates): number;
4
+ static getLocationDegByKilometers(latiOrLong: 'latitude' | 'longitude', distanceInKm: number, latitude?: number): number;
5
+ }
6
+ //# sourceMappingURL=location.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/location.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAGxF,qBAAa,QAAQ;IAEnB,MAAM,CAAC,uBAAuB,CAC5B,IAAI,EAAE,mBAAmB,EACzB,EAAE,EAAE,mBAAmB,GACtB,MAAM;IAgBT,MAAM,CAAC,0BAA0B,CAAC,UAAU,EAAE,UAAU,GAAG,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM;CAiBzH"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Location = void 0;
4
+ const dynamo_error_1 = require("../../_models/control-models/dynamo-error");
5
+ const trigonometry_1 = require("./trigonometry");
6
+ class Location {
7
+ static getDistanceInKilometres(from, to) {
8
+ const R = 6371; // kilometres
9
+ const φ1 = trigonometry_1.Trigonometry.angleToRadians(from.latitude);
10
+ const φ2 = trigonometry_1.Trigonometry.angleToRadians(to.latitude);
11
+ const Δφ = trigonometry_1.Trigonometry.angleToRadians(to.latitude - from.latitude);
12
+ const Δλ = trigonometry_1.Trigonometry.angleToRadians(to.longitude - from.longitude);
13
+ const a = Math.sin(Δφ / 2) * Math.sin(Δφ / 2) +
14
+ Math.cos(φ1) * Math.cos(φ2) *
15
+ Math.sin(Δλ / 2) * Math.sin(Δλ / 2);
16
+ const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
17
+ return R * c;
18
+ }
19
+ static getLocationDegByKilometers(latiOrLong, distanceInKm, latitude) {
20
+ if (latiOrLong === 'latitude') {
21
+ return distanceInKm / 110.574;
22
+ }
23
+ else {
24
+ if (latitude) {
25
+ return distanceInKm / (Math.cos(trigonometry_1.Trigonometry.angleToRadians(latitude)) * 111.320);
26
+ }
27
+ else {
28
+ throw new dynamo_error_1.Dynamo_Error({
29
+ status: 417,
30
+ errorCode: 'FSM-DSS-505',
31
+ addECToUserMsg: true,
32
+ message: `When using getLocationDegByKilometers for longitude, you need to give latitude! (latiOrLong: ${latiOrLong}, distanceInKm: ${distanceInKm}, latitude: ${latitude})`,
33
+ userMessage: `We encountered an uncought BackEnd Error, please contact the responsible development team.`
34
+ });
35
+ }
36
+ }
37
+ }
38
+ }
39
+ exports.Location = Location;
40
+ //# sourceMappingURL=location.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location.js","sourceRoot":"","sources":["../../../src/_collections/_tools/location.ts"],"names":[],"mappings":";;;AACA,4EAAyE;AAEzE,iDAA8C;AAE9C,MAAa,QAAQ;IAEnB,MAAM,CAAC,uBAAuB,CAC5B,IAAyB,EACzB,EAAuB;QAGvB,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,aAAa;QAC7B,MAAM,EAAE,GAAG,2BAAY,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACtD,MAAM,EAAE,GAAG,2BAAY,CAAC,cAAc,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;QACpD,MAAM,EAAE,GAAG,2BAAY,CAAC,cAAc,CAAC,EAAE,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpE,MAAM,EAAE,GAAG,2BAAY,CAAC,cAAc,CAAC,EAAE,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;QAEtE,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;YACnC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC3B,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QAC9C,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEzD,OAAO,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;IAED,MAAM,CAAC,0BAA0B,CAAC,UAAoC,EAAE,YAAoB,EAAE,QAAiB;QAC7G,IAAI,UAAU,KAAK,UAAU,EAAE;YAC7B,OAAO,YAAY,GAAG,OAAO,CAAC;SAC/B;aAAM;YACL,IAAI,QAAQ,EAAE;gBACZ,OAAO,YAAY,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,2BAAY,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC;aACnF;iBAAM;gBACL,MAAM,IAAI,2BAAY,CAAC;oBACrB,MAAM,EAAE,GAAG;oBACX,SAAS,EAAE,aAAa;oBACxB,cAAc,EAAE,IAAI;oBACpB,OAAO,EAAE,gGAAgG,UAAU,mBAAmB,YAAY,eAAe,QAAQ,GAAG;oBAC5K,WAAW,EAAE,4FAA4F;iBAC1G,CAAC,CAAC;aACJ;SACF;IACH,CAAC;CACF;AAtCD,4BAsCC"}
@@ -0,0 +1,10 @@
1
+ import { LogStyle } from '../../_enums/log-style.enum';
2
+ export declare class Log {
3
+ static setLogStyle(styles: LogStyle[]): void;
4
+ static resetLogStyle(): void;
5
+ static logStyle(input: string, styles: LogStyle[], dontReset?: boolean): string;
6
+ static logSuccess(message: string, ...optionalParams: any[]): void;
7
+ static logError(message: string, ...optionalParams: any[]): void;
8
+ static logWarning(message: string, ...optionalParams: any[]): void;
9
+ }
10
+ //# sourceMappingURL=log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/log.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,qBAAa,GAAG;IAEd,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI;IAO5C,MAAM,CAAC,aAAa,IAAI,IAAI;IAI5B,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM;IAY/E,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAQlE,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAQhE,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;CAOnE"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Log = void 0;
4
+ const log_style_enum_1 = require("../../_enums/log-style.enum");
5
+ class Log {
6
+ static setLogStyle(styles) {
7
+ let styleSets = '';
8
+ styles.forEach((style) => {
9
+ styleSets += style;
10
+ });
11
+ console.log(styleSets);
12
+ }
13
+ static resetLogStyle() {
14
+ console.log(log_style_enum_1.LogStyle.reset);
15
+ }
16
+ static logStyle(input, styles, dontReset) {
17
+ let result = '';
18
+ styles.forEach((style) => {
19
+ result += style;
20
+ });
21
+ result += input;
22
+ if (!dontReset) {
23
+ result += log_style_enum_1.LogStyle.reset;
24
+ }
25
+ return result;
26
+ }
27
+ static logSuccess(message, ...optionalParams) {
28
+ if (0 < optionalParams.length) {
29
+ console.error(`${log_style_enum_1.LogStyle.green}${log_style_enum_1.LogStyle.bright}${message}`, ...optionalParams, log_style_enum_1.LogStyle.reset);
30
+ }
31
+ else {
32
+ console.error(`${log_style_enum_1.LogStyle.green}${log_style_enum_1.LogStyle.bright}${message}${log_style_enum_1.LogStyle.reset}`);
33
+ }
34
+ }
35
+ static logError(message, ...optionalParams) {
36
+ if (0 < optionalParams.length) {
37
+ console.error(`${log_style_enum_1.LogStyle.red}${log_style_enum_1.LogStyle.bright}${message}`, ...optionalParams, log_style_enum_1.LogStyle.reset);
38
+ }
39
+ else {
40
+ console.error(`${log_style_enum_1.LogStyle.red}${log_style_enum_1.LogStyle.bright}${message}${log_style_enum_1.LogStyle.reset}`);
41
+ }
42
+ }
43
+ static logWarning(message, ...optionalParams) {
44
+ if (0 < optionalParams.length) {
45
+ console.warn(`${log_style_enum_1.LogStyle.yellow}${log_style_enum_1.LogStyle.bright}${message}`, ...optionalParams, log_style_enum_1.LogStyle.reset);
46
+ }
47
+ else {
48
+ console.warn(`${log_style_enum_1.LogStyle.yellow}${log_style_enum_1.LogStyle.bright}${message}${log_style_enum_1.LogStyle.reset}`);
49
+ }
50
+ }
51
+ }
52
+ exports.Log = Log;
53
+ //# sourceMappingURL=log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.js","sourceRoot":"","sources":["../../../src/_collections/_tools/log.ts"],"names":[],"mappings":";;;AACA,gEAAuD;AAEvD,MAAa,GAAG;IAEd,MAAM,CAAC,WAAW,CAAC,MAAkB;QACnC,IAAI,SAAS,GAAG,EAAE,CAAC;QACnB,MAAM,CAAC,OAAO,CAAC,CAAC,KAAe,EAAE,EAAE;YACjC,SAAS,IAAI,KAAK,CAAC;QACrB,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACzB,CAAC;IACD,MAAM,CAAC,aAAa;QAClB,OAAO,CAAC,GAAG,CAAC,yBAAQ,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,KAAa,EAAE,MAAkB,EAAE,SAAmB;QACpE,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,MAAM,CAAC,OAAO,CAAC,CAAC,KAAe,EAAE,EAAE;YACjC,MAAM,IAAI,KAAK,CAAC;QAClB,CAAC,CAAC,CAAC;QACH,MAAM,IAAI,KAAK,CAAC;QAChB,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,yBAAQ,CAAC,KAAK,CAAC;SAC1B;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,OAAe,EAAE,GAAG,cAAqB;QACzD,IAAI,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE;YAC7B,OAAO,CAAC,KAAK,CAAC,GAAG,yBAAQ,CAAC,KAAK,GAAG,yBAAQ,CAAC,MAAM,GAAG,OAAO,EAAE,EAAE,GAAG,cAAc,EAAE,yBAAQ,CAAC,KAAK,CAAC,CAAC;SACnG;aAAM;YACL,OAAO,CAAC,KAAK,CAAC,GAAG,yBAAQ,CAAC,KAAK,GAAG,yBAAQ,CAAC,MAAM,GAAG,OAAO,GAAG,yBAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;SACjF;IACH,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,OAAe,EAAE,GAAG,cAAqB;QACvD,IAAI,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE;YAC7B,OAAO,CAAC,KAAK,CAAC,GAAG,yBAAQ,CAAC,GAAG,GAAG,yBAAQ,CAAC,MAAM,GAAG,OAAO,EAAE,EAAE,GAAG,cAAc,EAAE,yBAAQ,CAAC,KAAK,CAAC,CAAC;SACjG;aAAM;YACL,OAAO,CAAC,KAAK,CAAC,GAAG,yBAAQ,CAAC,GAAG,GAAG,yBAAQ,CAAC,MAAM,GAAG,OAAO,GAAG,yBAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;SAC/E;IACH,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,OAAe,EAAE,GAAG,cAAqB;QACzD,IAAI,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE;YAC7B,OAAO,CAAC,IAAI,CAAC,GAAG,yBAAQ,CAAC,MAAM,GAAG,yBAAQ,CAAC,MAAM,GAAG,OAAO,EAAE,EAAE,GAAG,cAAc,EAAE,yBAAQ,CAAC,KAAK,CAAC,CAAC;SACnG;aAAM;YACL,OAAO,CAAC,IAAI,CAAC,GAAG,yBAAQ,CAAC,MAAM,GAAG,yBAAQ,CAAC,MAAM,GAAG,OAAO,GAAG,yBAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;SACjF;IACH,CAAC;CACF;AAhDD,kBAgDC"}
@@ -0,0 +1,8 @@
1
+ import { RandomWeight } from '../../_models/control-models/random-weight';
2
+ export declare class Random {
3
+ static getRandomWeightedInt(min: number, max: number, weights: RandomWeight<number>[]): number;
4
+ static getRandomInt(min: number, max: number): number;
5
+ static getRandomListElement<T>(list: T[]): T;
6
+ static getRandomWeighted<T>(weights: RandomWeight<T>[]): T;
7
+ }
8
+ //# sourceMappingURL=random.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/random.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAE1E,qBAAa,MAAM;IACjB,MAAM,CAAC,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM;IAyB9F,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAIrD,MAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC;IAQ5C,MAAM,CAAC,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;CAsB3D"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Random = void 0;
4
+ class Random {
5
+ static getRandomWeightedInt(min, max, weights) {
6
+ weights = weights.sort((a, b) => b.chance - a.chance);
7
+ let weightChanceSum = 0;
8
+ weights.forEach(weight => weightChanceSum += weight.chance);
9
+ if (1 < weightChanceSum) {
10
+ weights.forEach(weights => weights.chance = weights.chance / weightChanceSum);
11
+ }
12
+ const randomChance = Math.random();
13
+ let result;
14
+ let chancer = 0;
15
+ for (let i = 0; i < weights.length && result === undefined; i++) {
16
+ chancer += weights[i].chance;
17
+ if (randomChance < chancer) {
18
+ result = weights[i].result;
19
+ }
20
+ }
21
+ if (result !== undefined) {
22
+ return result;
23
+ }
24
+ else {
25
+ return this.getRandomInt(min, max);
26
+ }
27
+ }
28
+ static getRandomInt(min, max) {
29
+ return min + Math.round((max - min) * Math.random());
30
+ }
31
+ static getRandomListElement(list) {
32
+ if (0 < list.length) {
33
+ return list[this.getRandomInt(0, list.length - 1)];
34
+ }
35
+ else {
36
+ return null;
37
+ }
38
+ }
39
+ static getRandomWeighted(weights) {
40
+ if (!(weights === null || weights === void 0 ? void 0 : weights.length)) {
41
+ return null;
42
+ }
43
+ weights = weights.sort((a, b) => b.chance - a.chance);
44
+ let weightChanceSum = 0;
45
+ weights.forEach(weight => weightChanceSum += weight.chance);
46
+ weights.forEach(weights => weights.chance = weights.chance / weightChanceSum);
47
+ const randomChance = Math.random();
48
+ let result;
49
+ let chancer = 0;
50
+ for (let i = 0; i < weights.length && result === undefined; i++) {
51
+ chancer += weights[i].chance;
52
+ if (randomChance < chancer) {
53
+ result = weights[i].result;
54
+ }
55
+ }
56
+ return result;
57
+ }
58
+ }
59
+ exports.Random = Random;
60
+ //# sourceMappingURL=random.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random.js","sourceRoot":"","sources":["../../../src/_collections/_tools/random.ts"],"names":[],"mappings":";;;AAGA,MAAa,MAAM;IACjB,MAAM,CAAC,oBAAoB,CAAC,GAAW,EAAE,GAAW,EAAE,OAA+B;QACnF,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,eAAe,GAAG,CAAC,CAAC;QACxB,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,eAAe,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,GAAG,eAAe,EAAE;YACvB,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,eAAe,CAAC,CAAC;SAC/E;QAED,MAAM,YAAY,GAAW,IAAI,CAAC,MAAM,EAAE,CAAC;QAC3C,IAAI,MAAc,CAAC;QACnB,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC,EAAE,EAAE;YAC/D,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YAC7B,IAAI,YAAY,GAAG,OAAO,EAAE;gBAC1B,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;aAC5B;SACF;QAED,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,OAAO,MAAM,CAAC;SACf;aAAM;YACL,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;SACpC;IACH,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,GAAW,EAAE,GAAW;QAC1C,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,oBAAoB,CAAI,IAAS;QACtC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE;YACnB,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;SACpD;aAAM;YACL,OAAO,IAAI,CAAC;SACb;IACH,CAAC;IAED,MAAM,CAAC,iBAAiB,CAAI,OAA0B;QACpD,IAAI,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAA,EAAE;YACpB,OAAO,IAAI,CAAC;SACb;QAED,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,eAAe,GAAG,CAAC,CAAC;QACxB,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,eAAe,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;QAC5D,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,eAAe,CAAC,CAAC;QAE9E,MAAM,YAAY,GAAW,IAAI,CAAC,MAAM,EAAE,CAAC;QAC3C,IAAI,MAAS,CAAC;QACd,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC,EAAE,EAAE;YAC/D,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YAC7B,IAAI,YAAY,GAAG,OAAO,EAAE;gBAC1B,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;aAC5B;SACF;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AA5DD,wBA4DC"}
@@ -0,0 +1,12 @@
1
+ import { Region } from '../../_enums/region.enum';
2
+ import { CountryISO, SubdivisionCollection } from '../_constants/country-iso';
3
+ import { CountryPhoneCode } from '../_constants/country-phone-code';
4
+ export declare class Dynamo_Regions {
5
+ static getAllCountryISO(): CountryISO[];
6
+ static getAllPhoneCodes(): CountryPhoneCode[];
7
+ static getSubdivisionCollection(): SubdivisionCollection;
8
+ static iso1ToCountryIso(iso1: string): CountryISO;
9
+ static iso1ToRegion(iso1: string): Region;
10
+ static iso1ToPhoneCode(iso1: string): CountryPhoneCode;
11
+ }
12
+ //# sourceMappingURL=region-translator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"region-translator.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/region-translator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,qBAAa,cAAc;IAEzB,MAAM,CAAC,gBAAgB,IAAI,UAAU,EAAE;IAIvC,MAAM,CAAC,gBAAgB,IAAI,gBAAgB,EAAE;IAI7C,MAAM,CAAC,wBAAwB,IAAI,qBAAqB;IAIxD,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;IASjD,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IASzC,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB;CAQvD"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Dynamo_Regions = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const ISOs = tslib_1.__importStar(require("../_constants/country-codes-ISO-3166.json"));
6
+ const PhoneCodes = tslib_1.__importStar(require("../_constants/country-phone-codes.json"));
7
+ const Subdivisions = tslib_1.__importStar(require("../_constants/country-sub-divisions-ISO-3166.json"));
8
+ const _models_1 = require("../../_models");
9
+ class Dynamo_Regions {
10
+ static getAllCountryISO() {
11
+ return ISOs;
12
+ }
13
+ static getAllPhoneCodes() {
14
+ return PhoneCodes;
15
+ }
16
+ static getSubdivisionCollection() {
17
+ return Subdivisions;
18
+ }
19
+ static iso1ToCountryIso(iso1) {
20
+ const country = ISOs.find(iso => iso.iso1 == iso1);
21
+ if (!country) {
22
+ throw new _models_1.Dynamo_Error({ message: `Cannot find ISO-3166 code for this: ${iso1}` });
23
+ }
24
+ else {
25
+ return country;
26
+ }
27
+ }
28
+ static iso1ToRegion(iso1) {
29
+ const region = ISOs.find(iso => iso.iso1 == iso1).region;
30
+ if (!region) {
31
+ throw new _models_1.Dynamo_Error({ message: `Cannot find ISO-3166 code for this: ${iso1}` });
32
+ }
33
+ else {
34
+ return region;
35
+ }
36
+ }
37
+ static iso1ToPhoneCode(iso1) {
38
+ const phoneCode = PhoneCodes.find(code => code.iso == iso1);
39
+ if (!phoneCode) {
40
+ throw new _models_1.Dynamo_Error({ message: `Cannot find ISO-3166 code for this: ${iso1}` });
41
+ }
42
+ else {
43
+ return phoneCode;
44
+ }
45
+ }
46
+ }
47
+ exports.Dynamo_Regions = Dynamo_Regions;
48
+ //# sourceMappingURL=region-translator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"region-translator.js","sourceRoot":"","sources":["../../../src/_collections/_tools/region-translator.ts"],"names":[],"mappings":";;;;AACA,wFAAkE;AAClE,2FAAqE;AACrE,wGAAkF;AAElF,2CAA6C;AAI7C,MAAa,cAAc;IAEzB,MAAM,CAAC,gBAAgB;QACrB,OAAO,IAAoB,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,gBAAgB;QACrB,OAAO,UAAgC,CAAC;IAC1C,CAAC;IAED,MAAM,CAAC,wBAAwB;QAC7B,OAAO,YAAqC,CAAC;IAC/C,CAAC;IAED,MAAM,CAAC,gBAAgB,CAAC,IAAY;QAClC,MAAM,OAAO,GAAgB,IAAqB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;QACjF,IAAI,CAAC,OAAO,EAAE;YACZ,MAAM,IAAI,sBAAY,CAAC,EAAE,OAAO,EAAE,uCAAuC,IAAI,EAAE,EAAE,CAAC,CAAC;SACpF;aAAM;YACL,OAAO,OAAO,CAAC;SAChB;IACH,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,IAAY;QAC9B,MAAM,MAAM,GAAY,IAAqB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC;QACnF,IAAI,CAAC,MAAM,EAAE;YACX,MAAM,IAAI,sBAAY,CAAC,EAAE,OAAO,EAAE,uCAAuC,IAAI,EAAE,EAAE,CAAC,CAAC;SACpF;aAAM;YACL,OAAO,MAAM,CAAC;SACf;IACH,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,IAAY;QACjC,MAAM,SAAS,GAAsB,UAAiC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC;QACtG,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,sBAAY,CAAC,EAAE,OAAO,EAAE,uCAAuC,IAAI,EAAE,EAAE,CAAC,CAAC;SACpF;aAAM;YACL,OAAO,SAAS,CAAC;SAClB;IACH,CAAC;CACF;AAxCD,wCAwCC"}
@@ -0,0 +1,8 @@
1
+ export declare class RoundList {
2
+ static getOutboundedIndex(listLength: number, outboundIndex: number): number;
3
+ static getIndexOpposite(length: number, oppositeOf: number): number;
4
+ static getListIndex<T>(list: T[], outboundIndex: number): T;
5
+ static getListOpposite<T>(list: T[], oppositeOf: T): T;
6
+ static getLast<T>(list: T[]): T;
7
+ }
8
+ //# sourceMappingURL=round-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"round-list.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/round-list.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IACpB,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM;IAgB5E,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM;IAOnE,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,aAAa,EAAE,MAAM,GAAG,CAAC;IAI3D,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;IAItD,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC;CAOhC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RoundList = void 0;
4
+ class RoundList {
5
+ static getOutboundedIndex(listLength, outboundIndex) {
6
+ if (!(0 < listLength)) {
7
+ throw new Error('roundListPlusIndex failed. list is empty!');
8
+ }
9
+ if (outboundIndex < 0) {
10
+ outboundIndex = outboundIndex % listLength;
11
+ outboundIndex = listLength + outboundIndex;
12
+ }
13
+ if (listLength <= outboundIndex) {
14
+ outboundIndex = outboundIndex % listLength;
15
+ }
16
+ return outboundIndex;
17
+ }
18
+ static getIndexOpposite(length, oppositeOf) {
19
+ const plusIndex = oppositeOf + Math.round(length / 2);
20
+ const res = this.getOutboundedIndex(length, plusIndex);
21
+ return res;
22
+ }
23
+ static getListIndex(list, outboundIndex) {
24
+ return list[this.getOutboundedIndex(list.length, outboundIndex)];
25
+ }
26
+ static getListOpposite(list, oppositeOf) {
27
+ return list[this.getIndexOpposite(list.length, list.indexOf(oppositeOf))];
28
+ }
29
+ static getLast(list) {
30
+ if (0 < list.length) {
31
+ return list[list.length - 1];
32
+ }
33
+ else {
34
+ return null;
35
+ }
36
+ }
37
+ }
38
+ exports.RoundList = RoundList;
39
+ //# sourceMappingURL=round-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"round-list.js","sourceRoot":"","sources":["../../../src/_collections/_tools/round-list.ts"],"names":[],"mappings":";;;AAEA,MAAa,SAAS;IACpB,MAAM,CAAC,kBAAkB,CAAC,UAAkB,EAAE,aAAqB;QACjE,IAAI,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;SAC9D;QAED,IAAI,aAAa,GAAG,CAAC,EAAE;YACrB,aAAa,GAAG,aAAa,GAAG,UAAU,CAAC;YAC3C,aAAa,GAAG,UAAU,GAAG,aAAa,CAAC;SAC5C;QACD,IAAI,UAAU,IAAI,aAAa,EAAE;YAC/B,aAAa,GAAG,aAAa,GAAG,UAAU,CAAC;SAC5C;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,gBAAgB,CAAC,MAAc,EAAE,UAAkB;QACxD,MAAM,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACtD,MAAM,GAAG,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAEvD,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,CAAC,YAAY,CAAI,IAAS,EAAE,aAAqB;QACrD,OAAO,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IACnE,CAAC;IAED,MAAM,CAAC,eAAe,CAAI,IAAS,EAAE,UAAa;QAChD,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED,MAAM,CAAC,OAAO,CAAI,IAAS;QACzB,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE;YACnB,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;SAC9B;aAAM;YACL,OAAO,IAAI,CAAC;SACb;IACH,CAAC;CACF;AAvCD,8BAuCC"}
@@ -0,0 +1,12 @@
1
+ export declare class Time {
2
+ static getAge(birthDate: Date | number | string): number;
3
+ static getYear(date: Date | number | string): number;
4
+ static getHour(date: Date | number | string): number;
5
+ static getDateByAge(age: number): Date;
6
+ static oneHourAgo(): Date;
7
+ static oneDayAgo(): Date;
8
+ static oneWeekAgo(): Date;
9
+ static oneMonthAgo(): Date;
10
+ static oneYearAgo(): Date;
11
+ }
12
+ //# sourceMappingURL=time.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/time.ts"],"names":[],"mappings":"AAGA,qBAAa,IAAI;IAEf,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM;IAI/C,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM;IAO3C,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM;IAO3C,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM;IAI/B,MAAM,CAAC,UAAU,IAAI,IAAI;IAIzB,MAAM,CAAC,SAAS,IAAI,IAAI;IAIxB,MAAM,CAAC,UAAU,IAAI,IAAI;IAIzB,MAAM,CAAC,WAAW,IAAI,IAAI;IAI1B,MAAM,CAAC,UAAU,IAAI,IAAI;CAG1B"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Time = void 0;
4
+ const times_1 = require("../../_constants/times");
5
+ class Time {
6
+ static getAge(birthDate) {
7
+ return this.getYear(+new Date() - +new Date(birthDate));
8
+ }
9
+ static getYear(date) {
10
+ if (typeof date === 'string') {
11
+ date = new Date(date);
12
+ }
13
+ return (+date / times_1.year);
14
+ }
15
+ static getHour(date) {
16
+ if (typeof date === 'string') {
17
+ date = new Date(date);
18
+ }
19
+ return (+date / times_1.hour);
20
+ }
21
+ static getDateByAge(age) {
22
+ return new Date(+new Date() - (times_1.year * age));
23
+ }
24
+ static oneHourAgo() {
25
+ return new Date(+new Date() - times_1.hour);
26
+ }
27
+ static oneDayAgo() {
28
+ return new Date(+new Date() - times_1.day);
29
+ }
30
+ static oneWeekAgo() {
31
+ return new Date(+new Date() - times_1.week);
32
+ }
33
+ static oneMonthAgo() {
34
+ return new Date(+new Date() - times_1.month);
35
+ }
36
+ static oneYearAgo() {
37
+ return new Date(+new Date() - times_1.year);
38
+ }
39
+ }
40
+ exports.Time = Time;
41
+ //# sourceMappingURL=time.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time.js","sourceRoot":"","sources":["../../../src/_collections/_tools/time.ts"],"names":[],"mappings":";;;AACA,kDAAsE;AAEtE,MAAa,IAAI;IAEf,MAAM,CAAC,MAAM,CAAC,SAAiC;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,IAA4B;QACzC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;SACvB;QACD,OAAO,CAAC,CAAC,IAAI,GAAI,YAAI,CAAC,CAAC;IACzB,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,IAA4B;QACzC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;SACvB;QACD,OAAO,CAAC,CAAC,IAAI,GAAI,YAAI,CAAC,CAAC;IACzB,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,GAAW;QAC7B,OAAO,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,GAAG,CAAC,YAAI,GAAG,GAAG,CAAC,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,CAAC,UAAU;QACf,OAAO,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,GAAG,YAAI,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,SAAS;QACd,OAAO,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,GAAG,WAAG,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,UAAU;QACf,OAAO,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,GAAG,YAAI,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,WAAW;QAChB,OAAO,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,GAAG,aAAK,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,UAAU;QACf,OAAO,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,GAAG,YAAI,CAAC,CAAC;IACtC,CAAC;CACF;AA3CD,oBA2CC"}
@@ -0,0 +1,43 @@
1
+ export declare class Trigonometry {
2
+ /**
3
+ * Befogó
4
+ * a Befogó mérete az átfogó, és a befogóval szemközti szög alapján
5
+ * a szemközti szög értéke opcionális
6
+ * (amennyiben nem adjuk meg, 45 fokos szöggel számolunk)
7
+ * @param c átfogó
8
+ * @param angle a befogó oldallal szemközti szög (fokban)
9
+ * @returns befogó
10
+ */
11
+ static getClamp(c: number, angle?: number): number;
12
+ /**
13
+ * Befogó
14
+ * a Befogó mérete az átfogó és a másik befogó alapján
15
+ * @param a befogó
16
+ * @param c átfogó
17
+ * @returns befogó
18
+ */
19
+ static getClampByClampAndHypotenuse(a: number, c: number): number;
20
+ /**
21
+ * Átfogó
22
+ * az Átfogó mérete a befogók alapján
23
+ * a második befogó értéke opcionális
24
+ * (amennyiben nem adjuk meg, egyenlő szárú háromszöggel számolunk)
25
+ * @param a egyik befogó
26
+ * @param b másik befogó
27
+ * @returns átfogó
28
+ */
29
+ static getHypotenuse(a: number, b?: number): number;
30
+ /**
31
+ * Szög fokmértéket átalakítja radiánsra
32
+ * @param angle szög fok
33
+ * @returns szög radiáns
34
+ */
35
+ static angleToRadians(angle: number): number;
36
+ /**
37
+ * Szög radiáns mértéket átalakítja fokra
38
+ * @param radians szög radiáns
39
+ * @returns szög fok
40
+ */
41
+ static radiansToAngle(radians: number): number;
42
+ }
43
+ //# sourceMappingURL=trigonometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trigonometry.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/trigonometry.ts"],"names":[],"mappings":"AACA,qBAAa,YAAY;IAEvB;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM;IAKlD;;;;;;OAMG;IACH,MAAM,CAAC,4BAA4B,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;IAOjE;;;;;;;;OAQG;IACH,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAKnD;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAI5C;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;CAG/C"}