var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  return value;
};
import { m as a, N as e, P as o, n as t, o as r, p as s, e as d, q as i, l, k as n, B as p, t as S, i as c, u as E, v as y } from "./constants-6ebafe5b.js";
import { c as _, a as C, t as T, b as u, p as I, d as R, s as A, e as U, f as g, g as f, h as O, i as P, r as L, j as h } from "./redux-c492faa3.js";
import { p as m } from "./react-d37f274e.js";
import { g as F, c as D, a as N, b as H } from "./util-31a5c3fb.js";
import { l as b } from "./lodash-62e10097.js";
import { m as M } from "./common-64096f9e.js";
import { U as G, v as Y, O as k, D as B, s as Q, A as v, d as w, C as q, a as V, b as j, Q as K, F as W, c as J, J as z } from "./api-9408842b.js";
import { l as x } from "./loglevel-dd4a2561.js";
import { s as X } from "./pages-06cd5d02.js";
import { i as Z, t as $ } from "./i18n-1c9e1aab.js";
class aa {
  static registerStore(a2) {
    this._store = a2;
  }
  static getStore() {
    return this._store;
  }
}
__publicField(aa, "_store");
const ea = () => ({ type: a.FETCH_USER_INIT }), oa = (e2) => ({ type: a.SET_USER_PROFILE_SETTING_MODAL_VISIBLE, payload: { visible: e2 } }), ta = (e2) => ({ type: a.UPDATE_USER_PROFILE, payload: e2 }), ra = (e2) => ({ type: a.UPDATE_USER_PROFILE_SUCCESS, payload: e2 }), sa = (e2, o2) => ({ type: a.MARK_USER_STATUS, payload: { type: e2, value: o2 } }), da = (e2) => ({ type: a.LOGOUT_USER_INIT, payload: e2 }), ia = () => ({ type: a.LOGOUT_USER_SUCCESS }), la = (a2) => a2.entities.datasource.data, na = (a2) => a2.entities.plugins.data, pa = (a2) => {
  const e2 = a2.entities.plugins.data;
  return e2 == null ? void 0 : e2.filter((a3) => !!a3.id).reduce((a3, e3) => (a3[e3.id] = e3, a3), {});
}, Sa = (a2) => a2.entities.datasource.structure, ca = (a2) => a2.ui.org.orgUsers, Ea = (a2) => a2.ui.org.orgGroups, ya = (a2) => a2.ui.org.orgUserStats, _a = (e2) => ({ type: a.FETCH_ORG_GROUPS, payload: { orgId: e2 } }), Ca = (e2) => ({ type: a.FETCH_ORG_ALL_USERS, payload: { orgId: e2 } }), Ta = (e2) => ({ type: a.SWITCH_ORG, payload: { orgId: e2 } }), ua = (o2) => {
  let t2 = F(e, o2.map((a2) => a2.name));
  return { type: a.CREATE_ORG, payload: { orgName: t2 } };
}, Ia = (e2) => ({ type: a.UPDATE_ORG_SUCCESS, payload: e2 }), Ra = (e2) => ({ type: a.FETCH_ORG_API_USAGE_SUCCESS, payload: e2 }), Aa = (e2) => ({ type: a.FETCH_ORG_LAST_MONTH_API_USAGE_SUCCESS, payload: e2 }), Ua = (a2) => a2.ui.application.applicationList.filter((a3) => "NORMAL" === a3.applicationStatus), ga = (a2) => a2.ui.application.appPermissionInfo, fa = (a2) => a2.ui.application.currentApplication, Oa = (a2) => a2.ui.application.templateId, Pa = (a2) => {
  var _a2;
  return ((_a2 = a2.ui.application.currentApplication) == null ? void 0 : _a2.applicationId) === o;
}, La = (e2) => ({ type: a.FETCH_ALL_APPLICATIONS_INIT, payload: {} }), ha = (e2) => ({ type: a.FETCH_ALL_MODULES_INIT, payload: {} }), ma = (e2) => ({ type: a.CREATE_APPLICATION_INIT, payload: e2 }), Fa = (e2, o2, t2) => ({ type: a.RECYCLE_APPLICATION_INIT, payload: e2, onSuccessCallback: o2, onErrorCallback: t2 }), Da = (e2) => ({ type: a.UPDATE_APPLICATION_META, payload: e2 }), Na = (e2) => ({ type: a.PUBLISH_APPLICATION, payload: e2 }), Ha = (e2) => ({ type: a.FETCH_APP_PERMISSIONS, payload: e2 }), ba = (e2) => ({ type: a.UPDATE_APP_PERMISSION, payload: e2 }), Ma = (e2) => ({ type: a.UPDATE_APP_PERMISSION_INFO, payload: e2 }), Ga = (e2) => ({ type: a.DELETE_APP_PERMISSION, payload: e2 }), Ya = D({ data: [], isDataSourceTypesFetched: false }, { [a.FETCH_DATA_SOURCE_TYPES_SUCCESS]: (a2, e2) => ({ data: e2.payload, isDataSourceTypesFetched: true }) }), ka = _({ datasource: D({ data: [], structure: {}, permissionInfo: {}, loadingStates: { fetchingDatasources: false, fetchingStructure: false } }, { [a.FETCH_DATASOURCE_INIT]: (a2) => ({ ...a2, loadingStates: { ...a2.loadingStates, fetchingDatasources: true } }), [a.FETCH_DATASOURCE_SUCCESS]: (a2, e2) => ({ ...a2, data: e2.payload, loadingStates: { ...a2.loadingStates, fetchingDatasources: false } }), [t.FETCH_DATASOURCE_ERROR]: (a2) => ({ ...a2, loadingStates: { ...a2.loadingStates, fetchingDatasources: false } }), [a.FETCH_DATASOURCE_STRUCTURE_SUCCESS]: (a2, e2) => ({ ...a2, structure: { ...a2.structure, ...e2.payload } }), [a.CREATE_DATASOURCE_SUCCESS]: (a2, e2) => ({ ...a2, loading: false, data: a2.data.concat({ datasource: e2.payload, edit: true }) }), [a.UPDATE_DATASOURCE_SUCCESS]: (a2, e2) => ({ ...a2, data: a2.data.map((a3) => a3.datasource.id === e2.payload.id ? { datasource: e2.payload, edit: true } : a3) }), [a.DELETE_DATASOURCE_SUCCESS]: (a2, e2) => ({ ...a2, data: a2.data.filter((a3) => {
  var _a2;
  return a3.datasource.id !== ((_a2 = e2.payload) == null ? void 0 : _a2.datasourceId);
}) }), [a.FETCH_DATASOURCE_PERMISSION_SUCCESS]: (a2, e2) => {
  const o2 = a2.permissionInfo;
  return o2[e2.payload.datasourceId] = e2.payload.data, { ...a2, permissionInfo: { ...o2 } };
}, [a.UPDATE_DATASOURCE_PERMISSION_SUCCESS]: (a2, e2) => {
  const o2 = a2.permissionInfo[e2.payload.datasourceId] ?? {};
  return o2.userPermissions = o2.userPermissions.map((a3) => a3.permissionId === e2.payload.permissionId ? { ...a3, role: e2.payload.role } : a3), o2.groupPermissions = o2.groupPermissions.map((a3) => a3.permissionId === e2.payload.permissionId ? { ...a3, role: e2.payload.role } : a3), a2.permissionInfo[e2.payload.datasourceId] = o2, { ...a2 };
}, [a.DELETE_DATASOURCE_PERMISSION_SUCCESS]: (a2, e2) => {
  const o2 = a2.permissionInfo[e2.payload.datasourceId] ?? {};
  return o2.userPermissions = o2.userPermissions.filter((a3) => a3.permissionId !== e2.payload.permissionId), o2.groupPermissions = o2.groupPermissions.filter((a3) => a3.permissionId !== e2.payload.permissionId), a2.permissionInfo[e2.payload.datasourceId] = o2, { ...a2 };
} }), plugins: Ya, queryLibrary: D({ queryLibraryInfo: {}, queryLibraryDropdownInfo: {}, queryLibraryRecordsDSL: {}, queryLibraryRecords: {} }, { [a.FETCH_QUERY_LIBRARY_BY_ORG_SUCCESS]: (a2, e2) => {
  const o2 = {};
  return e2.payload.forEach((a3) => {
    o2[a3.id] = a3;
  }), { ...a2, queryLibraryInfo: o2 };
}, [a.FETCH_QUERY_LIBRARY_RECORD_DSL_SUCCESS]: (a2, e2) => {
  const { libraryQueryId: o2, libraryQueryRecordId: t2, dsl: r2 } = e2.payload, s2 = { ...a2.queryLibraryRecordsDSL }, d2 = { ...s2[o2] ?? {} };
  return d2[t2] = r2, s2[o2] = d2, { ...a2, queryLibraryRecordsDSL: s2 };
}, [a.FETCH_QUERY_LIBRARY_DROPDOWN_SUCCESS]: (a2, e2) => {
  const o2 = {};
  return e2.payload.forEach((a3) => o2[a3.libraryQueryMetaView.id] = a3), { ...a2, queryLibraryDropdownInfo: o2 };
}, [a.FETCH_QUERY_LIBRARY_RECORD_SUCCESS]: (a2, e2) => {
  var _a2;
  const o2 = (_a2 = e2.payload[0]) == null ? void 0 : _a2.libraryQueryId, t2 = { ...a2.queryLibraryRecords };
  if (o2) {
    const a3 = {};
    e2.payload.forEach((e3) => {
      a3[e3.id] = e3;
    }), t2[o2] = a3;
  }
  return { ...a2, queryLibraryRecords: t2 };
}, [a.CREATE_QUERY_LIBRARY_RECORD_SUCCESS]: (a2, e2) => {
  var _a2;
  const o2 = (_a2 = e2.payload) == null ? void 0 : _a2.libraryQueryId, t2 = { ...a2.queryLibraryRecords };
  if (o2) {
    const r2 = {};
    r2[e2.payload.id] = e2.payload, t2[o2] = { ...r2, ...a2.queryLibraryRecords[o2] ?? {} };
  }
  return { ...a2, queryLibraryRecords: t2 };
}, [a.CREATE_QUERY_LIBRARY_SUCCESS]: (a2, e2) => {
  const o2 = a2.queryLibraryInfo;
  return o2[e2.payload.id] = e2.payload, { ...a2, queryLibraryInfo: o2 };
}, [a.UPDATE_QUERY_LIBRARY_SUCCESS]: (a2, e2) => {
  const o2 = a2.queryLibraryInfo;
  return o2[e2.payload.id] = e2.payload, { ...a2, queryLibraryInfo: o2 };
}, [a.DELETE_QUERY_LIBRARY_SUCCESS]: (a2, e2) => {
  var _a2;
  return { ...a2, queryLibraryInfo: b.omit(a2.queryLibraryInfo, (_a2 = e2.payload) == null ? void 0 : _a2.queryLibraryId) };
} }) }), Ba = D({ applicationList: [], modules: [], recycleList: [], marketplace: [], loadingStatus: { isFetchingHomeData: false, fetchHomeDataFinished: false, isApplicationCreating: false, deletingApplication: false, fetchingAppDetail: false, applicationPublishing: false } }, { [a.FETCH_HOME_DATA]: (a2) => ({ ...a2, loadingStatus: { ...a2.loadingStatus, isFetchingHomeData: true } }), [a.FETCH_ALL_APPLICATIONS_SUCCESS]: (a2, e2) => ({ ...a2, applicationList: e2.payload }), [a.FETCH_ALL_MODULES_SUCCESS]: (a2, e2) => ({ ...a2, modules: e2.payload }), [a.SET_COMMON_SETTING_SUCCESS]: (a2, e2) => {
  var _a2;
  return { ...a2, homeOrg: a2.homeOrg && { ...a2.homeOrg, commonSettings: { ...(_a2 = a2.homeOrg) == null ? void 0 : _a2.commonSettings, ...e2.payload } } };
}, [a.FETCH_HOME_DATA_SUCCESS]: (a2, e2) => ({ ...a2, loadingStatus: { ...a2.loadingStatus, isFetchingHomeData: false, fetchHomeDataFinished: true }, homeOrg: e2.payload.organization }), [t.FETCH_HOME_DATA_ERROR]: (a2) => ({ ...a2, loadingStatus: { ...a2.loadingStatus, isFetchingHomeData: false, fetchHomeDataFinished: true } }), [a.FETCH_APPLICATION_RECYCLE_LIST_SUCCESS]: (a2, e2) => ({ ...a2, recycleList: e2.payload }), [a.FETCH_ALL_MARKETPLACE_APPS_SUCCESS]: (a2, e2) => ({ ...a2, marketplace: e2.payload }), [a.CREATE_APPLICATION_INIT]: (a2) => ({ ...a2, loadingStatus: { ...a2.loadingStatus, isApplicationCreating: true } }), [t.CREATE_APPLICATION_ERROR]: (a2) => ({ ...a2, loadingStatus: { ...a2.loadingStatus, isApplicationCreating: false } }), [a.CREATE_APPLICATION_SUCCESS]: (a2, e2) => ({ ...a2, applicationList: [e2.payload.applicationInfoView, ...a2.applicationList], loadingStatus: { ...a2.loadingStatus, isApplicationCreating: false } }), [a.DELETE_APPLICATION_INIT]: (a2) => ({ ...a2, loadingStatus: { ...a2.loadingStatus, deletingApplication: true } }), [a.DELETE_APPLICATION_SUCCESS]: (a2, e2) => ({ ...a2, recycleList: [...a2.recycleList.filter((a3) => a3.applicationId !== e2.payload.applicationId)], loadingStatus: { ...a2.loadingStatus, deletingApplication: false } }), [a.RECYCLE_APPLICATION_SUCCESS]: (a2, e2) => ({ ...a2, applicationList: [...a2.applicationList.filter((a3) => a3.applicationId !== e2.payload.applicationId)] }), [a.RESTORE_APPLICATION_SUCCESS]: (a2, e2) => ({ ...a2, recycleList: [...a2.recycleList.filter((a3) => a3.applicationId !== e2.payload.applicationId)] }), [t.DELETE_APPLICATION_ERROR]: (a2) => ({ ...a2, loadingStatus: { ...a2.loadingStatus, deletingApplication: false } }), [a.UPDATE_APPLICATION_META_SUCCESS]: (a2, e2) => ({ ...a2, applicationList: a2.applicationList.map((a3) => a3.folder || a3.applicationId !== e2.payload.applicationId ? a3 : { ...a3, ...e2.payload }), currentApplication: a2.currentApplication && { ...a2.currentApplication, ...e2.payload } }), [a.PUBLISH_APPLICATION]: (a2) => ({ ...a2, loadingStatus: { ...a2.loadingStatus, applicationPublishing: true } }), [a.PUBLISH_APPLICATION_SUCCESS]: (a2) => ({ ...a2, loadingStatus: { ...a2.loadingStatus, applicationPublishing: false } }), [t.PUBLISH_APPLICATION_ERROR]: (a2) => ({ ...a2, loadingStatus: { ...a2.loadingStatus, applicationPublishing: false } }), [a.FETCH_APP_PERMISSIONS_SUCCESS]: (a2, e2) => ({ ...a2, appPermissionInfo: { ...e2.payload } }), [a.UPDATE_APP_PERMISSION_SUCCESS]: (a2, e2) => a2.appPermissionInfo ? { ...a2, appPermissionInfo: { ...a2.appPermissionInfo, permissions: a2.appPermissionInfo.permissions.map((a3) => a3.permissionId === e2.payload.permissionId ? { ...a3, role: e2.payload.role } : a3) } } : a2, [a.UPDATE_APP_PERMISSION_INFO]: (a2, e2) => a2.appPermissionInfo ? { ...a2, appPermissionInfo: { ...a2.appPermissionInfo, ...e2.payload } } : a2, [a.DELETE_APP_PERMISSION_SUCCESS]: (a2, e2) => a2.appPermissionInfo ? { ...a2, appPermissionInfo: { ...a2.appPermissionInfo, permissions: a2.appPermissionInfo.permissions.filter((a3) => a3.permissionId !== e2.payload.permissionId) } } : { ...a2 }, [a.FETCH_APPLICATION_DETAIL]: (a2) => ({ ...a2, loadingStatus: { ...a2.loadingStatus, fetchingAppDetail: true } }), [a.FETCH_APP_EDITING_DETAIL_SUCCESS]: (a2, e2) => ({ ...a2, currentApplication: e2.payload.applicationInfoView, loadingStatus: { ...a2.loadingStatus, fetchingAppDetail: false } }), [a.FETCH_APP_PUBLISH_DETAIL_SUCCESS]: (a2, e2) => ({ ...a2, currentApplication: e2.payload.applicationInfoView, templateId: e2.payload.templateId, loadingStatus: { ...a2.loadingStatus, fetchingAppDetail: false } }), [t.FETCH_APPLICATION_DETAIL_ERROR]: (a2) => ({ ...a2, loadingStatus: { ...a2.loadingStatus, fetchingAppDetail: false } }), [a.FETCH_SERVER_SETTINGS_SUCCESS]: (a2, e2) => ({ ...a2, serverSettings: e2.payload }) }), Qa = N({ orgUsers: [], orgGroups: [], groupUsers: [], orgUsersFetching: true, currentUserGroupRole: "", groupUsersFetching: true, fetchOrgGroupsFinished: false, orgCreateStatus: "init", apiUsage: 0, lastMonthApiUsage: 0, orgUserStats: {} }, { [a.FETCH_ORG_GROUPS_SUCCESS]: (a2, e2) => ({ ...a2, orgGroups: e2.payload.orgGroups, orgUserStats: e2.payload.orgUserStats, fetchOrgGroupsFinished: true }), [t.FETCH_ORG_GROUPS_ERROR]: (a2) => ({ ...a2, fetchOrgGroupsFinished: true }), [a.FETCH_ORG_ALL_USERS]: (a2) => ({ ...a2, orgUsersFetching: true }), [a.FETCH_ORG_ALL_USERS_SUCCESS]: (a2, e2) => ({ ...a2, orgUsers: e2.payload.members, orgUsersFetching: false }), [a.FETCH_GROUP_USERS]: (a2) => ({ ...a2, groupUsersFetching: true }), [a.FETCH_GROUP_USERS_SUCCESS]: (a2, e2) => ({ ...a2, groupUsers: e2.payload.members, groupUsersFetching: false, currentUserGroupRole: e2.payload.visitorRole }), [a.DELETE_GROUP_USER_SUCCESS]: (a2, e2) => ({ ...a2, groupUsers: a2.groupUsers.filter((a3) => a3.userId !== e2.payload.userId) }), [a.DELETE_ORG_USER_SUCCESS]: (a2, e2) => ({ ...a2, orgUsers: a2.orgUsers.filter((a3) => a3.userId !== e2.payload.userId) }), [a.QUIT_GROUP_SUCCESS]: (a2, e2) => ({ ...a2, orgGroups: a2.orgGroups.filter((a3) => !!H(e2.payload.currentUser) || a3.groupId !== e2.payload.groupId), groupUsers: a2.groupUsers.filter((a3) => a3.userId !== e2.payload.userId) }), [a.CREATE_ORG]: (a2) => ({ ...a2, orgCreateStatus: "requesting" }), [a.CREATE_ORG_SUCCESS]: (a2) => ({ ...a2, orgCreateStatus: "success" }), [t.CREATE_ORG_ERROR]: (a2) => ({ ...a2, orgCreateStatus: "error" }), [a.FETCH_ORG_API_USAGE_SUCCESS]: (a2, e2) => ({ ...a2, apiUsage: e2.payload.apiUsage }), [a.FETCH_ORG_LAST_MONTH_API_USAGE_SUCCESS]: (a2, e2) => ({ ...a2, lastMonthApiUsage: e2.payload.lastMonthApiUsage }) }), va = D({ error: "", loadingStates: { fetchingUser: false, profileUpdating: false, fetchUserFinished: false, fetchCurrentUser: "init" }, user: r, currentUser: s, rawCurrentUser: s, profileSettingModalVisible: false, apiKeys: [] }, { [a.LOGOUT_USER_SUCCESS]: (a2) => ({ ...a2, user: { ...r }, newCurrentUser: s, rawCurrentUser: s }), [a.FETCH_USER_INIT]: (a2) => ({ ...a2, loadingStates: { ...a2.loadingStates, fetchingUser: true, fetchCurrentUser: "fetching" } }), [a.FETCH_USER_DETAILS_SUCCESS]: (a2, e2) => ({ ...a2, user: e2.payload, loadingStates: { ...a2.loadingStates, fetchingUser: false, fetchUserFinished: true } }), [t.FETCH_USER_DETAILS_ERROR]: (a2) => ({ ...a2, loadingStates: { ...a2.loadingStates, fetchingUser: false, fetchUserFinished: true } }), [a.FETCH_CURRENT_USER_SUCCESS]: (a2, e2) => ({ ...a2, currentUser: e2.payload, loadingStates: { ...a2.loadingStates, fetchCurrentUser: "finished" } }), [t.FETCH_CURRENT_USER_ERROR]: (a2) => ({ ...a2, loadingStates: { ...a2.loadingStates, fetchCurrentUser: "finished" } }), [a.FETCH_RAW_CURRENT_USER]: (a2) => ({ ...a2 }), [a.FETCH_RAW_CURRENT_USER_SUCCESS]: (a2, e2) => ({ ...a2, rawCurrentUser: e2.payload }), [a.DELETE_ORG_SUCCESS]: (a2, e2) => ({ ...a2, user: { ...a2.user, orgs: a2.user.orgs.filter((a3) => a3.id !== e2.payload.orgId) } }), [a.UPDATE_ORG_SUCCESS]: (a2, e2) => {
  const o2 = e2.payload;
  return { ...a2, user: { ...a2.user, orgs: a2.user.orgs.map((a3) => a3.id === o2.id ? { ...a3, ...o2.orgName && { name: o2.orgName }, ...o2.logoUrl && { logoUrl: o2.logoUrl } } : a3) } };
}, [a.SET_USER_PROFILE_SETTING_MODAL_VISIBLE]: (a2, e2) => ({ ...a2, profileSettingModalVisible: e2.payload.visible }), [a.UPDATE_USER_PROFILE]: (a2) => ({ ...a2, loadingStates: { ...a2.loadingStates, profileUpdating: true } }), [t.UPDATE_USER_PROFILE_ERROR]: (a2) => ({ ...a2, loadingStates: { ...a2.loadingStates, profileUpdating: false } }), [a.UPDATE_USER_PROFILE_SUCCESS]: (a2, e2) => ({ ...a2, loadingStates: { ...a2.loadingStates, profileUpdating: false }, user: { ...a2.user, ...e2.payload.name && { username: e2.payload.name }, ...e2.payload.avatarUrl && { avatarUrl: e2.payload.avatarUrl } } }), [a.MARK_USER_STATUS]: (a2, e2) => ({ ...a2, user: { ...a2.user, userStatus: { ...a2.user.userStatus, [e2.payload.type]: e2.payload.value } } }), [a.FETCH_API_KEYS_SUCCESS]: (a2, e2) => ({ ...a2, apiKeys: e2.payload }) }), wa = D({ fetchingConfig: false, editorExternalState: {}, deploymentId: "" }, { [a.FETCH_SYS_CONFIG_INIT]: (a2) => ({ ...a2, fetchingConfig: true }), [a.FETCH_SYS_CONFIG_SUCCESS]: (a2, e2) => ({ ...a2, systemConfig: e2.payload, fetchingConfig: false }), [t.FETCH_SYS_CONFIG_ERROR]: (a2) => ({ ...a2, fetchingConfig: false }), [a.SET_EDITOR_EXTERNAL_STATE]: (a2, e2) => ({ ...a2, editorExternalState: e2.payload }), [a.FETCH_DEPLOYMENT_ID_SUCCESS]: (a2, e2) => ({ ...a2, deploymentId: e2.payload }) }), qa = D({ snapshotCreating: false, snapshotsFetching: false, appSnapshots: [], appSnapshotCount: 0, showAppSnapshot: false, snapshotDslFetching: false, selectedSnapshotId: "", isSelectedSnapshotIdArchived: false }, { [a.SET_SHOW_APP_SNAPSHOT]: (a2, e2) => ({ ...a2, showAppSnapshot: e2.payload.show }), [a.SET_SELECT_SNAPSHOT_ID]: (a2, e2) => ({ ...a2, selectedSnapshotId: e2.payload.snapshotId, isSelectedSnapshotIdArchived: e2.payload.archived }), [a.FETCH_APP_SNAPSHOT_DSL]: (a2) => ({ ...a2, snapshotDslFetching: true }), [a.FETCH_APP_SNAPSHOT_DSL_SUCCESS]: (a2) => ({ ...a2, snapshotDslFetching: false }), [t.FETCH_APP_SNAPSHOT_DSL_ERROR]: (a2) => ({ ...a2, snapshotCreating: false }), [a.CREATE_APP_SNAPSHOT]: (a2) => ({ ...a2, snapshotCreating: true }), [a.CREATE_APP_SNAPSHOT_SUCCESS]: (a2) => ({ ...a2, snapshotCreating: false }), [t.CREATE_APP_SNAPSHOT_ERROR]: (a2) => ({ ...a2, snapshotCreating: false }), [a.FETCH_APP_SNAPSHOTS]: (a2, e2) => ({ ...a2, snapshotsFetching: true }), [a.FETCH_APP_SNAPSHOTS_SUCCESS]: (a2, e2) => ({ ...a2, appSnapshots: e2.payload.list, appSnapshotCount: e2.payload.count, snapshotsFetching: false }), [t.FETCH_APP_SNAPSHOTS_ERROR]: (a2) => ({ ...a2, snapshotsFetching: false }) }), Va = D({ settings: {}, setResult: false, fetched: false, fetching: false, saving: false }, { [a.FETCH_COMMON_SETTING]: (a2) => ({ ...a2, fetchingTheme: true, fetching: true }), [a.FETCH_COMMON_SETTING_SUCCESS]: (a2, e2) => ({ ...a2, settings: { ...a2.settings, ...e2.payload.data, themeList: e2.payload.data.themeList || [], defaultTheme: e2.payload.data.defaultTheme || null }, fetching: false, fetched: true }), [a.SET_COMMON_SETTING]: (a2) => ({ ...a2, setting: true }), [a.SET_COMMON_SETTING_SUCCESS]: (a2, e2) => ({ ...a2, settings: { ...a2.settings, ...e2.payload } }) }), ja = _({ application: Ba, folder: D({ folders: [], folderElements: {}, loadingStatus: { isFetchingFolderElements: false } }, { [a.CREATE_APPLICATION_SUCCESS]: (a2, e2) => {
  const o2 = e2.payload.applicationInfoView, t2 = { ...a2.folderElements };
  return t2[o2.folderId ?? ""] = [o2, ...t2[o2.folderId ?? ""] ?? []], { ...a2, folderElements: t2 };
}, [a.RECYCLE_APPLICATION_SUCCESS]: (a2, e2) => {
  const o2 = [], t2 = { ...a2.folderElements };
  return t2[""] = t2[""].map((a3, t3) => {
    var _a2;
    if (a3.folder) {
      const o3 = (_a2 = a3.subApplications) == null ? void 0 : _a2.filter((a4) => a4.applicationId !== e2.payload.applicationId);
      return { ...a3, subApplications: o3 };
    }
    return a3.applicationId !== e2.payload.applicationId || o2.push(t3), a3;
  }), o2.map((a3) => {
    t2[""].splice(a3, 1);
  }), { ...a2, folderElements: t2 };
}, [a.UPDATE_APPLICATION_META_SUCCESS]: (a2, e2) => {
  var _a2;
  const o2 = { ...a2.folderElements };
  return o2[e2.payload.folderId ?? ""] = (_a2 = o2[e2.payload.folderId ?? ""]) == null ? void 0 : _a2.map((a3) => {
    var _a3;
    return a3.folder || a3.applicationId !== e2.payload.applicationId ? (a3.folder && ((_a3 = a3.subApplications) == null ? void 0 : _a3.map((a4) => {
      a4.applicationId === e2.payload.applicationId && (a4.name = e2.payload.name);
    })), a3) : { ...a3, ...e2.payload };
  }), { ...a2, folderElements: o2 };
}, [a.CREATE_FOLDER_SUCCESS]: (a2, e2) => {
  const o2 = { ...a2.folderElements };
  return o2[e2.payload.parentFolderId ?? ""] = [e2.payload, ...o2[e2.payload.parentFolderId ?? ""] ?? []], { ...a2, folderElements: o2, folders: [{ ...e2.payload, subFolders: [], subApplications: [] }, ...a2.folders] };
}, [a.UPDATE_FOLDER_SUCCESS]: (a2, e2) => {
  var _a2;
  const o2 = { ...a2.folderElements };
  return o2[e2.payload.parentFolderId ?? ""] = (_a2 = o2[e2.payload.parentFolderId ?? ""]) == null ? void 0 : _a2.map((a3) => a3.folder && a3.folderId === e2.payload.folderId ? { ...a3, name: e2.payload.name } : a3), { ...a2, folderElements: o2, folders: a2.folders.map((a3) => a3.folder && a3.folderId === e2.payload.folderId ? { ...e2.payload, name: e2.payload.name } : a3) };
}, [a.MOVE_TO_FOLDER_SUCCESS]: (a2, e2) => {
  var _a2;
  let o2 = { ...a2.folderElements };
  return o2[e2.payload.sourceFolderId ?? ""] = (_a2 = o2[e2.payload.sourceFolderId ?? ""]) == null ? void 0 : _a2.filter((a3) => a3.folder && a3.folderId !== e2.payload.sourceId || !a3.folder && a3.applicationId !== e2.payload.sourceId), { ...a2, folderElements: o2 };
}, [a.MOVE_TO_FOLDER2_SUCCESS]: (a2, e2) => {
  var _a2, _b;
  let o2 = { ...a2.folderElements };
  const { sourceId: t2, folderId: r2, sourceFolderId: s2 } = e2.payload;
  if ("" === s2) {
    const a3 = (_a2 = o2[""]) == null ? void 0 : _a2.find((a4) => !a4.folder && a4.applicationId === t2);
    o2[""] = (_b = o2[""]) == null ? void 0 : _b.filter((a4) => a4.folder || a4.applicationId !== t2), o2[""] = o2[""].map((e3) => {
      var _a3;
      return e3.folder && e3.folderId === r2 && void 0 !== a3 && !a3.folder && ((_a3 = e3.subApplications) == null ? void 0 : _a3.push(a3)), e3;
    });
  } else {
    let a3, e3, d2 = o2[""].map((o3, d3) => {
      var _a3, _b2;
      if (o3.folderId === s2 && o3.folder) {
        const a4 = (_a3 = o3.subApplications) == null ? void 0 : _a3.filter((a5) => a5.folder && a5.folderId !== t2 || !a5.folder && a5.applicationId !== t2);
        return e3 = (_b2 = o3.subApplications) == null ? void 0 : _b2.filter((a5) => a5.folder && a5.folderId === t2 || !a5.folder && a5.applicationId === t2), { ...o3, subApplications: a4 };
      }
      return o3.folderId === r2 && o3.folder ? (a3 = d3, o3) : o3;
    });
    if (void 0 !== a3) {
      const o3 = d2[a3];
      o3.folder && Array.isArray(o3.subApplications) && o3.subApplications.push(e3[0]);
    } else
      d2.push(e3[0]);
    o2[""] = d2;
  }
  return { ...a2, folderElements: o2 };
}, [a.DELETE_FOLDER_SUCCESS]: (a2, e2) => {
  var _a2;
  const o2 = { ...a2.folderElements };
  return o2[e2.payload.parentFolderId ?? ""] = (_a2 = o2[e2.payload.parentFolderId ?? ""]) == null ? void 0 : _a2.filter((a3) => !a3.folder || a3.folder && a3.folderId !== e2.payload.folderId), { ...a2, folderElements: o2, folders: [...a2.folders.filter((a3) => a3.folder && a3.folderId !== e2.payload.folderId)] };
}, [a.FETCH_FOLDER_ELEMENTS_INIT]: (a2) => ({ ...a2, loadingStatus: { ...a2.loadingStatus, isFetchingFolderElements: true } }), [a.FETCH_FOLDER_ELEMENTS_SUCCESS]: (a2, e2) => {
  const o2 = { ...a2.folderElements };
  return o2[e2.payload.parentFolderId ?? ""] = e2.payload.elements, { ...a2, folderElements: o2, loadingStatus: { ...a2.loadingStatus, isFetchingFolderElements: false } };
}, [t.FETCH_FOLDER_ELEMENTS_ERROR]: (a2) => ({ ...a2, loadingStatus: { ...a2.loadingStatus, isFetchingFolderElements: false } }), [a.FETCH_ALL_FOLDERS_SUCCESS]: (a2, e2) => ({ ...a2, folders: e2.payload }) }), appSnapshot: qa, users: va, org: Qa, config: wa, commonSettings: Va, subscriptions: D({ subscriptions: [], loadingStates: { fetchingSubscriptions: false, fetchSubscriptionsFinished: false }, error: void 0 }, { [a.FETCH_SUBSCRIPTIONS_INIT]: (a2) => ({ ...a2, loadingStates: { ...a2.loadingStates, fetchingSubscriptions: true }, error: void 0 }), [a.FETCH_SUBSCRIPTIONS_SUCCESS]: (a2, e2) => ({ ...a2, subscriptions: e2.payload, loadingStates: { ...a2.loadingStates, fetchingSubscriptions: false, fetchSubscriptionsFinished: true }, error: void 0 }), [t.FETCH_SUBSCRIPTIONS_ERROR]: (a2, e2) => ({ ...a2, loadingStates: { ...a2.loadingStates, fetchingSubscriptions: false, fetchSubscriptionsFinished: true }, error: e2.payload }) }) }), Ka = _({ ui: ja, entities: ka, npmPlugin: D({ packageMeta: {}, packageVersion: {}, loading: { lowcoderComps: false } }, { [a.SELECT_PACKAGE_VERSION]: (a2, e2) => ({ ...a2, packageVersion: { ...a2.packageVersion, ...e2.payload } }), [a.PACKAGE_META_READY]: (a2, e2) => {
  const o2 = {};
  return Object.keys(e2.payload).forEach((t2) => {
    var _a2;
    const r2 = e2.payload[t2];
    if (!r2 || a2.packageVersion[t2])
      return;
    let s2 = (_a2 = r2["dist-tags"]) == null ? void 0 : _a2.latest;
    s2 || (s2 = Object.keys(r2.versions || {}).sort().reverse()[0]), o2[t2] = s2;
  }), { ...a2, packageMeta: { ...a2.packageMeta, ...e2.payload }, packageVersion: { ...a2.packageVersion, ...o2 } };
}, [a.LOWCODER_COMPS_LOADING]: (a2, e2) => ({ ...a2, loading: { lowcoderComps: e2.payload.loading } }) }), jsLibrary: D({ recommends: [], meta: {} }, { [a.FETCH_JS_LIB_METAS_SUCCESS]: (a2, e2) => ({ ...a2, meta: { ...a2.meta, ...e2.payload.reduce((a3, e3) => Object.assign(a3, { [e3.name]: e3 }), {}) } }), [a.FETCH_JS_LIB_RECOMMENDS_SUCCESS]: (a2, e2) => ({ ...a2, recommends: e2.payload }) }) }), Wa = (a2) => a2.ui.users.user, Ja = (a2) => a2.ui.users.currentUser, za = (a2) => a2.ui.users.loadingStates.fetchingUser || "fetching" === a2.ui.users.loadingStates.fetchCurrentUser, xa = (a2) => a2.ui.users.loadingStates.fetchUserFinished && "finished" === a2.ui.users.loadingStates.fetchCurrentUser, Xa = (a2) => a2.ui.users.profileSettingModalVisible, Za = (a2) => a2.ui.config.fetchingConfig, $a = (a2) => a2.ui.config.systemConfig, ae = (a2) => {
  var _a2;
  return (_a2 = a2.ui.config.systemConfig) == null ? void 0 : _a2.branding;
}, ee = (a2) => a2.ui.config.deploymentId, oe = (e2) => ({ type: a.SET_EDITOR_EXTERNAL_STATE, payload: e2 });
function* te() {
  try {
    const e2 = yield u(G.getUser);
    if (function(a2) {
      return a2 && a2.data && a2.data.data;
    }(e2) && e2.data.code === d.REDIRECT && e2.data.data.redirectUri) {
      const a2 = e2.data.data.redirectUri, o2 = new URL(window.location.href), t2 = new URL(a2);
      return t2.pathname = o2.pathname, t2.search = o2.search, void window.location.replace(t2);
    }
    if (Y(e2)) {
      if (e2.data.data.isAnonymous)
        return void (yield I({ type: a.FETCH_USER_DETAILS_SUCCESS, payload: r }));
      const { orgAndRoles: o2, ...t2 } = e2.data.data, s2 = o2 ? o2.map((a2) => a2.org) : [], d2 = o2 ? new Map(o2.map((a2) => [a2.org.id, a2.role])) : /* @__PURE__ */ new Map(), i2 = { ...t2, orgs: s2, orgRoleMap: d2 };
      yield I({ type: a.FETCH_USER_DETAILS_SUCCESS, payload: i2 });
    }
  } catch (a2) {
    yield I({ type: t.FETCH_USER_DETAILS_ERROR });
  }
}
function* re() {
  try {
    const e2 = yield u(G.getCurrentUser);
    if (Y(e2)) {
      yield I({ type: a.FETCH_CURRENT_USER_SUCCESS, payload: e2.data.data });
      const { uiLanguage: o2 } = e2.data.data;
      Z(o2);
    }
  } catch (a2) {
    yield I({ type: t.FETCH_CURRENT_USER_ERROR }), x.error("getCurrentUser error:", a2);
  }
}
function* se() {
  try {
    const e2 = yield u(G.getRawCurrentUser);
    Y(e2) && (yield I({ type: a.FETCH_RAW_CURRENT_USER_SUCCESS, payload: e2.data.data }));
  } catch (a2) {
    M.error(a2 instanceof Error ? a2.message : a2), x.error("getRawCurrentUser error:", a2);
  }
}
function* de(a2) {
  try {
    const e2 = yield u(G.updateUser, a2.payload);
    Y(e2) && (yield I(ra(a2.payload)));
  } catch (a3) {
    yield I({ type: t.UPDATE_USER_PROFILE_ERROR }), x.error("update user error:", a3);
  }
}
function* ie(a2) {
  try {
    let e2 = a2.payload.organizationId ? i.replace(":orgId", a2.payload.organizationId) : l;
    if (a2.payload.notAuthorised) {
      const a3 = window.location.href, e3 = new URL(a3).searchParams.get(n.loginType);
      X({ [n.redirectUrl]: encodeURIComponent(a3), [n.loginType]: e3 });
    }
    let o2 = true;
    if (!a2.payload.notAuthorised) {
      const a3 = yield u(G.userLogout);
      o2 = Y(a3);
    }
    o2 && (yield I(ia()), localStorage.clear(), window.location.replace(e2));
  } catch (a3) {
    x.error(a3);
  }
}
function* le(a2) {
  try {
    yield R(500);
    const e2 = yield u(G.markUserStatus, a2.payload);
    Y(e2);
  } catch (a3) {
    x.error(a3);
  }
}
function* ne() {
  try {
    const e2 = yield u(G.fetchApiKeys);
    if (Y(e2)) {
      const o2 = e2.data.data;
      yield I({ type: a.FETCH_API_KEYS_SUCCESS, payload: o2 });
    }
  } catch (a2) {
    x.error(a2);
  }
}
function* pe(a2) {
  try {
    const e2 = yield u(k.updateGroup, a2.payload.groupId, a2.payload.updates);
    Y(e2) && (yield I(_a(a2.payload.orgId)));
  } catch (a3) {
    x.error(a3);
  }
}
function* Se(e2) {
  try {
    const e3 = yield u(k.fetchGroup);
    if (Y(e3)) {
      const o2 = e3.data.data;
      yield I({ type: a.FETCH_ORG_GROUPS_SUCCESS, payload: { orgGroups: o2, orgUserStats: { totalAdmins: e3.data.totalAdmins, totalAdminsAndDevelopers: e3.data.totalAdminsAndDevelopers, totalDevelopersOnly: e3.data.totalDevelopersOnly, totalOtherMembers: e3.data.totalOtherMembers } } });
    }
  } catch (a2) {
    yield I({ type: t.FETCH_ORG_GROUPS_ERROR }), x.error(a2);
  }
}
function* ce(a2) {
  try {
    const e2 = yield u(k.updateUserOrgRole, a2.payload);
    Y(e2) && x.debug("update user role success", a2.payload);
  } catch (a3) {
    x.error(a3);
  }
}
function* Ee(a2) {
  try {
    const e2 = yield u(k.updateUserGroupRole, a2.payload);
    Y(e2) && x.debug("update user role success", a2.payload);
  } catch (a3) {
    x.error(a3);
  }
}
function* ye(e2) {
  try {
    const o2 = yield u(k.fetchOrgUsers, e2.payload.orgId);
    Y(o2) && (yield I({ type: a.FETCH_ORG_ALL_USERS_SUCCESS, payload: o2.data.data }));
  } catch (a2) {
    x.error(a2);
  }
}
function* _e(e2) {
  try {
    const o2 = yield u(k.fetchGroupUsers, e2.payload.groupId);
    Y(o2) && (yield I({ type: a.FETCH_GROUP_USERS_SUCCESS, payload: o2.data.data }));
  } catch (a2) {
    x.error(a2);
  }
}
function* Ce(e2) {
  try {
    const o2 = yield u(k.deleteGroupUser, e2.payload);
    Y(o2) && (yield I({ type: a.DELETE_GROUP_USER_SUCCESS, payload: e2.payload }), x.debug("delete success:", e2.payload));
  } catch (a2) {
    x.error(a2);
  }
}
function* Te(a2) {
  try {
    const e2 = yield u(k.addGroupUser, a2.payload);
    Y(e2) && x.debug("add user success:", a2.payload);
  } catch (a3) {
    x.error(a3);
  }
}
function* ue(e2) {
  try {
    const o2 = yield u(k.deleteOrgUser, e2.payload);
    Y(o2) && (yield I({ type: a.DELETE_ORG_USER_SUCCESS, payload: e2.payload }), x.debug("delete success:", e2.payload));
  } catch (a2) {
    x.error(a2);
  }
}
function* Ie(e2) {
  try {
    const o2 = yield u(k.quitGroup, e2.payload.groupId), t2 = Y(o2), r2 = yield A(Wa);
    t2 && (yield I({ type: a.QUIT_GROUP_SUCCESS, payload: { ...e2.payload, currentUser: r2 } }));
  } catch (a2) {
    M.error(a2.message), x.error(a2);
  }
}
function* Re(a2) {
  try {
    const e2 = yield u(k.quitOrg, a2.payload.orgId);
    Y(e2) && (window.location.href = p);
  } catch (a3) {
    M.error(a3.message), x.error(a3);
  }
}
function* Ae(a2) {
  try {
    const e2 = yield u(k.switchOrg, a2.payload.orgId);
    Y(e2) && window.location.replace(p);
  } catch (a3) {
    M.error(a3.message), x.error(a3);
  }
}
function* Ue(e2) {
  try {
    const o2 = yield u(k.createOrg, e2.payload.orgName);
    Y(o2) && (yield u(te), yield I({ type: a.CREATE_ORG_SUCCESS }));
  } catch (a2) {
    yield I({ type: t.CREATE_ORG_ERROR }), M.error(a2.message), x.error(a2);
  }
}
function* ge(e2) {
  try {
    const o2 = yield u(k.deleteOrg, e2.payload.orgId);
    Y(o2) && (yield I({ type: a.DELETE_ORG_SUCCESS, payload: { orgId: e2.payload.orgId } }));
  } catch (a2) {
    M.error(a2.message), x.error(a2);
  }
}
function* fe(a2) {
  try {
    const e2 = yield u(k.updateOrg, a2.payload);
    Y(e2) && (yield I(Ia(a2.payload)));
  } catch (a3) {
    M.error(a3.message), x.error(a3);
  }
}
function* Oe(a2) {
  try {
    const e2 = yield u(k.fetchAPIUsage, a2.payload.orgId);
    Y(e2) && (yield I(Ra({ apiUsage: e2.data.data })));
  } catch (a3) {
    x.error(a3);
  }
}
function* Pe(a2) {
  try {
    const e2 = yield u(k.fetchLastMonthAPIUsage, a2.payload.orgId);
    Y(e2) && (yield I(Aa({ lastMonthApiUsage: e2.data.data })));
  } catch (a3) {
    x.error(a3);
  }
}
function* Le(e2) {
  const { organizationId: o2, onSuccess: t2 } = e2.payload;
  try {
    const e3 = yield B.fetchDatasourceType(o2);
    Y(e3) && (t2 == null ? void 0 : t2(e3.data.data), yield I({ type: a.FETCH_DATA_SOURCE_TYPES_SUCCESS, payload: e3.data.data }));
  } catch (a2) {
    x.error("fetch data source type error: ", a2), M.error(a2.message);
  }
}
function* he(e2) {
  const { organizationId: o2, onSuccess: r2 } = e2.payload;
  try {
    const e3 = yield B.fetchDatasourceByOrg(o2);
    Y(e3) && (yield I({ type: a.FETCH_DATASOURCE_SUCCESS, payload: e3.data.data }), r2 == null ? void 0 : r2(e3.data.data));
  } catch (a2) {
    x.error("fetch datasource error: ", a2), M.error(a2.message), yield I({ type: t.FETCH_DATASOURCE_ERROR });
  }
}
function* me(e2) {
  const { applicationId: o2, onSuccess: t2 } = e2.payload;
  try {
    const e3 = yield B.fetchDatasourceByApp(o2);
    Y(e3) && (yield I({ type: a.FETCH_DATASOURCE_SUCCESS, payload: e3.data.data }), t2 == null ? void 0 : t2(e3.data.data));
  } catch (a2) {
    x.error("fetch datasource by app error: ", a2);
  }
}
function* Fe(e2) {
  const { datasourceId: o2 } = e2.payload;
  try {
    const e3 = yield B.fetchDatasourceStructure(o2, true), t2 = Y(e3), r2 = {};
    r2[o2] = e3.data.data.tables, t2 && (yield I({ type: a.FETCH_DATASOURCE_STRUCTURE_SUCCESS, payload: r2 }));
  } catch (a2) {
    x.error("fetch datasource structure error: ", a2), M.error(a2.message);
  }
}
function* De(e2) {
  try {
    const o2 = e2.payload, t2 = yield B.createDatasource(o2);
    Y(t2) && (yield I({ type: a.CREATE_DATASOURCE_SUCCESS, payload: t2.data.data }), e2.onSuccessCallback && e2.onSuccessCallback(t2));
  } catch (a2) {
    x.error("create datasource error: ", a2), M.error(a2.message), e2.onErrorCallback && e2.onErrorCallback(a2);
  }
}
function* Ne(e2) {
  try {
    const o2 = e2.payload, t2 = yield B.updateDatasource(o2, o2.id);
    Y(t2) && (yield I({ type: a.UPDATE_DATASOURCE_SUCCESS, payload: t2.data.data }), e2.onSuccessCallback && e2.onSuccessCallback(t2));
  } catch (a2) {
    x.error("update datasource error: ", a2), M.error(a2.message), e2.onErrorCallback && e2.onErrorCallback(a2);
  }
}
function* He(e2) {
  try {
    const o2 = e2.payload.datasourceId, t2 = yield B.deleteDatasource(o2);
    Y(t2) && (yield I({ type: a.DELETE_DATASOURCE_SUCCESS, payload: t2.data.data ? { datasourceId: e2.payload.datasourceId } : {} }));
  } catch (a2) {
    x.error("delete datasource error: ", a2), M.error(a2.message);
  }
}
const be = (e2) => ({ type: a.FETCH_SUBSCRIPTIONS_SUCCESS, payload: e2 }), Me = (a2) => ({ type: t.FETCH_SUBSCRIPTIONS_ERROR, payload: { error: a2 } });
function* Ge(a2) {
  try {
    const a3 = yield A(Wa);
    yield A(Ja);
    const e2 = a3.currentOrgId, o2 = { hostId: yield A(ee), orgId: e2, userId: a3.id }, t2 = yield u(Q, o2);
    yield I(be(t2));
  } catch (a3) {
    a3 instanceof Error ? yield I(Me(a3.message)) : yield I(Me("An unknown error occurred"));
  }
}
function* Ye() {
  yield T(a.FETCH_SUBSCRIPTIONS_INIT, Ge);
}
function* ke(e2) {
  try {
    const o2 = yield u(v.fetchHomeData, e2.payload);
    Y(o2) && (yield I({ type: a.FETCH_HOME_DATA_SUCCESS, payload: o2.data.data }));
  } catch (a2) {
    x.debug("fetch home data error: ", a2), yield I({ type: t.FETCH_HOME_DATA_ERROR });
  }
}
function* Be(e2) {
  try {
    const o2 = yield u(v.fetchAllApplications, e2.payload);
    Y(o2) && (yield I({ type: a.FETCH_ALL_APPLICATIONS_SUCCESS, payload: o2.data.data }));
  } catch (a2) {
    x.debug("fetch all application error: ", a2), M.error(a2.message);
  }
}
function* Qe(e2) {
  try {
    const o2 = yield u(v.fetchAllModules, e2.payload);
    Y(o2) && (yield I({ type: a.FETCH_ALL_MODULES_SUCCESS, payload: o2.data.data }));
  } catch (a2) {
    x.debug("fetch all modules error: ", a2), M.error(a2.message);
  }
}
function* ve(e2) {
  try {
    const o2 = yield u(v.createApplication, e2.payload);
    Y(o2) && (yield I({ type: a.CREATE_APPLICATION_SUCCESS, payload: { ...o2.data.data } }), e2.payload.onSuccess(o2.data.data));
  } catch (a2) {
    x.error("fetch all application error: ", a2), M.error(a2.message), yield I({ type: t.CREATE_APPLICATION_ERROR });
  }
}
function* we(e2) {
  try {
    const o2 = yield u(v.deleteApplication, e2.payload);
    Y(o2) && (yield I({ type: a.DELETE_APPLICATION_SUCCESS, payload: e2.payload }), e2.onSuccessCallback && e2.onSuccessCallback(o2));
  } catch (a2) {
    x.debug("delete application error: ", a2), yield I({ type: t.DELETE_APPLICATION_ERROR, payload: a2 }), e2.onErrorCallback && e2.onErrorCallback(a2);
  }
}
function* qe(a2) {
  try {
    const e2 = yield u(v.updateApplication, a2.payload);
    Y(e2);
  } catch (a3) {
    x.error("update application error: ", a3);
  }
}
function* Ve(e2) {
  try {
    const o2 = yield u(v.updateApplication, e2.payload);
    Y(o2) && e2.payload && (yield I({ type: a.UPDATE_APPLICATION_META_SUCCESS, payload: e2.payload }));
  } catch (a2) {
    x.error("update application meta error: ", a2);
  }
}
function* je(e2) {
  try {
    const o2 = yield u(v.publishApplication, e2.payload);
    Y(o2) && e2.payload && (yield I({ type: a.PUBLISH_APPLICATION_SUCCESS, payload: e2.payload }), M.success($("api.publishSuccess")), window.open(S(e2.payload.applicationId, "view")));
  } catch (a2) {
    M.error(a2.message), yield I({ type: t.PUBLISH_APPLICATION_ERROR, payload: e2.payload }), x.error("publish application error: ", a2);
  }
}
function* Ke(e2) {
  var _a2, _b;
  try {
    let t2;
    t2 = e2.payload.applicationId === o ? E : yield u(v.getApplicationDetail, e2.payload);
    const r2 = w(t2);
    if (r2 && e2.payload) {
      const { applicationDSL: o2, applicationInfoView: r3, moduleDSL: s2, orgCommonSettings: d2 } = t2.data.data;
      e2.payload.onSuccess && e2.payload.onSuccess({ id: r3.applicationId, appType: r3.applicationType || c.Module, dsl: o2, moduleDsl: s2, orgCommonSettings: d2 }), d2 && (yield I({ type: a.FETCH_COMMON_SETTING_SUCCESS, payload: { data: d2 } }));
      const i2 = "editing" === e2.payload.type ? a.FETCH_APP_EDITING_DETAIL_SUCCESS : a.FETCH_APP_PUBLISH_DETAIL_SUCCESS;
      return void (yield I({ type: i2, payload: t2.data.data }));
    }
    if (!r2)
      throw t2.data.code === d.NO_PERMISSION_TO_REQUEST_APP && ((_b = (_a2 = e2.payload).onError) == null ? void 0 : _b.call(_a2, t2.data.message)), Error(t2.data.message);
  } catch (a2) {
    M.error(a2.message), yield I({ type: t.FETCH_APPLICATION_DETAIL_ERROR });
  }
}
function* We(e2) {
  try {
    const o2 = yield u(v.getApplicationPermissions, e2.payload.applicationId);
    Y(o2) && (yield I({ type: a.FETCH_APP_PERMISSIONS_SUCCESS, payload: o2.data.data }));
  } catch (a2) {
    x.debug("fetch all application error: ", a2);
  }
}
function* Je(e2) {
  try {
    const o2 = yield u(v.updateAppPermission, e2.payload);
    Y(o2) && (yield I({ type: a.UPDATE_APP_PERMISSION_SUCCESS, payload: e2.payload }));
  } catch (a2) {
    M.error(a2.message);
  }
}
function* ze(e2) {
  try {
    const o2 = yield u(v.deleteAppPermission, e2.payload);
    Y(o2) && (yield I({ type: a.DELETE_APP_PERMISSION_SUCCESS, payload: e2.payload }));
  } catch (a2) {
    x.debug("fetch all application error: ", a2);
  }
}
function* xe(e2) {
  try {
    const o2 = yield u(v.recycleApplication, e2.payload);
    Y(o2) && (yield I({ type: a.RECYCLE_APPLICATION_SUCCESS, payload: e2.payload }), e2.onSuccessCallback && e2.onSuccessCallback(o2));
  } catch (a2) {
    M.error(a2.message), x.debug("recycle application error: ", a2), e2.onErrorCallback && e2.onErrorCallback(a2);
  }
}
function* Xe(e2) {
  try {
    const o2 = yield u(v.restoreApplication, e2.payload);
    Y(o2) && (yield I({ type: a.RESTORE_APPLICATION_SUCCESS, payload: e2.payload }), e2.onSuccessCallback && e2.onSuccessCallback(o2));
  } catch (a2) {
    M.error(a2.message), x.debug("restore application error: ", a2), e2.onErrorCallback && e2.onErrorCallback(a2);
  }
}
function* Ze() {
  try {
    const e2 = yield u(v.fetchRecycleList);
    Y(e2) && (yield I({ type: a.FETCH_APPLICATION_RECYCLE_LIST_SUCCESS, payload: e2.data.data }));
  } catch (a2) {
    M.error(a2.message), x.debug("fetch application recycle list error: ", a2);
  }
}
function* $e() {
  try {
    const e2 = yield u(v.fetchAllMarketplaceApps);
    Y(e2) && (yield I({ type: a.FETCH_ALL_MARKETPLACE_APPS_SUCCESS, payload: e2.data.data }));
  } catch (a2) {
    M.error(a2.message), x.debug("fetch marketplace apps error: ", a2);
  }
}
function* ao(a2) {
  try {
    yield u(v.setAppEditingState, a2.payload);
  } catch (a3) {
    x.debug("set app editing state: ", a3);
  }
}
function* eo() {
  try {
    const e2 = yield u(v.fetchServerSettings);
    Boolean(e2.data) && (yield I({ type: a.FETCH_SERVER_SETTINGS_SUCCESS, payload: e2.data }));
  } catch (a2) {
    x.debug("fetch server settings error: ", a2), M.error(a2.message);
  }
}
function* oo(e2) {
  try {
    const o2 = yield u(q.fetchConfig, e2.payload.orgId);
    Y(o2) && (yield I({ type: a.FETCH_SYS_CONFIG_SUCCESS, payload: y(o2.data.data) }));
  } catch (a2) {
    x.error("fail to fetch config:", a2), yield I({ type: t.FETCH_SYS_CONFIG_ERROR });
  }
}
function* to(e2) {
  try {
    const e3 = yield u(q.fetchDeploymentId);
    Boolean(e3.data) && (yield I({ type: a.FETCH_DEPLOYMENT_ID_SUCCESS, payload: e3.data }));
  } catch (a2) {
    x.error("fail to fetch deployment_id:", a2), yield I({ type: t.FETCH_SYS_CONFIG_ERROR });
  }
}
function* ro(e2) {
  try {
    const o2 = yield u(V.createSnapshot, e2.payload);
    Y(o2) && (yield I({ type: a.CREATE_APP_SNAPSHOT_SUCCESS }));
  } catch (a2) {
    yield I({ type: t.CREATE_APP_SNAPSHOT_ERROR });
  }
}
function* so(e2) {
  try {
    const o2 = yield u(V.getSnapshots, e2.payload.applicationId, { page: e2.payload.page, size: e2.payload.size }, e2.payload.archived);
    Y(o2) && (e2.payload.onSuccess && e2.payload.onSuccess(o2.data.data), yield I({ type: a.FETCH_APP_SNAPSHOTS_SUCCESS, payload: o2.data.data }));
  } catch (a2) {
    yield I({ type: t.FETCH_APP_SNAPSHOTS_ERROR });
  }
}
function* io(e2) {
  try {
    const o2 = yield u(V.getSnapshotDsl, e2.payload.applicationId, e2.payload.snapshotId, e2.payload.archived);
    Y(o2) && (e2.payload.onSuccess(o2.data.data), yield I({ type: a.FETCH_APP_SNAPSHOT_DSL_SUCCESS }));
  } catch (a2) {
    yield I({ type: t.FETCH_APP_SNAPSHOT_DSL_ERROR });
  }
}
function* lo(a2) {
  try {
    const { applicationId: e2, snapshotId: o2, snapshotCreateTime: t2, isArchivedSnapshot: r2 } = a2.payload, s2 = yield u(V.getSnapshotDsl, e2, o2, r2);
    if (Y(s2)) {
      yield u(V.createSnapshot, { applicationId: e2, dsl: s2.data.data.applicationsDsl, context: { operations: [{ compName: "rootComp", operation: "recover", snapshotCreateTime: t2 }] } });
      const a3 = yield u(v.updateApplication, { applicationId: e2, editingApplicationDSL: s2.data.data.applicationsDsl });
      Y(a3) && window.location.reload();
    }
  } catch (a3) {
    M.error($("api.recoverFailed"));
  }
}
function* no(e2) {
  var _a2, _b;
  try {
    const o2 = yield u(j.fetchCommonSetting, e2.payload);
    Y(o2) && ((_b = (_a2 = e2.payload).onSuccess) == null ? void 0 : _b.call(_a2, o2.data.data || []), yield I({ type: a.FETCH_COMMON_SETTING_SUCCESS, payload: o2.data }));
  } catch (a2) {
    M.error(a2 instanceof Error ? a2.message : a2), x.debug("fetch event type error: ", a2);
  }
}
function* po(e2) {
  var _a2, _b;
  try {
    if (e2.payload.isPublicApp)
      return void (yield I({ type: a.SET_COMMON_SETTING_SUCCESS, payload: { [e2.payload.data.key]: e2.payload.data.value } }));
    const o2 = yield u(j.setCommonSetting, e2.payload);
    Y(o2) && ((_b = (_a2 = e2.payload).onSuccess) == null ? void 0 : _b.call(_a2), yield I({ type: a.SET_COMMON_SETTING_SUCCESS, payload: { [e2.payload.data.key]: e2.payload.data.value } }));
  } catch (a2) {
    M.error(a2 instanceof Error ? a2.message : a2), x.debug("fetch event type error: ", a2);
  }
}
function* So(e2) {
  try {
    const e3 = yield K.fetchQueryLibraryByOrg();
    Y(e3) && (yield I({ type: a.FETCH_QUERY_LIBRARY_BY_ORG_SUCCESS, payload: e3.data.data }));
  } catch (a2) {
    x.error("fetch query library error: ", a2), M.error(a2.message);
  }
}
function* co(e2) {
  const { libraryQueryId: o2, libraryQueryRecordId: t2 } = e2.payload;
  try {
    const e3 = yield K.fetchQueryLibraryRecordDSL(o2, t2);
    Y(e3) && (yield I({ type: a.FETCH_QUERY_LIBRARY_RECORD_DSL_SUCCESS, payload: { libraryQueryId: o2, libraryQueryRecordId: t2, dsl: e3.data.data } }));
  } catch (a2) {
    x.error("fetch query library dsl by id error: ", a2), M.error(a2.message), e2.onErrorCallback && e2.onErrorCallback(a2);
  }
}
function* Eo() {
  try {
    const e2 = yield K.fetchQueryLibraryDropdown();
    Y(e2) && (yield I({ type: a.FETCH_QUERY_LIBRARY_DROPDOWN_SUCCESS, payload: e2.data.data }));
  } catch (a2) {
    x.error("fetch query library dropdown error: ", a2), M.error(a2.message);
  }
}
function* yo(e2) {
  try {
    const o2 = e2.payload, t2 = yield K.createQueryLibrary(o2);
    Y(t2) && (yield I({ type: a.CREATE_QUERY_LIBRARY_SUCCESS, payload: t2.data.data }), e2.onSuccessCallback && e2.onSuccessCallback(t2));
  } catch (a2) {
    x.error("create query library error: ", a2), M.error(a2.message), e2.onErrorCallback && e2.onErrorCallback(a2);
  }
}
function* _o(e2) {
  try {
    const o2 = e2.payload, t2 = yield K.updateQueryLibrary(o2.id, o2);
    Y(t2) && (yield I({ type: a.UPDATE_QUERY_LIBRARY_SUCCESS, payload: o2 }), e2.onSuccessCallback && e2.onSuccessCallback(t2));
  } catch (a2) {
    x.error("update library query error: ", a2), M.error(a2.message), e2.onErrorCallback && e2.onErrorCallback(a2);
  }
}
function* Co(e2) {
  try {
    const o2 = e2.payload.queryLibraryId, t2 = yield K.deleteQueryLibrary(o2);
    Y(t2) && (yield I({ type: a.DELETE_QUERY_LIBRARY_SUCCESS, payload: t2.data.data ? { queryLibraryId: e2.payload.queryLibraryId } : {} }));
  } catch (a2) {
    x.error("delete query library error: ", a2), M.error(a2.message);
  }
}
function* To(e2) {
  const { libraryQueryId: o2 } = e2.payload;
  try {
    const e3 = yield K.fetchQueryLibraryRecords(o2);
    Y(e3) && (yield I({ type: a.FETCH_QUERY_LIBRARY_RECORD_SUCCESS, payload: e3.data.data }));
  } catch (a2) {
    x.error("fetch query library records by id error: ", a2), M.error(a2.message);
  }
}
function* uo(e2) {
  try {
    const { libraryQueryId: o2, request: t2 } = e2.payload, r2 = yield K.publishQueryLibrary(o2, t2);
    Y(r2) && (yield I({ type: a.CREATE_QUERY_LIBRARY_RECORD_SUCCESS, payload: r2.data.data }), e2.onSuccessCallback && e2.onSuccessCallback(r2));
  } catch (a2) {
    x.error("create query library record error: ", a2), M.error(a2.message), e2.onErrorCallback && e2.onErrorCallback(a2);
  }
}
function* Io(e2) {
  try {
    const o2 = yield W.createFolder(e2.payload);
    Y(o2) && (yield I({ type: a.CREATE_FOLDER_SUCCESS, payload: o2.data.data }), e2.onSuccessCallback && e2.onSuccessCallback(o2));
  } catch (a2) {
    x.error("create folder error: ", a2), M.error(a2.message), e2.onErrorCallback && e2.onErrorCallback(a2);
  }
}
function* Ro(e2) {
  try {
    const o2 = yield W.updateFolder(e2.payload);
    Y(o2) && (yield I({ type: a.UPDATE_FOLDER_SUCCESS, payload: o2.data.data }));
  } catch (a2) {
    x.error("update folder error: ", a2), M.error(a2.message);
  }
}
function* Ao(e2) {
  try {
    const o2 = yield W.deleteFolder(e2.payload);
    Y(o2) && (yield I({ type: a.DELETE_FOLDER_SUCCESS, payload: e2.payload }), e2.onSuccessCallback && e2.onSuccessCallback(o2));
  } catch (a2) {
    x.error("delete folder error: ", a2), M.error(a2.message), e2.onErrorCallback && e2.onErrorCallback(a2);
  }
}
function* Uo(e2) {
  try {
    const { moveFlag: o2 } = e2.payload;
    delete e2.payload.moveFlag;
    const t2 = yield W.moveToFolder(e2.payload), r2 = Y(t2), s2 = o2 ? a.MOVE_TO_FOLDER2_SUCCESS : a.MOVE_TO_FOLDER_SUCCESS;
    r2 && (yield I({ type: s2, payload: e2.payload }), e2.onSuccessCallback && e2.onSuccessCallback(t2));
  } catch (a2) {
    x.error("move to folder error: ", a2), M.error(a2.message), e2.onErrorCallback && e2.onErrorCallback(a2);
  }
}
function* go(e2) {
  try {
    const o2 = yield W.fetchFolderElements(e2.payload);
    Y(o2) && (e2.payload.folderId || (yield I({ type: a.FETCH_ALL_FOLDERS_SUCCESS, payload: o2.data.data.filter((a2) => a2.folder) })), yield I({ type: a.FETCH_FOLDER_ELEMENTS_SUCCESS, payload: { parentFolderId: e2.payload.folderId, elements: o2.data.data } }));
  } catch (a2) {
    x.error("fetch folder elements error: ", a2), M.error(a2.message), yield I({ type: t.FETCH_FOLDER_ELEMENTS_ERROR });
  }
}
function* fo(e2) {
  try {
    const o2 = yield J.fetchPermissions(e2.payload.datasourceId);
    Y(o2) && (yield I({ type: a.FETCH_DATASOURCE_PERMISSION_SUCCESS, payload: { ...e2.payload, data: o2.data.data } }));
  } catch (a2) {
    x.error("fetch datasource permissions error: ", a2), M.error(a2.message);
  }
}
function* Oo(e2) {
  try {
    const o2 = yield J.grantPermission(e2.payload);
    Y(o2) && (yield I({ type: a.FETCH_DATASOURCE_PERMISSION_INIT, payload: { datasourceId: e2.payload.datasourceId } }), e2.onSuccessCallback && e2.onSuccessCallback(o2));
  } catch (a2) {
    x.error("grant datasource permission error: ", a2), M.error(a2.message), e2.onErrorCallback && e2.onErrorCallback(a2);
  }
}
function* Po(e2) {
  try {
    const o2 = yield J.updatePermission(e2.payload);
    Y(o2) && (yield I({ type: a.UPDATE_QUERY_LIBRARY_SUCCESS, payload: e2.payload }));
  } catch (a2) {
    x.error("update datasource permission error: ", a2), M.error(a2.message);
  }
}
function* Lo(e2) {
  try {
    const o2 = yield J.deletePermission(e2.payload.permissionId);
    Y(o2) && (yield I({ type: a.DELETE_DATASOURCE_PERMISSION_SUCCESS, payload: e2.payload }));
  } catch (a2) {
    x.error("delete datasource permission error: ", a2), M.error(a2.message);
  }
}
function* ho(e2) {
  try {
    const o2 = yield z.fetchMetas(e2.payload);
    Y(o2) && (yield I({ type: a.FETCH_JS_LIB_METAS_SUCCESS, payload: o2.data.data }));
  } catch (a2) {
    x.error("fetch js library metas error: ", a2), M.error(a2.message);
  }
}
function* mo() {
  try {
    const e2 = yield z.fetchRecommends();
    Y(e2) && (yield I({ type: a.FETCH_JS_LIB_RECOMMENDS_SUCCESS, payload: e2.data.data }));
  } catch (a2) {
    x.error("fetch js library recommends error: ", a2), M.error(a2.message);
  }
}
const Fo = [function* () {
  yield C([T(a.FETCH_HOME_DATA, ke), T(a.CREATE_APPLICATION_INIT, ve), T(a.DELETE_APPLICATION_INIT, we), T(a.UPDATE_APPLICATION, qe), T(a.UPDATE_APPLICATION_META, Ve), T(a.PUBLISH_APPLICATION, je), T(a.FETCH_APP_PERMISSIONS, We), T(a.UPDATE_APP_PERMISSION, Je), T(a.DELETE_APP_PERMISSION, ze), T(a.FETCH_APPLICATION_DETAIL, Ke), T(a.FETCH_ALL_APPLICATIONS_INIT, Be), T(a.FETCH_ALL_MODULES_INIT, Qe), T(a.RECYCLE_APPLICATION_INIT, xe), T(a.RESTORE_APPLICATION_INIT, Xe), T(a.FETCH_APPLICATION_RECYCLE_LIST_INIT, Ze), T(a.FETCH_ALL_MARKETPLACE_APPS, $e), T(a.SET_APP_EDITING_STATE, ao), T(a.FETCH_SERVER_SETTINGS, eo)]);
}, function* () {
  yield C([T(a.CREATE_FOLDER_INIT, Io), T(a.UPDATE_FOLDER_INIT, Ro), T(a.DELETE_FOLDER_INIT, Ao), T(a.MOVE_TO_FOLDER_INIT, Uo), T(a.FETCH_FOLDER_ELEMENTS_INIT, go)]);
}, function* () {
  yield C([T(a.LOGOUT_USER_INIT, ie), T(a.FETCH_USER_INIT, te), T(a.FETCH_USER_INIT, re), T(a.FETCH_RAW_CURRENT_USER, se), T(a.UPDATE_USER_PROFILE, de), T(a.MARK_USER_STATUS, le), T(a.FETCH_API_KEYS, ne)]);
}, function* () {
  yield C([T(a.UPDATE_GROUP_INFO, pe), T(a.FETCH_ORG_GROUPS, Se), T(a.FETCH_GROUP_USERS, _e), T(a.DELETE_GROUP_USER, Ce), T(a.ADD_GROUP_USER, Te), T(a.UPDATE_USER_ORG_ROLE, ce), T(a.UPDATE_USER_GROUP_ROLE, Ee), T(a.FETCH_ORG_ALL_USERS, ye), T(a.DELETE_ORG_USER, ue), T(a.QUIT_GROUP, Ie), T(a.QUIT_ORG, Re), T(a.SWITCH_ORG, Ae), T(a.CREATE_ORG, Ue), T(a.DELETE_ORG, ge), T(a.UPDATE_ORG, fe), T(a.FETCH_ORG_API_USAGE, Oe), T(a.FETCH_ORG_LAST_MONTH_API_USAGE, Pe)]);
}, function* () {
  yield C([T(a.FETCH_QUERY_LIBRARY_BY_ORG_INIT, So), T(a.FETCH_QUERY_LIBRARY_DROPDOWN_INIT, Eo), T(a.CREATE_QUERY_LIBRARY_INIT, yo), T(a.UPDATE_QUERY_LIBRARY_INIT, _o), T(a.DELETE_QUERY_LIBRARY_INIT, Co), T(a.FETCH_QUERY_LIBRARY_RECORD_DSL_INIT, co), T(a.FETCH_QUERY_LIBRARY_RECORD, To), T(a.CREATE_QUERY_LIBRARY_RECORD, uo)]);
}, function* () {
  yield C([U(a.FETCH_DATASOURCE_INIT, he), U(a.FETCH_DATASOURCE_BY_APP_INIT, me), U(a.FETCH_DATASOURCE_STRUCTURE_INIT, Fe), U(a.CREATE_DATASOURCE_INIT, De), U(a.UPDATE_DATASOURCE_INIT, Ne), U(a.DELETE_DATASOURCE_INIT, He)]);
}, function* () {
  yield C([T(a.FETCH_DATASOURCE_PERMISSION_INIT, fo), T(a.GRANT_DATASOURCE_PERMISSION_INIT, Oo), T(a.UPDATE_DATASOURCE_PERMISSION_INIT, Po), T(a.DELETE_DATASOURCE_PERMISSION_INIT, Lo)]);
}, function* () {
  yield C([U(a.FETCH_DATA_SOURCE_TYPES, Le)]);
}, function* () {
  yield C([T(a.FETCH_SYS_CONFIG_INIT, oo)]), yield C([T(a.FETCH_DEPLOYMENT_ID_INIT, to)]);
}, function* () {
  yield C([T(a.CREATE_APP_SNAPSHOT, ro), T(a.FETCH_APP_SNAPSHOTS, so), T(a.FETCH_APP_SNAPSHOT_DSL, io), T(a.RECOVER_APP_SNAPSHOT, lo)]);
}, function* () {
  yield C([T(a.FETCH_COMMON_SETTING, no), T(a.SET_COMMON_SETTING, po)]);
}, function* () {
  yield C([T(a.FETCH_JS_LIB_METAS, ho)]), yield C([T(a.FETCH_JS_LIB_RECOMMENDS, mo)]);
}, function* () {
  yield C([Ye()]);
}];
const Do = f(), No = O(Ka, P(L.reduxBatch, h(Do)));
Do.run(function* (a2 = Fo) {
  yield C(a2.map((a3) => g(function* () {
    for (; ; )
      try {
        yield u(a3);
        break;
      } catch (a4) {
        x.error(a4);
      }
  })));
}), aa.registerStore(No);
const Ho = No, bo = m, Mo = (e2) => ({ type: a.SET_SHOW_APP_SNAPSHOT, payload: { show: e2 } }), Go = (e2) => ({ type: a.CREATE_APP_SNAPSHOT, payload: e2 }), Yo = (e2, o2, t2, r2) => ({ type: a.RECOVER_APP_SNAPSHOT, payload: { applicationId: e2, snapshotId: o2, snapshotCreateTime: t2, isArchivedSnapshot: r2 } }), ko = (a2) => a2.ui.commonSettings.settings, Bo = (a2) => a2.ui.commonSettings.settings.themeList, Qo = (a2) => a2.ui.commonSettings.settings.defaultTheme, vo = (e2) => ({ type: a.FETCH_QUERY_LIBRARY_RECORD_DSL_INIT, payload: { ...e2 }, onErrorCallback: e2.onErrorCallback }), wo = ({ queryLibraryId: e2 }) => ({ type: a.DELETE_QUERY_LIBRARY_INIT, payload: { queryLibraryId: e2 } }), qo = (a2) => a2.entities.queryLibrary.queryLibraryInfo, Vo = (a2) => a2.entities.queryLibrary.queryLibraryDropdownInfo, jo = (a2) => a2.entities.queryLibrary.queryLibraryRecordsDSL, Ko = (a2) => a2.ui.appSnapshot.showAppSnapshot, Wo = (a2) => ({ selectedSnapshot: a2.ui.appSnapshot.appSnapshots.find((e2) => e2.snapshotId === a2.ui.appSnapshot.selectedSnapshotId), isArchivedSnapshot: a2.ui.appSnapshot.isSelectedSnapshotIdArchived }), Jo = ({ datasourceId: e2 }) => ({ type: a.FETCH_DATASOURCE_STRUCTURE_INIT, payload: { datasourceId: e2 } }), zo = (e2, o2, t2) => ({ type: a.CREATE_DATASOURCE_INIT, payload: e2, onSuccessCallback: o2, onErrorCallback: t2 }), xo = (e2, o2, t2) => ({ type: a.UPDATE_DATASOURCE_INIT, payload: e2, onSuccessCallback: o2, onErrorCallback: t2 }), Xo = (a2) => a2.jsLibrary.meta, Zo = (a2) => a2.jsLibrary.recommends, $o = (e2) => ({ type: a.FETCH_JS_LIB_METAS, payload: { names: e2 } }), at = () => ({ type: a.FETCH_JS_LIB_RECOMMENDS }), et = (e2) => ({ type: a.UPDATE_FOLDER_INIT, payload: e2 }), ot = (e2, o2, t2) => ({ type: a.DELETE_FOLDER_INIT, payload: e2, onSuccessCallback: o2, onErrorCallback: t2 }), tt = (e2, o2, t2) => ({ type: a.MOVE_TO_FOLDER_INIT, payload: e2, onSuccessCallback: o2, onErrorCallback: t2 }), rt = (a2) => a2.ui.folder.folders, st = (a2) => a2.ui.folder.folderElements, dt = (e2, o2) => ({ type: a.PACKAGE_META_READY, payload: { [e2]: o2 } }), it = (e2) => ({ type: a.SET_COMMON_SETTING, payload: e2 });
export {
  ta as $,
  Sa as A,
  Vo as B,
  jo as C,
  vo as D,
  na as E,
  Qo as F,
  Jo as G,
  wo as H,
  Ko as I,
  $a as J,
  zo as K,
  xo as L,
  pa as M,
  qo as N,
  st as O,
  ha as P,
  ot as Q,
  Fa as R,
  aa as S,
  et as T,
  Da as U,
  tt as V,
  dt as W,
  ko as X,
  it as Y,
  fa as Z,
  oe as _,
  ae as a,
  ra as a0,
  ea as a1,
  Xa as a2,
  oa as a3,
  ua as a4,
  Ta as a5,
  rt as a6,
  Wo as a7,
  Yo as a8,
  Mo as a9,
  Na as aa,
  za as ab,
  sa as ac,
  Oa as ad,
  ya as ae,
  Go as af,
  Ja as ag,
  la as b,
  $o as c,
  Pa as d,
  Zo as e,
  La as f,
  Za as g,
  at as h,
  xa as i,
  Xo as j,
  Wa as k,
  da as l,
  ma as m,
  Ua as n,
  Ca as o,
  _a as p,
  Ea as q,
  Ho as r,
  ca as s,
  ga as t,
  bo as u,
  Ha as v,
  ba as w,
  Ga as x,
  Ma as y,
  Bo as z
};
