@dovetail-v2/refine 0.2.7 → 0.2.8

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 (260) hide show
  1. package/dist/MonacoYamlDiffEditor-7a07db88.cjs +59 -0
  2. package/dist/{MonacoYamlDiffEditor-ae04bff7.js → MonacoYamlDiffEditor-7de94ad2.js} +1 -24
  3. package/dist/MonacoYamlEditor-2c3897de.cjs +206 -0
  4. package/dist/{MonacoYamlEditor-7071a8ae.js → MonacoYamlEditor-c8ef62dc.js} +2 -9
  5. package/dist/PodShell-43c7028e.cjs +216 -0
  6. package/dist/PodShell-ba204cde.js +216 -0
  7. package/dist/common-1eb43414.cjs +982 -0
  8. package/dist/common-feae5742.js +983 -0
  9. package/{lib → dist}/components/PodShellModal/PodShell.d.ts +3 -5
  10. package/dist/components/PodShellModal/index.d.ts +10 -0
  11. package/dist/components/Shell/Connecting.d.ts +2 -0
  12. package/dist/components/Shell/common.d.ts +5 -0
  13. package/{lib → dist}/components/Shell/index.d.ts +1 -5
  14. package/{lib → dist}/components/index.d.ts +0 -1
  15. package/dist/index-31874f77.cjs +496 -0
  16. package/dist/index-40deb620.js +497 -0
  17. package/dist/{index-e2ac90c3.js → index-6e832950.js} +273 -1918
  18. package/dist/index-92ab679c.cjs +19002 -0
  19. package/dist/refine.cjs +280 -0
  20. package/dist/refine.js +248 -257
  21. package/dist/shell.cjs +17 -0
  22. package/dist/shell.d.ts +2 -0
  23. package/dist/shell.js +17 -0
  24. package/dist/style.css +1311 -1266
  25. package/package.json +4 -4
  26. package/dist/refine.umd.cjs +0 -20835
  27. package/lib/components/PodShellModal/index.d.ts +0 -10
  28. /package/{lib → dist}/App.d.ts +0 -0
  29. /package/{lib → dist}/Dovetail.d.ts +0 -0
  30. /package/{lib → dist}/components/Breadcrumb/index.d.ts +0 -0
  31. /package/{lib → dist}/components/ConditionsTable/ConditionsTable.d.ts +0 -0
  32. /package/{lib → dist}/components/ConditionsTable/index.d.ts +0 -0
  33. /package/{lib → dist}/components/CreateButton/index.d.ts +0 -0
  34. /package/{lib → dist}/components/CronjobJobsTable/index.d.ts +0 -0
  35. /package/{lib → dist}/components/DeleteButton/index.d.ts +0 -0
  36. /package/{lib → dist}/components/DeleteManyButton/index.d.ts +0 -0
  37. /package/{lib → dist}/components/DrawerShow/DrawerShow.d.ts +0 -0
  38. /package/{lib → dist}/components/DrawerShow/index.d.ts +0 -0
  39. /package/{lib → dist}/components/DropdownMenuItems/EditAnnotationDropdownMenuItem.d.ts +0 -0
  40. /package/{lib → dist}/components/DropdownMenuItems/EditLabelDropdownMenuItem.d.ts +0 -0
  41. /package/{lib → dist}/components/DropdownMenuItems/EditNodeTaintDropdownMenuItem.d.ts +0 -0
  42. /package/{lib → dist}/components/DropdownMenuItems/index.d.ts +0 -0
  43. /package/{lib → dist}/components/Dropdowns/CronJobDropdown/index.d.ts +0 -0
  44. /package/{lib → dist}/components/Dropdowns/K8sDropdown/index.d.ts +0 -0
  45. /package/{lib → dist}/components/Dropdowns/PodDropdown/index.d.ts +0 -0
  46. /package/{lib → dist}/components/Dropdowns/ReplicasDropdown/index.d.ts +0 -0
  47. /package/{lib → dist}/components/Dropdowns/WorkloadDropdown/index.d.ts +0 -0
  48. /package/{lib → dist}/components/DurationTime/index.d.ts +0 -0
  49. /package/{lib → dist}/components/EditButton/index.d.ts +0 -0
  50. /package/{lib → dist}/components/EditField/index.d.ts +0 -0
  51. /package/{lib → dist}/components/EditMetadataForm/EditAnnotationForm.d.ts +0 -0
  52. /package/{lib → dist}/components/EditMetadataForm/EditLabelForm.d.ts +0 -0
  53. /package/{lib → dist}/components/EditMetadataForm/EditNodeTaintForm.d.ts +0 -0
  54. /package/{lib → dist}/components/EditMetadataForm/KeyValueTableForm.d.ts +0 -0
  55. /package/{lib → dist}/components/EditMetadataForm/LabelFormatPopover.d.ts +0 -0
  56. /package/{lib → dist}/components/EditMetadataForm/index.d.ts +0 -0
  57. /package/{lib → dist}/components/ErrorContent/index.d.ts +0 -0
  58. /package/{lib → dist}/components/EventsTable/EventsTable.d.ts +0 -0
  59. /package/{lib → dist}/components/EventsTable/index.d.ts +0 -0
  60. /package/{lib → dist}/components/Form/FormModal.d.ts +0 -0
  61. /package/{lib → dist}/components/Form/FormModeSegmentControl.d.ts +0 -0
  62. /package/{lib → dist}/components/Form/RefineFormContainer.d.ts +0 -0
  63. /package/{lib → dist}/components/Form/RefineFormContent.d.ts +0 -0
  64. /package/{lib → dist}/components/Form/RefineFormPage.d.ts +0 -0
  65. /package/{lib → dist}/components/Form/YamlForm.d.ts +0 -0
  66. /package/{lib → dist}/components/Form/YamlFormContainer.d.ts +0 -0
  67. /package/{lib → dist}/components/Form/index.d.ts +0 -0
  68. /package/{lib → dist}/components/Form/type.d.ts +0 -0
  69. /package/{lib → dist}/components/Form/useFieldsConfig.d.ts +0 -0
  70. /package/{lib → dist}/components/Form/useReactHookForm.d.ts +0 -0
  71. /package/{lib → dist}/components/Form/useRefineForm.d.ts +0 -0
  72. /package/{lib → dist}/components/Form/useYamlForm.d.ts +0 -0
  73. /package/{lib → dist}/components/FormErrorAlert/index.d.ts +0 -0
  74. /package/{lib → dist}/components/FormLayout/index.d.ts +0 -0
  75. /package/{lib → dist}/components/FormWidgets/KeyValueListWidget.d.ts +0 -0
  76. /package/{lib → dist}/components/FormWidgets/MetadataForm.d.ts +0 -0
  77. /package/{lib → dist}/components/FormWidgets/NameInputWidget.d.ts +0 -0
  78. /package/{lib → dist}/components/FormWidgets/NamespaceSelectWidget.d.ts +0 -0
  79. /package/{lib → dist}/components/FormWidgets/index.d.ts +0 -0
  80. /package/{lib → dist}/components/FormWidgets/widget.d.ts +0 -0
  81. /package/{lib → dist}/components/ImageNames/index.d.ts +0 -0
  82. /package/{lib → dist}/components/IngressRulesComponent/index.d.ts +0 -0
  83. /package/{lib → dist}/components/IngressRulesTable/IngressRulesTable.d.ts +0 -0
  84. /package/{lib → dist}/components/IngressRulesTable/index.d.ts +0 -0
  85. /package/{lib → dist}/components/InternalBaseTable/TableWidgets.d.ts +0 -0
  86. /package/{lib → dist}/components/InternalBaseTable/index.d.ts +0 -0
  87. /package/{lib → dist}/components/KeyValue/KeyValue.d.ts +0 -0
  88. /package/{lib → dist}/components/KeyValue/KeyValueAnnotation.d.ts +0 -0
  89. /package/{lib → dist}/components/KeyValue/KeyValueSecret.d.ts +0 -0
  90. /package/{lib → dist}/components/KeyValue/index.d.ts +0 -0
  91. /package/{lib → dist}/components/Layout/index.d.ts +0 -0
  92. /package/{lib → dist}/components/LinkFallback/index.d.ts +0 -0
  93. /package/{lib → dist}/components/ListPage/index.d.ts +0 -0
  94. /package/{lib → dist}/components/Menu/index.d.ts +0 -0
  95. /package/{lib → dist}/components/NamespacesFilter/index.d.ts +0 -0
  96. /package/{lib → dist}/components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +0 -0
  97. /package/{lib → dist}/components/NetworkPolicyRulesViewer/index.d.ts +0 -0
  98. /package/{lib → dist}/components/NodeTaintsTable/NodeTaintsTable.d.ts +0 -0
  99. /package/{lib → dist}/components/NodeTaintsTable/index.d.ts +0 -0
  100. /package/{lib → dist}/components/PVCDistributeStorage/index.d.ts +0 -0
  101. /package/{lib → dist}/components/PageShow/PageShow.d.ts +0 -0
  102. /package/{lib → dist}/components/PageShow/index.d.ts +0 -0
  103. /package/{lib → dist}/components/PodContainersTable/PodContainersTable.d.ts +0 -0
  104. /package/{lib → dist}/components/PodContainersTable/index.d.ts +0 -0
  105. /package/{lib → dist}/components/PodLog/index.d.ts +0 -0
  106. /package/{lib → dist}/components/PodSelectorTable/index.d.ts +0 -0
  107. /package/{lib → dist}/components/PortsTable/index.d.ts +0 -0
  108. /package/{lib → dist}/components/ReferenceLink/index.d.ts +0 -0
  109. /package/{lib → dist}/components/ResourceCRUD/ResourceCRUD.d.ts +0 -0
  110. /package/{lib → dist}/components/ResourceCRUD/create/index.d.ts +0 -0
  111. /package/{lib → dist}/components/ResourceCRUD/index.d.ts +0 -0
  112. /package/{lib → dist}/components/ResourceCRUD/list/index.d.ts +0 -0
  113. /package/{lib → dist}/components/ResourceCRUD/show/index.d.ts +0 -0
  114. /package/{lib → dist}/components/ResourceFiledDisplays.d.ts +0 -0
  115. /package/{lib → dist}/components/ResourceLink/index.d.ts +0 -0
  116. /package/{lib → dist}/components/ResourceSelect/index.d.ts +0 -0
  117. /package/{lib → dist}/components/ResourceTable/index.d.ts +0 -0
  118. /package/{lib → dist}/components/ResourceUsageBar/index.d.ts +0 -0
  119. /package/{lib → dist}/components/Separator/index.d.ts +0 -0
  120. /package/{lib → dist}/components/ServiceComponents/index.d.ts +0 -0
  121. /package/{lib → dist}/components/Shell/ShellToolbar.d.ts +0 -0
  122. /package/{lib → dist}/components/ShowContent/ShowContent.d.ts +0 -0
  123. /package/{lib → dist}/components/ShowContent/fields.d.ts +0 -0
  124. /package/{lib → dist}/components/ShowContent/groups.d.ts +0 -0
  125. /package/{lib → dist}/components/ShowContent/index.d.ts +0 -0
  126. /package/{lib → dist}/components/ShowContent/tabs.d.ts +0 -0
  127. /package/{lib → dist}/components/StateTag/StateTag.d.ts +0 -0
  128. /package/{lib → dist}/components/StateTag/index.d.ts +0 -0
  129. /package/{lib → dist}/components/Table/index.d.ts +0 -0
  130. /package/{lib → dist}/components/TableToolbar/index.d.ts +0 -0
  131. /package/{lib → dist}/components/Tabs/index.d.ts +0 -0
  132. /package/{lib → dist}/components/Tags/index.d.ts +0 -0
  133. /package/{lib → dist}/components/TextTags/index.d.ts +0 -0
  134. /package/{lib → dist}/components/Time/index.d.ts +0 -0
  135. /package/{lib → dist}/components/ValueDisplay/index.d.ts +0 -0
  136. /package/{lib → dist}/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +0 -0
  137. /package/{lib → dist}/components/WorkloadPodsTable/index.d.ts +0 -0
  138. /package/{lib → dist}/components/WorkloadReplicas/index.d.ts +0 -0
  139. /package/{lib → dist}/components/YamlEditor/MonacoYamlDiffEditor.d.ts +0 -0
  140. /package/{lib → dist}/components/YamlEditor/MonacoYamlEditor.d.ts +0 -0
  141. /package/{lib → dist}/components/YamlEditor/YamlEditorComponent.d.ts +0 -0
  142. /package/{lib → dist}/components/YamlEditor/index.d.ts +0 -0
  143. /package/{lib → dist}/components/YamlEditor/style.d.ts +0 -0
  144. /package/{lib → dist}/components/YamlEditor/yaml.worker.d.ts +0 -0
  145. /package/{lib → dist}/constants/auth.d.ts +0 -0
  146. /package/{lib → dist}/constants/index.d.ts +0 -0
  147. /package/{lib → dist}/constants/k8s.d.ts +0 -0
  148. /package/{lib → dist}/constants/state.d.ts +0 -0
  149. /package/{lib → dist}/contexts/component.d.ts +0 -0
  150. /package/{lib → dist}/contexts/configs.d.ts +0 -0
  151. /package/{lib → dist}/contexts/constants.d.ts +0 -0
  152. /package/{lib → dist}/contexts/global-store.d.ts +0 -0
  153. /package/{lib → dist}/contexts/index.d.ts +0 -0
  154. /package/{lib → dist}/hooks/index.d.ts +0 -0
  155. /package/{lib → dist}/hooks/useDeleteModal/index.d.ts +0 -0
  156. /package/{lib → dist}/hooks/useDeleteModal/useDeleteManyModal.d.ts +0 -0
  157. /package/{lib → dist}/hooks/useDeleteModal/useDeleteModal.d.ts +0 -0
  158. /package/{lib → dist}/hooks/useDeleteModal/useDeleteModalOnly.d.ts +0 -0
  159. /package/{lib → dist}/hooks/useDeleteModal/useFailedModal.d.ts +0 -0
  160. /package/{lib → dist}/hooks/useDownloadYAML.d.ts +0 -0
  161. /package/{lib → dist}/hooks/useEagleTable/columns.d.ts +0 -0
  162. /package/{lib → dist}/hooks/useEagleTable/index.d.ts +0 -0
  163. /package/{lib → dist}/hooks/useEagleTable/useEagleTable.d.ts +0 -0
  164. /package/{lib → dist}/hooks/useEdit.d.ts +0 -0
  165. /package/{lib → dist}/hooks/useGlobalStore.d.ts +0 -0
  166. /package/{lib → dist}/hooks/useK8sYamlEditor.d.ts +0 -0
  167. /package/{lib → dist}/hooks/useNamespaceRefineFilter.d.ts +0 -0
  168. /package/{lib → dist}/hooks/useOpenForm.d.ts +0 -0
  169. /package/{lib → dist}/hooks/usePathMap.d.ts +0 -0
  170. /package/{lib → dist}/hooks/useSchema.d.ts +0 -0
  171. /package/{lib → dist}/hooks/useSubmitForm.d.ts +0 -0
  172. /package/{lib → dist}/hooks/useTableData.d.ts +0 -0
  173. /package/{lib → dist}/i18n.d.ts +0 -0
  174. /package/{lib → dist}/index.d.ts +0 -0
  175. /package/{lib → dist}/locales/en-US/index.d.ts +0 -0
  176. /package/{lib → dist}/locales/index.d.ts +0 -0
  177. /package/{lib → dist}/locales/zh-CN/index.d.ts +0 -0
  178. /package/{lib → dist}/main.d.ts +0 -0
  179. /package/{lib → dist}/models/cronjob-model.d.ts +0 -0
  180. /package/{lib → dist}/models/daemonset-model.d.ts +0 -0
  181. /package/{lib → dist}/models/deployment-model.d.ts +0 -0
  182. /package/{lib → dist}/models/event-model.d.ts +0 -0
  183. /package/{lib → dist}/models/index.d.ts +0 -0
  184. /package/{lib → dist}/models/ingress-model.d.ts +0 -0
  185. /package/{lib → dist}/models/job-model.d.ts +0 -0
  186. /package/{lib → dist}/models/network-policy-model.d.ts +0 -0
  187. /package/{lib → dist}/models/node-model.d.ts +0 -0
  188. /package/{lib → dist}/models/persistent-volume-claim.d.ts +0 -0
  189. /package/{lib → dist}/models/persistent-volume.d.ts +0 -0
  190. /package/{lib → dist}/models/pod-metrics-model.d.ts +0 -0
  191. /package/{lib → dist}/models/pod-model.d.ts +0 -0
  192. /package/{lib → dist}/models/resource-model.d.ts +0 -0
  193. /package/{lib → dist}/models/service-model.d.ts +0 -0
  194. /package/{lib → dist}/models/statefulset-model.d.ts +0 -0
  195. /package/{lib → dist}/models/storage-class.d.ts +0 -0
  196. /package/{lib → dist}/models/types/index.d.ts +0 -0
  197. /package/{lib → dist}/models/types/metric.d.ts +0 -0
  198. /package/{lib → dist}/models/workload-base-model.d.ts +0 -0
  199. /package/{lib → dist}/models/workload-model.d.ts +0 -0
  200. /package/{lib → dist}/pages/configmaps/index.d.ts +0 -0
  201. /package/{lib → dist}/pages/cronjobs/create/index.d.ts +0 -0
  202. /package/{lib → dist}/pages/cronjobs/index.d.ts +0 -0
  203. /package/{lib → dist}/pages/cronjobs/list/index.d.ts +0 -0
  204. /package/{lib → dist}/pages/cronjobs/show/index.d.ts +0 -0
  205. /package/{lib → dist}/pages/daemonsets/create/index.d.ts +0 -0
  206. /package/{lib → dist}/pages/daemonsets/index.d.ts +0 -0
  207. /package/{lib → dist}/pages/daemonsets/list/index.d.ts +0 -0
  208. /package/{lib → dist}/pages/daemonsets/show/index.d.ts +0 -0
  209. /package/{lib → dist}/pages/deployments/index.d.ts +0 -0
  210. /package/{lib → dist}/pages/deployments/list/index.d.ts +0 -0
  211. /package/{lib → dist}/pages/deployments/show/index.d.ts +0 -0
  212. /package/{lib → dist}/pages/ingresses/index.d.ts +0 -0
  213. /package/{lib → dist}/pages/jobs/index.d.ts +0 -0
  214. /package/{lib → dist}/pages/networkPolicies/index.d.ts +0 -0
  215. /package/{lib → dist}/pages/nodes/index.d.ts +0 -0
  216. /package/{lib → dist}/pages/nodes/list/index.d.ts +0 -0
  217. /package/{lib → dist}/pages/nodes/show/index.d.ts +0 -0
  218. /package/{lib → dist}/pages/persistentvolumeclaims/index.d.ts +0 -0
  219. /package/{lib → dist}/pages/persistentvolumes/index.d.ts +0 -0
  220. /package/{lib → dist}/pages/pods/create/index.d.ts +0 -0
  221. /package/{lib → dist}/pages/pods/index.d.ts +0 -0
  222. /package/{lib → dist}/pages/pods/list/index.d.ts +0 -0
  223. /package/{lib → dist}/pages/pods/show/index.d.ts +0 -0
  224. /package/{lib → dist}/pages/secrets/index.d.ts +0 -0
  225. /package/{lib → dist}/pages/services/index.d.ts +0 -0
  226. /package/{lib → dist}/pages/statefulsets/index.d.ts +0 -0
  227. /package/{lib → dist}/pages/storageclasses/form/index.d.ts +0 -0
  228. /package/{lib → dist}/pages/storageclasses/index.d.ts +0 -0
  229. /package/{lib → dist}/plugins/index.d.ts +0 -0
  230. /package/{lib → dist}/plugins/model-plugin.d.ts +0 -0
  231. /package/{lib → dist}/plugins/relation-plugin.d.ts +0 -0
  232. /package/{lib → dist}/plugins/type.d.ts +0 -0
  233. /package/{lib → dist}/providers/index.d.ts +0 -0
  234. /package/{lib → dist}/providers/router-provider/index.d.ts +0 -0
  235. /package/{lib → dist}/styles/button.d.ts +0 -0
  236. /package/{lib → dist}/styles/modal.d.ts +0 -0
  237. /package/{lib → dist}/styles/tag.d.ts +0 -0
  238. /package/{lib → dist}/types/globalStore.d.ts +0 -0
  239. /package/{lib → dist}/types/index.d.ts +0 -0
  240. /package/{lib → dist}/types/resource.d.ts +0 -0
  241. /package/{lib → dist}/utils/addId.d.ts +0 -0
  242. /package/{lib → dist}/utils/download.d.ts +0 -0
  243. /package/{lib → dist}/utils/error.d.ts +0 -0
  244. /package/{lib → dist}/utils/form.d.ts +0 -0
  245. /package/{lib → dist}/utils/index.d.ts +0 -0
  246. /package/{lib → dist}/utils/k8s.d.ts +0 -0
  247. /package/{lib → dist}/utils/labels.d.ts +0 -0
  248. /package/{lib → dist}/utils/match-selector.d.ts +0 -0
  249. /package/{lib → dist}/utils/object.d.ts +0 -0
  250. /package/{lib → dist}/utils/openapi.d.ts +0 -0
  251. /package/{lib → dist}/utils/schema-store.d.ts +0 -0
  252. /package/{lib → dist}/utils/schema.d.ts +0 -0
  253. /package/{lib → dist}/utils/selector.d.ts +0 -0
  254. /package/{lib → dist}/utils/shell.d.ts +0 -0
  255. /package/{lib → dist}/utils/storage.d.ts +0 -0
  256. /package/{lib → dist}/utils/string.d.ts +0 -0
  257. /package/{lib → dist}/utils/time.d.ts +0 -0
  258. /package/{lib → dist}/utils/unit.d.ts +0 -0
  259. /package/{lib → dist}/utils/validation.d.ts +0 -0
  260. /package/{lib → dist}/utils/yaml.d.ts +0 -0
