@vc-shell/framework 2.0.0-alpha.30 → 2.0.0-alpha.32

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 (212) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/ai-agent/index.js +2 -2
  3. package/dist/chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-CL6FKSZv.js +4255 -0
  4. package/dist/chunks/VcTableAdapter.vue_vue_type_style_index_0_lang-CLNfbXjd.js +21113 -0
  5. package/dist/chunks/{index-BZeKYd8J.js → index-D2HGw9DC.js} +5 -7
  6. package/dist/chunks/{vendor-lodash-es-BwHYzZ39.js → vendor-lodash-es-BB-IQCna.js} +4 -4
  7. package/dist/chunks/vendor-sortablejs-Bsvu-FKn.js +1276 -0
  8. package/dist/chunks/{vendor-swiper-1bp0oJwt.js → vendor-swiper-D1fVhFeH.js} +1150 -810
  9. package/dist/chunks/{vendor-vueuse-components-C3DWJalC.js → vendor-vueuse-components-DRdTsx6e.js} +1 -1
  10. package/dist/chunks/vendor-vueuse-core-D4-2M4AW.js +586 -0
  11. package/dist/chunks/{vendor-vueuse-shared-Byno6iDO.js → vendor-vueuse-shared-PQ04AyOW.js} +3 -3
  12. package/dist/core/blade-navigation/singletons.d.ts +21 -0
  13. package/dist/core/blade-navigation/singletons.d.ts.map +1 -0
  14. package/dist/core/blade-navigation/types/index.d.ts +27 -64
  15. package/dist/core/blade-navigation/types/index.d.ts.map +1 -1
  16. package/dist/core/composables/{useBladeContext.d.ts → bladeContext/index.d.ts} +1 -1
  17. package/dist/core/composables/bladeContext/index.d.ts.map +1 -0
  18. package/dist/core/composables/index.d.ts +1 -1
  19. package/dist/core/composables/index.d.ts.map +1 -1
  20. package/dist/core/composables/useBladeForm/index.d.ts +17 -0
  21. package/dist/core/composables/useBladeForm/index.d.ts.map +1 -0
  22. package/dist/core/composables/useBladeForm/types.d.ts +39 -0
  23. package/dist/core/composables/useBladeForm/types.d.ts.map +1 -0
  24. package/dist/core/composables/{useBladeWidgets.d.ts → useBladeWidgets/index.d.ts} +3 -3
  25. package/dist/core/composables/useBladeWidgets/index.d.ts.map +1 -0
  26. package/dist/core/composables/useBreadcrumbs/index.d.ts +1 -1
  27. package/dist/core/composables/useBreadcrumbs/index.d.ts.map +1 -1
  28. package/dist/core/composables/useDynamicProperties/index.d.ts +3 -69
  29. package/dist/core/composables/useDynamicProperties/index.d.ts.map +1 -1
  30. package/dist/core/composables/useDynamicProperties/strategies/boolean.d.ts +3 -0
  31. package/dist/core/composables/useDynamicProperties/strategies/boolean.d.ts.map +1 -0
  32. package/dist/core/composables/useDynamicProperties/strategies/color.d.ts +3 -0
  33. package/dist/core/composables/useDynamicProperties/strategies/color.d.ts.map +1 -0
  34. package/dist/core/composables/useDynamicProperties/strategies/dictionary.d.ts +3 -0
  35. package/dist/core/composables/useDynamicProperties/strategies/dictionary.d.ts.map +1 -0
  36. package/dist/core/composables/useDynamicProperties/strategies/index.d.ts +4 -0
  37. package/dist/core/composables/useDynamicProperties/strategies/index.d.ts.map +1 -0
  38. package/dist/core/composables/useDynamicProperties/strategies/measure.d.ts +3 -0
  39. package/dist/core/composables/useDynamicProperties/strategies/measure.d.ts.map +1 -0
  40. package/dist/core/composables/useDynamicProperties/strategies/regular.d.ts +3 -0
  41. package/dist/core/composables/useDynamicProperties/strategies/regular.d.ts.map +1 -0
  42. package/dist/core/composables/useDynamicProperties/strategies/types.d.ts +16 -0
  43. package/dist/core/composables/useDynamicProperties/strategies/types.d.ts.map +1 -0
  44. package/dist/core/composables/useDynamicProperties/types.d.ts +70 -0
  45. package/dist/core/composables/useDynamicProperties/types.d.ts.map +1 -0
  46. package/dist/core/composables/useDynamicProperties/utils.d.ts +10 -0
  47. package/dist/core/composables/useDynamicProperties/utils.d.ts.map +1 -0
  48. package/dist/core/composables/useExternalProvider/index.d.ts +12 -0
  49. package/dist/core/composables/useExternalProvider/index.d.ts.map +1 -0
  50. package/dist/core/composables/{useMenuExpanded.d.ts → useMenuExpanded/index.d.ts} +1 -1
  51. package/dist/core/composables/useMenuExpanded/index.d.ts.map +1 -0
  52. package/dist/core/composables/usePopup/index.d.ts +3 -5
  53. package/dist/core/composables/usePopup/index.d.ts.map +1 -1
  54. package/dist/core/composables/usePopup/keys.d.ts +4 -0
  55. package/dist/core/composables/usePopup/keys.d.ts.map +1 -0
  56. package/dist/core/composables/usePopup/preset-registry.d.ts +7 -0
  57. package/dist/core/composables/usePopup/preset-registry.d.ts.map +1 -0
  58. package/dist/core/composables/usePopup/singleton.d.ts +6 -0
  59. package/dist/core/composables/usePopup/singleton.d.ts.map +1 -0
  60. package/dist/core/composables/usePopup/types.d.ts +22 -0
  61. package/dist/core/composables/usePopup/types.d.ts.map +1 -0
  62. package/dist/core/composables/useTheme/index.d.ts.map +1 -1
  63. package/dist/core/notifications/notification.d.ts +19 -0
  64. package/dist/core/notifications/notification.d.ts.map +1 -1
  65. package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentHeader.vue.d.ts.map +1 -1
  66. package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentIframe.vue.d.ts.map +1 -1
  67. package/dist/core/types/breadcrumbs.d.ts +8 -0
  68. package/dist/core/types/breadcrumbs.d.ts.map +1 -0
  69. package/dist/core/types/index.d.ts +2 -14
  70. package/dist/core/types/index.d.ts.map +1 -1
  71. package/dist/core/utilities/assets.d.ts +3 -2
  72. package/dist/core/utilities/assets.d.ts.map +1 -1
  73. package/dist/core/utilities/index.d.ts +1 -0
  74. package/dist/core/utilities/index.d.ts.map +1 -1
  75. package/dist/core/utilities/thumbnail/index.d.ts +42 -0
  76. package/dist/core/utilities/thumbnail/index.d.ts.map +1 -0
  77. package/dist/framework.js +3618 -2531
  78. package/dist/index.css +1 -1
  79. package/dist/index.d.ts +1 -2
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/injection-keys.d.ts +2 -6
  82. package/dist/injection-keys.d.ts.map +1 -1
  83. package/dist/locales/de.js +8 -2
  84. package/dist/locales/en.js +8 -2
  85. package/dist/locales/en.json +8 -2
  86. package/dist/locales/types.d.ts +6 -0
  87. package/dist/modules/assets/components/assets-details/assets-details.vue.d.ts.map +1 -1
  88. package/dist/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
  89. package/dist/shell/_internal/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts.map +1 -1
  90. package/dist/shell/_internal/blade-navigation/plugin-v2.d.ts +1 -12
  91. package/dist/shell/_internal/blade-navigation/plugin-v2.d.ts.map +1 -1
  92. package/dist/shell/_internal/notifications/components/notification-container/index.d.ts +4 -4
  93. package/dist/shell/_internal/notifications/components/notification-container/index.d.ts.map +1 -1
  94. package/dist/shell/_internal/notifications/register-backend.d.ts +6 -0
  95. package/dist/shell/_internal/notifications/register-backend.d.ts.map +1 -0
  96. package/dist/shell/_internal/popup/keys.d.ts +1 -3
  97. package/dist/shell/_internal/popup/keys.d.ts.map +1 -1
  98. package/dist/shell/_internal/popup/plugin.d.ts +1 -2
  99. package/dist/shell/_internal/popup/plugin.d.ts.map +1 -1
  100. package/dist/shell/_internal/popup/register-presets.d.ts +6 -0
  101. package/dist/shell/_internal/popup/register-presets.d.ts.map +1 -0
  102. package/dist/shell/_internal/popup/types/index.d.ts +1 -21
  103. package/dist/shell/_internal/popup/types/index.d.ts.map +1 -1
  104. package/dist/shell/auth/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts.map +1 -0
  105. package/dist/shell/auth/ChangePasswordPage/components/change-password/index.d.ts +3 -0
  106. package/dist/shell/auth/ChangePasswordPage/components/change-password/index.d.ts.map +1 -0
  107. package/dist/shell/auth/ChangePasswordPage/components/index.d.ts +2 -0
  108. package/dist/shell/auth/ChangePasswordPage/components/index.d.ts.map +1 -0
  109. package/dist/shell/auth/ChangePasswordPage/index.d.ts +2 -0
  110. package/dist/shell/auth/ChangePasswordPage/index.d.ts.map +1 -0
  111. package/dist/shell/auth/index.d.ts +1 -0
  112. package/dist/shell/auth/index.d.ts.map +1 -1
  113. package/dist/shell/auth/sign-in/useExternalProvider.d.ts +2 -11
  114. package/dist/shell/auth/sign-in/useExternalProvider.d.ts.map +1 -1
  115. package/dist/tsconfig.tsbuildinfo +1 -1
  116. package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts +3 -0
  117. package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts.map +1 -1
  118. package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts.map +1 -1
  119. package/dist/ui/components/molecules/vc-color-input/vc-color-input.vue.d.ts +2 -2
  120. package/dist/ui/components/molecules/vc-date-picker/vc-date-picker.vue.d.ts +2 -2
  121. package/dist/ui/components/molecules/vc-dropdown/vc-dropdown.vue.d.ts +1 -1
  122. package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
  123. package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts +2 -21
  124. package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts.map +1 -1
  125. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
  126. package/dist/ui/components/molecules/vc-image-tile/vc-image-tile.vue.d.ts +3 -0
  127. package/dist/ui/components/molecules/vc-image-tile/vc-image-tile.vue.d.ts.map +1 -1
  128. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +2 -2
  129. package/dist/ui/components/molecules/vc-multivalue/_internal/MultivalueTrigger.vue.d.ts +2 -2
  130. package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +3 -3
  131. package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
  132. package/dist/ui/components/organisms/vc-app/composables/useShellBootstrap.d.ts.map +1 -1
  133. package/dist/ui/components/organisms/vc-blade/_internal/BladeHeader.vue.d.ts.map +1 -1
  134. package/dist/ui/components/organisms/vc-blade/_internal/BladeStatusBanners.vue.d.ts.map +1 -1
  135. package/dist/ui/components/organisms/vc-blade/_internal/BladeToolbarSkeleton.vue.d.ts.map +1 -1
  136. package/dist/ui/components/organisms/vc-blade/_internal/widgets/WidgetContainerDesktop.vue.d.ts.map +1 -1
  137. package/dist/ui/components/organisms/vc-blade/_internal/widgets/WidgetContainerMobile.vue.d.ts.map +1 -1
  138. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
  139. package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts.map +1 -1
  140. package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts +7 -7
  141. package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
  142. package/dist/ui/components/organisms/vc-data-table/components/DataTableCellRenderer.vue.d.ts.map +1 -1
  143. package/dist/ui/components/organisms/vc-data-table/components/TableCheckbox.vue.d.ts +2 -2
  144. package/dist/ui/components/organisms/vc-data-table/components/TableColumnSwitcher.vue.d.ts +2 -0
  145. package/dist/ui/components/organisms/vc-data-table/components/TableColumnSwitcher.vue.d.ts.map +1 -1
  146. package/dist/ui/components/organisms/vc-data-table/components/VcColumn.vue.d.ts +1 -1
  147. package/dist/ui/components/organisms/vc-data-table/components/_internal/TableSkeletonRows.vue.d.ts.map +1 -1
  148. package/dist/ui/components/organisms/vc-data-table/components/cells/CellDefault.vue.d.ts +7 -7
  149. package/dist/ui/components/organisms/vc-data-table/components/cells/CellDefault.vue.d.ts.map +1 -1
  150. package/dist/ui/components/organisms/vc-data-table/components/cells/CellImage.vue.d.ts.map +1 -1
  151. package/dist/ui/components/organisms/vc-data-table/components/cells/CellMoney.vue.d.ts +7 -7
  152. package/dist/ui/components/organisms/vc-data-table/components/cells/CellMoney.vue.d.ts.map +1 -1
  153. package/dist/ui/components/organisms/vc-data-table/components/cells/CellNumber.vue.d.ts +7 -7
  154. package/dist/ui/components/organisms/vc-data-table/components/cells/CellNumber.vue.d.ts.map +1 -1
  155. package/dist/ui/components/organisms/vc-data-table/components/cells/DynamicCellRenderer.vue.d.ts +7 -7
  156. package/dist/ui/components/organisms/vc-data-table/components/cells/DynamicCellRenderer.vue.d.ts.map +1 -1
  157. package/dist/ui/components/organisms/vc-data-table/components/mobile/MobileActionSheet.vue.d.ts +2 -2
  158. package/dist/ui/components/organisms/vc-data-table/components/mobile/MobileCellRenderer.vue.d.ts +4 -4
  159. package/dist/ui/components/organisms/vc-data-table/components/mobile/MobileCellRenderer.vue.d.ts.map +1 -1
  160. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableOrchestrator.d.ts +1 -0
  161. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableOrchestrator.d.ts.map +1 -1
  162. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableState.d.ts +1 -0
  163. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableState.d.ts.map +1 -1
  164. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumns.d.ts.map +1 -1
  165. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsResize.d.ts +12 -2
  166. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsResize.d.ts.map +1 -1
  167. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-filmstrip/vc-gallery-filmstrip.vue.d.ts +39 -0
  168. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-filmstrip/vc-gallery-filmstrip.vue.d.ts.map +1 -0
  169. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +2 -0
  170. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts.map +1 -1
  171. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +1 -0
  172. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
  173. package/dist/ui/components/organisms/vc-gallery/composables/index.d.ts +1 -0
  174. package/dist/ui/components/organisms/vc-gallery/composables/index.d.ts.map +1 -1
  175. package/dist/ui/components/organisms/vc-gallery/composables/useGalleryFilmstrip.d.ts +16 -0
  176. package/dist/ui/components/organisms/vc-gallery/composables/useGalleryFilmstrip.d.ts.map +1 -0
  177. package/dist/ui/components/organisms/vc-gallery/composables/useGalleryReorder.d.ts +4 -9
  178. package/dist/ui/components/organisms/vc-gallery/composables/useGalleryReorder.d.ts.map +1 -1
  179. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +20 -5
  180. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
  181. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +3 -3
  182. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
  183. package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts +3 -3
  184. package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts.map +1 -1
  185. package/dist/ui/index.js +136 -138
  186. package/dist/ui/types/index.d.ts +1 -7
  187. package/dist/ui/types/index.d.ts.map +1 -1
  188. package/dist/ui/utilities/index.d.ts +1 -1
  189. package/dist/ui/utilities/index.d.ts.map +1 -1
  190. package/package.json +6 -4
  191. package/dist/chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-D3sixNg-.js +0 -6553
  192. package/dist/chunks/VcTableAdapter.vue_vue_type_style_index_0_lang-CR4ei-0r.js +0 -19264
  193. package/dist/chunks/index-BzpX90RF.js +0 -181
  194. package/dist/chunks/vc-toast.vue_vue_type_style_index_0_lang-DsKZR5xz.js +0 -175
  195. package/dist/chunks/vendor-vueuse-core-CPOkeLul.js +0 -530
  196. package/dist/core/composables/useBladeContext.d.ts.map +0 -1
  197. package/dist/core/composables/useBladeWidgets.d.ts.map +0 -1
  198. package/dist/core/composables/useGlobalSearch/index.d.ts +0 -5
  199. package/dist/core/composables/useGlobalSearch/index.d.ts.map +0 -1
  200. package/dist/core/composables/useMenuExpanded.d.ts.map +0 -1
  201. package/dist/shell/pages/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts.map +0 -1
  202. package/dist/shell/pages/ChangePasswordPage/components/change-password/index.d.ts +0 -3
  203. package/dist/shell/pages/ChangePasswordPage/components/change-password/index.d.ts.map +0 -1
  204. package/dist/shell/pages/ChangePasswordPage/components/index.d.ts +0 -2
  205. package/dist/shell/pages/ChangePasswordPage/components/index.d.ts.map +0 -1
  206. package/dist/shell/pages/ChangePasswordPage/index.d.ts +0 -2
  207. package/dist/shell/pages/ChangePasswordPage/index.d.ts.map +0 -1
  208. package/dist/shell/pages/index.d.ts +0 -2
  209. package/dist/shell/pages/index.d.ts.map +0 -1
  210. package/dist/ui/utilities/vueUtils.d.ts +0 -34
  211. package/dist/ui/utilities/vueUtils.d.ts.map +0 -1
  212. /package/dist/shell/{pages → auth}/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts +0 -0
