@vuu-ui/vuu-layout 0.8.34 → 0.8.35

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 (248) hide show
  1. package/package.json +8 -10
  2. package/cjs/Component.js +0 -14
  3. package/cjs/Component.js.map +0 -1
  4. package/cjs/DraggableLayout.css +0 -18
  5. package/cjs/DraggableLayout.js +0 -24
  6. package/cjs/DraggableLayout.js.map +0 -1
  7. package/cjs/dock-layout/DockLayout.css +0 -36
  8. package/cjs/dock-layout/DockLayout.js +0 -27
  9. package/cjs/dock-layout/DockLayout.js.map +0 -1
  10. package/cjs/dock-layout/Drawer.css +0 -159
  11. package/cjs/dock-layout/Drawer.js +0 -87
  12. package/cjs/dock-layout/Drawer.js.map +0 -1
  13. package/cjs/drag-drop/BoxModel.js +0 -422
  14. package/cjs/drag-drop/BoxModel.js.map +0 -1
  15. package/cjs/drag-drop/DragState.js +0 -154
  16. package/cjs/drag-drop/DragState.js.map +0 -1
  17. package/cjs/drag-drop/Draggable.js +0 -192
  18. package/cjs/drag-drop/Draggable.js.map +0 -1
  19. package/cjs/drag-drop/DropMenu.css +0 -71
  20. package/cjs/drag-drop/DropMenu.js +0 -46
  21. package/cjs/drag-drop/DropMenu.js.map +0 -1
  22. package/cjs/drag-drop/DropTarget.js +0 -244
  23. package/cjs/drag-drop/DropTarget.js.map +0 -1
  24. package/cjs/drag-drop/DropTargetRenderer.css +0 -40
  25. package/cjs/drag-drop/DropTargetRenderer.js +0 -233
  26. package/cjs/drag-drop/DropTargetRenderer.js.map +0 -1
  27. package/cjs/flexbox/Flexbox.css +0 -45
  28. package/cjs/flexbox/Flexbox.js +0 -61
  29. package/cjs/flexbox/Flexbox.js.map +0 -1
  30. package/cjs/flexbox/FlexboxLayout.js +0 -30
  31. package/cjs/flexbox/FlexboxLayout.js.map +0 -1
  32. package/cjs/flexbox/FluidGrid.css +0 -134
  33. package/cjs/flexbox/FluidGrid.js +0 -78
  34. package/cjs/flexbox/FluidGrid.js.map +0 -1
  35. package/cjs/flexbox/FluidGridLayout.js +0 -14
  36. package/cjs/flexbox/FluidGridLayout.js.map +0 -1
  37. package/cjs/flexbox/Splitter.css +0 -148
  38. package/cjs/flexbox/Splitter.js +0 -113
  39. package/cjs/flexbox/Splitter.js.map +0 -1
  40. package/cjs/flexbox/flexbox-utils.js +0 -109
  41. package/cjs/flexbox/flexbox-utils.js.map +0 -1
  42. package/cjs/flexbox/useResponsiveSizing.js +0 -62
  43. package/cjs/flexbox/useResponsiveSizing.js.map +0 -1
  44. package/cjs/flexbox/useSplitterResizing.js +0 -209
  45. package/cjs/flexbox/useSplitterResizing.js.map +0 -1
  46. package/cjs/index.js.map +0 -1
  47. package/cjs/layout-action.js +0 -27
  48. package/cjs/layout-action.js.map +0 -1
  49. package/cjs/layout-header/Header.css +0 -9
  50. package/cjs/layout-header/Header.js +0 -122
  51. package/cjs/layout-header/Header.js.map +0 -1
  52. package/cjs/layout-provider/LayoutProvider.js +0 -178
  53. package/cjs/layout-provider/LayoutProvider.js.map +0 -1
  54. package/cjs/layout-provider/LayoutProviderContext.js +0 -14
  55. package/cjs/layout-provider/LayoutProviderContext.js.map +0 -1
  56. package/cjs/layout-provider/useLayoutDragDrop.js +0 -170
  57. package/cjs/layout-provider/useLayoutDragDrop.js.map +0 -1
  58. package/cjs/layout-reducer/flexUtils.js +0 -219
  59. package/cjs/layout-reducer/flexUtils.js.map +0 -1
  60. package/cjs/layout-reducer/insert-layout-element.js +0 -273
  61. package/cjs/layout-reducer/insert-layout-element.js.map +0 -1
  62. package/cjs/layout-reducer/layout-reducer.js +0 -198
  63. package/cjs/layout-reducer/layout-reducer.js.map +0 -1
  64. package/cjs/layout-reducer/layoutTypes.js +0 -41
  65. package/cjs/layout-reducer/layoutTypes.js.map +0 -1
  66. package/cjs/layout-reducer/layoutUtils.js +0 -226
  67. package/cjs/layout-reducer/layoutUtils.js.map +0 -1
  68. package/cjs/layout-reducer/move-layout-element.js +0 -31
  69. package/cjs/layout-reducer/move-layout-element.js.map +0 -1
  70. package/cjs/layout-reducer/remove-layout-element.js +0 -223
  71. package/cjs/layout-reducer/remove-layout-element.js.map +0 -1
  72. package/cjs/layout-reducer/replace-layout-element.js +0 -91
  73. package/cjs/layout-reducer/replace-layout-element.js.map +0 -1
  74. package/cjs/layout-reducer/resize-flex-children.js +0 -61
  75. package/cjs/layout-reducer/resize-flex-children.js.map +0 -1
  76. package/cjs/layout-reducer/wrap-layout-element.js +0 -212
  77. package/cjs/layout-reducer/wrap-layout-element.js.map +0 -1
  78. package/cjs/layout-view/View.css +0 -62
  79. package/cjs/layout-view/View.js +0 -155
  80. package/cjs/layout-view/View.js.map +0 -1
  81. package/cjs/layout-view/useView.js +0 -92
  82. package/cjs/layout-view/useView.js.map +0 -1
  83. package/cjs/layout-view/useViewResize.js +0 -42
  84. package/cjs/layout-view/useViewResize.js.map +0 -1
  85. package/cjs/layout-view-actions/ViewContext.js +0 -16
  86. package/cjs/layout-view-actions/ViewContext.js.map +0 -1
  87. package/cjs/layout-view-actions/useViewActionDispatcher.js +0 -103
  88. package/cjs/layout-view-actions/useViewActionDispatcher.js.map +0 -1
  89. package/cjs/palette/Palette.css +0 -33
  90. package/cjs/palette/Palette.js +0 -118
  91. package/cjs/palette/Palette.js.map +0 -1
  92. package/cjs/placeholder/LayoutStartPanel.css +0 -30
  93. package/cjs/placeholder/LayoutStartPanel.js +0 -51
  94. package/cjs/placeholder/LayoutStartPanel.js.map +0 -1
  95. package/cjs/placeholder/Placeholder.css +0 -17
  96. package/cjs/placeholder/Placeholder.js +0 -25
  97. package/cjs/placeholder/Placeholder.js.map +0 -1
  98. package/cjs/registry/ComponentRegistry.js +0 -27
  99. package/cjs/registry/ComponentRegistry.js.map +0 -1
  100. package/cjs/responsive/breakpoints.js +0 -36
  101. package/cjs/responsive/breakpoints.js.map +0 -1
  102. package/cjs/responsive/use-breakpoints.js +0 -76
  103. package/cjs/responsive/use-breakpoints.js.map +0 -1
  104. package/cjs/responsive/useResizeObserver.js +0 -118
  105. package/cjs/responsive/useResizeObserver.js.map +0 -1
  106. package/cjs/responsive/utils.js +0 -34
  107. package/cjs/responsive/utils.js.map +0 -1
  108. package/cjs/stack/Stack.css +0 -39
  109. package/cjs/stack/Stack.js +0 -139
  110. package/cjs/stack/Stack.js.map +0 -1
  111. package/cjs/stack/StackLayout.js +0 -122
  112. package/cjs/stack/StackLayout.js.map +0 -1
  113. package/cjs/use-persistent-state.js +0 -109
  114. package/cjs/use-persistent-state.js.map +0 -1
  115. package/cjs/utils/pathUtils.js +0 -293
  116. package/cjs/utils/pathUtils.js.map +0 -1
  117. package/cjs/utils/propUtils.js +0 -27
  118. package/cjs/utils/propUtils.js.map +0 -1
  119. package/cjs/utils/refUtils.js +0 -12
  120. package/cjs/utils/refUtils.js.map +0 -1
  121. package/cjs/utils/styleUtils.js +0 -15
  122. package/cjs/utils/styleUtils.js.map +0 -1
  123. package/cjs/utils/typeOf.js +0 -27
  124. package/cjs/utils/typeOf.js.map +0 -1
  125. package/esm/Component.js +0 -12
  126. package/esm/Component.js.map +0 -1
  127. package/esm/DraggableLayout.css +0 -18
  128. package/esm/DraggableLayout.js +0 -22
  129. package/esm/DraggableLayout.js.map +0 -1
  130. package/esm/dock-layout/DockLayout.css +0 -36
  131. package/esm/dock-layout/DockLayout.js +0 -25
  132. package/esm/dock-layout/DockLayout.js.map +0 -1
  133. package/esm/dock-layout/Drawer.css +0 -159
  134. package/esm/dock-layout/Drawer.js +0 -85
  135. package/esm/dock-layout/Drawer.js.map +0 -1
  136. package/esm/drag-drop/BoxModel.js +0 -415
  137. package/esm/drag-drop/BoxModel.js.map +0 -1
  138. package/esm/drag-drop/DragState.js +0 -152
  139. package/esm/drag-drop/DragState.js.map +0 -1
  140. package/esm/drag-drop/Draggable.js +0 -190
  141. package/esm/drag-drop/Draggable.js.map +0 -1
  142. package/esm/drag-drop/DropMenu.css +0 -71
  143. package/esm/drag-drop/DropMenu.js +0 -43
  144. package/esm/drag-drop/DropMenu.js.map +0 -1
  145. package/esm/drag-drop/DropTarget.js +0 -240
  146. package/esm/drag-drop/DropTarget.js.map +0 -1
  147. package/esm/drag-drop/DropTargetRenderer.css +0 -40
  148. package/esm/drag-drop/DropTargetRenderer.js +0 -231
  149. package/esm/drag-drop/DropTargetRenderer.js.map +0 -1
  150. package/esm/flexbox/Flexbox.css +0 -45
  151. package/esm/flexbox/Flexbox.js +0 -59
  152. package/esm/flexbox/Flexbox.js.map +0 -1
  153. package/esm/flexbox/FlexboxLayout.js +0 -28
  154. package/esm/flexbox/FlexboxLayout.js.map +0 -1
  155. package/esm/flexbox/FluidGrid.css +0 -134
  156. package/esm/flexbox/FluidGrid.js +0 -76
  157. package/esm/flexbox/FluidGrid.js.map +0 -1
  158. package/esm/flexbox/FluidGridLayout.js +0 -12
  159. package/esm/flexbox/FluidGridLayout.js.map +0 -1
  160. package/esm/flexbox/Splitter.css +0 -148
  161. package/esm/flexbox/Splitter.js +0 -111
  162. package/esm/flexbox/Splitter.js.map +0 -1
  163. package/esm/flexbox/flexbox-utils.js +0 -103
  164. package/esm/flexbox/flexbox-utils.js.map +0 -1
  165. package/esm/flexbox/useResponsiveSizing.js +0 -60
  166. package/esm/flexbox/useResponsiveSizing.js.map +0 -1
  167. package/esm/flexbox/useSplitterResizing.js +0 -207
  168. package/esm/flexbox/useSplitterResizing.js.map +0 -1
  169. package/esm/index.js +0 -37
  170. package/esm/index.js.map +0 -1
  171. package/esm/layout-action.js +0 -25
  172. package/esm/layout-action.js.map +0 -1
  173. package/esm/layout-header/Header.css +0 -9
  174. package/esm/layout-header/Header.js +0 -120
  175. package/esm/layout-header/Header.js.map +0 -1
  176. package/esm/layout-provider/LayoutProvider.js +0 -172
  177. package/esm/layout-provider/LayoutProvider.js.map +0 -1
  178. package/esm/layout-provider/LayoutProviderContext.js +0 -12
  179. package/esm/layout-provider/LayoutProviderContext.js.map +0 -1
  180. package/esm/layout-provider/useLayoutDragDrop.js +0 -168
  181. package/esm/layout-provider/useLayoutDragDrop.js.map +0 -1
  182. package/esm/layout-reducer/flexUtils.js +0 -210
  183. package/esm/layout-reducer/flexUtils.js.map +0 -1
  184. package/esm/layout-reducer/insert-layout-element.js +0 -269
  185. package/esm/layout-reducer/insert-layout-element.js.map +0 -1
  186. package/esm/layout-reducer/layout-reducer.js +0 -196
  187. package/esm/layout-reducer/layout-reducer.js.map +0 -1
  188. package/esm/layout-reducer/layoutTypes.js +0 -37
  189. package/esm/layout-reducer/layoutTypes.js.map +0 -1
  190. package/esm/layout-reducer/layoutUtils.js +0 -215
  191. package/esm/layout-reducer/layoutUtils.js.map +0 -1
  192. package/esm/layout-reducer/move-layout-element.js +0 -29
  193. package/esm/layout-reducer/move-layout-element.js.map +0 -1
  194. package/esm/layout-reducer/remove-layout-element.js +0 -221
  195. package/esm/layout-reducer/remove-layout-element.js.map +0 -1
  196. package/esm/layout-reducer/replace-layout-element.js +0 -87
  197. package/esm/layout-reducer/replace-layout-element.js.map +0 -1
  198. package/esm/layout-reducer/resize-flex-children.js +0 -58
  199. package/esm/layout-reducer/resize-flex-children.js.map +0 -1
  200. package/esm/layout-reducer/wrap-layout-element.js +0 -210
  201. package/esm/layout-reducer/wrap-layout-element.js.map +0 -1
  202. package/esm/layout-view/View.css +0 -62
  203. package/esm/layout-view/View.js +0 -153
  204. package/esm/layout-view/View.js.map +0 -1
  205. package/esm/layout-view/useView.js +0 -90
  206. package/esm/layout-view/useView.js.map +0 -1
  207. package/esm/layout-view/useViewResize.js +0 -40
  208. package/esm/layout-view/useViewResize.js.map +0 -1
  209. package/esm/layout-view-actions/ViewContext.js +0 -12
  210. package/esm/layout-view-actions/ViewContext.js.map +0 -1
  211. package/esm/layout-view-actions/useViewActionDispatcher.js +0 -101
  212. package/esm/layout-view-actions/useViewActionDispatcher.js.map +0 -1
  213. package/esm/palette/Palette.css +0 -33
  214. package/esm/palette/Palette.js +0 -115
  215. package/esm/palette/Palette.js.map +0 -1
  216. package/esm/placeholder/LayoutStartPanel.css +0 -30
  217. package/esm/placeholder/LayoutStartPanel.js +0 -49
  218. package/esm/placeholder/LayoutStartPanel.js.map +0 -1
  219. package/esm/placeholder/Placeholder.css +0 -17
  220. package/esm/placeholder/Placeholder.js +0 -23
  221. package/esm/placeholder/Placeholder.js.map +0 -1
  222. package/esm/registry/ComponentRegistry.js +0 -21
  223. package/esm/registry/ComponentRegistry.js.map +0 -1
  224. package/esm/responsive/breakpoints.js +0 -33
  225. package/esm/responsive/breakpoints.js.map +0 -1
  226. package/esm/responsive/use-breakpoints.js +0 -74
  227. package/esm/responsive/use-breakpoints.js.map +0 -1
  228. package/esm/responsive/useResizeObserver.js +0 -112
  229. package/esm/responsive/useResizeObserver.js.map +0 -1
  230. package/esm/responsive/utils.js +0 -31
  231. package/esm/responsive/utils.js.map +0 -1
  232. package/esm/stack/Stack.css +0 -39
  233. package/esm/stack/Stack.js +0 -137
  234. package/esm/stack/Stack.js.map +0 -1
  235. package/esm/stack/StackLayout.js +0 -120
  236. package/esm/stack/StackLayout.js.map +0 -1
  237. package/esm/use-persistent-state.js +0 -104
  238. package/esm/use-persistent-state.js.map +0 -1
  239. package/esm/utils/pathUtils.js +0 -280
  240. package/esm/utils/pathUtils.js.map +0 -1
  241. package/esm/utils/propUtils.js +0 -23
  242. package/esm/utils/propUtils.js.map +0 -1
  243. package/esm/utils/refUtils.js +0 -10
  244. package/esm/utils/refUtils.js.map +0 -1
  245. package/esm/utils/styleUtils.js +0 -13
  246. package/esm/utils/styleUtils.js.map +0 -1
  247. package/esm/utils/typeOf.js +0 -23
  248. package/esm/utils/typeOf.js.map +0 -1
