treege 3.0.0-beta.7 → 3.0.0-beta.70

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 (209) hide show
  1. package/LICENSE +18 -12
  2. package/README.md +476 -81
  3. package/dist/DefaultSubmitButton-PXs4TMgX.js +1766 -0
  4. package/dist/ThemeContext-CdHMLHiw.js +942 -0
  5. package/dist/editor/components/input/ComboboxWithCreate.d.ts +2 -1
  6. package/dist/editor/components/styles/EditorStyles.d.ts +2 -0
  7. package/dist/editor/constants/defaultNode.d.ts +1 -1
  8. package/dist/editor/constants/edgeTypes.d.ts +3 -2
  9. package/dist/editor/constants/inputTypeIcons.d.ts +3 -0
  10. package/dist/editor/constants/nodeSpacing.d.ts +25 -0
  11. package/dist/editor/constants/nodeTypes.d.ts +4 -5
  12. package/dist/editor/context/OpenApiContext.d.ts +79 -0
  13. package/dist/editor/context/TreegeEditorRuntimeProvider.d.ts +78 -0
  14. package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
  15. package/dist/editor/features/TreegeEditor/controls/MiniMapControl.d.ts +6 -0
  16. package/dist/editor/features/TreegeEditor/dialogs/AuthorizeDialog.d.ts +20 -0
  17. package/dist/editor/features/TreegeEditor/dialogs/ChangeNodeTypeDialog.d.ts +2 -0
  18. package/dist/editor/features/TreegeEditor/dialogs/DeleteNodeDialog.d.ts +2 -0
  19. package/dist/editor/features/TreegeEditor/dialogs/HeadersDialog.d.ts +19 -0
  20. package/dist/editor/features/TreegeEditor/dialogs/OpenApiDialog.d.ts +6 -0
  21. package/dist/editor/features/TreegeEditor/edges/ConditionalEdge.d.ts +2 -2
  22. package/dist/editor/features/TreegeEditor/edges/DefaultEdge.d.ts +3 -0
  23. package/dist/editor/features/TreegeEditor/forms/JsonTemplateEditor.d.ts +13 -0
  24. package/dist/editor/features/TreegeEditor/forms/OptionsMappingFields.d.ts +34 -0
  25. package/dist/editor/features/TreegeEditor/forms/OptionsSourceForm.d.ts +7 -0
  26. package/dist/editor/features/TreegeEditor/forms/SensitiveHeaderWarning.d.ts +13 -0
  27. package/dist/editor/features/TreegeEditor/forms/SubmitConfigForm.d.ts +7 -0
  28. package/dist/editor/features/TreegeEditor/inputs/ApiUrlCombobox.d.ts +20 -0
  29. package/dist/editor/features/TreegeEditor/inputs/ComboboxPattern.d.ts +2 -1
  30. package/dist/editor/features/TreegeEditor/inputs/OptionImageField.d.ts +6 -0
  31. package/dist/editor/features/TreegeEditor/inputs/SelectNodeGroup.d.ts +22 -1
  32. package/dist/editor/features/TreegeEditor/layout/AutoLayout.d.ts +15 -0
  33. package/dist/editor/features/TreegeEditor/nodes/TreegeNode.d.ts +5 -0
  34. package/dist/editor/features/TreegeEditor/nodes/components/BottomHandleDropdown.d.ts +25 -0
  35. package/dist/editor/features/TreegeEditor/nodes/components/NodeGroupBadge.d.ts +6 -0
  36. package/dist/editor/features/TreegeEditor/nodes/components/NodeImage.d.ts +5 -0
  37. package/dist/editor/features/TreegeEditor/nodes/components/NodeImageButton.d.ts +6 -0
  38. package/dist/editor/features/TreegeEditor/nodes/components/NodeInputPreview.d.ts +12 -0
  39. package/dist/editor/features/TreegeEditor/nodes/components/NodeLabelInput.d.ts +10 -0
  40. package/dist/editor/features/TreegeEditor/nodes/components/NodeMoreMenu.d.ts +6 -0
  41. package/dist/editor/features/TreegeEditor/nodes/components/NodeRequiredButton.d.ts +6 -0
  42. package/dist/editor/features/TreegeEditor/nodes/components/NodeStackOrderButtons.d.ts +6 -0
  43. package/dist/editor/features/TreegeEditor/nodes/components/NodeTypeBadge.d.ts +7 -0
  44. package/dist/editor/features/TreegeEditor/nodes/components/NodeTypePickerMenuContent.d.ts +12 -0
  45. package/dist/editor/features/TreegeEditor/nodes/layout/NodeWrapper.d.ts +4 -2
  46. package/dist/editor/features/TreegeEditor/panel/AIGeneratorDialog.d.ts +16 -0
  47. package/dist/editor/features/TreegeEditor/panel/ActionsPanel.d.ts +7 -2
  48. package/dist/editor/features/TreegeEditor/panel/MultiSelectionPanel.d.ts +7 -0
  49. package/dist/editor/hooks/useAvailableParentFields.d.ts +13 -0
  50. package/dist/editor/hooks/useFlowActions.d.ts +6 -2
  51. package/dist/editor/hooks/useFlowConnections.d.ts +14 -0
  52. package/dist/editor/hooks/useHistoryStore.d.ts +26 -0
  53. package/dist/editor/hooks/useIsStackedEdge.d.ts +8 -0
  54. package/dist/editor/hooks/useKeyValueRows.d.ts +15 -0
  55. package/dist/editor/hooks/useNodesSelection.d.ts +5 -5
  56. package/dist/editor/hooks/useStackPosition.d.ts +14 -0
  57. package/dist/editor/hooks/useTranslate.d.ts +1 -1
  58. package/dist/editor/hooks/useUndoRedo.d.ts +31 -0
  59. package/dist/editor/types/ai.d.ts +65 -0
  60. package/dist/editor/types/editor.d.ts +97 -10
  61. package/dist/editor/types/openapi.d.ts +106 -0
  62. package/dist/editor/utils/aiFlowGenerator.d.ts +5 -0
  63. package/dist/editor/utils/cleanNodeConfig.d.ts +5 -0
  64. package/dist/editor/utils/dagreLayout.d.ts +8 -0
  65. package/dist/editor/utils/edge.d.ts +50 -0
  66. package/dist/editor/utils/groupColor.d.ts +14 -0
  67. package/dist/editor/utils/image.d.ts +7 -0
  68. package/dist/editor/utils/inputTypeIcon.d.ts +6 -0
  69. package/dist/editor/utils/jsonBindTarget.d.ts +15 -0
  70. package/dist/editor/utils/openApiPayload.d.ts +12 -0
  71. package/dist/editor/utils/openapi.d.ts +35 -0
  72. package/dist/editor/utils/sensitiveHeaders.d.ts +20 -0
  73. package/dist/editor/utils/stackPositionIndex.d.ts +9 -0
  74. package/dist/editor-Bh4AR91O.js +6407 -0
  75. package/dist/editor.js +3 -7
  76. package/dist/main.js +6 -52
  77. package/dist/renderer/context/TreegeRenderRuntimeProvider.d.ts +135 -0
  78. package/dist/renderer/context/TreegeRendererProvider.d.ts +15 -0
  79. package/dist/renderer/features/TreegeRenderer/native/TreegeRenderer.d.ts +19 -11
  80. package/dist/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.d.ts +7 -7
  81. package/dist/renderer/features/TreegeRenderer/native/components/DefaultInputWrapper.d.ts +9 -0
  82. package/dist/renderer/features/TreegeRenderer/native/components/DefaultInputs.d.ts +20 -15
  83. package/dist/renderer/features/TreegeRenderer/native/components/DefaultLoadingSkeleton.d.ts +8 -0
  84. package/dist/renderer/features/TreegeRenderer/native/components/DefaultStep.d.ts +3 -0
  85. package/dist/renderer/features/TreegeRenderer/native/components/DefaultSubmitButton.d.ts +9 -7
  86. package/dist/renderer/features/TreegeRenderer/native/components/DefaultSubmitButtonWrapper.d.ts +11 -0
  87. package/dist/renderer/features/TreegeRenderer/native/components/DefaultUI.d.ts +8 -7
  88. package/dist/renderer/features/TreegeRenderer/native/components/DependencyHint.d.ts +15 -0
  89. package/dist/renderer/features/TreegeRenderer/native/components/OptionItemContent.d.ts +17 -0
  90. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultAddressInput.d.ts +3 -0
  91. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultAutocompleteInput.d.ts +3 -0
  92. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultCheckboxInput.d.ts +3 -0
  93. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultDateInput.d.ts +3 -0
  94. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultDateRangeInput.d.ts +3 -0
  95. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultFileInput.d.ts +3 -0
  96. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultHiddenInput.d.ts +3 -0
  97. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultHttpInput.d.ts +3 -0
  98. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultNumberInput.d.ts +3 -0
  99. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultPasswordInput.d.ts +3 -0
  100. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultRadioInput.d.ts +3 -0
  101. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSelectInput.d.ts +3 -0
  102. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSubmitInput.d.ts +11 -0
  103. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSwitchInput.d.ts +3 -0
  104. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTextInput.d.ts +3 -0
  105. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTextareaInput.d.ts +3 -0
  106. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTimeInput.d.ts +3 -0
  107. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTimeRangeInput.d.ts +3 -0
  108. package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +97 -24
  109. package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
  110. package/dist/renderer/features/TreegeRenderer/web/components/DefaultFormWrapper.d.ts +3 -2
  111. package/dist/renderer/features/TreegeRenderer/web/components/DefaultInputWrapper.d.ts +9 -0
  112. package/dist/renderer/features/TreegeRenderer/web/components/DefaultLoadingSkeleton.d.ts +7 -0
  113. package/dist/renderer/features/TreegeRenderer/web/components/DefaultStep.d.ts +3 -0
  114. package/dist/renderer/features/TreegeRenderer/web/components/DefaultSubmitButton.d.ts +5 -1
  115. package/dist/renderer/features/TreegeRenderer/web/components/DependencyHint.d.ts +22 -0
  116. package/dist/renderer/features/TreegeRenderer/web/components/OptionItemContent.d.ts +17 -0
  117. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAddressInput.d.ts +1 -1
  118. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAutocompleteInput.d.ts +1 -1
  119. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultCheckboxInput.d.ts +1 -1
  120. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateInput.d.ts +1 -1
  121. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateRangeInput.d.ts +1 -1
  122. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultFileInput.d.ts +1 -1
  123. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultHiddenInput.d.ts +1 -1
  124. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultHttpInput.d.ts +1 -1
  125. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultNumberInput.d.ts +1 -1
  126. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultPasswordInput.d.ts +1 -1
  127. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultRadioInput.d.ts +1 -1
  128. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSelectInput.d.ts +1 -1
  129. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSubmitInput.d.ts +11 -0
  130. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSwitchInput.d.ts +1 -1
  131. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextAreaInput.d.ts +1 -1
  132. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextInput.d.ts +1 -1
  133. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeInput.d.ts +1 -1
  134. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeRangeInput.d.ts +1 -1
  135. package/dist/renderer/features/TreegeRenderer/web/components/styles/RendererStyles.d.ts +2 -0
  136. package/dist/renderer/hooks/useInputOptions.d.ts +28 -0
  137. package/dist/renderer/hooks/useRenderNode.d.ts +61 -0
  138. package/dist/renderer/hooks/useSubmitHandler.d.ts +36 -0
  139. package/dist/renderer/hooks/useTranslate.d.ts +7 -5
  140. package/dist/renderer/index.d.ts +4 -2
  141. package/dist/renderer/index.native.d.ts +19 -0
  142. package/dist/renderer/types/renderer.d.ts +279 -42
  143. package/dist/renderer/utils/flow.d.ts +1 -18
  144. package/dist/renderer/utils/form.d.ts +38 -2
  145. package/dist/renderer/utils/http.d.ts +161 -0
  146. package/dist/renderer/utils/jsonTemplate.d.ts +30 -0
  147. package/dist/renderer/utils/node.d.ts +29 -1
  148. package/dist/renderer/utils/sanitize.d.ts +85 -0
  149. package/dist/renderer/utils/sanitize.native.d.ts +69 -0
  150. package/dist/renderer/utils/step.d.ts +27 -0
  151. package/dist/renderer/utils/submit.d.ts +49 -0
  152. package/dist/renderer/utils/templateDependencies.d.ts +17 -0
  153. package/dist/renderer-DFzpylQb.js +255 -0
  154. package/dist/renderer-native.d.ts +2 -0
  155. package/dist/renderer-native.js +3746 -0
  156. package/dist/renderer.js +5 -45
  157. package/dist/shared/components/ui/badge.d.ts +2 -2
  158. package/dist/shared/components/ui/button.d.ts +3 -3
  159. package/dist/shared/components/ui/collapsible.d.ts +1 -1
  160. package/dist/shared/components/ui/command.d.ts +1 -1
  161. package/dist/shared/components/ui/dropdown-menu.d.ts +1 -1
  162. package/dist/shared/components/ui/field.d.ts +24 -0
  163. package/dist/shared/components/ui/form.d.ts +1 -1
  164. package/dist/shared/components/ui/item.d.ts +23 -0
  165. package/dist/shared/components/ui/popover.d.ts +10 -2
  166. package/dist/shared/components/ui/select.d.ts +3 -1
  167. package/dist/shared/components/ui/sheet.d.ts +1 -1
  168. package/dist/shared/components/ui/skeleton.d.ts +3 -0
  169. package/dist/shared/components/ui/toggle-group.d.ts +7 -0
  170. package/dist/shared/components/ui/toggle.d.ts +9 -0
  171. package/dist/shared/components/ui/tooltip.d.ts +1 -1
  172. package/dist/shared/constants/colors.d.ts +45 -0
  173. package/dist/shared/constants/inputType.d.ts +6 -0
  174. package/dist/shared/constants/node.d.ts +0 -1
  175. package/dist/shared/context/PortalContainerContext.d.ts +5 -0
  176. package/dist/shared/context/ThemeContext.d.ts +2 -0
  177. package/dist/shared/context/ThemeContext.native.d.ts +22 -0
  178. package/dist/shared/hooks/useMediaQuery.d.ts +12 -0
  179. package/dist/shared/hooks/useThemeColors.d.ts +37 -0
  180. package/dist/shared/locales/ar.json.d.ts +253 -19
  181. package/dist/shared/locales/de.json.d.ts +254 -20
  182. package/dist/shared/locales/en.json.d.ts +255 -21
  183. package/dist/shared/locales/es.json.d.ts +254 -20
  184. package/dist/shared/locales/fr.json.d.ts +254 -20
  185. package/dist/shared/locales/it.json.d.ts +254 -20
  186. package/dist/shared/locales/pt.json.d.ts +254 -20
  187. package/dist/shared/types/edge.d.ts +6 -0
  188. package/dist/shared/types/node.d.ts +146 -18
  189. package/dist/shared/utils/httpRecord.d.ts +20 -0
  190. package/dist/shared/utils/inputTypeGuards.d.ts +7 -0
  191. package/dist/shared/utils/nodeTypeGuards.d.ts +1 -6
  192. package/dist/useRenderNode-DJGmt663.js +514 -0
  193. package/package.json +54 -22
  194. package/dist/ThemeContext-BIvs8Kw-.js +0 -758
  195. package/dist/TreegeEditor-Lv5Tn9_F.js +0 -2152
  196. package/dist/TreegeRenderer-D3EvsEfJ.js +0 -1413
  197. package/dist/editor/context/TreegeEditorContext.d.ts +0 -12
  198. package/dist/editor/features/TreegeEditor/forms/FlowNodeForm.d.ts +0 -2
  199. package/dist/editor/features/TreegeEditor/inputs/SelectInputType.d.ts +0 -7
  200. package/dist/editor/features/TreegeEditor/nodes/FlowNode.d.ts +0 -6
  201. package/dist/editor/features/TreegeEditor/nodes/GroupNode.d.ts +0 -6
  202. package/dist/editor/features/TreegeEditor/nodes/InputNode.d.ts +0 -6
  203. package/dist/editor/features/TreegeEditor/nodes/UINode.d.ts +0 -6
  204. package/dist/editor/hooks/useEdgesSelection.d.ts +0 -11
  205. package/dist/renderer/context/TreegeConfigContext.d.ts +0 -39
  206. package/dist/renderer/context/TreegeRendererContext.d.ts +0 -25
  207. package/dist/renderer/features/TreegeRenderer/native/components/DefaultGroup.d.ts +0 -7
  208. package/dist/renderer/features/TreegeRenderer/web/components/DefaultGroup.d.ts +0 -6
  209. /package/dist/editor/components/{data-display/logo.d.ts → branding/Logo.d.ts} +0 -0