@@ -0,0 +1,982 @@
1
+ "use strict";
2
+ const React = require("react");
3
+ function warn() {
4
+ if (console && console.warn) {
5
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
6
+ args[_key] = arguments[_key];
7
+ }
8
+ if (typeof args[0] === "string")
9
+ args[0] = `react-i18next:: ${args[0]}`;
10
+ console.warn(...args);
11
+ }
12
+ }
13
+ const alreadyWarned = {};
14
+ function warnOnce() {
15
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
16
+ args[_key2] = arguments[_key2];
17
+ }
18
+ if (typeof args[0] === "string" && alreadyWarned[args[0]])
19
+ return;
20
+ if (typeof args[0] === "string")
21
+ alreadyWarned[args[0]] = /* @__PURE__ */ new Date();
22
+ warn(...args);
23
+ }
24
+ const loadedClb = (i18n, cb) => () => {
25
+ if (i18n.isInitialized) {
26
+ cb();
27
+ } else {
28
+ const initialized = () => {
29
+ setTimeout(() => {
30
+ i18n.off("initialized", initialized);
31
+ }, 0);
32
+ cb();
33
+ };
34
+ i18n.on("initialized", initialized);
35
+ }
36
+ };
37
+ function loadNamespaces(i18n, ns, cb) {
38
+ i18n.loadNamespaces(ns, loadedClb(i18n, cb));
39
+ }
40
+ function loadLanguages(i18n, lng, ns, cb) {
41
+ if (typeof ns === "string")
42
+ ns = [ns];
43
+ ns.forEach((n) => {
44
+ if (i18n.options.ns.indexOf(n) < 0)
45
+ i18n.options.ns.push(n);
46
+ });
47
+ i18n.loadLanguages(lng, loadedClb(i18n, cb));
48
+ }
49
+ function oldI18nextHasLoadedNamespace(ns, i18n) {
50
+ let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
51
+ const lng = i18n.languages[0];
52
+ const fallbackLng = i18n.options ? i18n.options.fallbackLng : false;
53
+ const lastLng = i18n.languages[i18n.languages.length - 1];
54
+ if (lng.toLowerCase() === "cimode")
55
+ return true;
56
+ const loadNotPending = (l, n) => {
57
+ const loadState = i18n.services.backendConnector.state[`${l}|${n}`];
58
+ return loadState === -1 || loadState === 2;
59
+ };
60
+ if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18n.services.backendConnector.backend && i18n.isLanguageChangingTo && !loadNotPending(i18n.isLanguageChangingTo, ns))
61
+ return false;
62
+ if (i18n.hasResourceBundle(lng, ns))
63
+ return true;
64
+ if (!i18n.services.backendConnector.backend || i18n.options.resources && !i18n.options.partialBundledLanguages)
65
+ return true;
66
+ if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns)))
67
+ return true;
68
+ return false;
69
+ }
70
+ function hasLoadedNamespace(ns, i18n) {
71
+ let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
72
+ if (!i18n.languages || !i18n.languages.length) {
73
+ warnOnce("i18n.languages were undefined or empty", i18n.languages);
74
+ return true;
75
+ }
76
+ const isNewerI18next = i18n.options.ignoreJSONStructure !== void 0;
77
+ if (!isNewerI18next) {
78
+ return oldI18nextHasLoadedNamespace(ns, i18n, options);
79
+ }
80
+ return i18n.hasLoadedNamespace(ns, {
81
+ lng: options.lng,
82
+ precheck: (i18nInstance2, loadNotPending) => {
83
+ if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns))
84
+ return false;
85
+ }
86
+ });
87
+ }
88
+ const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
89
+ const htmlEntities = {
90
+ "&amp;": "&",
91
+ "&#38;": "&",
92
+ "&lt;": "<",
93
+ "&#60;": "<",
94
+ "&gt;": ">",
95
+ "&#62;": ">",
96
+ "&apos;": "'",
97
+ "&#39;": "'",
98
+ "&quot;": '"',
99
+ "&#34;": '"',
100
+ "&nbsp;": " ",
101
+ "&#160;": " ",
102
+ "&copy;": "©",
103
+ "&#169;": "©",
104
+ "&reg;": "®",
105
+ "&#174;": "®",
106
+ "&hellip;": "…",
107
+ "&#8230;": "…",
108
+ "&#x2F;": "/",
109
+ "&#47;": "/"
110
+ };
111
+ const unescapeHtmlEntity = (m) => htmlEntities[m];
112
+ const unescape = (text) => text.replace(matchHtmlEntity, unescapeHtmlEntity);
113
+ let defaultOptions = {
114
+ bindI18n: "languageChanged",
115
+ bindI18nStore: "",
116
+ transEmptyNodeValue: "",
117
+ transSupportBasicHtmlNodes: true,
118
+ transWrapTextNodes: "",
119
+ transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
120
+ useSuspense: true,
121
+ unescape
122
+ };
123
+ function setDefaults() {
124
+ let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
125
+ defaultOptions = {
126
+ ...defaultOptions,
127
+ ...options
128
+ };
129
+ }
130
+ function getDefaults() {
131
+ return defaultOptions;
132
+ }
133
+ let i18nInstance;
134
+ function setI18n(instance) {
135
+ i18nInstance = instance;
136
+ }
137
+ function getI18n() {
138
+ return i18nInstance;
139
+ }
140
+ const I18nContext = React.createContext();
141
+ class ReportNamespaces {
142
+ constructor() {
143
+ this.usedNamespaces = {};
144
+ }
145
+ addUsedNamespaces(namespaces) {
146
+ namespaces.forEach((ns) => {
147
+ if (!this.usedNamespaces[ns])
148
+ this.usedNamespaces[ns] = true;
149
+ });
150
+ }
151
+ getUsedNamespaces() {
152
+ return Object.keys(this.usedNamespaces);
153
+ }
154
+ }
155
+ const usePrevious = (value, ignore) => {
156
+ const ref = React.useRef();
157
+ React.useEffect(() => {
158
+ ref.current = ignore ? ref.current : value;
159
+ }, [value, ignore]);
160
+ return ref.current;
161
+ };
162
+ function useTranslation(ns) {
163
+ let props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
164
+ const {
165
+ i18n: i18nFromProps
166
+ } = props;
167
+ const {
168
+ i18n: i18nFromContext,
169
+ defaultNS: defaultNSFromContext
170
+ } = React.useContext(I18nContext) || {};
171
+ const i18n = i18nFromProps || i18nFromContext || getI18n();
172
+ if (i18n && !i18n.reportNamespaces)
173
+ i18n.reportNamespaces = new ReportNamespaces();
174
+ if (!i18n) {
175
+ warnOnce("You will need to pass in an i18next instance by using initReactI18next");
176
+ const notReadyT = (k, optsOrDefaultValue) => {
177
+ if (typeof optsOrDefaultValue === "string")
178
+ return optsOrDefaultValue;
179
+ if (optsOrDefaultValue && typeof optsOrDefaultValue === "object" && typeof optsOrDefaultValue.defaultValue === "string")
180
+ return optsOrDefaultValue.defaultValue;
181
+ return Array.isArray(k) ? k[k.length - 1] : k;
182
+ };
183
+ const retNotReady = [notReadyT, {}, false];
184
+ retNotReady.t = notReadyT;
185
+ retNotReady.i18n = {};
186
+ retNotReady.ready = false;
187
+ return retNotReady;
188
+ }
189
+ if (i18n.options.react && i18n.options.react.wait !== void 0)
190
+ warnOnce("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
191
+ const i18nOptions = {
192
+ ...getDefaults(),
193
+ ...i18n.options.react,
194
+ ...props
195
+ };
196
+ const {
197
+ useSuspense,
198
+ keyPrefix
199
+ } = i18nOptions;
200
+ let namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
201
+ namespaces = typeof namespaces === "string" ? [namespaces] : namespaces || ["translation"];
202
+ if (i18n.reportNamespaces.addUsedNamespaces)
203
+ i18n.reportNamespaces.addUsedNamespaces(namespaces);
204
+ const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace(n, i18n, i18nOptions));
205
+ function getT() {
206
+ return i18n.getFixedT(props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
207
+ }
208
+ const [t, setT] = React.useState(getT);
209
+ let joinedNS = namespaces.join();
210
+ if (props.lng)
211
+ joinedNS = `${props.lng}${joinedNS}`;
212
+ const previousJoinedNS = usePrevious(joinedNS);
213
+ const isMounted = React.useRef(true);
214
+ React.useEffect(() => {
215
+ const {
216
+ bindI18n,
217
+ bindI18nStore
218
+ } = i18nOptions;
219
+ isMounted.current = true;
220
+ if (!ready && !useSuspense) {
221
+ if (props.lng) {
222
+ loadLanguages(i18n, props.lng, namespaces, () => {
223
+ if (isMounted.current)
224
+ setT(getT);
225
+ });
226
+ } else {
227
+ loadNamespaces(i18n, namespaces, () => {
228
+ if (isMounted.current)
229
+ setT(getT);
230
+ });
231
+ }
232
+ }
233
+ if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
234
+ setT(getT);
235
+ }
236
+ function boundReset() {
237
+ if (isMounted.current)
238
+ setT(getT);
239
+ }
240
+ if (bindI18n && i18n)
241
+ i18n.on(bindI18n, boundReset);
242
+ if (bindI18nStore && i18n)
243
+ i18n.store.on(bindI18nStore, boundReset);
244
+ return () => {
245
+ isMounted.current = false;
246
+ if (bindI18n && i18n)
247
+ bindI18n.split(" ").forEach((e) => i18n.off(e, boundReset));
248
+ if (bindI18nStore && i18n)
249
+ bindI18nStore.split(" ").forEach((e) => i18n.store.off(e, boundReset));
250
+ };
251
+ }, [i18n, joinedNS]);
252
+ const isInitial = React.useRef(true);
253
+ React.useEffect(() => {
254
+ if (isMounted.current && !isInitial.current) {
255
+ setT(getT);
256
+ }
257
+ isInitial.current = false;
258
+ }, [i18n, keyPrefix]);
259
+ const ret = [t, i18n, ready];
260
+ ret.t = t;
261
+ ret.i18n = i18n;
262
+ ret.ready = ready;
263
+ if (ready)
264
+ return ret;
265
+ if (!ready && !useSuspense)
266
+ return ret;
267
+ throw new Promise((resolve) => {
268
+ if (props.lng) {
269
+ loadLanguages(i18n, props.lng, namespaces, () => resolve());
270
+ } else {
271
+ loadNamespaces(i18n, namespaces, () => resolve());
272
+ }
273
+ });
274
+ }
275
+ var jsxRuntime = { exports: {} };
276
+ var reactJsxRuntime_production_min = {};
277
+ /** @license React v16.14.0
278
+ * react-jsx-runtime.production.min.js
279
+ *
280
+ * Copyright (c) Facebook, Inc. and its affiliates.
281
+ *
282
+ * This source code is licensed under the MIT license found in the
283
+ * LICENSE file in the root directory of this source tree.
284
+ */
285
+ var hasRequiredReactJsxRuntime_production_min;
286
+ function requireReactJsxRuntime_production_min() {
287
+ if (hasRequiredReactJsxRuntime_production_min)
288
+ return reactJsxRuntime_production_min;
289
+ hasRequiredReactJsxRuntime_production_min = 1;
290
+ var f = React, g = 60103;
291
+ reactJsxRuntime_production_min.Fragment = 60107;
292
+ if ("function" === typeof Symbol && Symbol.for) {
293
+ var h = Symbol.for;
294
+ g = h("react.element");
295
+ reactJsxRuntime_production_min.Fragment = h("react.fragment");
296
+ }
297
+ var m = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, n = Object.prototype.hasOwnProperty, p = { key: true, ref: true, __self: true, __source: true };
298
+ function q(c, a, k) {
299
+ var b, d = {}, e = null, l = null;
300
+ void 0 !== k && (e = "" + k);
301
+ void 0 !== a.key && (e = "" + a.key);
302
+ void 0 !== a.ref && (l = a.ref);
303
+ for (b in a)
304
+ n.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
305
+ if (c && c.defaultProps)
306
+ for (b in a = c.defaultProps, a)
307
+ void 0 === d[b] && (d[b] = a[b]);
308
+ return { $$typeof: g, type: c, key: e, ref: l, props: d, _owner: m.current };
309
+ }
310
+ reactJsxRuntime_production_min.jsx = q;
311
+ reactJsxRuntime_production_min.jsxs = q;
312
+ return reactJsxRuntime_production_min;
313
+ }
314
+ var reactJsxRuntime_development = {};
315
+ /** @license React v16.14.0
316
+ * react-jsx-runtime.development.js
317
+ *
318
+ * Copyright (c) Facebook, Inc. and its affiliates.
319
+ *
320
+ * This source code is licensed under the MIT license found in the
321
+ * LICENSE file in the root directory of this source tree.
322
+ */
323
+ var hasRequiredReactJsxRuntime_development;
324
+ function requireReactJsxRuntime_development() {
325
+ if (hasRequiredReactJsxRuntime_development)
326
+ return reactJsxRuntime_development;
327
+ hasRequiredReactJsxRuntime_development = 1;
328
+ (function(exports2) {
329
+ if (process.env.NODE_ENV !== "production") {
330
+ (function() {
331
+ var React$1 = React;
332
+ var REACT_ELEMENT_TYPE = 60103;
333
+ var REACT_PORTAL_TYPE = 60106;
334
+ exports2.Fragment = 60107;
335
+ var REACT_STRICT_MODE_TYPE = 60108;
336
+ var REACT_PROFILER_TYPE = 60114;
337
+ var REACT_PROVIDER_TYPE = 60109;
338
+ var REACT_CONTEXT_TYPE = 60110;
339
+ var REACT_FORWARD_REF_TYPE = 60112;
340
+ var REACT_SUSPENSE_TYPE = 60113;
341
+ var REACT_SUSPENSE_LIST_TYPE = 60120;
342
+ var REACT_MEMO_TYPE = 60115;
343
+ var REACT_LAZY_TYPE = 60116;
344
+ var REACT_BLOCK_TYPE = 60121;
345
+ var REACT_SERVER_BLOCK_TYPE = 60122;
346
+ var REACT_FUNDAMENTAL_TYPE = 60117;
347
+ var REACT_DEBUG_TRACING_MODE_TYPE = 60129;
348
+ var REACT_LEGACY_HIDDEN_TYPE = 60131;
349
+ if (typeof Symbol === "function" && Symbol.for) {
350
+ var symbolFor = Symbol.for;
351
+ REACT_ELEMENT_TYPE = symbolFor("react.element");
352
+ REACT_PORTAL_TYPE = symbolFor("react.portal");
353
+ exports2.Fragment = symbolFor("react.fragment");
354
+ REACT_STRICT_MODE_TYPE = symbolFor("react.strict_mode");
355
+ REACT_PROFILER_TYPE = symbolFor("react.profiler");
356
+ REACT_PROVIDER_TYPE = symbolFor("react.provider");
357
+ REACT_CONTEXT_TYPE = symbolFor("react.context");
358
+ REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref");
359
+ REACT_SUSPENSE_TYPE = symbolFor("react.suspense");
360
+ REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list");
361
+ REACT_MEMO_TYPE = symbolFor("react.memo");
362
+ REACT_LAZY_TYPE = symbolFor("react.lazy");
363
+ REACT_BLOCK_TYPE = symbolFor("react.block");
364
+ REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block");
365
+ REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental");
366
+ symbolFor("react.scope");
367
+ symbolFor("react.opaque.id");
368
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode");
369
+ symbolFor("react.offscreen");
370
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden");
371
+ }
372
+ var MAYBE_ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
373
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
374
+ function getIteratorFn(maybeIterable) {
375
+ if (maybeIterable === null || typeof maybeIterable !== "object") {
376
+ return null;
377
+ }
378
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
379
+ if (typeof maybeIterator === "function") {
380
+ return maybeIterator;
381
+ }
382
+ return null;
383
+ }
384
+ var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
385
+ function error(format) {
386
+ {
387
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
388
+ args[_key2 - 1] = arguments[_key2];
389
+ }
390
+ printWarning("error", format, args);
391
+ }
392
+ }
393
+ function printWarning(level, format, args) {
394
+ {
395
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
396
+ var stack = "";
397
+ if (currentlyValidatingElement) {
398
+ var name = getComponentName(currentlyValidatingElement.type);
399
+ var owner = currentlyValidatingElement._owner;
400
+ stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
401
+ }
402
+ stack += ReactDebugCurrentFrame.getStackAddendum();
403
+ if (stack !== "") {
404
+ format += "%s";
405
+ args = args.concat([stack]);
406
+ }
407
+ var argsWithFormat = args.map(function(item) {
408
+ return "" + item;
409
+ });
410
+ argsWithFormat.unshift("Warning: " + format);
411
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
412
+ }
413
+ }
414
+ var enableScopeAPI = false;
415
+ function isValidElementType(type) {
416
+ if (typeof type === "string" || typeof type === "function") {
417
+ return true;
418
+ }
419
+ if (type === exports2.Fragment || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI) {
420
+ return true;
421
+ }
422
+ if (typeof type === "object" && type !== null) {
423
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
424
+ return true;
425
+ }
426
+ }
427
+ return false;
428
+ }
429
+ var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
430
+ function describeComponentFrame(name, source, ownerName) {
431
+ var sourceInfo = "";
432
+ if (source) {
433
+ var path = source.fileName;
434
+ var fileName = path.replace(BEFORE_SLASH_RE, "");
435
+ {
436
+ if (/^index\./.test(fileName)) {
437
+ var match = path.match(BEFORE_SLASH_RE);
438
+ if (match) {
439
+ var pathBeforeSlash = match[1];
440
+ if (pathBeforeSlash) {
441
+ var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, "");
442
+ fileName = folderName + "/" + fileName;
443
+ }
444
+ }
445
+ }
446
+ }
447
+ sourceInfo = " (at " + fileName + ":" + source.lineNumber + ")";
448
+ } else if (ownerName) {
449
+ sourceInfo = " (created by " + ownerName + ")";
450
+ }
451
+ return "\n in " + (name || "Unknown") + sourceInfo;
452
+ }
453
+ var Resolved = 1;
454
+ function refineResolvedLazyComponent(lazyComponent) {
455
+ return lazyComponent._status === Resolved ? lazyComponent._result : null;
456
+ }
457
+ function getWrappedName(outerType, innerType, wrapperName) {
458
+ var functionName = innerType.displayName || innerType.name || "";
459
+ return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName);
460
+ }
461
+ function getComponentName(type) {
462
+ if (type == null) {
463
+ return null;
464
+ }
465
+ {
466
+ if (typeof type.tag === "number") {
467
+ error("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue.");
468
+ }
469
+ }
470
+ if (typeof type === "function") {
471
+ return type.displayName || type.name || null;
472
+ }
473
+ if (typeof type === "string") {
474
+ return type;
475
+ }
476
+ switch (type) {
477
+ case exports2.Fragment:
478
+ return "Fragment";
479
+ case REACT_PORTAL_TYPE:
480
+ return "Portal";
481
+ case REACT_PROFILER_TYPE:
482
+ return "Profiler";
483
+ case REACT_STRICT_MODE_TYPE:
484
+ return "StrictMode";
485
+ case REACT_SUSPENSE_TYPE:
486
+ return "Suspense";
487
+ case REACT_SUSPENSE_LIST_TYPE:
488
+ return "SuspenseList";
489
+ }
490
+ if (typeof type === "object") {
491
+ switch (type.$$typeof) {
492
+ case REACT_CONTEXT_TYPE:
493
+ return "Context.Consumer";
494
+ case REACT_PROVIDER_TYPE:
495
+ return "Context.Provider";
496
+ case REACT_FORWARD_REF_TYPE:
497
+ return getWrappedName(type, type.render, "ForwardRef");
498
+ case REACT_MEMO_TYPE:
499
+ return getComponentName(type.type);
500
+ case REACT_BLOCK_TYPE:
501
+ return getComponentName(type.render);
502
+ case REACT_LAZY_TYPE: {
503
+ var thenable = type;
504
+ var resolvedThenable = refineResolvedLazyComponent(thenable);
505
+ if (resolvedThenable) {
506
+ return getComponentName(resolvedThenable);
507
+ }
508
+ break;
509
+ }
510
+ }
511
+ }
512
+ return null;
513
+ }
514
+ var loggedTypeFailures = {};
515
+ ReactSharedInternals.ReactDebugCurrentFrame;
516
+ var currentlyValidatingElement = null;
517
+ function setCurrentlyValidatingElement(element) {
518
+ {
519
+ currentlyValidatingElement = element;
520
+ }
521
+ }
522
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
523
+ {
524
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
525
+ for (var typeSpecName in typeSpecs) {
526
+ if (has(typeSpecs, typeSpecName)) {
527
+ var error$1 = void 0;
528
+ try {
529
+ if (typeof typeSpecs[typeSpecName] !== "function") {
530
+ var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
531
+ err.name = "Invariant Violation";
532
+ throw err;
533
+ }
534
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
535
+ } catch (ex) {
536
+ error$1 = ex;
537
+ }
538
+ if (error$1 && !(error$1 instanceof Error)) {
539
+ setCurrentlyValidatingElement(element);
540
+ error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
541
+ setCurrentlyValidatingElement(null);
542
+ }
543
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
544
+ loggedTypeFailures[error$1.message] = true;
545
+ setCurrentlyValidatingElement(element);
546
+ error("Failed %s type: %s", location, error$1.message);
547
+ setCurrentlyValidatingElement(null);
548
+ }
549
+ }
550
+ }
551
+ }
552
+ }
553
+ var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
554
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
555
+ var RESERVED_PROPS = {
556
+ key: true,
557
+ ref: true,
558
+ __self: true,
559
+ __source: true
560
+ };
561
+ var specialPropKeyWarningShown;
562
+ var specialPropRefWarningShown;
563
+ var didWarnAboutStringRefs;
564
+ {
565
+ didWarnAboutStringRefs = {};
566
+ }
567
+ function hasValidRef(config) {
568
+ {
569
+ if (hasOwnProperty.call(config, "ref")) {
570
+ var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
571
+ if (getter && getter.isReactWarning) {
572
+ return false;
573
+ }
574
+ }
575
+ }
576
+ return config.ref !== void 0;
577
+ }
578
+ function hasValidKey(config) {
579
+ {
580
+ if (hasOwnProperty.call(config, "key")) {
581
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
582
+ if (getter && getter.isReactWarning) {
583
+ return false;
584
+ }
585
+ }
586
+ }
587
+ return config.key !== void 0;
588
+ }
589
+ function warnIfStringRefCannotBeAutoConverted(config, self) {
590
+ {
591
+ if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
592
+ var componentName = getComponentName(ReactCurrentOwner.current.type);
593
+ if (!didWarnAboutStringRefs[componentName]) {
594
+ error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
595
+ didWarnAboutStringRefs[componentName] = true;
596
+ }
597
+ }
598
+ }
599
+ }
600
+ function defineKeyPropWarningGetter(props, displayName) {
601
+ {
602
+ var warnAboutAccessingKey = function() {
603
+ if (!specialPropKeyWarningShown) {
604
+ specialPropKeyWarningShown = true;
605
+ error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
606
+ }
607
+ };
608
+ warnAboutAccessingKey.isReactWarning = true;
609
+ Object.defineProperty(props, "key", {
610
+ get: warnAboutAccessingKey,
611
+ configurable: true
612
+ });
613
+ }
614
+ }
615
+ function defineRefPropWarningGetter(props, displayName) {
616
+ {
617
+ var warnAboutAccessingRef = function() {
618
+ if (!specialPropRefWarningShown) {
619
+ specialPropRefWarningShown = true;
620
+ error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
621
+ }
622
+ };
623
+ warnAboutAccessingRef.isReactWarning = true;
624
+ Object.defineProperty(props, "ref", {
625
+ get: warnAboutAccessingRef,
626
+ configurable: true
627
+ });
628
+ }
629
+ }
630
+ var ReactElement = function(type, key, ref, self, source, owner, props) {
631
+ var element = {
632
+ // This tag allows us to uniquely identify this as a React Element
633
+ $$typeof: REACT_ELEMENT_TYPE,
634
+ // Built-in properties that belong on the element
635
+ type,
636
+ key,
637
+ ref,
638
+ props,
639
+ // Record the component responsible for creating this element.
640
+ _owner: owner
641
+ };
642
+ {
643
+ element._store = {};
644
+ Object.defineProperty(element._store, "validated", {
645
+ configurable: false,
646
+ enumerable: false,
647
+ writable: true,
648
+ value: false
649
+ });
650
+ Object.defineProperty(element, "_self", {
651
+ configurable: false,
652
+ enumerable: false,
653
+ writable: false,
654
+ value: self
655
+ });
656
+ Object.defineProperty(element, "_source", {
657
+ configurable: false,
658
+ enumerable: false,
659
+ writable: false,
660
+ value: source
661
+ });
662
+ if (Object.freeze) {
663
+ Object.freeze(element.props);
664
+ Object.freeze(element);
665
+ }
666
+ }
667
+ return element;
668
+ };
669
+ function jsxDEV(type, config, maybeKey, source, self) {
670
+ {
671
+ var propName;
672
+ var props = {};
673
+ var key = null;
674
+ var ref = null;
675
+ if (maybeKey !== void 0) {
676
+ key = "" + maybeKey;
677
+ }
678
+ if (hasValidKey(config)) {
679
+ key = "" + config.key;
680
+ }
681
+ if (hasValidRef(config)) {
682
+ ref = config.ref;
683
+ warnIfStringRefCannotBeAutoConverted(config, self);
684
+ }
685
+ for (propName in config) {
686
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
687
+ props[propName] = config[propName];
688
+ }
689
+ }
690
+ if (type && type.defaultProps) {
691
+ var defaultProps = type.defaultProps;
692
+ for (propName in defaultProps) {
693
+ if (props[propName] === void 0) {
694
+ props[propName] = defaultProps[propName];
695
+ }
696
+ }
697
+ }
698
+ if (key || ref) {
699
+ var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
700
+ if (key) {
701
+ defineKeyPropWarningGetter(props, displayName);
702
+ }
703
+ if (ref) {
704
+ defineRefPropWarningGetter(props, displayName);
705
+ }
706
+ }
707
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
708
+ }
709
+ }
710
+ var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
711
+ ReactSharedInternals.ReactDebugCurrentFrame;
712
+ function setCurrentlyValidatingElement$1(element) {
713
+ currentlyValidatingElement = element;
714
+ }
715
+ var propTypesMisspellWarningShown;
716
+ {
717
+ propTypesMisspellWarningShown = false;
718
+ }
719
+ function isValidElement(object) {
720
+ {
721
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
722
+ }
723
+ }
724
+ function getDeclarationErrorAddendum() {
725
+ {
726
+ if (ReactCurrentOwner$1.current) {
727
+ var name = getComponentName(ReactCurrentOwner$1.current.type);
728
+ if (name) {
729
+ return "\n\nCheck the render method of `" + name + "`.";
730
+ }
731
+ }
732
+ return "";
733
+ }
734
+ }
735
+ function getSourceInfoErrorAddendum(source) {
736
+ {
737
+ if (source !== void 0) {
738
+ var fileName = source.fileName.replace(/^.*[\\\/]/, "");
739
+ var lineNumber = source.lineNumber;
740
+ return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
741
+ }
742
+ return "";
743
+ }
744
+ }
745
+ var ownerHasKeyUseWarning = {};
746
+ function getCurrentComponentErrorInfo(parentType) {
747
+ {
748
+ var info = getDeclarationErrorAddendum();
749
+ if (!info) {
750
+ var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
751
+ if (parentName) {
752
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
753
+ }
754
+ }
755
+ return info;
756
+ }
757
+ }
758
+ function validateExplicitKey(element, parentType) {
759
+ {
760
+ if (!element._store || element._store.validated || element.key != null) {
761
+ return;
762
+ }
763
+ element._store.validated = true;
764
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
765
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
766
+ return;
767
+ }
768
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
769
+ var childOwner = "";
770
+ if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
771
+ childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
772
+ }
773
+ setCurrentlyValidatingElement$1(element);
774
+ error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
775
+ setCurrentlyValidatingElement$1(null);
776
+ }
777
+ }
778
+ function validateChildKeys(node, parentType) {
779
+ {
780
+ if (typeof node !== "object") {
781
+ return;
782
+ }
783
+ if (Array.isArray(node)) {
784
+ for (var i = 0; i < node.length; i++) {
785
+ var child = node[i];
786
+ if (isValidElement(child)) {
787
+ validateExplicitKey(child, parentType);
788
+ }
789
+ }
790
+ } else if (isValidElement(node)) {
791
+ if (node._store) {
792
+ node._store.validated = true;
793
+ }
794
+ } else if (node) {
795
+ var iteratorFn = getIteratorFn(node);
796
+ if (typeof iteratorFn === "function") {
797
+ if (iteratorFn !== node.entries) {
798
+ var iterator = iteratorFn.call(node);
799
+ var step;
800
+ while (!(step = iterator.next()).done) {
801
+ if (isValidElement(step.value)) {
802
+ validateExplicitKey(step.value, parentType);
803
+ }
804
+ }
805
+ }
806
+ }
807
+ }
808
+ }
809
+ }
810
+ function validatePropTypes(element) {
811
+ {
812
+ var type = element.type;
813
+ if (type === null || type === void 0 || typeof type === "string") {
814
+ return;
815
+ }
816
+ var propTypes;
817
+ if (typeof type === "function") {
818
+ propTypes = type.propTypes;
819
+ } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
820
+ // Inner props are checked in the reconciler.
821
+ type.$$typeof === REACT_MEMO_TYPE)) {
822
+ propTypes = type.propTypes;
823
+ } else {
824
+ return;
825
+ }
826
+ if (propTypes) {
827
+ var name = getComponentName(type);
828
+ checkPropTypes(propTypes, element.props, "prop", name, element);
829
+ } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
830
+ propTypesMisspellWarningShown = true;
831
+ var _name = getComponentName(type);
832
+ error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
833
+ }
834
+ if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
835
+ error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
836
+ }
837
+ }
838
+ }
839
+ function validateFragmentProps(fragment) {
840
+ {
841
+ var keys = Object.keys(fragment.props);
842
+ for (var i = 0; i < keys.length; i++) {
843
+ var key = keys[i];
844
+ if (key !== "children" && key !== "key") {
845
+ setCurrentlyValidatingElement$1(fragment);
846
+ error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
847
+ setCurrentlyValidatingElement$1(null);
848
+ break;
849
+ }
850
+ }
851
+ if (fragment.ref !== null) {
852
+ setCurrentlyValidatingElement$1(fragment);
853
+ error("Invalid attribute `ref` supplied to `React.Fragment`.");
854
+ setCurrentlyValidatingElement$1(null);
855
+ }
856
+ }
857
+ }
858
+ function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
859
+ {
860
+ var validType = isValidElementType(type);
861
+ if (!validType) {
862
+ var info = "";
863
+ if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
864
+ info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
865
+ }
866
+ var sourceInfo = getSourceInfoErrorAddendum(source);
867
+ if (sourceInfo) {
868
+ info += sourceInfo;
869
+ } else {
870
+ info += getDeclarationErrorAddendum();
871
+ }
872
+ var typeString;
873
+ if (type === null) {
874
+ typeString = "null";
875
+ } else if (Array.isArray(type)) {
876
+ typeString = "array";
877
+ } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
878
+ typeString = "<" + (getComponentName(type.type) || "Unknown") + " />";
879
+ info = " Did you accidentally export a JSX literal instead of a component?";
880
+ } else {
881
+ typeString = typeof type;
882
+ }
883
+ error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
884
+ }
885
+ var element = jsxDEV(type, props, key, source, self);
886
+ if (element == null) {
887
+ return element;
888
+ }
889
+ if (validType) {
890
+ var children = props.children;
891
+ if (children !== void 0) {
892
+ if (isStaticChildren) {
893
+ if (Array.isArray(children)) {
894
+ for (var i = 0; i < children.length; i++) {
895
+ validateChildKeys(children[i], type);
896
+ }
897
+ if (Object.freeze) {
898
+ Object.freeze(children);
899
+ }
900
+ } else {
901
+ error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
902
+ }
903
+ } else {
904
+ validateChildKeys(children, type);
905
+ }
906
+ }
907
+ }
908
+ if (type === exports2.Fragment) {
909
+ validateFragmentProps(element);
910
+ } else {
911
+ validatePropTypes(element);
912
+ }
913
+ return element;
914
+ }
915
+ }
916
+ function jsxWithValidationStatic(type, props, key) {
917
+ {
918
+ return jsxWithValidation(type, props, key, true);
919
+ }
920
+ }
921
+ function jsxWithValidationDynamic(type, props, key) {
922
+ {
923
+ return jsxWithValidation(type, props, key, false);
924
+ }
925
+ }
926
+ var jsx = jsxWithValidationDynamic;
927
+ var jsxs = jsxWithValidationStatic;
928
+ exports2.jsx = jsx;
929
+ exports2.jsxs = jsxs;
930
+ })();
931
+ }
932
+ })(reactJsxRuntime_development);
933
+ return reactJsxRuntime_development;
934
+ }
935
+ if (process.env.NODE_ENV === "production") {
936
+ jsxRuntime.exports = requireReactJsxRuntime_production_min();
937
+ } else {
938
+ jsxRuntime.exports = requireReactJsxRuntime_development();
939
+ }
940
+ var jsxRuntimeExports = jsxRuntime.exports;
941
+ var cx = function cx2() {
942
+ const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
943
+ const atomicClasses = {};
944
+ const nonAtomicClasses = [];
945
+ presentClassNames.forEach((arg) => {
946
+ const individualClassNames = arg ? arg.split(" ") : [];
947
+ individualClassNames.forEach((className) => {
948
+ if (className.startsWith("atm_")) {
949
+ const [, keyHash] = className.split("_");
950
+ atomicClasses[keyHash] = className;
951
+ } else {
952
+ nonAtomicClasses.push(className);
953
+ }
954
+ });
955
+ });
956
+ const result = [];
957
+ for (const keyHash in atomicClasses) {
958
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
959
+ result.push(atomicClasses[keyHash]);
960
+ }
961
+ }
962
+ result.push(...nonAtomicClasses);
963
+ return result.join(" ");
964
+ };
965
+ var cx_default = cx;
966
+ var SocketStatus = /* @__PURE__ */ ((SocketStatus2) => {
967
+ SocketStatus2["Opening"] = "Opening";
968
+ SocketStatus2["Open"] = "Open";
969
+ SocketStatus2["Disconnected"] = "Disconnected";
970
+ return SocketStatus2;
971
+ })(SocketStatus || {});
972
+ exports.I18nContext = I18nContext;
973
+ exports.SocketStatus = SocketStatus;
974
+ exports.cx_default = cx_default;
975
+ exports.getDefaults = getDefaults;
976
+ exports.getI18n = getI18n;
977
+ exports.jsxRuntimeExports = jsxRuntimeExports;
978
+ exports.setDefaults = setDefaults;
979
+ exports.setI18n = setI18n;
980
+ exports.useTranslation = useTranslation;
981
+ exports.warn = warn;
982
+ exports.warnOnce = warnOnce;