@@ -0,0 +1,4255 @@
1
+ import { ref as D, computed as A, getCurrentInstance as V, inject as z, watch as W, isRef as Re, provide as xe, shallowRef as Be, defineComponent as Q, openBlock as $, createElementBlock as F, createElementVNode as I, createCommentVNode as Y, createStaticVNode as je, resolveComponent as be, createVNode as J, toDisplayString as Ee, Transition as _e, withCtx as Ce, createBlock as Ue, normalizeClass as Ae, onUnmounted as Ne, normalizeStyle as ke } from "vue";
2
+ import { c as ee } from "./vendor-lodash-es-BB-IQCna.js";
3
+ import { u as $e } from "./vendor-vueuse-core-D4-2M4AW.js";
4
+ import { j as Fe } from "./vendor-vueuse-shared-PQ04AyOW.js";
5
+ const ce = {
6
+ debug: 0,
7
+ info: 1,
8
+ warn: 2,
9
+ error: 3,
10
+ none: 4
11
+ }, Ge = {
12
+ level: "warn",
13
+ prefix: "@vc-shell/framework",
14
+ enabled: !0
15
+ };
16
+ function k(s) {
17
+ const t = { ...Ge }, e = s ? `[${t.prefix}#${s}]` : `[${t.prefix}]`, n = (r) => t.enabled ? ce[r] >= ce[t.level] : !1;
18
+ return {
19
+ /**
20
+ * Log debug messages (only in development)
21
+ */
22
+ debug: (...r) => {
23
+ n("debug") && console.debug(e, ...r);
24
+ },
25
+ /**
26
+ * Log info messages
27
+ */
28
+ info: (...r) => {
29
+ n("info") && console.info(e, ...r);
30
+ },
31
+ /**
32
+ * Log warning messages
33
+ */
34
+ warn: (...r) => {
35
+ n("warn") && console.warn(e, ...r);
36
+ },
37
+ /**
38
+ * Log error messages
39
+ */
40
+ error: (...r) => {
41
+ n("error") && console.error(e, ...r);
42
+ },
43
+ /**
44
+ * Create a child logger with additional context
45
+ */
46
+ child: (r) => k(s ? `${s}:${r}` : r),
47
+ /**
48
+ * Set the log level for this logger instance
49
+ */
50
+ setLevel: (r) => {
51
+ t.level = r;
52
+ },
53
+ /**
54
+ * Enable or disable logging
55
+ */
56
+ setEnabled: (r) => {
57
+ t.enabled = r;
58
+ }
59
+ };
60
+ }
61
+ const lr = k(), ur = {
62
+ core: k("core"),
63
+ ui: k("ui"),
64
+ shared: k("shared"),
65
+ plugins: k("plugins"),
66
+ services: k("services"),
67
+ composables: k("composables")
68
+ };
69
+ class M extends Error {
70
+ constructor(t, e, n) {
71
+ super(t), this.code = e, this.context = n, this.name = "FrameworkError", Error.captureStackTrace && Error.captureStackTrace(this, M);
72
+ }
73
+ toJSON() {
74
+ return {
75
+ name: this.name,
76
+ code: this.code,
77
+ message: this.message,
78
+ context: this.context,
79
+ stack: this.stack
80
+ };
81
+ }
82
+ }
83
+ class hr extends M {
84
+ constructor(t, e) {
85
+ super(t, "VALIDATION_ERROR", e), this.name = "ValidationError";
86
+ }
87
+ }
88
+ class cr extends M {
89
+ constructor(t, e) {
90
+ super(t, "SERVICE_ERROR", e), this.name = "ServiceError";
91
+ }
92
+ }
93
+ class De extends M {
94
+ constructor(t, e) {
95
+ super(`${t} not provided. Make sure to call the corresponding 'provide' function.`, "INJECTION_ERROR", {
96
+ serviceName: t,
97
+ ...e
98
+ }), this.name = "InjectionError";
99
+ }
100
+ }
101
+ class dr extends M {
102
+ constructor(t, e, n) {
103
+ super(`Failed to register '${t}': ${e}`, "REGISTRATION_ERROR", {
104
+ componentName: t,
105
+ ...n
106
+ }), this.name = "RegistrationError";
107
+ }
108
+ }
109
+ class fr extends M {
110
+ constructor(t, e, n) {
111
+ super(t, "BLADE_ERROR", {
112
+ bladeId: e,
113
+ ...n
114
+ }), this.name = "BladeError";
115
+ }
116
+ }
117
+ class pr extends M {
118
+ constructor(t, e, n) {
119
+ super(`Failed to load module '${t}': ${e}`, "MODULE_LOAD_ERROR", {
120
+ moduleId: t,
121
+ ...n
122
+ }), this.name = "ModuleLoadError";
123
+ }
124
+ }
125
+ function Le(s) {
126
+ return s instanceof M;
127
+ }
128
+ function mr(s, t = "UNKNOWN_ERROR") {
129
+ return Le(s) ? s : s instanceof Error ? new M(s.message, t, {
130
+ originalError: s.name,
131
+ stack: s.stack
132
+ }) : new M(String(s), t);
133
+ }
134
+ const Te = Symbol("BladeStack"), Me = Symbol("BladeMessaging"), ze = Symbol("BladeDescriptor"), vr = Symbol("BladeMaximized"), Je = Symbol("BladeData"), Ke = Symbol("BladeBanners"), gr = Symbol("BladeBackButton"), xr = Symbol("NotificationStore"), br = Symbol("WidgetService"), Er = Symbol("DashboardService"), _r = Symbol("MenuService"), Cr = Symbol("SettingsMenuService"), Ur = Symbol("AppBarWidgetService"), Ar = Symbol("AppBarMobileButtonsService"), qe = Symbol("LanguageService"), He = Symbol("ToolbarService"), Tr = Symbol("DynamicModules"), yr = Symbol("ModulesReady"), Sr = Symbol("ModulesLoadError"), wr = Symbol("AppRootElement"), We = Symbol("EmbeddedMode"), Pr = Symbol("ShellIndicators"), oe = Symbol("AiAgentService"), Or = Symbol("IsMobile"), Ir = Symbol("IsDesktop"), Rr = Symbol("IsPhone"), Br = Symbol("IsTablet"), jr = Symbol("IsTouch"), Nr = Symbol("BladeRoutes"), kr = Symbol("InternalRoutes"), $r = Symbol("CloseSettingsMenu"), Fr = Symbol("BladeContext"), Gr = Symbol("WidgetScope"), Dr = Symbol("BladeForm"), Ze = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;
135
+ function Xe(s, t) {
136
+ if (typeof t == "string" && Ze.test(t)) {
137
+ const e = new Date(t);
138
+ if (!isNaN(e.getTime()))
139
+ return e;
140
+ }
141
+ return t;
142
+ }
143
+ class G {
144
+ authToken = "";
145
+ /**
146
+ * JSON parse reviver for converting date strings to Date objects.
147
+ * Subclasses use this when parsing API responses.
148
+ * The dateReviver function is defined in File.Header.liquid template.
149
+ */
150
+ jsonParseReviver = Xe;
151
+ constructor() {
152
+ }
153
+ // Enforce always return empty string as baseUrl
154
+ getBaseUrl(t, e) {
155
+ return "";
156
+ }
157
+ setAuthToken(t) {
158
+ this.authToken = t;
159
+ }
160
+ transformOptions(t) {
161
+ return this.authToken && (t.headers.authorization = `Bearer ${this.authToken}`), Promise.resolve(t);
162
+ }
163
+ }
164
+ class Ye extends G {
165
+ http;
166
+ baseUrl;
167
+ constructor(t, e) {
168
+ super(), this.http = e || window, this.baseUrl = this.getBaseUrl("", t);
169
+ }
170
+ /**
171
+ * @param authenticationType (optional)
172
+ * @param returnUrl (optional)
173
+ * @param storeId (optional)
174
+ * @param oidcUrl (optional)
175
+ * @param callbackUrl (optional)
176
+ * @return OK
177
+ */
178
+ signIn(t, e, n, r, a) {
179
+ let o = this.baseUrl + "/externalsignin?";
180
+ if (t === null)
181
+ throw new globalThis.Error("The parameter 'authenticationType' cannot be null.");
182
+ if (t !== void 0 && (o += "AuthenticationType=" + encodeURIComponent("" + t) + "&"), e === null)
183
+ throw new globalThis.Error("The parameter 'returnUrl' cannot be null.");
184
+ if (e !== void 0 && (o += "ReturnUrl=" + encodeURIComponent("" + e) + "&"), n === null)
185
+ throw new globalThis.Error("The parameter 'storeId' cannot be null.");
186
+ if (n !== void 0 && (o += "StoreId=" + encodeURIComponent("" + n) + "&"), r === null)
187
+ throw new globalThis.Error("The parameter 'oidcUrl' cannot be null.");
188
+ if (r !== void 0 && (o += "OidcUrl=" + encodeURIComponent("" + r) + "&"), a === null)
189
+ throw new globalThis.Error("The parameter 'callbackUrl' cannot be null.");
190
+ a !== void 0 && (o += "CallbackUrl=" + encodeURIComponent("" + a) + "&"), o = o.replace(/[?&]$/, "");
191
+ let u = {
192
+ method: "GET",
193
+ headers: {}
194
+ };
195
+ return this.transformOptions(u).then((f) => this.http.fetch(o, f)).then((f) => this.processSignIn(f));
196
+ }
197
+ processSignIn(t) {
198
+ const e = t.status;
199
+ let n = {};
200
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
201
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
202
+ }
203
+ /**
204
+ * @param authenticationType (optional)
205
+ * @param returnUrl (optional)
206
+ * @return OK
207
+ */
208
+ signOut(t, e) {
209
+ let n = this.baseUrl + "/externalsignin/signout?";
210
+ if (t === null)
211
+ throw new globalThis.Error("The parameter 'authenticationType' cannot be null.");
212
+ if (t !== void 0 && (n += "authenticationType=" + encodeURIComponent("" + t) + "&"), e === null)
213
+ throw new globalThis.Error("The parameter 'returnUrl' cannot be null.");
214
+ e !== void 0 && (n += "returnUrl=" + encodeURIComponent("" + e) + "&"), n = n.replace(/[?&]$/, "");
215
+ let r = {
216
+ method: "GET",
217
+ headers: {}
218
+ };
219
+ return this.transformOptions(r).then((a) => this.http.fetch(n, a)).then((a) => this.processSignOut(a));
220
+ }
221
+ processSignOut(t) {
222
+ const e = t.status;
223
+ let n = {};
224
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
225
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
226
+ }
227
+ /**
228
+ * @param returnUrl (optional)
229
+ * @return OK
230
+ */
231
+ signInCallback(t) {
232
+ let e = this.baseUrl + "/externalsignin/callback?";
233
+ if (t === null)
234
+ throw new globalThis.Error("The parameter 'returnUrl' cannot be null.");
235
+ t !== void 0 && (e += "returnUrl=" + encodeURIComponent("" + t) + "&"), e = e.replace(/[?&]$/, "");
236
+ let n = {
237
+ method: "GET",
238
+ headers: {}
239
+ };
240
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processSignInCallback(r));
241
+ }
242
+ processSignInCallback(t) {
243
+ const e = t.status;
244
+ let n = {};
245
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
246
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
247
+ }
248
+ /**
249
+ * @return OK
250
+ */
251
+ getExternalLoginProviders() {
252
+ let t = this.baseUrl + "/externalsignin/providers";
253
+ t = t.replace(/[?&]$/, "");
254
+ let e = {
255
+ method: "GET",
256
+ headers: {
257
+ Accept: "application/json"
258
+ }
259
+ };
260
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processGetExternalLoginProviders(n));
261
+ }
262
+ processGetExternalLoginProviders(t) {
263
+ const e = t.status;
264
+ let n = {};
265
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
266
+ let a = null;
267
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
268
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
269
+ }
270
+ }
271
+ class Lr extends G {
272
+ http;
273
+ baseUrl;
274
+ constructor(t, e) {
275
+ super(), this.http = e || window, this.baseUrl = this.getBaseUrl("", t);
276
+ }
277
+ /**
278
+ * Gets the list of available apps, filtered by user permissions.
279
+ * @return OK
280
+ */
281
+ getApps() {
282
+ let t = this.baseUrl + "/api/platform/apps";
283
+ t = t.replace(/[?&]$/, "");
284
+ let e = {
285
+ method: "GET",
286
+ headers: {
287
+ Accept: "application/json"
288
+ }
289
+ };
290
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processGetApps(n));
291
+ }
292
+ processGetApps(t) {
293
+ const e = t.status;
294
+ let n = {};
295
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
296
+ let a = null;
297
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
298
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
299
+ }
300
+ }
301
+ class Mr extends G {
302
+ http;
303
+ baseUrl;
304
+ constructor(t, e) {
305
+ super(), this.http = e || window, this.baseUrl = this.getBaseUrl("", t);
306
+ }
307
+ /**
308
+ * @return OK
309
+ */
310
+ revokeCurrentUserToken() {
311
+ let t = this.baseUrl + "/revoke/token";
312
+ t = t.replace(/[?&]$/, "");
313
+ let e = {
314
+ method: "POST",
315
+ headers: {}
316
+ };
317
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processRevokeCurrentUserToken(n));
318
+ }
319
+ processRevokeCurrentUserToken(t) {
320
+ const e = t.status;
321
+ let n = {};
322
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
323
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
324
+ }
325
+ /**
326
+ * @return OK
327
+ */
328
+ exchange(t) {
329
+ let e = this.baseUrl + "/connect/token";
330
+ e = e.replace(/[?&]$/, "");
331
+ let r = {
332
+ body: Object.keys(t).map((a) => encodeURIComponent(a) + "=" + encodeURIComponent(t[a])).join("&"),
333
+ method: "POST",
334
+ headers: {
335
+ "Content-Type": "application/x-www-form-urlencoded",
336
+ Accept: "application/json"
337
+ }
338
+ };
339
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processExchange(a));
340
+ }
341
+ processExchange(t) {
342
+ const e = t.status;
343
+ let n = {};
344
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
345
+ let a = null;
346
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
347
+ }) : e === 400 ? t.text().then((r) => {
348
+ let a = null;
349
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), i("Bad Request", e, r, n, a);
350
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
351
+ }
352
+ /**
353
+ * @return OK
354
+ */
355
+ authorizeGET() {
356
+ let t = this.baseUrl + "/connect/authorize";
357
+ t = t.replace(/[?&]$/, "");
358
+ let e = {
359
+ method: "GET",
360
+ headers: {}
361
+ };
362
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processAuthorizeGET(n));
363
+ }
364
+ processAuthorizeGET(t) {
365
+ const e = t.status;
366
+ let n = {};
367
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
368
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
369
+ }
370
+ /**
371
+ * @return OK
372
+ */
373
+ authorizePOST() {
374
+ let t = this.baseUrl + "/connect/authorize";
375
+ t = t.replace(/[?&]$/, "");
376
+ let e = {
377
+ method: "POST",
378
+ headers: {}
379
+ };
380
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processAuthorizePOST(n));
381
+ }
382
+ processAuthorizePOST(t) {
383
+ const e = t.status;
384
+ let n = {};
385
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
386
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
387
+ }
388
+ /**
389
+ * @return OK
390
+ */
391
+ userinfoGET() {
392
+ let t = this.baseUrl + "/connect/userinfo";
393
+ t = t.replace(/[?&]$/, "");
394
+ let e = {
395
+ method: "GET",
396
+ headers: {}
397
+ };
398
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processUserinfoGET(n));
399
+ }
400
+ processUserinfoGET(t) {
401
+ const e = t.status;
402
+ let n = {};
403
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
404
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
405
+ }
406
+ /**
407
+ * @return OK
408
+ */
409
+ userinfoPOST() {
410
+ let t = this.baseUrl + "/connect/userinfo";
411
+ t = t.replace(/[?&]$/, "");
412
+ let e = {
413
+ method: "POST",
414
+ headers: {}
415
+ };
416
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processUserinfoPOST(n));
417
+ }
418
+ processUserinfoPOST(t) {
419
+ const e = t.status;
420
+ let n = {};
421
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
422
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
423
+ }
424
+ /**
425
+ * @return OK
426
+ */
427
+ logout() {
428
+ let t = this.baseUrl + "/connect/logout";
429
+ t = t.replace(/[?&]$/, "");
430
+ let e = {
431
+ method: "GET",
432
+ headers: {}
433
+ };
434
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processLogout(n));
435
+ }
436
+ processLogout(t) {
437
+ const e = t.status;
438
+ let n = {};
439
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
440
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
441
+ }
442
+ }
443
+ class zr extends G {
444
+ http;
445
+ baseUrl;
446
+ constructor(t, e) {
447
+ super(), this.http = e || window, this.baseUrl = this.getBaseUrl("", t);
448
+ }
449
+ /**
450
+ * Force set changes last modified date
451
+ * @param scope (optional)
452
+ * @return No Content
453
+ */
454
+ forceChanges(t) {
455
+ let e = this.baseUrl + "/api/changes/force?";
456
+ if (t === null)
457
+ throw new globalThis.Error("The parameter 'scope' cannot be null.");
458
+ t !== void 0 && (e += "Scope=" + encodeURIComponent("" + t) + "&"), e = e.replace(/[?&]$/, "");
459
+ let n = {
460
+ method: "POST",
461
+ headers: {}
462
+ };
463
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processForceChanges(r));
464
+ }
465
+ processForceChanges(t) {
466
+ const e = t.status;
467
+ let n = {};
468
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
469
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
470
+ }
471
+ /**
472
+ * @return No Content
473
+ */
474
+ resetPlatformCache() {
475
+ let t = this.baseUrl + "/api/platform-cache/reset";
476
+ t = t.replace(/[?&]$/, "");
477
+ let e = {
478
+ method: "POST",
479
+ headers: {}
480
+ };
481
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processResetPlatformCache(n));
482
+ }
483
+ processResetPlatformCache(t) {
484
+ const e = t.status;
485
+ let n = {};
486
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
487
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
488
+ }
489
+ /**
490
+ * Get last modified date for given scope
491
+ Used for signal of what something changed and for cache invalidation in external platform clients
492
+ * @param scope (optional)
493
+ * @return OK
494
+ */
495
+ getLastModifiedDate(t) {
496
+ let e = this.baseUrl + "/api/changes/lastmodifieddate?";
497
+ if (t === null)
498
+ throw new globalThis.Error("The parameter 'scope' cannot be null.");
499
+ t !== void 0 && (e += "scope=" + encodeURIComponent("" + t) + "&"), e = e.replace(/[?&]$/, "");
500
+ let n = {
501
+ method: "GET",
502
+ headers: {
503
+ Accept: "application/json"
504
+ }
505
+ };
506
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processGetLastModifiedDate(r));
507
+ }
508
+ processGetLastModifiedDate(t) {
509
+ const e = t.status;
510
+ let n = {};
511
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
512
+ let a = null;
513
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
514
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
515
+ }
516
+ /**
517
+ * @param body (optional)
518
+ * @return OK
519
+ */
520
+ getChangedEntities(t) {
521
+ let e = this.baseUrl + "/api/changes/changed-entities";
522
+ e = e.replace(/[?&]$/, "");
523
+ let r = {
524
+ body: JSON.stringify(t),
525
+ method: "POST",
526
+ headers: {
527
+ "Content-Type": "application/json-patch+json",
528
+ Accept: "application/json"
529
+ }
530
+ };
531
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processGetChangedEntities(a));
532
+ }
533
+ processGetChangedEntities(t) {
534
+ const e = t.status;
535
+ let n = {};
536
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
537
+ let a = null;
538
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
539
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
540
+ }
541
+ /**
542
+ * @param body (optional)
543
+ * @return No Content
544
+ */
545
+ resetChangedEntities(t) {
546
+ let e = this.baseUrl + "/api/changes/changed-entities/reset";
547
+ e = e.replace(/[?&]$/, "");
548
+ let r = {
549
+ body: JSON.stringify(t),
550
+ method: "POST",
551
+ headers: {
552
+ "Content-Type": "application/json-patch+json"
553
+ }
554
+ };
555
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processResetChangedEntities(a));
556
+ }
557
+ processResetChangedEntities(t) {
558
+ const e = t.status;
559
+ let n = {};
560
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
561
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
562
+ }
563
+ /**
564
+ * @param body (optional)
565
+ * @return OK
566
+ */
567
+ searchChanges(t) {
568
+ let e = this.baseUrl + "/api/platform/changelog/search";
569
+ e = e.replace(/[?&]$/, "");
570
+ let r = {
571
+ body: JSON.stringify(t),
572
+ method: "POST",
573
+ headers: {
574
+ "Content-Type": "application/json-patch+json",
575
+ Accept: "application/json"
576
+ }
577
+ };
578
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processSearchChanges(a));
579
+ }
580
+ processSearchChanges(t) {
581
+ const e = t.status;
582
+ let n = {};
583
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
584
+ let a = null;
585
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
586
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
587
+ }
588
+ /**
589
+ * @param start (optional)
590
+ * @param end (optional)
591
+ * @return OK
592
+ */
593
+ searchTypeChangeHistory(t, e, n) {
594
+ let r = this.baseUrl + "/api/platform/changelog/{type}/changes?";
595
+ if (t == null)
596
+ throw new globalThis.Error("The parameter 'type' must be defined.");
597
+ if (r = r.replace("{type}", encodeURIComponent("" + t)), e === null)
598
+ throw new globalThis.Error("The parameter 'start' cannot be null.");
599
+ if (e !== void 0 && (r += "start=" + encodeURIComponent(e ? "" + e.toISOString() : "") + "&"), n === null)
600
+ throw new globalThis.Error("The parameter 'end' cannot be null.");
601
+ n !== void 0 && (r += "end=" + encodeURIComponent(n ? "" + n.toISOString() : "") + "&"), r = r.replace(/[?&]$/, "");
602
+ let a = {
603
+ method: "GET",
604
+ headers: {
605
+ Accept: "application/json"
606
+ }
607
+ };
608
+ return this.transformOptions(a).then((o) => this.http.fetch(r, o)).then((o) => this.processSearchTypeChangeHistory(o));
609
+ }
610
+ processSearchTypeChangeHistory(t) {
611
+ const e = t.status;
612
+ let n = {};
613
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
614
+ let a = null;
615
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
616
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
617
+ }
618
+ }
619
+ class Jr extends G {
620
+ http;
621
+ baseUrl;
622
+ constructor(t, e) {
623
+ super(), this.http = e || window, this.baseUrl = this.getBaseUrl("", t);
624
+ }
625
+ /**
626
+ * @return OK
627
+ */
628
+ getDeveloperTools() {
629
+ let t = this.baseUrl + "/api/platform/developer-tools";
630
+ t = t.replace(/[?&]$/, "");
631
+ let e = {
632
+ method: "GET",
633
+ headers: {
634
+ Accept: "application/json"
635
+ }
636
+ };
637
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processGetDeveloperTools(n));
638
+ }
639
+ processGetDeveloperTools(t) {
640
+ const e = t.status;
641
+ let n = {};
642
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
643
+ let a = null;
644
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
645
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
646
+ }
647
+ }
648
+ class Kr extends G {
649
+ http;
650
+ baseUrl;
651
+ constructor(t, e) {
652
+ super(), this.http = e || window, this.baseUrl = this.getBaseUrl("", t);
653
+ }
654
+ /**
655
+ * @return OK
656
+ */
657
+ getSystemInfo() {
658
+ let t = this.baseUrl + "/api/platform/diagnostics/systeminfo";
659
+ t = t.replace(/[?&]$/, "");
660
+ let e = {
661
+ method: "GET",
662
+ headers: {
663
+ Accept: "application/json"
664
+ }
665
+ };
666
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processGetSystemInfo(n));
667
+ }
668
+ processGetSystemInfo(t) {
669
+ const e = t.status;
670
+ let n = {};
671
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
672
+ let a = null;
673
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
674
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
675
+ }
676
+ /**
677
+ * Get installed modules with errors
678
+ * @return OK
679
+ */
680
+ getModulesErrors() {
681
+ let t = this.baseUrl + "/api/platform/diagnostics/errors";
682
+ t = t.replace(/[?&]$/, "");
683
+ let e = {
684
+ method: "GET",
685
+ headers: {
686
+ Accept: "application/json"
687
+ }
688
+ };
689
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processGetModulesErrors(n));
690
+ }
691
+ processGetModulesErrors(t) {
692
+ const e = t.status;
693
+ let n = {};
694
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
695
+ let a = null;
696
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
697
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
698
+ }
699
+ }
700
+ class qr extends G {
701
+ http;
702
+ baseUrl;
703
+ constructor(t, e) {
704
+ super(), this.http = e || window, this.baseUrl = this.getBaseUrl("", t);
705
+ }
706
+ /**
707
+ * Get object types which support dynamic properties
708
+ * @return OK
709
+ */
710
+ getObjectTypes() {
711
+ let t = this.baseUrl + "/api/platform/dynamic/types";
712
+ t = t.replace(/[?&]$/, "");
713
+ let e = {
714
+ method: "GET",
715
+ headers: {
716
+ Accept: "application/json"
717
+ }
718
+ };
719
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processGetObjectTypes(n));
720
+ }
721
+ processGetObjectTypes(t) {
722
+ const e = t.status;
723
+ let n = {};
724
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
725
+ let a = null;
726
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
727
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
728
+ }
729
+ /**
730
+ * @param id (optional)
731
+ * @return OK
732
+ */
733
+ getAllDynamicProperties(t) {
734
+ let e = this.baseUrl + "/api/platform/dynamic/properties?";
735
+ if (t === null)
736
+ throw new globalThis.Error("The parameter 'id' cannot be null.");
737
+ t !== void 0 && (e += "id=" + encodeURIComponent("" + t) + "&"), e = e.replace(/[?&]$/, "");
738
+ let n = {
739
+ method: "GET",
740
+ headers: {
741
+ Accept: "application/json"
742
+ }
743
+ };
744
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processGetAllDynamicProperties(r));
745
+ }
746
+ processGetAllDynamicProperties(t) {
747
+ const e = t.status;
748
+ let n = {};
749
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
750
+ let a = null;
751
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
752
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
753
+ }
754
+ /**
755
+ * Add new dynamic property
756
+ * @param body (optional)
757
+ * @return OK
758
+ */
759
+ createProperty(t) {
760
+ let e = this.baseUrl + "/api/platform/dynamic/properties";
761
+ e = e.replace(/[?&]$/, "");
762
+ let r = {
763
+ body: JSON.stringify(t),
764
+ method: "POST",
765
+ headers: {
766
+ "Content-Type": "application/json-patch+json",
767
+ Accept: "application/json"
768
+ }
769
+ };
770
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processCreateProperty(a));
771
+ }
772
+ processCreateProperty(t) {
773
+ const e = t.status;
774
+ let n = {};
775
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
776
+ let a = null;
777
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
778
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
779
+ }
780
+ /**
781
+ * Update existing dynamic property
782
+ * @param body (optional)
783
+ * @return No Content
784
+ */
785
+ updateProperty(t) {
786
+ let e = this.baseUrl + "/api/platform/dynamic/properties";
787
+ e = e.replace(/[?&]$/, "");
788
+ let r = {
789
+ body: JSON.stringify(t),
790
+ method: "PUT",
791
+ headers: {
792
+ "Content-Type": "application/json-patch+json"
793
+ }
794
+ };
795
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processUpdateProperty(a));
796
+ }
797
+ processUpdateProperty(t) {
798
+ const e = t.status;
799
+ let n = {};
800
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
801
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
802
+ }
803
+ /**
804
+ * Delete dynamic property
805
+ * @param propertyIds (optional)
806
+ * @return No Content
807
+ */
808
+ deleteProperty(t) {
809
+ let e = this.baseUrl + "/api/platform/dynamic/properties?";
810
+ if (t === null)
811
+ throw new globalThis.Error("The parameter 'propertyIds' cannot be null.");
812
+ t !== void 0 && t && t.forEach((r) => {
813
+ e += "propertyIds=" + encodeURIComponent("" + r) + "&";
814
+ }), e = e.replace(/[?&]$/, "");
815
+ let n = {
816
+ method: "DELETE",
817
+ headers: {}
818
+ };
819
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processDeleteProperty(r));
820
+ }
821
+ processDeleteProperty(t) {
822
+ const e = t.status;
823
+ let n = {};
824
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
825
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
826
+ }
827
+ /**
828
+ * Get dynamic properties registered for object type
829
+ * @param body (optional)
830
+ * @return OK
831
+ */
832
+ searchDynamicProperties(t) {
833
+ let e = this.baseUrl + "/api/platform/dynamic/properties/search";
834
+ e = e.replace(/[?&]$/, "");
835
+ let r = {
836
+ body: JSON.stringify(t),
837
+ method: "POST",
838
+ headers: {
839
+ "Content-Type": "application/json-patch+json",
840
+ Accept: "application/json"
841
+ }
842
+ };
843
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processSearchDynamicProperties(a));
844
+ }
845
+ processSearchDynamicProperties(t) {
846
+ const e = t.status;
847
+ let n = {};
848
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
849
+ let a = null;
850
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
851
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
852
+ }
853
+ /**
854
+ * Does nothing. Just a way to expose DynamicObjectProperty thru Swagger.
855
+ * @return OK
856
+ */
857
+ exposeDynamicObjectProperty() {
858
+ let t = this.baseUrl + "/api/platform/dynamic";
859
+ t = t.replace(/[?&]$/, "");
860
+ let e = {
861
+ method: "POST",
862
+ headers: {
863
+ Accept: "application/json"
864
+ }
865
+ };
866
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processExposeDynamicObjectProperty(n));
867
+ }
868
+ processExposeDynamicObjectProperty(t) {
869
+ const e = t.status;
870
+ let n = {};
871
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
872
+ let a = null;
873
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
874
+ }) : e === 204 ? t.text().then((r) => i("No Content", e, r, n)) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
875
+ }
876
+ /**
877
+ * @param propertyId (optional)
878
+ * @return OK
879
+ */
880
+ getAllDictionaryItems(t) {
881
+ let e = this.baseUrl + "/api/platform/dynamic/dictionaryitems?";
882
+ if (t === null)
883
+ throw new globalThis.Error("The parameter 'propertyId' cannot be null.");
884
+ t !== void 0 && (e += "propertyId=" + encodeURIComponent("" + t) + "&"), e = e.replace(/[?&]$/, "");
885
+ let n = {
886
+ method: "GET",
887
+ headers: {
888
+ Accept: "application/json"
889
+ }
890
+ };
891
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processGetAllDictionaryItems(r));
892
+ }
893
+ processGetAllDictionaryItems(t) {
894
+ const e = t.status;
895
+ let n = {};
896
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
897
+ let a = null;
898
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
899
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
900
+ }
901
+ /**
902
+ * Add or update dictionary items
903
+ * @param body (optional)
904
+ * @return No Content
905
+ */
906
+ saveDictionaryItems(t) {
907
+ let e = this.baseUrl + "/api/platform/dynamic/dictionaryitems";
908
+ e = e.replace(/[?&]$/, "");
909
+ let r = {
910
+ body: JSON.stringify(t),
911
+ method: "POST",
912
+ headers: {
913
+ "Content-Type": "application/json-patch+json"
914
+ }
915
+ };
916
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processSaveDictionaryItems(a));
917
+ }
918
+ processSaveDictionaryItems(t) {
919
+ const e = t.status;
920
+ let n = {};
921
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
922
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
923
+ }
924
+ /**
925
+ * Delete dictionary items
926
+ * @param ids (optional) IDs of dictionary items to delete.
927
+ * @return No Content
928
+ */
929
+ deleteDictionaryItem(t) {
930
+ let e = this.baseUrl + "/api/platform/dynamic/dictionaryitems?";
931
+ if (t === null)
932
+ throw new globalThis.Error("The parameter 'ids' cannot be null.");
933
+ t !== void 0 && t && t.forEach((r) => {
934
+ e += "ids=" + encodeURIComponent("" + r) + "&";
935
+ }), e = e.replace(/[?&]$/, "");
936
+ let n = {
937
+ method: "DELETE",
938
+ headers: {}
939
+ };
940
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processDeleteDictionaryItem(r));
941
+ }
942
+ processDeleteDictionaryItem(t) {
943
+ const e = t.status;
944
+ let n = {};
945
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
946
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
947
+ }
948
+ /**
949
+ * Get dictionary items
950
+ * @param body (optional)
951
+ * @return OK
952
+ */
953
+ searchDictionaryItems(t) {
954
+ let e = this.baseUrl + "/api/platform/dynamic/dictionaryitems/search";
955
+ e = e.replace(/[?&]$/, "");
956
+ let r = {
957
+ body: JSON.stringify(t),
958
+ method: "POST",
959
+ headers: {
960
+ "Content-Type": "application/json-patch+json",
961
+ Accept: "application/json"
962
+ }
963
+ };
964
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processSearchDictionaryItems(a));
965
+ }
966
+ processSearchDictionaryItems(t) {
967
+ const e = t.status;
968
+ let n = {};
969
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
970
+ let a = null;
971
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
972
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
973
+ }
974
+ }
975
+ class Hr extends G {
976
+ http;
977
+ baseUrl;
978
+ constructor(t, e) {
979
+ super(), this.http = e || window, this.baseUrl = this.getBaseUrl("", t);
980
+ }
981
+ /**
982
+ * Get background job status
983
+ * @param id Job ID.
984
+ * @return OK
985
+ */
986
+ getStatus(t) {
987
+ let e = this.baseUrl + "/api/platform/jobs/{id}";
988
+ if (t == null)
989
+ throw new globalThis.Error("The parameter 'id' must be defined.");
990
+ e = e.replace("{id}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
991
+ let n = {
992
+ method: "GET",
993
+ headers: {
994
+ Accept: "application/json"
995
+ }
996
+ };
997
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processGetStatus(r));
998
+ }
999
+ processGetStatus(t) {
1000
+ const e = t.status;
1001
+ let n = {};
1002
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1003
+ let a = null;
1004
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1005
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1006
+ }
1007
+ }
1008
+ class Wr extends G {
1009
+ http;
1010
+ baseUrl;
1011
+ constructor(t, e) {
1012
+ super(), this.http = e || window, this.baseUrl = this.getBaseUrl("", t);
1013
+ }
1014
+ /**
1015
+ * @return OK
1016
+ */
1017
+ getSettingsAndLanguages() {
1018
+ let t = this.baseUrl + "/api/platform/localizable-settings";
1019
+ t = t.replace(/[?&]$/, "");
1020
+ let e = {
1021
+ method: "GET",
1022
+ headers: {
1023
+ Accept: "application/json"
1024
+ }
1025
+ };
1026
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processGetSettingsAndLanguages(n));
1027
+ }
1028
+ processGetSettingsAndLanguages(t) {
1029
+ const e = t.status;
1030
+ let n = {};
1031
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1032
+ let a = null;
1033
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1034
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1035
+ }
1036
+ /**
1037
+ * @return OK
1038
+ */
1039
+ getDictionaryValues(t, e) {
1040
+ let n = this.baseUrl + "/api/platform/localizable-settings/{name}/dictionary-items/{language}/values";
1041
+ if (t == null)
1042
+ throw new globalThis.Error("The parameter 'name' must be defined.");
1043
+ if (n = n.replace("{name}", encodeURIComponent("" + t)), e == null)
1044
+ throw new globalThis.Error("The parameter 'language' must be defined.");
1045
+ n = n.replace("{language}", encodeURIComponent("" + e)), n = n.replace(/[?&]$/, "");
1046
+ let r = {
1047
+ method: "GET",
1048
+ headers: {
1049
+ Accept: "application/json"
1050
+ }
1051
+ };
1052
+ return this.transformOptions(r).then((a) => this.http.fetch(n, a)).then((a) => this.processGetDictionaryValues(a));
1053
+ }
1054
+ processGetDictionaryValues(t) {
1055
+ const e = t.status;
1056
+ let n = {};
1057
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1058
+ let a = null;
1059
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1060
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1061
+ }
1062
+ /**
1063
+ * @param body (optional)
1064
+ * @return No Content
1065
+ */
1066
+ saveDictionaryItems(t, e) {
1067
+ let n = this.baseUrl + "/api/platform/localizable-settings/{name}/dictionary-items";
1068
+ if (t == null)
1069
+ throw new globalThis.Error("The parameter 'name' must be defined.");
1070
+ n = n.replace("{name}", encodeURIComponent("" + t)), n = n.replace(/[?&]$/, "");
1071
+ let a = {
1072
+ body: JSON.stringify(e),
1073
+ method: "POST",
1074
+ headers: {
1075
+ "Content-Type": "application/json-patch+json"
1076
+ }
1077
+ };
1078
+ return this.transformOptions(a).then((o) => this.http.fetch(n, o)).then((o) => this.processSaveDictionaryItems(o));
1079
+ }
1080
+ processSaveDictionaryItems(t) {
1081
+ const e = t.status;
1082
+ let n = {};
1083
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
1084
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1085
+ }
1086
+ /**
1087
+ * @param values (optional)
1088
+ * @return No Content
1089
+ */
1090
+ deleteDictionaryItems(t, e) {
1091
+ let n = this.baseUrl + "/api/platform/localizable-settings/{name}/dictionary-items?";
1092
+ if (t == null)
1093
+ throw new globalThis.Error("The parameter 'name' must be defined.");
1094
+ if (n = n.replace("{name}", encodeURIComponent("" + t)), e === null)
1095
+ throw new globalThis.Error("The parameter 'values' cannot be null.");
1096
+ e !== void 0 && e && e.forEach((a) => {
1097
+ n += "values=" + encodeURIComponent("" + a) + "&";
1098
+ }), n = n.replace(/[?&]$/, "");
1099
+ let r = {
1100
+ method: "DELETE",
1101
+ headers: {}
1102
+ };
1103
+ return this.transformOptions(r).then((a) => this.http.fetch(n, a)).then((a) => this.processDeleteDictionaryItems(a));
1104
+ }
1105
+ processDeleteDictionaryItems(t) {
1106
+ const e = t.status;
1107
+ let n = {};
1108
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
1109
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1110
+ }
1111
+ }
1112
+ class Zr extends G {
1113
+ http;
1114
+ baseUrl;
1115
+ constructor(t, e) {
1116
+ super(), this.http = e || window, this.baseUrl = this.getBaseUrl("", t);
1117
+ }
1118
+ /**
1119
+ * Reload modules
1120
+ * @return No Content
1121
+ */
1122
+ reloadModules() {
1123
+ let t = this.baseUrl + "/api/platform/modules/reload";
1124
+ t = t.replace(/[?&]$/, "");
1125
+ let e = {
1126
+ method: "POST",
1127
+ headers: {}
1128
+ };
1129
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processReloadModules(n));
1130
+ }
1131
+ processReloadModules(t) {
1132
+ const e = t.status;
1133
+ let n = {};
1134
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
1135
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1136
+ }
1137
+ /**
1138
+ * Get installed modules
1139
+ * @return OK
1140
+ */
1141
+ getModules() {
1142
+ let t = this.baseUrl + "/api/platform/modules";
1143
+ t = t.replace(/[?&]$/, "");
1144
+ let e = {
1145
+ method: "GET",
1146
+ headers: {
1147
+ Accept: "application/json"
1148
+ }
1149
+ };
1150
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processGetModules(n));
1151
+ }
1152
+ processGetModules(t) {
1153
+ const e = t.status;
1154
+ let n = {};
1155
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1156
+ let a = null;
1157
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1158
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1159
+ }
1160
+ /**
1161
+ * Get all dependent modules for module
1162
+ * @param body (optional) modules descriptors
1163
+ * @return OK
1164
+ */
1165
+ getDependingModules(t) {
1166
+ let e = this.baseUrl + "/api/platform/modules/getdependents";
1167
+ e = e.replace(/[?&]$/, "");
1168
+ let r = {
1169
+ body: JSON.stringify(t),
1170
+ method: "POST",
1171
+ headers: {
1172
+ "Content-Type": "application/json-patch+json",
1173
+ Accept: "application/json"
1174
+ }
1175
+ };
1176
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processGetDependingModules(a));
1177
+ }
1178
+ processGetDependingModules(t) {
1179
+ const e = t.status;
1180
+ let n = {};
1181
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1182
+ let a = null;
1183
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1184
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1185
+ }
1186
+ /**
1187
+ * Returns a flat expanded list of modules that depend on passed modules
1188
+ * @param body (optional) modules descriptors
1189
+ * @return OK
1190
+ */
1191
+ getMissingDependencies(t) {
1192
+ let e = this.baseUrl + "/api/platform/modules/getmissingdependencies";
1193
+ e = e.replace(/[?&]$/, "");
1194
+ let r = {
1195
+ body: JSON.stringify(t),
1196
+ method: "POST",
1197
+ headers: {
1198
+ "Content-Type": "application/json-patch+json",
1199
+ Accept: "application/json"
1200
+ }
1201
+ };
1202
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processGetMissingDependencies(a));
1203
+ }
1204
+ processGetMissingDependencies(t) {
1205
+ const e = t.status;
1206
+ let n = {};
1207
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1208
+ let a = null;
1209
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1210
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1211
+ }
1212
+ /**
1213
+ * Upload module package for installation or update
1214
+ * @return OK
1215
+ */
1216
+ uploadModuleArchive() {
1217
+ let t = this.baseUrl + "/api/platform/modules/localstorage";
1218
+ t = t.replace(/[?&]$/, "");
1219
+ let e = {
1220
+ method: "POST",
1221
+ headers: {
1222
+ Accept: "application/json"
1223
+ }
1224
+ };
1225
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processUploadModuleArchive(n));
1226
+ }
1227
+ processUploadModuleArchive(t) {
1228
+ const e = t.status;
1229
+ let n = {};
1230
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1231
+ let a = null;
1232
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1233
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1234
+ }
1235
+ /**
1236
+ * Install modules
1237
+ * @param body (optional) modules for install
1238
+ * @return OK
1239
+ */
1240
+ installModules(t) {
1241
+ let e = this.baseUrl + "/api/platform/modules/install";
1242
+ e = e.replace(/[?&]$/, "");
1243
+ let r = {
1244
+ body: JSON.stringify(t),
1245
+ method: "POST",
1246
+ headers: {
1247
+ "Content-Type": "application/json-patch+json",
1248
+ Accept: "application/json"
1249
+ }
1250
+ };
1251
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processInstallModules(a));
1252
+ }
1253
+ processInstallModules(t) {
1254
+ const e = t.status;
1255
+ let n = {};
1256
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1257
+ let a = null;
1258
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1259
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1260
+ }
1261
+ /**
1262
+ * Update modules
1263
+ * @param body (optional) modules for update
1264
+ * @return OK
1265
+ */
1266
+ updateModules(t) {
1267
+ let e = this.baseUrl + "/api/platform/modules/update";
1268
+ e = e.replace(/[?&]$/, "");
1269
+ let r = {
1270
+ body: JSON.stringify(t),
1271
+ method: "POST",
1272
+ headers: {
1273
+ "Content-Type": "application/json-patch+json",
1274
+ Accept: "application/json"
1275
+ }
1276
+ };
1277
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processUpdateModules(a));
1278
+ }
1279
+ processUpdateModules(t) {
1280
+ const e = t.status;
1281
+ let n = {};
1282
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1283
+ let a = null;
1284
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1285
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1286
+ }
1287
+ /**
1288
+ * Uninstall module
1289
+ * @param body (optional) modules
1290
+ * @return OK
1291
+ */
1292
+ uninstallModule(t) {
1293
+ let e = this.baseUrl + "/api/platform/modules/uninstall";
1294
+ e = e.replace(/[?&]$/, "");
1295
+ let r = {
1296
+ body: JSON.stringify(t),
1297
+ method: "POST",
1298
+ headers: {
1299
+ "Content-Type": "application/json-patch+json",
1300
+ Accept: "application/json"
1301
+ }
1302
+ };
1303
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processUninstallModule(a));
1304
+ }
1305
+ processUninstallModule(t) {
1306
+ const e = t.status;
1307
+ let n = {};
1308
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1309
+ let a = null;
1310
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1311
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1312
+ }
1313
+ /**
1314
+ * Restart web application
1315
+ * @return No Content
1316
+ */
1317
+ restart() {
1318
+ let t = this.baseUrl + "/api/platform/modules/restart";
1319
+ t = t.replace(/[?&]$/, "");
1320
+ let e = {
1321
+ method: "POST",
1322
+ headers: {}
1323
+ };
1324
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processRestart(n));
1325
+ }
1326
+ processRestart(t) {
1327
+ const e = t.status;
1328
+ let n = {};
1329
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
1330
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1331
+ }
1332
+ /**
1333
+ * Auto-install modules with specified groups
1334
+ * @return OK
1335
+ */
1336
+ tryToAutoInstallModules() {
1337
+ let t = this.baseUrl + "/api/platform/modules/autoinstall";
1338
+ t = t.replace(/[?&]$/, "");
1339
+ let e = {
1340
+ method: "POST",
1341
+ headers: {
1342
+ Accept: "application/json"
1343
+ }
1344
+ };
1345
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processTryToAutoInstallModules(n));
1346
+ }
1347
+ processTryToAutoInstallModules(t) {
1348
+ const e = t.status;
1349
+ let n = {};
1350
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1351
+ let a = null;
1352
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1353
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1354
+ }
1355
+ /**
1356
+ * @return OK
1357
+ */
1358
+ getModulesLoadingOrder() {
1359
+ let t = this.baseUrl + "/api/platform/modules/loading-order";
1360
+ t = t.replace(/[?&]$/, "");
1361
+ let e = {
1362
+ method: "GET",
1363
+ headers: {
1364
+ Accept: "application/json"
1365
+ }
1366
+ };
1367
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processGetModulesLoadingOrder(n));
1368
+ }
1369
+ processGetModulesLoadingOrder(t) {
1370
+ const e = t.status;
1371
+ let n = {};
1372
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1373
+ let a = null;
1374
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1375
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1376
+ }
1377
+ }
1378
+ class Xr extends G {
1379
+ http;
1380
+ baseUrl;
1381
+ constructor(t, e) {
1382
+ super(), this.http = e || window, this.baseUrl = this.getBaseUrl("", t);
1383
+ }
1384
+ /**
1385
+ * @return OK
1386
+ */
1387
+ new() {
1388
+ let t = this.baseUrl + "/api/platform/oauthapps/new";
1389
+ t = t.replace(/[?&]$/, "");
1390
+ let e = {
1391
+ method: "GET",
1392
+ headers: {
1393
+ Accept: "application/json"
1394
+ }
1395
+ };
1396
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processNew(n));
1397
+ }
1398
+ processNew(t) {
1399
+ const e = t.status;
1400
+ let n = {};
1401
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1402
+ let a = null;
1403
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1404
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1405
+ }
1406
+ /**
1407
+ * @param body (optional)
1408
+ * @return OK
1409
+ */
1410
+ save(t) {
1411
+ let e = this.baseUrl + "/api/platform/oauthapps";
1412
+ e = e.replace(/[?&]$/, "");
1413
+ let r = {
1414
+ body: JSON.stringify(t),
1415
+ method: "POST",
1416
+ headers: {
1417
+ "Content-Type": "application/json-patch+json",
1418
+ Accept: "application/json"
1419
+ }
1420
+ };
1421
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processSave(a));
1422
+ }
1423
+ processSave(t) {
1424
+ const e = t.status;
1425
+ let n = {};
1426
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1427
+ let a = null;
1428
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1429
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1430
+ }
1431
+ /**
1432
+ * @param clientIds (optional)
1433
+ * @return OK
1434
+ */
1435
+ delete(t) {
1436
+ let e = this.baseUrl + "/api/platform/oauthapps?";
1437
+ if (t === null)
1438
+ throw new globalThis.Error("The parameter 'clientIds' cannot be null.");
1439
+ t !== void 0 && t && t.forEach((r) => {
1440
+ e += "clientIds=" + encodeURIComponent("" + r) + "&";
1441
+ }), e = e.replace(/[?&]$/, "");
1442
+ let n = {
1443
+ method: "DELETE",
1444
+ headers: {}
1445
+ };
1446
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processDelete(r));
1447
+ }
1448
+ processDelete(t) {
1449
+ const e = t.status;
1450
+ let n = {};
1451
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1452
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1453
+ }
1454
+ /**
1455
+ * @param body (optional)
1456
+ * @return OK
1457
+ */
1458
+ search(t) {
1459
+ let e = this.baseUrl + "/api/platform/oauthapps/search";
1460
+ e = e.replace(/[?&]$/, "");
1461
+ let r = {
1462
+ body: JSON.stringify(t),
1463
+ method: "POST",
1464
+ headers: {
1465
+ "Content-Type": "application/json-patch+json",
1466
+ Accept: "application/json"
1467
+ }
1468
+ };
1469
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processSearch(a));
1470
+ }
1471
+ processSearch(t) {
1472
+ const e = t.status;
1473
+ let n = {};
1474
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1475
+ let a = null;
1476
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1477
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1478
+ }
1479
+ }
1480
+ class Yr extends G {
1481
+ http;
1482
+ baseUrl;
1483
+ constructor(t, e) {
1484
+ super(), this.http = e || window, this.baseUrl = this.getBaseUrl("", t);
1485
+ }
1486
+ /**
1487
+ * SearchAsync push notifications
1488
+ * @param body (optional) SearchAsync parameters.
1489
+ * @return OK
1490
+ */
1491
+ searchPushNotification(t) {
1492
+ let e = this.baseUrl + "/api/platform/pushnotifications";
1493
+ e = e.replace(/[?&]$/, "");
1494
+ let r = {
1495
+ body: JSON.stringify(t),
1496
+ method: "POST",
1497
+ headers: {
1498
+ "Content-Type": "application/json-patch+json",
1499
+ Accept: "application/json"
1500
+ }
1501
+ };
1502
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processSearchPushNotification(a));
1503
+ }
1504
+ processSearchPushNotification(t) {
1505
+ const e = t.status;
1506
+ let n = {};
1507
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1508
+ let a = null;
1509
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1510
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1511
+ }
1512
+ /**
1513
+ * Mark all notifications as read
1514
+ * @return OK
1515
+ */
1516
+ markAllAsRead() {
1517
+ let t = this.baseUrl + "/api/platform/pushnotifications/markAllAsRead";
1518
+ t = t.replace(/[?&]$/, "");
1519
+ let e = {
1520
+ method: "POST",
1521
+ headers: {
1522
+ Accept: "application/json"
1523
+ }
1524
+ };
1525
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processMarkAllAsRead(n));
1526
+ }
1527
+ processMarkAllAsRead(t) {
1528
+ const e = t.status;
1529
+ let n = {};
1530
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1531
+ let a = null;
1532
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1533
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1534
+ }
1535
+ }
1536
+ class Qe extends G {
1537
+ http;
1538
+ baseUrl;
1539
+ constructor(t, e) {
1540
+ super(), this.http = e || window, this.baseUrl = this.getBaseUrl("", t);
1541
+ }
1542
+ /**
1543
+ * @param body (optional)
1544
+ * @return OK
1545
+ */
1546
+ searchUserSessions(t, e) {
1547
+ let n = this.baseUrl + "/api/platform/security/users/{userId}/sessions/search";
1548
+ if (t == null)
1549
+ throw new globalThis.Error("The parameter 'userId' must be defined.");
1550
+ n = n.replace("{userId}", encodeURIComponent("" + t)), n = n.replace(/[?&]$/, "");
1551
+ let a = {
1552
+ body: JSON.stringify(e),
1553
+ method: "POST",
1554
+ headers: {
1555
+ "Content-Type": "application/json-patch+json",
1556
+ Accept: "application/json"
1557
+ }
1558
+ };
1559
+ return this.transformOptions(a).then((o) => this.http.fetch(n, o)).then((o) => this.processSearchUserSessions(o));
1560
+ }
1561
+ processSearchUserSessions(t) {
1562
+ const e = t.status;
1563
+ let n = {};
1564
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1565
+ let a = null;
1566
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1567
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1568
+ }
1569
+ /**
1570
+ * @return No Content
1571
+ */
1572
+ terminateUserSession(t, e) {
1573
+ let n = this.baseUrl + "/api/platform/security/users/{userId}/sessions/{id}";
1574
+ if (t == null)
1575
+ throw new globalThis.Error("The parameter 'userId' must be defined.");
1576
+ if (n = n.replace("{userId}", encodeURIComponent("" + t)), e == null)
1577
+ throw new globalThis.Error("The parameter 'id' must be defined.");
1578
+ n = n.replace("{id}", encodeURIComponent("" + e)), n = n.replace(/[?&]$/, "");
1579
+ let r = {
1580
+ method: "DELETE",
1581
+ headers: {}
1582
+ };
1583
+ return this.transformOptions(r).then((a) => this.http.fetch(n, a)).then((a) => this.processTerminateUserSession(a));
1584
+ }
1585
+ processTerminateUserSession(t) {
1586
+ const e = t.status;
1587
+ let n = {};
1588
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
1589
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1590
+ }
1591
+ /**
1592
+ * @return No Content
1593
+ */
1594
+ terminateAllUserSessions(t) {
1595
+ let e = this.baseUrl + "/api/platform/security/users/{userId}/sessions";
1596
+ if (t == null)
1597
+ throw new globalThis.Error("The parameter 'userId' must be defined.");
1598
+ e = e.replace("{userId}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
1599
+ let n = {
1600
+ method: "DELETE",
1601
+ headers: {}
1602
+ };
1603
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processTerminateAllUserSessions(r));
1604
+ }
1605
+ processTerminateAllUserSessions(t) {
1606
+ const e = t.status;
1607
+ let n = {};
1608
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
1609
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1610
+ }
1611
+ /**
1612
+ * Sign in with user name and password
1613
+ * @param body (optional) Login request.
1614
+ * @return OK
1615
+ */
1616
+ login(t) {
1617
+ let e = this.baseUrl + "/api/platform/security/login";
1618
+ e = e.replace(/[?&]$/, "");
1619
+ let r = {
1620
+ body: JSON.stringify(t),
1621
+ method: "POST",
1622
+ headers: {
1623
+ "Content-Type": "application/json-patch+json",
1624
+ Accept: "application/json"
1625
+ }
1626
+ };
1627
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processLogin(a));
1628
+ }
1629
+ processLogin(t) {
1630
+ const e = t.status;
1631
+ let n = {};
1632
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1633
+ let a = null;
1634
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1635
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1636
+ }
1637
+ /**
1638
+ * Sign out
1639
+ * @return No Content
1640
+ */
1641
+ logout() {
1642
+ let t = this.baseUrl + "/api/platform/security/logout";
1643
+ t = t.replace(/[?&]$/, "");
1644
+ let e = {
1645
+ method: "GET",
1646
+ headers: {}
1647
+ };
1648
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processLogout(n));
1649
+ }
1650
+ processLogout(t) {
1651
+ const e = t.status;
1652
+ let n = {};
1653
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
1654
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1655
+ }
1656
+ /**
1657
+ * Get current user details
1658
+ * @return OK
1659
+ */
1660
+ getCurrentUser() {
1661
+ let t = this.baseUrl + "/api/platform/security/currentuser";
1662
+ t = t.replace(/[?&]$/, "");
1663
+ let e = {
1664
+ method: "GET",
1665
+ headers: {
1666
+ Accept: "application/json"
1667
+ }
1668
+ };
1669
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processGetCurrentUser(n));
1670
+ }
1671
+ processGetCurrentUser(t) {
1672
+ const e = t.status;
1673
+ let n = {};
1674
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1675
+ let a = null;
1676
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1677
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1678
+ }
1679
+ /**
1680
+ * @return OK
1681
+ */
1682
+ userinfo() {
1683
+ let t = this.baseUrl + "/api/platform/security/userinfo";
1684
+ t = t.replace(/[?&]$/, "");
1685
+ let e = {
1686
+ method: "GET",
1687
+ headers: {
1688
+ Accept: "application/json"
1689
+ }
1690
+ };
1691
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processUserinfo(n));
1692
+ }
1693
+ processUserinfo(t) {
1694
+ const e = t.status;
1695
+ let n = {};
1696
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1697
+ let a = null;
1698
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1699
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1700
+ }
1701
+ /**
1702
+ * Get all registered permissions
1703
+ * @return OK
1704
+ */
1705
+ getAllRegisteredPermissions() {
1706
+ let t = this.baseUrl + "/api/platform/security/permissions";
1707
+ t = t.replace(/[?&]$/, "");
1708
+ let e = {
1709
+ method: "GET",
1710
+ headers: {
1711
+ Accept: "application/json"
1712
+ }
1713
+ };
1714
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processGetAllRegisteredPermissions(n));
1715
+ }
1716
+ processGetAllRegisteredPermissions(t) {
1717
+ const e = t.status;
1718
+ let n = {};
1719
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1720
+ let a = null;
1721
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1722
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1723
+ }
1724
+ /**
1725
+ * SearchAsync roles by keyword
1726
+ * @param body (optional) SearchAsync parameters.
1727
+ * @return OK
1728
+ */
1729
+ searchRoles(t) {
1730
+ let e = this.baseUrl + "/api/platform/security/roles/search";
1731
+ e = e.replace(/[?&]$/, "");
1732
+ let r = {
1733
+ body: JSON.stringify(t),
1734
+ method: "POST",
1735
+ headers: {
1736
+ "Content-Type": "application/json-patch+json",
1737
+ Accept: "application/json"
1738
+ }
1739
+ };
1740
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processSearchRoles(a));
1741
+ }
1742
+ processSearchRoles(t) {
1743
+ const e = t.status;
1744
+ let n = {};
1745
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1746
+ let a = null;
1747
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1748
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1749
+ }
1750
+ /**
1751
+ * Get role by ID
1752
+ * @return OK
1753
+ */
1754
+ getRole(t) {
1755
+ let e = this.baseUrl + "/api/platform/security/roles/{roleName}";
1756
+ if (t == null)
1757
+ throw new globalThis.Error("The parameter 'roleName' must be defined.");
1758
+ e = e.replace("{roleName}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
1759
+ let n = {
1760
+ method: "GET",
1761
+ headers: {
1762
+ Accept: "application/json"
1763
+ }
1764
+ };
1765
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processGetRole(r));
1766
+ }
1767
+ processGetRole(t) {
1768
+ const e = t.status;
1769
+ let n = {};
1770
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1771
+ let a = null;
1772
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1773
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1774
+ }
1775
+ /**
1776
+ * Delete roles by ID
1777
+ * @param ids (optional) An array of role IDs.
1778
+ * @return No Content
1779
+ */
1780
+ deleteRoles(t) {
1781
+ let e = this.baseUrl + "/api/platform/security/roles?";
1782
+ if (t === null)
1783
+ throw new globalThis.Error("The parameter 'ids' cannot be null.");
1784
+ t !== void 0 && t && t.forEach((r) => {
1785
+ e += "ids=" + encodeURIComponent("" + r) + "&";
1786
+ }), e = e.replace(/[?&]$/, "");
1787
+ let n = {
1788
+ method: "DELETE",
1789
+ headers: {}
1790
+ };
1791
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processDeleteRoles(r));
1792
+ }
1793
+ processDeleteRoles(t) {
1794
+ const e = t.status;
1795
+ let n = {};
1796
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
1797
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1798
+ }
1799
+ /**
1800
+ * Update an existing role or create new
1801
+ * @param body (optional)
1802
+ * @return OK
1803
+ */
1804
+ updateRole(t) {
1805
+ let e = this.baseUrl + "/api/platform/security/roles";
1806
+ e = e.replace(/[?&]$/, "");
1807
+ let r = {
1808
+ body: JSON.stringify(t),
1809
+ method: "PUT",
1810
+ headers: {
1811
+ "Content-Type": "application/json-patch+json",
1812
+ Accept: "application/json"
1813
+ }
1814
+ };
1815
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processUpdateRole(a));
1816
+ }
1817
+ processUpdateRole(t) {
1818
+ const e = t.status;
1819
+ let n = {};
1820
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1821
+ let a = null;
1822
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1823
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1824
+ }
1825
+ /**
1826
+ * SearchAsync users by keyword
1827
+ * @param body (optional) Search criteria.
1828
+ * @return OK
1829
+ */
1830
+ searchUsers(t) {
1831
+ let e = this.baseUrl + "/api/platform/security/users/search";
1832
+ e = e.replace(/[?&]$/, "");
1833
+ let r = {
1834
+ body: JSON.stringify(t),
1835
+ method: "POST",
1836
+ headers: {
1837
+ "Content-Type": "application/json-patch+json",
1838
+ Accept: "application/json"
1839
+ }
1840
+ };
1841
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processSearchUsers(a));
1842
+ }
1843
+ processSearchUsers(t) {
1844
+ const e = t.status;
1845
+ let n = {};
1846
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1847
+ let a = null;
1848
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1849
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1850
+ }
1851
+ /**
1852
+ * Get user details by user name
1853
+ * @return OK
1854
+ */
1855
+ getUserByName(t) {
1856
+ let e = this.baseUrl + "/api/platform/security/users/{userName}";
1857
+ if (t == null)
1858
+ throw new globalThis.Error("The parameter 'userName' must be defined.");
1859
+ e = e.replace("{userName}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
1860
+ let n = {
1861
+ method: "GET",
1862
+ headers: {
1863
+ Accept: "application/json"
1864
+ }
1865
+ };
1866
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processGetUserByName(r));
1867
+ }
1868
+ processGetUserByName(t) {
1869
+ const e = t.status;
1870
+ let n = {};
1871
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1872
+ let a = null;
1873
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1874
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1875
+ }
1876
+ /**
1877
+ * Get user details by user ID
1878
+ * @return OK
1879
+ */
1880
+ getUserById(t) {
1881
+ let e = this.baseUrl + "/api/platform/security/users/id/{id}";
1882
+ if (t == null)
1883
+ throw new globalThis.Error("The parameter 'id' must be defined.");
1884
+ e = e.replace("{id}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
1885
+ let n = {
1886
+ method: "GET",
1887
+ headers: {
1888
+ Accept: "application/json"
1889
+ }
1890
+ };
1891
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processGetUserById(r));
1892
+ }
1893
+ processGetUserById(t) {
1894
+ const e = t.status;
1895
+ let n = {};
1896
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1897
+ let a = null;
1898
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1899
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1900
+ }
1901
+ /**
1902
+ * Get user details by user email
1903
+ * @return OK
1904
+ */
1905
+ getUserByEmail(t) {
1906
+ let e = this.baseUrl + "/api/platform/security/users/email/{email}";
1907
+ if (t == null)
1908
+ throw new globalThis.Error("The parameter 'email' must be defined.");
1909
+ e = e.replace("{email}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
1910
+ let n = {
1911
+ method: "GET",
1912
+ headers: {
1913
+ Accept: "application/json"
1914
+ }
1915
+ };
1916
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processGetUserByEmail(r));
1917
+ }
1918
+ processGetUserByEmail(t) {
1919
+ const e = t.status;
1920
+ let n = {};
1921
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1922
+ let a = null;
1923
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1924
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1925
+ }
1926
+ /**
1927
+ * Get user details by external login provider
1928
+ * @return OK
1929
+ */
1930
+ getUserByLogin(t, e) {
1931
+ let n = this.baseUrl + "/api/platform/security/users/login/external/{loginProvider}/{providerKey}";
1932
+ if (t == null)
1933
+ throw new globalThis.Error("The parameter 'loginProvider' must be defined.");
1934
+ if (n = n.replace("{loginProvider}", encodeURIComponent("" + t)), e == null)
1935
+ throw new globalThis.Error("The parameter 'providerKey' must be defined.");
1936
+ n = n.replace("{providerKey}", encodeURIComponent("" + e)), n = n.replace(/[?&]$/, "");
1937
+ let r = {
1938
+ method: "GET",
1939
+ headers: {
1940
+ Accept: "application/json"
1941
+ }
1942
+ };
1943
+ return this.transformOptions(r).then((a) => this.http.fetch(n, a)).then((a) => this.processGetUserByLogin(a));
1944
+ }
1945
+ processGetUserByLogin(t) {
1946
+ const e = t.status;
1947
+ let n = {};
1948
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1949
+ let a = null;
1950
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1951
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1952
+ }
1953
+ /**
1954
+ * Create new user
1955
+ * @param body (optional)
1956
+ * @return OK
1957
+ */
1958
+ create(t) {
1959
+ let e = this.baseUrl + "/api/platform/security/users/create";
1960
+ e = e.replace(/[?&]$/, "");
1961
+ let r = {
1962
+ body: JSON.stringify(t),
1963
+ method: "POST",
1964
+ headers: {
1965
+ "Content-Type": "application/json-patch+json",
1966
+ Accept: "application/json"
1967
+ }
1968
+ };
1969
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processCreate(a));
1970
+ }
1971
+ processCreate(t) {
1972
+ const e = t.status;
1973
+ let n = {};
1974
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
1975
+ let a = null;
1976
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
1977
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
1978
+ }
1979
+ /**
1980
+ * Change password for current user.
1981
+ * @param body (optional) Old and new passwords.
1982
+ * @return OK
1983
+ */
1984
+ changeCurrentUserPassword(t) {
1985
+ let e = this.baseUrl + "/api/platform/security/currentuser/changepassword";
1986
+ e = e.replace(/[?&]$/, "");
1987
+ let r = {
1988
+ body: JSON.stringify(t),
1989
+ method: "POST",
1990
+ headers: {
1991
+ "Content-Type": "application/json-patch+json",
1992
+ Accept: "application/json"
1993
+ }
1994
+ };
1995
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processChangeCurrentUserPassword(a));
1996
+ }
1997
+ processChangeCurrentUserPassword(t) {
1998
+ const e = t.status;
1999
+ let n = {};
2000
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2001
+ let a = null;
2002
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2003
+ }) : e === 400 ? t.text().then((r) => i("Bad Request", e, r, n)) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2004
+ }
2005
+ /**
2006
+ * Change password
2007
+ * @param userName user name
2008
+ * @param body (optional) Old and new passwords.
2009
+ * @return OK
2010
+ */
2011
+ changePassword(t, e) {
2012
+ let n = this.baseUrl + "/api/platform/security/users/{userName}/changepassword";
2013
+ if (t == null)
2014
+ throw new globalThis.Error("The parameter 'userName' must be defined.");
2015
+ n = n.replace("{userName}", encodeURIComponent("" + t)), n = n.replace(/[?&]$/, "");
2016
+ let a = {
2017
+ body: JSON.stringify(e),
2018
+ method: "POST",
2019
+ headers: {
2020
+ "Content-Type": "application/json-patch+json",
2021
+ Accept: "application/json"
2022
+ }
2023
+ };
2024
+ return this.transformOptions(a).then((o) => this.http.fetch(n, o)).then((o) => this.processChangePassword(o));
2025
+ }
2026
+ processChangePassword(t) {
2027
+ const e = t.status;
2028
+ let n = {};
2029
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2030
+ let a = null;
2031
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2032
+ }) : e === 400 ? t.text().then((r) => i("Bad Request", e, r, n)) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2033
+ }
2034
+ /**
2035
+ * Reset password confirmation
2036
+ * @param body (optional) Password reset information.
2037
+ * @return OK
2038
+ */
2039
+ resetPassword(t, e) {
2040
+ let n = this.baseUrl + "/api/platform/security/users/{userName}/resetpassword";
2041
+ if (t == null)
2042
+ throw new globalThis.Error("The parameter 'userName' must be defined.");
2043
+ n = n.replace("{userName}", encodeURIComponent("" + t)), n = n.replace(/[?&]$/, "");
2044
+ let a = {
2045
+ body: JSON.stringify(e),
2046
+ method: "POST",
2047
+ headers: {
2048
+ "Content-Type": "application/json-patch+json",
2049
+ Accept: "application/json"
2050
+ }
2051
+ };
2052
+ return this.transformOptions(a).then((o) => this.http.fetch(n, o)).then((o) => this.processResetPassword(o));
2053
+ }
2054
+ processResetPassword(t) {
2055
+ const e = t.status;
2056
+ let n = {};
2057
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2058
+ let a = null;
2059
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2060
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2061
+ }
2062
+ /**
2063
+ * Reset password confirmation
2064
+ * @param body (optional) Password reset information.
2065
+ * @return OK
2066
+ */
2067
+ resetPasswordByToken(t, e) {
2068
+ let n = this.baseUrl + "/api/platform/security/users/{userId}/resetpasswordconfirm";
2069
+ if (t == null)
2070
+ throw new globalThis.Error("The parameter 'userId' must be defined.");
2071
+ n = n.replace("{userId}", encodeURIComponent("" + t)), n = n.replace(/[?&]$/, "");
2072
+ let a = {
2073
+ body: JSON.stringify(e),
2074
+ method: "POST",
2075
+ headers: {
2076
+ "Content-Type": "application/json-patch+json",
2077
+ Accept: "application/json"
2078
+ }
2079
+ };
2080
+ return this.transformOptions(a).then((o) => this.http.fetch(n, o)).then((o) => this.processResetPasswordByToken(o));
2081
+ }
2082
+ processResetPasswordByToken(t) {
2083
+ const e = t.status;
2084
+ let n = {};
2085
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2086
+ let a = null;
2087
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2088
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2089
+ }
2090
+ /**
2091
+ * Validate password reset token
2092
+ * @param body (optional)
2093
+ * @return OK
2094
+ */
2095
+ validatePasswordResetToken(t, e) {
2096
+ let n = this.baseUrl + "/api/platform/security/users/{userId}/validatepasswordresettoken";
2097
+ if (t == null)
2098
+ throw new globalThis.Error("The parameter 'userId' must be defined.");
2099
+ n = n.replace("{userId}", encodeURIComponent("" + t)), n = n.replace(/[?&]$/, "");
2100
+ let a = {
2101
+ body: JSON.stringify(e),
2102
+ method: "POST",
2103
+ headers: {
2104
+ "Content-Type": "application/json-patch+json",
2105
+ Accept: "application/json"
2106
+ }
2107
+ };
2108
+ return this.transformOptions(a).then((o) => this.http.fetch(n, o)).then((o) => this.processValidatePasswordResetToken(o));
2109
+ }
2110
+ processValidatePasswordResetToken(t) {
2111
+ const e = t.status;
2112
+ let n = {};
2113
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2114
+ let a = null;
2115
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2116
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2117
+ }
2118
+ /**
2119
+ * Send email with instructions on how to reset user password.
2120
+ * @return OK
2121
+ */
2122
+ requestPasswordReset(t) {
2123
+ let e = this.baseUrl + "/api/platform/security/users/{loginOrEmail}/requestpasswordreset";
2124
+ if (t == null)
2125
+ throw new globalThis.Error("The parameter 'loginOrEmail' must be defined.");
2126
+ e = e.replace("{loginOrEmail}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
2127
+ let n = {
2128
+ method: "POST",
2129
+ headers: {}
2130
+ };
2131
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processRequestPasswordReset(r));
2132
+ }
2133
+ processRequestPasswordReset(t) {
2134
+ const e = t.status;
2135
+ let n = {};
2136
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2137
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2138
+ }
2139
+ /**
2140
+ * @param body (optional)
2141
+ * @return OK
2142
+ */
2143
+ validatePassword(t) {
2144
+ let e = this.baseUrl + "/api/platform/security/validatepassword";
2145
+ e = e.replace(/[?&]$/, "");
2146
+ let r = {
2147
+ body: JSON.stringify(t),
2148
+ method: "POST",
2149
+ headers: {
2150
+ "Content-Type": "application/json-patch+json",
2151
+ Accept: "application/json"
2152
+ }
2153
+ };
2154
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processValidatePassword(a));
2155
+ }
2156
+ processValidatePassword(t) {
2157
+ const e = t.status;
2158
+ let n = {};
2159
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2160
+ let a = null;
2161
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2162
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2163
+ }
2164
+ /**
2165
+ * @param body (optional)
2166
+ * @return OK
2167
+ */
2168
+ validateUserPassword(t) {
2169
+ let e = this.baseUrl + "/api/platform/security/validateuserpassword";
2170
+ e = e.replace(/[?&]$/, "");
2171
+ let r = {
2172
+ body: JSON.stringify(t),
2173
+ method: "POST",
2174
+ headers: {
2175
+ "Content-Type": "application/json-patch+json",
2176
+ Accept: "application/json"
2177
+ }
2178
+ };
2179
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processValidateUserPassword(a));
2180
+ }
2181
+ processValidateUserPassword(t) {
2182
+ const e = t.status;
2183
+ let n = {};
2184
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2185
+ let a = null;
2186
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2187
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2188
+ }
2189
+ /**
2190
+ * Update user details by user ID
2191
+ * @param body (optional) User details.
2192
+ * @return OK
2193
+ */
2194
+ update(t) {
2195
+ let e = this.baseUrl + "/api/platform/security/users";
2196
+ e = e.replace(/[?&]$/, "");
2197
+ let r = {
2198
+ body: JSON.stringify(t),
2199
+ method: "PUT",
2200
+ headers: {
2201
+ "Content-Type": "application/json-patch+json",
2202
+ Accept: "application/json"
2203
+ }
2204
+ };
2205
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processUpdate(a));
2206
+ }
2207
+ processUpdate(t) {
2208
+ const e = t.status;
2209
+ let n = {};
2210
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2211
+ let a = null;
2212
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2213
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2214
+ }
2215
+ /**
2216
+ * Delete users by name
2217
+ * @param names (optional) An array of user names.
2218
+ * @return OK
2219
+ */
2220
+ delete(t) {
2221
+ let e = this.baseUrl + "/api/platform/security/users?";
2222
+ if (t === null)
2223
+ throw new globalThis.Error("The parameter 'names' cannot be null.");
2224
+ t !== void 0 && t && t.forEach((r) => {
2225
+ e += "names=" + encodeURIComponent("" + r) + "&";
2226
+ }), e = e.replace(/[?&]$/, "");
2227
+ let n = {
2228
+ method: "DELETE",
2229
+ headers: {}
2230
+ };
2231
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processDelete(r));
2232
+ }
2233
+ processDelete(t) {
2234
+ const e = t.status;
2235
+ let n = {};
2236
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2237
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2238
+ }
2239
+ /**
2240
+ * Checks if user locked
2241
+ * @param id User id
2242
+ * @return OK
2243
+ */
2244
+ isUserLocked(t) {
2245
+ let e = this.baseUrl + "/api/platform/security/users/{id}/locked";
2246
+ if (t == null)
2247
+ throw new globalThis.Error("The parameter 'id' must be defined.");
2248
+ e = e.replace("{id}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
2249
+ let n = {
2250
+ method: "GET",
2251
+ headers: {
2252
+ Accept: "application/json"
2253
+ }
2254
+ };
2255
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processIsUserLocked(r));
2256
+ }
2257
+ processIsUserLocked(t) {
2258
+ const e = t.status;
2259
+ let n = {};
2260
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2261
+ let a = null;
2262
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2263
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2264
+ }
2265
+ /**
2266
+ * Checks if manual password change is enabled
2267
+ * @return OK
2268
+ */
2269
+ passwordChangeEnabled() {
2270
+ let t = this.baseUrl + "/api/platform/security/passwordchangeenabled";
2271
+ t = t.replace(/[?&]$/, "");
2272
+ let e = {
2273
+ method: "GET",
2274
+ headers: {
2275
+ Accept: "application/json"
2276
+ }
2277
+ };
2278
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processPasswordChangeEnabled(n));
2279
+ }
2280
+ processPasswordChangeEnabled(t) {
2281
+ const e = t.status;
2282
+ let n = {};
2283
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2284
+ let a = null;
2285
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2286
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2287
+ }
2288
+ /**
2289
+ * Lock user
2290
+ * @param id >User id
2291
+ * @return OK
2292
+ */
2293
+ lockUser(t) {
2294
+ let e = this.baseUrl + "/api/platform/security/users/{id}/lock";
2295
+ if (t == null)
2296
+ throw new globalThis.Error("The parameter 'id' must be defined.");
2297
+ e = e.replace("{id}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
2298
+ let n = {
2299
+ method: "POST",
2300
+ headers: {
2301
+ Accept: "application/json"
2302
+ }
2303
+ };
2304
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processLockUser(r));
2305
+ }
2306
+ processLockUser(t) {
2307
+ const e = t.status;
2308
+ let n = {};
2309
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2310
+ let a = null;
2311
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2312
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2313
+ }
2314
+ /**
2315
+ * Unlock user
2316
+ * @param id >User id
2317
+ * @return OK
2318
+ */
2319
+ unlockUser(t) {
2320
+ let e = this.baseUrl + "/api/platform/security/users/{id}/unlock";
2321
+ if (t == null)
2322
+ throw new globalThis.Error("The parameter 'id' must be defined.");
2323
+ e = e.replace("{id}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
2324
+ let n = {
2325
+ method: "POST",
2326
+ headers: {
2327
+ Accept: "application/json"
2328
+ }
2329
+ };
2330
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processUnlockUser(r));
2331
+ }
2332
+ processUnlockUser(t) {
2333
+ const e = t.status;
2334
+ let n = {};
2335
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2336
+ let a = null;
2337
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2338
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2339
+ }
2340
+ /**
2341
+ * @return OK
2342
+ */
2343
+ getUserApiKeys(t) {
2344
+ let e = this.baseUrl + "/api/platform/security/users/{id}/apikeys";
2345
+ if (t == null)
2346
+ throw new globalThis.Error("The parameter 'id' must be defined.");
2347
+ e = e.replace("{id}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
2348
+ let n = {
2349
+ method: "GET",
2350
+ headers: {
2351
+ Accept: "application/json"
2352
+ }
2353
+ };
2354
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processGetUserApiKeys(r));
2355
+ }
2356
+ processGetUserApiKeys(t) {
2357
+ const e = t.status;
2358
+ let n = {};
2359
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2360
+ let a = null;
2361
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2362
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2363
+ }
2364
+ /**
2365
+ * @param body (optional)
2366
+ * @return OK
2367
+ */
2368
+ saveUserApiKey(t) {
2369
+ let e = this.baseUrl + "/api/platform/security/users/apikeys";
2370
+ e = e.replace(/[?&]$/, "");
2371
+ let r = {
2372
+ body: JSON.stringify(t),
2373
+ method: "POST",
2374
+ headers: {
2375
+ "Content-Type": "application/json-patch+json",
2376
+ Accept: "application/json"
2377
+ }
2378
+ };
2379
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processSaveUserApiKey(a));
2380
+ }
2381
+ processSaveUserApiKey(t) {
2382
+ const e = t.status;
2383
+ let n = {};
2384
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2385
+ let a = null;
2386
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2387
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2388
+ }
2389
+ /**
2390
+ * @param body (optional)
2391
+ * @return OK
2392
+ */
2393
+ updateUserApiKey(t) {
2394
+ let e = this.baseUrl + "/api/platform/security/users/apikeys";
2395
+ e = e.replace(/[?&]$/, "");
2396
+ let r = {
2397
+ body: JSON.stringify(t),
2398
+ method: "PUT",
2399
+ headers: {
2400
+ "Content-Type": "application/json-patch+json",
2401
+ Accept: "application/json"
2402
+ }
2403
+ };
2404
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processUpdateUserApiKey(a));
2405
+ }
2406
+ processUpdateUserApiKey(t) {
2407
+ const e = t.status;
2408
+ let n = {};
2409
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2410
+ let a = null;
2411
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2412
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2413
+ }
2414
+ /**
2415
+ * @param ids (optional)
2416
+ * @return OK
2417
+ */
2418
+ deleteUserApiKeys(t) {
2419
+ let e = this.baseUrl + "/api/platform/security/users/apikeys?";
2420
+ if (t === null)
2421
+ throw new globalThis.Error("The parameter 'ids' cannot be null.");
2422
+ t !== void 0 && t && t.forEach((r) => {
2423
+ e += "ids=" + encodeURIComponent("" + r) + "&";
2424
+ }), e = e.replace(/[?&]$/, "");
2425
+ let n = {
2426
+ method: "DELETE",
2427
+ headers: {
2428
+ Accept: "application/json"
2429
+ }
2430
+ };
2431
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processDeleteUserApiKeys(r));
2432
+ }
2433
+ processDeleteUserApiKeys(t) {
2434
+ const e = t.status;
2435
+ let n = {};
2436
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2437
+ let a = null;
2438
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2439
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2440
+ }
2441
+ /**
2442
+ * Get allowed login types
2443
+ * @return OK
2444
+ */
2445
+ getLoginTypes() {
2446
+ let t = this.baseUrl + "/api/platform/security/logintypes";
2447
+ t = t.replace(/[?&]$/, "");
2448
+ let e = {
2449
+ method: "GET",
2450
+ headers: {
2451
+ Accept: "application/json"
2452
+ }
2453
+ };
2454
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processGetLoginTypes(n));
2455
+ }
2456
+ processGetLoginTypes(t) {
2457
+ const e = t.status;
2458
+ let n = {};
2459
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2460
+ let a = null;
2461
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2462
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2463
+ }
2464
+ /**
2465
+ * Verify user email
2466
+ * @return OK
2467
+ */
2468
+ sendVerificationEmail(t) {
2469
+ let e = this.baseUrl + "/api/platform/security/users/{userId}/sendVerificationEmail";
2470
+ if (t == null)
2471
+ throw new globalThis.Error("The parameter 'userId' must be defined.");
2472
+ e = e.replace("{userId}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
2473
+ let n = {
2474
+ method: "POST",
2475
+ headers: {}
2476
+ };
2477
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processSendVerificationEmail(r));
2478
+ }
2479
+ processSendVerificationEmail(t) {
2480
+ const e = t.status;
2481
+ let n = {};
2482
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2483
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2484
+ }
2485
+ /**
2486
+ * @param body (optional)
2487
+ * @return OK
2488
+ */
2489
+ confirmEmail(t, e) {
2490
+ let n = this.baseUrl + "/api/platform/security/users/{userId}/confirmEmail";
2491
+ if (t == null)
2492
+ throw new globalThis.Error("The parameter 'userId' must be defined.");
2493
+ n = n.replace("{userId}", encodeURIComponent("" + t)), n = n.replace(/[?&]$/, "");
2494
+ let a = {
2495
+ body: JSON.stringify(e),
2496
+ method: "POST",
2497
+ headers: {
2498
+ "Content-Type": "application/json-patch+json",
2499
+ Accept: "application/json"
2500
+ }
2501
+ };
2502
+ return this.transformOptions(a).then((o) => this.http.fetch(n, o)).then((o) => this.processConfirmEmail(o));
2503
+ }
2504
+ processConfirmEmail(t) {
2505
+ const e = t.status;
2506
+ let n = {};
2507
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2508
+ let a = null;
2509
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2510
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2511
+ }
2512
+ /**
2513
+ * @param newEmail (optional)
2514
+ * @return OK
2515
+ */
2516
+ generateChangeEmailToken(t, e) {
2517
+ let n = this.baseUrl + "/api/platform/security/users/{userId}/generateChangeEmailToken?";
2518
+ if (t == null)
2519
+ throw new globalThis.Error("The parameter 'userId' must be defined.");
2520
+ if (n = n.replace("{userId}", encodeURIComponent("" + t)), e === null)
2521
+ throw new globalThis.Error("The parameter 'newEmail' cannot be null.");
2522
+ e !== void 0 && (n += "newEmail=" + encodeURIComponent("" + e) + "&"), n = n.replace(/[?&]$/, "");
2523
+ let r = {
2524
+ method: "GET",
2525
+ headers: {
2526
+ Accept: "application/json"
2527
+ }
2528
+ };
2529
+ return this.transformOptions(r).then((a) => this.http.fetch(n, a)).then((a) => this.processGenerateChangeEmailToken(a));
2530
+ }
2531
+ processGenerateChangeEmailToken(t) {
2532
+ const e = t.status;
2533
+ let n = {};
2534
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2535
+ let a = null;
2536
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2537
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2538
+ }
2539
+ /**
2540
+ * @return OK
2541
+ */
2542
+ generateEmailConfirmationToken(t) {
2543
+ let e = this.baseUrl + "/api/platform/security/users/{userId}/generateEmailConfirmationToken";
2544
+ if (t == null)
2545
+ throw new globalThis.Error("The parameter 'userId' must be defined.");
2546
+ e = e.replace("{userId}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
2547
+ let n = {
2548
+ method: "GET",
2549
+ headers: {
2550
+ Accept: "application/json"
2551
+ }
2552
+ };
2553
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processGenerateEmailConfirmationToken(r));
2554
+ }
2555
+ processGenerateEmailConfirmationToken(t) {
2556
+ const e = t.status;
2557
+ let n = {};
2558
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2559
+ let a = null;
2560
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2561
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2562
+ }
2563
+ /**
2564
+ * @return OK
2565
+ */
2566
+ generatePasswordResetToken(t) {
2567
+ let e = this.baseUrl + "/api/platform/security/users/{userId}/generatePasswordResetToken";
2568
+ if (t == null)
2569
+ throw new globalThis.Error("The parameter 'userId' must be defined.");
2570
+ e = e.replace("{userId}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
2571
+ let n = {
2572
+ method: "GET",
2573
+ headers: {
2574
+ Accept: "application/json"
2575
+ }
2576
+ };
2577
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processGeneratePasswordResetToken(r));
2578
+ }
2579
+ processGeneratePasswordResetToken(t) {
2580
+ const e = t.status;
2581
+ let n = {};
2582
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2583
+ let a = null;
2584
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2585
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2586
+ }
2587
+ /**
2588
+ * @param tokenProvider (optional)
2589
+ * @param purpose (optional)
2590
+ * @return OK
2591
+ */
2592
+ generateUserToken(t, e, n) {
2593
+ let r = this.baseUrl + "/api/platform/security/users/{userId}/generateToken?";
2594
+ if (t == null)
2595
+ throw new globalThis.Error("The parameter 'userId' must be defined.");
2596
+ if (r = r.replace("{userId}", encodeURIComponent("" + t)), e === null)
2597
+ throw new globalThis.Error("The parameter 'tokenProvider' cannot be null.");
2598
+ if (e !== void 0 && (r += "tokenProvider=" + encodeURIComponent("" + e) + "&"), n === null)
2599
+ throw new globalThis.Error("The parameter 'purpose' cannot be null.");
2600
+ n !== void 0 && (r += "purpose=" + encodeURIComponent("" + n) + "&"), r = r.replace(/[?&]$/, "");
2601
+ let a = {
2602
+ method: "GET",
2603
+ headers: {
2604
+ Accept: "application/json"
2605
+ }
2606
+ };
2607
+ return this.transformOptions(a).then((o) => this.http.fetch(r, o)).then((o) => this.processGenerateUserToken(o));
2608
+ }
2609
+ processGenerateUserToken(t) {
2610
+ const e = t.status;
2611
+ let n = {};
2612
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2613
+ let a = null;
2614
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2615
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2616
+ }
2617
+ /**
2618
+ * @param body (optional)
2619
+ * @return OK
2620
+ */
2621
+ verifyUserToken(t, e) {
2622
+ let n = this.baseUrl + "/api/platform/security/users/{userId}/verifyToken";
2623
+ if (t == null)
2624
+ throw new globalThis.Error("The parameter 'userId' must be defined.");
2625
+ n = n.replace("{userId}", encodeURIComponent("" + t)), n = n.replace(/[?&]$/, "");
2626
+ let a = {
2627
+ body: JSON.stringify(e),
2628
+ method: "POST",
2629
+ headers: {
2630
+ "Content-Type": "application/json-patch+json",
2631
+ Accept: "application/json"
2632
+ }
2633
+ };
2634
+ return this.transformOptions(a).then((o) => this.http.fetch(n, o)).then((o) => this.processVerifyUserToken(o));
2635
+ }
2636
+ processVerifyUserToken(t) {
2637
+ const e = t.status;
2638
+ let n = {};
2639
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2640
+ let a = null;
2641
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2642
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2643
+ }
2644
+ }
2645
+ class Qr extends G {
2646
+ http;
2647
+ baseUrl;
2648
+ constructor(t, e) {
2649
+ super(), this.http = e || window, this.baseUrl = this.getBaseUrl("", t);
2650
+ }
2651
+ /**
2652
+ * Get all settings
2653
+ * @return OK
2654
+ */
2655
+ getAllGlobalSettings() {
2656
+ let t = this.baseUrl + "/api/platform/settings";
2657
+ t = t.replace(/[?&]$/, "");
2658
+ let e = {
2659
+ method: "GET",
2660
+ headers: {
2661
+ Accept: "application/json"
2662
+ }
2663
+ };
2664
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processGetAllGlobalSettings(n));
2665
+ }
2666
+ processGetAllGlobalSettings(t) {
2667
+ const e = t.status;
2668
+ let n = {};
2669
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2670
+ let a = null;
2671
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2672
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2673
+ }
2674
+ /**
2675
+ * Update settings values
2676
+ * @param body (optional)
2677
+ * @return No Content
2678
+ */
2679
+ update(t) {
2680
+ let e = this.baseUrl + "/api/platform/settings";
2681
+ e = e.replace(/[?&]$/, "");
2682
+ let r = {
2683
+ body: JSON.stringify(t),
2684
+ method: "POST",
2685
+ headers: {
2686
+ "Content-Type": "application/json-patch+json"
2687
+ }
2688
+ };
2689
+ return this.transformOptions(r).then((a) => this.http.fetch(e, a)).then((a) => this.processUpdate(a));
2690
+ }
2691
+ processUpdate(t) {
2692
+ const e = t.status;
2693
+ let n = {};
2694
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 204 ? t.text().then((r) => {
2695
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2696
+ }
2697
+ /**
2698
+ * Get settings registered by specific module
2699
+ * @param id Module ID.
2700
+ * @return OK
2701
+ */
2702
+ getGlobalModuleSettings(t) {
2703
+ let e = this.baseUrl + "/api/platform/settings/modules/{id}";
2704
+ if (t == null)
2705
+ throw new globalThis.Error("The parameter 'id' must be defined.");
2706
+ e = e.replace("{id}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
2707
+ let n = {
2708
+ method: "GET",
2709
+ headers: {
2710
+ Accept: "application/json"
2711
+ }
2712
+ };
2713
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processGetGlobalModuleSettings(r));
2714
+ }
2715
+ processGetGlobalModuleSettings(t) {
2716
+ const e = t.status;
2717
+ let n = {};
2718
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2719
+ let a = null;
2720
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2721
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2722
+ }
2723
+ /**
2724
+ * Get setting details by name
2725
+ * @param name Setting system name.
2726
+ * @return OK
2727
+ */
2728
+ getGlobalSetting(t) {
2729
+ let e = this.baseUrl + "/api/platform/settings/{name}";
2730
+ if (t == null)
2731
+ throw new globalThis.Error("The parameter 'name' must be defined.");
2732
+ e = e.replace("{name}", encodeURIComponent("" + t)), e = e.replace(/[?&]$/, "");
2733
+ let n = {
2734
+ method: "GET",
2735
+ headers: {
2736
+ Accept: "application/json"
2737
+ }
2738
+ };
2739
+ return this.transformOptions(n).then((r) => this.http.fetch(e, r)).then((r) => this.processGetGlobalSetting(r));
2740
+ }
2741
+ processGetGlobalSetting(t) {
2742
+ const e = t.status;
2743
+ let n = {};
2744
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2745
+ let a = null;
2746
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2747
+ }) : e === 401 ? t.text().then((r) => i("Unauthorized", e, r, n)) : e === 403 ? t.text().then((r) => i("Forbidden", e, r, n)) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2748
+ }
2749
+ /**
2750
+ * Get UI customization setting
2751
+ * @return OK
2752
+ */
2753
+ getUICustomizationSetting() {
2754
+ let t = this.baseUrl + "/api/platform/settings/ui/customization";
2755
+ t = t.replace(/[?&]$/, "");
2756
+ let e = {
2757
+ method: "GET",
2758
+ headers: {
2759
+ Accept: "application/json"
2760
+ }
2761
+ };
2762
+ return this.transformOptions(e).then((n) => this.http.fetch(t, n)).then((n) => this.processGetUICustomizationSetting(n));
2763
+ }
2764
+ processGetUICustomizationSetting(t) {
2765
+ const e = t.status;
2766
+ let n = {};
2767
+ return t.headers && t.headers.forEach && t.headers.forEach((r, a) => n[a] = r), e === 200 ? t.text().then((r) => {
2768
+ let a = null;
2769
+ return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
2770
+ }) : e !== 200 && e !== 204 ? t.text().then((r) => i("An unexpected server error occurred.", e, r, n)) : Promise.resolve(null);
2771
+ }
2772
+ }
2773
+ var Ve = /* @__PURE__ */ ((s) => (s.Undefined = "Undefined", s.ShortText = "ShortText", s.LongText = "LongText", s.Integer = "Integer", s.Decimal = "Decimal", s.DateTime = "DateTime", s.Boolean = "Boolean", s.Html = "Html", s.Image = "Image", s))(Ve || {}), et = /* @__PURE__ */ ((s) => (s.Detached = "Detached", s.Unchanged = "Unchanged", s.Added = "Added", s.Deleted = "Deleted", s.Modified = "Modified", s))(et || {}), tt = /* @__PURE__ */ ((s) => (s.Undefined = "Undefined", s.Object = "Object", s.Array = "Array", s.String = "String", s.Number = "Number", s.True = "True", s.False = "False", s.Null = "Null", s))(tt || {}), rt = /* @__PURE__ */ ((s) => (s.Info = "Info", s.Warning = "Warning", s.Debug = "Debug", s.Error = "Error", s))(rt || {}), nt = /* @__PURE__ */ ((s) => (s.ShortText = "ShortText", s.LongText = "LongText", s.Integer = "Integer", s.Decimal = "Decimal", s.DateTime = "DateTime", s.Boolean = "Boolean", s.SecureString = "SecureString", s.Json = "Json", s.PositiveInteger = "PositiveInteger", s))(nt || {}), at = /* @__PURE__ */ ((s) => (s.Ascending = "Ascending", s.Descending = "Descending", s))(at || {}), st = /* @__PURE__ */ ((s) => (s.Undefined = "Undefined", s.ShortText = "ShortText", s.LongText = "LongText", s.Integer = "Integer", s.Decimal = "Decimal", s.DateTime = "DateTime", s.Boolean = "Boolean", s.Html = "Html", s.Image = "Image", s))(st || {}), it = /* @__PURE__ */ ((s) => (s.Undefined = "Undefined", s.ShortText = "ShortText", s.LongText = "LongText", s.Integer = "Integer", s.Decimal = "Decimal", s.DateTime = "DateTime", s.Boolean = "Boolean", s.Html = "Html", s.Image = "Image", s))(it || {}), ot = /* @__PURE__ */ ((s) => (s.Undefined = "Undefined", s.ShortText = "ShortText", s.LongText = "LongText", s.Integer = "Integer", s.Decimal = "Decimal", s.DateTime = "DateTime", s.Boolean = "Boolean", s.Html = "Html", s.Image = "Image", s))(ot || {}), lt = /* @__PURE__ */ ((s) => (s.Undefined = "Undefined", s.Object = "Object", s.Array = "Array", s.String = "String", s.Number = "Number", s.True = "True", s.False = "False", s.Null = "Null", s))(lt || {}), ut = /* @__PURE__ */ ((s) => (s.ShortText = "ShortText", s.LongText = "LongText", s.Integer = "Integer", s.Decimal = "Decimal", s.DateTime = "DateTime", s.Boolean = "Boolean", s.SecureString = "SecureString", s.Json = "Json", s.PositiveInteger = "PositiveInteger", s))(ut || {}), ht = /* @__PURE__ */ ((s) => (s.Detached = "Detached", s.Unchanged = "Unchanged", s.Added = "Added", s.Deleted = "Deleted", s.Modified = "Modified", s))(ht || {}), ct = /* @__PURE__ */ ((s) => (s.Info = "Info", s.Warning = "Warning", s.Debug = "Debug", s.Error = "Error", s))(ct || {}), dt = /* @__PURE__ */ ((s) => (s.Ascending = "Ascending", s.Descending = "Descending", s))(dt || {});
2774
+ class ft extends Error {
2775
+ message;
2776
+ status;
2777
+ response;
2778
+ headers;
2779
+ result;
2780
+ constructor(t, e, n, r, a) {
2781
+ super(), this.message = t, this.status = e, this.response = n, this.headers = r, this.result = a;
2782
+ }
2783
+ isApiException = !0;
2784
+ static isApiException(t) {
2785
+ return t.isApiException === !0;
2786
+ }
2787
+ }
2788
+ function i(s, t, e, n, r) {
2789
+ throw r ?? new ft(s, t, e, n, null);
2790
+ }
2791
+ const se = k("use-external-provider"), pt = "externalSignIn", mt = () => {
2792
+ const s = new Ye(), t = $e(
2793
+ pt,
2794
+ {},
2795
+ {
2796
+ listenToStorageChanges: !0,
2797
+ deep: !0
2798
+ }
2799
+ );
2800
+ function e() {
2801
+ const { searchParams: o } = new URL(location.href);
2802
+ return o.get("returnUrl") || o.get("ReturnUrl");
2803
+ }
2804
+ async function n(o) {
2805
+ try {
2806
+ const u = window.location.origin, f = window.location.pathname ?? e() ?? "/";
2807
+ if (!o)
2808
+ throw new Error("The parameter 'authenticationType' cannot be null or undefined.");
2809
+ const v = new URL("/externalsignin", u);
2810
+ v.searchParams.set("authenticationType", o), v.searchParams.set("returnUrl", f), t.value = { providerType: o }, window.location.assign(v);
2811
+ } catch (u) {
2812
+ throw se.error("External sign-in failed:", u), u;
2813
+ }
2814
+ }
2815
+ async function r(o) {
2816
+ try {
2817
+ const u = window.location.origin, f = window.location.pathname ?? "/", v = new URL("/externalsignin/signout", u);
2818
+ v.searchParams.set("authenticationType", o), v.searchParams.set("returnUrl", f), t.value = {}, window.location.assign(v);
2819
+ } catch (u) {
2820
+ throw se.error("External sign-out failed:", u), u;
2821
+ }
2822
+ }
2823
+ async function a() {
2824
+ let o;
2825
+ try {
2826
+ o = await s.getExternalLoginProviders();
2827
+ } catch (u) {
2828
+ se.error("Failed to get external login providers:", u);
2829
+ }
2830
+ return o;
2831
+ }
2832
+ return {
2833
+ storage: t,
2834
+ signIn: n,
2835
+ signOut: r,
2836
+ getProviders: a
2837
+ };
2838
+ }, le = "vc_auth_data", y = k("use-user"), q = D();
2839
+ function vt() {
2840
+ try {
2841
+ const s = localStorage.getItem(le);
2842
+ if (s)
2843
+ return JSON.parse(s);
2844
+ } catch (s) {
2845
+ y.error("Failed to read auth data from storage:", s);
2846
+ }
2847
+ return null;
2848
+ }
2849
+ function de(s) {
2850
+ try {
2851
+ y.debug("storeAuthData - Saving:", s), localStorage.setItem(le, JSON.stringify(s)), y.debug("storeAuthData - Saved successfully");
2852
+ } catch (t) {
2853
+ y.error("Failed to store auth data:", t);
2854
+ }
2855
+ }
2856
+ function gt() {
2857
+ try {
2858
+ localStorage.removeItem(le);
2859
+ } catch (s) {
2860
+ y.error("Failed to clear auth data:", s);
2861
+ }
2862
+ }
2863
+ async function fe(s) {
2864
+ try {
2865
+ const t = new URLSearchParams(s).toString(), e = await fetch("/connect/token", {
2866
+ method: "POST",
2867
+ headers: {
2868
+ "Content-Type": "application/x-www-form-urlencoded"
2869
+ },
2870
+ body: t
2871
+ });
2872
+ if (!e.ok) {
2873
+ const f = await e.text();
2874
+ return y.error("fetchToken - HTTP error:", e.status, e.statusText, f), null;
2875
+ }
2876
+ const n = await e.json();
2877
+ y.debug("fetchToken - Response:", n);
2878
+ const r = n.access_token, a = n.refresh_token, o = n.expires_in;
2879
+ if (n.error || !r)
2880
+ return y.error("fetchToken - Error:", n.error_description || n.error || "No access token"), null;
2881
+ const u = o ? Date.now() + o * 1e3 : null;
2882
+ return {
2883
+ token: r,
2884
+ access_token: r,
2885
+ refresh_token: a ?? null,
2886
+ expires_at: u
2887
+ };
2888
+ } catch (t) {
2889
+ return y.error("fetchToken - Exception:", t), null;
2890
+ }
2891
+ }
2892
+ function xt() {
2893
+ const s = D(!1), t = D(null), { storage: e, signOut: n } = mt(), r = new Qe(), a = A(() => q.value?.userName != null);
2894
+ async function o(x, S) {
2895
+ let p = !1;
2896
+ try {
2897
+ s.value = !0, p = await r.validatePasswordResetToken(x, {
2898
+ token: S
2899
+ });
2900
+ } catch {
2901
+ } finally {
2902
+ s.value = !1;
2903
+ }
2904
+ return p;
2905
+ }
2906
+ async function u(x) {
2907
+ return r.validatePassword(x);
2908
+ }
2909
+ async function f(x, S, p) {
2910
+ return r.resetPasswordByToken(x, {
2911
+ newPassword: S,
2912
+ token: p
2913
+ });
2914
+ }
2915
+ async function v(x, S) {
2916
+ y.debug("signIn - Entry point");
2917
+ try {
2918
+ s.value = !0;
2919
+ const p = await r.login({ userName: x, password: S });
2920
+ if (y.debug("signIn - Cookie login completed:", p), !p.succeeded)
2921
+ return p;
2922
+ y.debug("signIn - Requesting token...");
2923
+ const T = await fe({
2924
+ grant_type: "password",
2925
+ username: x,
2926
+ password: S,
2927
+ scope: "offline_access"
2928
+ });
2929
+ T && (t.value = T, de(t.value), y.debug("signIn - Token saved:", t.value));
2930
+ const L = await r.getCurrentUser();
2931
+ if (L)
2932
+ return q.value = L, p;
2933
+ throw { succeeded: !1 };
2934
+ } catch (p) {
2935
+ y.error("signIn failed:", p);
2936
+ let T = p.message;
2937
+ if (p.response)
2938
+ try {
2939
+ const L = JSON.parse(p.response);
2940
+ T = L.errorDescription || L.errors?.[0]?.description || L.error || T;
2941
+ } catch {
2942
+ }
2943
+ return { succeeded: !1, error: T, status: p.status };
2944
+ } finally {
2945
+ s.value = !1;
2946
+ }
2947
+ }
2948
+ async function _() {
2949
+ y.debug("signOut - Entry point"), q.value = void 0, gt(), t.value = null, e.value?.providerType ? await n(e.value.providerType) : r.logout();
2950
+ }
2951
+ let d = null;
2952
+ async function c() {
2953
+ return d || (d = (async () => {
2954
+ y.debug("loadUser - Entry point");
2955
+ try {
2956
+ s.value = !0, performance.mark("vc:auth-start");
2957
+ const [x] = await Promise.all([r.getCurrentUser(), O()]);
2958
+ q.value = x, performance.mark("vc:auth-done"), y.debug("User details loaded:", q.value);
2959
+ } catch (x) {
2960
+ y.error("loadUser failed:", x);
2961
+ } finally {
2962
+ s.value = !1, d = null;
2963
+ }
2964
+ return { ...q.value };
2965
+ })(), d);
2966
+ }
2967
+ async function g(x) {
2968
+ try {
2969
+ return s.value = !0, await r.requestPasswordReset(x), { succeeded: !0 };
2970
+ } catch (S) {
2971
+ return { succeeded: !1, error: S };
2972
+ } finally {
2973
+ s.value = !1;
2974
+ }
2975
+ }
2976
+ async function C(x, S) {
2977
+ let p;
2978
+ try {
2979
+ s.value = !0;
2980
+ const T = {
2981
+ oldPassword: x,
2982
+ newPassword: S
2983
+ };
2984
+ p = await r.changeCurrentUserPassword(T);
2985
+ } catch (T) {
2986
+ return { succeeded: !1, errors: [T.message] };
2987
+ } finally {
2988
+ s.value = !1;
2989
+ }
2990
+ return p;
2991
+ }
2992
+ async function R() {
2993
+ let x = null;
2994
+ try {
2995
+ x = await r.getLoginTypes();
2996
+ } catch (S) {
2997
+ throw y.error("getLoginType failed:", S), S;
2998
+ }
2999
+ return x;
3000
+ }
3001
+ const b = 60 * 1e3;
3002
+ async function O() {
3003
+ if (y.debug("getAccessToken - Entry point"), t.value || (t.value = vt()), !t.value)
3004
+ return y.debug("getAccessToken - No auth data available"), null;
3005
+ const x = Date.now(), S = t.value.expires_at, p = S ? x >= S - b : !1;
3006
+ if (y.debug("getAccessToken - Token status:", {
3007
+ hasToken: !!t.value.access_token,
3008
+ expiresAt: S ? new Date(S).toISOString() : "not set",
3009
+ now: new Date(x).toISOString(),
3010
+ shouldRefresh: p,
3011
+ hasRefreshToken: !!t.value.refresh_token
3012
+ }), p && t.value.refresh_token) {
3013
+ y.debug("getAccessToken - Token expired or expiring soon, attempting refresh");
3014
+ const T = await fe({
3015
+ grant_type: "refresh_token",
3016
+ refresh_token: t.value.refresh_token,
3017
+ scope: "offline_access"
3018
+ });
3019
+ T ? (T.refresh_token = T.refresh_token ?? t.value.refresh_token, t.value = T, de(t.value), y.debug("getAccessToken - Token refreshed successfully, new expiry:", {
3020
+ expiresAt: T.expires_at ? new Date(T.expires_at).toISOString() : "not set"
3021
+ })) : y.warn("getAccessToken - Failed to refresh token, returning existing token");
3022
+ }
3023
+ return t.value?.access_token ?? t.value?.token ?? null;
3024
+ }
3025
+ return {
3026
+ user: A(() => q.value),
3027
+ loading: A(() => s.value),
3028
+ isAdministrator: A(() => q.value?.isAdministrator),
3029
+ isAuthenticated: a,
3030
+ loadUser: c,
3031
+ signIn: v,
3032
+ signOut: _,
3033
+ validateToken: o,
3034
+ validatePassword: u,
3035
+ resetPasswordByToken: f,
3036
+ requestPasswordReset: g,
3037
+ changeUserPassword: C,
3038
+ getLoginType: R,
3039
+ getAccessToken: O
3040
+ };
3041
+ }
3042
+ const bt = Fe(() => {
3043
+ const s = xt();
3044
+ return {
3045
+ user: s.user,
3046
+ loading: s.loading,
3047
+ isAuthenticated: s.isAuthenticated,
3048
+ isAdministrator: s.isAdministrator,
3049
+ loadUser: s.loadUser,
3050
+ signOut: s.signOut,
3051
+ getAccessToken: s.getAccessToken
3052
+ };
3053
+ });
3054
+ let ye, Se, we, Et;
3055
+ function Vr(s) {
3056
+ ye = s;
3057
+ }
3058
+ function en(s) {
3059
+ Se = s;
3060
+ }
3061
+ function tn(s) {
3062
+ we = s;
3063
+ }
3064
+ function rn(s) {
3065
+ Et = s;
3066
+ }
3067
+ function pe(s, t) {
3068
+ if (t.length === 0)
3069
+ return { path: s ? `/${s}` : "/", query: {} };
3070
+ const e = t[0], n = me(e.url);
3071
+ let r;
3072
+ for (let u = t.length - 1; u >= 1; u--)
3073
+ if (t[u].visible) {
3074
+ r = t[u];
3075
+ break;
3076
+ }
3077
+ let a = s ? `/${s}` : "";
3078
+ if (n && (a += `/${n}`), r) {
3079
+ const u = me(r.url);
3080
+ u && (a += `/${u}`), r.param && (a += `/${r.param}`);
3081
+ }
3082
+ const o = {};
3083
+ for (const u of t)
3084
+ u.visible && u.query && Object.assign(o, u.query);
3085
+ return { path: a || "/", query: o };
3086
+ }
3087
+ function nn(s, t) {
3088
+ let e = s.split("/").filter(Boolean);
3089
+ return t && e.length > 0 && e[0] === t && (e = e.slice(1)), e.length === 0 ? {} : {
3090
+ workspaceUrl: e[0],
3091
+ bladeUrl: e[1],
3092
+ param: e[2]
3093
+ };
3094
+ }
3095
+ function me(s) {
3096
+ if (s)
3097
+ return s.replace(/^\/+|\/+$/g, "") || void 0;
3098
+ }
3099
+ function ve(s) {
3100
+ const t = s.currentRoute.value.params;
3101
+ return Object.values(t).find((e) => typeof e == "string" && e) || "";
3102
+ }
3103
+ function _t(s, t) {
3104
+ function e() {
3105
+ const { path: r, query: a } = pe(ve(s), t.blades.value);
3106
+ s.push({ path: r, query: a });
3107
+ }
3108
+ function n() {
3109
+ const { path: r, query: a } = pe(ve(s), t.blades.value);
3110
+ s.replace({ path: r, query: a });
3111
+ }
3112
+ return { syncUrlPush: e, syncUrlReplace: n };
3113
+ }
3114
+ const Ct = "useBlade() was called outside a blade. Navigation methods (openBlade) work everywhere, but blade-specific methods require the component to be rendered inside VcBladeSlot.";
3115
+ function P(s) {
3116
+ throw new Error(`[vc-shell] ${s} requires blade context.
3117
+ ${Ct}`);
3118
+ }
3119
+ function Ut() {
3120
+ const s = (V() ? z(Te, void 0) : void 0) ?? Se, t = (V() ? z(Me, void 0) : void 0) ?? we;
3121
+ if (!s || !t)
3122
+ throw new Error(
3123
+ "[vc-shell] useBlade() failed: BladeStack or BladeMessaging not available. Ensure BladeNavigationPlugin (plugin-v2) is installed."
3124
+ );
3125
+ const e = s, n = t, r = V() ? z(ze, void 0) : void 0, a = V() ? z(Ke, void 0) : void 0;
3126
+ let o;
3127
+ function u() {
3128
+ if (o) return o;
3129
+ const E = ye?.router;
3130
+ return E && (o = _t(E, e)), o;
3131
+ }
3132
+ const f = A(() => (r || P("id"), r.value.id)), v = A(() => (r || P("param"), r.value.param)), _ = A(() => (r || P("options"), r.value.options)), d = A(() => (r || P("query"), r.value.query)), c = A(() => (r || P("closable"), r.value.parentId !== void 0)), g = A(() => (r || P("expanded"), e.activeBlade.value?.id === r.value.id)), C = A(() => (r || P("name"), r.value.name));
3133
+ let R = !1;
3134
+ function b(E) {
3135
+ if (R) {
3136
+ console.warn(
3137
+ "[vc-shell] provideBladeData() called more than once in the same blade. Only the first call takes effect."
3138
+ );
3139
+ return;
3140
+ }
3141
+ R = !0;
3142
+ const j = Re(E) ? E : D(E);
3143
+ xe(Je, j);
3144
+ }
3145
+ async function O(E) {
3146
+ const { isWorkspace: j, ...ae } = E;
3147
+ if (j)
3148
+ await e.openWorkspace(ae);
3149
+ else {
3150
+ const he = r?.value.id;
3151
+ he ? await e.openBlade({ ...ae, parentId: he }) : await e.openBlade(ae);
3152
+ }
3153
+ e.activeBlade.value?.url && u()?.syncUrlPush();
3154
+ }
3155
+ async function x() {
3156
+ r || P("closeSelf()");
3157
+ const E = await e.closeBlade(r.value.id);
3158
+ return E || u()?.syncUrlReplace(), E;
3159
+ }
3160
+ async function S() {
3161
+ r || P("closeChildren()"), await e.closeChildren(r.value.id), u()?.syncUrlReplace();
3162
+ }
3163
+ async function p(E) {
3164
+ r || P("replaceWith()"), await e.replaceCurrentBlade({
3165
+ ...E,
3166
+ parentId: r.value.parentId
3167
+ }), e.activeBlade.value?.url && u()?.syncUrlReplace();
3168
+ }
3169
+ async function T(E) {
3170
+ r || P("coverWith()"), await e.coverCurrentBlade({
3171
+ ...E,
3172
+ parentId: r.value.parentId
3173
+ }), e.activeBlade.value?.url && u()?.syncUrlPush();
3174
+ }
3175
+ async function L(E, j) {
3176
+ return r || P("callParent()"), n.callParent(r.value.id, E, j);
3177
+ }
3178
+ function Z(E) {
3179
+ r || P("exposeToChildren()"), n.exposeToChildren(r.value.id, E);
3180
+ }
3181
+ function X(E) {
3182
+ r || P("onBeforeClose()"), e.registerBeforeClose(r.value.id, E);
3183
+ }
3184
+ function l(E) {
3185
+ r || P("setError()"), e.setBladeError(r.value.id, E);
3186
+ }
3187
+ function h() {
3188
+ r || P("clearError()"), e.clearBladeError(r.value.id);
3189
+ }
3190
+ let m = 0;
3191
+ function U(E) {
3192
+ a || P("addBanner()");
3193
+ const j = `banner-${r.value.id}-${++m}`;
3194
+ return a.value.push({
3195
+ ...E,
3196
+ id: j,
3197
+ dismissible: E.dismissible ?? !1
3198
+ }), j;
3199
+ }
3200
+ function w(E) {
3201
+ a || P("removeBanner()"), a.value = a.value.filter((j) => j.id !== E);
3202
+ }
3203
+ function B() {
3204
+ a || P("clearBanners()"), a.value = a.value.filter((E) => E._system);
3205
+ }
3206
+ let K = !1, ue = !1;
3207
+ function Oe(E) {
3208
+ if (r || P("onActivated()"), K) {
3209
+ console.warn("[useBlade] onActivated() already registered in this blade.");
3210
+ return;
3211
+ }
3212
+ K = !0, W(g, (j) => {
3213
+ j && E();
3214
+ });
3215
+ }
3216
+ function Ie(E) {
3217
+ if (r || P("onDeactivated()"), ue) {
3218
+ console.warn("[useBlade] onDeactivated() already registered in this blade.");
3219
+ return;
3220
+ }
3221
+ ue = !0, W(g, (j) => {
3222
+ j || E();
3223
+ });
3224
+ }
3225
+ return {
3226
+ id: f,
3227
+ param: v,
3228
+ options: _,
3229
+ query: d,
3230
+ closable: c,
3231
+ expanded: g,
3232
+ name: C,
3233
+ provideBladeData: b,
3234
+ openBlade: O,
3235
+ closeSelf: x,
3236
+ closeChildren: S,
3237
+ replaceWith: p,
3238
+ coverWith: T,
3239
+ callParent: L,
3240
+ exposeToChildren: Z,
3241
+ onBeforeClose: X,
3242
+ onActivated: Oe,
3243
+ onDeactivated: Ie,
3244
+ setError: l,
3245
+ clearError: h,
3246
+ addBanner: U,
3247
+ removeBanner: w,
3248
+ clearBanners: B
3249
+ };
3250
+ }
3251
+ let At = 0;
3252
+ function te() {
3253
+ return `blade_${++At}_${Math.random().toString(36).slice(2, 8)}`;
3254
+ }
3255
+ function an(s, t) {
3256
+ const e = D([]), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = A(() => e.value[0]), u = A(() => e.value), f = A(() => {
3257
+ for (let l = e.value.length - 1; l >= 0; l--)
3258
+ if (e.value[l].visible) return e.value[l];
3259
+ });
3260
+ function v(l) {
3261
+ n.delete(l), r.delete(l), a.delete(l);
3262
+ }
3263
+ function _(l) {
3264
+ const h = s.getBlade(l);
3265
+ if (h)
3266
+ return h.route;
3267
+ }
3268
+ async function d(l) {
3269
+ for (let h = l.length - 1; h >= 0; h--) {
3270
+ const m = n.get(l[h].id);
3271
+ if (m && await m())
3272
+ return !0;
3273
+ }
3274
+ return !1;
3275
+ }
3276
+ function c(l) {
3277
+ for (const h of l)
3278
+ a.get(h.id)?.(), v(h.id);
3279
+ }
3280
+ async function g(l) {
3281
+ if (o.value?.name === l.name) return;
3282
+ const m = s.getBlade(l.name);
3283
+ if (!m)
3284
+ throw new Error(`[BladeStack] Blade '${l.name}' not found in registry`);
3285
+ if (t && m.permissions && !t(m.permissions)) {
3286
+ console.warn(`[BladeStack] Access denied to workspace '${l.name}'`);
3287
+ return;
3288
+ }
3289
+ c([...e.value]);
3290
+ const U = {
3291
+ id: te(),
3292
+ name: l.name,
3293
+ url: _(l.name),
3294
+ // workspace blades don't have param when opened first
3295
+ query: l.query,
3296
+ options: l.options,
3297
+ visible: !0
3298
+ };
3299
+ e.value = [U], l.onOpen && r.set(U.id, l.onOpen), l.onClose && a.set(U.id, l.onClose), l.onOpen?.();
3300
+ }
3301
+ async function C(l) {
3302
+ if (!s.getBlade(l.name))
3303
+ throw new Error(`[BladeStack] Blade '${l.name}' not found in registry`);
3304
+ const h = l.parentId ?? f.value?.id ?? o.value?.id;
3305
+ if (!h)
3306
+ throw new Error("[BladeStack] Cannot open blade: no parent blade found");
3307
+ const m = e.value.findIndex((B) => B.id === h);
3308
+ if (m === -1)
3309
+ throw new Error(`[BladeStack] Parent blade '${h}' not found in stack`);
3310
+ const U = e.value.slice(m + 1);
3311
+ if (U.length > 0 && await d(U))
3312
+ return;
3313
+ c(U);
3314
+ const w = {
3315
+ id: te(),
3316
+ name: l.name,
3317
+ url: _(l.name),
3318
+ param: l.param,
3319
+ query: l.query,
3320
+ options: l.options,
3321
+ parentId: h,
3322
+ visible: !0
3323
+ };
3324
+ e.value = [...e.value.slice(0, m + 1), w], l.onOpen && r.set(w.id, l.onOpen), l.onClose && a.set(w.id, l.onClose), l.onOpen?.();
3325
+ }
3326
+ async function R(l) {
3327
+ const h = e.value.findIndex((B) => B.id === l);
3328
+ if (h === -1 || h === 0) return !1;
3329
+ const m = e.value.slice(h);
3330
+ if (await d(m)) return !0;
3331
+ c(m), e.value = e.value.slice(0, h);
3332
+ const w = e.value.length - 1;
3333
+ if (w > 0 && !e.value[w].visible) {
3334
+ const B = [...e.value];
3335
+ B[w] = { ...B[w], visible: !0 }, e.value = B;
3336
+ }
3337
+ return !1;
3338
+ }
3339
+ async function b(l) {
3340
+ const h = f.value;
3341
+ if (!h)
3342
+ throw new Error("[BladeStack] No active blade to replace");
3343
+ if (!s.getBlade(l.name))
3344
+ throw new Error(`[BladeStack] Blade '${l.name}' not found in registry`);
3345
+ const m = e.value.findIndex((K) => K.id === h.id);
3346
+ if (m === -1)
3347
+ throw new Error(`[BladeStack] Active blade '${h.id}' not found in stack`);
3348
+ const U = e.value.slice(m + 1);
3349
+ if (U.length > 0) {
3350
+ if (await d(U)) return;
3351
+ c(U);
3352
+ }
3353
+ const w = {
3354
+ id: te(),
3355
+ name: l.name,
3356
+ url: _(l.name),
3357
+ param: l.param,
3358
+ query: l.query,
3359
+ options: l.options,
3360
+ parentId: h.parentId,
3361
+ visible: !0
3362
+ };
3363
+ c([h]);
3364
+ const B = [...e.value.slice(0, m), w, ...e.value.slice(m + 1)];
3365
+ e.value = B, l.onOpen && r.set(w.id, l.onOpen), l.onClose && a.set(w.id, l.onClose), l.onOpen?.();
3366
+ }
3367
+ async function O(l) {
3368
+ const h = f.value;
3369
+ if (!h)
3370
+ throw new Error("[BladeStack] No active blade to cover");
3371
+ if (!s.getBlade(l.name))
3372
+ throw new Error(`[BladeStack] Blade '${l.name}' not found in registry`);
3373
+ const m = e.value.findIndex((K) => K.id === h.id);
3374
+ if (m === -1)
3375
+ throw new Error(`[BladeStack] Active blade '${h.id}' not found in stack`);
3376
+ const U = e.value.slice(m + 1);
3377
+ if (U.length > 0) {
3378
+ if (await d(U)) return;
3379
+ c(U);
3380
+ }
3381
+ const w = {
3382
+ id: te(),
3383
+ name: l.name,
3384
+ url: _(l.name),
3385
+ param: l.param,
3386
+ query: l.query,
3387
+ options: l.options,
3388
+ parentId: h.id,
3389
+ visible: !0
3390
+ }, B = e.value.slice(0, m);
3391
+ B.push({ ...h, visible: !1 }), B.push(w), e.value = B, l.onOpen && r.set(w.id, l.onOpen), l.onClose && a.set(w.id, l.onClose), l.onOpen?.();
3392
+ }
3393
+ async function x(l) {
3394
+ const h = e.value.findIndex((w) => w.id === l);
3395
+ if (h === -1) return;
3396
+ const m = e.value.slice(h + 1);
3397
+ m.length === 0 || await d(m) || (c(m), e.value = e.value.slice(0, h + 1));
3398
+ }
3399
+ function S(l, h) {
3400
+ n.set(l, h);
3401
+ }
3402
+ function p(l) {
3403
+ n.delete(l);
3404
+ }
3405
+ function T(l, h) {
3406
+ const m = e.value.findIndex((w) => w.id === l);
3407
+ if (m === -1) return;
3408
+ const U = [...e.value];
3409
+ U[m] = { ...U[m], error: h }, e.value = U;
3410
+ }
3411
+ function L(l) {
3412
+ const h = e.value.findIndex((U) => U.id === l);
3413
+ if (h === -1) return;
3414
+ const m = [...e.value];
3415
+ m[h] = { ...m[h], error: void 0 }, e.value = m;
3416
+ }
3417
+ function Z(l, h) {
3418
+ const m = e.value.findIndex((w) => w.id === l);
3419
+ if (m === -1 || e.value[m].title === h) return;
3420
+ const U = [...e.value];
3421
+ U[m] = { ...U[m], title: h }, e.value = U;
3422
+ }
3423
+ function X(l) {
3424
+ for (const h of e.value)
3425
+ v(h.id);
3426
+ e.value = l;
3427
+ }
3428
+ return {
3429
+ workspace: o,
3430
+ blades: u,
3431
+ activeBlade: f,
3432
+ openWorkspace: g,
3433
+ openBlade: C,
3434
+ closeBlade: R,
3435
+ closeChildren: x,
3436
+ replaceCurrentBlade: b,
3437
+ coverCurrentBlade: O,
3438
+ registerBeforeClose: S,
3439
+ unregisterBeforeClose: p,
3440
+ setBladeError: T,
3441
+ clearBladeError: L,
3442
+ setBladeTitle: Z,
3443
+ _restoreStack: X
3444
+ };
3445
+ }
3446
+ function Tt() {
3447
+ const s = z(Te);
3448
+ if (!s)
3449
+ throw new Error("[useBladeStack] BladeStack not found. Ensure BladeNavigationPlugin is installed.");
3450
+ return s;
3451
+ }
3452
+ const yt = {
3453
+ url: "",
3454
+ title: "Virto OZ",
3455
+ width: 362,
3456
+ expandedWidth: 500,
3457
+ allowedOrigins: ["*"]
3458
+ }, sn = "APP_AI_AGENT_URL", on = {
3459
+ EMBEDDED_APP_READY: "EMBEDDED_APP_READY",
3460
+ AI_TOGGLE_PANEL: "AI_TOGGLE_PANEL",
3461
+ AI_CONTEXT_UPDATE: "AI_CONTEXT_UPDATE",
3462
+ AI_CONTEXT_CLEAR: "AI_CONTEXT_CLEAR"
3463
+ }, ln = {
3464
+ EMBEDDED_HOST_READY: "EMBEDDED_HOST_READY",
3465
+ AI_CHAT_MESSAGE: "AI_CHAT_MESSAGE"
3466
+ }, St = "ai-agent-toggle", wt = "lucide-sparkles", Pt = "AI Assistant", re = k("ai-agent-panel");
3467
+ function Ot() {
3468
+ const s = D("closed"), t = D(!1), e = A(() => s.value !== "closed"), n = A(() => s.value === "expanded"), r = () => {
3469
+ s.value === "closed" && (s.value = "open", re.debug("Panel opened"));
3470
+ }, a = () => {
3471
+ s.value = "closed", t.value = !1, re.debug("Panel closed, reset initialized state");
3472
+ };
3473
+ return {
3474
+ panelState: s,
3475
+ isOpen: e,
3476
+ isExpanded: n,
3477
+ isInitialized: t,
3478
+ open: r,
3479
+ close: a,
3480
+ toggle: () => {
3481
+ s.value === "closed" ? r() : a();
3482
+ },
3483
+ expand: () => {
3484
+ s.value === "open" && (s.value = "expanded", re.debug("Panel expanded"));
3485
+ },
3486
+ collapse: () => {
3487
+ s.value === "expanded" && (s.value = "open", re.debug("Panel collapsed"));
3488
+ },
3489
+ resetInitialized: () => {
3490
+ t.value = !1;
3491
+ }
3492
+ };
3493
+ }
3494
+ const ie = k("ai-agent-context");
3495
+ function ge(s) {
3496
+ return s ? {
3497
+ id: s.id,
3498
+ name: s.name,
3499
+ title: s.title || s.name,
3500
+ param: s.param
3501
+ } : { id: "unknown", name: "unknown", title: "Unknown" };
3502
+ }
3503
+ function It(s) {
3504
+ const { userGetter: t, bladeGetter: e, localeGetter: n, tokenGetter: r } = s, a = D(/* @__PURE__ */ new Map()), o = () => {
3505
+ const C = e();
3506
+ return C ? a.value.get(C.id) ?? {
3507
+ items: [],
3508
+ type: "list",
3509
+ suggestions: void 0
3510
+ } : {
3511
+ items: [],
3512
+ type: "list",
3513
+ suggestions: void 0
3514
+ };
3515
+ }, u = A(() => o().items), f = A(() => o().type), v = A(() => o().suggestions), _ = A(() => u.value.length);
3516
+ return {
3517
+ contextItems: u,
3518
+ contextType: f,
3519
+ contextSuggestions: v,
3520
+ totalItemsCount: _,
3521
+ setContextData: (C, R, b, O) => {
3522
+ const x = e()?.id || O;
3523
+ return x ? C.length === 0 && !b ? (a.value.delete(x), ie.debug(`Context cleared for blade: ${x}`), { cleared: !0 }) : (a.value.set(x, { items: C, type: R, suggestions: b }), ie.debug(`Context set for blade: ${x}, items: ${C.length}, type: ${R}`), { cleared: !1 }) : (ie.warn("Cannot set context data: no blade id available"), { cleared: !1 });
3524
+ },
3525
+ buildInitPayload: async () => {
3526
+ const C = r ? await r() ?? void 0 : void 0;
3527
+ return {
3528
+ userId: t()?.id || "",
3529
+ locale: n(),
3530
+ blade: ge(e()),
3531
+ contextType: f.value,
3532
+ items: ee(u.value),
3533
+ suggestions: v.value ? ee(v.value) : void 0,
3534
+ accessToken: C
3535
+ };
3536
+ },
3537
+ buildUpdatePayload: async () => {
3538
+ const C = r ? await r() ?? void 0 : void 0;
3539
+ return {
3540
+ blade: ge(e()),
3541
+ contextType: f.value,
3542
+ items: ee(u.value),
3543
+ suggestions: v.value ? ee(v.value) : void 0,
3544
+ locale: n(),
3545
+ accessToken: C
3546
+ };
3547
+ }
3548
+ };
3549
+ }
3550
+ const N = k("ai-agent-transport");
3551
+ function Rt(s) {
3552
+ try {
3553
+ const t = atob(s.content), e = new Array(t.length);
3554
+ for (let o = 0; o < t.length; o++)
3555
+ e[o] = t.charCodeAt(o);
3556
+ const n = new Blob([new Uint8Array(e)], { type: s.contentType }), r = URL.createObjectURL(n), a = document.createElement("a");
3557
+ a.href = r, a.download = s.filename, document.body.appendChild(a), a.click(), document.body.removeChild(a), URL.revokeObjectURL(r), N.debug(`File downloaded: ${s.filename}`);
3558
+ } catch (t) {
3559
+ N.error("Failed to download file:", t);
3560
+ }
3561
+ }
3562
+ function Bt(s) {
3563
+ const { getConfig: t, isEmbedded: e, navigateToBlade: n, reloadBlade: r } = s, a = Be(null), o = D(!1), u = D(!1), f = /* @__PURE__ */ new Set(), v = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Set();
3564
+ function d(g, C) {
3565
+ switch (g) {
3566
+ case "PREVIEW_CHANGES": {
3567
+ const b = C;
3568
+ v.size === 0 && N.warn("No preview changes handlers registered!"), v.forEach((O) => {
3569
+ try {
3570
+ O(b);
3571
+ } catch (x) {
3572
+ N.error("Error in preview handler:", x);
3573
+ }
3574
+ });
3575
+ break;
3576
+ }
3577
+ case "NAVIGATE_TO_APP": {
3578
+ const b = C;
3579
+ n && b?.bladeName && (n(b.bladeName, b.param, b.options), N.debug(`Navigation requested to: ${b.bladeName}`));
3580
+ break;
3581
+ }
3582
+ case "RELOAD_BLADE":
3583
+ r && (r(), N.debug("Blade reload requested"));
3584
+ break;
3585
+ case "DOWNLOAD_FILE": {
3586
+ const b = C;
3587
+ b && Rt(b);
3588
+ break;
3589
+ }
3590
+ case "APPLY_CHANGES": {
3591
+ const b = C;
3592
+ N.warn("APPLY_CHANGES received but not implemented:", b?.changes);
3593
+ break;
3594
+ }
3595
+ case "CHAT_ERROR": {
3596
+ const b = C;
3597
+ N.error(`Chatbot error [${b?.code}]: ${b?.message}`);
3598
+ break;
3599
+ }
3600
+ }
3601
+ const R = {
3602
+ type: g,
3603
+ payload: C,
3604
+ timestamp: Date.now()
3605
+ };
3606
+ f.forEach((b) => {
3607
+ try {
3608
+ b(R);
3609
+ } catch (O) {
3610
+ N.error("Handler error:", O);
3611
+ }
3612
+ });
3613
+ }
3614
+ function c(g) {
3615
+ const R = t().allowedOrigins || ["*"];
3616
+ if (!R.includes("*") && !R.includes(g.origin))
3617
+ return;
3618
+ const b = g.data;
3619
+ if (!(!b?.type || typeof b.type != "string"))
3620
+ switch (N.debug(`Message received: ${b.type}`), b.type) {
3621
+ // Embedded: parent forwards chat messages wrapped in AI_CHAT_MESSAGE
3622
+ case "AI_CHAT_MESSAGE": {
3623
+ if (e) {
3624
+ const O = b.payload;
3625
+ O?.type && d(O.type, O.payload);
3626
+ }
3627
+ return;
3628
+ }
3629
+ // Normal: chatbot signals it's ready
3630
+ case "CHAT_READY":
3631
+ _.forEach((O) => {
3632
+ try {
3633
+ O();
3634
+ } catch (x) {
3635
+ N.error("ChatReady handler error:", x);
3636
+ }
3637
+ });
3638
+ break;
3639
+ // Normal: direct chat protocol messages
3640
+ default:
3641
+ d(b.type, b.payload);
3642
+ break;
3643
+ }
3644
+ }
3645
+ return {
3646
+ iframeRef: a,
3647
+ pendingInitContext: o,
3648
+ isListenerRegistered: u,
3649
+ setIframeRef(g) {
3650
+ a.value = g, N.debug("Iframe ref set:", g ? "available" : "null");
3651
+ },
3652
+ sendToIframe(g) {
3653
+ if (!a.value?.contentWindow) {
3654
+ N.warn("Cannot send message: iframe not available");
3655
+ return;
3656
+ }
3657
+ const R = t().allowedOrigins?.[0] || "*";
3658
+ a.value.contentWindow.postMessage(g, R), N.debug(`Sent to iframe: ${g.type}`);
3659
+ },
3660
+ sendToParent(g) {
3661
+ if (!window.parent || window.parent === window) {
3662
+ N.warn("Cannot send to parent: not in iframe");
3663
+ return;
3664
+ }
3665
+ window.parent.postMessage(g, "*"), N.debug(`Sent to parent: ${g.type}`);
3666
+ },
3667
+ startListening() {
3668
+ u.value || (window.addEventListener("message", c), u.value = !0);
3669
+ },
3670
+ stopListening() {
3671
+ u.value && (window.removeEventListener("message", c), u.value = !1);
3672
+ },
3673
+ onChatReady(g) {
3674
+ return _.add(g), () => {
3675
+ _.delete(g);
3676
+ };
3677
+ },
3678
+ onPreviewChanges(g) {
3679
+ return v.add(g), () => {
3680
+ v.delete(g);
3681
+ };
3682
+ },
3683
+ onMessage(g) {
3684
+ return f.add(g), () => {
3685
+ f.delete(g);
3686
+ };
3687
+ }
3688
+ };
3689
+ }
3690
+ const ne = k("ai-agent-service");
3691
+ function jt(s) {
3692
+ const {
3693
+ userGetter: t,
3694
+ bladeGetter: e,
3695
+ localeGetter: n,
3696
+ tokenGetter: r,
3697
+ navigateToBlade: a,
3698
+ reloadBlade: o,
3699
+ initialConfig: u,
3700
+ isEmbedded: f = !1
3701
+ } = s, v = D({ ...yt, ...u }), _ = Ot(), d = It({
3702
+ userGetter: t,
3703
+ bladeGetter: e,
3704
+ localeGetter: n,
3705
+ tokenGetter: r
3706
+ }), c = Bt({
3707
+ getConfig: () => v.value,
3708
+ isEmbedded: f,
3709
+ navigateToBlade: a,
3710
+ reloadBlade: o
3711
+ }), g = A(() => ({
3712
+ user: t(),
3713
+ currentBlade: e(),
3714
+ items: d.contextItems.value
3715
+ })), C = async () => {
3716
+ if (c.pendingInitContext.value && c.iframeRef.value?.contentWindow) {
3717
+ c.pendingInitContext.value = !1, _.isInitialized.value = !0;
3718
+ const p = await d.buildInitPayload();
3719
+ c.sendToIframe({ type: "INIT_CONTEXT", payload: p }), ne.debug("Flushed pending INIT_CONTEXT");
3720
+ }
3721
+ };
3722
+ c.onChatReady(() => {
3723
+ c.iframeRef.value?.contentWindow ? (_.isInitialized.value = !0, d.buildInitPayload().then((p) => {
3724
+ c.sendToIframe({ type: "INIT_CONTEXT", payload: p }), ne.info("Chatbot ready, sent INIT_CONTEXT");
3725
+ })) : (c.pendingInitContext.value = !0, ne.info("Chatbot ready, iframe ref not available yet — pending INIT_CONTEXT"));
3726
+ }), W(c.iframeRef, () => C()), W(
3727
+ () => ({ currentBlade: g.value.currentBlade, items: g.value.items }),
3728
+ async () => {
3729
+ if (f) {
3730
+ const p = await d.buildInitPayload();
3731
+ c.sendToParent({ type: "AI_CONTEXT_UPDATE", payload: p });
3732
+ return;
3733
+ }
3734
+ if (_.isOpen.value && _.isInitialized.value && c.iframeRef.value?.contentWindow) {
3735
+ const p = await d.buildUpdatePayload();
3736
+ c.sendToIframe({ type: "UPDATE_CONTEXT", payload: p });
3737
+ }
3738
+ },
3739
+ { deep: !0 }
3740
+ );
3741
+ const R = () => f ? c.sendToParent({ type: "AI_TOGGLE_PANEL" }) : _.open(), b = () => f ? c.sendToParent({ type: "AI_TOGGLE_PANEL" }) : _.close(), O = () => f ? c.sendToParent({ type: "AI_TOGGLE_PANEL" }) : _.toggle(), x = (p) => {
3742
+ c.setIframeRef(p), C();
3743
+ }, S = (p, T, L, Z) => {
3744
+ const { cleared: X } = d.setContextData(p, T, L, Z);
3745
+ f && X && c.sendToParent({ type: "AI_CONTEXT_CLEAR" });
3746
+ };
3747
+ return c.startListening(), f && (c.sendToParent({
3748
+ type: "EMBEDDED_APP_READY",
3749
+ payload: { supportedFeatures: ["ai-agent"] }
3750
+ }), ne.info("Embedded mode: sent EMBEDDED_APP_READY to parent")), {
3751
+ // State
3752
+ panelState: _.panelState,
3753
+ config: v,
3754
+ context: g,
3755
+ isOpen: A(() => !f && _.isOpen.value),
3756
+ isExpanded: _.isExpanded,
3757
+ totalItemsCount: d.totalItemsCount,
3758
+ // Panel control
3759
+ openPanel: R,
3760
+ closePanel: b,
3761
+ togglePanel: O,
3762
+ expandPanel: () => _.expand(),
3763
+ collapsePanel: () => _.collapse(),
3764
+ // Configuration
3765
+ setConfig: (p) => {
3766
+ v.value = { ...v.value, ...p };
3767
+ },
3768
+ // Communication
3769
+ sendMessage: (p, T) => {
3770
+ c.sendToIframe({ type: p, payload: T });
3771
+ },
3772
+ onMessage: c.onMessage,
3773
+ // Internal API
3774
+ iframeRef: c.iframeRef,
3775
+ _setIframeRef: x,
3776
+ _startListening: c.startListening,
3777
+ _stopListening: c.stopListening,
3778
+ _setContextData: S,
3779
+ _onPreviewChanges: c.onPreviewChanges
3780
+ };
3781
+ }
3782
+ const H = k("use-ai-agent");
3783
+ function un(s) {
3784
+ const t = z(qe), { user: e, getAccessToken: n } = bt(), { openBlade: r } = Ut(), { blades: a, activeBlade: o, replaceCurrentBlade: u } = Tt(), f = s?.isEmbedded, v = jt({
3785
+ userGetter: () => {
3786
+ if (e.value)
3787
+ return {
3788
+ id: e.value.id,
3789
+ userName: e.value.userName,
3790
+ isAdministrator: e.value.isAdministrator,
3791
+ permissions: e.value.permissions
3792
+ };
3793
+ },
3794
+ bladeGetter: () => {
3795
+ const d = o.value ?? a.value[a.value.length - 1];
3796
+ return d ? {
3797
+ id: d.id,
3798
+ name: d.name,
3799
+ title: d.title,
3800
+ param: d.param,
3801
+ options: d.options
3802
+ } : null;
3803
+ },
3804
+ localeGetter: () => t?.currentLocale.value ?? "en",
3805
+ tokenGetter: n,
3806
+ navigateToBlade: (d, c, g) => {
3807
+ r({ name: d, param: c, options: g }).then(() => {
3808
+ H.debug(`Navigated to blade: ${d}`);
3809
+ }).catch((C) => {
3810
+ H.warn(`Blade not found or cannot be opened: ${d}`, C);
3811
+ });
3812
+ },
3813
+ reloadBlade: () => {
3814
+ const d = o.value;
3815
+ d && u({
3816
+ name: d.name,
3817
+ param: d.param,
3818
+ query: d.query,
3819
+ options: d.options
3820
+ }).then(() => {
3821
+ H.debug("Current blade reloaded");
3822
+ }).catch((c) => {
3823
+ H.warn("Failed to reload current blade", c);
3824
+ });
3825
+ },
3826
+ initialConfig: s?.config,
3827
+ isEmbedded: f
3828
+ });
3829
+ if (xe(oe, v), H.debug("AiAgentService provided"), s?.addGlobalToolbarButton ?? !0) {
3830
+ const d = z(He, null);
3831
+ d ? (d.registerToolbarItem(
3832
+ {
3833
+ id: St,
3834
+ icon: wt,
3835
+ title: Pt,
3836
+ clickHandler: () => {
3837
+ v.togglePanel();
3838
+ }
3839
+ },
3840
+ "*"
3841
+ // Wildcard for all blades
3842
+ ), H.debug("Global AI toolbar button registered with wildcard '*'")) : H.warn("Toolbar service not available, AI button not registered");
3843
+ }
3844
+ return v;
3845
+ }
3846
+ function hn() {
3847
+ const s = z(oe);
3848
+ if (!s)
3849
+ throw H.error("AiAgentService not found. Did you forget to call provideAiAgentService()?"), new De("AiAgentService");
3850
+ return {
3851
+ // State
3852
+ panelState: s.panelState,
3853
+ config: s.config,
3854
+ context: s.context,
3855
+ isOpen: s.isOpen,
3856
+ isExpanded: s.isExpanded,
3857
+ totalItemsCount: s.totalItemsCount,
3858
+ // Panel control
3859
+ openPanel: s.openPanel,
3860
+ closePanel: s.closePanel,
3861
+ togglePanel: s.togglePanel,
3862
+ expandPanel: s.expandPanel,
3863
+ collapsePanel: s.collapsePanel,
3864
+ // Configuration
3865
+ setConfig: s.setConfig,
3866
+ // Communication
3867
+ sendMessage: s.sendMessage,
3868
+ onMessage: s.onMessage
3869
+ };
3870
+ }
3871
+ function cn(s) {
3872
+ return {
3873
+ id: "ai-agent-toggle",
3874
+ icon: s?.icon ?? "lucide-sparkles",
3875
+ title: s?.title ?? "AI Assistant",
3876
+ clickHandler: () => {
3877
+ console.warn("[ai-agent] createAiAgentToolbarButton is deprecated. Use useAiAgent().togglePanel instead.");
3878
+ }
3879
+ };
3880
+ }
3881
+ const Nt = ["width", "height"], kt = ["clip-path"], $t = {
3882
+ key: 1,
3883
+ d: "M72.9199 46.4165C73.2527 46.9495 73.5831 47.4996 73.9092 48.0679C78.4022 55.8976 79.0605 66.3551 76.7793 76.6079C74.5635 86.5668 69.6096 96.1504 62.9795 102.692L58.1514 105.48C52.5725 108.701 45.699 108.701 40.1201 105.48L21.665 94.8247C29.1398 95.4723 37.0781 94.4072 44.3848 91.9233C54.5984 88.4512 63.7463 82.1497 68.6807 73.6548C75.124 62.5619 75.4351 53.2694 72.9199 46.4165ZM56.5205 29.5093C65.5697 29.5331 75.1259 33.9964 83.0215 40.8853C89.9848 46.9608 95.5441 54.8286 98.2715 62.9478V71.9058C98.2715 78.3478 94.8348 84.301 89.2559 87.522L69.4658 98.9468C74.0688 92.6731 77.4601 84.9996 79.207 77.1479C81.5723 66.517 80.9666 55.3703 76.0654 46.8296C69.6817 35.7054 61.7917 30.789 54.6006 29.5396C55.2271 29.5179 55.867 29.5076 56.5205 29.5093ZM0 50.688C3.16812 57.476 8.04614 63.7935 13.8389 68.853C21.9305 75.9204 31.9368 80.6465 41.7578 80.6724C54.5833 80.706 62.7851 76.3308 67.4629 70.728C67.1684 71.2812 66.8584 71.8408 66.5303 72.4058C61.9844 80.2318 53.417 86.2251 43.584 89.5679C34.4355 92.6779 24.3375 93.4401 15.6328 91.3423L9.01562 87.522C3.43667 84.301 0 78.3478 0 71.9058V50.688ZM26.7559 10.1313C22.5672 16.2131 19.6599 23.483 18.2695 30.9126C16.3077 41.3962 17.3358 52.3558 22.2188 60.8647C28.6034 71.9905 36.4946 76.9061 43.6865 78.1548C43.0594 78.1765 42.4188 78.1868 41.7646 78.1851C32.7113 78.1612 23.2602 73.7801 15.4746 66.98C8.2197 60.6434 2.52684 52.3035 0 43.7075V35.9897C6.33247e-05 29.5479 3.43687 23.5955 9.01562 20.3745L26.7559 10.1313ZM51.2432 31.6978C54.0287 31.7659 57.0796 32.4389 60.1875 33.9976C58.8529 33.7029 57.5584 33.677 56.3965 33.9722L57.0088 36.3833C58.4774 36.0102 60.6741 36.4134 63.0332 37.8237C65.3553 39.212 67.6865 41.4953 69.375 44.5923C70.7081 47.0376 71.6489 50.015 71.8535 53.4839C71.4414 52.1828 70.818 51.0505 69.9824 50.1929L68.2012 51.9282C69.2585 53.0135 70.0076 55.1176 69.9658 57.8657C69.9246 60.5708 69.1121 63.731 67.2744 66.7417C65.8225 69.1203 63.7129 71.4251 60.8086 73.3374C61.7311 72.329 62.4012 71.2217 62.7266 70.0679L60.333 69.3931C59.9218 70.8514 58.4742 72.5523 56.0732 73.8901C53.71 75.207 50.5672 76.0837 47.041 75.9976C44.2551 75.9294 41.204 75.2549 38.0957 73.6958C39.4307 73.9907 40.7254 74.0184 41.8877 73.7231L41.2754 71.312C39.8069 71.6851 37.6101 71.2818 35.251 69.8716C32.9289 68.4834 30.5977 66.2 28.9092 63.103C27.5754 60.6565 26.6337 57.6775 26.4297 54.2065C26.8418 55.5096 27.4661 56.6438 28.3027 57.5024L30.084 55.7661C29.0267 54.6807 28.2775 52.5767 28.3193 49.8286C28.3606 47.1236 29.173 43.9633 31.0107 40.9526C32.4621 38.5751 34.5702 36.2706 37.4727 34.3589C36.5514 35.3666 35.8827 36.4736 35.5576 37.6265L37.9512 38.3013C38.3625 36.8429 39.8101 35.142 42.2109 33.8042C44.5742 32.4874 47.717 31.6116 51.2432 31.6978ZM40.1201 2.4165C45.6991 -0.804509 52.5724 -0.804509 58.1514 2.4165L75.6777 12.5356C68.4683 12.0708 60.8765 13.1991 53.8691 15.6333C43.6671 19.1774 34.5353 25.5492 29.6035 34.0396C23.1612 45.1305 22.8486 54.4223 25.3623 61.2749C25.0301 60.7429 24.7004 60.1936 24.375 59.6265C19.8639 51.765 18.8286 41.4457 20.7139 31.3706C22.4486 22.1007 26.633 13.1734 32.6709 6.71631L40.1201 2.4165ZM54.6855 17.9829C63.3703 14.966 72.9092 14.0715 81.3008 15.7817L89.2559 20.3745C94.8346 23.5955 98.2714 29.5479 98.2715 35.9897V56.4692C95.0606 49.9731 90.2759 43.9144 84.6562 39.0112C76.4636 31.8632 66.3524 27.0488 56.5273 27.0229C43.6978 26.9893 35.4935 31.3659 30.8164 36.9712C31.1117 36.4161 31.4247 35.8554 31.7539 35.2886C36.3024 27.4582 44.8633 21.395 54.6855 17.9829Z",
3884
+ fill: "url(#virto-oz-gradient-animated)"
3885
+ }, Ft = ["id"], Gt = {
3886
+ key: 1,
3887
+ id: "virto-oz-gradient-animated",
3888
+ gradientUnits: "userSpaceOnUse",
3889
+ x1: "0",
3890
+ y1: "0",
3891
+ x2: "99",
3892
+ y2: "108"
3893
+ }, Pe = /* @__PURE__ */ Q({
3894
+ __name: "VcVirtoOzLogo",
3895
+ props: {
3896
+ width: { default: 22 },
3897
+ height: { default: 24 },
3898
+ animated: { type: Boolean, default: !1 }
3899
+ },
3900
+ setup(s) {
3901
+ const t = A(() => `virto-oz-clip-${Math.random().toString(36).substring(2, 11)}`);
3902
+ return (e, n) => ($(), F("svg", {
3903
+ width: s.width,
3904
+ height: s.height,
3905
+ viewBox: "0 0 99 108",
3906
+ fill: "none",
3907
+ xmlns: "http://www.w3.org/2000/svg",
3908
+ class: "vc-virto-oz-logo"
3909
+ }, [
3910
+ n[3] || (n[3] = I("path", {
3911
+ d: "M40.1199 2.41576C45.6989 -0.805254 52.5724 -0.805253 58.1514 2.41576L89.2556 20.3738C94.8345 23.5948 98.2713 29.5475 98.2713 35.9895V71.9055C98.2713 78.3475 94.8345 84.3002 89.2556 87.5212L58.1514 105.479C52.5724 108.7 45.6989 108.7 40.1199 105.479L9.01574 87.5212C3.43678 84.3002 0 78.3475 0 71.9055V35.9895C0 29.5475 3.43678 23.5948 9.01574 20.3738L40.1199 2.41576Z",
3912
+ fill: "white"
3913
+ }, null, -1)),
3914
+ s.animated ? ($(), F("path", $t)) : ($(), F("g", {
3915
+ key: 0,
3916
+ "clip-path": `url(#${t.value})`
3917
+ }, [...n[0] || (n[0] = [
3918
+ I("g", { transform: "matrix(0 -0.161514 0.160417 0 49.1357 53.9479)" }, [
3919
+ I("foreignObject", {
3920
+ x: "-334.01",
3921
+ y: "-334.01",
3922
+ width: "668.02",
3923
+ height: "668.02"
3924
+ }, [
3925
+ I("div", {
3926
+ xmlns: "http://www.w3.org/1999/xhtml",
3927
+ style: { background: `conic-gradient(
3928
+ from 90deg,
3929
+ rgba(255, 149, 51, 1) 0deg,
3930
+ rgba(255, 79, 187, 1) 43.2deg,
3931
+ rgba(234, 255, 79, 1) 143.654deg,
3932
+ rgba(28, 145, 252, 1) 252.692deg,
3933
+ rgba(154, 45, 248, 1) 316.8deg,
3934
+ rgba(255, 149, 51, 1) 360deg
3935
+ )`, height: "100%", width: "100%", opacity: "1" }
3936
+ })
3937
+ ])
3938
+ ], -1)
3939
+ ])], 8, kt)),
3940
+ n[4] || (n[4] = I("path", {
3941
+ d: "M72.1266 54.0945C72.1266 60.0873 74.3028 71.0379 60.6238 82.8517C65.2871 73.0587 55.8339 77.1002 49.1209 77.1002C36.4152 77.1002 26.1152 66.8002 26.1152 54.0945C26.1152 41.3889 36.4152 31.0889 49.1209 31.0889C61.8266 31.0889 72.1266 41.3889 72.1266 54.0945Z",
3942
+ fill: "white"
3943
+ }, null, -1)),
3944
+ n[5] || (n[5] = I("ellipse", {
3945
+ cx: "49.12",
3946
+ cy: "54.09",
3947
+ rx: "4.05",
3948
+ ry: "4.05",
3949
+ fill: "#6C6C6C"
3950
+ }, null, -1)),
3951
+ n[6] || (n[6] = I("ellipse", {
3952
+ cx: "60.62",
3953
+ cy: "54.09",
3954
+ rx: "4.05",
3955
+ ry: "4.05",
3956
+ fill: "#6C6C6C"
3957
+ }, null, -1)),
3958
+ n[7] || (n[7] = I("ellipse", {
3959
+ cx: "37.62",
3960
+ cy: "54.09",
3961
+ rx: "4.05",
3962
+ ry: "4.05",
3963
+ fill: "#6C6C6C"
3964
+ }, null, -1)),
3965
+ I("defs", null, [
3966
+ s.animated ? Y("", !0) : ($(), F("clipPath", {
3967
+ key: 0,
3968
+ id: t.value
3969
+ }, [...n[1] || (n[1] = [
3970
+ I("path", { d: "M72.9199 46.4165C73.2527 46.9495 73.5831 47.4996 73.9092 48.0679C78.4022 55.8976 79.0605 66.3551 76.7793 76.6079C74.5635 86.5668 69.6096 96.1504 62.9795 102.692L58.1514 105.48C52.5725 108.701 45.699 108.701 40.1201 105.48L21.665 94.8247C29.1398 95.4723 37.0781 94.4072 44.3848 91.9233C54.5984 88.4512 63.7463 82.1497 68.6807 73.6548C75.124 62.5619 75.4351 53.2694 72.9199 46.4165ZM56.5205 29.5093C65.5697 29.5331 75.1259 33.9964 83.0215 40.8853C89.9848 46.9608 95.5441 54.8286 98.2715 62.9478V71.9058C98.2715 78.3478 94.8348 84.301 89.2559 87.522L69.4658 98.9468C74.0688 92.6731 77.4601 84.9996 79.207 77.1479C81.5723 66.517 80.9666 55.3703 76.0654 46.8296C69.6817 35.7054 61.7917 30.789 54.6006 29.5396C55.2271 29.5179 55.867 29.5076 56.5205 29.5093ZM0 50.688C3.16812 57.476 8.04614 63.7935 13.8389 68.853C21.9305 75.9204 31.9368 80.6465 41.7578 80.6724C54.5833 80.706 62.7851 76.3308 67.4629 70.728C67.1684 71.2812 66.8584 71.8408 66.5303 72.4058C61.9844 80.2318 53.417 86.2251 43.584 89.5679C34.4355 92.6779 24.3375 93.4401 15.6328 91.3423L9.01562 87.522C3.43667 84.301 0 78.3478 0 71.9058V50.688ZM26.7559 10.1313C22.5672 16.2131 19.6599 23.483 18.2695 30.9126C16.3077 41.3962 17.3358 52.3558 22.2188 60.8647C28.6034 71.9905 36.4946 76.9061 43.6865 78.1548C43.0594 78.1765 42.4188 78.1868 41.7646 78.1851C32.7113 78.1612 23.2602 73.7801 15.4746 66.98C8.2197 60.6434 2.52684 52.3035 0 43.7075V35.9897C6.33247e-05 29.5479 3.43687 23.5955 9.01562 20.3745L26.7559 10.1313ZM51.2432 31.6978C54.0287 31.7659 57.0796 32.4389 60.1875 33.9976C58.8529 33.7029 57.5584 33.677 56.3965 33.9722L57.0088 36.3833C58.4774 36.0102 60.6741 36.4134 63.0332 37.8237C65.3553 39.212 67.6865 41.4953 69.375 44.5923C70.7081 47.0376 71.6489 50.015 71.8535 53.4839C71.4414 52.1828 70.818 51.0505 69.9824 50.1929L68.2012 51.9282C69.2585 53.0135 70.0076 55.1176 69.9658 57.8657C69.9246 60.5708 69.1121 63.731 67.2744 66.7417C65.8225 69.1203 63.7129 71.4251 60.8086 73.3374C61.7311 72.329 62.4012 71.2217 62.7266 70.0679L60.333 69.3931C59.9218 70.8514 58.4742 72.5523 56.0732 73.8901C53.71 75.207 50.5672 76.0837 47.041 75.9976C44.2551 75.9294 41.204 75.2549 38.0957 73.6958C39.4307 73.9907 40.7254 74.0184 41.8877 73.7231L41.2754 71.312C39.8069 71.6851 37.6101 71.2818 35.251 69.8716C32.9289 68.4834 30.5977 66.2 28.9092 63.103C27.5754 60.6565 26.6337 57.6775 26.4297 54.2065C26.8418 55.5096 27.4661 56.6438 28.3027 57.5024L30.084 55.7661C29.0267 54.6807 28.2775 52.5767 28.3193 49.8286C28.3606 47.1236 29.173 43.9633 31.0107 40.9526C32.4621 38.5751 34.5702 36.2706 37.4727 34.3589C36.5514 35.3666 35.8827 36.4736 35.5576 37.6265L37.9512 38.3013C38.3625 36.8429 39.8101 35.142 42.2109 33.8042C44.5742 32.4874 47.717 31.6116 51.2432 31.6978ZM40.1201 2.4165C45.6991 -0.804509 52.5724 -0.804509 58.1514 2.4165L75.6777 12.5356C68.4683 12.0708 60.8765 13.1991 53.8691 15.6333C43.6671 19.1774 34.5353 25.5492 29.6035 34.0396C23.1612 45.1305 22.8486 54.4223 25.3623 61.2749C25.0301 60.7429 24.7004 60.1936 24.375 59.6265C19.8639 51.765 18.8286 41.4457 20.7139 31.3706C22.4486 22.1007 26.633 13.1734 32.6709 6.71631L40.1201 2.4165ZM54.6855 17.9829C63.3703 14.966 72.9092 14.0715 81.3008 15.7817L89.2559 20.3745C94.8346 23.5955 98.2714 29.5479 98.2715 35.9897V56.4692C95.0606 49.9731 90.2759 43.9144 84.6562 39.0112C76.4636 31.8632 66.3524 27.0488 56.5273 27.0229C43.6978 26.9893 35.4935 31.3659 30.8164 36.9712C31.1117 36.4161 31.4247 35.8554 31.7539 35.2886C36.3024 27.4582 44.8633 21.395 54.6855 17.9829Z" }, null, -1)
3971
+ ])], 8, Ft)),
3972
+ s.animated ? ($(), F("linearGradient", Gt, [...n[2] || (n[2] = [
3973
+ je('<stop offset="0%" stop-color="#FF9533"><animate attributeName="stop-color" values="#FF9533;#FF4FBB;#EAFF4F;#1C91FC;#9A2DF8;#FF9533" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="25%" stop-color="#FF4FBB"><animate attributeName="stop-color" values="#FF4FBB;#EAFF4F;#1C91FC;#9A2DF8;#FF9533;#FF4FBB" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="50%" stop-color="#EAFF4F"><animate attributeName="stop-color" values="#EAFF4F;#1C91FC;#9A2DF8;#FF9533;#FF4FBB;#EAFF4F" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="75%" stop-color="#1C91FC"><animate attributeName="stop-color" values="#1C91FC;#9A2DF8;#FF9533;#FF4FBB;#EAFF4F;#1C91FC" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="100%" stop-color="#9A2DF8"><animate attributeName="stop-color" values="#9A2DF8;#FF9533;#FF4FBB;#EAFF4F;#1C91FC;#9A2DF8" dur="4s" repeatCount="indefinite"></animate></stop>', 5)
3974
+ ])])) : Y("", !0)
3975
+ ])
3976
+ ], 8, Nt));
3977
+ }
3978
+ }), Dt = { class: "vc-ai-agent-header" }, Lt = { class: "vc-ai-agent-header__icon" }, Mt = { class: "vc-ai-agent-header__wrapper" }, zt = { class: "vc-ai-agent-header__content" }, Jt = { class: "vc-ai-agent-header__title" }, Kt = { class: "vc-ai-agent-header__controls" }, qt = /* @__PURE__ */ Q({
3979
+ __name: "VcAiAgentHeader",
3980
+ props: {
3981
+ title: {},
3982
+ isExpanded: { type: Boolean },
3983
+ itemsCount: {}
3984
+ },
3985
+ emits: ["close", "expand", "collapse"],
3986
+ setup(s) {
3987
+ return (t, e) => {
3988
+ const n = be("VcIcon");
3989
+ return $(), F("div", Dt, [
3990
+ I("div", Lt, [
3991
+ J(Pe, {
3992
+ width: 22,
3993
+ height: 24,
3994
+ "show-dots": ""
3995
+ })
3996
+ ]),
3997
+ I("div", Mt, [
3998
+ I("div", zt, [
3999
+ I("div", Jt, Ee(s.title), 1)
4000
+ ])
4001
+ ]),
4002
+ I("div", Kt, [
4003
+ s.isExpanded ? ($(), F("div", {
4004
+ key: 0,
4005
+ class: "vc-ai-agent-header__button",
4006
+ title: "Collapse",
4007
+ onClick: e[0] || (e[0] = (r) => t.$emit("collapse"))
4008
+ }, [
4009
+ J(n, { icon: "lucide-minus" })
4010
+ ])) : ($(), F("div", {
4011
+ key: 1,
4012
+ class: "vc-ai-agent-header__button",
4013
+ title: "Expand",
4014
+ onClick: e[1] || (e[1] = (r) => t.$emit("expand"))
4015
+ }, [
4016
+ J(n, { icon: "lucide-panel-top" })
4017
+ ])),
4018
+ I("div", {
4019
+ class: "vc-ai-agent-header__button",
4020
+ title: "Close",
4021
+ onClick: e[2] || (e[2] = (r) => t.$emit("close"))
4022
+ }, [
4023
+ J(n, { icon: "lucide-x" })
4024
+ ])
4025
+ ])
4026
+ ]);
4027
+ };
4028
+ }
4029
+ }), Ht = { class: "vc-ai-agent-loader" }, Wt = { class: "vc-ai-agent-loader__content" }, Zt = { class: "vc-ai-agent-loader__logo" }, Xt = {
4030
+ key: 0,
4031
+ class: "vc-ai-agent-loader__text"
4032
+ }, Yt = /* @__PURE__ */ Q({
4033
+ __name: "VcAiAgentLoader",
4034
+ props: {
4035
+ text: {}
4036
+ },
4037
+ setup(s) {
4038
+ return (t, e) => ($(), F("div", Ht, [
4039
+ I("div", Wt, [
4040
+ I("div", Zt, [
4041
+ J(Pe, {
4042
+ width: 80,
4043
+ height: 87,
4044
+ animated: ""
4045
+ })
4046
+ ]),
4047
+ s.text ? ($(), F("p", Xt, Ee(s.text), 1)) : Y("", !0)
4048
+ ])
4049
+ ]));
4050
+ }
4051
+ }), Qt = { class: "vc-ai-agent-iframe" }, Vt = ["src"], er = {
4052
+ key: 1,
4053
+ class: "vc-ai-agent-iframe__placeholder"
4054
+ }, tr = /* @__PURE__ */ Q({
4055
+ __name: "VcAiAgentIframe",
4056
+ props: {
4057
+ url: {}
4058
+ },
4059
+ emits: ["iframe-ready"],
4060
+ setup(s, { emit: t }) {
4061
+ const e = k("ai-agent-iframe"), n = s, r = t, a = D(null), o = D(!0);
4062
+ W(
4063
+ a,
4064
+ (f) => {
4065
+ f && r("iframe-ready", f);
4066
+ },
4067
+ { immediate: !0 }
4068
+ );
4069
+ const u = () => {
4070
+ o.value = !1, e.debug("Iframe loaded");
4071
+ };
4072
+ return W(
4073
+ () => n.url,
4074
+ () => {
4075
+ o.value = !0;
4076
+ }
4077
+ ), (f, v) => {
4078
+ const _ = be("VcIcon");
4079
+ return $(), F("div", Qt, [
4080
+ J(_e, { name: "fade" }, {
4081
+ default: Ce(() => [
4082
+ o.value && s.url ? ($(), Ue(Yt, {
4083
+ key: 0,
4084
+ text: f.$t("AI_AGENT.LOADING")
4085
+ }, null, 8, ["text"])) : Y("", !0)
4086
+ ]),
4087
+ _: 1
4088
+ }),
4089
+ s.url ? ($(), F("iframe", {
4090
+ key: 0,
4091
+ ref_key: "iframeRef",
4092
+ ref: a,
4093
+ src: s.url,
4094
+ class: Ae(["vc-ai-agent-iframe__frame", { "vc-ai-agent-iframe__frame--loading": o.value }]),
4095
+ sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox",
4096
+ allow: "clipboard-read; clipboard-write",
4097
+ onLoad: u
4098
+ }, null, 42, Vt)) : ($(), F("div", er, [
4099
+ J(_, {
4100
+ icon: "lucide-sparkles",
4101
+ size: "xl",
4102
+ class: "vc-ai-agent-iframe__placeholder-icon"
4103
+ }),
4104
+ v[0] || (v[0] = I("p", { class: "vc-ai-agent-iframe__placeholder-text" }, "AI Agent URL not configured", -1))
4105
+ ]))
4106
+ ]);
4107
+ };
4108
+ }
4109
+ }), rr = { class: "vc-ai-agent-panel__content" }, dn = /* @__PURE__ */ Q({
4110
+ __name: "VcAiAgentPanel",
4111
+ setup(s) {
4112
+ const t = z(oe), e = z(We, !1);
4113
+ t || console.error("[VcAiAgentPanel] AiAgentService not provided");
4114
+ const n = A(
4115
+ () => t?.config.value ?? { url: "", title: "AI Assistant", width: 362, expandedWidth: 500 }
4116
+ ), r = A(() => !e && (t?.isOpen.value ?? !1)), a = A(() => t?.isExpanded.value ?? !1), o = A(() => t?.totalItemsCount.value ?? 0), u = A(() => ({
4117
+ width: a.value ? `${n.value.expandedWidth ?? 500}px` : `${n.value.width ?? 362}px`
4118
+ })), f = () => t?.closePanel(), v = () => t?.expandPanel(), _ = () => t?.collapsePanel(), d = (c) => {
4119
+ t?._setIframeRef(c);
4120
+ };
4121
+ return Ne(() => {
4122
+ t?._setIframeRef(null);
4123
+ }), (c, g) => ($(), Ue(_e, { name: "ai-panel-slide" }, {
4124
+ default: Ce(() => [
4125
+ r.value ? ($(), F("div", {
4126
+ key: 0,
4127
+ class: Ae(["vc-ai-agent-panel", {
4128
+ "vc-ai-agent-panel--expanded": a.value
4129
+ }]),
4130
+ style: ke(u.value)
4131
+ }, [
4132
+ J(qt, {
4133
+ title: n.value.title,
4134
+ "is-expanded": a.value,
4135
+ "items-count": o.value,
4136
+ onClose: f,
4137
+ onExpand: v,
4138
+ onCollapse: _
4139
+ }, null, 8, ["title", "is-expanded", "items-count"]),
4140
+ I("div", rr, [
4141
+ J(tr, {
4142
+ url: n.value.url,
4143
+ onIframeReady: d
4144
+ }, null, 8, ["url"])
4145
+ ])
4146
+ ], 6)) : Y("", !0)
4147
+ ]),
4148
+ _: 1
4149
+ }));
4150
+ }
4151
+ });
4152
+ export {
4153
+ G as $,
4154
+ sn as A,
4155
+ ze as B,
4156
+ ve as C,
4157
+ yt as D,
4158
+ on as E,
4159
+ Dr as F,
4160
+ Rr as G,
4161
+ ln as H,
4162
+ De as I,
4163
+ Br as J,
4164
+ Or as K,
4165
+ qe as L,
4166
+ Ir as M,
4167
+ jr as N,
4168
+ Nr as O,
4169
+ Ur as P,
4170
+ _r as Q,
4171
+ Cr as R,
4172
+ Qr as S,
4173
+ He as T,
4174
+ xr as U,
4175
+ ft as V,
4176
+ br as W,
4177
+ Ar as X,
4178
+ wr as Y,
4179
+ Lr as Z,
4180
+ dn as _,
4181
+ oe as a,
4182
+ Mr as a0,
4183
+ Je as a1,
4184
+ fr as a2,
4185
+ zr as a3,
4186
+ $r as a4,
4187
+ Er as a5,
4188
+ Jr as a6,
4189
+ Kr as a7,
4190
+ Tr as a8,
4191
+ st as a9,
4192
+ nt as aA,
4193
+ Pr as aB,
4194
+ at as aC,
4195
+ dt as aD,
4196
+ hr as aE,
4197
+ xt as aF,
4198
+ Le as aG,
4199
+ lr as aH,
4200
+ ur as aI,
4201
+ bt as aJ,
4202
+ mr as aK,
4203
+ un as aL,
4204
+ qr as aa,
4205
+ ot as ab,
4206
+ Ve as ac,
4207
+ it as ad,
4208
+ We as ae,
4209
+ et as af,
4210
+ Ye as ag,
4211
+ M as ah,
4212
+ kr as ai,
4213
+ Hr as aj,
4214
+ lt as ak,
4215
+ tt as al,
4216
+ Wr as am,
4217
+ pr as an,
4218
+ Zr as ao,
4219
+ Sr as ap,
4220
+ yr as aq,
4221
+ Xr as ar,
4222
+ ut as as,
4223
+ ht as at,
4224
+ rt as au,
4225
+ ct as av,
4226
+ Yr as aw,
4227
+ dr as ax,
4228
+ Qe as ay,
4229
+ cr as az,
4230
+ k as b,
4231
+ cn as c,
4232
+ Gr as d,
4233
+ Fr as e,
4234
+ Me as f,
4235
+ Te as g,
4236
+ vr as h,
4237
+ Ke as i,
4238
+ gr as j,
4239
+ Tt as k,
4240
+ _t as l,
4241
+ pe as m,
4242
+ an as n,
4243
+ tn as o,
4244
+ nn as p,
4245
+ Vr as q,
4246
+ rn as r,
4247
+ en as s,
4248
+ Ut as t,
4249
+ hn as u,
4250
+ mt as v,
4251
+ ye as w,
4252
+ Se as x,
4253
+ Et as y,
4254
+ we as z
4255
+ };