@e1011/es-kit 1.1.0 → 1.1.1

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 (111) hide show
  1. package/dist/hooks/esm/index.css +55 -55
  2. package/dist/hooks/index.css +55 -55
  3. package/dist/lib/cjs/_virtual/_rollupPluginBabelHelpers.js +1 -1
  4. package/dist/lib/cjs/node_modules/uuid/dist/esm-browser/native.js +2 -0
  5. package/dist/lib/cjs/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
  6. package/dist/lib/cjs/node_modules/uuid/dist/esm-browser/rng.js +2 -0
  7. package/dist/lib/cjs/node_modules/uuid/dist/esm-browser/rng.js.map +1 -0
  8. package/dist/lib/cjs/node_modules/uuid/dist/esm-browser/stringify.js +2 -0
  9. package/dist/lib/cjs/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -0
  10. package/dist/lib/cjs/node_modules/uuid/dist/esm-browser/v4.js +2 -0
  11. package/dist/lib/cjs/node_modules/uuid/dist/esm-browser/v4.js.map +1 -0
  12. package/dist/lib/cjs/src/core/utils/appState/peregrineMQ/index.js +2 -0
  13. package/dist/lib/cjs/src/core/utils/appState/peregrineMQ/index.js.map +1 -0
  14. package/dist/lib/cjs/src/core/utils/appState/peregrineMQ/peregrineMQ.js +2 -0
  15. package/dist/lib/cjs/src/core/utils/appState/peregrineMQ/peregrineMQ.js.map +1 -0
  16. package/dist/lib/cjs/src/core/utils/appState/stateMachine/tiny-state-machine.base.js +2 -0
  17. package/dist/lib/cjs/src/core/utils/appState/stateMachine/tiny-state-machine.base.js.map +1 -0
  18. package/dist/lib/cjs/src/core/utils/appState/store/store.vanillajs.js +1 -1
  19. package/dist/lib/cjs/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  20. package/dist/lib/cjs/src/core/utils/appState/store/useStore.react.js.map +1 -1
  21. package/dist/lib/cjs/src/core/utils/helpers/other.js +1 -1
  22. package/dist/lib/cjs/src/core/utils/helpers/other.js.map +1 -1
  23. package/dist/lib/cjs/src/index.js +1 -1
  24. package/dist/lib/esm/_virtual/_rollupPluginBabelHelpers.js +1 -1
  25. package/dist/lib/esm/node_modules/uuid/dist/esm-browser/native.js +2 -0
  26. package/dist/lib/esm/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
  27. package/dist/lib/esm/node_modules/uuid/dist/esm-browser/rng.js +2 -0
  28. package/dist/lib/esm/node_modules/uuid/dist/esm-browser/rng.js.map +1 -0
  29. package/dist/lib/esm/node_modules/uuid/dist/esm-browser/stringify.js +2 -0
  30. package/dist/lib/esm/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -0
  31. package/dist/lib/esm/node_modules/uuid/dist/esm-browser/v4.js +2 -0
  32. package/dist/lib/esm/node_modules/uuid/dist/esm-browser/v4.js.map +1 -0
  33. package/dist/lib/esm/src/core/utils/appState/peregrineMQ/index.js +2 -0
  34. package/dist/lib/esm/src/core/utils/appState/peregrineMQ/index.js.map +1 -0
  35. package/dist/lib/esm/src/core/utils/appState/peregrineMQ/peregrineMQ.js +2 -0
  36. package/dist/lib/esm/src/core/utils/appState/peregrineMQ/peregrineMQ.js.map +1 -0
  37. package/dist/lib/esm/src/core/utils/appState/stateMachine/tiny-state-machine.base.js +2 -0
  38. package/dist/lib/esm/src/core/utils/appState/stateMachine/tiny-state-machine.base.js.map +1 -0
  39. package/dist/lib/esm/src/core/utils/appState/store/store.vanillajs.js +1 -1
  40. package/dist/lib/esm/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  41. package/dist/lib/esm/src/core/utils/appState/store/useStore.react.js.map +1 -1
  42. package/dist/lib/esm/src/core/utils/helpers/other.js +1 -1
  43. package/dist/lib/esm/src/core/utils/helpers/other.js.map +1 -1
  44. package/dist/lib/esm/src/index.js +1 -1
  45. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  46. package/dist/types/src/core/utils/appState/peregrineMQ/index.d.ts +2 -1
  47. package/dist/types/src/core/utils/appState/peregrineMQ/index.d.ts.map +1 -1
  48. package/dist/types/src/core/utils/appState/peregrineMQ/peregrineMQ.d.ts +8 -8
  49. package/dist/types/src/core/utils/appState/peregrineMQ/peregrineMQ.d.ts.map +1 -1
  50. package/dist/types/src/core/utils/appState/peregrineMQ/peregrineMQ.stories.d.ts.map +1 -1
  51. package/dist/types/src/core/utils/appState/peregrineMQ/peregrineMQ.types.d.ts +38 -45
  52. package/dist/types/src/core/utils/appState/peregrineMQ/peregrineMQ.types.d.ts.map +1 -1
  53. package/dist/types/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.d.ts +10 -0
  54. package/dist/types/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.d.ts.map +1 -0
  55. package/dist/types/src/core/utils/appState/stateMachine/index.d.ts +2 -0
  56. package/dist/types/src/core/utils/appState/stateMachine/index.d.ts.map +1 -0
  57. package/dist/types/src/core/utils/appState/stateMachine/tiny-state-machine.base.d.ts +7 -7
  58. package/dist/types/src/core/utils/appState/stateMachine/tiny-state-machine.base.d.ts.map +1 -1
  59. package/dist/types/src/core/utils/appState/store/asyncFunc.spec.d.ts +2 -0
  60. package/dist/types/src/core/utils/appState/store/asyncFunc.spec.d.ts.map +1 -0
  61. package/dist/types/src/core/utils/appState/store/store.stories.d.ts.map +1 -1
  62. package/dist/types/src/core/utils/appState/store/store.vanillajs.d.ts.map +1 -1
  63. package/dist/types/src/core/utils/helpers/other.d.ts +2 -0
  64. package/dist/types/src/core/utils/helpers/other.d.ts.map +1 -1
  65. package/dist/types/src/core/utils/index.d.ts +2 -0
  66. package/dist/types/src/core/utils/index.d.ts.map +1 -1
  67. package/dist/utils/_virtual/_rollupPluginBabelHelpers.js +1 -1
  68. package/dist/utils/esm/_virtual/_rollupPluginBabelHelpers.js +1 -1
  69. package/dist/utils/esm/index.css +55 -55
  70. package/dist/utils/esm/node_modules/uuid/dist/esm-browser/native.js +2 -0
  71. package/dist/utils/esm/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
  72. package/dist/utils/esm/node_modules/uuid/dist/esm-browser/rng.js +2 -0
  73. package/dist/utils/esm/node_modules/uuid/dist/esm-browser/rng.js.map +1 -0
  74. package/dist/utils/esm/node_modules/uuid/dist/esm-browser/stringify.js +2 -0
  75. package/dist/utils/esm/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -0
  76. package/dist/utils/esm/node_modules/uuid/dist/esm-browser/v4.js +2 -0
  77. package/dist/utils/esm/node_modules/uuid/dist/esm-browser/v4.js.map +1 -0
  78. package/dist/utils/esm/src/core/utils/appState/peregrineMQ/index.js +2 -0
  79. package/dist/utils/esm/src/core/utils/appState/peregrineMQ/index.js.map +1 -0
  80. package/dist/utils/esm/src/core/utils/appState/peregrineMQ/peregrineMQ.js +2 -0
  81. package/dist/utils/esm/src/core/utils/appState/peregrineMQ/peregrineMQ.js.map +1 -0
  82. package/dist/utils/esm/src/core/utils/appState/stateMachine/tiny-state-machine.base.js +2 -0
  83. package/dist/utils/esm/src/core/utils/appState/stateMachine/tiny-state-machine.base.js.map +1 -0
  84. package/dist/utils/esm/src/core/utils/appState/store/store.vanillajs.js +1 -1
  85. package/dist/utils/esm/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  86. package/dist/utils/esm/src/core/utils/appState/store/useStore.react.js.map +1 -1
  87. package/dist/utils/esm/src/core/utils/helpers/other.js +1 -1
  88. package/dist/utils/esm/src/core/utils/helpers/other.js.map +1 -1
  89. package/dist/utils/esm/src/core/utils/index.js +1 -1
  90. package/dist/utils/index.css +55 -55
  91. package/dist/utils/node_modules/uuid/dist/esm-browser/native.js +2 -0
  92. package/dist/utils/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
  93. package/dist/utils/node_modules/uuid/dist/esm-browser/rng.js +2 -0
  94. package/dist/utils/node_modules/uuid/dist/esm-browser/rng.js.map +1 -0
  95. package/dist/utils/node_modules/uuid/dist/esm-browser/stringify.js +2 -0
  96. package/dist/utils/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -0
  97. package/dist/utils/node_modules/uuid/dist/esm-browser/v4.js +2 -0
  98. package/dist/utils/node_modules/uuid/dist/esm-browser/v4.js.map +1 -0
  99. package/dist/utils/src/core/utils/appState/peregrineMQ/index.js +2 -0
  100. package/dist/utils/src/core/utils/appState/peregrineMQ/index.js.map +1 -0
  101. package/dist/utils/src/core/utils/appState/peregrineMQ/peregrineMQ.js +2 -0
  102. package/dist/utils/src/core/utils/appState/peregrineMQ/peregrineMQ.js.map +1 -0
  103. package/dist/utils/src/core/utils/appState/stateMachine/tiny-state-machine.base.js +2 -0
  104. package/dist/utils/src/core/utils/appState/stateMachine/tiny-state-machine.base.js.map +1 -0
  105. package/dist/utils/src/core/utils/appState/store/store.vanillajs.js +1 -1
  106. package/dist/utils/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  107. package/dist/utils/src/core/utils/appState/store/useStore.react.js.map +1 -1
  108. package/dist/utils/src/core/utils/helpers/other.js +1 -1
  109. package/dist/utils/src/core/utils/helpers/other.js.map +1 -1
  110. package/dist/utils/src/core/utils/index.js +1 -1
  111. package/package.json +1 -1
