@element-editor/ui 0.0.0-stage → 0.2.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 (244) hide show
  1. package/AGENTS.md +65 -0
  2. package/LICENSE +21 -0
  3. package/README.md +46 -2
  4. package/dist/BooleanOperations-BRO7NHUY.js +111 -0
  5. package/dist/BooleanOperations-C2uOHRu3.cjs +1 -0
  6. package/dist/DataTable-B-2VjBEz.cjs +2 -0
  7. package/dist/DataTable-CS-3dIqY.js +510 -0
  8. package/dist/DataTablePanel-58LwzXQR.cjs +1 -0
  9. package/dist/DataTablePanel-DDFUmMaM.js +208 -0
  10. package/dist/EditToolbarBtn-Ch9HCLHq.cjs +3 -0
  11. package/dist/EditToolbarBtn-SR4xHd8G.js +378 -0
  12. package/dist/FeatureEditModal-Cc8N6vei.cjs +1 -0
  13. package/dist/FeatureEditModal-Dr10p3nE.js +77 -0
  14. package/dist/FeatureList-Bo9w9nre.js +520 -0
  15. package/dist/FeatureList-VRYesXCq.cjs +1 -0
  16. package/dist/FeatureRowContextMenu-CtBqdC1j.cjs +1 -0
  17. package/dist/FeatureRowContextMenu-DCUIiDwc.js +130 -0
  18. package/dist/GeoJSONModal-BV9Tamf4.js +886 -0
  19. package/dist/GeoJSONModal-Dd-nBufy.cjs +9 -0
  20. package/dist/SchemaEditor-B4L17K1e.cjs +1 -0
  21. package/dist/SchemaEditor-ryoTgaLb.js +293 -0
  22. package/dist/SchemaModal-DvMbWskS.js +95 -0
  23. package/dist/SchemaModal-gAuDkd-L.cjs +1 -0
  24. package/dist/SettingsModal-BScVTjpn.js +237 -0
  25. package/dist/SettingsModal-CqaSFxxR.cjs +1 -0
  26. package/dist/ShortcutsModal-D1Y2bGT8.cjs +1 -0
  27. package/dist/ShortcutsModal-ozuS2Ysb.js +299 -0
  28. package/dist/components/ActiveDrawingToolbar.d.cts +1 -0
  29. package/dist/components/ActiveDrawingToolbar.d.ts +1 -0
  30. package/dist/components/BasemapPicker.d.cts +26 -0
  31. package/dist/components/BasemapPicker.d.ts +26 -0
  32. package/dist/components/BooleanOperations.d.cts +1 -0
  33. package/dist/components/BooleanOperations.d.ts +1 -0
  34. package/dist/components/BufferPanel.d.cts +1 -0
  35. package/dist/components/BufferPanel.d.ts +1 -0
  36. package/dist/components/DataTable.d.cts +9 -0
  37. package/dist/components/DataTable.d.ts +9 -0
  38. package/dist/components/DataTablePanel.d.cts +10 -0
  39. package/dist/components/DataTablePanel.d.ts +10 -0
  40. package/dist/components/EditingToolbar.d.cts +1 -0
  41. package/dist/components/EditingToolbar.d.ts +1 -0
  42. package/dist/components/ElementEditorErrorBoundary.d.cts +28 -0
  43. package/dist/components/ElementEditorErrorBoundary.d.ts +28 -0
  44. package/dist/components/ElementEditorUIProvider.d.cts +50 -0
  45. package/dist/components/ElementEditorUIProvider.d.ts +50 -0
  46. package/dist/components/FeatureMapContextMenu.d.cts +23 -0
  47. package/dist/components/FeatureMapContextMenu.d.ts +23 -0
  48. package/dist/components/FitBoundsButton.d.cts +6 -0
  49. package/dist/components/FitBoundsButton.d.ts +6 -0
  50. package/dist/components/FloatingToolbar.d.cts +3 -0
  51. package/dist/components/FloatingToolbar.d.ts +3 -0
  52. package/dist/components/LocateButton.d.cts +11 -0
  53. package/dist/components/LocateButton.d.ts +11 -0
  54. package/dist/components/ReadonlyBanner.d.cts +1 -0
  55. package/dist/components/ReadonlyBanner.d.ts +1 -0
  56. package/dist/components/ShortcutsModal.d.cts +1 -0
  57. package/dist/components/ShortcutsModal.d.ts +1 -0
  58. package/dist/components/SimplifyPanel.d.cts +1 -0
  59. package/dist/components/SimplifyPanel.d.ts +1 -0
  60. package/dist/components/SmoothPanel.d.cts +1 -0
  61. package/dist/components/SmoothPanel.d.ts +1 -0
  62. package/dist/components/UndoRedoToolbar.d.cts +20 -0
  63. package/dist/components/UndoRedoToolbar.d.ts +20 -0
  64. package/dist/components/VertexSelectionBar.d.cts +12 -0
  65. package/dist/components/VertexSelectionBar.d.ts +12 -0
  66. package/dist/components/ZoomIndicator.d.cts +15 -0
  67. package/dist/components/ZoomIndicator.d.ts +15 -0
  68. package/dist/components/dialogs/DynamicFieldRenderer.d.cts +11 -0
  69. package/dist/components/dialogs/DynamicFieldRenderer.d.ts +11 -0
  70. package/dist/components/dialogs/SettingsModal.d.cts +1 -0
  71. package/dist/components/dialogs/SettingsModal.d.ts +1 -0
  72. package/dist/components/lazyParts.d.cts +12 -0
  73. package/dist/components/lazyParts.d.ts +12 -0
  74. package/dist/components/sidebar/FeatureEditModal.d.cts +6 -0
  75. package/dist/components/sidebar/FeatureEditModal.d.ts +6 -0
  76. package/dist/components/sidebar/FeatureList.d.cts +4 -0
  77. package/dist/components/sidebar/FeatureList.d.ts +4 -0
  78. package/dist/components/sidebar/FeatureRow.d.cts +38 -0
  79. package/dist/components/sidebar/FeatureRow.d.ts +38 -0
  80. package/dist/components/sidebar/FeatureRowContextMenu.d.cts +12 -0
  81. package/dist/components/sidebar/FeatureRowContextMenu.d.ts +12 -0
  82. package/dist/components/sidebar/FeatureSidePanel.d.cts +8 -0
  83. package/dist/components/sidebar/FeatureSidePanel.d.ts +8 -0
  84. package/dist/components/sidebar/GeoJSONModal.d.cts +5 -0
  85. package/dist/components/sidebar/GeoJSONModal.d.ts +5 -0
  86. package/dist/components/sidebar/GroupRow.d.cts +21 -0
  87. package/dist/components/sidebar/GroupRow.d.ts +21 -0
  88. package/dist/components/sidebar/HideLayersToggle.d.cts +2 -0
  89. package/dist/components/sidebar/HideLayersToggle.d.ts +2 -0
  90. package/dist/components/sidebar/LayersPanel.d.cts +5 -0
  91. package/dist/components/sidebar/LayersPanel.d.ts +5 -0
  92. package/dist/components/sidebar/PartSubRow.d.cts +9 -0
  93. package/dist/components/sidebar/PartSubRow.d.ts +9 -0
  94. package/dist/components/sidebar/SchemaEditor.d.cts +4 -0
  95. package/dist/components/sidebar/SchemaEditor.d.ts +4 -0
  96. package/dist/components/sidebar/SchemaModal.d.cts +5 -0
  97. package/dist/components/sidebar/SchemaModal.d.ts +5 -0
  98. package/dist/components/sidebar/codeDock.d.cts +21 -0
  99. package/dist/components/sidebar/codeDock.d.ts +21 -0
  100. package/dist/components/ui/Button.d.cts +9 -0
  101. package/dist/components/ui/Button.d.ts +9 -0
  102. package/dist/components/ui/CloseButton.d.cts +6 -0
  103. package/dist/components/ui/CloseButton.d.ts +6 -0
  104. package/dist/components/ui/ContextMenu.d.cts +28 -0
  105. package/dist/components/ui/ContextMenu.d.ts +28 -0
  106. package/dist/components/ui/EditToolbarBtn.d.cts +13 -0
  107. package/dist/components/ui/EditToolbarBtn.d.ts +13 -0
  108. package/dist/components/ui/ElementToaster.d.cts +3 -0
  109. package/dist/components/ui/ElementToaster.d.ts +3 -0
  110. package/dist/components/ui/GeometryTypeIcon.d.cts +7 -0
  111. package/dist/components/ui/GeometryTypeIcon.d.ts +7 -0
  112. package/dist/components/ui/IconButton.d.cts +28 -0
  113. package/dist/components/ui/IconButton.d.ts +28 -0
  114. package/dist/components/ui/Input.d.cts +14 -0
  115. package/dist/components/ui/Input.d.ts +14 -0
  116. package/dist/components/ui/JsonCode.d.cts +4 -0
  117. package/dist/components/ui/JsonCode.d.ts +4 -0
  118. package/dist/components/ui/Kbd.d.cts +16 -0
  119. package/dist/components/ui/Kbd.d.ts +16 -0
  120. package/dist/components/ui/NoFeaturesEmptyState.d.cts +1 -0
  121. package/dist/components/ui/NoFeaturesEmptyState.d.ts +1 -0
  122. package/dist/components/ui/SearchDropdown.d.cts +28 -0
  123. package/dist/components/ui/SearchDropdown.d.ts +28 -0
  124. package/dist/components/ui/ToolButton.d.cts +19 -0
  125. package/dist/components/ui/ToolButton.d.ts +19 -0
  126. package/dist/components/ui/Tooltip.d.cts +12 -0
  127. package/dist/components/ui/Tooltip.d.ts +12 -0
  128. package/dist/components/ui/panelHeader.d.cts +2 -0
  129. package/dist/components/ui/panelHeader.d.ts +2 -0
  130. package/dist/components/ui/resizeEdge.d.cts +4 -0
  131. package/dist/components/ui/resizeEdge.d.ts +4 -0
  132. package/dist/contexts/ElementEditorConfigContext.d.cts +351 -0
  133. package/dist/contexts/ElementEditorConfigContext.d.ts +351 -0
  134. package/dist/contexts/EventContext.d.cts +69 -0
  135. package/dist/contexts/EventContext.d.ts +69 -0
  136. package/dist/contexts/MapControllerContext.d.cts +24 -0
  137. package/dist/contexts/MapControllerContext.d.ts +24 -0
  138. package/dist/contexts/ShortcutConfigContext.d.cts +16 -0
  139. package/dist/contexts/ShortcutConfigContext.d.ts +16 -0
  140. package/dist/contexts/ThemeContext.d.cts +12 -0
  141. package/dist/contexts/ThemeContext.d.ts +12 -0
  142. package/dist/element-editor-ui.cjs +1 -0
  143. package/dist/element-editor-ui.es.js +102 -0
  144. package/dist/geometryWorker-CCwg4tNC.cjs +1 -0
  145. package/dist/geometryWorker-DgQCFSmD.js +25 -0
  146. package/dist/hooks/dragShield.d.cts +7 -0
  147. package/dist/hooks/dragShield.d.ts +7 -0
  148. package/dist/hooks/themeInputs.d.cts +14 -0
  149. package/dist/hooks/themeInputs.d.ts +14 -0
  150. package/dist/hooks/useAccentPalette.d.cts +15 -0
  151. package/dist/hooks/useAccentPalette.d.ts +15 -0
  152. package/dist/hooks/useAccentStyle.d.cts +39 -0
  153. package/dist/hooks/useAccentStyle.d.ts +39 -0
  154. package/dist/hooks/useAdapterControls.d.cts +280 -0
  155. package/dist/hooks/useAdapterControls.d.ts +280 -0
  156. package/dist/hooks/useBalancedWrap.d.cts +8 -0
  157. package/dist/hooks/useBalancedWrap.d.ts +8 -0
  158. package/dist/hooks/useContextMenu.d.cts +11 -0
  159. package/dist/hooks/useContextMenu.d.ts +11 -0
  160. package/dist/hooks/useDataChangeSubscription.d.cts +9 -0
  161. package/dist/hooks/useDataChangeSubscription.d.ts +9 -0
  162. package/dist/hooks/useDragWindow.d.cts +9 -0
  163. package/dist/hooks/useDragWindow.d.ts +9 -0
  164. package/dist/hooks/useFocusTrap.d.cts +7 -0
  165. package/dist/hooks/useFocusTrap.d.ts +7 -0
  166. package/dist/hooks/useGeoJSONDrop.d.cts +40 -0
  167. package/dist/hooks/useGeoJSONDrop.d.ts +40 -0
  168. package/dist/hooks/useGeoJSONExport.d.cts +69 -0
  169. package/dist/hooks/useGeoJSONExport.d.ts +69 -0
  170. package/dist/hooks/useGeoJSONFileImport.d.cts +24 -0
  171. package/dist/hooks/useGeoJSONFileImport.d.ts +24 -0
  172. package/dist/hooks/useInlineRename.d.cts +26 -0
  173. package/dist/hooks/useInlineRename.d.ts +26 -0
  174. package/dist/hooks/useJumpToFeature.d.cts +3 -0
  175. package/dist/hooks/useJumpToFeature.d.ts +3 -0
  176. package/dist/hooks/useKeyboardShortcuts.d.cts +9 -0
  177. package/dist/hooks/useKeyboardShortcuts.d.ts +9 -0
  178. package/dist/hooks/useNominatim.d.cts +24 -0
  179. package/dist/hooks/useNominatim.d.ts +24 -0
  180. package/dist/hooks/usePanelOffset.d.cts +14 -0
  181. package/dist/hooks/usePanelOffset.d.ts +14 -0
  182. package/dist/hooks/useResizablePanel.d.cts +4 -0
  183. package/dist/hooks/useResizablePanel.d.ts +4 -0
  184. package/dist/hooks/useRootTokens.d.cts +27 -0
  185. package/dist/hooks/useRootTokens.d.ts +27 -0
  186. package/dist/hooks/useSearchState.d.cts +23 -0
  187. package/dist/hooks/useSearchState.d.ts +23 -0
  188. package/dist/hooks/useServiceAttribution.d.cts +13 -0
  189. package/dist/hooks/useServiceAttribution.d.ts +13 -0
  190. package/dist/hooks/useWindowEscape.d.cts +25 -0
  191. package/dist/hooks/useWindowEscape.d.ts +25 -0
  192. package/dist/hooks/useWindowFocus.d.cts +4 -0
  193. package/dist/hooks/useWindowFocus.d.ts +4 -0
  194. package/dist/hooks/useWorkerGeometryPreview.d.cts +22 -0
  195. package/dist/hooks/useWorkerGeometryPreview.d.ts +22 -0
  196. package/dist/index-CILw1Du5.js +3165 -0
  197. package/dist/index-DG4wEjGj.cjs +1 -0
  198. package/dist/index.d.cts +89 -0
  199. package/dist/index.d.ts +89 -0
  200. package/dist/internal.cjs +1 -0
  201. package/dist/internal.d.cts +16 -0
  202. package/dist/internal.d.ts +16 -0
  203. package/dist/internal.es.js +42 -0
  204. package/dist/primitives.cjs +1 -0
  205. package/dist/primitives.d.cts +19 -0
  206. package/dist/primitives.d.ts +19 -0
  207. package/dist/primitives.es.js +17 -0
  208. package/dist/store/StoreContext.d.cts +17 -0
  209. package/dist/store/StoreContext.d.ts +17 -0
  210. package/dist/types/events.d.cts +95 -0
  211. package/dist/types/events.d.ts +95 -0
  212. package/dist/useAccentStyle-CPo2XqAn.js +412 -0
  213. package/dist/useAccentStyle-hsGvyHZc.cjs +1 -0
  214. package/dist/useAdapterControls-BBObhzVX.cjs +1 -0
  215. package/dist/useAdapterControls-DVjkwRZ_.js +691 -0
  216. package/dist/useContextMenu-DJ2Cti85.js +10 -0
  217. package/dist/useContextMenu-DbxMvb1s.cjs +1 -0
  218. package/dist/useFocusTrap-BBjPCfDR.cjs +1 -0
  219. package/dist/useFocusTrap-CKxKT8De.js +25 -0
  220. package/dist/useJumpToFeature-Bdz2hqOC.js +16 -0
  221. package/dist/useJumpToFeature-LwjxGzfy.cjs +1 -0
  222. package/dist/useWindowFocus-DuQVjnHE.js +80 -0
  223. package/dist/useWindowFocus-EemgNOuz.cjs +1 -0
  224. package/dist/utils/booleanValue.d.cts +4 -0
  225. package/dist/utils/booleanValue.d.ts +4 -0
  226. package/dist/utils/clipboardError.d.cts +3 -0
  227. package/dist/utils/clipboardError.d.ts +3 -0
  228. package/dist/utils/download.d.cts +42 -0
  229. package/dist/utils/download.d.ts +42 -0
  230. package/dist/utils/geojsonDocument.d.cts +168 -0
  231. package/dist/utils/geojsonDocument.d.ts +168 -0
  232. package/dist/utils/geometryWorkerClient.d.cts +6 -0
  233. package/dist/utils/geometryWorkerClient.d.ts +6 -0
  234. package/dist/utils/layerOrder.d.cts +9 -0
  235. package/dist/utils/layerOrder.d.ts +9 -0
  236. package/dist/utils/lazyWithPreload.d.cts +24 -0
  237. package/dist/utils/lazyWithPreload.d.ts +24 -0
  238. package/dist/utils/lineSmooth.d.cts +7 -0
  239. package/dist/utils/lineSmooth.d.ts +7 -0
  240. package/dist/utils/platform.d.cts +2 -0
  241. package/dist/utils/platform.d.ts +2 -0
  242. package/dist/workers/geometryWorker.d.cts +1 -0
  243. package/dist/workers/geometryWorker.d.ts +1 -0
  244. package/package.json +133 -3
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @element-editor/ui/primitives
3
+ *
4
+ * Lightweight base UI components with no map or store dependencies.
5
+ * Use this entry point when building custom layouts with adapter packages.
6
+ *
7
+ * @example
8
+ * import { Button, Tooltip, Input } from '@element-editor/ui/primitives'
9
+ */
10
+ export { Button } from './components/ui/Button.js';
11
+ export type { ButtonVariant, ButtonSize } from './components/ui/Button.js';
12
+ export { ContextMenu } from './components/ui/ContextMenu.js';
13
+ export { Input, Textarea, SelectInput } from './components/ui/Input.js';
14
+ export { Kbd, KbdDark, KbdInvert } from './components/ui/Kbd.js';
15
+ export { SearchDropdown } from './components/ui/SearchDropdown.js';
16
+ export type { SearchDropdownHandle } from './components/ui/SearchDropdown.js';
17
+ export { ToolButton } from './components/ui/ToolButton.js';
18
+ export { Tooltip } from './components/ui/Tooltip.js';
19
+ export { EditToolbarBtn, ToolbarDivider } from './components/ui/EditToolbarBtn.js';
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { B as o, C as s, E as e, I as n, K as r, a as d, b, S as l, c as u, T, d as i, e as p, f as c } from "./EditToolbarBtn-SR4xHd8G.js";
3
+ export {
4
+ o as Button,
5
+ s as ContextMenu,
6
+ e as EditToolbarBtn,
7
+ n as Input,
8
+ r as Kbd,
9
+ d as KbdDark,
10
+ b as KbdInvert,
11
+ l as SearchDropdown,
12
+ u as SelectInput,
13
+ T as Textarea,
14
+ i as ToolButton,
15
+ p as ToolbarDivider,
16
+ c as Tooltip
17
+ };
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ import { StoreApi } from 'zustand';
3
+ import { DataStore, UIStore } from '@element-editor/core';
4
+ /** UI stores whose GeoJSON inspector is still in its on-load open (`ui.geojsonEditorOpen`); it doesn't take focus. */
5
+ export declare const inspectorOpenedOnLoad: WeakSet<StoreApi<UIStore>>;
6
+ interface StoreContextValue {
7
+ dataStore: StoreApi<DataStore>;
8
+ uiStore: StoreApi<UIStore>;
9
+ }
10
+ export declare const StoreContext: React.Context<StoreContextValue | null>;
11
+ export declare function GeoStoreProvider({ children }: {
12
+ children: React.ReactNode;
13
+ }): import("react/jsx-runtime").JSX.Element;
14
+ export declare function useDataStore<T>(selector: (state: DataStore) => T): T;
15
+ export declare function useUIStore<T>(selector: (state: UIStore) => T): T;
16
+ export declare function useGeoStore(): StoreContextValue;
17
+ export {};
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ import { StoreApi } from 'zustand';
3
+ import { DataStore, UIStore } from '@element-editor/core';
4
+ /** UI stores whose GeoJSON inspector is still in its on-load open (`ui.geojsonEditorOpen`); it doesn't take focus. */
5
+ export declare const inspectorOpenedOnLoad: WeakSet<StoreApi<UIStore>>;
6
+ interface StoreContextValue {
7
+ dataStore: StoreApi<DataStore>;
8
+ uiStore: StoreApi<UIStore>;
9
+ }
10
+ export declare const StoreContext: React.Context<StoreContextValue | null>;
11
+ export declare function GeoStoreProvider({ children }: {
12
+ children: React.ReactNode;
13
+ }): import("react/jsx-runtime").JSX.Element;
14
+ export declare function useDataStore<T>(selector: (state: DataStore) => T): T;
15
+ export declare function useUIStore<T>(selector: (state: UIStore) => T): T;
16
+ export declare function useGeoStore(): StoreContextValue;
17
+ export {};
@@ -0,0 +1,95 @@
1
+ import { ElementEditorError, ErrorCode, ErrorSource } from '@element-editor/core';
2
+ /**
3
+ * Events emitted by the Element library.
4
+ *
5
+ * Pass an `onEvent` prop to `<ElementEditor>` to receive these instead of (or in
6
+ * addition to) the built-in sonner toasts. When `onEvent` is provided the
7
+ * library goes fully silent — no `<Toaster>` is rendered and no toasts are
8
+ * fired. The host app is responsible for surfacing notifications.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <ElementEditor
13
+ * onEvent={(e) => {
14
+ * if (e.type === 'feature:deleted') myToast(`Deleted "${e.label}"`)
15
+ * if (e.type === 'error') console.error(e.code, e.message)
16
+ * }}
17
+ * />
18
+ * ```
19
+ */
20
+ export type ElementEditorEvent =
21
+ /** A single feature was deleted. `undo()` reverts the deletion. */
22
+ {
23
+ type: 'feature:deleted';
24
+ featureId: string;
25
+ label: string;
26
+ undo: () => void;
27
+ }
28
+ /** Multiple features were deleted at once. `undo()` reverts the deletion. */
29
+ | {
30
+ type: 'features:deleted';
31
+ count: number;
32
+ undo: () => void;
33
+ }
34
+ /** A single feature was duplicated. */
35
+ | {
36
+ type: 'feature:duplicated';
37
+ featureId: string;
38
+ label: string;
39
+ }
40
+ /** Multiple features were duplicated at once. */
41
+ | {
42
+ type: 'features:duplicated';
43
+ count: number;
44
+ }
45
+ /** A multi-geometry feature was broken into individual features. */
46
+ | {
47
+ type: 'feature:broken';
48
+ featureId: string;
49
+ count: number;
50
+ undo: () => void;
51
+ }
52
+ /** The current selection was copied to the internal clipboard. */
53
+ | {
54
+ type: 'selection:copied';
55
+ }
56
+ /** Features were pasted from the internal clipboard. */
57
+ | {
58
+ type: 'selection:pasted';
59
+ count: number;
60
+ } | {
61
+ type: 'undo';
62
+ } | {
63
+ type: 'redo';
64
+ }
65
+ /**
66
+ * A recoverable error the user should be aware of. `code` / `source` are the same as on the
67
+ * {@link ElementEditorError} `onError` receives (which fires first; returning `false` from it
68
+ * stops this event).
69
+ */
70
+ | {
71
+ type: 'error';
72
+ code: ErrorCode;
73
+ source: ErrorSource;
74
+ message: string;
75
+ description?: string;
76
+ }
77
+ /** A non-blocking warning (e.g. converting a circle to a plain polygon). */
78
+ | {
79
+ type: 'warning';
80
+ message: string;
81
+ description?: string;
82
+ }
83
+ /** A positive confirmation (e.g. "Coordinate updated"). */
84
+ | {
85
+ type: 'success';
86
+ message: string;
87
+ description?: string;
88
+ };
89
+ /**
90
+ * `onError` handler. Called first for every runtime failure, also when `onEvent` is set and for
91
+ * "quiet" failures that show no toast (a failed preview, the system clipboard, the search box).
92
+ * Return nothing to keep the built-in handling, `false` to stop it (no toast, no `onEvent` error
93
+ * event: you show it), or a string to show that text instead (e.g. a translation keyed on `code`).
94
+ */
95
+ export type ElementEditorErrorHandler = (error: ElementEditorError) => void | false | string;
@@ -0,0 +1,95 @@
1
+ import { ElementEditorError, ErrorCode, ErrorSource } from '@element-editor/core';
2
+ /**
3
+ * Events emitted by the Element library.
4
+ *
5
+ * Pass an `onEvent` prop to `<ElementEditor>` to receive these instead of (or in
6
+ * addition to) the built-in sonner toasts. When `onEvent` is provided the
7
+ * library goes fully silent — no `<Toaster>` is rendered and no toasts are
8
+ * fired. The host app is responsible for surfacing notifications.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <ElementEditor
13
+ * onEvent={(e) => {
14
+ * if (e.type === 'feature:deleted') myToast(`Deleted "${e.label}"`)
15
+ * if (e.type === 'error') console.error(e.code, e.message)
16
+ * }}
17
+ * />
18
+ * ```
19
+ */
20
+ export type ElementEditorEvent =
21
+ /** A single feature was deleted. `undo()` reverts the deletion. */
22
+ {
23
+ type: 'feature:deleted';
24
+ featureId: string;
25
+ label: string;
26
+ undo: () => void;
27
+ }
28
+ /** Multiple features were deleted at once. `undo()` reverts the deletion. */
29
+ | {
30
+ type: 'features:deleted';
31
+ count: number;
32
+ undo: () => void;
33
+ }
34
+ /** A single feature was duplicated. */
35
+ | {
36
+ type: 'feature:duplicated';
37
+ featureId: string;
38
+ label: string;
39
+ }
40
+ /** Multiple features were duplicated at once. */
41
+ | {
42
+ type: 'features:duplicated';
43
+ count: number;
44
+ }
45
+ /** A multi-geometry feature was broken into individual features. */
46
+ | {
47
+ type: 'feature:broken';
48
+ featureId: string;
49
+ count: number;
50
+ undo: () => void;
51
+ }
52
+ /** The current selection was copied to the internal clipboard. */
53
+ | {
54
+ type: 'selection:copied';
55
+ }
56
+ /** Features were pasted from the internal clipboard. */
57
+ | {
58
+ type: 'selection:pasted';
59
+ count: number;
60
+ } | {
61
+ type: 'undo';
62
+ } | {
63
+ type: 'redo';
64
+ }
65
+ /**
66
+ * A recoverable error the user should be aware of. `code` / `source` are the same as on the
67
+ * {@link ElementEditorError} `onError` receives (which fires first; returning `false` from it
68
+ * stops this event).
69
+ */
70
+ | {
71
+ type: 'error';
72
+ code: ErrorCode;
73
+ source: ErrorSource;
74
+ message: string;
75
+ description?: string;
76
+ }
77
+ /** A non-blocking warning (e.g. converting a circle to a plain polygon). */
78
+ | {
79
+ type: 'warning';
80
+ message: string;
81
+ description?: string;
82
+ }
83
+ /** A positive confirmation (e.g. "Coordinate updated"). */
84
+ | {
85
+ type: 'success';
86
+ message: string;
87
+ description?: string;
88
+ };
89
+ /**
90
+ * `onError` handler. Called first for every runtime failure, also when `onEvent` is set and for
91
+ * "quiet" failures that show no toast (a failed preview, the system clipboard, the search box).
92
+ * Return nothing to keep the built-in handling, `false` to stop it (no toast, no `onEvent` error
93
+ * event: you show it), or a string to show that text instead (e.g. a translation keyed on `code`).
94
+ */
95
+ export type ElementEditorErrorHandler = (error: ElementEditorError) => void | false | string;
@@ -0,0 +1,412 @@
1
+ import { createContext as w, useState as B, useEffect as J, useContext as T, useCallback as U, useRef as q, useMemo as $, useLayoutEffect as Q } from "react";
2
+ import { jsx as _ } from "react/jsx-runtime";
3
+ import { readPersisted as X, writePersisted as z } from "@element-editor/core";
4
+ import { warnOnce as L } from "@element-editor/core/internal";
5
+ const g = { attributes: !0, attributeFilter: ["style", "class", "data-elm-theme"] }, tt = { attributes: !0, attributeFilter: ["style", "class"] }, et = { childList: !0, subtree: !0, characterData: !0, attributes: !0, attributeFilter: ["href", "media", "disabled"] }, st = /* @__PURE__ */ new Set([
6
+ "--elm-panel-offset",
7
+ "--elm-table-offset",
8
+ "--elm-bottom-row-height",
9
+ "--elm-bottom-stack-offset",
10
+ "--elm-bottom-toolbar-offset",
11
+ "--elm-left-center-shift",
12
+ "--elm-right-center-shift"
13
+ ]), M = (t) => {
14
+ if (!(t instanceof HTMLElement)) return "";
15
+ let e = `${t.className}|${t.getAttribute("data-elm-theme") ?? ""}`;
16
+ for (const s of t.style) !st.has(s) && !s.startsWith("transition") && (e += `;${s}:${t.style.getPropertyValue(s)}`);
17
+ return e;
18
+ };
19
+ function rt(t, e) {
20
+ const s = (u) => {
21
+ u.target instanceof HTMLLinkElement && e();
22
+ };
23
+ let r = M(t);
24
+ const a = new MutationObserver((u) => {
25
+ const i = r;
26
+ r = M(t), !(r === i && u.every((m) => m.target === t)) && e();
27
+ });
28
+ return t && a.observe(t, g), a.observe(document.documentElement, tt), a.observe(document.head, et), document.addEventListener("load", s, !0), () => {
29
+ a.disconnect(), document.removeEventListener("load", s, !0);
30
+ };
31
+ }
32
+ const ot = [
33
+ "--elm-font",
34
+ "--elm-font-mono",
35
+ "--elm-radius",
36
+ "--elm-radius-control",
37
+ "--elm-shadow",
38
+ "--elm-shadow-raised",
39
+ "--elm-shadow-control",
40
+ "--elm-surface",
41
+ "--elm-surface-raised",
42
+ "--elm-surface-sunken",
43
+ "--elm-surface-hover",
44
+ "--elm-control-hover",
45
+ "--elm-text",
46
+ "--elm-text-secondary",
47
+ "--elm-text-muted",
48
+ "--elm-text-subtle",
49
+ "--elm-text-disabled",
50
+ "--elm-border",
51
+ "--elm-border-subtle",
52
+ "--elm-border-strong",
53
+ "--elm-focus-ring",
54
+ "--elm-tooltip",
55
+ "--elm-tooltip-text"
56
+ ], at = [
57
+ ...ot,
58
+ "--elm-accent",
59
+ ...[50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950].map((t) => `--elm-primary-${t}`)
60
+ ];
61
+ function K(t) {
62
+ if (!t) return;
63
+ const e = getComputedStyle(t);
64
+ let s;
65
+ for (const r of at) {
66
+ const a = e.getPropertyValue(r).trim();
67
+ a && ((s ?? (s = {}))[r] = a);
68
+ }
69
+ return s;
70
+ }
71
+ const nt = (t, e) => {
72
+ if (t === e) return !0;
73
+ if (!t || !e) return !1;
74
+ const s = Object.keys(t);
75
+ return s.length === Object.keys(e).length && s.every((r) => t[r] === e[r]);
76
+ };
77
+ function vt(t) {
78
+ const [e, s] = B(void 0);
79
+ return J(() => {
80
+ if (!t) {
81
+ s(void 0);
82
+ return;
83
+ }
84
+ const r = () => {
85
+ const m = K(t);
86
+ s((n) => nt(n, m) ? n : m);
87
+ };
88
+ let a = 0;
89
+ const u = () => {
90
+ a || (a = requestAnimationFrame(() => {
91
+ a = 0, r();
92
+ }));
93
+ };
94
+ r();
95
+ const i = rt(t, u);
96
+ return () => {
97
+ i(), cancelAnimationFrame(a);
98
+ };
99
+ }, [t]), e;
100
+ }
101
+ const ut = w(void 0), N = /* @__PURE__ */ new WeakMap();
102
+ function kt(t, e) {
103
+ if (!e) return;
104
+ const s = (e instanceof HTMLElement ? e.className + "|" + e.getAttribute("data-elm-theme") + "|" + (e.getAttribute("style") ?? "") : "") + "|" + document.documentElement.className + "|" + (document.documentElement.getAttribute("style") ?? ""), r = N.get(t);
105
+ if (r && r.root === e && r.key === s) return;
106
+ const a = K(e) ?? {};
107
+ for (const u of (r == null ? void 0 : r.names) ?? []) u in a || t.style.removeProperty(u);
108
+ for (const [u, i] of Object.entries(a)) t.style.setProperty(u, i);
109
+ N.set(t, { root: e, key: s, names: Object.keys(a) });
110
+ }
111
+ const Ct = {
112
+ point: "place-point",
113
+ line: "draw-line",
114
+ polygon: "draw-polygon",
115
+ route: "draw-route",
116
+ circle: "draw-circle",
117
+ rectangle: "draw-rect",
118
+ freehand: "draw-freehand",
119
+ picker: "pick-shape",
120
+ measure: "measure"
121
+ }, C = [
122
+ "topLeft",
123
+ "topCenter",
124
+ "topRight",
125
+ "leftCenter",
126
+ "rightCenter",
127
+ "bottomLeft",
128
+ "bottomCenter",
129
+ "bottomRight",
130
+ "statusLeft",
131
+ "statusRight"
132
+ ], V = (t) => (t && typeof t == "object" && (Object.values(t).forEach(V), Object.freeze(t)), t), H = V({
133
+ topCenter: ["toolbar"],
134
+ leftCenter: [{ group: ["undo", "redo"] }],
135
+ bottomLeft: ["basemap", "fitBounds", "locate", "zoomIndicator", "table", "schema", "geojson", "settings", "keyboard", "applyChanges"]
136
+ });
137
+ function f(t) {
138
+ const e = [];
139
+ for (const s of t)
140
+ s === "separator" && (e.length === 0 || e[e.length - 1] === "separator") || e.push(s);
141
+ return e[e.length - 1] === "separator" && e.pop(), e;
142
+ }
143
+ function Lt(t, e, s) {
144
+ switch (t) {
145
+ case "fitBounds":
146
+ return e.zoomToAll;
147
+ case "locate":
148
+ return e.locateButton;
149
+ case "zoomIndicator":
150
+ return e.zoomIndicator;
151
+ case "table":
152
+ return e.dataTable;
153
+ case "schema":
154
+ return e.schemaEditor && !s.readonly;
155
+ case "geojson":
156
+ return e.geojsonEditor;
157
+ case "settings":
158
+ return e.settings;
159
+ case "keyboard":
160
+ return e.keyboardShortcuts.show;
161
+ case "applyChanges":
162
+ return s.canSubmit && !s.readonly;
163
+ case "undo":
164
+ case "redo":
165
+ return !s.readonly;
166
+ // nothing to undo when nothing can be edited
167
+ case "basemap":
168
+ return s.hasBasemaps;
169
+ default:
170
+ return !0;
171
+ }
172
+ }
173
+ function Tt(t, e) {
174
+ const s = [];
175
+ for (const r of t)
176
+ if (typeof r == "object") {
177
+ const a = f(r.group.filter((u) => u === "separator" || e(u)));
178
+ a.length && s.push({ group: a });
179
+ } else (r === "separator" || e(r)) && s.push(r);
180
+ return f(s);
181
+ }
182
+ function lt(t) {
183
+ return t === !1 ? { enabled: !1, show: !1, mapZoom: !1 } : t === !0 || t === void 0 ? { enabled: !0, show: !0, mapZoom: !1 } : { enabled: t.enabled ?? !0, show: t.show ?? !0, mapZoom: t.mapZoom ?? !1 };
184
+ }
185
+ const A = /* @__PURE__ */ new Set([
186
+ "toolbar",
187
+ "undo",
188
+ "redo",
189
+ "fitBounds",
190
+ "locate",
191
+ "zoomIndicator",
192
+ "table",
193
+ "schema",
194
+ "geojson",
195
+ "settings",
196
+ "keyboard",
197
+ "applyChanges",
198
+ "attribution",
199
+ "basemap"
200
+ ]), S = (t) => t === "statusLeft" || t === "statusRight", j = (t) => !!t && typeof t == "object" && Array.isArray(t.group);
201
+ function it(t, e, s) {
202
+ return A.has(t) ? (t === "toolbar" || t === "basemap") && s ? `'${t}' can't go in a group` : S(e) && (t === "toolbar" || t === "applyChanges") ? `'${t}' can't go in the status bar` : t === "attribution" && !S(e) ? "'attribution' can only go in statusLeft or statusRight" : null : `'${t}' is not a control`;
203
+ }
204
+ const R = (t) => Array.isArray(t) ? { items: t } : {
205
+ items: Array.isArray(t == null ? void 0 : t.items) ? t.items : [],
206
+ direction: t == null ? void 0 : t.direction
207
+ };
208
+ function mt(t) {
209
+ const e = /* @__PURE__ */ new Map(), s = {};
210
+ for (const r of C) {
211
+ const a = R(t[r]), u = S(r) ? "horizontal" : a.direction || (r === "leftCenter" || r === "rightCenter" ? "vertical" : "horizontal"), i = (o) => {
212
+ const l = e.get(o);
213
+ return l ? l === r ? `'${o}' is listed twice in ${r}; keeping the first one` : `'${o}' is in both ${l} and ${r}; keeping ${l} (the first in slot order). To move one control without relisting the defaults, use withLayout({ move: { ${o}: '${r}' } })` : null;
214
+ }, m = (o, l) => {
215
+ const p = o === "separator" ? l || S(r) ? null : "'separator' only goes inside a group or in the status bar (there's nothing to draw it on over the map); put it inside a { group: [...] }" : typeof o != "string" ? j(o) ? "groups can't be nested" : `${JSON.stringify(o)} is not a control, 'separator' or { group: [...] }` : it(o, r, l) ?? i(o);
216
+ return p ? (L(`${r}:${p}`, `config.ui.layout.${r}: ${p}. Ignoring it.`), !1) : (o !== "separator" && e.set(o, r), !0);
217
+ }, n = [];
218
+ for (const o of a.items)
219
+ if (j(o)) {
220
+ const l = f(o.group.filter((p) => m(p, !0)));
221
+ l.length && n.push({ group: l });
222
+ } else m(o, !1) && n.push(o);
223
+ s[r] = { items: f(n), direction: u };
224
+ }
225
+ return s;
226
+ }
227
+ function St(t, e = H) {
228
+ const s = Object.entries(t.move ?? {}), r = new Set(t.hide ?? []);
229
+ for (const n of [...s.map(([o]) => o), ...r])
230
+ A.has(n) || L(`withLayout:${n}`, `withLayout: '${n}' is not a control. Ignoring it.`);
231
+ const a = /* @__PURE__ */ new Set([...r, ...s.map(([n]) => n)]), u = (n) => !(typeof n == "string" && a.has(n)), i = {}, m = (n, o, l) => {
232
+ i[n] = Array.isArray(o) || o === void 0 ? l : { ...o, items: l };
233
+ };
234
+ for (const n of C) {
235
+ const o = e[n];
236
+ if (o === void 0) continue;
237
+ const l = R(o).items.flatMap((p) => {
238
+ if (!j(p)) return u(p) ? [p] : [];
239
+ const c = f(p.group.filter(u));
240
+ return c.length ? [{ group: c }] : [];
241
+ });
242
+ m(n, o, f(l));
243
+ }
244
+ for (const [n, o] of s) {
245
+ if (!A.has(n)) continue;
246
+ if (r.has(n)) {
247
+ L(`withLayout:both:${n}`, `withLayout: '${n}' is both moved and hidden; hiding it.`);
248
+ continue;
249
+ }
250
+ const { slot: l, at: p = "end" } = typeof o == "string" ? { slot: o } : o ?? {};
251
+ if (!C.includes(l)) {
252
+ L(`withLayout:slot:${String(l)}`, `withLayout: '${String(l)}' is not a slot (moving '${n}'). Ignoring it.`);
253
+ continue;
254
+ }
255
+ const c = i[l], h = [...R(c).items];
256
+ m(l, c, p === "start" ? [n, ...h] : [...h, n]);
257
+ }
258
+ return i;
259
+ }
260
+ function wt(t, e) {
261
+ const s = new Set(C.flatMap((i) => t[i].items.flatMap((m) => typeof m == "object" ? m.group : [m]))), r = [];
262
+ !e.readonly && (e.tools === null || e.tools.length > 0) && !s.has("toolbar") && r.push(`'toolbar' isn't placed, so the drawing tools are ${e.shortcuts ? "reachable only by keyboard shortcut" : "unreachable"}. Put it in a map slot (withLayout({ move: { toolbar: 'topCenter' } })), or set readonly / tools: [] if that's on purpose`), e.canSubmit && !e.readonly && !s.has("applyChanges") && r.push("onSubmit is set but 'applyChanges' isn't placed, so users can't submit. Place it, or call ref.submit() yourself");
263
+ const u = ["undo", "redo"].filter((i) => !s.has(i));
264
+ return !e.readonly && !e.shortcuts && u.length && r.push(`${u.map((i) => `'${i}'`).join(" and ")} ${u.length > 1 ? "aren't" : "isn't"} placed and keyboard shortcuts are off, so users can't ${u.join(" or ")}`), r;
265
+ }
266
+ const pt = {
267
+ topLeft: "top-left",
268
+ topCenter: "top-center",
269
+ topRight: "top-right",
270
+ leftCenter: "left-center",
271
+ rightCenter: "right-center",
272
+ bottomLeft: "bottom-left",
273
+ bottomCenter: "bottom-center",
274
+ bottomRight: "bottom-right"
275
+ };
276
+ function Y(t) {
277
+ var r, a, u, i, m, n, o, l, p, c, h, v, k, d, y, b, P, I;
278
+ const e = mt(((r = t == null ? void 0 : t.ui) == null ? void 0 : r.layout) ?? H), s = C.find((G) => e[G].items.includes("toolbar"));
279
+ return {
280
+ mode: (t == null ? void 0 : t.mode) ?? "system",
281
+ persistKey: (t == null ? void 0 : t.persistKey) || void 0,
282
+ persist: (t == null ? void 0 : t.persist) ?? !0,
283
+ network: (t == null ? void 0 : t.network) ?? {},
284
+ accentColor: (t == null ? void 0 : t.accentColor) || void 0,
285
+ featureColor: (t == null ? void 0 : t.featureColor) || void 0,
286
+ tools: (t == null ? void 0 : t.tools) ?? "all",
287
+ ui: {
288
+ hints: ((a = t == null ? void 0 : t.ui) == null ? void 0 : a.hints) ?? !0,
289
+ dataTable: ((u = t == null ? void 0 : t.ui) == null ? void 0 : u.dataTable) ?? !0,
290
+ layerList: ((i = t == null ? void 0 : t.ui) == null ? void 0 : i.layerList) ?? !0,
291
+ schemaEditor: ((m = t == null ? void 0 : t.ui) == null ? void 0 : m.schemaEditor) ?? !0,
292
+ geojsonEditor: ((n = t == null ? void 0 : t.ui) == null ? void 0 : n.geojsonEditor) ?? !0,
293
+ geojsonEditorOpen: (((o = t == null ? void 0 : t.ui) == null ? void 0 : o.geojsonEditor) ?? !0) && (((l = t == null ? void 0 : t.ui) == null ? void 0 : l.geojsonEditorOpen) ?? !1),
294
+ settings: ((p = t == null ? void 0 : t.ui) == null ? void 0 : p.settings) ?? !0,
295
+ zoomToAll: ((c = t == null ? void 0 : t.ui) == null ? void 0 : c.zoomToAll) ?? !0,
296
+ zoomIndicator: ((h = t == null ? void 0 : t.ui) == null ? void 0 : h.zoomIndicator) ?? !0,
297
+ locateButton: ((v = t == null ? void 0 : t.ui) == null ? void 0 : v.locateButton) ?? !0,
298
+ keyboardShortcuts: lt((k = t == null ? void 0 : t.ui) == null ? void 0 : k.keyboardShortcuts),
299
+ layout: e
300
+ },
301
+ toolbar: {
302
+ position: s && pt[s] || "top-center",
303
+ direction: ((d = t == null ? void 0 : t.toolbar) == null ? void 0 : d.direction) ?? "horizontal"
304
+ },
305
+ units: {
306
+ length: ((y = t == null ? void 0 : t.units) == null ? void 0 : y.length) ?? "auto",
307
+ area: ((b = t == null ? void 0 : t.units) == null ? void 0 : b.area) ?? "auto",
308
+ display: ((P = t == null ? void 0 : t.units) == null ? void 0 : P.display) ?? "human",
309
+ precision: ((I = t == null ? void 0 : t.units) == null ? void 0 : I.precision) ?? 2
310
+ }
311
+ };
312
+ }
313
+ const Z = w(Y()), x = w({
314
+ override: {},
315
+ setUnits: () => {
316
+ },
317
+ resetUnits: () => {
318
+ }
319
+ }), E = "elm_units", O = 1;
320
+ function D(t) {
321
+ return t === "metric" || t === "imperial" || t === "auto";
322
+ }
323
+ function dt(t) {
324
+ if (!t || typeof t != "object") return null;
325
+ const e = t, s = {};
326
+ return D(e.length) && (s.length = e.length), D(e.area) && (s.area = e.area), (e.display === "human" || e.display === "raw") && (s.display = e.display), typeof e.precision == "number" && e.precision >= 0 && e.precision <= 6 && (s.precision = e.precision), s;
327
+ }
328
+ function Et({
329
+ config: t,
330
+ children: e
331
+ }) {
332
+ var h, v, k;
333
+ const s = t == null ? void 0 : t.persistKey, r = t == null ? void 0 : t.persist, [a, u] = B(
334
+ () => X(E, O, dt, { persistKey: s, persist: r }) ?? {}
335
+ ), i = U((d) => {
336
+ u((y) => {
337
+ const b = typeof d == "function" ? d(y) : { ...y, ...d };
338
+ return z(E, O, b, { persistKey: s, persist: r }), b;
339
+ });
340
+ }, [s, r]), m = U(() => {
341
+ u({}), z(E, O, {}, { persistKey: s, persist: r });
342
+ }, [s, r]), n = JSON.stringify(t ?? null), o = q((h = t == null ? void 0 : t.network) == null ? void 0 : h.fetch);
343
+ o.current = (v = t == null ? void 0 : t.network) == null ? void 0 : v.fetch;
344
+ const l = !!((k = t == null ? void 0 : t.network) != null && k.fetch), p = $(() => {
345
+ const d = Y(t);
346
+ return l && (d.network = { ...d.network, fetch: (y, b) => o.current(y, b) }), {
347
+ ...d,
348
+ units: {
349
+ length: a.length ?? d.units.length,
350
+ area: a.area ?? d.units.area,
351
+ display: a.display ?? d.units.display,
352
+ precision: a.precision ?? d.units.precision
353
+ }
354
+ };
355
+ }, [n, a, l]), c = $(
356
+ () => ({ override: a, setUnits: i, resetUnits: m }),
357
+ [a, i, m]
358
+ );
359
+ return /* @__PURE__ */ _(Z.Provider, { value: p, children: /* @__PURE__ */ _(x.Provider, { value: c, children: e }) });
360
+ }
361
+ function W() {
362
+ return T(Z);
363
+ }
364
+ function Ot() {
365
+ return T(x);
366
+ }
367
+ const ct = w(void 0);
368
+ function F(t) {
369
+ return t ? { "--elm-accent": t } : void 0;
370
+ }
371
+ function $t() {
372
+ const t = W().accentColor, e = T(ut), s = T(ct);
373
+ return $(
374
+ () => e || s ? { ...F(t), ...e, ...s } : F(t),
375
+ [t, e, s]
376
+ );
377
+ }
378
+ function At(t) {
379
+ const e = W().accentColor;
380
+ Q(() => {
381
+ if (!t || !e) return;
382
+ const s = t.closest("[data-elm-theme]") ?? t;
383
+ if (s.style.getPropertyValue("--elm-accent") !== e)
384
+ return s.style.setProperty("--elm-accent", e), () => {
385
+ s.style.getPropertyValue("--elm-accent") === e && s.style.removeProperty("--elm-accent");
386
+ };
387
+ }, [t, e]);
388
+ }
389
+ export {
390
+ H as D,
391
+ Et as E,
392
+ C as L,
393
+ ct as R,
394
+ ot as T,
395
+ ut as a,
396
+ kt as b,
397
+ mt as c,
398
+ vt as d,
399
+ $t as e,
400
+ Ct as f,
401
+ F as g,
402
+ Y as h,
403
+ Lt as i,
404
+ At as j,
405
+ Ot as k,
406
+ wt as l,
407
+ St as m,
408
+ K as r,
409
+ W as u,
410
+ Tt as v,
411
+ rt as w
412
+ };