@@ -1,280 +0,0 @@
1
- import React, { isValidElement } from 'react';
2
- import { isContainer } from '../registry/ComponentRegistry.js';
3
- import { getProps, getProp } from './propUtils.js';
4
- import { typeOf } from './typeOf.js';
5
-
6
- const removeFinalPathSegment = (path) => {
7
- const pos = path.lastIndexOf(".");
8
- if (pos === -1) {
9
- return path;
10
- } else {
11
- return path.slice(0, pos);
12
- }
13
- };
14
- const getChildren = (c) => React.isValidElement(c.props.children) ? [c.props.children] : c.props.children;
15
- const resolvePath = (source, path = "") => {
16
- const [step1, ...steps] = path.split(".");
17
- if (step1?.startsWith("#")) {
18
- const node = findTargetById(source, step1.slice(1), true);
19
- if (node && steps.length) {
20
- return resolvePath(node, steps.join("."));
21
- }
22
- } else if (step1 === "ACTIVE_CHILD") {
23
- const { active } = getProps(source);
24
- const children = getChildren(source);
25
- const { path: path2 } = getProps(children[active]);
26
- return path2;
27
- }
28
- return "";
29
- };
30
- const resolveJSONPath = (source, path = "") => {
31
- const [step1, ...steps] = path.split(".");
32
- if (step1?.startsWith("#")) {
33
- const node = findTargetJSONById(source, step1.slice(1), true);
34
- if (node && steps.length) {
35
- return resolveJSONPath(node, steps.join("."));
36
- }
37
- } else if (step1 === "ACTIVE_CHILD") {
38
- const { children, props } = source;
39
- const { active } = props;
40
- if (typeof active === "number" && children?.[active]) {
41
- return children[active];
42
- }
43
- }
44
- return;
45
- };
46
- function followPathToParent(source, path) {
47
- const { "data-path": dataPath, path: sourcePath = dataPath } = getProps(source);
48
- if (path === "0")
49
- return null;
50
- if (path === sourcePath)
51
- return null;
52
- return followPath(source, removeFinalPathSegment(path), true);
53
- }
54
- function findTarget(source, test) {
55
- const { children, ...props } = getProps(source);
56
- if (test(props)) {
57
- return source;
58
- }
59
- if (React.Children.count(children) > 0) {
60
- const array = React.isValidElement(children) ? [children] : children;
61
- for (const child of array) {
62
- const target = findTarget(child, test);
63
- if (target) {
64
- return target;
65
- }
66
- }
67
- }
68
- }
69
- function containerOf(source, target) {
70
- if (target === source) {
71
- return null;
72
- }
73
- const { path: sourcePath, children } = getProps(source);
74
- const { idx, finalStep } = nextStep(sourcePath, getProp(target, "path"));
75
- if (finalStep) {
76
- return source;
77
- }
78
- if (children === void 0 || children[idx] === void 0) {
79
- return null;
80
- }
81
- return containerOf(children[idx], target);
82
- }
83
- const getChild = (children, idx) => {
84
- if (React.isValidElement(children) && idx == 0) {
85
- return children;
86
- }
87
- if (Array.isArray(children)) {
88
- return children[idx];
89
- }
90
- };
91
- function followPathToComponent(component, path) {
92
- const paths = path.split(".");
93
- let children = [component];
94
- for (let i = 0; i < paths.length; i++) {
95
- const idx = parseInt(paths[i]);
96
- const child = children[idx];
97
- if (i === paths.length - 1) {
98
- return child;
99
- }
100
- children = getChildren(child);
101
- }
102
- }
103
- const findTargetById = (source, id, throwIfNotFound = true) => {
104
- const { children, id: idProp } = source.props;
105
- if (idProp === id) {
106
- return source;
107
- }
108
- if (React.Children.count(children) > 0) {
109
- const childArray = isValidElement(children) ? [children] : children;
110
- for (const child of childArray) {
111
- if (isValidElement(child)) {
112
- const target = findTargetById(child, id, false);
113
- if (target) {
114
- return target;
115
- }
116
- }
117
- }
118
- }
119
- if (throwIfNotFound === true) {
120
- throw Error(`pathUtils.findTargetById id #${id} not found in source`);
121
- }
122
- };
123
- const findTargetJSONById = (source, id, throwIfNotFound = true) => {
124
- const { children, id: idProp } = source;
125
- if (idProp === id) {
126
- return source;
127
- }
128
- if (Array.isArray(children) && children.length > 0) {
129
- for (const child of children) {
130
- if (child !== null && typeof child === "object") {
131
- const target = findTargetJSONById(child, id, false);
132
- if (target) {
133
- return target;
134
- }
135
- }
136
- }
137
- }
138
- if (throwIfNotFound === true) {
139
- throw Error(`pathUtils.findTargetJSONById id #${id} not found in source`);
140
- }
141
- };
142
- function followPath(source, path, throwIfNotFound = false) {
143
- if (path.startsWith("#")) {
144
- return findTargetById(source, path.slice(1), throwIfNotFound);
145
- }
146
- const { "data-path": dataPath, path: sourcePath = dataPath } = getProps(source);
147
- if (path.indexOf(sourcePath) !== 0) {
148
- throw Error(
149
- `pathUtils.followPath path ${path} is not within source path ${sourcePath}`
150
- );
151
- }
152
- const route = path.slice(sourcePath.length + 1);
153
- if (route === "") {
154
- return source;
155
- }
156
- let target = source;
157
- const paths = route.split(".");
158
- for (let i = 0; i < paths.length; i++) {
159
- if (React.Children.count(target.props.children) === 0) {
160
- const message = `element at 0.${paths.slice(0, i).join(".")} has no children, so cannot fulfill rest of path ${paths.slice(i).join(".")}`;
161
- if (throwIfNotFound) {
162
- throw Error(message);
163
- } else {
164
- console.warn(message);
165
- return;
166
- }
167
- }
168
- target = getChild(target.props.children, parseInt(paths[i]));
169
- if (target === void 0) {
170
- const message = `model at 0.${paths.slice(0, i).join(".")} has no children that fulfill next step of path ${paths.slice(i).join(".")}`;
171
- if (throwIfNotFound) {
172
- throw Error(message);
173
- } else {
174
- console.warn(message);
175
- }
176
- }
177
- }
178
- return target;
179
- }
180
- function nextLeaf(root, path) {
181
- const parent = followPathToParent(root, path);
182
- let pathIndices = path.split(".").map((idx) => parseInt(idx, 10));
183
- if (parent) {
184
- const lastIdx = pathIndices.pop();
185
- const { children } = parent.props;
186
- if (children.length - 1 > lastIdx) {
187
- return firstLeaf(children[lastIdx + 1]);
188
- } else {
189
- const parentIdx = pathIndices.pop();
190
- const nextParent = followPathToParent(root, getProp(parent, "path"));
191
- if (nextParent && typeof parentIdx === "number") {
192
- pathIndices = nextParent.props.path.split(".").map((idx) => parseInt(idx, 10));
193
- if (nextParent.props.children.length - 1 > parentIdx) {
194
- const nextStep2 = nextParent.props.children[parentIdx + 1];
195
- if (isContainer(typeOf(nextStep2))) {
196
- return firstLeaf(nextStep2);
197
- } else {
198
- return nextStep2;
199
- }
200
- }
201
- }
202
- }
203
- }
204
- return firstLeaf(root);
205
- }
206
- function previousLeaf(root, path) {
207
- const pathIndices = path.split(".").map((idx) => parseInt(idx, 10));
208
- let lastIdx = pathIndices.pop();
209
- let parent = followPathToParent(root, path);
210
- if (parent != null && typeof lastIdx === "number") {
211
- const { children } = parent.props;
212
- if (lastIdx > 0) {
213
- return lastLeaf(children[lastIdx - 1]);
214
- } else {
215
- while (pathIndices.length > 1) {
216
- lastIdx = pathIndices.pop();
217
- parent = followPathToParent(
218
- root,
219
- getProp(parent, "path")
220
- );
221
- if (lastIdx > 0) {
222
- const nextStep2 = parent.props.children[lastIdx - 1];
223
- if (isContainer(typeOf(nextStep2))) {
224
- return lastLeaf(nextStep2);
225
- }
226
- return nextStep2;
227
- }
228
- }
229
- }
230
- }
231
- return lastLeaf(root);
232
- }
233
- function firstLeaf(layoutRoot) {
234
- if (isContainer(typeOf(layoutRoot))) {
235
- const { children } = layoutRoot.props || layoutRoot;
236
- return firstLeaf(children[0]);
237
- }
238
- return layoutRoot;
239
- }
240
- function lastLeaf(root) {
241
- if (isContainer(typeOf(root))) {
242
- const { children } = root.props || root;
243
- return lastLeaf(children[children.length - 1]);
244
- }
245
- return root;
246
- }
247
- function nextStep(pathSoFar, targetPath, followPathToEnd = false) {
248
- if (pathSoFar === targetPath) {
249
- return { idx: -1, finalStep: true };
250
- }
251
- const pathVisited = `${pathSoFar}.`;
252
- if (!targetPath.startsWith(pathVisited)) {
253
- throw Error("pathUtils nextStep has strayed from the path");
254
- }
255
- const endOfTheLine = followPathToEnd ? 0 : 1;
256
- const paths = targetPath.replace(pathVisited, "").split(".").map((n) => parseInt(n, 10));
257
- return { idx: paths[0], finalStep: paths.length === endOfTheLine };
258
- }
259
- function resetPath(model, path, additionalProps) {
260
- if (getProp(model, "path") === path) {
261
- return model;
262
- }
263
- const children = [];
264
- React.Children.forEach(model.props.children, (child, i) => {
265
- if (!getProp(child, "path")) {
266
- children.push(child);
267
- } else {
268
- children.push(resetPath(child, `${path}.${i}`));
269
- }
270
- });
271
- const pathPropName = model.props["data-path"] ? "data-path" : "path";
272
- return React.cloneElement(
273
- model,
274
- { [pathPropName]: path, ...additionalProps },
275
- children
276
- );
277
- }
278
-
279
- export { containerOf, findTarget, followPath, followPathToComponent, followPathToParent, getChild, nextLeaf, nextStep, previousLeaf, resetPath, resolveJSONPath, resolvePath };
280
- //# sourceMappingURL=pathUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pathUtils.js","sources":["../../src/utils/pathUtils.ts"],"sourcesContent":["import React, { isValidElement, ReactElement } from \"react\";\nimport { LayoutJSON, LayoutModel, WithActive } from \"../layout-reducer\";\nimport { isContainer } from \"../registry/ComponentRegistry\";\nimport { getProp, getProps } from \"./propUtils\";\nimport { typeOf } from \"./typeOf\";\n\nconst removeFinalPathSegment = (path: string) => {\n const pos = path.lastIndexOf(\".\");\n if (pos === -1) {\n return path;\n } else {\n return path.slice(0, pos);\n }\n};\n\nconst getChildren = (c: ReactElement) =>\n React.isValidElement(c.props.children)\n ? [c.props.children]\n : c.props.children;\n\n/**\n * This is a very specific function at the moment. It resolves a path of the form\n * '#{componentid}.ACTIVE_CHILD'\n * It allows a templated path to be resolved to a concrete path at runtime.\n * The above pattern is used to identify a layout drop target. Further patterns\n * will be added if needed.\n */\nexport const resolvePath = (source: ReactElement, path = \"\"): string => {\n const [step1, ...steps] = path.split(\".\");\n if (step1?.startsWith(\"#\")) {\n const node = findTargetById(source, step1.slice(1), true);\n if (node && steps.length) {\n return resolvePath(node, steps.join(\".\"));\n }\n } else if (step1 === \"ACTIVE_CHILD\") {\n const { active } = getProps(source);\n const children = getChildren(source);\n const { path } = getProps(children[active]);\n return path;\n }\n\n return \"\";\n};\n\n/**\n * Similar to resolvePath but operates on a JSON\n * layout structure and returns the matching JSON node.\n */\nexport const resolveJSONPath = (\n source: LayoutJSON,\n path = \"\"\n): LayoutJSON | undefined => {\n const [step1, ...steps] = path.split(\".\");\n if (step1?.startsWith(\"#\")) {\n const node = findTargetJSONById(source, step1.slice(1), true);\n if (node && steps.length) {\n return resolveJSONPath(node, steps.join(\".\"));\n }\n } else if (step1 === \"ACTIVE_CHILD\") {\n const { children, props } = source;\n const { active } = props as WithActive;\n if (typeof active === \"number\" && children?.[active]) {\n return children[active];\n }\n }\n return;\n};\n\nexport function followPathToParent(\n source: ReactElement,\n path: string\n): ReactElement | null {\n const { \"data-path\": dataPath, path: sourcePath = dataPath } =\n getProps(source);\n\n if (path === \"0\") return null;\n if (path === sourcePath) return null;\n\n return followPath(source, removeFinalPathSegment(path), true);\n}\n\nexport function findTarget(\n source: LayoutModel,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n test: (props: any) => boolean\n): LayoutModel | undefined {\n const { children, ...props } = getProps(source);\n if (test(props)) {\n return source;\n }\n if (React.Children.count(children) > 0) {\n const array = React.isValidElement(children) ? [children] : children;\n for (const child of array) {\n const target = findTarget(child, test);\n if (target) {\n return target;\n }\n }\n }\n}\n\nexport function containerOf(\n source: LayoutModel,\n target: LayoutModel\n): LayoutModel | null {\n if (target === source) {\n return null;\n }\n const { path: sourcePath, children } = getProps(source);\n const { idx, finalStep } = nextStep(sourcePath, getProp(target, \"path\"));\n if (finalStep) {\n return source;\n }\n if (children === undefined || children[idx] === undefined) {\n return null;\n }\n return containerOf(children[idx], target);\n}\n\nexport const getChild = (\n children: ReactElement[],\n idx: number\n): ReactElement | undefined => {\n if (React.isValidElement(children) && idx == 0) {\n return children;\n }\n if (Array.isArray(children)) {\n return children[idx];\n }\n};\n\nexport function followPathToComponent(component: ReactElement, path: string) {\n const paths = path.split(\".\");\n let children = [component];\n\n for (let i = 0; i < paths.length; i++) {\n const idx = parseInt(paths[i]);\n const child = children[idx];\n if (i === paths.length - 1) {\n return child;\n }\n children = getChildren(child);\n }\n}\n\nconst findTargetById = (\n source: ReactElement,\n id: string,\n throwIfNotFound = true\n): ReactElement | undefined => {\n const { children, id: idProp } = source.props;\n if (idProp === id) {\n return source;\n }\n\n if (React.Children.count(children) > 0) {\n const childArray = isValidElement(children) ? [children] : children;\n for (const child of childArray) {\n if (isValidElement(child)) {\n const target = findTargetById(child, id, false);\n if (target) {\n return target;\n }\n }\n }\n }\n\n if (throwIfNotFound === true) {\n throw Error(`pathUtils.findTargetById id #${id} not found in source`);\n }\n};\n\nconst findTargetJSONById = (\n source: LayoutJSON,\n id: string,\n throwIfNotFound = true\n): LayoutJSON | undefined => {\n const { children, id: idProp } = source;\n if (idProp === id) {\n return source;\n }\n\n if (Array.isArray(children) && children.length > 0) {\n for (const child of children) {\n if (child !== null && typeof child === \"object\") {\n const target = findTargetJSONById(child, id, false);\n if (target) {\n return target;\n }\n }\n }\n }\n\n if (throwIfNotFound === true) {\n throw Error(`pathUtils.findTargetJSONById id #${id} not found in source`);\n }\n};\n\nexport function followPath(\n source: LayoutModel,\n path: string\n): LayoutModel | undefined;\nexport function followPath(\n source: ReactElement,\n path: string,\n throwIfNotFound: true\n): ReactElement;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function followPath(source: any, path: any, throwIfNotFound = false) {\n if (path.startsWith(\"#\")) {\n return findTargetById(source, path.slice(1), throwIfNotFound);\n }\n\n const { \"data-path\": dataPath, path: sourcePath = dataPath } =\n getProps(source);\n if (path.indexOf(sourcePath) !== 0) {\n throw Error(\n `pathUtils.followPath path ${path} is not within source path ${sourcePath}`\n );\n }\n const route = path.slice(sourcePath.length + 1);\n if (route === \"\") {\n return source;\n }\n\n let target = source;\n const paths = route.split(\".\");\n\n for (let i = 0; i < paths.length; i++) {\n if (React.Children.count(target.props.children) === 0) {\n const message = `element at 0.${paths\n .slice(0, i)\n .join(\".\")} has no children, so cannot fulfill rest of path ${paths\n .slice(i)\n .join(\".\")}`;\n\n if (throwIfNotFound) {\n throw Error(message);\n } else {\n console.warn(message);\n return;\n }\n }\n\n target = getChild(target.props.children, parseInt(paths[i]));\n\n if (target === undefined) {\n const message = `model at 0.${paths\n .slice(0, i)\n .join(\".\")} has no children that fulfill next step of path ${paths\n .slice(i)\n .join(\".\")}`;\n\n if (throwIfNotFound) {\n throw Error(message);\n } else {\n console.warn(message);\n }\n }\n }\n return target;\n}\n\nexport function nextLeaf(root: ReactElement, path: string) {\n const parent = followPathToParent(root, path);\n let pathIndices = path.split(\".\").map((idx) => parseInt(idx, 10));\n if (parent) {\n const lastIdx = pathIndices.pop();\n const { children } = parent.props;\n if (children.length - 1 > lastIdx!) {\n return firstLeaf(children[lastIdx! + 1]);\n } else {\n const parentIdx = pathIndices.pop();\n const nextParent = followPathToParent(root, getProp(parent, \"path\"));\n if (nextParent && typeof parentIdx === \"number\") {\n pathIndices = nextParent.props.path\n .split(\".\")\n .map((idx: string) => parseInt(idx, 10));\n if (nextParent.props.children.length - 1 > parentIdx) {\n const nextStep = nextParent.props.children[parentIdx + 1];\n if (isContainer(typeOf(nextStep) as string)) {\n return firstLeaf(nextStep);\n } else {\n return nextStep;\n }\n }\n }\n }\n }\n\n return firstLeaf(root);\n}\n\nexport function previousLeaf(root: ReactElement, path: string) {\n const pathIndices = path.split(\".\").map((idx) => parseInt(idx, 10));\n let lastIdx = pathIndices.pop();\n let parent = followPathToParent(root, path);\n if (parent != null && typeof lastIdx === \"number\") {\n const { children } = parent.props;\n if (lastIdx > 0) {\n return lastLeaf(children[lastIdx - 1]);\n } else {\n while (pathIndices.length > 1) {\n lastIdx = pathIndices.pop() as number;\n parent = followPathToParent(\n root,\n getProp(parent, \"path\")\n ) as ReactElement;\n if (lastIdx > 0) {\n const nextStep = parent.props.children[lastIdx - 1];\n if (isContainer(typeOf(nextStep) as string)) {\n return lastLeaf(nextStep);\n }\n return nextStep;\n }\n }\n }\n }\n return lastLeaf(root);\n}\n\nfunction firstLeaf(layoutRoot: ReactElement): ReactElement {\n if (isContainer(typeOf(layoutRoot) as string)) {\n const { children } = layoutRoot.props || layoutRoot;\n return firstLeaf(children[0]);\n }\n return layoutRoot;\n}\n\nfunction lastLeaf(root: ReactElement): ReactElement {\n if (isContainer(typeOf(root) as string)) {\n const { children } = root.props || root;\n return lastLeaf(children[children.length - 1]);\n }\n return root;\n}\n\ntype NextStepResult = {\n idx: number;\n finalStep: boolean;\n};\n\nexport function nextStep(\n pathSoFar: string,\n targetPath: string,\n followPathToEnd = false\n): NextStepResult {\n if (pathSoFar === targetPath) {\n return { idx: -1, finalStep: true };\n }\n\n const pathVisited = `${pathSoFar}.`;\n if (!targetPath.startsWith(pathVisited)) {\n throw Error(\"pathUtils nextStep has strayed from the path\");\n }\n\n const endOfTheLine = followPathToEnd ? 0 : 1;\n const paths = targetPath\n .replace(pathVisited, \"\")\n .split(\".\")\n .map((n) => parseInt(n, 10));\n return { idx: paths[0], finalStep: paths.length === endOfTheLine };\n}\n\nexport function resetPath(\n model: ReactElement,\n path: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n additionalProps?: any\n): ReactElement {\n if (getProp(model, \"path\") === path) {\n return model;\n }\n const children: ReactElement[] = [];\n React.Children.forEach(model.props.children, (child, i) => {\n if (!getProp(child, \"path\")) {\n children.push(child);\n } else {\n children.push(resetPath(child, `${path}.${i}`));\n }\n });\n const pathPropName = model.props[\"data-path\"] ? \"data-path\" : \"path\";\n return React.cloneElement(\n model,\n { [pathPropName]: path, ...additionalProps },\n children\n );\n}\n"],"names":["path","nextStep"],"mappings":";;;;;AAMA,MAAM,sBAAA,GAAyB,CAAC,IAAiB,KAAA;AAC/C,EAAM,MAAA,GAAA,GAAM,IAAK,CAAA,WAAA,CAAY,GAAG,CAAA,CAAA;AAChC,EAAA,IAAI,QAAQ,CAAI,CAAA,EAAA;AACd,IAAO,OAAA,IAAA,CAAA;AAAA,GACF,MAAA;AACL,IAAO,OAAA,IAAA,CAAK,KAAM,CAAA,CAAA,EAAG,GAAG,CAAA,CAAA;AAAA,GAC1B;AACF,CAAA,CAAA;AAEA,MAAM,WAAc,GAAA,CAAC,CACnB,KAAA,KAAA,CAAM,eAAe,CAAE,CAAA,KAAA,CAAM,QAAQ,CAAA,GACjC,CAAC,CAAE,CAAA,KAAA,CAAM,QAAQ,CAAA,GACjB,EAAE,KAAM,CAAA,QAAA,CAAA;AASP,MAAM,WAAc,GAAA,CAAC,MAAsB,EAAA,IAAA,GAAO,EAAe,KAAA;AACtE,EAAA,MAAM,CAAC,KAAO,EAAA,GAAG,KAAK,CAAI,GAAA,IAAA,CAAK,MAAM,GAAG,CAAA,CAAA;AACxC,EAAI,IAAA,KAAA,EAAO,UAAW,CAAA,GAAG,CAAG,EAAA;AAC1B,IAAA,MAAM,OAAO,cAAe,CAAA,MAAA,EAAQ,MAAM,KAAM,CAAA,CAAC,GAAG,IAAI,CAAA,CAAA;AACxD,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- const getProp = (component, propName) => {
3
- const props = getProps(component);
4
- return props[propName] ?? props[`data-${propName}`];
5
- };
6
- const getProps = (component) => component?.props || component || NO_PROPS;
7
- const getChildProp = (container) => {
8
- const props = getProps(container);
9
- if (props.children) {
10
- const {
11
- children: [target, ...rest]
12
- } = props;
13
- if (rest.length > 0) {
14
- console.warn(
15
- `getChild expected a single child, found ${rest.length + 1}`
16
- );
17
- }
18
- return target;
19
- }
20
- };
21
-
22
- export { getChildProp, getProp, getProps };
23
- //# sourceMappingURL=propUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"propUtils.js","sources":["../../src/utils/propUtils.ts"],"sourcesContent":["import { ReactElement } from \"react\";\nimport { LayoutModel } from \"../layout-reducer\";\n\nconst NO_PROPS = {};\nexport const getProp = (\n component: LayoutModel | undefined,\n propName: string\n) => {\n const props = getProps(component);\n return props[propName] ?? props[`data-${propName}`];\n};\n\nexport const getProps = (component?: LayoutModel) =>\n component?.props || component || NO_PROPS;\n\nexport const getChildProp = (container: LayoutModel) => {\n const props = getProps(container);\n if (props.children) {\n const {\n children: [target, ...rest],\n } = props;\n if (rest.length > 0) {\n console.warn(\n `getChild expected a single child, found ${rest.length + 1}`\n );\n }\n return target as ReactElement;\n }\n};\n"],"names":[],"mappings":"AAGA,MAAM,WAAW,EAAC,CAAA;AACL,MAAA,OAAA,GAAU,CACrB,SAAA,EACA,QACG,KAAA;AACH,EAAM,MAAA,KAAA,GAAQ,SAAS,SAAS,CAAA,CAAA;AAChC,EAAA,OAAO,MAAM,QAAQ,CAAA,IAAK,KAAM,CAAA,CAAA,KAAA,EAAQ,QAAQ,CAAE,CAAA,CAAA,CAAA;AACpD,EAAA;AAEO,MAAM,QAAW,GAAA,CAAC,SACvB,KAAA,SAAA,EAAW,SAAS,SAAa,IAAA,SAAA;AAEtB,MAAA,YAAA,GAAe,CAAC,SAA2B,KAAA;AACtD,EAAM,MAAA,KAAA,GAAQ,SAAS,SAAS,CAAA,CAAA;AAChC,EAAA,IAAI,MAAM,QAAU,EAAA;AAClB,IAAM,MAAA;AAAA,MACJ,QAAU,EAAA,CAAC,MAAQ,EAAA,GAAG,IAAI,CAAA;AAAA,KACxB,GAAA,KAAA,CAAA;AACJ,IAAI,IAAA,IAAA,CAAK,SAAS,CAAG,EAAA;AACnB,MAAQ,OAAA,CAAA,IAAA;AAAA,QACN,CAAA,wCAAA,EAA2C,IAAK,CAAA,MAAA,GAAS,CAAC,CAAA,CAAA;AAAA,OAC5D,CAAA;AAAA,KACF;AACA,IAAO,OAAA,MAAA,CAAA;AAAA,GACT;AACF;;;;"}
@@ -1,10 +0,0 @@
1
- function setRef(ref, value) {
2
- if (typeof ref === "function") {
3
- ref(value);
4
- } else if (ref) {
5
- ref.current = value;
6
- }
7
- }
8
-
9
- export { setRef };
10
- //# sourceMappingURL=refUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"refUtils.js","sources":["../../src/utils/refUtils.ts"],"sourcesContent":["import { MutableRefObject } from \"react\";\n\nexport function setRef<T>(\n ref:\n | MutableRefObject<T | null>\n | ((instance: T | null) => void)\n | null\n | undefined,\n value: T | null\n): void {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}\n"],"names":[],"mappings":"AAEgB,SAAA,MAAA,CACd,KAKA,KACM,EAAA;AACN,EAAI,IAAA,OAAO,QAAQ,UAAY,EAAA;AAC7B,IAAA,GAAA,CAAI,KAAK,CAAA,CAAA;AAAA,aACA,GAAK,EAAA;AACd,IAAA,GAAA,CAAI,OAAU,GAAA,KAAA,CAAA;AAAA,GAChB;AACF;;;;"}
@@ -1,13 +0,0 @@
1
- const expandFlex = (flex) => {
2
- if (typeof flex !== "number") {
3
- throw Error(`"no support yet for flex value ${flex}`);
4
- }
5
- return {
6
- flexBasis: 0,
7
- flexGrow: 1,
8
- flexShrink: 1
9
- };
10
- };
11
-
12
- export { expandFlex };
13
- //# sourceMappingURL=styleUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styleUtils.js","sources":["../../src/utils/styleUtils.ts"],"sourcesContent":["import { CSSProperties } from 'react';\nexport type CSSFlexProperties = Pick<CSSProperties, 'flexBasis' | 'flexGrow' | 'flexShrink'>;\n\nexport const expandFlex = (flex: number | CSSFlexProperties): CSSFlexProperties => {\n if (typeof flex !== 'number') {\n throw Error(`\"no support yet for flex value ${flex}`);\n }\n return {\n flexBasis: 0,\n flexGrow: 1,\n flexShrink: 1\n };\n};\n"],"names":[],"mappings":"AAGa,MAAA,UAAA,GAAa,CAAC,IAAwD,KAAA;AACjF,EAAI,IAAA,OAAO,SAAS,QAAU,EAAA;AAC5B,IAAM,MAAA,KAAA,CAAM,CAAkC,+BAAA,EAAA,IAAI,CAAE,CAAA,CAAA,CAAA;AAAA,GACtD;AACA,EAAO,OAAA;AAAA,IACL,SAAW,EAAA,CAAA;AAAA,IACX,QAAU,EAAA,CAAA;AAAA,IACV,UAAY,EAAA,CAAA;AAAA,GACd,CAAA;AACF;;;;"}
@@ -1,23 +0,0 @@
1
- function typeOf(element) {
2
- if (element) {
3
- const type = element.type;
4
- if (typeof type === "function" || typeof type === "object") {
5
- const elementName = type.displayName || type.name || type.type?.name;
6
- if (typeof elementName === "string") {
7
- return elementName;
8
- }
9
- }
10
- if (typeof element.type === "string") {
11
- return element.type;
12
- }
13
- if (element.constructor) {
14
- return element.constructor.displayName;
15
- }
16
- throw Error(`typeOf unable to determine type of element`);
17
- }
18
- }
19
- const isTypeOf = (element, type) => typeOf(element) === type;
20
- const isLayoutJSON = (layout) => layout !== void 0 && "type" in layout;
21
-
22
- export { isLayoutJSON, isTypeOf, typeOf };
23
- //# sourceMappingURL=typeOf.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typeOf.js","sources":["../../src/utils/typeOf.ts"],"sourcesContent":["import { ReactElement } from 'react';\nimport { LayoutJSON, LayoutModel, WithType } from '../layout-reducer';\n\nexport function typeOf(element?: LayoutModel | WithType): string | undefined {\n if (element) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const type = element.type as any;\n if (typeof type === 'function' || typeof type === 'object') {\n const elementName = type.displayName || type.name || type.type?.name;\n if (typeof elementName === 'string') {\n return elementName;\n }\n }\n if (typeof element.type === 'string') {\n return element.type;\n }\n if (element.constructor) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (element.constructor as any).displayName as string;\n }\n throw Error(`typeOf unable to determine type of element`);\n }\n}\n\nexport const isTypeOf = (element: ReactElement, type: string) => typeOf(element) === type;\n\nexport const isLayoutJSON = (layout: LayoutJSON): layout is LayoutJSON =>\n layout !== undefined && \"type\" in layout;\n"],"names":[],"mappings":"AAGO,SAAS,OAAO,OAAsD,EAAA;AAC3E,EAAA,IAAI,OAAS,EAAA;AAEX,IAAA,MAAM,OAAO,OAAQ,CAAA,IAAA,CAAA;AACrB,IAAA,IAAI,OAAO,IAAA,KAAS,UAAc,IAAA,OAAO,SAAS,QAAU,EAAA;AAC1D,MAAA,MAAM,cAAc,IAAK,CAAA,WAAA,IAAe,IAAK,CAAA,IAAA,IAAQ,KAAK,IAAM,EAAA,IAAA,CAAA;AAChE,MAAI,IAAA,OAAO,gBAAgB,QAAU,EAAA;AACnC,QAAO,OAAA,WAAA,CAAA;AAAA,OACT;AAAA,KACF;AACA,IAAI,IAAA,OAAO,OAAQ,CAAA,IAAA,KAAS,QAAU,EAAA;AACpC,MAAA,OAAO,OAAQ,CAAA,IAAA,CAAA;AAAA,KACjB;AACA,IAAA,IAAI,QAAQ,WAAa,EAAA;AAEvB,MAAA,OAAQ,QAAQ,WAAoB,CAAA,WAAA,CAAA;AAAA,KACtC;AACA,IAAA,MAAM,MAAM,CAA4C,0CAAA,CAAA,CAAA,CAAA;AAAA,GAC1D;AACF,CAAA;AAEO,MAAM,WAAW,CAAC,OAAA,EAAuB,IAAiB,KAAA,MAAA,CAAO,OAAO,CAAM,KAAA,KAAA;AAE9E,MAAM,YAAe,GAAA,CAAC,MAC3B,KAAA,MAAA,KAAW,UAAa,MAAU,IAAA;;;;"}