@@ -0,0 +1,1766 @@
1
+ import { D as e, E as t, S as n, T as r, _ as i, b as a, j as o, k as s, m as c, p as l, s as u, v as d, w as f, x as p, y as m } from "./ThemeContext-CdHMLHiw.js";
2
+ import * as h from "react";
3
+ import { createContext as g, forwardRef as _, useCallback as v, useContext as y, useEffect as b, useMemo as x, useRef as S, useState as C } from "react";
4
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
5
+ import { Check as ee, CheckIcon as te, ChevronDownIcon as D, ChevronLeftIcon as ne, ChevronRightIcon as O, ChevronUpIcon as re, ChevronsUpDown as ie, CircleIcon as k, Loader2 as A, MapPin as ae, SearchIcon as j, XIcon as M } from "lucide-react";
6
+ import { Slot as N } from "@radix-ui/react-slot";
7
+ import { cva as P } from "class-variance-authority";
8
+ import { clsx as F } from "clsx";
9
+ import { extendTailwindMerge as oe } from "tailwind-merge";
10
+ import * as I from "@radix-ui/react-checkbox";
11
+ import * as se from "@radix-ui/react-label";
12
+ import * as L from "@radix-ui/react-popover";
13
+ import * as R from "@radix-ui/react-select";
14
+ import * as z from "@radix-ui/react-tooltip";
15
+ import * as ce from "@radix-ui/react-separator";
16
+ import { Command as B } from "cmdk";
17
+ import * as V from "@radix-ui/react-dialog";
18
+ import { DayPicker as H, getDefaultClassNames as U } from "react-day-picker";
19
+ import * as W from "@radix-ui/react-radio-group";
20
+ import * as le from "@radix-ui/react-switch";
21
+ //#region src/shared/lib/utils.ts
22
+ var ue = oe({ prefix: "tg" });
23
+ function G(...e) {
24
+ return ue(F(e));
25
+ }
26
+ //#endregion
27
+ //#region src/shared/components/ui/button.tsx
28
+ var de = P("tg:inline-flex tg:items-center tg:justify-center tg:gap-2 tg:whitespace-nowrap tg:rounded-md tg:text-sm tg:font-medium tg:transition-all tg:disabled:pointer-events-none tg:disabled:opacity-50 tg:[&_svg]:pointer-events-none tg:[&_svg:not([class*='size-'])]:size-4 tg:shrink-0 tg:[&_svg]:shrink-0 tg:outline-none tg:focus-visible:border-ring tg:focus-visible:ring-ring/50 tg:focus-visible:ring-[3px] tg:aria-invalid:ring-destructive/20 tg:dark:aria-invalid:ring-destructive/40 tg:aria-invalid:border-destructive", {
29
+ defaultVariants: {
30
+ size: "default",
31
+ variant: "default"
32
+ },
33
+ variants: {
34
+ size: {
35
+ default: "tg:h-9 tg:px-4 tg:py-2 tg:has-[>svg]:px-3",
36
+ icon: "tg:size-9",
37
+ "icon-lg": "tg:size-10",
38
+ "icon-sm": "tg:size-8",
39
+ lg: "tg:h-10 tg:rounded-md tg:px-6 tg:has-[>svg]:px-4",
40
+ sm: "tg:h-8 tg:rounded-md tg:gap-1.5 tg:px-3 tg:has-[>svg]:px-2.5",
41
+ xs: "tg:h-6 tg:rounded-md tg:gap-1 tg:px-2 tg:text-xs tg:has-[>svg]:px-1.5"
42
+ },
43
+ variant: {
44
+ default: "tg:bg-primary tg:text-primary-foreground tg:hover:bg-primary/90",
45
+ destructive: "tg:bg-destructive tg:text-white tg:hover:bg-destructive/90 tg:focus-visible:ring-destructive/20 tg:dark:focus-visible:ring-destructive/40 tg:dark:bg-destructive/60",
46
+ ghost: "tg:hover:bg-accent tg:hover:text-accent-foreground tg:dark:hover:bg-accent/50",
47
+ icon: "tg:opacity-60 tg:hover:bg-transparent! tg:hover:opacity-100",
48
+ link: "tg:text-primary tg:underline-offset-4 tg:hover:underline",
49
+ outline: "tg:border tg:bg-background tg:shadow-xs tg:hover:bg-accent tg:hover:text-accent-foreground tg:dark:bg-input/30 tg:dark:border-input tg:dark:hover:bg-input/50",
50
+ secondary: "tg:bg-secondary tg:text-secondary-foreground tg:hover:bg-secondary/80"
51
+ }
52
+ }
53
+ });
54
+ function K({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
55
+ return /* @__PURE__ */ T(r ? N : "button", {
56
+ "data-slot": "button",
57
+ className: G(de({
58
+ className: e,
59
+ size: n,
60
+ variant: t
61
+ })),
62
+ ...i
63
+ });
64
+ }
65
+ //#endregion
66
+ //#region src/shared/components/ui/checkbox.tsx
67
+ function fe({ className: e, ...t }) {
68
+ return /* @__PURE__ */ T(I.Root, {
69
+ "data-slot": "checkbox",
70
+ className: G("tg:peer tg:size-4 tg:shrink-0 tg:rounded-[4px] tg:border tg:border-input tg:shadow-xs tg:outline-none tg:transition-shadow tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:data-[state=checked]:border-primary tg:data-[state=checked]:bg-primary tg:data-[state=checked]:text-primary-foreground tg:dark:bg-input/30 tg:dark:data-[state=checked]:bg-primary tg:dark:aria-invalid:ring-destructive/40", e),
71
+ ...t,
72
+ children: /* @__PURE__ */ T(I.Indicator, {
73
+ "data-slot": "checkbox-indicator",
74
+ className: "tg:grid tg:place-content-center tg:text-current tg:transition-none",
75
+ children: /* @__PURE__ */ T(te, { className: "tg:size-3.5" })
76
+ })
77
+ });
78
+ }
79
+ //#endregion
80
+ //#region src/shared/components/ui/form.tsx
81
+ function q({ className: e, ...t }) {
82
+ return /* @__PURE__ */ T("div", {
83
+ "data-slot": "form-item",
84
+ className: G("tg:grid tg:gap-2", e),
85
+ ...t
86
+ });
87
+ }
88
+ function J({ className: e, ...t }) {
89
+ return /* @__PURE__ */ T("p", {
90
+ "data-slot": "form-description",
91
+ className: G("tg:text-muted-foreground tg:text-xs", e),
92
+ ...t
93
+ });
94
+ }
95
+ function Y({ className: e, ...t }) {
96
+ return /* @__PURE__ */ T("p", {
97
+ "data-slot": "form-error",
98
+ className: G("tg:text-destructive tg:text-xs", e),
99
+ ...t
100
+ });
101
+ }
102
+ //#endregion
103
+ //#region src/shared/components/ui/input.tsx
104
+ function X({ className: e, type: t, ...n }) {
105
+ return /* @__PURE__ */ T("input", {
106
+ type: t,
107
+ "data-slot": "input",
108
+ className: G("tg:h-9 tg:w-full tg:min-w-0 tg:rounded-md tg:border tg:border-input tg:bg-transparent tg:px-3 tg:py-1 tg:text-base tg:shadow-xs tg:outline-none tg:transition-[color,box-shadow] tg:selection:bg-primary tg:selection:text-primary-foreground tg:file:inline-flex tg:file:h-7 tg:file:border-0 tg:file:bg-transparent tg:file:font-medium tg:file:text-foreground tg:file:text-sm tg:placeholder:text-muted-foreground tg:disabled:pointer-events-none tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:md:text-sm tg:dark:bg-input/30", "tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50", "tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:dark:aria-invalid:ring-destructive/40", e),
109
+ ...n
110
+ });
111
+ }
112
+ //#endregion
113
+ //#region src/shared/components/ui/label.tsx
114
+ var Z = ({ className: e, ...t }) => /* @__PURE__ */ T(se.Root, {
115
+ "data-slot": "label",
116
+ className: G("tg:flex tg:select-none tg:items-center tg:gap-2 tg:font-medium tg:text-muted-foreground tg:text-sm tg:leading-none tg:peer-disabled:cursor-not-allowed tg:peer-disabled:opacity-50 tg:group-data-[disabled=true]:pointer-events-none tg:group-data-[disabled=true]:opacity-50", e),
117
+ ...t
118
+ }), pe = g(null), Q = () => y(pe), me = ({ container: e, children: t }) => /* @__PURE__ */ T(pe.Provider, {
119
+ value: e,
120
+ children: t
121
+ });
122
+ //#endregion
123
+ //#region src/shared/components/ui/popover.tsx
124
+ function he({ ...e }) {
125
+ return /* @__PURE__ */ T(L.Root, {
126
+ "data-slot": "popover",
127
+ ...e
128
+ });
129
+ }
130
+ function ge({ ...e }) {
131
+ return /* @__PURE__ */ T(L.Trigger, {
132
+ "data-slot": "popover-trigger",
133
+ ...e
134
+ });
135
+ }
136
+ function _e({ className: e, align: t = "center", sideOffset: n = 4, disablePortal: r = !1, container: i, ...a }) {
137
+ let o = Q(), s = i ?? o, c = /* @__PURE__ */ T(L.Content, {
138
+ "data-slot": "popover-content",
139
+ align: t,
140
+ sideOffset: n,
141
+ className: G("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:data-[state=closed]:zoom-out-95 tg:data-[state=open]:zoom-in-95 tg:data-[side=bottom]:slide-in-from-top-2 tg:data-[side=left]:slide-in-from-right-2 tg:data-[side=right]:slide-in-from-left-2 tg:data-[side=top]:slide-in-from-bottom-2 tg:z-[2000] tg:w-72 tg:origin-(--radix-popover-content-transform-origin) tg:rounded-md tg:border tg:bg-popover tg:p-4 tg:text-popover-foreground tg:shadow-md tg:outline-hidden tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in", e),
142
+ ...a
143
+ });
144
+ return r ? c : /* @__PURE__ */ T(L.Portal, {
145
+ container: s ?? void 0,
146
+ children: c
147
+ });
148
+ }
149
+ //#endregion
150
+ //#region src/shared/components/ui/select.tsx
151
+ var ve = ({ ...e }) => /* @__PURE__ */ T(R.Root, {
152
+ "data-slot": "select",
153
+ ...e
154
+ }), ye = ({ ...e }) => /* @__PURE__ */ T(R.Group, {
155
+ "data-slot": "select-group",
156
+ ...e
157
+ }), be = ({ ...e }) => /* @__PURE__ */ T(R.Value, {
158
+ "data-slot": "select-value",
159
+ ...e
160
+ }), xe = ({ className: e, size: t = "default", children: n, ...r }) => /* @__PURE__ */ E(R.Trigger, {
161
+ "data-slot": "select-trigger",
162
+ "data-size": t,
163
+ className: G("tg:flex tg:w-fit tg:items-center tg:justify-between tg:gap-2 tg:whitespace-nowrap tg:rounded-md tg:border tg:border-input tg:bg-transparent tg:px-3 tg:py-2 tg:text-sm tg:shadow-xs tg:outline-none tg:transition-[color,box-shadow] tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:data-[size=default]:h-9 tg:data-[size=sm]:h-8 tg:data-[placeholder]:text-muted-foreground tg:*:data-[slot=select-value]:line-clamp-1 tg:*:data-[slot=select-value]:flex tg:*:data-[slot=select-value]:items-center tg:*:data-[slot=select-value]:gap-2 tg:dark:bg-input/30 tg:dark:aria-invalid:ring-destructive/40 tg:dark:hover:bg-input/50 tg:[&_svg:not([class*='size-'])]:size-4 tg:[&_svg:not([class*='text-'])]:text-muted-foreground tg:[&_svg]:pointer-events-none tg:[&_svg]:shrink-0", e),
164
+ ...r,
165
+ children: [n, /* @__PURE__ */ T(R.Icon, {
166
+ asChild: !0,
167
+ children: /* @__PURE__ */ T(D, { className: "tg:size-4 tg:opacity-50" })
168
+ })]
169
+ }), Se = ({ className: e, children: t, position: n = "popper", ...r }) => /* @__PURE__ */ T(R.Portal, {
170
+ container: Q() ?? void 0,
171
+ children: /* @__PURE__ */ E(R.Content, {
172
+ "data-slot": "select-content",
173
+ className: G("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:data-[state=closed]:zoom-out-95 tg:data-[state=open]:zoom-in-95 tg:data-[side=bottom]:slide-in-from-top-2 tg:data-[side=left]:slide-in-from-right-2 tg:data-[side=right]:slide-in-from-left-2 tg:data-[side=top]:slide-in-from-bottom-2 tg:relative tg:z-[2000] tg:max-h-(--radix-select-content-available-height) tg:min-w-[8rem] tg:origin-(--radix-select-content-transform-origin) tg:overflow-y-auto tg:overflow-x-hidden tg:rounded-md tg:border tg:bg-popover tg:text-popover-foreground tg:shadow-md tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in", n === "popper" && "tg:data-[side=left]:-translate-x-1 tg:data-[side=top]:-translate-y-1 tg:data-[side=right]:translate-x-1 tg:data-[side=bottom]:translate-y-1", e),
174
+ position: n,
175
+ ...r,
176
+ children: [
177
+ /* @__PURE__ */ T(Ee, {}),
178
+ /* @__PURE__ */ T(R.Viewport, {
179
+ className: G("tg:p-1", n === "popper" && "tg:h-[var(--radix-select-trigger-height)] tg:w-full tg:min-w-[var(--radix-select-trigger-width)] tg:scroll-my-1"),
180
+ children: t
181
+ }),
182
+ /* @__PURE__ */ T($, {})
183
+ ]
184
+ })
185
+ }), Ce = ({ className: e, htmlFor: t, children: n, ...r }) => /* @__PURE__ */ T(R.Label, {
186
+ "data-slot": "select-label",
187
+ className: G("tg:pb-1.5 tg:font-medium tg:text-muted-foreground tg:text-sm", e),
188
+ ...r,
189
+ children: /* @__PURE__ */ T("label", {
190
+ htmlFor: t,
191
+ children: n
192
+ })
193
+ }), we = ({ className: e, children: t, ...n }) => /* @__PURE__ */ E(R.Item, {
194
+ "data-slot": "select-item",
195
+ className: G("tg:relative tg:flex tg:w-full tg:cursor-pointer tg:select-none tg:items-center tg:gap-2 tg:rounded-sm tg:py-1.5 tg:pr-8 tg:pl-2 tg:text-sm tg:outline-hidden tg:focus:bg-accent tg:focus:text-accent-foreground tg:data-[disabled]:pointer-events-none tg:data-[disabled]:opacity-50 tg:[&_svg:not([class*='size-'])]:size-4 tg:[&_svg:not([class*='text-'])]:text-muted-foreground tg:[&_svg]:pointer-events-none tg:[&_svg]:shrink-0 tg:*:[span]:last:flex tg:*:[span]:last:items-center tg:*:[span]:last:gap-2", e),
196
+ ...n,
197
+ children: [/* @__PURE__ */ T("span", {
198
+ className: "tg:absolute tg:right-2 tg:flex tg:size-3.5 tg:items-center tg:justify-center",
199
+ children: /* @__PURE__ */ T(R.ItemIndicator, { children: /* @__PURE__ */ T(te, { className: "tg:size-4" }) })
200
+ }), /* @__PURE__ */ T(R.ItemText, { children: t })]
201
+ }), Te = ({ className: e, ...t }) => /* @__PURE__ */ T(R.Separator, {
202
+ "data-slot": "select-separator",
203
+ className: G("tg:-mx-1 tg:pointer-events-none tg:my-1 tg:h-px tg:bg-border", e),
204
+ ...t
205
+ }), Ee = ({ className: e, ...t }) => /* @__PURE__ */ T(R.ScrollUpButton, {
206
+ "data-slot": "select-scroll-up-button",
207
+ className: G("tg:flex tg:cursor-default tg:items-center tg:justify-center tg:py-1", e),
208
+ ...t,
209
+ children: /* @__PURE__ */ T(re, { className: "tg:size-4" })
210
+ }), $ = ({ className: e, ...t }) => /* @__PURE__ */ T(R.ScrollDownButton, {
211
+ "data-slot": "select-scroll-down-button",
212
+ className: G("tg:flex tg:cursor-default tg:items-center tg:justify-center tg:py-1", e),
213
+ ...t,
214
+ children: /* @__PURE__ */ T(D, { className: "tg:size-4" })
215
+ });
216
+ //#endregion
217
+ //#region src/shared/components/ui/tooltip.tsx
218
+ function De({ delayDuration: e = 0, ...t }) {
219
+ return /* @__PURE__ */ T(z.Provider, {
220
+ "data-slot": "tooltip-provider",
221
+ delayDuration: e,
222
+ ...t
223
+ });
224
+ }
225
+ function Oe({ ...e }) {
226
+ return /* @__PURE__ */ T(De, { children: /* @__PURE__ */ T(z.Root, {
227
+ "data-slot": "tooltip",
228
+ ...e
229
+ }) });
230
+ }
231
+ function ke({ ...e }) {
232
+ return /* @__PURE__ */ T(z.Trigger, {
233
+ "data-slot": "tooltip-trigger",
234
+ ...e
235
+ });
236
+ }
237
+ function Ae({ className: e, sideOffset: t = 0, children: n, ...r }) {
238
+ return /* @__PURE__ */ T(z.Portal, {
239
+ container: Q() ?? void 0,
240
+ children: /* @__PURE__ */ E(z.Content, {
241
+ "data-slot": "tooltip-content",
242
+ sideOffset: t,
243
+ className: G("tg:fade-in-0 tg:zoom-in-95 tg:data-[state=closed]:fade-out-0 tg:data-[state=closed]:zoom-out-95 tg:data-[side=bottom]:slide-in-from-top-2 tg:data-[side=left]:slide-in-from-right-2 tg:data-[side=right]:slide-in-from-left-2 tg:data-[side=top]:slide-in-from-bottom-2 tg:z-[2000] tg:w-fit tg:origin-(--radix-tooltip-content-transform-origin) tg:animate-in tg:text-balance tg:rounded-md tg:bg-foreground tg:px-3 tg:py-1.5 tg:text-background tg:text-xs tg:data-[state=closed]:animate-out", e),
244
+ ...r,
245
+ children: [n, /* @__PURE__ */ T(z.Arrow, { className: "tg:z-[2000] tg:size-2.5 tg:translate-y-[calc(-50%_-_2px)] tg:rotate-45 tg:rounded-[2px] tg:bg-foreground tg:fill-foreground" })]
246
+ })
247
+ });
248
+ }
249
+ //#endregion
250
+ //#region src/shared/components/ui/separator.tsx
251
+ function je({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
252
+ return /* @__PURE__ */ T(ce.Root, {
253
+ "data-slot": "separator",
254
+ decorative: n,
255
+ orientation: t,
256
+ className: G("tg:shrink-0 tg:bg-border tg:data-[orientation=horizontal]:h-px tg:data-[orientation=vertical]:h-full tg:data-[orientation=horizontal]:w-full tg:data-[orientation=vertical]:w-px", e),
257
+ ...r
258
+ });
259
+ }
260
+ //#endregion
261
+ //#region src/shared/components/ui/dialog.tsx
262
+ function Me({ ...e }) {
263
+ return /* @__PURE__ */ T(V.Root, {
264
+ "data-slot": "dialog",
265
+ ...e
266
+ });
267
+ }
268
+ function Ne({ ...e }) {
269
+ return /* @__PURE__ */ T(V.Trigger, {
270
+ "data-slot": "dialog-trigger",
271
+ ...e
272
+ });
273
+ }
274
+ function Pe({ ...e }) {
275
+ return /* @__PURE__ */ T(V.Portal, {
276
+ "data-slot": "dialog-portal",
277
+ ...e
278
+ });
279
+ }
280
+ function Fe({ className: e, ...t }) {
281
+ return /* @__PURE__ */ T(V.Overlay, {
282
+ "data-slot": "dialog-overlay",
283
+ className: G("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:fixed tg:inset-0 tg:z-[2000] tg:bg-black/50 tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in", e),
284
+ ...t
285
+ });
286
+ }
287
+ function Ie({ className: e, children: t, showCloseButton: n = !0, ...r }) {
288
+ let [i, a] = h.useState(null);
289
+ return /* @__PURE__ */ E(Pe, {
290
+ "data-slot": "dialog-portal",
291
+ children: [/* @__PURE__ */ T(Fe, {}), /* @__PURE__ */ T(V.Content, {
292
+ ref: a,
293
+ "data-slot": "dialog-content",
294
+ className: G("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:data-[state=closed]:zoom-out-95 tg:data-[state=open]:zoom-in-95 tg:fixed tg:top-[50%] tg:left-[50%] tg:z-[2000] tg:grid tg:w-full tg:max-w-[calc(100%-2rem)] tg:translate-x-[-50%] tg:translate-y-[-50%] tg:gap-4 tg:rounded-lg tg:border tg:bg-background tg:p-6 tg:shadow-lg tg:duration-200 tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in tg:sm:max-w-lg", e),
295
+ ...r,
296
+ children: /* @__PURE__ */ E(me, {
297
+ container: i,
298
+ children: [t, n && /* @__PURE__ */ E(V.Close, {
299
+ "data-slot": "dialog-close",
300
+ className: "tg:absolute tg:top-4 tg:right-4 tg:rounded-xs tg:opacity-70 tg:ring-offset-background tg:transition-opacity tg:hover:opacity-100 tg:focus:outline-hidden tg:focus:ring-2 tg:focus:ring-ring tg:focus:ring-offset-2 tg:disabled:pointer-events-none tg:data-[state=open]:bg-accent tg:data-[state=open]:text-muted-foreground tg:[&_svg:not([class*='size-'])]:size-4 tg:[&_svg]:pointer-events-none tg:[&_svg]:shrink-0",
301
+ children: [/* @__PURE__ */ T(M, {}), /* @__PURE__ */ T("span", {
302
+ className: "tg:sr-only",
303
+ children: "Close"
304
+ })]
305
+ })]
306
+ })
307
+ })]
308
+ });
309
+ }
310
+ function Le({ className: e, ...t }) {
311
+ return /* @__PURE__ */ T("div", {
312
+ "data-slot": "dialog-header",
313
+ className: G("tg:flex tg:flex-col tg:gap-2 tg:text-center tg:sm:text-left", e),
314
+ ...t
315
+ });
316
+ }
317
+ function Re({ className: e, ...t }) {
318
+ return /* @__PURE__ */ T("div", {
319
+ "data-slot": "dialog-footer",
320
+ className: G("tg:flex tg:flex-col-reverse tg:gap-2 tg:sm:flex-row tg:sm:justify-end", e),
321
+ ...t
322
+ });
323
+ }
324
+ function ze({ className: e, ...t }) {
325
+ return /* @__PURE__ */ T(V.Title, {
326
+ "data-slot": "dialog-title",
327
+ className: G("tg:font-semibold tg:text-lg tg:leading-none", e),
328
+ ...t
329
+ });
330
+ }
331
+ function Be({ className: e, ...t }) {
332
+ return /* @__PURE__ */ T(V.Description, {
333
+ "data-slot": "dialog-description",
334
+ className: G("tg:text-muted-foreground tg:text-sm", e),
335
+ ...t
336
+ });
337
+ }
338
+ //#endregion
339
+ //#region src/shared/components/ui/command.tsx
340
+ function Ve({ className: e, ...t }) {
341
+ return /* @__PURE__ */ T(B, {
342
+ "data-slot": "command",
343
+ className: G("tg:flex tg:h-full tg:w-full tg:flex-col tg:overflow-hidden tg:rounded-md tg:bg-popover tg:text-popover-foreground", e),
344
+ ...t
345
+ });
346
+ }
347
+ function He({ className: e, ...t }) {
348
+ return /* @__PURE__ */ E("div", {
349
+ "data-slot": "command-input-wrapper",
350
+ className: "tg:flex tg:h-9 tg:items-center tg:gap-2 tg:border-b tg:px-3",
351
+ children: [/* @__PURE__ */ T(j, { className: "tg:size-4 tg:shrink-0 tg:opacity-50" }), /* @__PURE__ */ T(B.Input, {
352
+ "data-slot": "command-input",
353
+ className: G("tg:flex tg:h-10 tg:w-full tg:rounded-md tg:bg-transparent tg:py-3 tg:text-sm tg:outline-hidden tg:placeholder:text-muted-foreground tg:disabled:cursor-not-allowed tg:disabled:opacity-50", e),
354
+ ...t
355
+ })]
356
+ });
357
+ }
358
+ function Ue({ className: e, ...t }) {
359
+ return /* @__PURE__ */ T(B.List, {
360
+ "data-slot": "command-list",
361
+ className: G("tg:max-h-[300px] tg:scroll-py-1 tg:overflow-y-auto tg:overflow-x-hidden", e),
362
+ ...t
363
+ });
364
+ }
365
+ function We({ ...e }) {
366
+ return /* @__PURE__ */ T(B.Empty, {
367
+ "data-slot": "command-empty",
368
+ className: "tg:py-6 tg:text-center tg:text-sm",
369
+ ...e
370
+ });
371
+ }
372
+ function Ge({ className: e, ...t }) {
373
+ return /* @__PURE__ */ T(B.Group, {
374
+ "data-slot": "command-group",
375
+ className: G("tg:overflow-hidden tg:p-1 tg:text-foreground tg:[&_[cmdk-group-heading]]:px-2 tg:[&_[cmdk-group-heading]]:py-1.5 tg:[&_[cmdk-group-heading]]:font-medium tg:[&_[cmdk-group-heading]]:text-muted-foreground tg:[&_[cmdk-group-heading]]:text-xs", e),
376
+ ...t
377
+ });
378
+ }
379
+ function Ke({ className: e, ...t }) {
380
+ return /* @__PURE__ */ T(B.Item, {
381
+ "data-slot": "command-item",
382
+ className: G("tg:relative tg:flex tg:cursor-default tg:select-none tg:items-center tg:gap-2 tg:rounded-sm tg:px-2 tg:py-1.5 tg:text-sm tg:outline-hidden tg:data-[disabled=true]:pointer-events-none tg:data-[selected=true]:bg-accent tg:data-[selected=true]:text-accent-foreground tg:data-[disabled=true]:opacity-50 tg:[&_svg:not([class*='size-'])]:size-4 tg:[&_svg:not([class*='text-'])]:text-muted-foreground tg:[&_svg]:pointer-events-none tg:[&_svg]:shrink-0", e),
383
+ ...t
384
+ });
385
+ }
386
+ //#endregion
387
+ //#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultAddressInput.tsx
388
+ var qe = async (e, t) => {
389
+ if (!e || e.trim().length < 3) return [];
390
+ try {
391
+ let n = await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&format=jsonv2&addressdetails=1&limit=5`, { headers: {
392
+ Accept: "application/json",
393
+ "User-Agent": "Treege Renderer",
394
+ ...t && { "Accept-Language": t }
395
+ } });
396
+ return n.ok ? (await n.json()).map((e) => ({
397
+ label: e.display_name,
398
+ value: e.display_name
399
+ })) : [];
400
+ } catch (e) {
401
+ return console.error("Nominatim fetch error:", e), [];
402
+ }
403
+ }, Je = (e) => !e || e.trim().length < 3 ? Promise.resolve([]) : new Promise((t) => {
404
+ if (!window.google?.maps?.places) {
405
+ console.warn("Google Places SDK not loaded yet"), t([]);
406
+ return;
407
+ }
408
+ new window.google.maps.places.AutocompleteService().getPlacePredictions({ input: e }, (e, n) => {
409
+ if (n !== google.maps.places.PlacesServiceStatus.OK || !e) {
410
+ console.warn("Google Places API status:", n), t([]);
411
+ return;
412
+ }
413
+ t(e.map((e) => ({
414
+ label: e.description,
415
+ value: e.description
416
+ })));
417
+ });
418
+ }), Ye = ({ field: t, extra: n }) => {
419
+ let [r, i] = C(""), [a, s] = C([]), [c, l] = C(!1), { id: u, name: d, value: f, placeholder: p } = t, { node: m, setValue: h, error: g, label: _, helperText: y } = n, { googleApiKey: x, language: S } = o(), ee = e(), te = v((e) => {
420
+ h(e.value), i(e.value), l(!1);
421
+ }, [h]), D = v((e) => {
422
+ h(e), i(e), e.length >= 3 && l(!0);
423
+ }, [h]);
424
+ return b(() => {
425
+ if (!r || r.trim().length < 3) {
426
+ s([]);
427
+ return;
428
+ }
429
+ let e = setTimeout(async () => {
430
+ s(x ? await Je(r) : await qe(r, S));
431
+ }, 300);
432
+ return () => clearTimeout(e);
433
+ }, [
434
+ r,
435
+ x,
436
+ S
437
+ ]), /* @__PURE__ */ E(w, { children: [x && /* @__PURE__ */ T("script", {
438
+ async: !0,
439
+ src: `https://maps.googleapis.com/maps/api/js?key=${x}&libraries=places`
440
+ }), /* @__PURE__ */ E(q, {
441
+ className: "tg:mb-4",
442
+ children: [
443
+ /* @__PURE__ */ E(Z, {
444
+ htmlFor: u,
445
+ children: [_ || m.data.name, m.data.required && /* @__PURE__ */ T("span", {
446
+ className: "tg:text-red-500",
447
+ children: "*"
448
+ })]
449
+ }),
450
+ /* @__PURE__ */ E("div", {
451
+ className: "tg:relative",
452
+ children: [
453
+ /* @__PURE__ */ T(X, {
454
+ type: "text",
455
+ id: u,
456
+ name: d,
457
+ value: f || "",
458
+ onChange: (e) => D(e.target.value),
459
+ onFocus: () => {
460
+ a.length > 0 && l(!0);
461
+ },
462
+ placeholder: p || ee("renderer.defaultAddressInput.enterAddress"),
463
+ className: "tg:pr-10",
464
+ autoComplete: "off"
465
+ }),
466
+ /* @__PURE__ */ T(ae, { className: "tg:pointer-events-none tg:absolute tg:top-1/2 tg:right-3 tg:h-4 tg:w-4 tg:-translate-y-1/2 tg:text-muted-foreground" }),
467
+ c && /* @__PURE__ */ T("div", {
468
+ className: "tg:absolute tg:z-50 tg:mt-1 tg:w-full tg:rounded-md tg:border tg:bg-popover tg:shadow-md",
469
+ children: /* @__PURE__ */ T(Ve, { children: /* @__PURE__ */ E(Ue, { children: [/* @__PURE__ */ T(We, { children: ee("renderer.defaultAddressInput.noAddressesFound") }), /* @__PURE__ */ T(Ge, { children: a.map((e, t) => /* @__PURE__ */ E(Ke, {
470
+ value: e.value,
471
+ onSelect: () => te(e),
472
+ onMouseDown: (e) => e.preventDefault(),
473
+ children: [/* @__PURE__ */ T(ae, { className: "tg:mr-2 tg:h-4 tg:w-4" }), e.label]
474
+ }, t)) })] }) })
475
+ })
476
+ ]
477
+ }),
478
+ g && /* @__PURE__ */ T(Y, { children: g }),
479
+ y && !g && /* @__PURE__ */ T(J, { children: y })
480
+ ]
481
+ })] });
482
+ }, Xe = ({ missing: t }) => /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("p", {
483
+ className: "tg:font-medium",
484
+ children: e()("renderer.dependencyHint.title")
485
+ }), /* @__PURE__ */ T("ul", {
486
+ className: "tg:mt-1 tg:list-disc tg:pl-4",
487
+ children: t.map((e) => /* @__PURE__ */ T("li", { children: e.label }, e.id))
488
+ })] }), Ze = ({ missing: e, children: t }) => e.length === 0 ? /* @__PURE__ */ T(w, { children: t }) : /* @__PURE__ */ T(De, { children: /* @__PURE__ */ E(Oe, { children: [/* @__PURE__ */ T(ke, {
489
+ asChild: !0,
490
+ children: /* @__PURE__ */ T("div", {
491
+ className: "tg:w-full",
492
+ children: t
493
+ })
494
+ }), /* @__PURE__ */ T(Ae, { children: /* @__PURE__ */ T(Xe, { missing: e }) })] }) }), Qe = ({ missing: e }) => e.length === 0 ? null : /* @__PURE__ */ T("div", {
495
+ className: "tg:text-muted-foreground tg:text-sm",
496
+ children: /* @__PURE__ */ T(Xe, { missing: e })
497
+ });
498
+ P("tg:group/item tg:flex tg:flex-wrap tg:items-center tg:rounded-md tg:border tg:border-transparent tg:text-sm tg:outline-none tg:transition-colors tg:duration-100 tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:[a]:transition-colors tg:[a]:hover:bg-accent/50", {
499
+ defaultVariants: {
500
+ size: "default",
501
+ variant: "default"
502
+ },
503
+ variants: {
504
+ size: {
505
+ default: "tg:gap-4 tg:p-4",
506
+ sm: "tg:gap-2.5 tg:px-4 tg:py-3"
507
+ },
508
+ variant: {
509
+ default: "tg:bg-transparent",
510
+ muted: "tg:bg-muted/50",
511
+ outline: "tg:border-border"
512
+ }
513
+ }
514
+ });
515
+ var $e = P("tg:flex tg:shrink-0 tg:items-center tg:justify-center tg:gap-2 tg:group-has-[[data-slot=item-description]]/item:translate-y-0.5 tg:group-has-[[data-slot=item-description]]/item:self-start tg:[&_svg]:pointer-events-none", {
516
+ defaultVariants: { variant: "default" },
517
+ variants: { variant: {
518
+ default: "tg:bg-transparent",
519
+ icon: "tg:size-8 tg:rounded-sm tg:border tg:bg-muted tg:[&_svg:not([class*='size-'])]:size-4",
520
+ image: "tg:size-10 tg:overflow-hidden tg:rounded-sm tg:[&_img]:size-full tg:[&_img]:object-cover"
521
+ } }
522
+ });
523
+ function et({ className: e, variant: t = "default", ...n }) {
524
+ return /* @__PURE__ */ T("div", {
525
+ "data-slot": "item-media",
526
+ "data-variant": t,
527
+ className: G($e({
528
+ className: e,
529
+ variant: t
530
+ })),
531
+ ...n
532
+ });
533
+ }
534
+ function tt({ className: e, ...t }) {
535
+ return /* @__PURE__ */ T("div", {
536
+ "data-slot": "item-content",
537
+ className: G("tg:flex tg:flex-1 tg:flex-col tg:gap-1 tg:[&+[data-slot=item-content]]:flex-none", e),
538
+ ...t
539
+ });
540
+ }
541
+ function nt({ className: e, ...t }) {
542
+ return /* @__PURE__ */ T("div", {
543
+ "data-slot": "item-title",
544
+ className: G("tg:flex tg:w-fit tg:items-center tg:gap-2 tg:font-medium tg:text-sm tg:leading-snug", e),
545
+ ...t
546
+ });
547
+ }
548
+ function rt({ className: e, ...t }) {
549
+ return /* @__PURE__ */ T("p", {
550
+ "data-slot": "item-description",
551
+ className: G("tg:line-clamp-2 tg:text-balance tg:font-normal tg:text-muted-foreground tg:text-sm tg:leading-normal", "tg:[&>a]:underline tg:[&>a]:underline-offset-4 tg:[&>a:hover]:text-primary", e),
552
+ ...t
553
+ });
554
+ }
555
+ //#endregion
556
+ //#region src/renderer/features/TreegeRenderer/web/components/OptionItemContent.tsx
557
+ var it = ({ label: e, description: t, image: n }) => /* @__PURE__ */ E(w, { children: [n && /* @__PURE__ */ T(et, {
558
+ variant: "image",
559
+ children: /* @__PURE__ */ T("img", {
560
+ src: n,
561
+ alt: ""
562
+ })
563
+ }), /* @__PURE__ */ E(tt, {
564
+ className: "tg:min-w-0 tg:gap-0",
565
+ children: [/* @__PURE__ */ T(nt, {
566
+ className: "tg:block tg:w-full tg:truncate tg:font-normal",
567
+ children: e
568
+ }), t && /* @__PURE__ */ T(rt, {
569
+ className: "tg:line-clamp-1",
570
+ children: t
571
+ })]
572
+ })] }), at = /\{\{([\w-]+)}}/g, ot = (e) => {
573
+ let [a, s] = C({
574
+ error: null,
575
+ fetched: null,
576
+ isLoading: !1
577
+ }), { baseUrl: c, formValues: l, headers: u } = o(), d = e.data.optionsSource, h = e.data.options, g = x(() => {
578
+ if (!(d?.url && d.mapping?.valueField && d.mapping?.labelField) || !Array.from(d.url.matchAll(at), (e) => e[1]).every((e) => {
579
+ let t = l[e];
580
+ return t != null && t !== "";
581
+ })) return null;
582
+ let e = d.method ?? "GET", a = {
583
+ body: [
584
+ "POST",
585
+ "PUT",
586
+ "PATCH"
587
+ ].includes(e) ? i(d.body, l, []) : void 0,
588
+ headers: n(r(u, l), r(d.headers, l)),
589
+ mapping: d.mapping,
590
+ method: e,
591
+ queryParams: r(d.queryParams, l) ?? {},
592
+ responsePath: d.responsePath,
593
+ url: t(f(d.url, l, { encode: !0 }), c)
594
+ };
595
+ return JSON.stringify(a);
596
+ }, [
597
+ c,
598
+ d,
599
+ l,
600
+ u
601
+ ]);
602
+ b(() => {
603
+ if (!g) {
604
+ s({
605
+ error: null,
606
+ fetched: null,
607
+ isLoading: !1
608
+ });
609
+ return;
610
+ }
611
+ let e = JSON.parse(g), t = new AbortController();
612
+ return s((e) => ({
613
+ ...e,
614
+ error: null,
615
+ isLoading: !0
616
+ })), (async () => {
617
+ let n = await p({
618
+ body: e.body,
619
+ headers: e.headers,
620
+ method: e.method,
621
+ queryParams: e.queryParams,
622
+ signal: t.signal,
623
+ url: e.url
624
+ });
625
+ if (!t.signal.aborted) {
626
+ if (!n.success) {
627
+ s({
628
+ error: n.error ?? "Fetch failed",
629
+ fetched: null,
630
+ isLoading: !1
631
+ });
632
+ return;
633
+ }
634
+ s({
635
+ error: null,
636
+ fetched: m(n.data, e.responsePath, e.mapping),
637
+ isLoading: !1
638
+ });
639
+ }
640
+ })(), () => t.abort();
641
+ }, [g]);
642
+ let _ = a.fetched ?? h ?? [];
643
+ return {
644
+ error: a.error,
645
+ isLoading: a.isLoading,
646
+ options: _
647
+ };
648
+ }, st = ({ field: t, extra: n }) => {
649
+ let [r, i] = C(!1), { id: a, value: o, placeholder: s } = t, { node: c, setValue: l, error: u, label: d, helperText: f, missingDependencies: p } = n, { options: m, isLoading: h, error: g } = ot(c), _ = e(), v = `${a}-trigger`, y = `${a}-error`, b = m.find((e) => e.value === o);
650
+ return /* @__PURE__ */ E(q, {
651
+ className: "tg:mb-4",
652
+ children: [
653
+ /* @__PURE__ */ E(Z, {
654
+ htmlFor: v,
655
+ children: [d || c.data.name, c.data.required && /* @__PURE__ */ T("span", {
656
+ className: "tg:text-red-500",
657
+ children: "*"
658
+ })]
659
+ }),
660
+ /* @__PURE__ */ T(Ze, {
661
+ missing: p,
662
+ children: /* @__PURE__ */ E(he, {
663
+ open: r,
664
+ onOpenChange: i,
665
+ children: [/* @__PURE__ */ T(ge, {
666
+ asChild: !0,
667
+ children: /* @__PURE__ */ E(K, {
668
+ id: v,
669
+ variant: "outline",
670
+ role: "combobox",
671
+ "aria-expanded": r,
672
+ "aria-invalid": !!u || void 0,
673
+ "aria-describedby": u ? y : void 0,
674
+ disabled: h || p.length > 0,
675
+ className: "tg:w-full tg:justify-between tg:font-normal",
676
+ children: [/* @__PURE__ */ E("span", {
677
+ className: "tg:flex tg:items-center tg:gap-2 tg:truncate",
678
+ children: [h && /* @__PURE__ */ T(A, { className: "tg:h-4 tg:w-4 tg:shrink-0 tg:animate-spin" }), o ? b?.label ? _(b.label) : o : s || _("renderer.defaultAutocompleteInput.selectOption")]
679
+ }), /* @__PURE__ */ T(ie, { className: "tg:ml-2 tg:size-4 tg:shrink-0 tg:opacity-50" })]
680
+ })
681
+ }), /* @__PURE__ */ T(_e, {
682
+ className: "tg:w-(--radix-popover-trigger-width) tg:p-0",
683
+ align: "start",
684
+ children: /* @__PURE__ */ E(Ve, { children: [/* @__PURE__ */ T(He, { placeholder: s || _("renderer.defaultAutocompleteInput.search") }), /* @__PURE__ */ E(Ue, { children: [/* @__PURE__ */ T(We, { children: _("renderer.defaultAutocompleteInput.noResults") }), /* @__PURE__ */ T(Ge, { children: m.map((e) => /* @__PURE__ */ E(Ke, {
685
+ value: e.value,
686
+ disabled: e.disabled,
687
+ onSelect: (e) => {
688
+ l(e === o ? "" : e), i(!1);
689
+ },
690
+ children: [/* @__PURE__ */ T(ee, { className: G("tg:mr-2 tg:size-4", o === e.value ? "tg:opacity-100" : "tg:opacity-0") }), /* @__PURE__ */ T(it, {
691
+ label: _(e.label) || e.value,
692
+ description: _(e.description),
693
+ image: e.image
694
+ })]
695
+ }, e.value)) })] })] })
696
+ })]
697
+ })
698
+ }),
699
+ u && /* @__PURE__ */ T(Y, {
700
+ id: y,
701
+ children: u
702
+ }),
703
+ g && !u && /* @__PURE__ */ T(Y, { children: g }),
704
+ f && !u && !g && /* @__PURE__ */ T(J, { children: f })
705
+ ]
706
+ });
707
+ }, ct = ({ field: t, extra: n }) => {
708
+ let { id: r, name: i, value: a } = t, { node: s, setValue: c, error: l, label: u, helperText: d, renderOptionExtras: f, compactOptions: p, missingDependencies: m } = n, { options: h, isLoading: g, error: _ } = ot(s), { optionsDisplayLimit: v } = o(), y = e();
709
+ if (h.length > 0 || s.data.optionsSource) {
710
+ let e = `${r}-label`, t = Array.isArray(a) ? a.map(String) : [], n = v ? h.slice(0, v) : h, o = h.length - n.length, b = (e, n) => {
711
+ c(n ? [...t, e] : t.filter((t) => t !== e));
712
+ };
713
+ return /* @__PURE__ */ E(q, {
714
+ className: "tg:mb-4",
715
+ children: [
716
+ /* @__PURE__ */ E(Z, {
717
+ className: "tg:mb-1",
718
+ id: e,
719
+ children: [u || s.data.name, s.data.required && /* @__PURE__ */ T("span", {
720
+ className: "tg:text-red-500",
721
+ children: "*"
722
+ })]
723
+ }),
724
+ /* @__PURE__ */ T(Qe, { missing: m }),
725
+ g && /* @__PURE__ */ E("div", {
726
+ className: "tg:flex tg:items-center tg:gap-2 tg:py-2 tg:text-muted-foreground tg:text-sm",
727
+ children: [/* @__PURE__ */ T(A, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ T("span", { children: y("renderer.defaultCheckboxInput.loadingOptions") })]
728
+ }),
729
+ /* @__PURE__ */ E("div", {
730
+ role: "group",
731
+ "aria-labelledby": e,
732
+ className: "tg:min-w-0 tg:space-y-2",
733
+ children: [n.map((e, n) => {
734
+ let a = y(e.description);
735
+ return /* @__PURE__ */ E("div", {
736
+ className: G("tg:group/option tg:pointer-events-auto tg:relative tg:flex tg:items-start tg:gap-3", p && "tg:pr-22"),
737
+ children: [
738
+ /* @__PURE__ */ T(fe, {
739
+ id: `${r}-${e.value}`,
740
+ name: i,
741
+ checked: t.includes(String(e.value)),
742
+ onCheckedChange: (t) => b(String(e.value), !!t),
743
+ disabled: e.disabled,
744
+ className: "tg:mt-0.5"
745
+ }),
746
+ e.image && /* @__PURE__ */ T("img", {
747
+ src: e.image,
748
+ alt: "",
749
+ className: "tg:h-8 tg:w-8 tg:shrink-0 tg:rounded tg:object-cover"
750
+ }),
751
+ /* @__PURE__ */ E("div", {
752
+ className: G("tg:flex tg:flex-col", p && "tg:min-w-0 tg:flex-1 tg:overflow-hidden"),
753
+ children: [/* @__PURE__ */ T(Z, {
754
+ htmlFor: `${r}-${e.value}`,
755
+ className: G("tg:cursor-pointer tg:font-normal tg:text-sm", p && "tg:block tg:max-w-full tg:truncate"),
756
+ children: y(e.label) ? y(e.label) : e.value
757
+ }), a && /* @__PURE__ */ T("span", {
758
+ className: G("tg:text-muted-foreground tg:text-xs", p && "tg:block tg:max-w-full tg:truncate"),
759
+ children: a
760
+ })]
761
+ }),
762
+ f?.({
763
+ index: n,
764
+ option: e
765
+ })
766
+ ]
767
+ }, e.value + n);
768
+ }), o > 0 && /* @__PURE__ */ T("div", {
769
+ className: "tg:px-2 tg:text-muted-foreground tg:text-xs",
770
+ children: "…"
771
+ })]
772
+ }),
773
+ l && /* @__PURE__ */ T(Y, { children: l }),
774
+ _ && !l && /* @__PURE__ */ T(Y, { children: _ }),
775
+ d && !l && !_ && /* @__PURE__ */ T(J, { children: d })
776
+ ]
777
+ });
778
+ }
779
+ return /* @__PURE__ */ E(q, {
780
+ className: "tg:mb-4",
781
+ children: [/* @__PURE__ */ E("div", {
782
+ className: "tg:flex tg:items-center tg:gap-3",
783
+ children: [/* @__PURE__ */ T(fe, {
784
+ id: r,
785
+ name: i,
786
+ checked: typeof a == "boolean" ? a : !1,
787
+ onCheckedChange: (e) => c(!!e)
788
+ }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E(Z, {
789
+ htmlFor: r,
790
+ className: "tg:cursor-pointer tg:font-medium tg:text-sm",
791
+ children: [u || s.data.name, s.data.required && /* @__PURE__ */ T("span", {
792
+ className: "tg:text-red-500",
793
+ children: "*"
794
+ })]
795
+ }), d && !l && /* @__PURE__ */ T(J, { children: d })] })]
796
+ }), l && /* @__PURE__ */ T(Y, { children: l })]
797
+ });
798
+ };
799
+ //#endregion
800
+ //#region src/shared/components/ui/calendar.tsx
801
+ function lt({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: i = "ghost", formatters: a, components: o, ...s }) {
802
+ let c = U();
803
+ return /* @__PURE__ */ T(H, {
804
+ showOutsideDays: n,
805
+ className: G("tg:group/calendar tg:bg-background tg:p-3 tg:[--cell-size:--spacing(8)] tg:[[data-slot=card-content]_&]:bg-transparent tg:[[data-slot=popover-content]_&]:bg-transparent", String.raw`tg:rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`tg:rtl:**:[.rdp-button\_previous>svg]:rotate-180`, e),
806
+ captionLayout: r,
807
+ formatters: {
808
+ formatMonthDropdown: (e) => e.toLocaleString("default", { month: "short" }),
809
+ ...a
810
+ },
811
+ classNames: {
812
+ button_next: G(de({ variant: i }), "tg:size-(--cell-size) tg:aria-disabled:opacity-50 tg:p-0 tg:select-none", c.button_next),
813
+ button_previous: G(de({ variant: i }), "tg:size-(--cell-size) tg:aria-disabled:opacity-50 tg:p-0 tg:select-none", c.button_previous),
814
+ caption_label: G("tg:select-none tg:font-medium", r === "label" ? "tg:text-sm" : "tg:rounded-md tg:pl-2 tg:pr-1 tg:flex tg:items-center tg:gap-1 tg:text-sm tg:h-8 tg:[&>svg]:text-muted-foreground tg:[&>svg]:size-3.5", c.caption_label),
815
+ day: G("tg:relative tg:w-full tg:h-full tg:p-0 tg:text-center tg:[&:first-child[data-selected=true]_button]:rounded-l-md tg:[&:last-child[data-selected=true]_button]:rounded-r-md tg:group/day tg:aspect-square tg:select-none", c.day),
816
+ disabled: G("tg:text-muted-foreground tg:opacity-50", c.disabled),
817
+ dropdown: G("tg:absolute tg:bg-popover tg:inset-0 tg:opacity-0", c.dropdown),
818
+ dropdown_root: G("tg:relative tg:has-focus:border-ring tg:border tg:border-input tg:shadow-xs tg:has-focus:ring-ring/50 tg:has-focus:ring-[3px] tg:rounded-md", c.dropdown_root),
819
+ dropdowns: G("tg:w-full tg:flex tg:items-center tg:text-sm tg:font-medium tg:justify-center tg:h-(--cell-size) tg:gap-1.5", c.dropdowns),
820
+ hidden: G("tg:invisible", c.hidden),
821
+ month: G("tg:flex tg:flex-col tg:w-full tg:gap-4", c.month),
822
+ month_caption: G("tg:flex tg:items-center tg:justify-center tg:h-(--cell-size) tg:w-full tg:px-(--cell-size)", c.month_caption),
823
+ months: G("tg:flex tg:gap-4 tg:flex-col tg:md:flex-row tg:relative", c.months),
824
+ nav: G("tg:flex tg:items-center tg:gap-1 tg:w-full tg:absolute tg:top-0 tg:inset-x-0 tg:justify-between", c.nav),
825
+ outside: G("tg:text-muted-foreground tg:aria-selected:text-muted-foreground", c.outside),
826
+ range_end: G("tg:rounded-r-md tg:bg-accent", c.range_end),
827
+ range_middle: G("tg:rounded-none", c.range_middle),
828
+ range_start: G("tg:rounded-l-md tg:bg-accent", c.range_start),
829
+ root: G("tg:w-fit", c.root),
830
+ table: "tg:w-full tg:border-collapse",
831
+ today: G("tg:bg-accent tg:text-accent-foreground tg:rounded-md tg:data-[selected=true]:rounded-none", c.today),
832
+ week: G("tg:flex tg:w-full tg:mt-2", c.week),
833
+ week_number: G("tg:text-[0.8rem] tg:select-none tg:text-muted-foreground", c.week_number),
834
+ week_number_header: G("tg:select-none tg:w-(--cell-size)", c.week_number_header),
835
+ weekday: G("tg:text-muted-foreground tg:rounded-md tg:flex-1 tg:font-normal tg:text-[0.8rem] tg:select-none", c.weekday),
836
+ weekdays: G("tg:flex", c.weekdays),
837
+ ...t
838
+ },
839
+ components: {
840
+ Chevron: ({ className: e, orientation: t, ...n }) => T(t === "left" ? ne : t === "right" ? O : D, {
841
+ className: G("tg:size-4", e),
842
+ ...n
843
+ }),
844
+ DayButton: ut,
845
+ Root: ({ className: e, rootRef: t, ...n }) => /* @__PURE__ */ T("div", {
846
+ "data-slot": "calendar",
847
+ ref: t,
848
+ className: G(e),
849
+ ...n
850
+ }),
851
+ WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ T("td", {
852
+ ...t,
853
+ children: /* @__PURE__ */ T("div", {
854
+ className: "tg:flex tg:size-(--cell-size) tg:items-center tg:justify-center tg:text-center",
855
+ children: e
856
+ })
857
+ }),
858
+ ...o
859
+ },
860
+ ...s
861
+ });
862
+ }
863
+ function ut({ className: e, day: t, modifiers: n, ...r }) {
864
+ let i = U(), a = h.useRef(null);
865
+ return h.useEffect(() => {
866
+ n.focused && a.current?.focus();
867
+ }, [n.focused]), /* @__PURE__ */ T(K, {
868
+ ref: a,
869
+ variant: "ghost",
870
+ size: "icon",
871
+ "data-day": t.date.toLocaleDateString(),
872
+ "data-selected-single": n.selected && !n.range_start && !n.range_end && !n.range_middle,
873
+ "data-range-start": n.range_start,
874
+ "data-range-end": n.range_end,
875
+ "data-range-middle": n.range_middle,
876
+ className: G("tg:flex tg:aspect-square tg:size-auto tg:w-full tg:min-w-(--cell-size) tg:flex-col tg:gap-1 tg:font-normal tg:leading-none tg:data-[range-end=true]:rounded-md tg:data-[range-middle=true]:rounded-none tg:data-[range-start=true]:rounded-md tg:data-[range-end=true]:rounded-r-md tg:data-[range-start=true]:rounded-l-md tg:data-[range-end=true]:bg-primary tg:data-[range-middle=true]:bg-accent tg:data-[range-start=true]:bg-primary tg:data-[selected-single=true]:bg-primary tg:data-[range-end=true]:text-primary-foreground tg:data-[range-middle=true]:text-accent-foreground tg:data-[range-start=true]:text-primary-foreground tg:data-[selected-single=true]:text-primary-foreground tg:group-data-[focused=true]/day:relative tg:group-data-[focused=true]/day:z-10 tg:group-data-[focused=true]/day:border-ring tg:group-data-[focused=true]/day:ring-[3px] tg:group-data-[focused=true]/day:ring-ring/50 tg:dark:hover:text-accent-foreground tg:[&>span]:text-xs tg:[&>span]:opacity-70", i.day, e),
877
+ ...r
878
+ });
879
+ }
880
+ //#endregion
881
+ //#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateInput.tsx
882
+ var dt = ({ field: t, extra: n }) => {
883
+ let [r, i] = C(!1), { id: a, name: o, value: s, placeholder: c } = t, { node: l, setValue: u, error: d, label: f, helperText: p } = n, m = e(), h = s ? new Date(s) : void 0;
884
+ return /* @__PURE__ */ E(q, {
885
+ className: "tg:mb-4",
886
+ children: [
887
+ /* @__PURE__ */ E(Z, {
888
+ htmlFor: a,
889
+ children: [f || l.data.name, l.data.required && /* @__PURE__ */ T("span", {
890
+ className: "tg:text-red-500",
891
+ children: "*"
892
+ })]
893
+ }),
894
+ /* @__PURE__ */ E(he, {
895
+ open: r,
896
+ onOpenChange: i,
897
+ children: [/* @__PURE__ */ T(ge, {
898
+ asChild: !0,
899
+ children: /* @__PURE__ */ E(K, {
900
+ variant: "outline",
901
+ id: a,
902
+ name: o,
903
+ className: "tg:w-full tg:justify-between tg:font-normal",
904
+ children: [h ? h.toLocaleDateString() : c || m("renderer.defaultInputs.selectDate"), /* @__PURE__ */ T(D, { className: "tg:size-4" })]
905
+ })
906
+ }), /* @__PURE__ */ T(_e, {
907
+ className: "tg:w-auto tg:overflow-hidden tg:p-0",
908
+ align: "start",
909
+ children: /* @__PURE__ */ T(lt, {
910
+ mode: "single",
911
+ selected: h,
912
+ captionLayout: "dropdown",
913
+ disabled: (e) => {
914
+ if (l.data.disablePast) {
915
+ let t = /* @__PURE__ */ new Date();
916
+ return t.setHours(0, 0, 0, 0), e < t;
917
+ }
918
+ return !1;
919
+ },
920
+ onSelect: (e) => {
921
+ u(e ? e.toISOString() : ""), i(!1);
922
+ }
923
+ })
924
+ })]
925
+ }),
926
+ d && /* @__PURE__ */ T(Y, { children: d }),
927
+ p && !d && /* @__PURE__ */ T(J, { children: p })
928
+ ]
929
+ });
930
+ }, ft = ({ field: t, extra: n }) => {
931
+ let [r, i] = C(!1), { id: a, value: o } = t, { node: s, setValue: c, error: l, label: u, helperText: d } = n, f = e(), p = Array.isArray(o) ? o : [], m = p[0] ? new Date(p[0]) : void 0, h = p[1] ? new Date(p[1]) : void 0;
932
+ return /* @__PURE__ */ E(q, {
933
+ className: "tg:mb-4",
934
+ children: [
935
+ /* @__PURE__ */ E(Z, {
936
+ htmlFor: a,
937
+ children: [u || s.data.name, s.data.required && /* @__PURE__ */ T("span", {
938
+ className: "tg:text-red-500",
939
+ children: "*"
940
+ })]
941
+ }),
942
+ /* @__PURE__ */ E(he, {
943
+ open: r,
944
+ onOpenChange: i,
945
+ children: [/* @__PURE__ */ T(ge, {
946
+ asChild: !0,
947
+ children: /* @__PURE__ */ E(K, {
948
+ id: a,
949
+ variant: "outline",
950
+ className: "tg:w-full tg:justify-between tg:font-normal",
951
+ children: [m && h ? `${m.toLocaleDateString()} - ${h.toLocaleDateString()}` : m ? m.toLocaleDateString() : f("renderer.defaultInputs.selectDateRange"), /* @__PURE__ */ T(D, { className: "tg:size-4" })]
952
+ })
953
+ }), /* @__PURE__ */ T(_e, {
954
+ className: "tg:w-auto tg:overflow-hidden tg:p-0",
955
+ align: "start",
956
+ children: /* @__PURE__ */ T(lt, {
957
+ mode: "range",
958
+ selected: {
959
+ from: m,
960
+ to: h
961
+ },
962
+ captionLayout: "dropdown",
963
+ disabled: (e) => {
964
+ if (s.data.disablePast) {
965
+ let t = /* @__PURE__ */ new Date();
966
+ return t.setHours(0, 0, 0, 0), e < t;
967
+ }
968
+ return !1;
969
+ },
970
+ onSelect: (e) => {
971
+ c([e?.from ? e.from.toISOString() : void 0, e?.to ? e.to.toISOString() : void 0]);
972
+ },
973
+ numberOfMonths: 2
974
+ })
975
+ })]
976
+ }),
977
+ l && /* @__PURE__ */ T(Y, { children: l }),
978
+ d && !l && /* @__PURE__ */ T(J, { children: d })
979
+ ]
980
+ });
981
+ }, pt = ({ field: e, extra: t }) => {
982
+ let { id: n, name: r, placeholder: i } = e, { node: a, setValue: o, error: s, label: u, helperText: d } = t;
983
+ return /* @__PURE__ */ E(q, {
984
+ className: "tg:mb-4",
985
+ children: [
986
+ /* @__PURE__ */ E(Z, {
987
+ htmlFor: n,
988
+ children: [u || a.data.name, a.data.required && /* @__PURE__ */ T("span", {
989
+ className: "tg:text-red-500",
990
+ children: "*"
991
+ })]
992
+ }),
993
+ /* @__PURE__ */ T(X, {
994
+ type: "file",
995
+ name: r,
996
+ id: n,
997
+ onChange: async (e) => {
998
+ let { files: t } = e.target;
999
+ if (!t || t.length === 0) {
1000
+ o(null);
1001
+ return;
1002
+ }
1003
+ if (a.data.multiple) {
1004
+ o(await c(Array.from(t)));
1005
+ return;
1006
+ }
1007
+ o(await l(t[0]));
1008
+ },
1009
+ multiple: a.data.multiple,
1010
+ placeholder: i
1011
+ }),
1012
+ s && /* @__PURE__ */ T(Y, { children: s }),
1013
+ d && !s && /* @__PURE__ */ T(J, { children: d })
1014
+ ]
1015
+ });
1016
+ }, mt = ({ field: e }) => {
1017
+ let { id: t, name: n, value: r } = e;
1018
+ return /* @__PURE__ */ T(X, {
1019
+ type: "hidden",
1020
+ id: t,
1021
+ name: n,
1022
+ value: r ?? ""
1023
+ });
1024
+ }, ht = (e) => {
1025
+ let t = e.matchAll(/{{([\w-]+)}}/g);
1026
+ return Array.from(t, (e) => e[1]);
1027
+ }, gt = (e, t) => ht(e).every((e) => {
1028
+ let n = t[e];
1029
+ return n != null && n !== "";
1030
+ }), _t = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
1031
+ let i = t[r], a = i == null ? "" : String(i);
1032
+ return n ? encodeURIComponent(a) : a;
1033
+ }), vt = ({ field: c, extra: l }) => {
1034
+ let [f, p] = C(!1), [m, h] = C(null), [g, _] = C([]), [y, te] = C(""), [D, ne] = C(!1), { id: O, name: re, value: k, placeholder: ae } = c, { node: j, setValue: M, error: N, label: P, helperText: F, missingDependencies: oe } = l, { formValues: I, inputNodes: se, headers: L, baseUrl: R } = o(), { httpConfig: z } = j.data, ce = S(!1), B = S(!1), V = S(""), H = e(), U = S(z), W = S(I), le = S(se), ue = S(L), de = S(R), fe = S(M), pe = S(null), Q = S(null), me = x(() => z?.url ? ht(z.url) : [], [z?.url]), Ce = me.length > 0, Te = x(() => me.map((e) => `${e}:${String(I[e] ?? "")}`).join("|"), [me, I]), Ee = x(() => z?.url ? Ce ? gt(z.url, I) : !0 : !1, [
1035
+ z?.url,
1036
+ Ce,
1037
+ I
1038
+ ]), $ = v(async (e) => {
1039
+ Q.current && Q.current.abort();
1040
+ let o = new AbortController();
1041
+ Q.current = o;
1042
+ let c = U.current, l = W.current, f = fe.current;
1043
+ if (!c?.url) {
1044
+ h(H("renderer.defaultHttpInput.noUrlConfigured")), Q.current = null;
1045
+ return;
1046
+ }
1047
+ if (c.url && !gt(c.url, l)) {
1048
+ Q.current = null;
1049
+ return;
1050
+ }
1051
+ p(!0), h(null);
1052
+ try {
1053
+ let m = t(_t(c.url, l, !0), de.current), g = d(c.searchParam && e ? `${m}${m.includes("?") ? "&" : "?"}${c.searchParam}=${encodeURIComponent(e)}` : m, r(c.queryParams, l)), v = n({ "Content-Type": "application/json" }, r(ue.current, l), r(c.headers, l)), y = [
1054
+ "POST",
1055
+ "PUT",
1056
+ "PATCH"
1057
+ ].includes(c.method || "") ? c.sendAllFormValues ? JSON.stringify(u(l, le.current)) : i(c.body, l, le.current) : void 0, b = setTimeout(() => o.abort(), 3e4), x = await fetch(g, {
1058
+ body: y || void 0,
1059
+ headers: Object.fromEntries(Object.entries(v).filter(([, e]) => e)),
1060
+ method: c.method || "GET",
1061
+ signal: o.signal
1062
+ });
1063
+ if (clearTimeout(b), !x.ok) {
1064
+ h(`HTTP Error ${x.status}: ${x.statusText}`), p(!1);
1065
+ return;
1066
+ }
1067
+ let S = s(await x.json()), C = c.responsePath ? a(S, c.responsePath) : S;
1068
+ if (c.responseMapping && Array.isArray(C)) {
1069
+ let { valueField: e = "value", labelField: t = "label", descriptionField: n, imageField: r } = c.responseMapping;
1070
+ _(C.map((i) => {
1071
+ let o = n ? a(i, n) : void 0, s = r ? a(i, r) : void 0;
1072
+ return {
1073
+ description: o != null && o !== "" ? String(o) : void 0,
1074
+ image: typeof s == "string" && s !== "" ? s : void 0,
1075
+ label: String(a(i, t) || ""),
1076
+ value: String(a(i, e) || "")
1077
+ };
1078
+ }));
1079
+ } else f(typeof C == "string" ? C : JSON.stringify(C));
1080
+ } catch (e) {
1081
+ if (e instanceof Error && e.name === "AbortError") return;
1082
+ h(e instanceof Error ? e.message : H("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
1083
+ } finally {
1084
+ p(!1), Q.current = null;
1085
+ }
1086
+ }, [H]);
1087
+ if (b(() => {
1088
+ U.current = z, W.current = I, le.current = se, ue.current = L, de.current = R, fe.current = M, pe.current = $;
1089
+ }, [
1090
+ z,
1091
+ I,
1092
+ se,
1093
+ L,
1094
+ R,
1095
+ M,
1096
+ $
1097
+ ]), b(() => () => {
1098
+ Q.current && Q.current.abort(), ce.current = !1, B.current = !1;
1099
+ }, []), b(() => {
1100
+ if (ce.current) return;
1101
+ ce.current = !0;
1102
+ let e = U.current, t = W.current, n = pe.current, r = e?.url && gt(e.url, t);
1103
+ e?.fetchOnMount && r && n && (n(), e.url && (V.current = ht(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
1104
+ }, []), b(() => {
1105
+ if (!ce.current || !Ce || V.current === Te || !Ee) return;
1106
+ let e = setTimeout(() => {
1107
+ $(), V.current = Te;
1108
+ }, 500);
1109
+ return () => clearTimeout(e);
1110
+ }, [
1111
+ Te,
1112
+ Ce,
1113
+ Ee,
1114
+ $
1115
+ ]), b(() => {
1116
+ if (!B.current) {
1117
+ B.current = !0;
1118
+ return;
1119
+ }
1120
+ let e = U.current, t = W.current, n = pe.current, r = e?.url && gt(e.url, t);
1121
+ e?.fetchOnMount && r && n && (n(), e.url && (V.current = ht(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
1122
+ }, [x(() => JSON.stringify({
1123
+ body: z?.body,
1124
+ fetchOnMount: z?.fetchOnMount,
1125
+ headers: z?.headers,
1126
+ method: z?.method,
1127
+ queryParams: z?.queryParams,
1128
+ responseMapping: z?.responseMapping,
1129
+ responsePath: z?.responsePath,
1130
+ searchParam: z?.searchParam,
1131
+ sendAllFormValues: z?.sendAllFormValues,
1132
+ url: z?.url
1133
+ }), [z])]), b(() => {
1134
+ if (!(z?.searchParam && y)) return;
1135
+ let e = setTimeout(() => {
1136
+ $(y);
1137
+ }, 300);
1138
+ return () => clearTimeout(e);
1139
+ }, [
1140
+ y,
1141
+ z?.searchParam,
1142
+ $
1143
+ ]), z?.responseMapping) {
1144
+ let e = Array.isArray(k) ? k[0] : k, t = g.find((t) => t.value === e);
1145
+ if (z.searchParam) {
1146
+ let e = f && z?.showLoading ? /* @__PURE__ */ E("div", {
1147
+ className: "tg:flex tg:items-center tg:gap-2",
1148
+ children: [/* @__PURE__ */ T(A, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ T("span", {
1149
+ className: "tg:text-muted-foreground",
1150
+ children: t?.label || ae || H("renderer.defaultHttpInput.search")
1151
+ })]
1152
+ }) : t?.label || ae || H("renderer.defaultHttpInput.search");
1153
+ return /* @__PURE__ */ E(q, {
1154
+ className: "tg:mb-4",
1155
+ children: [
1156
+ /* @__PURE__ */ E(Z, {
1157
+ htmlFor: O,
1158
+ children: [P || j.data.name, j.data.required && /* @__PURE__ */ T("span", {
1159
+ className: "tg:text-red-500",
1160
+ children: "*"
1161
+ })]
1162
+ }),
1163
+ /* @__PURE__ */ T(Ze, {
1164
+ missing: oe,
1165
+ children: /* @__PURE__ */ E(he, {
1166
+ open: D,
1167
+ onOpenChange: ne,
1168
+ children: [/* @__PURE__ */ T(ge, {
1169
+ asChild: !0,
1170
+ children: /* @__PURE__ */ E(K, {
1171
+ id: O,
1172
+ variant: "outline",
1173
+ role: "combobox",
1174
+ "aria-expanded": D,
1175
+ disabled: oe.length > 0,
1176
+ className: "tg:w-full tg:justify-between",
1177
+ children: [e, /* @__PURE__ */ T(ie, { className: "tg:ml-2 tg:h-4 tg:w-4 tg:shrink-0 tg:opacity-50" })]
1178
+ })
1179
+ }), /* @__PURE__ */ T(_e, {
1180
+ className: "tg:w-[var(--radix-popover-trigger-width)] tg:p-0",
1181
+ align: "start",
1182
+ children: /* @__PURE__ */ E(Ve, {
1183
+ shouldFilter: !1,
1184
+ children: [/* @__PURE__ */ T(He, {
1185
+ placeholder: H("renderer.defaultHttpInput.search"),
1186
+ value: y,
1187
+ onValueChange: (e) => {
1188
+ te(e), h(null);
1189
+ }
1190
+ }), /* @__PURE__ */ E(Ue, { children: [
1191
+ f && /* @__PURE__ */ T("div", {
1192
+ className: "tg:flex tg:items-center tg:justify-center tg:p-4",
1193
+ children: /* @__PURE__ */ T(A, { className: "tg:h-4 tg:w-4 tg:animate-spin" })
1194
+ }),
1195
+ !f && m && /* @__PURE__ */ E("div", {
1196
+ className: "tg:p-4 tg:text-destructive tg:text-sm",
1197
+ children: [/* @__PURE__ */ T("div", { children: m }), /* @__PURE__ */ T("button", {
1198
+ type: "button",
1199
+ onClick: () => $(y),
1200
+ className: "tg:mt-2 tg:block tg:text-primary tg:hover:underline",
1201
+ children: H("renderer.defaultHttpInput.retry")
1202
+ })]
1203
+ }),
1204
+ !(f || m) && /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(We, { children: H("renderer.defaultHttpInput.noResults") }), /* @__PURE__ */ T(Ge, { children: g.map((e) => /* @__PURE__ */ E(Ke, {
1205
+ value: e.value,
1206
+ onSelect: () => {
1207
+ M(e.value), ne(!1);
1208
+ },
1209
+ children: [/* @__PURE__ */ T(ee, { className: G("tg:mr-2 tg:h-4 tg:w-4", k === e.value ? "tg:opacity-100" : "tg:opacity-0") }), /* @__PURE__ */ T(it, {
1210
+ label: e.label,
1211
+ description: e.description,
1212
+ image: e.image
1213
+ })]
1214
+ }, e.value)) })] })
1215
+ ] })]
1216
+ })
1217
+ })]
1218
+ })
1219
+ }),
1220
+ N && /* @__PURE__ */ T(Y, { children: N }),
1221
+ F && !N && /* @__PURE__ */ T(J, { children: F })
1222
+ ]
1223
+ });
1224
+ }
1225
+ let n = f && z?.showLoading, r = oe.length === 0 && g.length === 0 && !n ? m ?? H("renderer.defaultHttpInput.noDataAvailable") : void 0, i = /* @__PURE__ */ E(ve, {
1226
+ value: Array.isArray(k) ? k[0] ?? "" : k ?? "",
1227
+ onValueChange: (e) => M(e),
1228
+ disabled: n || g.length === 0,
1229
+ name: re,
1230
+ children: [/* @__PURE__ */ E(xe, {
1231
+ id: O,
1232
+ name: re,
1233
+ className: "tg:w-full",
1234
+ children: [n && /* @__PURE__ */ T(A, { className: "tg:mr-2 tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ T(be, { placeholder: ae || H("renderer.defaultHttpInput.selectOption") })]
1235
+ }), /* @__PURE__ */ T(Se, { children: /* @__PURE__ */ T(ye, { children: g.map((e, t) => /* @__PURE__ */ T(we, {
1236
+ value: e.value,
1237
+ children: /* @__PURE__ */ T(it, {
1238
+ label: e.label,
1239
+ description: e.description,
1240
+ image: e.image
1241
+ })
1242
+ }, e.value + t)) }) })]
1243
+ });
1244
+ return /* @__PURE__ */ E(q, {
1245
+ className: "tg:mb-4",
1246
+ children: [
1247
+ /* @__PURE__ */ E(Z, {
1248
+ htmlFor: O,
1249
+ children: [P || j.data.name, j.data.required && /* @__PURE__ */ T("span", {
1250
+ className: "tg:text-red-500",
1251
+ children: "*"
1252
+ })]
1253
+ }),
1254
+ /* @__PURE__ */ T(Ze, {
1255
+ missing: oe,
1256
+ children: r ? /* @__PURE__ */ T(De, { children: /* @__PURE__ */ E(Oe, { children: [/* @__PURE__ */ T(ke, {
1257
+ asChild: !0,
1258
+ children: /* @__PURE__ */ T("div", {
1259
+ className: "tg:w-full",
1260
+ children: i
1261
+ })
1262
+ }), /* @__PURE__ */ T(Ae, { children: /* @__PURE__ */ T("p", { children: r }) })] }) }) : i
1263
+ }),
1264
+ N && /* @__PURE__ */ T(Y, { children: N }),
1265
+ F && !N && /* @__PURE__ */ T(J, { children: F })
1266
+ ]
1267
+ });
1268
+ }
1269
+ return /* @__PURE__ */ E(q, {
1270
+ className: "tg:mb-4",
1271
+ children: [
1272
+ /* @__PURE__ */ E(Z, {
1273
+ htmlFor: O,
1274
+ children: [P || j.data.name, j.data.required && /* @__PURE__ */ T("span", {
1275
+ className: "tg:text-red-500",
1276
+ children: "*"
1277
+ })]
1278
+ }),
1279
+ /* @__PURE__ */ T(X, {
1280
+ type: "text",
1281
+ name: re,
1282
+ id: O,
1283
+ value: typeof k == "string" ? k : JSON.stringify(k),
1284
+ readOnly: !0,
1285
+ disabled: !0
1286
+ }),
1287
+ N && /* @__PURE__ */ T(Y, { children: N }),
1288
+ F && !N && /* @__PURE__ */ T(J, { children: F })
1289
+ ]
1290
+ });
1291
+ }, yt = ({ field: e, extra: t }) => {
1292
+ let { id: n, name: r, value: i, placeholder: a } = e, { node: o, setValue: s, error: c, label: l, helperText: u } = t;
1293
+ return /* @__PURE__ */ E(q, {
1294
+ className: "tg:mb-4",
1295
+ children: [
1296
+ /* @__PURE__ */ E(Z, {
1297
+ htmlFor: n,
1298
+ children: [l || o.data.name, o.data.required && /* @__PURE__ */ T("span", {
1299
+ className: "tg:text-red-500",
1300
+ children: "*"
1301
+ })]
1302
+ }),
1303
+ /* @__PURE__ */ T(X, {
1304
+ id: n,
1305
+ type: "number",
1306
+ name: r,
1307
+ value: i ?? "",
1308
+ onChange: (e) => s(e.target.value === "" ? null : Number(e.target.value)),
1309
+ placeholder: a
1310
+ }),
1311
+ c && /* @__PURE__ */ T(Y, { children: c }),
1312
+ u && !c && /* @__PURE__ */ T(J, { children: u })
1313
+ ]
1314
+ });
1315
+ }, bt = ({ field: e, extra: t }) => {
1316
+ let { id: n, name: r, value: i, placeholder: a } = e, { node: o, setValue: s, error: c, label: l, helperText: u } = t;
1317
+ return /* @__PURE__ */ E(q, {
1318
+ className: "tg:mb-4",
1319
+ children: [
1320
+ /* @__PURE__ */ E(Z, {
1321
+ htmlFor: n,
1322
+ children: [l || o.data.name, o.data.required && /* @__PURE__ */ T("span", {
1323
+ className: "tg:text-red-500",
1324
+ children: "*"
1325
+ })]
1326
+ }),
1327
+ /* @__PURE__ */ T(X, {
1328
+ id: n,
1329
+ name: r,
1330
+ type: "password",
1331
+ value: i ?? "",
1332
+ onChange: (e) => s(e.target.value),
1333
+ placeholder: a,
1334
+ autoComplete: "new-password"
1335
+ }),
1336
+ c && /* @__PURE__ */ T(Y, { children: c }),
1337
+ u && !c && /* @__PURE__ */ T(J, { children: u })
1338
+ ]
1339
+ });
1340
+ }, xt = P("tg:group/field tg:flex tg:w-full tg:gap-3 tg:data-[invalid=true]:text-destructive", {
1341
+ defaultVariants: { orientation: "vertical" },
1342
+ variants: { orientation: {
1343
+ horizontal: [
1344
+ "tg:flex-row tg:items-center",
1345
+ "tg:[&>[data-slot=field-label]]:flex-auto",
1346
+ "tg:has-[>[data-slot=field-content]]:items-start tg:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
1347
+ ],
1348
+ responsive: [
1349
+ "tg:flex-col tg:@md/field-group:flex-row tg:@md/field-group:items-center tg:[&>*]:w-full tg:@md/field-group:[&>*]:w-auto tg:[&>.sr-only]:w-auto",
1350
+ "tg:@md/field-group:[&>[data-slot=field-label]]:flex-auto",
1351
+ "tg:@md/field-group:has-[>[data-slot=field-content]]:items-start tg:@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
1352
+ ],
1353
+ vertical: ["tg:flex-col tg:[&>*]:w-full tg:[&>.sr-only]:w-auto"]
1354
+ } }
1355
+ });
1356
+ function St({ className: e, orientation: t = "vertical", ...n }) {
1357
+ return /* @__PURE__ */ T("div", {
1358
+ role: "group",
1359
+ "data-slot": "field",
1360
+ "data-orientation": t,
1361
+ className: G(xt({ orientation: t }), e),
1362
+ ...n
1363
+ });
1364
+ }
1365
+ function Ct({ className: e, ...t }) {
1366
+ return /* @__PURE__ */ T("div", {
1367
+ "data-slot": "field-content",
1368
+ className: G("tg:group/field-content tg:flex tg:flex-1 tg:flex-col tg:gap-1.5 tg:leading-snug", e),
1369
+ ...t
1370
+ });
1371
+ }
1372
+ function wt({ className: e, ...t }) {
1373
+ return /* @__PURE__ */ T(Z, {
1374
+ "data-slot": "field-label",
1375
+ className: G("tg:group/field-label tg:peer/field-label tg:flex tg:w-fit tg:gap-2 tg:leading-snug tg:group-data-[disabled=true]/field:opacity-50", "tg:has-[>[data-slot=field]]:w-full tg:has-[>[data-slot=field]]:flex-col tg:has-[>[data-slot=field]]:rounded-md tg:has-[>[data-slot=field]]:border tg:[&>*]:data-[slot=field]:p-4", "tg:has-data-[state=checked]:border-primary tg:has-data-[state=checked]:bg-primary/5 tg:dark:has-data-[state=checked]:bg-primary/10", e),
1376
+ ...t
1377
+ });
1378
+ }
1379
+ function Tt({ className: e, ...t }) {
1380
+ return /* @__PURE__ */ T("div", {
1381
+ "data-slot": "field-label",
1382
+ className: G("tg:flex tg:w-fit tg:items-center tg:gap-2 tg:font-medium tg:text-sm tg:leading-snug tg:group-data-[disabled=true]/field:opacity-50", e),
1383
+ ...t
1384
+ });
1385
+ }
1386
+ function Et({ className: e, ...t }) {
1387
+ return /* @__PURE__ */ T("p", {
1388
+ "data-slot": "field-description",
1389
+ className: G("tg:font-normal tg:text-muted-foreground tg:text-sm tg:leading-normal tg:group-has-[[data-orientation=horizontal]]/field:text-balance", "tg:last:mt-0 tg:nth-last-2:-mt-1 tg:[[data-variant=legend]+&]:-mt-1.5", "tg:[&>a]:underline tg:[&>a]:underline-offset-4 tg:[&>a:hover]:text-primary", e),
1390
+ ...t
1391
+ });
1392
+ }
1393
+ //#endregion
1394
+ //#region src/shared/components/ui/radio-group.tsx
1395
+ function Dt({ className: e, ...t }) {
1396
+ return /* @__PURE__ */ T(W.Root, {
1397
+ "data-slot": "radio-group",
1398
+ className: G("tg:grid tg:gap-3", e),
1399
+ ...t
1400
+ });
1401
+ }
1402
+ function Ot({ className: e, ...t }) {
1403
+ return /* @__PURE__ */ T(W.Item, {
1404
+ "data-slot": "radio-group-item",
1405
+ className: G("tg:aspect-square tg:size-4 tg:shrink-0 tg:rounded-full tg:border tg:border-input tg:text-primary tg:shadow-xs tg:outline-none tg:transition-[color,box-shadow] tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:dark:bg-input/30 tg:dark:aria-invalid:ring-destructive/40", e),
1406
+ ...t,
1407
+ children: /* @__PURE__ */ T(W.Indicator, {
1408
+ "data-slot": "radio-group-indicator",
1409
+ className: "tg:relative tg:flex tg:items-center tg:justify-center",
1410
+ children: /* @__PURE__ */ T(k, { className: "tg:-translate-x-1/2 tg:-translate-y-1/2 tg:absolute tg:top-1/2 tg:left-1/2 tg:size-2 tg:fill-primary" })
1411
+ })
1412
+ });
1413
+ }
1414
+ //#endregion
1415
+ //#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultRadioInput.tsx
1416
+ var kt = ({ field: t, extra: n }) => {
1417
+ let { id: r, name: i, value: a } = t, { node: s, setValue: c, error: l, label: u, helperText: d, renderOptionExtras: f, compactOptions: p, missingDependencies: m } = n, { options: h, isLoading: g, error: _ } = ot(s), { optionsDisplayLimit: v } = o(), y = e(), b = a ? String(a) : "", x = s.data.variant !== "default", S = `${r}-label`, C = v ? h.slice(0, v) : h, w = h.length - C.length;
1418
+ return /* @__PURE__ */ E(q, {
1419
+ className: "tg:mb-4",
1420
+ children: [
1421
+ /* @__PURE__ */ E(Z, {
1422
+ className: "tg:mb-1",
1423
+ id: S,
1424
+ children: [u || s.data.name, s.data.required && /* @__PURE__ */ T("span", {
1425
+ className: "tg:text-red-500",
1426
+ children: "*"
1427
+ })]
1428
+ }),
1429
+ /* @__PURE__ */ T(Qe, { missing: m }),
1430
+ g && /* @__PURE__ */ E("div", {
1431
+ className: "tg:flex tg:items-center tg:gap-2 tg:py-2 tg:text-muted-foreground tg:text-sm",
1432
+ children: [/* @__PURE__ */ T(A, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ T("span", { children: y("renderer.defaultRadioInput.loadingOptions") })]
1433
+ }),
1434
+ /* @__PURE__ */ E(Dt, {
1435
+ value: b,
1436
+ onValueChange: (e) => c(e),
1437
+ "aria-labelledby": S,
1438
+ name: i,
1439
+ className: G("tg:min-w-0", x && "tg:flex tg:flex-col tg:gap-2"),
1440
+ children: [C.map((e, t) => {
1441
+ let n = `${r}-${e.value}`, i = y(e.label) || e.value, a = y(e.description), o = String(e.value);
1442
+ return x ? /* @__PURE__ */ E(wt, {
1443
+ htmlFor: n,
1444
+ className: G("tg:group/option tg:pointer-events-auto tg:relative", p && "tg:group-hover/option:pr-16"),
1445
+ children: [/* @__PURE__ */ E(St, {
1446
+ orientation: "horizontal",
1447
+ "data-disabled": e.disabled || void 0,
1448
+ children: [
1449
+ e.image && /* @__PURE__ */ T("img", {
1450
+ src: e.image,
1451
+ alt: "",
1452
+ className: "tg:h-10 tg:w-10 tg:shrink-0 tg:self-center tg:rounded tg:object-cover"
1453
+ }),
1454
+ /* @__PURE__ */ E(Ct, {
1455
+ className: G(p && "tg:min-w-0 tg:flex-1 tg:overflow-hidden"),
1456
+ children: [/* @__PURE__ */ T(Tt, {
1457
+ className: G(p && "tg:block tg:max-w-full tg:truncate"),
1458
+ children: i
1459
+ }), a && /* @__PURE__ */ T(Et, {
1460
+ className: G(p && "tg:block tg:max-w-full tg:truncate"),
1461
+ children: a
1462
+ })]
1463
+ }),
1464
+ /* @__PURE__ */ T(Ot, {
1465
+ value: o,
1466
+ id: n,
1467
+ disabled: e.disabled,
1468
+ className: G(p && "tg:ml-auto tg:shrink-0 tg:group-hover/option:invisible")
1469
+ })
1470
+ ]
1471
+ }), f?.({
1472
+ index: t,
1473
+ option: e,
1474
+ variant: "card"
1475
+ })]
1476
+ }, e.value + t) : /* @__PURE__ */ E("div", {
1477
+ className: G("tg:group/option tg:pointer-events-auto tg:relative tg:flex tg:items-start tg:space-x-2", p && "tg:min-w-0 tg:pr-22"),
1478
+ children: [
1479
+ /* @__PURE__ */ T(Ot, {
1480
+ value: o,
1481
+ id: n,
1482
+ disabled: e.disabled,
1483
+ className: "tg:mt-0.5"
1484
+ }),
1485
+ e.image && /* @__PURE__ */ T("img", {
1486
+ src: e.image,
1487
+ alt: "",
1488
+ className: "tg:h-8 tg:w-8 tg:rounded tg:object-cover"
1489
+ }),
1490
+ /* @__PURE__ */ E("div", {
1491
+ className: G("tg:flex tg:flex-col", p && "tg:min-w-0 tg:flex-1 tg:overflow-hidden"),
1492
+ children: [/* @__PURE__ */ T(Z, {
1493
+ htmlFor: n,
1494
+ className: G("tg:cursor-pointer tg:font-normal tg:text-sm", p && "tg:block tg:max-w-full tg:truncate"),
1495
+ children: i
1496
+ }), a && /* @__PURE__ */ T("span", {
1497
+ className: G("tg:text-muted-foreground tg:text-xs", p && "tg:block tg:max-w-full tg:truncate"),
1498
+ children: a
1499
+ })]
1500
+ }),
1501
+ f?.({
1502
+ index: t,
1503
+ option: e,
1504
+ variant: "default"
1505
+ })
1506
+ ]
1507
+ }, e.value + t);
1508
+ }), w > 0 && /* @__PURE__ */ T("div", {
1509
+ className: "tg:px-2 tg:py-1 tg:text-muted-foreground tg:text-xs",
1510
+ children: "…"
1511
+ })]
1512
+ }),
1513
+ l && /* @__PURE__ */ T(Y, { children: l }),
1514
+ _ && !l && /* @__PURE__ */ T(Y, { children: _ }),
1515
+ d && !l && !_ && /* @__PURE__ */ T(J, { children: d })
1516
+ ]
1517
+ });
1518
+ }, At = ({ field: t, extra: n }) => {
1519
+ let { id: r, name: i, value: a, placeholder: o } = t, { node: s, setValue: c, error: l, label: u, helperText: d, missingDependencies: f } = n, { options: p, isLoading: m, error: h } = ot(s), g = e(), _ = a ? String(a) : "";
1520
+ return /* @__PURE__ */ E(q, {
1521
+ className: "tg:mb-4",
1522
+ children: [
1523
+ /* @__PURE__ */ E(Z, {
1524
+ htmlFor: r,
1525
+ children: [u || s.data.name, s.data.required && /* @__PURE__ */ T("span", {
1526
+ className: "tg:text-red-500",
1527
+ children: "*"
1528
+ })]
1529
+ }),
1530
+ /* @__PURE__ */ T(Ze, {
1531
+ missing: f,
1532
+ children: /* @__PURE__ */ E(ve, {
1533
+ name: i,
1534
+ value: _,
1535
+ onValueChange: (e) => c(e),
1536
+ disabled: m || f.length > 0,
1537
+ children: [/* @__PURE__ */ E(xe, {
1538
+ id: r,
1539
+ name: i,
1540
+ className: "tg:w-full",
1541
+ children: [m && /* @__PURE__ */ T(A, { className: "tg:mr-2 tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ T(be, { placeholder: o || g("renderer.defaultSelectInput.selectOption") })]
1542
+ }), /* @__PURE__ */ T(Se, { children: /* @__PURE__ */ T(ye, { children: p.map((e, t) => /* @__PURE__ */ T(we, {
1543
+ value: String(e.value),
1544
+ disabled: e.disabled,
1545
+ children: /* @__PURE__ */ T(it, {
1546
+ label: g(e.label) || e.value,
1547
+ description: g(e.description),
1548
+ image: e.image
1549
+ })
1550
+ }, `${e.value}-${t}`)) }) })]
1551
+ })
1552
+ }),
1553
+ l && /* @__PURE__ */ T(Y, { children: l }),
1554
+ h && !l && /* @__PURE__ */ T(Y, { children: h }),
1555
+ d && !l && !h && /* @__PURE__ */ T(J, { children: d })
1556
+ ]
1557
+ });
1558
+ }, jt = (e) => null;
1559
+ //#endregion
1560
+ //#region src/shared/components/ui/switch.tsx
1561
+ function Mt({ className: e, ...t }) {
1562
+ return /* @__PURE__ */ T(le.Root, {
1563
+ "data-slot": "switch",
1564
+ className: G("tg:peer tg:inline-flex tg:h-[1.15rem] tg:w-8 tg:shrink-0 tg:items-center tg:rounded-full tg:border tg:border-transparent tg:shadow-xs tg:outline-none tg:transition-all tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:data-[state=checked]:bg-primary tg:data-[state=unchecked]:bg-input tg:dark:data-[state=unchecked]:bg-input/80", e),
1565
+ ...t,
1566
+ children: /* @__PURE__ */ T(le.Thumb, {
1567
+ "data-slot": "switch-thumb",
1568
+ className: G("tg:pointer-events-none tg:block tg:size-4 tg:rounded-full tg:bg-background tg:ring-0 tg:transition-transform tg:data-[state=checked]:translate-x-[calc(100%-2px)] tg:data-[state=unchecked]:translate-x-0 tg:dark:data-[state=checked]:bg-primary-foreground tg:dark:data-[state=unchecked]:bg-foreground")
1569
+ })
1570
+ });
1571
+ }
1572
+ //#endregion
1573
+ //#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultSwitchInput.tsx
1574
+ var Nt = ({ field: e, extra: t }) => {
1575
+ let { id: n, name: r, value: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t;
1576
+ return /* @__PURE__ */ E(q, {
1577
+ className: "tg:mb-4",
1578
+ children: [
1579
+ /* @__PURE__ */ E(Z, {
1580
+ htmlFor: n,
1581
+ children: [c || a.data.name, a.data.required && /* @__PURE__ */ T("span", {
1582
+ className: "tg:text-red-500",
1583
+ children: "*"
1584
+ })]
1585
+ }),
1586
+ /* @__PURE__ */ T(Mt, {
1587
+ id: n,
1588
+ name: r,
1589
+ checked: i,
1590
+ onCheckedChange: o
1591
+ }),
1592
+ l && !s && /* @__PURE__ */ T(J, { children: l }),
1593
+ s && /* @__PURE__ */ T(Y, { children: s })
1594
+ ]
1595
+ });
1596
+ };
1597
+ //#endregion
1598
+ //#region src/shared/components/ui/textarea.tsx
1599
+ function Pt({ className: e, ...t }) {
1600
+ return /* @__PURE__ */ T("textarea", {
1601
+ "data-slot": "textarea",
1602
+ className: G("tg:field-sizing-content tg:flex tg:min-h-16 tg:w-full tg:rounded-md tg:border tg:border-input tg:bg-transparent tg:px-3 tg:py-2 tg:text-base tg:shadow-xs tg:outline-none tg:transition-[color,box-shadow] tg:placeholder:text-muted-foreground tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:md:text-sm tg:dark:bg-input/30 tg:dark:aria-invalid:ring-destructive/40", e),
1603
+ ...t
1604
+ });
1605
+ }
1606
+ //#endregion
1607
+ //#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextAreaInput.tsx
1608
+ var Ft = ({ field: e, extra: t }) => {
1609
+ let { id: n, name: r, value: i, placeholder: a } = e, { node: o, setValue: s, error: c, label: l, helperText: u } = t;
1610
+ return /* @__PURE__ */ E(q, {
1611
+ className: "tg:mb-4",
1612
+ children: [
1613
+ /* @__PURE__ */ E(Z, {
1614
+ htmlFor: n,
1615
+ children: [l || o.data.name, o.data.required && /* @__PURE__ */ T("span", {
1616
+ className: "tg:text-red-500",
1617
+ children: "*"
1618
+ })]
1619
+ }),
1620
+ /* @__PURE__ */ T(Pt, {
1621
+ id: n,
1622
+ name: r,
1623
+ value: i ?? "",
1624
+ onChange: (e) => s(e.target.value),
1625
+ placeholder: a,
1626
+ className: "tg:w-full tg:rounded-md tg:border tg:px-3 tg:py-2",
1627
+ rows: 4
1628
+ }),
1629
+ c && /* @__PURE__ */ T(Y, { children: c }),
1630
+ u && !c && /* @__PURE__ */ T(J, { children: u })
1631
+ ]
1632
+ });
1633
+ }, It = ({ field: e, extra: t }) => {
1634
+ let { id: n, name: r, value: i, placeholder: a } = e, { node: o, setValue: s, error: c, label: l, helperText: u } = t;
1635
+ return /* @__PURE__ */ E(q, {
1636
+ className: "tg:mb-4",
1637
+ children: [
1638
+ /* @__PURE__ */ E(Z, {
1639
+ htmlFor: n,
1640
+ children: [l || o.data.name, o.data.required && /* @__PURE__ */ T("span", {
1641
+ className: "tg:text-red-500",
1642
+ children: "*"
1643
+ })]
1644
+ }),
1645
+ /* @__PURE__ */ T(X, {
1646
+ type: "text",
1647
+ id: n,
1648
+ name: r,
1649
+ value: i ?? "",
1650
+ onChange: (e) => s(e.target.value),
1651
+ placeholder: a
1652
+ }),
1653
+ c && /* @__PURE__ */ T(Y, { children: c }),
1654
+ u && !c && /* @__PURE__ */ T(J, { children: u })
1655
+ ]
1656
+ });
1657
+ }, Lt = ({ field: e, extra: t }) => {
1658
+ let { id: n, name: r, value: i, placeholder: a } = e, { node: o, setValue: s, error: c, label: l, helperText: u } = t;
1659
+ return /* @__PURE__ */ E(q, {
1660
+ className: "tg:mb-4",
1661
+ children: [
1662
+ /* @__PURE__ */ E(Z, {
1663
+ htmlFor: n,
1664
+ children: [l || o.data.name, o.data.required && /* @__PURE__ */ T("span", {
1665
+ className: "tg:text-red-500",
1666
+ children: "*"
1667
+ })]
1668
+ }),
1669
+ /* @__PURE__ */ T(X, {
1670
+ type: "time",
1671
+ id: n,
1672
+ name: r,
1673
+ value: i ?? "",
1674
+ onChange: (e) => s(e.target.value),
1675
+ placeholder: a,
1676
+ className: "tg:bg-background tg:[color-scheme:light] tg:dark:[color-scheme:dark]"
1677
+ }),
1678
+ c && /* @__PURE__ */ T(Y, { children: c }),
1679
+ u && !c && /* @__PURE__ */ T(J, { children: u })
1680
+ ]
1681
+ });
1682
+ }, Rt = ({ field: t, extra: n }) => {
1683
+ let { id: r, name: i, value: a } = t, { node: o, setValue: s, error: c, label: l, helperText: u } = n, d = e(), f = Array.isArray(a) ? a : [], p = f[0] || "", m = f[1] || "", h = (e) => {
1684
+ s([e, m]);
1685
+ }, g = (e) => {
1686
+ s([p, e]);
1687
+ };
1688
+ return /* @__PURE__ */ E(q, {
1689
+ className: "tg:mb-4",
1690
+ children: [
1691
+ /* @__PURE__ */ E(Z, {
1692
+ htmlFor: `${r}-start`,
1693
+ children: [l || o.data.name, o.data.required && /* @__PURE__ */ T("span", {
1694
+ className: "tg:text-red-500",
1695
+ children: "*"
1696
+ })]
1697
+ }),
1698
+ /* @__PURE__ */ E("div", {
1699
+ className: "tg:flex tg:gap-2",
1700
+ children: [/* @__PURE__ */ T(X, {
1701
+ id: `${r}-start`,
1702
+ name: `${i}-start`,
1703
+ "aria-label": `${l || o.data.name} - ${d("renderer.defaultInputs.startTime")}`,
1704
+ "aria-invalid": !!c,
1705
+ "aria-describedby": c ? `${o.id}-error` : void 0,
1706
+ type: "time",
1707
+ value: p,
1708
+ onChange: (e) => h(e.target.value),
1709
+ placeholder: d("renderer.defaultInputs.startTime"),
1710
+ className: "tg:flex-1 tg:bg-background tg:[color-scheme:light] tg:dark:[color-scheme:dark]"
1711
+ }), /* @__PURE__ */ T(X, {
1712
+ id: `${r}-end`,
1713
+ name: `${i}-end`,
1714
+ "aria-label": `${l || o.data.name} - ${d("renderer.defaultInputs.endTime")}`,
1715
+ "aria-invalid": !!c,
1716
+ "aria-describedby": c ? `${o.id}-error` : void 0,
1717
+ type: "time",
1718
+ value: m,
1719
+ onChange: (e) => g(e.target.value),
1720
+ placeholder: d("renderer.defaultInputs.endTime"),
1721
+ className: "tg:flex-1 tg:bg-background tg:[color-scheme:light] tg:dark:[color-scheme:dark]"
1722
+ })]
1723
+ }),
1724
+ c && /* @__PURE__ */ T(Y, { children: c }),
1725
+ u && !c && /* @__PURE__ */ T(J, { children: u })
1726
+ ]
1727
+ });
1728
+ }, zt = {
1729
+ address: Ye,
1730
+ autocomplete: st,
1731
+ checkbox: ct,
1732
+ date: dt,
1733
+ daterange: ft,
1734
+ file: pt,
1735
+ hidden: mt,
1736
+ http: vt,
1737
+ number: yt,
1738
+ password: bt,
1739
+ radio: kt,
1740
+ select: At,
1741
+ submit: jt,
1742
+ switch: Nt,
1743
+ text: It,
1744
+ textarea: Ft,
1745
+ time: Lt,
1746
+ timerange: Rt
1747
+ }, Bt = _(({ label: t, id: n, disabled: r, isSubmitting: i, onBlur: a, onClick: o, onFocus: s, onPointerDown: c, onPointerLeave: l, onPointerMove: u, ...d }, f) => {
1748
+ let p = e();
1749
+ return /* @__PURE__ */ E("button", {
1750
+ ref: f,
1751
+ id: n,
1752
+ onBlur: a,
1753
+ onClick: o,
1754
+ onFocus: s,
1755
+ onPointerDown: c,
1756
+ disabled: r || i,
1757
+ onPointerLeave: l,
1758
+ onPointerMove: u,
1759
+ type: "submit",
1760
+ className: "tg:inline-flex tg:items-center tg:justify-center tg:gap-2 tg:rounded-md tg:bg-gray-900 tg:px-4 tg:py-2 tg:font-medium tg:text-sm tg:text-white tg:transition-colors tg:hover:bg-gray-800 tg:focus:outline-none tg:focus:ring-2 tg:focus:ring-gray-900 tg:focus:ring-offset-2 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:dark:bg-white tg:dark:text-gray-900 tg:dark:focus:ring-white tg:dark:hover:bg-gray-100",
1761
+ ...d,
1762
+ children: [i && /* @__PURE__ */ T(A, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), t || p("renderer.defaultSubmitButton.submit")]
1763
+ });
1764
+ });
1765
+ //#endregion
1766
+ export { me as $, Me as A, De as B, Ye as C, He as D, Ge as E, ze as F, we as G, ve as H, Ne as I, xe as J, Ce as K, je as L, Be as M, Re as N, Ke as O, Le as P, ge as Q, Oe as R, st as S, We as T, Se as U, ke as V, ye as W, he as X, be as Y, _e as Z, mt as _, It as a, fe as at, dt as b, Nt as c, kt as d, Q as et, Dt as f, vt as g, yt as h, Lt as i, q as it, Ie as j, Ue as k, Mt as l, bt as m, zt as n, X as nt, Ft as o, K as ot, Ot as p, Te as q, Rt as r, J as rt, Pt as s, G as st, Bt as t, Z as tt, At as u, pt as v, Ve as w, ct as x, ft as y, Ae as z };