@@ -1,21 +1,44 @@
1
- .divider-module_divider-line__6CesR {
2
- position: relative;
3
- display: block;
4
- transition: opacity, width, height 250ms ease-in-out;
5
- background-color: var(--color);
6
- opacity: var(--opacity);
1
+ .CollapsibleContainer-module_collapsible-container__u0Jmm {
2
+ transform-origin: 0% 0%;
3
+ opacity: 0;
4
+ overflow: clip;
7
5
  }
8
- .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
9
- height: var(--length);
10
- left: var(--left);
11
- width: var(--width);
12
- margin: var(--margin);
6
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN {
7
+ transition: opacity 0.2s ease-in-out, height 0.2s ease-in-out, max-height 0.2s ease-in-out;
8
+ will-change: opacity, height, max-height;
13
9
  }
14
- .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
15
- width: var(--length);
16
- left: var(--left);
17
- height: var(--height);
18
- margin: var(--margin);
10
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_collapsed__q8fs8 {
11
+ height: 0;
12
+ max-height: 0;
13
+ opacity: 0;
14
+ }
15
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_expanded__O6Vh8 {
16
+ height: var(--prop-value);
17
+ max-height: var(--prop-value);
18
+ opacity: 1;
19
+ }
20
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI- {
21
+ transition: opacity 0.2s ease-in-out, width 0.2s ease-in-out, max-width 0.2s ease-in-out;
22
+ will-change: opacity, width, max-width;
23
+ }
24
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_collapsed__q8fs8 {
25
+ width: 0;
26
+ max-width: 0;
27
+ opacity: 0;
28
+ }
29
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_expanded__O6Vh8 {
30
+ width: var(--prop-value);
31
+ max-width: var(--prop-value);
32
+ opacity: 1;
33
+ }
34
+ .errorBoundary-module_errorBoundary__gk9ps {
35
+ background: #EFEFEF;
36
+ width: 100%;
37
+ height: 100%;
38
+ }
39
+
40
+ .errorBoundary-module_StyledIcon__IYHiU {
41
+ margin-right: 10px;
19
42
  }
20
43
  .icon-module_icon-base-parent__nOMvW {
21
44
  line-height: 1px !important;
@@ -47,38 +70,24 @@
47
70
  width: var(--height);
48
71
  height: var(--width);
49
72
  }
50
- .CollapsibleContainer-module_collapsible-container__u0Jmm {
51
- transform-origin: 0% 0%;
52
- opacity: 0;
53
- overflow: clip;
54
- }
55
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN {
56
- transition: opacity 0.2s ease-in-out, height 0.2s ease-in-out, max-height 0.2s ease-in-out;
57
- will-change: opacity, height, max-height;
58
- }
59
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_collapsed__q8fs8 {
60
- height: 0;
61
- max-height: 0;
62
- opacity: 0;
63
- }
64
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_expanded__O6Vh8 {
65
- height: var(--prop-value);
66
- max-height: var(--prop-value);
67
- opacity: 1;
68
- }
69
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI- {
70
- transition: opacity 0.2s ease-in-out, width 0.2s ease-in-out, max-width 0.2s ease-in-out;
71
- will-change: opacity, width, max-width;
73
+ .divider-module_divider-line__6CesR {
74
+ position: relative;
75
+ display: block;
76
+ transition: opacity, width, height 250ms ease-in-out;
77
+ background-color: var(--color);
78
+ opacity: var(--opacity);
72
79
  }
73
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_collapsed__q8fs8 {
74
- width: 0;
75
- max-width: 0;
76
- opacity: 0;
80
+ .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
81
+ height: var(--length);
82
+ left: var(--left);
83
+ width: var(--width);
84
+ margin: var(--margin);
77
85
  }
78
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_expanded__O6Vh8 {
79
- width: var(--prop-value);
80
- max-width: var(--prop-value);
81
- opacity: 1;
86
+ .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
87
+ width: var(--length);
88
+ left: var(--left);
89
+ height: var(--height);
90
+ margin: var(--margin);
82
91
  }
83
92
  .field-module_field__UfKm3 {
84
93
  opacity: 1;
@@ -154,15 +163,6 @@
154
163
  .field-module_field__UfKm3 label {
155
164
  text-align: left;
156
165
  }
157
- .errorBoundary-module_errorBoundary__gk9ps {
158
- background: #EFEFEF;
159
- width: 100%;
160
- height: 100%;
161
- }
162
-
163
- .errorBoundary-module_StyledIcon__IYHiU {
164
- margin-right: 10px;
165
- }
166
166
  .layoutBox-module_layout-box__ZIID8 {
167
167
  display: flex;
168
168
  position: relative;
@@ -1,21 +1,44 @@
1
- .divider-module_divider-line__6CesR {
2
- position: relative;
3
- display: block;
4
- transition: opacity, width, height 250ms ease-in-out;
5
- background-color: var(--color);
6
- opacity: var(--opacity);
1
+ .CollapsibleContainer-module_collapsible-container__u0Jmm {
2
+ transform-origin: 0% 0%;
3
+ opacity: 0;
4
+ overflow: clip;
7
5
  }
8
- .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
9
- height: var(--length);
10
- left: var(--left);
11
- width: var(--width);
12
- margin: var(--margin);
6
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN {
7
+ transition: opacity 0.2s ease-in-out, height 0.2s ease-in-out, max-height 0.2s ease-in-out;
8
+ will-change: opacity, height, max-height;
13
9
  }
14
- .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
15
- width: var(--length);
16
- left: var(--left);
17
- height: var(--height);
18
- margin: var(--margin);
10
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_collapsed__q8fs8 {
11
+ height: 0;
12
+ max-height: 0;
13
+ opacity: 0;
14
+ }
15
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_expanded__O6Vh8 {
16
+ height: var(--prop-value);
17
+ max-height: var(--prop-value);
18
+ opacity: 1;
19
+ }
20
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI- {
21
+ transition: opacity 0.2s ease-in-out, width 0.2s ease-in-out, max-width 0.2s ease-in-out;
22
+ will-change: opacity, width, max-width;
23
+ }
24
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_collapsed__q8fs8 {
25
+ width: 0;
26
+ max-width: 0;
27
+ opacity: 0;
28
+ }
29
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_expanded__O6Vh8 {
30
+ width: var(--prop-value);
31
+ max-width: var(--prop-value);
32
+ opacity: 1;
33
+ }
34
+ .errorBoundary-module_errorBoundary__gk9ps {
35
+ background: #EFEFEF;
36
+ width: 100%;
37
+ height: 100%;
38
+ }
39
+
40
+ .errorBoundary-module_StyledIcon__IYHiU {
41
+ margin-right: 10px;
19
42
  }
20
43
  .icon-module_icon-base-parent__nOMvW {
21
44
  line-height: 1px !important;
@@ -47,38 +70,24 @@
47
70
  width: var(--height);
48
71
  height: var(--width);
49
72
  }
50
- .CollapsibleContainer-module_collapsible-container__u0Jmm {
51
- transform-origin: 0% 0%;
52
- opacity: 0;
53
- overflow: clip;
54
- }
55
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN {
56
- transition: opacity 0.2s ease-in-out, height 0.2s ease-in-out, max-height 0.2s ease-in-out;
57
- will-change: opacity, height, max-height;
58
- }
59
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_collapsed__q8fs8 {
60
- height: 0;
61
- max-height: 0;
62
- opacity: 0;
63
- }
64
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_expanded__O6Vh8 {
65
- height: var(--prop-value);
66
- max-height: var(--prop-value);
67
- opacity: 1;
68
- }
69
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI- {
70
- transition: opacity 0.2s ease-in-out, width 0.2s ease-in-out, max-width 0.2s ease-in-out;
71
- will-change: opacity, width, max-width;
73
+ .divider-module_divider-line__6CesR {
74
+ position: relative;
75
+ display: block;
76
+ transition: opacity, width, height 250ms ease-in-out;
77
+ background-color: var(--color);
78
+ opacity: var(--opacity);
72
79
  }
73
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_collapsed__q8fs8 {
74
- width: 0;
75
- max-width: 0;
76
- opacity: 0;
80
+ .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
81
+ height: var(--length);
82
+ left: var(--left);
83
+ width: var(--width);
84
+ margin: var(--margin);
77
85
  }
78
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_expanded__O6Vh8 {
79
- width: var(--prop-value);
80
- max-width: var(--prop-value);
81
- opacity: 1;
86
+ .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
87
+ width: var(--length);
88
+ left: var(--left);
89
+ height: var(--height);
90
+ margin: var(--margin);
82
91
  }
83
92
  .field-module_field__UfKm3 {
84
93
  opacity: 1;
@@ -154,15 +163,6 @@
154
163
  .field-module_field__UfKm3 label {
155
164
  text-align: left;
156
165
  }
157
- .errorBoundary-module_errorBoundary__gk9ps {
158
- background: #EFEFEF;
159
- width: 100%;
160
- height: 100%;
161
- }
162
-
163
- .errorBoundary-module_StyledIcon__IYHiU {
164
- margin-right: 10px;
165
- }
166
166
  .layoutBox-module_layout-box__ZIID8 {
167
167
  display: flex;
168
168
  position: relative;
@@ -1,2 +1,2 @@
1
- "use strict";function n(n,r,t,e,o,i,a){try{var u=n[i](a),c=u.value}catch(n){return void t(n)}u.done?r(c):Promise.resolve(c).then(e,o)}function r(){return r=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var e in t)({}).hasOwnProperty.call(t,e)&&(n[e]=t[e])}return n},r.apply(null,arguments)}exports.asyncToGenerator=function(r){return function(){var t=this,e=arguments;return new Promise((function(o,i){var a=r.apply(t,e);function u(r){n(a,o,i,u,c,"next",r)}function c(r){n(a,o,i,u,c,"throw",r)}u(void 0)}))}},exports.extends=r;
1
+ "use strict";function n(n,e,r,t,o,i,a){try{var s=n[i](a),c=s.value}catch(n){return void r(n)}s.done?e(c):Promise.resolve(c).then(t,o)}var e=0;function r(){return r=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)({}).hasOwnProperty.call(r,t)&&(n[t]=r[t])}return n},r.apply(null,arguments)}exports.asyncToGenerator=function(e){return function(){var r=this,t=arguments;return new Promise((function(o,i){var a=e.apply(r,t);function s(e){n(a,o,i,s,c,"next",e)}function c(e){n(a,o,i,s,c,"throw",e)}s(void 0)}))}},exports.classPrivateFieldLooseBase=function(n,e){if(!{}.hasOwnProperty.call(n,e))throw new TypeError("attempted to use private field on non-instance");return n},exports.classPrivateFieldLooseKey=function(n){return"__private_"+e+++"_"+n},exports.extends=r;
2
2
  //# sourceMappingURL=_rollupPluginBabelHelpers.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};exports.default=e;
2
+ //# sourceMappingURL=native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.js","sources":["../../../../../../../node_modules/uuid/dist/esm-browser/native.js"],"sourcesContent":["const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};"],"names":["native","randomUUID","crypto","bind"],"mappings":"oEACA,IAAeA,EAAA,CACbC,WAFmC,oBAAXC,QAA0BA,OAAOD,YAAcC,OAAOD,WAAWE,KAAKD","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ "use strict";let e;Object.defineProperty(exports,"__esModule",{value:!0});const t=new Uint8Array(16);exports.default=function(){if(!e&&(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!e))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(t)};
2
+ //# sourceMappingURL=rng.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rng.js","sources":["../../../../../../../node_modules/uuid/dist/esm-browser/rng.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}"],"names":["getRandomValues","rnds8","Uint8Array","crypto","bind","Error"],"mappings":"aAGA,IAAIA,yDACJ,MAAMC,EAAQ,IAAIC,WAAW,oBACd,WAEb,IAAKF,IAEHA,EAAoC,oBAAXG,QAA0BA,OAAOH,iBAAmBG,OAAOH,gBAAgBI,KAAKD,SAEpGH,GACH,MAAM,IAAIK,MAAM,4GAIpB,OAAOL,EAAgBC,EACzB","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ "use strict";const t=[];for(let n=0;n<256;++n)t.push((n+256).toString(16).slice(1));exports.unsafeStringify=function(n,r=0){return t[n[r+0]]+t[n[r+1]]+t[n[r+2]]+t[n[r+3]]+"-"+t[n[r+4]]+t[n[r+5]]+"-"+t[n[r+6]]+t[n[r+7]]+"-"+t[n[r+8]]+t[n[r+9]]+"-"+t[n[r+10]]+t[n[r+11]]+t[n[r+12]]+t[n[r+13]]+t[n[r+14]]+t[n[r+15]]};
2
+ //# sourceMappingURL=stringify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringify.js","sources":["../../../../../../../node_modules/uuid/dist/esm-browser/stringify.js"],"sourcesContent":["import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;"],"names":["byteToHex","i","push","toString","slice","arr","offset"],"mappings":"aAMA,MAAMA,EAAY,GAElB,IAAK,IAAIC,EAAI,EAAGA,EAAI,MAAOA,EACzBD,EAAUE,MAAMD,EAAI,KAAOE,SAAS,IAAIC,MAAM,4BAGzC,SAAyBC,EAAKC,EAAS,GAG5C,OAAON,EAAUK,EAAIC,EAAS,IAAMN,EAAUK,EAAIC,EAAS,IAAMN,EAAUK,EAAIC,EAAS,IAAMN,EAAUK,EAAIC,EAAS,IAAM,IAAMN,EAAUK,EAAIC,EAAS,IAAMN,EAAUK,EAAIC,EAAS,IAAM,IAAMN,EAAUK,EAAIC,EAAS,IAAMN,EAAUK,EAAIC,EAAS,IAAM,IAAMN,EAAUK,EAAIC,EAAS,IAAMN,EAAUK,EAAIC,EAAS,IAAM,IAAMN,EAAUK,EAAIC,EAAS,KAAON,EAAUK,EAAIC,EAAS,KAAON,EAAUK,EAAIC,EAAS,KAAON,EAAUK,EAAIC,EAAS,KAAON,EAAUK,EAAIC,EAAS,KAAON,EAAUK,EAAIC,EAAS,IAChf","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./native.js"),r=require("./rng.js"),t=require("./stringify.js");exports.default=function(n,u,i){if(e.default.randomUUID&&!u&&!n)return e.default.randomUUID();const a=(n=n||{}).random||(n.rng||r.default)();return a[6]=15&a[6]|64,a[8]=63&a[8]|128,t.unsafeStringify(a)};
2
+ //# sourceMappingURL=v4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v4.js","sources":["../../../../../../../node_modules/uuid/dist/esm-browser/v4.js"],"sourcesContent":["import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;"],"names":["options","buf","offset","native","default","randomUUID","rnds","random","rng","unsafeStringify"],"mappings":"mKAIA,SAAYA,EAASC,EAAKC,GACxB,GAAIC,EAAMC,QAACC,aAAeJ,IAAQD,EAChC,OAAOG,EAAAA,QAAOE,aAIhB,MAAMC,GADNN,EAAUA,GAAW,IACAO,SAAWP,EAAQQ,KAAOA,EAAAA,WAe/C,OAbAF,EAAK,GAAe,GAAVA,EAAK,GAAY,GAC3BA,EAAK,GAAe,GAAVA,EAAK,GAAY,IAYpBG,EAAAA,gBAAgBH,EACzB","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./peregrineMQ.js");const r=new e.PeregrineMQ;exports.PeregrineMQ=e.PeregrineMQ,exports.PeregrineMQClearError=e.PeregrineMQClearError,exports.default=r,exports.peregrineMQInstance=r;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../src/core/utils/appState/peregrineMQ/index.ts"],"sourcesContent":["import { PeregrineMQ } from './peregrineMQ'\n\nexport { PeregrineMQ, PeregrineMQClearError } from './peregrineMQ'\n\nexport const peregrineMQInstance = new PeregrineMQ()\n\nexport default peregrineMQInstance\n"],"names":["peregrineMQInstance","PeregrineMQ"],"mappings":"4GAIaA,EAAsB,IAAIC,EAAWA"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("../../../../../node_modules/uuid/dist/esm-browser/v4.js");class t extends Error{constructor(){super("Clearing PeregrineMQ is not allowed. Please read the documentation for more information."),this.name="PeregrineMQClearError"}}exports.PeregrineMQ=class{constructor(s,n){this.id=void 0,this.config={allowAutoPrune:!1,pruneInterval:1e4,allowClear:!1},this.channels=new Map,this.listeners=new Map,this.addListener=(e,t)=>{const s=this.listeners.get(e),n=this.channels.get(t);n&&(s?s.push(n):this.listeners.set(e,[n]))},this.removeListener=e=>{const t=this.listeners.get(e);let s=!0;for(const n of t||[])if(s=!n.has(e),!s)break;s&&this.listeners.delete(e)},this.publishToChannel=(e,t,s)=>{const n=this.channels.get(e);if(!n)return t;const r=n[Symbol.iterator]();let i=r.next().value;for(;i;)i(e,s),i=r.next().value;return!0},this.configure=e=>{this.config=e;const{allowAutoPrune:t,pruneInterval:s}=e;let n;t&&(n=setInterval((()=>{this.prune()}),s));const r=this;return{...t?{clearPruneInterval:()=>{clearInterval(n)},restartPruneInterval:()=>{clearInterval(n),n=setInterval((()=>{r.prune()}),s)}}:{}}},this.getChannels=()=>[...this.channels.keys()],this.prune=()=>{const e=this.channels[Symbol.iterator]();let t=e.next().value;const s=[];for(;t;)0===t[1]?.size&&(s.push(t[0]),this.channels.delete(t[0])),t=e.next().value;return s},this.removeChannel=e=>{const t=this.channels.get(e);if(t&&t.size>0){const e=[...t||[]];t.clear();let s=e.length;for(;s--;)this.removeListener(e[s])}return this.channels.delete(e)},this.publish=(e,t)=>{if(e.includes(".")){const s=e.split(".");let{length:n}=s,r=!1;for(;n--;){this.publishToChannel(s.slice(0,n+1).join("."),n!==s.length-1,t)||(r=!0)}return!r}return this.publishToChannel(e,!1,t)},this.subscribe=(e,t)=>{const s=this.channels.get(e);return s?s.add(t):this.channels.set(e,new Set([t])),this.addListener(t,e),()=>this.unsubscribe(t,{channel:e,prune:!0})},this.unsubscribe=(e,t)=>{const{channel:s,prune:n}=t||{};let r=!1;if(s){const t=this.channels.get(s);return r=!!t&&t.delete(e),n&&0===t?.size&&this.channels.delete(s),this.removeListener(e),r}const i=this.listeners.get(e)||[];for(const t of i)r=t.delete(e),n&&0===t.size&&this.prune();return this.listeners.delete(e),r},this.isSubscribed=(e,t)=>{if(t){const s=this.channels.get(t);return!!s&&s.has(e)}return this.listeners.has(e)},this.clear=()=>{if(!this.config.allowClear)throw new t;this.channels.clear(),this.listeners.clear()},this.getId=()=>this.id,this.id=s||e.default(),this.configure(n||{})}get length(){return[...this.channels.values()].reduce(((e,t)=>e+t.size),0)}},exports.PeregrineMQClearError=t;
2
+ //# sourceMappingURL=peregrineMQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"peregrineMQ.js","sources":["../../../../../../../../src/core/utils/appState/peregrineMQ/peregrineMQ.ts"],"sourcesContent":["import { v4 as uuidv4 } from 'uuid'\n\nimport { Callback, Config, PeregrineMQApi, SubscribersSet, UnsubscribeOptions } from './peregrineMQ.types'\n\n\nexport class PeregrineMQClearError extends Error {\n constructor() {\n super('Clearing PeregrineMQ is not allowed. Please read the documentation for more information.')\n this.name = 'PeregrineMQClearError'\n }\n}\n\n/**\n * Represents a message queue with publish/subscribe functionality.\n */\nexport class PeregrineMQ implements PeregrineMQApi {\n private id: string\n\n private config: Config = {\n allowAutoPrune: false,\n pruneInterval: 10000,\n allowClear: false,\n }\n\n /**\n * The map of channels and their subscribers sets.\n */\n private channels: Map<string, SubscribersSet> = new Map()\n\n /**\n * The map of listeners and their subscribed channels.\n */\n private listeners: Map<Callback, SubscribersSet[]> = new Map()\n\n /**\n * Adds a callback as a listener to a channel.\n * @param callback The callback function to add as a listener.\n * @param channel The channel to add the listener to.\n */\n private addListener = (callback: Callback, channel: string): void => {\n const listener = this.listeners.get(callback)\n const subscribersSet = this.channels.get(channel)\n\n if (subscribersSet) {\n if (listener) {\n listener.push(subscribersSet)\n } else {\n this.listeners.set(callback, [subscribersSet])\n }\n }\n }\n\n /**\n * Removes the callback from the listeners collection if it is not subscribed to any channels.\n * @description Removes the callback only when it is not present in any other subscriberSet\n * (Ref to Map<string, SubscribersSet>).\n * @param callback The callback to remove from listeners.\n */\n private removeListener = (callback: Callback): void => {\n const channelSubscriberSets = this.listeners.get(callback)\n let isEmpty = true\n\n // eslint-disable-next-line no-restricted-syntax\n for (const channelSubscriberSet of channelSubscriberSets || []) {\n isEmpty = !channelSubscriberSet.has(callback)\n if (!isEmpty) {\n break\n }\n }\n\n if (isEmpty) {\n this.listeners.delete(callback)\n }\n }\n\n /**\n * Publishes data to a channel.\n * @param channel The channel to publish the data to.\n * @param isParent Indicates if the channel is a parent channel.\n * @param data The data to publish.\n * @returns A boolean indicating if the publication was successful.\n */\n private publishToChannel = (channel: string, isParent: boolean, data?: unknown): boolean => {\n const subscribersSet = this.channels.get(channel)\n\n if (!subscribersSet) {\n return isParent\n }\n\n const iterator = subscribersSet[Symbol.iterator]()\n let subscriberFunc = iterator.next().value\n\n // eslint-disable-next-line no-plusplus\n while (subscriberFunc) {\n subscriberFunc(channel, data)\n subscriberFunc = iterator.next().value\n }\n return true\n }\n\n /**\n * Creates a new instance of PeregrineMQ.\n * @param id Specific instance of PeregrineMQ identifier\n * @param config The configuration options for PeregrineMQ.\n */\n constructor(id?: string, config?: Config) {\n this.id = id || uuidv4()\n this.configure(config || {})\n }\n\n /**\n * Gets the total number of subscribers across all channels.\n */\n get length(): number {\n return [...this.channels.values()].reduce((acc, subscribersList) => acc + subscribersList.size, 0)\n }\n\n /**\n * Configures PeregrineMQ with the specified options.\n * @param config The configuration options for PeregrineMQ.\n * @returns An object containing the prune interval handler (if auto prune is enabled).\n */\n configure = (config: Config): {\n clearPruneInterval?: () => void\n restartPruneInterval?: () => void\n } => {\n this.config = config\n const { allowAutoPrune, pruneInterval } = config\n\n let pruneIntervalHandler: ReturnType<typeof setInterval>\n\n if (allowAutoPrune) {\n pruneIntervalHandler = setInterval(() => {\n this.prune()\n }, pruneInterval)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instance: PeregrineMQ = this\n\n return {\n ...(allowAutoPrune\n ? {\n clearPruneInterval: (): void => {\n clearInterval(pruneIntervalHandler)\n },\n restartPruneInterval: (): void => {\n clearInterval(pruneIntervalHandler)\n pruneIntervalHandler = setInterval(() => {\n instance.prune()\n }, pruneInterval)\n },\n }\n : {}),\n }\n }\n\n /**\n * Gets an array of all channels.\n * @returns An array of channel names.\n */\n getChannels = (): string[] => [...this.channels.keys()]\n\n /**\n * Prunes the channels with no subscribers.\n * @returns An array of pruned channel names.\n */\n prune = (): string[] => {\n const iterator = this.channels[Symbol.iterator]()\n let subscribersSet = iterator.next().value\n const prunedChannels: string[] = []\n\n // eslint-disable-next-line no-plusplus\n while (subscribersSet) {\n if (subscribersSet[1]?.size === 0) {\n prunedChannels.push(subscribersSet[0])\n this.channels.delete(subscribersSet[0])\n }\n subscribersSet = iterator.next().value\n }\n\n return prunedChannels\n }\n\n /**\n * Removes a channel and its subscribers.\n * @param channel The channel to remove.\n * @returns A boolean indicating if the channel was successfully removed.\n */\n removeChannel = (channel: string): boolean => {\n const subscribersSet = this.channels.get(channel)\n\n if (subscribersSet && subscribersSet.size > 0) {\n const channelListeners = [...subscribersSet || []]\n\n subscribersSet.clear()\n\n let index = channelListeners.length\n\n // eslint-disable-next-line no-plusplus\n while (index--) {\n this.removeListener(channelListeners[index])\n }\n }\n\n return this.channels.delete(channel)\n }\n\n /**\n * Publishes data to a channel.\n * @param channel The channel to publish the data to.\n * @param data The data to publish.\n * @returns A boolean indicating if the publication was successful.\n */\n publish = <T>(channel: string, data?: T): boolean => {\n if (channel.includes('.')) {\n const nestedChannels = channel.split('.')\n\n let { length } = nestedChannels\n let failed = false\n\n // eslint-disable-next-line no-plusplus\n while (length--) {\n const result = this.publishToChannel(\n nestedChannels.slice(0, length + 1).join('.'),\n length !== nestedChannels.length - 1,\n data,\n )\n\n if (!result) {\n failed = true\n }\n }\n return !failed\n }\n\n return this.publishToChannel(channel, false, data)\n }\n\n /**\n * Subscribes a callback to a channel.\n * @param channel The channel to subscribe to.\n * @param callback The callback function to subscribe.\n * @returns A function to unsubscribe the callback.\n */\n subscribe = (channel: string, callback: Callback): () => boolean => {\n const subscribersList = this.channels.get(channel)\n\n if (subscribersList) {\n subscribersList.add(callback)\n } else {\n this.channels.set(channel, new Set([callback]))\n }\n\n this.addListener(callback, channel)\n\n return () => this.unsubscribe(callback, { channel, prune: true })\n }\n\n /**\n * Unsubscribes a callback from a channel or all channels.\n * @param callback The callback function to unsubscribe.\n * @param options Optional unsubscribe options.\n * @returns A boolean indicating if the callback was successfully unsubscribed.\n */\n unsubscribe = (callback: Callback, options?: UnsubscribeOptions): boolean => {\n const { channel, prune } = options || {}\n\n let unsubscribed = false\n\n if (channel) {\n const subscriberSet = this.channels.get(channel)\n\n unsubscribed = subscriberSet ? subscriberSet.delete(callback) : false\n if (prune && subscriberSet?.size === 0) {\n this.channels.delete(channel)\n }\n\n this.removeListener(callback)\n\n return unsubscribed\n }\n\n const subscriberSetArray = this.listeners.get(callback) || []\n\n // remove callback form listeners and all channels\n // TODO remove only if has\n // eslint-disable-next-line no-restricted-syntax\n for (const subscriberSet of subscriberSetArray) {\n unsubscribed = subscriberSet.delete(callback) as boolean\n\n if (prune && subscriberSet.size === 0) {\n this.prune()\n }\n }\n\n this.listeners.delete(callback)\n\n return unsubscribed\n }\n\n /**\n * Checks if a callback is subscribed to a specific channel or any channel.\n * @param callback The callback function to check.\n * @param channel Optional channel name to check subscription for.\n * @returns A boolean indicating if the callback is subscribed.\n */\n isSubscribed = (callback: Callback, channel?: string): boolean => {\n if (channel) {\n const subscribersList = this.channels.get(channel)\n\n return subscribersList ? subscribersList.has(callback) : false\n }\n\n return this.listeners.has(callback)\n }\n\n /**\n * Clears all channels and listeners.\n * @throws {Error} If clearing PeregrineMQ is not allowed.\n */\n clear = (): void => {\n if (this.config.allowClear) {\n this.channels.clear()\n this.listeners.clear()\n } else {\n throw new PeregrineMQClearError()\n }\n }\n\n /**\n * Returns the specific instance of PeregrineMQ.\n * @returns A string identifier of the specific instance of PeregrineMQ.\n */\n getId = (): string => this.id\n}\n"],"names":["PeregrineMQClearError","Error","constructor","super","this","name","id","config","allowAutoPrune","pruneInterval","allowClear","channels","Map","listeners","addListener","callback","channel","listener","get","subscribersSet","push","set","removeListener","channelSubscriberSets","isEmpty","channelSubscriberSet","has","delete","publishToChannel","isParent","data","iterator","Symbol","subscriberFunc","next","value","configure","pruneIntervalHandler","setInterval","prune","instance","clearPruneInterval","clearInterval","restartPruneInterval","getChannels","keys","prunedChannels","size","removeChannel","channelListeners","clear","index","length","publish","includes","nestedChannels","split","failed","slice","join","subscribe","subscribersList","add","Set","unsubscribe","options","unsubscribed","subscriberSet","subscriberSetArray","isSubscribed","getId","uuidv4","values","reduce","acc"],"mappings":"sFAKO,MAAMA,UAA8BC,MACzCC,WAAAA,GACEC,MAAM,4FACNC,KAAKC,KAAO,uBACd,sBAMK,MA0FLH,WAAAA,CAAYI,EAAaC,GAAiBH,KAzFlCE,QAAE,EAAAF,KAEFG,OAAiB,CACvBC,gBAAgB,EAChBC,cAAe,IACfC,YAAY,GAGdN,KAGQO,SAAwC,IAAIC,IAEpDR,KAGQS,UAA6C,IAAID,IAEzDR,KAKQU,YAAc,CAACC,EAAoBC,KACzC,MAAMC,EAAWb,KAAKS,UAAUK,IAAIH,GAC9BI,EAAiBf,KAAKO,SAASO,IAAIF,GAErCG,IACEF,EACFA,EAASG,KAAKD,GAEdf,KAAKS,UAAUQ,IAAIN,EAAU,CAACI,IAElC,EAGFf,KAMQkB,eAAkBP,IACxB,MAAMQ,EAAwBnB,KAAKS,UAAUK,IAAIH,GACjD,IAAIS,GAAU,EAGd,IAAK,MAAMC,KAAwBF,GAAyB,GAE1D,GADAC,GAAWC,EAAqBC,IAAIX,IAC/BS,EACH,MAIAA,GACFpB,KAAKS,UAAUc,OAAOZ,EACxB,EAGFX,KAOQwB,iBAAmB,CAACZ,EAAiBa,EAAmBC,KAC9D,MAAMX,EAAiBf,KAAKO,SAASO,IAAIF,GAEzC,IAAKG,EACH,OAAOU,EAGT,MAAME,EAAWZ,EAAea,OAAOD,YACvC,IAAIE,EAAiBF,EAASG,OAAOC,MAGrC,KAAOF,GACLA,EAAejB,EAASc,GACxBG,EAAiBF,EAASG,OAAOC,MAEnC,OAAO,CAAI,EAoBb/B,KAKAgC,UAAa7B,IAIXH,KAAKG,OAASA,EACd,MAAMC,eAAEA,EAAcC,cAAEA,GAAkBF,EAE1C,IAAI8B,EAEA7B,IACF6B,EAAuBC,aAAY,KACjClC,KAAKmC,OAAO,GACX9B,IAIL,MAAM+B,EAAwBpC,KAE9B,MAAO,IACDI,EACA,CACAiC,mBAAoBA,KAClBC,cAAcL,EAAqB,EAErCM,qBAAsBA,KACpBD,cAAcL,GACdA,EAAuBC,aAAY,KACjCE,EAASD,OAAO,GACf9B,EAAc,GAGnB,CAAE,EACP,EAGHL,KAIAwC,YAAc,IAAgB,IAAIxC,KAAKO,SAASkC,QAEhDzC,KAIAmC,MAAQ,KACN,MAAMR,EAAW3B,KAAKO,SAASqB,OAAOD,YACtC,IAAIZ,EAAiBY,EAASG,OAAOC,MACrC,MAAMW,EAA2B,GAGjC,KAAO3B,GAC2B,IAA5BA,EAAe,IAAI4B,OACrBD,EAAe1B,KAAKD,EAAe,IACnCf,KAAKO,SAASgB,OAAOR,EAAe,KAEtCA,EAAiBY,EAASG,OAAOC,MAGnC,OAAOW,CAAc,EAGvB1C,KAKA4C,cAAiBhC,IACf,MAAMG,EAAiBf,KAAKO,SAASO,IAAIF,GAEzC,GAAIG,GAAkBA,EAAe4B,KAAO,EAAG,CAC7C,MAAME,EAAmB,IAAI9B,GAAkB,IAE/CA,EAAe+B,QAEf,IAAIC,EAAQF,EAAiBG,OAG7B,KAAOD,KACL/C,KAAKkB,eAAe2B,EAAiBE,GAEzC,CAEA,OAAO/C,KAAKO,SAASgB,OAAOX,EAAQ,EAGtCZ,KAMAiD,QAAU,CAAIrC,EAAiBc,KAC7B,GAAId,EAAQsC,SAAS,KAAM,CACzB,MAAMC,EAAiBvC,EAAQwC,MAAM,KAErC,IAAIJ,OAAEA,GAAWG,EACbE,GAAS,EAGb,KAAOL,KAAU,CACAhD,KAAKwB,iBAClB2B,EAAeG,MAAM,EAAGN,EAAS,GAAGO,KAAK,KACzCP,IAAWG,EAAeH,OAAS,EACnCtB,KAIA2B,GAAS,EAEb,CACA,OAAQA,CACV,CAEA,OAAOrD,KAAKwB,iBAAiBZ,GAAS,EAAOc,EAAK,EAGpD1B,KAMAwD,UAAY,CAAC5C,EAAiBD,KAC5B,MAAM8C,EAAkBzD,KAAKO,SAASO,IAAIF,GAU1C,OARI6C,EACFA,EAAgBC,IAAI/C,GAEpBX,KAAKO,SAASU,IAAIL,EAAS,IAAI+C,IAAI,CAAChD,KAGtCX,KAAKU,YAAYC,EAAUC,GAEpB,IAAMZ,KAAK4D,YAAYjD,EAAU,CAAEC,UAASuB,OAAO,GAAO,EAGnEnC,KAMA4D,YAAc,CAACjD,EAAoBkD,KACjC,MAAMjD,QAAEA,EAAOuB,MAAEA,GAAU0B,GAAW,CAAA,EAEtC,IAAIC,GAAe,EAEnB,GAAIlD,EAAS,CACX,MAAMmD,EAAgB/D,KAAKO,SAASO,IAAIF,GASxC,OAPAkD,IAAeC,GAAgBA,EAAcxC,OAAOZ,GAChDwB,GAAiC,IAAxB4B,GAAepB,MAC1B3C,KAAKO,SAASgB,OAAOX,GAGvBZ,KAAKkB,eAAeP,GAEbmD,CACT,CAEA,MAAME,EAAqBhE,KAAKS,UAAUK,IAAIH,IAAa,GAK3D,IAAK,MAAMoD,KAAiBC,EAC1BF,EAAeC,EAAcxC,OAAOZ,GAEhCwB,GAAgC,IAAvB4B,EAAcpB,MACzB3C,KAAKmC,QAMT,OAFAnC,KAAKS,UAAUc,OAAOZ,GAEfmD,CAAY,EAGrB9D,KAMAiE,aAAe,CAACtD,EAAoBC,KAClC,GAAIA,EAAS,CACX,MAAM6C,EAAkBzD,KAAKO,SAASO,IAAIF,GAE1C,QAAO6C,GAAkBA,EAAgBnC,IAAIX,EAC/C,CAEA,OAAOX,KAAKS,UAAUa,IAAIX,EAAS,EAGrCX,KAIA8C,MAAQ,KACN,IAAI9C,KAAKG,OAAOG,WAId,MAAM,IAAIV,EAHVI,KAAKO,SAASuC,QACd9C,KAAKS,UAAUqC,OAGjB,EAGF9C,KAIAkE,MAAQ,IAAclE,KAAKE,GApOzBF,KAAKE,GAAKA,GAAMiE,EAAAA,UAChBnE,KAAKgC,UAAU7B,GAAU,CAAA,EAC3B,CAKA,UAAI6C,GACF,MAAO,IAAIhD,KAAKO,SAAS6D,UAAUC,QAAO,CAACC,EAAKb,IAAoBa,EAAMb,EAAgBd,MAAM,EAClG"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");let s=function(e){return e.CHANGE="change",e.TRANSITIONED_TO="transitionedTo",e.TRANSITIONED_FROM="transitionedFrom",e.ADDED_TO_QUEUE="addedToQueue",e.REMOVED_FROM_QUEUE="removedFromQueue",e}({});class t extends Event{constructor(e,s){super(e,s)}}var i=e.classPrivateFieldLooseKey("name"),a=e.classPrivateFieldLooseKey("listeners");class o{constructor(s){Object.defineProperty(this,i,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),this.subscribe=s=>(e.classPrivateFieldLooseBase(this,a)[a].add(s),()=>e.classPrivateFieldLooseBase(this,a)[a].delete(s)),this.unsubscribe=s=>e.classPrivateFieldLooseBase(this,a)[a].delete(s),this.publish=s=>{if(e.classPrivateFieldLooseBase(this,a)[a]?.size)for(const t of e.classPrivateFieldLooseBase(this,a)[a])t(s)},this.toString=()=>`TinyStateMachineSate: ${e.classPrivateFieldLooseBase(this,i)[i]}`,e.classPrivateFieldLooseBase(this,i)[i]=s,e.classPrivateFieldLooseBase(this,a)[a]=new Set}get name(){return e.classPrivateFieldLooseBase(this,i)[i]}get[Symbol.toStringTag](){return`TinyStateMachineSate: ${e.classPrivateFieldLooseBase(this,i)[i]}`}}var r=e.classPrivateFieldLooseKey("states"),l=e.classPrivateFieldLooseKey("listeners"),n=e.classPrivateFieldLooseKey("currentState"),c=e.classPrivateFieldLooseKey("getStateByName"),d=e.classPrivateFieldLooseKey("getStateByState");const h=function*(){let e,s=h.IS_RUNNING;for(;;)if(e=yield s,e===h.DO_END){s=h.IS_FINITE,yield s;break}return yield*[1,2,3],yield 123,10};h.DO_END="__DO__END__",h.IS_FINITE="__IS__FINITE__",h.IS_RUNNING="__IS__RUNNING__",exports.TinyStateMachine=class{constructor(i){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,n,{writable:!0,value:void 0}),this.addState=s=>{e.classPrivateFieldLooseBase(this,r)[r].add(s)},this.removeState=s=>{e.classPrivateFieldLooseBase(this,r)[r].delete(s)},this.subscribe=s=>(e.classPrivateFieldLooseBase(this,l)[l].add(s),()=>e.classPrivateFieldLooseBase(this,l)[l].delete(s)),this.unsubscribe=s=>{e.classPrivateFieldLooseBase(this,l)[l].delete(s)},this.publish=(s,t)=>{if(e.classPrivateFieldLooseBase(this,l)[l]?.size)for(const i of e.classPrivateFieldLooseBase(this,l)[l])i(s,t)},Object.defineProperty(this,c,{writable:!0,value:s=>Array.from(e.classPrivateFieldLooseBase(this,r)[r]).find((e=>e.name===s))}),Object.defineProperty(this,d,{writable:!0,value:s=>e.classPrivateFieldLooseBase(this,r)[r].has(s)?s:void 0}),this.gotoState=i=>{const a="string"==typeof i?e.classPrivateFieldLooseBase(this,c)[c](i):e.classPrivateFieldLooseBase(this,d)[d](i);if(!a)throw Error(`TinyStateMachin::gotoState state not found: ${i}`);const o=e.classPrivateFieldLooseBase(this,n)[n];return e.classPrivateFieldLooseBase(this,n)[n]=a,this.publish(new t(s.TRANSITIONED_FROM),o),this.publish(new t(s.TRANSITIONED_TO),a),o?.publish(new t(s.TRANSITIONED_FROM)),e.classPrivateFieldLooseBase(this,n)[n].publish(new t(s.TRANSITIONED_TO)),!0},this.next=()=>{let s;const t=Array.from(e.classPrivateFieldLooseBase(this,r)[r]);if(!e.classPrivateFieldLooseBase(this,n)[n])return[s]=t,this.gotoState(s)?s:null;const i=t.findIndex((s=>s===e.classPrivateFieldLooseBase(this,n)[n]));return i<e.classPrivateFieldLooseBase(this,r)[r].size-2?(s=t[i+1],this.gotoState(s)?s:null):null},e.classPrivateFieldLooseBase(this,r)[r]=i,e.classPrivateFieldLooseBase(this,l)[l]=new Set}get states(){return e.classPrivateFieldLooseBase(this,r)[r]}get currentState(){return e.classPrivateFieldLooseBase(this,n)[n]}},exports.TinyStateMachineEvent=t,exports.TinyStateMachineEventType=s,exports.TinyStateMachineState=o,exports.createStates=e=>new Set(e.map((e=>new o(e)))),exports.stateIterator=h;
2
+ //# sourceMappingURL=tiny-state-machine.base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tiny-state-machine.base.js","sources":["../../../../../../../../src/core/utils/appState/stateMachine/tiny-state-machine.base.ts"],"sourcesContent":["export enum TinyStateMachineEventType {\n CHANGE = 'change',\n TRANSITIONED_TO = 'transitionedTo',\n TRANSITIONED_FROM = 'transitionedFrom',\n ADDED_TO_QUEUE = 'addedToQueue',\n REMOVED_FROM_QUEUE = 'removedFromQueue'\n}\n\nexport type TinyStateMachineListenerCallBack = (\n stateEvent: TinyStateMachineEvent,\n state?: ITinyStateMachineState\n) => void;\n\nexport class TinyStateMachineEvent extends Event {\n constructor(type: TinyStateMachineEventType, eventInitDict?: any) {\n super(type, eventInitDict)\n }\n}\n\ninterface IPubSub {\n subscribe: (listener: TinyStateMachineListenerCallBack) => () => void\n unsubscribe: (listener: TinyStateMachineListenerCallBack) => void\n publish: (...args: any[]) => void\n}\n\nexport interface ITinyStateMachineState extends IPubSub {\n name: string\n}\n\nexport class TinyStateMachineState implements ITinyStateMachineState {\n #name: string\n\n #listeners: Set<TinyStateMachineListenerCallBack>\n\n constructor(name: string) {\n this.#name = name\n this.#listeners = new Set<TinyStateMachineListenerCallBack>()\n }\n\n get name(): string {\n return this.#name\n }\n\n subscribe = (listener: TinyStateMachineListenerCallBack): () => void => {\n this.#listeners.add(listener)\n return () => this.#listeners.delete(listener)\n }\n\n unsubscribe = (listener: TinyStateMachineListenerCallBack): boolean => this.#listeners.delete(listener)\n\n publish = (event: TinyStateMachineEvent): void => {\n if (!this.#listeners?.size) {\n return\n }\n // eslint-disable-next-line no-restricted-syntax\n for (const listener of this.#listeners) {\n listener(event)\n }\n }\n\n toString = (): string => `TinyStateMachineSate: ${this.#name}`\n\n get [Symbol.toStringTag](): string {\n return `TinyStateMachineSate: ${this.#name}`\n }\n}\n\nexport interface ITinyStateMachine extends IPubSub {\n states: Set<TinyStateMachineState>\n addState: (state: TinyStateMachineState) => void\n removeState: (state: TinyStateMachineState) => void\n currentState: undefined | TinyStateMachineState\n gotoState: (state: TinyStateMachineState) => void | boolean\n\n}\n\nexport const createStates = (stateNames: string[]): Set<TinyStateMachineState> => new Set(\n stateNames.map((name: string) => new TinyStateMachineState(name)),\n)\n\nexport class TinyStateMachine implements ITinyStateMachine {\n #states: Set<TinyStateMachineState>\n\n #listeners: Set<TinyStateMachineListenerCallBack>\n\n #currentState: undefined | TinyStateMachineState\n\n constructor(states: Set<TinyStateMachineState>) {\n this.#states = states\n this.#listeners = new Set<TinyStateMachineListenerCallBack>()\n }\n\n addState = (state: TinyStateMachineState): void => {\n this.#states.add(state)\n }\n\n removeState = (state: TinyStateMachineState): void => {\n this.#states.delete(state)\n }\n\n get states (): Set<TinyStateMachineState> {\n return this.#states\n }\n\n get currentState (): undefined | TinyStateMachineState {\n return this.#currentState\n }\n\n subscribe = (listener: TinyStateMachineListenerCallBack): () => void => {\n this.#listeners.add(listener)\n return () => this.#listeners.delete(listener)\n }\n\n unsubscribe = (listener: TinyStateMachineListenerCallBack): void => {\n this.#listeners.delete(listener)\n }\n\n publish = (event: TinyStateMachineEvent, state?: TinyStateMachineState): void => {\n if (!this.#listeners?.size) {\n return\n }\n // eslint-disable-next-line no-restricted-syntax\n for (const listener of this.#listeners) {\n listener(event, state)\n }\n }\n\n #getStateByName = (stateName: string): undefined | TinyStateMachineState => Array\n .from(this.#states).find((state: TinyStateMachineState) => state.name === stateName)\n\n #getStateByState\n = (state: TinyStateMachineState): undefined | TinyStateMachineState => (this.#states.has(state) ? state : undefined)\n\n gotoState = (state: TinyStateMachineState | string): void | boolean => {\n const foundState = typeof state === 'string'\n ? this.#getStateByName(state as string)\n : this.#getStateByState(state as TinyStateMachineState)\n\n if (!foundState) {\n throw Error(`TinyStateMachin::gotoState state not found: ${state}`)\n }\n\n const prevState: undefined | TinyStateMachineState = this.#currentState\n\n this.#currentState = foundState\n this.publish(new TinyStateMachineEvent(TinyStateMachineEventType.TRANSITIONED_FROM), prevState)\n this.publish(new TinyStateMachineEvent(TinyStateMachineEventType.TRANSITIONED_TO), foundState)\n\n prevState?.publish(new TinyStateMachineEvent(TinyStateMachineEventType.TRANSITIONED_FROM))\n this.#currentState.publish(new TinyStateMachineEvent(TinyStateMachineEventType.TRANSITIONED_TO))\n return true\n }\n\n next = (): TinyStateMachineState | null => {\n let nextState: TinyStateMachineState\n const arrayOfStates: TinyStateMachineState[] = Array.from(this.#states)\n\n if (!this.#currentState) {\n [nextState] = arrayOfStates\n\n return this.gotoState(nextState) ? nextState : null\n }\n\n const currentStateIndex = arrayOfStates\n .findIndex((state: TinyStateMachineState) => state === this.#currentState)\n\n if (currentStateIndex < this.#states.size - 2) {\n nextState = arrayOfStates[currentStateIndex + 1]\n return this.gotoState(nextState) ? nextState : null\n }\n\n return null\n }\n}\n\n\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const stateIterator = function* () {\n let operation: string\n let state: string = stateIterator.IS_RUNNING\n\n while (true) {\n // console.log('inside while loop')\n\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-ignore\n\n\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-ignore\n operation = yield state\n\n // // console.log('operation', operation)\n // // console.log('state', state)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (operation === stateIterator.DO_END) {\n state = stateIterator.IS_FINITE\n yield state\n break\n }\n }\n yield* [1, 2, 3]\n yield 123\n\n return 10\n}\n\nstateIterator.DO_END = '__DO__END__'\nstateIterator.IS_FINITE = '__IS__FINITE__'\nstateIterator.IS_RUNNING = '__IS__RUNNING__'\n"],"names":["TinyStateMachineEventType","TinyStateMachineEvent","Event","constructor","type","eventInitDict","super","_name","_classPrivateFieldLooseKey","_listeners","TinyStateMachineState","name","Object","defineProperty","this","writable","value","subscribe","listener","_classPrivateFieldLooseBase","classPrivateFieldLooseBase","add","delete","unsubscribe","publish","event","size","toString","Set","Symbol","toStringTag","_states","_listeners2","_currentState","_getStateByName","_getStateByState","stateIterator","operation","state","IS_RUNNING","DO_END","IS_FINITE","states","addState","removeState","stateName","Array","from","find","has","undefined","gotoState","foundState","Error","prevState","TRANSITIONED_FROM","TRANSITIONED_TO","next","nextState","arrayOfStates","currentStateIndex","findIndex","currentState","stateNames","map"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");exports.createStore=(r,t,o)=>{let n=r;const s=new Set,l=()=>n,u=function(){var r=e.asyncToGenerator((function*(e){n=e;for(const e of s){const r=e?.selector,t=r?r(n):n;void 0!==e.previousValue&&e.previousValue===t||(e.previousValue=t,yield e(t))}return n}));return function(e){return r.apply(this,arguments)}}(),c={getState:l,setState:u,subscribe:(e,r)=>{if(r&&e.selector&&e.selector!==r)throw new Error("Error, mismatchm selector, listener.selector !== selector.");return r&&!e.selector&&(e.selector=r),s.add(e),()=>s.delete(e)},unsubscribe:e=>{s.delete(e)}},i=t?Object.entries(t)?.reduce(((r,t)=>{let[n,s]=t;return{...r,[n]:e.asyncToGenerator((function*(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];const c=yield s(l,u,...r);return o&&u(o(l(),n,...r)),c}))}}),{}):null,a={...c,...i?{actions:{...i}}:{}};return a};
1
+ "use strict";var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),r=require("../../helpers/other.js");exports.createStore=(t,n,o)=>{let s=t;const l=new Set,c=()=>s,u=function(){var r=e.asyncToGenerator((function*(e){s=e;for(const e of l){const r=e?.selector,t=r?r(s):s;void 0!==e.previousValue&&e.previousValue===t||(e.previousValue=t,yield e(t))}return s}));return function(e){return r.apply(this,arguments)}}(),i={getState:c,setState:u,subscribe:(e,r)=>{if(r&&e.selector&&e.selector!==r)throw new Error("Error, mismatchm selector, listener.selector !== selector.");return r&&!e.selector&&(e.selector=r),e.selector&&(e.previousValue=e.selector(c())),l.add(e),()=>l.delete(e)},unsubscribe:e=>{l.delete(e)}},a=n?Object.entries(n)?.reduce(((t,n)=>{let[s,l]=n;return{...t,[s]:e.asyncToGenerator((function*(){const e=r.isFunctionAsync(l);e&&u({...c(),[`${s}-error`]:null,[`${s}-pending`]:!0});try{for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const r=yield l(c,u,...n);return o&&u(o(c(),s,...n)),e&&u({...c(),[`${s}-pending`]:!1}),r}catch(r){throw e&&u({...c(),[`${s}-pending`]:!1,[`${s}-error`]:r}),r}}))}}),{}):null,p={...i,...a?{actions:{...a}}:{}};return p};
2
2
  //# sourceMappingURL=store.vanillajs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.vanillajs.js","sources":["../../../../../../../../src/core/utils/appState/store/store.vanillajs.ts"],"sourcesContent":["\n// TinyStore, inspired by https://github.com/jherr/syncexternalstore/blob/main/csr/src/store.js\n\n/**\n * Represents the callback function for a store listener.\n */\nexport type ListenerCallBack<T> = (state: Partial<T>) => void\n\n/**\n * Represents a selector function that transforms the store state.\n */\n// export type Selector<T> = (state: Partial<T>) => Partial<T>;\nexport type SelectedValueType<T> = Partial<T> | Partial<keyof T>\n| string | number | boolean | undefined | string[] | number[] | boolean[] | undefined[];\nexport type Selector<T> = (state: Partial<T>) => SelectedValueType<T>;\n\n\n/**\n * Represents a listener for the store.\n */\nexport type Listener<T> = {\n selector?: Selector<T>\n previousValue?: SelectedValueType<T>\n} & ListenerCallBack<T>\n\n/**\n * Represents a store.\n */\nexport type Store<T> = {\n /**\n * Get the current state of the store.\n * @returns The current state of the store.\n */\n getState: () => Partial<T>\n /**\n * Set the state of the store.\n * @param state - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n setState: (state: Partial<T>) => Promise<Partial<T>>\n /**\n * Subscribe a listener to the store.\n * @param listener - The listener function to be subscribed.\n * @param selector - Optional selector function to transform the store state.\n * @returns A function to unsubscribe the listener.\n */\n subscribe: (listener: Listener<T>, selector?: Selector<T>) => () => void\n /**\n * Unubscribe a listener from the store.\n * @param listener - The listener function to be unsubscribed.\n */\n unsubscribe: (listener: Listener<T>) => void\n}\n// & { actions?: { [actionName: string]: ActionHandlerCaller } }\n\n/**\n * Represents a store with additional actions.\n */\nexport type StoreWithActions<T> = Store<T> & { actions: { [actionName: string]: ActionHandlerCaller<T> } }\n\n/**\n * Represents an action handler function.\n */\nexport type ActionHandler<T> = (\n getState: Store<T>['getState'], // Function to get the current state of the store\n setState: Store<T>['setState'], // Function to set the state of the store\n ...rest: unknown[]\n) => void | Partial<T> | Promise<void | Partial<T>>\n\n/**\n * Represents an reducer function.\n */\nexport type Reducer<T> = (\n state: Partial<T>,\n action: string,\n ...rest: unknown[]\n) => Partial<T>\n\n\n/**\n * Represents a function that calls an action handler.\n */\nexport type ActionHandlerCaller<T> = (...args: unknown[]) => void | Partial<T> | Promise<void | Partial<T>>\n\n\n/**\n * Creates a new store.\n * @param initialState - The initial state of the store.\n * @param actions - Optional actions for the store.\n * @returns The created store.\n */\nexport const createStore = <T>(\n initialState: Partial<T>,\n actions?: Record<string, ActionHandler<T>>,\n reducer?: Reducer<T>,\n): Store<T> | StoreWithActions<T> => {\n let currentState: Partial<T> = initialState\n const listeners = new Set<Listener<T>>()\n\n /**\n * Gets the current state of the store.\n * @returns The current state of the store.\n */\n const getState = (): Partial<T> => currentState\n\n // TODO debounce, batch? what is the meaningful time between setState ofr UI to be rendered and registerd by User?\n /**\n * Sets the state of the store.\n * @param newState - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n const setState = async (newState: Partial<T>): Promise<Partial<T>> => {\n currentState = newState\n\n // eslint-disable-next-line no-restricted-syntax\n for (const listener of listeners) {\n // has Listener selector?\n const selector: Selector<T> | undefined = listener?.selector\n\n // TODO compare selected value to the previous values of that listener/selector pair\n // if listener.previousValue === selector(currentState) no call\n // else listener.previousValue = selector(currentState) and call\n // l1 cache, weak references?\n const newValue: SelectedValueType<T> = selector ? selector(currentState) : currentState\n\n // TODO plugin equality\n if (listener.previousValue === undefined || listener.previousValue !== newValue) {\n listener.previousValue = newValue\n // eslint-disable-next-line no-await-in-loop\n await listener(newValue as Partial<T>)\n }\n }\n return currentState\n }\n\n /**\n * Represents the basic API of the store.\n */\n const storeBaseicApi: Store<T> = {\n /**\n * Get the current state of the store.\n * @returns The current state of the store.\n */\n getState,\n /**\n * Set the state of the store.\n * @param state - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n setState,\n /**\n * Subscribe a listener to the store.\n * @param listener - The listener function to be subscribed.\n * @returns A function to unsubscribe the listener.\n */\n subscribe: (listener: Listener<T>, selector?: Selector<T>) => {\n if (selector && listener.selector && listener.selector !== selector) {\n throw new Error('Error, mismatchm selector, listener.selector !== selector.')\n }\n if (selector && !listener.selector) {\n // eslint-disable-next-line no-param-reassign\n listener.selector = selector\n }\n listeners.add(listener)\n return () => listeners.delete(listener)\n },\n /**\n * Unsubscribe a listener from the store.\n * @param listener - The listener function to be unsubscribed.\n */\n unsubscribe: (listener: Listener<T>) => {\n listeners.delete(listener)\n },\n }\n\n /**\n * Resolves the actions and creates action handlers.\n */\n const resolvedActions: Record<string, ActionHandlerCaller<T>> | null | undefined\n = actions ? Object.entries(actions)?.reduce(\n (\n aggregator: Record<string, ActionHandlerCaller<T>>,\n [actionName, actionHandler]: [string, ActionHandler<T>],\n ) => ({\n ...aggregator,\n [actionName]: async(...rest: unknown[]): Promise<void | Partial<T>> => {\n const resultOfAction = await actionHandler(getState, setState, ...rest)\n\n if (reducer) {\n setState(reducer(getState(), actionName, ...rest))\n }\n return resultOfAction\n },\n }),\n {},\n ) : null\n\n /**\n * Represents the store combined with actions.\n */\n const storeCombinedWithActions = {\n ...storeBaseicApi,\n ...(resolvedActions ? { actions: { ...resolvedActions } } : {}),\n }\n\n return resolvedActions\n ? storeCombinedWithActions as StoreWithActions<T>\n : storeCombinedWithActions as Store<T>\n}\n"],"names":["createStore","initialState","actions","reducer","currentState","listeners","Set","getState","setState","_ref","_asyncToGenerator","newState","listener","selector","newValue","undefined","previousValue","_x","apply","this","arguments","storeBaseicApi","subscribe","Error","add","delete","unsubscribe","resolvedActions","Object","entries","reduce","aggregator","_ref2","actionName","actionHandler","_len","length","rest","Array","_key","resultOfAction","storeCombinedWithActions"],"mappings":"uGA2F2BA,CACzBC,EACAC,EACAC,KAEA,IAAIC,EAA2BH,EAC/B,MAAMI,EAAY,IAAIC,IAMhBC,EAAWA,IAAkBH,EAQ7BI,EAAQ,WAAA,IAAAC,EAAAC,oBAAG,UAAOC,GACtBP,EAAeO,EAGf,IAAK,MAAMC,KAAYP,EAAW,CAEhC,MAAMQ,EAAoCD,GAAUC,SAM9CC,EAAiCD,EAAWA,EAAST,GAAgBA,OAG5CW,IAA3BH,EAASI,eAA+BJ,EAASI,gBAAkBF,IACrEF,EAASI,cAAgBF,QAEnBF,EAASE,GAEnB,CACA,OAAOV,KACR,OAtBKI,SAAQS,GAAA,OAAAR,EAAAS,MAAAC,KAAAC,UAAA,EAAA,GA2BRC,EAA2B,CAK/Bd,WAMAC,WAMAc,UAAWA,CAACV,EAAuBC,KACjC,GAAIA,GAAYD,EAASC,UAAYD,EAASC,WAAaA,EACzD,MAAM,IAAIU,MAAM,8DAOlB,OALIV,IAAaD,EAASC,WAExBD,EAASC,SAAWA,GAEtBR,EAAUmB,IAAIZ,GACP,IAAMP,EAAUoB,OAAOb,EAAS,EAMzCc,YAAcd,IACZP,EAAUoB,OAAOb,EAAS,GAOxBe,EACFzB,EAAU0B,OAAOC,QAAQ3B,IAAU4B,QACnC,CACEC,EAAkDC,KAAA,IACjDC,EAAYC,GAA0CF,EAAA,MACnD,IACDD,EACHE,CAACA,GAAUvB,EAAAA,kBAAG,YAAyD,IAAA,IAAAyB,EAAAf,UAAAgB,OAAhDC,EAAIC,IAAAA,MAAAH,GAAAI,EAAA,EAAAA,EAAAJ,EAAAI,IAAJF,EAAIE,GAAAnB,UAAAmB,GACzB,MAAMC,QAAuBN,EAAc3B,EAAUC,KAAa6B,GAKlE,OAHIlC,GACFK,EAASL,EAAQI,IAAY0B,KAAeI,IAEvCG,KAEV,GACD,CAAA,GACE,KAKAC,EAA2B,IAC5BpB,KACCM,EAAkB,CAAEzB,QAAS,IAAKyB,IAAsB,CAAE,GAGhE,OACIc,CACoC"}
1
+ {"version":3,"file":"store.vanillajs.js","sources":["../../../../../../../../src/core/utils/appState/store/store.vanillajs.ts"],"sourcesContent":["\n// TinyStore, inspired by https://github.com/jherr/syncexternalstore/blob/main/csr/src/store.js\n\nimport { isFunctionAsync } from '../../helpers'\n\n/**\n * Represents the callback function for a store listener.\n */\nexport type ListenerCallBack<T> = (state: Partial<T>) => void\n\n/**\n * Represents a selector function that transforms the store state.\n */\n// export type Selector<T> = (state: Partial<T>) => Partial<T>;\nexport type SelectedValueType<T> = Partial<T> | Partial<keyof T>\n| string | number | boolean | undefined | string[] | number[] | boolean[] | undefined[];\nexport type Selector<T> = (state: Partial<T>) => SelectedValueType<T>;\n\n\n/**\n * Represents a listener for the store.\n */\nexport type Listener<T> = {\n selector?: Selector<T>\n previousValue?: SelectedValueType<T>\n} & ListenerCallBack<T>\n\n/**\n * Represents a store.\n */\nexport type Store<T> = {\n /**\n * Get the current state of the store.\n * @returns The current state of the store.\n */\n getState: () => Partial<T>\n /**\n * Set the state of the store.\n * @param state - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n setState: (state: Partial<T>) => Promise<Partial<T>>\n /**\n * Subscribe a listener to the store.\n * @param listener - The listener function to be subscribed.\n * @param selector - Optional selector function to transform the store state.\n * @returns A function to unsubscribe the listener.\n */\n subscribe: (listener: Listener<T>, selector?: Selector<T>) => () => void\n /**\n * Unubscribe a listener from the store.\n * @param listener - The listener function to be unsubscribed.\n */\n unsubscribe: (listener: Listener<T>) => void\n}\n// & { actions?: { [actionName: string]: ActionHandlerCaller } }\n\n/**\n * Represents a store with additional actions.\n */\nexport type StoreWithActions<T> = Store<T> & { actions: { [actionName: string]: ActionHandlerCaller<T> } }\n\n/**\n * Represents an action handler function.\n */\nexport type ActionHandler<T> = (\n getState: Store<T>['getState'], // Function to get the current state of the store\n setState: Store<T>['setState'], // Function to set the state of the store\n ...rest: unknown[]\n) => void | Partial<T> | Promise<void | Partial<T>>\n\n/**\n * Represents an reducer function.\n */\nexport type Reducer<T> = (\n state: Partial<T>,\n action: string,\n ...rest: unknown[]\n) => Partial<T>\n\n\n/**\n * Represents a function that calls an action handler.\n */\nexport type ActionHandlerCaller<T> = (...args: unknown[]) => void | Partial<T> | Promise<void | Partial<T>>\n\n\n/**\n * Creates a new store.\n * @param initialState - The initial state of the store.\n * @param actions - Optional actions for the store.\n * @returns The created store.\n */\nexport const createStore = <T>(\n initialState: Partial<T>,\n actions?: Record<string, ActionHandler<T>>,\n reducer?: Reducer<T>,\n): Store<T> | StoreWithActions<T> => {\n let currentState: Partial<T> = initialState\n const listeners = new Set<Listener<T>>()\n\n /**\n * Gets the current state of the store.\n * @returns The current state of the store.\n */\n const getState = (): Partial<T> => currentState\n\n // TODO debounce, batch? what is the meaningful time between setState ofr UI to be rendered and registerd by User?\n /**\n * Sets the state of the store.\n * @param newState - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n const setState = async (newState: Partial<T>): Promise<Partial<T>> => {\n currentState = newState\n\n // eslint-disable-next-line no-restricted-syntax\n for (const listener of listeners) {\n // has Listener selector?\n const selector: Selector<T> | undefined = listener?.selector\n\n // TODO compare selected value to the previous values of that listener/selector pair\n // if listener.previousValue === selector(currentState) no call\n // else listener.previousValue = selector(currentState) and call\n // l1 cache, weak references?\n const newValue: SelectedValueType<T> = selector ? selector(currentState) : currentState\n\n // TODO plugin equality\n if (listener.previousValue === undefined || listener.previousValue !== newValue) {\n listener.previousValue = newValue\n // eslint-disable-next-line no-await-in-loop\n await listener(newValue as Partial<T>)\n }\n }\n return currentState\n }\n\n /**\n * Represents the basic API of the store.\n */\n const storeBaseicApi: Store<T> = {\n /**\n * Get the current state of the store.\n * @returns The current state of the store.\n */\n getState,\n /**\n * Set the state of the store.\n * @param state - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n setState,\n /**\n * Subscribe a listener to the store.\n * @param listener - The listener function to be subscribed.\n * @returns A function to unsubscribe the listener.\n */\n subscribe: (listener: Listener<T>, selector?: Selector<T>) => {\n if (selector && listener.selector && listener.selector !== selector) {\n throw new Error('Error, mismatchm selector, listener.selector !== selector.')\n }\n if (selector && !listener.selector) {\n // eslint-disable-next-line no-param-reassign\n listener.selector = selector\n }\n\n if (listener.selector) {\n // setting the previousValue for the next cache/equality check\n // eslint-disable-next-line no-param-reassign\n listener.previousValue = listener.selector(getState())\n }\n\n listeners.add(listener)\n return () => listeners.delete(listener)\n },\n /**\n * Unsubscribe a listener from the store.\n * @param listener - The listener function to be unsubscribed.\n */\n unsubscribe: (listener: Listener<T>) => {\n listeners.delete(listener)\n },\n }\n\n /**\n * Resolves the actions and creates action handlers.\n */\n const resolvedActions: Record<string, ActionHandlerCaller<T>> | null | undefined\n = actions ? Object.entries(actions)?.reduce(\n (\n aggregator: Record<string, ActionHandlerCaller<T>>,\n [actionName, actionHandler]: [string, ActionHandler<T>],\n ) => ({\n ...aggregator,\n [actionName]: async(...rest: unknown[]): Promise<void | Partial<T>> => {\n // TODO try to not call subscriber too many times becuase of -error and -pending values\n const isAsync = isFunctionAsync(actionHandler as () => unknown)\n\n if (isAsync) {\n setState({\n ...getState(),\n [`${actionName}-error`]: null,\n [`${actionName}-pending`]: true,\n })\n }\n\n try {\n const resultOfAction = await actionHandler(getState, setState, ...rest)\n\n // TODO try to mutate state only once with the results, that means pass custom setState to action,\n // so that it would matk pending and error already inside action\n if (reducer) {\n setState(reducer(getState(), actionName, ...rest))\n }\n\n if (isAsync) {\n setState({ ...getState(), [`${actionName}-pending`]: false })\n }\n\n return resultOfAction\n } catch (error) {\n if (isAsync) {\n setState({\n ...getState(),\n [`${actionName}-pending`]: false,\n [`${actionName}-error`]: error,\n })\n }\n throw error\n }\n },\n }),\n {},\n ) : null\n\n /**\n * Represents the store combined with actions.\n */\n const storeCombinedWithActions = {\n ...storeBaseicApi,\n ...(resolvedActions ? { actions: { ...resolvedActions } } : {}),\n }\n\n return resolvedActions\n ? storeCombinedWithActions as StoreWithActions<T>\n : storeCombinedWithActions as Store<T>\n}\n"],"names":["createStore","initialState","actions","reducer","currentState","listeners","Set","getState","setState","_ref","_asyncToGenerator","newState","listener","selector","newValue","undefined","previousValue","_x","apply","this","arguments","storeBaseicApi","subscribe","Error","add","delete","unsubscribe","resolvedActions","Object","entries","reduce","aggregator","_ref2","actionName","actionHandler","isAsync","isFunctionAsync","_len","length","rest","Array","_key","resultOfAction","error","storeCombinedWithActions"],"mappings":"2IA6F2BA,CACzBC,EACAC,EACAC,KAEA,IAAIC,EAA2BH,EAC/B,MAAMI,EAAY,IAAIC,IAMhBC,EAAWA,IAAkBH,EAQ7BI,EAAQ,WAAA,IAAAC,EAAAC,oBAAG,UAAOC,GACtBP,EAAeO,EAGf,IAAK,MAAMC,KAAYP,EAAW,CAEhC,MAAMQ,EAAoCD,GAAUC,SAM9CC,EAAiCD,EAAWA,EAAST,GAAgBA,OAG5CW,IAA3BH,EAASI,eAA+BJ,EAASI,gBAAkBF,IACrEF,EAASI,cAAgBF,QAEnBF,EAASE,GAEnB,CACA,OAAOV,KACR,OAtBKI,SAAQS,GAAA,OAAAR,EAAAS,MAAAC,KAAAC,UAAA,EAAA,GA2BRC,EAA2B,CAK/Bd,WAMAC,WAMAc,UAAWA,CAACV,EAAuBC,KACjC,GAAIA,GAAYD,EAASC,UAAYD,EAASC,WAAaA,EACzD,MAAM,IAAIU,MAAM,8DAclB,OAZIV,IAAaD,EAASC,WAExBD,EAASC,SAAWA,GAGlBD,EAASC,WAGXD,EAASI,cAAgBJ,EAASC,SAASN,MAG7CF,EAAUmB,IAAIZ,GACP,IAAMP,EAAUoB,OAAOb,EAAS,EAMzCc,YAAcd,IACZP,EAAUoB,OAAOb,EAAS,GAOxBe,EACFzB,EAAU0B,OAAOC,QAAQ3B,IAAU4B,QACnC,CACEC,EAAkDC,KAAA,IACjDC,EAAYC,GAA0CF,EAAA,MACnD,IACDD,EACHE,CAACA,GAAUvB,EAAAA,kBAAG,YAEZ,MAAMyB,EAAUC,kBAAgBF,GAE5BC,GACF3B,EAAS,IACJD,IACH,CAAC,GAAG0B,WAAqB,KACzB,CAAC,GAAGA,cAAuB,IAI/B,IAAI,IAAA,IAAAI,EAAAjB,UAAAkB,OAZiBC,EAAIC,IAAAA,MAAAH,GAAAI,EAAA,EAAAA,EAAAJ,EAAAI,IAAJF,EAAIE,GAAArB,UAAAqB,GAavB,MAAMC,QAAuBR,EAAc3B,EAAUC,KAAa+B,GAYlE,OARIpC,GACFK,EAASL,EAAQI,IAAY0B,KAAeM,IAG1CJ,GACF3B,EAAS,IAAKD,IAAY,CAAC,GAAG0B,cAAuB,IAGhDS,CACR,CAAC,MAAOC,GAQP,MAPIR,GACF3B,EAAS,IACJD,IACH,CAAC,GAAG0B,cAAuB,EAC3B,CAAC,GAAGA,WAAqBU,IAGvBA,CACR,KAEH,GACD,CAAA,GACE,KAKAC,EAA2B,IAC5BvB,KACCM,EAAkB,CAAEzB,QAAS,IAAKyB,IAAsB,CAAE,GAGhE,OACIiB,CACoC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useStore.react.js","sources":["../../../../../../../../src/core/utils/appState/store/useStore.react.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react'\n\nimport { Store, StoreWithActions, Selector } from './store.vanillajs'\n\n\n/**\n * Represents the type for the partial store state used in the `useStore` hook.\n */\nexport type useStoreType<T> = Partial<T>\n\nexport type useStoreWithSetterType<T> = [Partial<T>, Store<T>['setState']]\n\ntype returnSetterTrueType = true\n\nexport function useStore<T>(\n store: Store<T> | StoreWithActions<T>,\n selector?: Selector<T>): useStoreType<T>\n\nexport function useStore<T>(\n store: Store<T> | StoreWithActions<T>,\n selector?: Selector<T>,\n returnSetter?: returnSetterTrueType): useStoreWithSetterType<T>\n/**\n * Custom hook to subscribe to a store and retrieve the selected state.\n * @param store - The store to subscribe to.\n * @param selector - Optional selector function to transform the store state.\n * @param returnSetter - Optional flag to have setState returned\n * @returns The selected state from the store. or selected state and seState tuple\n */\nexport function useStore<T>(\n store: Store<T> | StoreWithActions<T>,\n selector: Selector<T> = (state: Partial<T>): Partial<T> => state,\n returnSetter = false,\n // TODO pass selector\n // useSyncExternalStore((...args) => {\n // args[0].selector?? store.subscribe(...args) }, () => selector(store.getState()));\n): useStoreType<T> | useStoreWithSetterType<T> {\n const getter = useSyncExternalStore(store.subscribe, () => (selector(store.getState()) as Partial<T>))\n\n if (returnSetter) {\n return [getter, store.setState] as useStoreWithSetterType<T>\n }\n\n return getter as useStoreType<T>\n}\n\n/**\n * Represents the type for the API returned by the `useStoreApi` hook.\n */\nexport type useStoreApiType<T> = [\n useStoreType<T>,\n Store<T>['getState'],\n Store<T>['setState'],\n StoreWithActions<T>['actions'],\n]\n\n/**\n * Custom hook to retrieve the store API including state, getters, setters, and actions (if applicable).\n * @param store - The store to retrieve the API from.\n * @param selector - Optional selector function to transform the store state.\n * @returns The store API including state, getters, setters, and actions (if applicable).\n */\nexport function useStoreApi<T>(\n store: Store<T>,\n selector: Selector<T> = (state: Partial<T>): Partial<T> => state,\n): useStoreApiType<T> {\n return [\n useStore(store, selector),\n store.getState,\n store.setState,\n (store as StoreWithActions<T>).actions,\n ]\n}\n"],"names":["useStore","store","selector","arguments","length","undefined","state","returnSetter","getter","useSyncExternalStore","subscribe","getState","setState","actions"],"mappings":"oCA6BO,SAASA,EACdC,GAM6C,IAL7CC,EAAqBC,UAAAC,OAAAD,QAAAE,IAAAF,UAAAE,GAAAF,UAAIG,GAAAA,GAAkCA,EAC3DC,EAAYJ,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,GAKZ,MAAMK,EAASC,uBAAqBR,EAAMS,WAAW,IAAOR,EAASD,EAAMU,cAE3E,OAAIJ,EACK,CAACC,EAAQP,EAAMW,UAGjBJ,CACT,wCAkBO,SACLP,GAGA,MAAO,CACLD,EAASC,EAHUE,UAAAC,OAAAD,QAAAE,IAAAF,UAAAE,GAAAF,UAAIG,GAAAA,GAAkCA,GAIzDL,EAAMU,SACNV,EAAMW,SACLX,EAA8BY,QAEnC"}
1
+ {"version":3,"file":"useStore.react.js","sources":["../../../../../../../../src/core/utils/appState/store/useStore.react.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react'\n\nimport { Store, StoreWithActions, Selector } from './store.vanillajs'\n\n\n/**\n * Represents the type for the partial store state used in the `useStore` hook.\n */\nexport type useStoreType<T> = Partial<T>\n\nexport type useStoreWithSetterType<T> = [Partial<T>, Store<T>['setState']]\n\ntype returnSetterTrueType = true\n\nexport function useStore<T>(\n store: Store<T> | StoreWithActions<T>,\n selector?: Selector<T>): useStoreType<T>\n\nexport function useStore<T>(\n store: Store<T> | StoreWithActions<T>,\n selector?: Selector<T>,\n returnSetter?: returnSetterTrueType): useStoreWithSetterType<T>\n/**\n * Custom hook to subscribe to a store and retrieve the selected state.\n * @param store - The store to subscribe to.\n * @param selector - Optional selector function to transform the store state.\n * @param returnSetter - Optional flag to have setState returned\n * @returns The selected state from the store. or selected state and seState tuple\n */\nexport function useStore<T>(\n store: Store<T> | StoreWithActions<T>,\n selector: Selector<T> = (state: Partial<T>): Partial<T> => state,\n returnSetter = false,\n // TODO pass selector\n // useSyncExternalStore((...args) => {\n // args[0].selector?? store.subscribe(...args) }, () => selector(store.getState()));\n): useStoreType<T> | useStoreWithSetterType<T> {\n const selectedValues = useSyncExternalStore(store.subscribe, () => (selector(store.getState()) as Partial<T>))\n\n if (returnSetter) {\n return [selectedValues, store.setState] as useStoreWithSetterType<T>\n }\n\n return selectedValues as useStoreType<T>\n}\n\n/**\n * Represents the type for the API returned by the `useStoreApi` hook.\n */\nexport type useStoreApiType<T> = [\n useStoreType<T>,\n Store<T>['getState'],\n Store<T>['setState'],\n StoreWithActions<T>['actions'],\n]\n\n/**\n * Custom hook to retrieve the store API including state, getters, setters, and actions (if applicable).\n * @param store - The store to retrieve the API from.\n * @param selector - Optional selector function to transform the store state.\n * @returns The store API including state, getters, setters, and actions (if applicable).\n */\nexport function useStoreApi<T>(\n store: Store<T>,\n selector: Selector<T> = (state: Partial<T>): Partial<T> => state,\n): useStoreApiType<T> {\n return [\n useStore(store, selector),\n store.getState,\n store.setState,\n (store as StoreWithActions<T>).actions,\n ]\n}\n"],"names":["useStore","store","selector","arguments","length","undefined","state","returnSetter","selectedValues","useSyncExternalStore","subscribe","getState","setState","actions"],"mappings":"oCA6BO,SAASA,EACdC,GAM6C,IAL7CC,EAAqBC,UAAAC,OAAAD,QAAAE,IAAAF,UAAAE,GAAAF,UAAIG,GAAAA,GAAkCA,EAC3DC,EAAYJ,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,GAKZ,MAAMK,EAAiBC,uBAAqBR,EAAMS,WAAW,IAAOR,EAASD,EAAMU,cAEnF,OAAIJ,EACK,CAACC,EAAgBP,EAAMW,UAGzBJ,CACT,wCAkBO,SACLP,GAGA,MAAO,CACLD,EAASC,EAHUE,UAAAC,OAAAD,QAAAE,IAAAF,UAAAE,GAAAF,UAAIG,GAAAA,GAAkCA,GAIzDL,EAAMU,SACNV,EAAMW,SACLX,EAA8BY,QAEnC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("ramda");const t=e.memoizeWith(e.identity),r=e.memoizeWith((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return JSON.stringify(t)}));exports.debounce=function(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var o=arguments.length,i=new Array(o),m=0;m<o;m++)i[m]=arguments[m];const l=this,s=n&&!t;clearTimeout(t),t=setTimeout((()=>{clearTimeout(t),t=null,n||e.apply(l,i)}),r),s&&e.apply(l,i)}},exports.delay=e=>new Promise((t=>{setTimeout((()=>t(`delayed: ${e}`)),e)})),exports.memoize=t,exports.memoizeComplex=r,exports.memoizer=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return JSON.stringify(t)};return e.memoizeWith(t)},exports.nestedTernary=(e,t,r)=>e?t:r;
1
+ "use strict";var e=require("../../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("ramda");const r=t.memoizeWith(t.identity),o=t.memoizeWith((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return JSON.stringify(t)})),n=e.asyncToGenerator((function*(){})).constructor;exports.AsyncFunctionTemplate=n,exports.debounce=function(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];const u=this,l=o&&!t;clearTimeout(t),t=setTimeout((()=>{clearTimeout(t),t=null,o||e.apply(u,i)}),r),l&&e.apply(u,i)}},exports.delay=e=>new Promise((t=>{setTimeout((()=>t(`delayed: ${e}`)),e)})),exports.isFunctionAsync=e=>e.constructor===n.prototype.constructor,exports.memoize=r,exports.memoizeComplex=o,exports.memoizer=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return JSON.stringify(t)};return t.memoizeWith(e)},exports.nestedTernary=(e,t,r)=>e?t:r;
2
2
  //# sourceMappingURL=other.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"other.js","sources":["../../../../../../../src/core/utils/helpers/other.ts"],"sourcesContent":["import { memoizeWith, identity } from 'ramda'\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const nestedTernary = (condition: boolean, branchA: any, branchB: any): any => (condition ? branchA : branchB)\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport const memoize = memoizeWith(identity)\n\n// Beware fellow developer, this is to be used with caution and precison\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport const memoizeComplex = memoizeWith((...args) => JSON.stringify(args))\n\nexport const memoizer\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\n= (memoizeFunc = (...args): string => JSON.stringify(args)): ReturnType<typeof memoizeWith> => memoizeWith(memoizeFunc)\n\nexport const debounce = (func: () => void, wait = 100, immediate = false): () => void => {\n let timeout: any\n\n return function debounced(...args) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const context: unknown = this\n const later = (): void => {\n clearTimeout(timeout)\n timeout = null\n if (!immediate) {\n func.apply(context, args)\n }\n }\n const callNow = immediate && !timeout\n\n clearTimeout(timeout)\n timeout = setTimeout(later, wait)\n if (callNow) {\n func.apply(context, args)\n }\n }\n}\n\nexport const delay = (delay: number): Promise<string> => new Promise((resolve) => {\n setTimeout(() => resolve(`delayed: ${delay}`), delay)\n})\n"],"names":["nestedTernary","memoize","memoizeWith","identity","memoizeComplex","_len","arguments","length","args","Array","_key","JSON","stringify","func","timeout","wait","undefined","immediate","_len3","_key3","context","this","callNow","clearTimeout","setTimeout","later","apply","delay","Promise","resolve","memoizeFunc","_len2","_key2","condition","branchA","branchB"],"mappings":"oCAGaA,MAIAC,EAAUC,EAAWA,YAACC,YAKtBC,EAAiBF,EAAWA,aAAC,WAAA,IAAA,IAAAG,EAAAC,UAAAC,OAAIC,EAAIC,IAAAA,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAAJF,EAAIE,GAAAJ,UAAAI,GAAA,OAAKC,KAAKC,UAAUJ,EAAK,qBAOnD,SAACK,GAAgE,IACnFC,EADqCC,EAAIT,UAAAC,OAAA,QAAAS,IAAAV,UAAA,GAAAA,UAAA,GAAG,IAAKW,EAASX,UAAAC,OAAA,QAAAS,IAAAV,UAAA,IAAAA,UAAA,GAG9D,OAAO,WAA4B,IAAA,IAAAY,EAAAZ,UAAAC,OAANC,EAAIC,IAAAA,MAAAS,GAAAC,EAAA,EAAAA,EAAAD,EAAAC,IAAJX,EAAIW,GAAAb,UAAAa,GAI/B,MAAMC,EAAmBC,KAQnBC,EAAUL,IAAcH,EAE9BS,aAAaT,GACbA,EAAUU,YAVIC,KACZF,aAAaT,GACbA,EAAU,KACLG,GACHJ,EAAKa,MAAMN,EAASZ,EACtB,GAK0BO,GACxBO,GACFT,EAAKa,MAAMN,EAASZ,GAG1B,gBAEsBmB,GAAmC,IAAIC,SAASC,IACpEL,YAAW,IAAMK,EAAQ,YAAYF,MAAUA,EAAM,gEA5BrD,WAAA,IAACG,EAAWxB,UAAAC,OAAAD,QAAAU,IAAAV,UAAAU,GAAAV,UAAG,GAAA,WAAA,IAAA,IAAAyB,EAAAzB,UAAAC,OAAIC,EAAIC,IAAAA,MAAAsB,GAAAC,EAAA,EAAAA,EAAAD,EAAAC,IAAJxB,EAAIwB,GAAA1B,UAAA0B,GAAA,OAAarB,KAAKC,UAAUJ,EAAK,EAAA,OAAqCN,EAAAA,YAAY4B,EAAY,wBAd1F9B,CAACiC,EAAoBC,EAAcC,IAAuBF,EAAYC,EAAUC"}
1
+ {"version":3,"file":"other.js","sources":["../../../../../../../src/core/utils/helpers/other.ts"],"sourcesContent":["import { memoizeWith, identity } from 'ramda'\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const nestedTernary = (condition: boolean, branchA: any, branchB: any): any => (condition ? branchA : branchB)\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport const memoize = memoizeWith(identity)\n\n// Beware fellow developer, this is to be used with caution and precison\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport const memoizeComplex = memoizeWith((...args) => JSON.stringify(args))\n\nexport const memoizer\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\n= (memoizeFunc = (...args): string => JSON.stringify(args)): ReturnType<typeof memoizeWith> => memoizeWith(memoizeFunc)\n\nexport const debounce = (func: () => void, wait = 100, immediate = false): () => void => {\n let timeout: any\n\n return function debounced(...args) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const context: unknown = this\n const later = (): void => {\n clearTimeout(timeout)\n timeout = null\n if (!immediate) {\n func.apply(context, args)\n }\n }\n const callNow = immediate && !timeout\n\n clearTimeout(timeout)\n timeout = setTimeout(later, wait)\n if (callNow) {\n func.apply(context, args)\n }\n }\n}\n\nexport const delay = (delay: number): Promise<string> => new Promise((resolve) => {\n setTimeout(() => resolve(`delayed: ${delay}`), delay)\n})\n\nexport const AsyncFunctionTemplate = (async (): Promise<void> => {}).constructor\n\nexport const isFunctionAsync = (\n func: () => unknown,\n): boolean => func.constructor === AsyncFunctionTemplate.prototype.constructor\n"],"names":["nestedTernary","memoize","memoizeWith","identity","memoizeComplex","_len","arguments","length","args","Array","_key","JSON","stringify","AsyncFunctionTemplate","_asyncToGenerator","asyncToGenerator","constructor","func","timeout","wait","undefined","immediate","_len3","_key3","context","this","callNow","clearTimeout","setTimeout","later","apply","delay","Promise","resolve","prototype","memoizeFunc","_len2","_key2","condition","branchA","branchB"],"mappings":"mGAGaA,MAIAC,EAAUC,EAAWA,YAACC,YAKtBC,EAAiBF,EAAWA,aAAC,WAAA,IAAA,IAAAG,EAAAC,UAAAC,OAAIC,EAAIC,IAAAA,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAAJF,EAAIE,GAAAJ,UAAAI,GAAA,OAAKC,KAAKC,UAAUJ,EAAK,IAoC9DK,EAAwBC,EAAAC,kBAAC,YAA6B,IAAEC,6DA7B7C,SAACC,GAAgE,IACnFC,EADqCC,EAAIb,UAAAC,OAAA,QAAAa,IAAAd,UAAA,GAAAA,UAAA,GAAG,IAAKe,EAASf,UAAAC,OAAA,QAAAa,IAAAd,UAAA,IAAAA,UAAA,GAG9D,OAAO,WAA4B,IAAA,IAAAgB,EAAAhB,UAAAC,OAANC,EAAIC,IAAAA,MAAAa,GAAAC,EAAA,EAAAA,EAAAD,EAAAC,IAAJf,EAAIe,GAAAjB,UAAAiB,GAI/B,MAAMC,EAAmBC,KAQnBC,EAAUL,IAAcH,EAE9BS,aAAaT,GACbA,EAAUU,YAVIC,KACZF,aAAaT,GACbA,EAAU,KACLG,GACHJ,EAAKa,MAAMN,EAAShB,EACtB,GAK0BW,GACxBO,GACFT,EAAKa,MAAMN,EAAShB,GAG1B,gBAEsBuB,GAAmC,IAAIC,SAASC,IACpEL,YAAW,IAAMK,EAAQ,YAAYF,MAAUA,EAAM,4BAMrDd,GACYA,EAAKD,cAAgBH,EAAsBqB,UAAUlB,wEAnCjE,WAAA,IAACmB,EAAW7B,UAAAC,OAAAD,QAAAc,IAAAd,UAAAc,GAAAd,UAAG,GAAA,WAAA,IAAA,IAAA8B,EAAA9B,UAAAC,OAAIC,EAAIC,IAAAA,MAAA2B,GAAAC,EAAA,EAAAA,EAAAD,EAAAC,IAAJ7B,EAAI6B,GAAA/B,UAAA+B,GAAA,OAAa1B,KAAKC,UAAUJ,EAAK,EAAA,OAAqCN,EAAAA,YAAYiC,EAAY,wBAd1FnC,CAACsC,EAAoBC,EAAcC,IAAuBF,EAAYC,EAAUC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("./core/hooks/useApi.js"),r=require("./core/hooks/useToggle.js"),t=require("./core/hooks/useOutsideClick.js"),o=require("./core/hooks/useResize.js"),s=require("./core/hooks/useClassNames.js"),i=require("./core/hooks/useParseProps.js"),a=require("./core/hooks/useThemePreference.js"),n=require("./core/utils/helpers/birthnumber.validator.js"),p=require("./core/utils/helpers/birthnumberCZSKvalidator.js"),l=require("./core/utils/helpers/fileValidator.js"),u=require("./core/utils/helpers/date.js"),c=require("./core/utils/helpers/deviceInfo.js"),x=require("./core/utils/helpers/emailMatcher.js"),m=require("./core/utils/helpers/file.js"),d=require("./core/utils/helpers/objectOperations.js"),C=require("./core/utils/helpers/other.js"),h=require("./core/utils/helpers/textValueOperations.js"),j=require("./core/utils/helpers/valueOperations.js"),T=require("./core/utils/helpers/cancelableDelayedFunction.js"),v=require("./core/utils/helpers/ui.js"),S=require("./core/utils/keyExtractor.js"),y=require("./core/utils/date.js"),g=require("./core/utils/webComponents/webComponent.utils.js"),b=require("./core/utils/appState/store/store.vanillajs.js"),q=require("./core/utils/appState/store/store.vanillajs.templates.js"),f=require("./core/utils/appState/store/useStore.react.js"),F=require("./core/constants/ui.constants.js"),z=require("./core/ui/utils/style.js"),D=require("./core/ui/components/container/layoutBox/LayoutBox.js"),I=require("./core/ui/components/container/layoutBox/layoutBox.types.js"),L=require("./core/ui/components/container/lazyComponent/LazyComponent.js"),B=require("./core/ui/components/container/CollapsibleContainer.js"),E=require("./core/ui/components/container/ResizableContainer.js"),P=require("./core/ui/components/error/ErrorBoundary.js"),V=require("./core/ui/components/field/Field.js"),N=require("./core/ui/components/dividers/DividerLine.js"),O=require("./core/ui/components/icon/IconBase.js"),k=require("./core/ui/components/icon/Icon.js"),R=require("./core/ui/components/icon/IconWC.js"),A=require("./core/ui/components/molecules/layouts/FlowLayout.js");exports.useApi=e.useApi,exports.useToggle=r.useToggle,exports.outsideClickHandler=t.outsideClickHandler,exports.useOutsideClick=t.useOutsideClick,exports.useResize=o.useResize,exports.useClassNames=s.useClassNames,exports.useParseProps=i.useParseProps,exports.getBaseThemes=a.getBaseThemes,exports.observeThemePreference=a.observeThemePreference,exports.setTHemeClassNames=a.setTHemeClassNames,exports.switchColorTheme=a.switchColorTheme,exports.updateColorTheme=a.updateColorTheme,exports.useThemePreference=a.useThemePreference,exports.isBirthNumberValid=n.isBirthNumberValid,exports.getMatch=p.getMatch,exports.isValidFormat=p.isValidFormat,exports.isValidModulo11=p.isValidModulo11,exports.parse=p.parse,exports.regex=p.regex,exports.parseCSVdata=l.parseCSVdata,exports.validateCSVFile=l.validateCSVFile,exports.validateCSVlines=l.validateCSVlines,exports.validateJSONFile=l.validateJSONFile,exports.validateLineCellTrimmed=l.validateLineCellTrimmed,exports.validateLineNumColumns=l.validateLineNumColumns,exports.validateSDFFile=l.validateSDFFile,exports.DATE_FORMAT=u.DATE_FORMAT,exports.formatDateToTimestamp=u.formatDateToTimestamp,exports.getDate=u.getDate,exports.getDeviceId=c.getDeviceId,exports.emailMatch=x.emailMatch,exports.emailMatcher=x.emailMatcher,exports.regexBuilder=x.regexBuilder,exports.cleanCsvLines=m.cleanCsvLines,exports.formatFilePath=m.formatFilePath,exports.arrayToObjectTree=d.arrayToObjectTree,exports.chunkArray=d.chunkArray,exports.duplicatesInArray=d.duplicatesInArray,exports.formatJsonString=d.formatJsonString,exports.formatObj=d.formatObj,exports.formatObj2=d.formatObj2,exports.debounce=C.debounce,exports.delay=C.delay,exports.memoize=C.memoize,exports.memoizeComplex=C.memoizeComplex,exports.memoizer=C.memoizer,exports.nestedTernary=C.nestedTernary,exports.escapeRegExp=h.escapeRegExp,exports.fileNameExt=h.fileNameExt,exports.findStringInText=h.findStringInText,exports.normalizeString=h.normalizeString,exports.removeWhitespaces=h.removeWhitespaces,exports.sanitizeId=h.sanitizeId,exports.sanitizePathId=h.sanitizePathId,exports.toLowerCase=h.toLowerCase,exports.toUpperCase=h.toUpperCase,exports.truncateText=h.truncateText,exports.Operation=j.Operation,exports.decrementValue=j.decrementValue,exports.incerementValue=j.incerementValue,exports.numberDefined=j.numberDefined,exports.numberOperation=j.numberOperation,exports.restrictNumberInLimits=j.restrictNumberInLimits,exports.setValue=j.setValue,exports.cancelableSetInterval=T.cancelableSetInterval,exports.cancelableSetTimeout=T.cancelableSetTimeout,exports.anchorClick=v.anchorClick,exports.classNames=v.classNames,exports.generateId=v.generateId,exports.mapSerReplacer=v.mapSerReplacer,exports.noop=v.noop,exports.parseProps=v.parseProps,exports.keyExtractor=S.keyExtractor,exports.keyExtractorFunction=S.keyExtractorFunction,exports.dateRangeFormat=y.dateRangeFormat,exports.getDateTime=y.getDateTime,exports.getTimeFromNow=y.getTimeFromNow,exports.getTimeFromNowOriginal=y.getTimeFromNowOriginal,exports.getTimeTo=y.getTimeTo,exports.ced=g.ced,exports.createResolveAttribute=g.createResolveAttribute,exports.customElementDefine=g.customElementDefine,exports.resolveAttributes=g.resolveAttributes,exports.createStore=b.createStore,exports.createDataStore=q.createDataStore,exports.useStore=f.useStore,exports.useStoreApi=f.useStoreApi,exports.EventName=F.EventName,exports.calculateColors=z.calculateColors,exports.calculatePercColor=z.calculatePercColor,exports.convertHex=z.convertHex,exports.convertRGB=z.convertRGB,Object.defineProperty(exports,"defaultFontSize",{enumerable:!0,get:function(){return z.defaultFontSize}}),exports.pxToRem=z.pxToRem,exports.resolveStyleValue=z.resolveStyleValue,exports.setDefaultFontSize=z.setDefaultFontSize,exports.toHex=z.toHex,exports.LayoutBox=D.LayoutBox,exports.LayoutDirection=I.LayoutDirection,exports.LazyComponent=L.LazyComponent,exports.PendingBoundary=L.PendingBoundary,exports.createLazyModule=L.createLazyModule,exports.createLazyModuleWithStore=L.createLazyModuleWithStore,exports.wrapPromise=L.wrapPromise,exports.CollapsibleContainer=B.CollapsibleContainer,exports.ResizableContainer=E.ResizableContainer,exports.DefaultErrorComponent=P.DefaultErrorComponent,exports.ErrorBoundary=P.ErrorBoundary,exports.Field=V.Field,exports.Select=V.Select,exports.setIconColor=V.setIconColor,exports.setIconComponent=V.setIconComponent,exports.DividerHorizontal=N.DividerHorizontal,exports.DividerLine=N.DividerLine,exports.DividerVertical=N.DividerVertical,exports.IconBase=O.IconBase,exports.Icon=k.Icon,exports.ESIcon=R.ESIcon,exports.ESIconBase=R.ESIconBase,exports.FlowLayout=A.FlowLayout;
1
+ "use strict";var e=require("./core/hooks/useApi.js"),r=require("./core/hooks/useToggle.js"),t=require("./core/hooks/useOutsideClick.js"),o=require("./core/hooks/useResize.js"),s=require("./core/hooks/useClassNames.js"),i=require("./core/hooks/useParseProps.js"),a=require("./core/hooks/useThemePreference.js"),n=require("./core/utils/helpers/birthnumber.validator.js"),p=require("./core/utils/helpers/birthnumberCZSKvalidator.js"),l=require("./core/utils/helpers/fileValidator.js"),c=require("./core/utils/helpers/date.js"),u=require("./core/utils/helpers/deviceInfo.js"),x=require("./core/utils/helpers/emailMatcher.js"),m=require("./core/utils/helpers/file.js"),d=require("./core/utils/helpers/objectOperations.js"),h=require("./core/utils/helpers/other.js"),S=require("./core/utils/helpers/textValueOperations.js"),C=require("./core/utils/helpers/valueOperations.js"),T=require("./core/utils/helpers/cancelableDelayedFunction.js"),y=require("./core/utils/helpers/ui.js"),j=require("./core/utils/keyExtractor.js"),v=require("./core/utils/date.js"),g=require("./core/utils/webComponents/webComponent.utils.js"),b=require("./core/utils/appState/store/store.vanillajs.js"),q=require("./core/utils/appState/store/store.vanillajs.templates.js"),F=require("./core/utils/appState/store/useStore.react.js"),I=require("./core/utils/appState/peregrineMQ/peregrineMQ.js"),f=require("./core/utils/appState/peregrineMQ/index.js"),M=require("./core/utils/appState/stateMachine/tiny-state-machine.base.js"),z=require("./core/constants/ui.constants.js"),D=require("./core/ui/utils/style.js"),E=require("./core/ui/components/container/layoutBox/LayoutBox.js"),L=require("./core/ui/components/container/layoutBox/layoutBox.types.js"),P=require("./core/ui/components/container/lazyComponent/LazyComponent.js"),B=require("./core/ui/components/container/CollapsibleContainer.js"),V=require("./core/ui/components/container/ResizableContainer.js"),N=require("./core/ui/components/error/ErrorBoundary.js"),O=require("./core/ui/components/field/Field.js"),k=require("./core/ui/components/dividers/DividerLine.js"),A=require("./core/ui/components/icon/IconBase.js"),R=require("./core/ui/components/icon/Icon.js"),w=require("./core/ui/components/icon/IconWC.js"),H=require("./core/ui/components/molecules/layouts/FlowLayout.js");exports.useApi=e.useApi,exports.useToggle=r.useToggle,exports.outsideClickHandler=t.outsideClickHandler,exports.useOutsideClick=t.useOutsideClick,exports.useResize=o.useResize,exports.useClassNames=s.useClassNames,exports.useParseProps=i.useParseProps,exports.getBaseThemes=a.getBaseThemes,exports.observeThemePreference=a.observeThemePreference,exports.setTHemeClassNames=a.setTHemeClassNames,exports.switchColorTheme=a.switchColorTheme,exports.updateColorTheme=a.updateColorTheme,exports.useThemePreference=a.useThemePreference,exports.isBirthNumberValid=n.isBirthNumberValid,exports.getMatch=p.getMatch,exports.isValidFormat=p.isValidFormat,exports.isValidModulo11=p.isValidModulo11,exports.parse=p.parse,exports.regex=p.regex,exports.parseCSVdata=l.parseCSVdata,exports.validateCSVFile=l.validateCSVFile,exports.validateCSVlines=l.validateCSVlines,exports.validateJSONFile=l.validateJSONFile,exports.validateLineCellTrimmed=l.validateLineCellTrimmed,exports.validateLineNumColumns=l.validateLineNumColumns,exports.validateSDFFile=l.validateSDFFile,exports.DATE_FORMAT=c.DATE_FORMAT,exports.formatDateToTimestamp=c.formatDateToTimestamp,exports.getDate=c.getDate,exports.getDeviceId=u.getDeviceId,exports.emailMatch=x.emailMatch,exports.emailMatcher=x.emailMatcher,exports.regexBuilder=x.regexBuilder,exports.cleanCsvLines=m.cleanCsvLines,exports.formatFilePath=m.formatFilePath,exports.arrayToObjectTree=d.arrayToObjectTree,exports.chunkArray=d.chunkArray,exports.duplicatesInArray=d.duplicatesInArray,exports.formatJsonString=d.formatJsonString,exports.formatObj=d.formatObj,exports.formatObj2=d.formatObj2,exports.AsyncFunctionTemplate=h.AsyncFunctionTemplate,exports.debounce=h.debounce,exports.delay=h.delay,exports.isFunctionAsync=h.isFunctionAsync,exports.memoize=h.memoize,exports.memoizeComplex=h.memoizeComplex,exports.memoizer=h.memoizer,exports.nestedTernary=h.nestedTernary,exports.escapeRegExp=S.escapeRegExp,exports.fileNameExt=S.fileNameExt,exports.findStringInText=S.findStringInText,exports.normalizeString=S.normalizeString,exports.removeWhitespaces=S.removeWhitespaces,exports.sanitizeId=S.sanitizeId,exports.sanitizePathId=S.sanitizePathId,exports.toLowerCase=S.toLowerCase,exports.toUpperCase=S.toUpperCase,exports.truncateText=S.truncateText,exports.Operation=C.Operation,exports.decrementValue=C.decrementValue,exports.incerementValue=C.incerementValue,exports.numberDefined=C.numberDefined,exports.numberOperation=C.numberOperation,exports.restrictNumberInLimits=C.restrictNumberInLimits,exports.setValue=C.setValue,exports.cancelableSetInterval=T.cancelableSetInterval,exports.cancelableSetTimeout=T.cancelableSetTimeout,exports.anchorClick=y.anchorClick,exports.classNames=y.classNames,exports.generateId=y.generateId,exports.mapSerReplacer=y.mapSerReplacer,exports.noop=y.noop,exports.parseProps=y.parseProps,exports.keyExtractor=j.keyExtractor,exports.keyExtractorFunction=j.keyExtractorFunction,exports.dateRangeFormat=v.dateRangeFormat,exports.getDateTime=v.getDateTime,exports.getTimeFromNow=v.getTimeFromNow,exports.getTimeFromNowOriginal=v.getTimeFromNowOriginal,exports.getTimeTo=v.getTimeTo,exports.ced=g.ced,exports.createResolveAttribute=g.createResolveAttribute,exports.customElementDefine=g.customElementDefine,exports.resolveAttributes=g.resolveAttributes,exports.createStore=b.createStore,exports.createDataStore=q.createDataStore,exports.useStore=F.useStore,exports.useStoreApi=F.useStoreApi,exports.PeregrineMQ=I.PeregrineMQ,exports.PeregrineMQClearError=I.PeregrineMQClearError,exports.peregrineMQInstance=f.peregrineMQInstance,exports.TinyStateMachine=M.TinyStateMachine,exports.TinyStateMachineEvent=M.TinyStateMachineEvent,exports.TinyStateMachineEventType=M.TinyStateMachineEventType,exports.TinyStateMachineState=M.TinyStateMachineState,exports.createStates=M.createStates,exports.stateIterator=M.stateIterator,exports.EventName=z.EventName,exports.calculateColors=D.calculateColors,exports.calculatePercColor=D.calculatePercColor,exports.convertHex=D.convertHex,exports.convertRGB=D.convertRGB,Object.defineProperty(exports,"defaultFontSize",{enumerable:!0,get:function(){return D.defaultFontSize}}),exports.pxToRem=D.pxToRem,exports.resolveStyleValue=D.resolveStyleValue,exports.setDefaultFontSize=D.setDefaultFontSize,exports.toHex=D.toHex,exports.LayoutBox=E.LayoutBox,exports.LayoutDirection=L.LayoutDirection,exports.LazyComponent=P.LazyComponent,exports.PendingBoundary=P.PendingBoundary,exports.createLazyModule=P.createLazyModule,exports.createLazyModuleWithStore=P.createLazyModuleWithStore,exports.wrapPromise=P.wrapPromise,exports.CollapsibleContainer=B.CollapsibleContainer,exports.ResizableContainer=V.ResizableContainer,exports.DefaultErrorComponent=N.DefaultErrorComponent,exports.ErrorBoundary=N.ErrorBoundary,exports.Field=O.Field,exports.Select=O.Select,exports.setIconColor=O.setIconColor,exports.setIconComponent=O.setIconComponent,exports.DividerHorizontal=k.DividerHorizontal,exports.DividerLine=k.DividerLine,exports.DividerVertical=k.DividerVertical,exports.IconBase=A.IconBase,exports.Icon=R.Icon,exports.ESIcon=w.ESIcon,exports.ESIconBase=w.ESIconBase,exports.FlowLayout=H.FlowLayout;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- function n(n,r,t,e,o,a,i){try{var u=n[a](i),c=u.value}catch(n){return void t(n)}u.done?r(c):Promise.resolve(c).then(e,o)}function r(r){return function(){var t=this,e=arguments;return new Promise((function(o,a){var i=r.apply(t,e);function u(r){n(i,o,a,u,c,"next",r)}function c(r){n(i,o,a,u,c,"throw",r)}u(void 0)}))}}function t(){return t=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var e in t)({}).hasOwnProperty.call(t,e)&&(n[e]=t[e])}return n},t.apply(null,arguments)}export{r as asyncToGenerator,t as extends};
1
+ function n(n,e,r,t,o,a,i){try{var s=n[a](i),c=s.value}catch(n){return void r(n)}s.done?e(c):Promise.resolve(c).then(t,o)}function e(e){return function(){var r=this,t=arguments;return new Promise((function(o,a){var i=e.apply(r,t);function s(e){n(i,o,a,s,c,"next",e)}function c(e){n(i,o,a,s,c,"throw",e)}s(void 0)}))}}function r(n,e){if(!{}.hasOwnProperty.call(n,e))throw new TypeError("attempted to use private field on non-instance");return n}var t=0;function o(n){return"__private_"+t+++"_"+n}function a(){return a=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)({}).hasOwnProperty.call(r,t)&&(n[t]=r[t])}return n},a.apply(null,arguments)}export{e as asyncToGenerator,r as classPrivateFieldLooseBase,o as classPrivateFieldLooseKey,a as extends};
2
2
  //# sourceMappingURL=_rollupPluginBabelHelpers.js.map
@@ -0,0 +1,2 @@
1
+ var o={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};export{o as default};
2
+ //# sourceMappingURL=native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.js","sources":["../../../../../../../node_modules/uuid/dist/esm-browser/native.js"],"sourcesContent":["const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};"],"names":["native","randomUUID","crypto","bind"],"mappings":"AACA,IAAeA,EAAA,CACbC,WAFmC,oBAAXC,QAA0BA,OAAOD,YAAcC,OAAOD,WAAWE,KAAKD","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ let t;const e=new Uint8Array(16);function o(){if(!t&&(t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!t))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(e)}export{o as default};
2
+ //# sourceMappingURL=rng.js.map