x-essential-lib 0.5.67 → 0.5.73

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.
package/dist/index.js CHANGED
@@ -1,65 +1,22 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.id="x-essential-lib",a.appendChild(document.createTextNode('.x-cont[data-v-f4ad116e]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-f4ad116e]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-f4ad116e]{transform-origin:20px 20px;animation:lds-spinner-f4ad116e 1.2s linear infinite}.lds-spinner div[data-v-f4ad116e]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-f4ad116e]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-f4ad116e]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-f4ad116e]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-f4ad116e]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-f4ad116e]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-f4ad116e]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-f4ad116e]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-f4ad116e]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-f4ad116e]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-f4ad116e]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-f4ad116e{0%{opacity:1}to{opacity:0}}.x-cont[data-v-8c2268ea]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import { ref as i, computed as g, onMounted as q, onBeforeUnmount as j, defineComponent as T, watch as G, resolveComponent as h, openBlock as D, createBlock as O, unref as z, isRef as J, withKeys as F, withModifiers as U, withCtx as w, createVNode as y, createTextVNode as A, toDisplayString as S, createElementBlock as H, normalizeStyle as ge, pushScopeId as ve, popScopeId as me, createElementVNode as m, reactive as he, Fragment as we, renderList as xe, createCommentVNode as ye } from "vue";
3
- import { useLocale as Q, useTheme as Y, useDisplay as ke } from "vuetify";
4
- import { defineStore as le } from "pinia";
5
- import Ce from "axios";
6
- import { useRouter as ne, useRoute as be } from "vue-router";
7
- const Z = le("global", () => {
8
- const e = i(!1), a = i("en"), t = i({}), l = i(""), o = i("");
9
- return {
10
- dark: e,
11
- locale: a,
12
- permissionObjects: t,
13
- permissionChecksum: l,
14
- lastAppPath: o
15
- };
16
- }), re = le("viewMgr", () => {
17
- const e = i([]);
18
- function a() {
19
- return e.value.length <= 0;
20
- }
21
- function t() {
22
- const p = e.value.length;
23
- if (p > 0)
24
- return e.value[p - 1];
25
- }
26
- function l(p) {
27
- return e.value.find((s) => s === p) !== void 0;
28
- }
29
- function o(p) {
30
- e.value.push(p);
31
- }
32
- function r(p) {
33
- const s = e.value.findIndex((v) => v === p);
34
- s !== -1 && e.value.splice(s, 1);
35
- }
36
- function n() {
37
- console.assert(e.value.length > 0), e.value.pop();
38
- }
39
- function c() {
40
- e.value = [];
41
- }
42
- return {
43
- views: e,
44
- isEmpty: a,
45
- lastView: t,
46
- hasView: l,
47
- addView: o,
48
- delView: r,
49
- popView: n,
50
- clearViews: c
51
- };
52
- });
2
+ var ve = Object.defineProperty;
3
+ var me = (e, t, a) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
4
+ var U = (e, t, a) => (me(e, typeof t != "symbol" ? t + "" : t, a), a);
5
+ import { ref as i, watch as R, computed as f, onMounted as A, onBeforeUnmount as T, defineComponent as B, resolveComponent as v, openBlock as k, createBlock as I, unref as K, isRef as Y, withKeys as N, withModifiers as $, withCtx as m, createVNode as y, createTextVNode as O, toDisplayString as V, createElementBlock as J, normalizeStyle as he, pushScopeId as we, popScopeId as ye, createElementVNode as g, reactive as xe, Fragment as be, renderList as ke, createCommentVNode as Ce } from "vue";
6
+ import { useLocale as Z, useTheme as P, useDisplay as Se } from "vuetify";
7
+ import { defineStore as ne } from "pinia";
8
+ import De from "axios";
9
+ import { useRouter as re, useRoute as Re } from "vue-router";
53
10
  /*! js-cookie v3.0.5 | MIT */
54
- function W(e) {
55
- for (var a = 1; a < arguments.length; a++) {
56
- var t = arguments[a];
57
- for (var l in t)
58
- e[l] = t[l];
11
+ function F(e) {
12
+ for (var t = 1; t < arguments.length; t++) {
13
+ var a = arguments[t];
14
+ for (var l in a)
15
+ e[l] = a[l];
59
16
  }
60
17
  return e;
61
18
  }
62
- var De = {
19
+ var Ve = {
63
20
  read: function(e) {
64
21
  return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
65
22
  },
@@ -70,23 +27,23 @@ var De = {
70
27
  );
71
28
  }
72
29
  };
73
- function X(e, a) {
74
- function t(o, r, n) {
30
+ function Q(e, t) {
31
+ function a(o, r, n) {
75
32
  if (!(typeof document > "u")) {
76
- n = W({}, a, n), typeof n.expires == "number" && (n.expires = new Date(Date.now() + n.expires * 864e5)), n.expires && (n.expires = n.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
77
- var c = "";
78
- for (var p in n)
79
- n[p] && (c += "; " + p, n[p] !== !0 && (c += "=" + n[p].split(";")[0]));
80
- return document.cookie = o + "=" + e.write(r, o) + c;
33
+ n = F({}, t, n), typeof n.expires == "number" && (n.expires = new Date(Date.now() + n.expires * 864e5)), n.expires && (n.expires = n.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
34
+ var s = "";
35
+ for (var u in n)
36
+ n[u] && (s += "; " + u, n[u] !== !0 && (s += "=" + n[u].split(";")[0]));
37
+ return document.cookie = o + "=" + e.write(r, o) + s;
81
38
  }
82
39
  }
83
40
  function l(o) {
84
41
  if (!(typeof document > "u" || arguments.length && !o)) {
85
- for (var r = document.cookie ? document.cookie.split("; ") : [], n = {}, c = 0; c < r.length; c++) {
86
- var p = r[c].split("="), s = p.slice(1).join("=");
42
+ for (var r = document.cookie ? document.cookie.split("; ") : [], n = {}, s = 0; s < r.length; s++) {
43
+ var u = r[s].split("="), _ = u.slice(1).join("=");
87
44
  try {
88
- var v = decodeURIComponent(p[0]);
89
- if (n[v] = e.read(s, v), o === v)
45
+ var h = decodeURIComponent(u[0]);
46
+ if (n[h] = e.read(_, h), o === h)
90
47
  break;
91
48
  } catch {
92
49
  }
@@ -96,170 +53,226 @@ function X(e, a) {
96
53
  }
97
54
  return Object.create(
98
55
  {
99
- set: t,
56
+ set: a,
100
57
  get: l,
101
58
  remove: function(o, r) {
102
- t(
59
+ a(
103
60
  o,
104
61
  "",
105
- W({}, r, {
62
+ F({}, r, {
106
63
  expires: -1
107
64
  })
108
65
  );
109
66
  },
110
67
  withAttributes: function(o) {
111
- return X(this.converter, W({}, this.attributes, o));
68
+ return Q(this.converter, F({}, this.attributes, o));
112
69
  },
113
70
  withConverter: function(o) {
114
- return X(W({}, this.converter, o), this.attributes);
71
+ return Q(F({}, this.converter, o), this.attributes);
115
72
  }
116
73
  },
117
74
  {
118
- attributes: { value: Object.freeze(a) },
75
+ attributes: { value: Object.freeze(t) },
119
76
  converter: { value: Object.freeze(e) }
120
77
  }
121
78
  );
122
79
  }
123
- var I = X(De, { path: "/" });
124
- function ot(e) {
125
- const a = Ce.create({
80
+ var j = Q(Ve, { path: "/" });
81
+ function ct(e) {
82
+ const t = De.create({
126
83
  timeout: 6e3
127
84
  });
128
- return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
129
- (t) => Re(t),
130
- (t) => {
131
- Ve(t, e.onError);
85
+ return t.defaults.baseURL = e.baseUrl, t.interceptors.request.use(
86
+ (a) => Ae(a),
87
+ (a) => {
88
+ qe(a, e.onError);
132
89
  }
133
- ), a.interceptors.response.use(
134
- (t) => Se(t),
135
- (t) => qe(t, e.onError)
136
- ), a;
90
+ ), t.interceptors.response.use(
91
+ (a) => Oe(a),
92
+ (a) => je(a, e.onError)
93
+ ), t;
137
94
  }
138
- function Re(e) {
139
- const a = I.get("accessToken") ?? "";
140
- return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
95
+ function Ae(e) {
96
+ const t = j.get("accessToken") ?? "";
97
+ return e.headers.Authorization = "Basic " + t, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
141
98
  }
142
- function Ve(e, a) {
143
- console.error(e), a("request timeout");
99
+ function qe(e, t) {
100
+ console.error(e), t("request timeout");
144
101
  }
145
- function Se(e) {
102
+ function Oe(e) {
146
103
  return e.data;
147
104
  }
148
- function qe(e, a) {
105
+ function je(e, t) {
149
106
  var o;
150
- const t = e.response;
151
- if (!t)
107
+ const a = e.response;
108
+ if (!a)
152
109
  return Promise.reject(e);
153
- t.status === 401 && Ae();
154
- let l = (o = t.data) == null ? void 0 : o.message;
110
+ a.status === 401 && Ie();
111
+ let l = (o = a.data) == null ? void 0 : o.message;
155
112
  return l || (l = {
156
- code: t.status,
157
- message: t.statusText
158
- }), a(l), Promise.reject(e);
159
- }
160
- function Ae() {
161
- I.remove("accessToken"), I.remove("refreshToken"), I.remove("activeOrg"), ne().replace({ path: "/passport/login" });
162
- }
163
- function Ie(e) {
164
- return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
165
- var l = e.get(a);
166
- l ? l.push(t) : e.set(a, [t]);
167
- }, off: function(a, t) {
168
- var l = e.get(a);
169
- l && (t ? l.splice(l.indexOf(t) >>> 0, 1) : e.set(a, []));
170
- }, emit: function(a, t) {
171
- var l = e.get(a);
113
+ code: a.status,
114
+ message: a.statusText
115
+ }), t(l), Promise.reject(e);
116
+ }
117
+ function Ie() {
118
+ j.remove("accessToken"), j.remove("refreshToken"), j.remove("activeOrg"), re().replace({ path: "/passport/login" });
119
+ }
120
+ function Te(e) {
121
+ return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, a) {
122
+ var l = e.get(t);
123
+ l ? l.push(a) : e.set(t, [a]);
124
+ }, off: function(t, a) {
125
+ var l = e.get(t);
126
+ l && (a ? l.splice(l.indexOf(a) >>> 0, 1) : e.set(t, []));
127
+ }, emit: function(t, a) {
128
+ var l = e.get(t);
172
129
  l && l.slice().map(function(o) {
173
- o(t);
130
+ o(a);
174
131
  }), (l = e.get("*")) && l.slice().map(function(o) {
175
- o(a, t);
132
+ o(t, a);
176
133
  });
177
134
  } };
178
135
  }
179
- const u = function() {
180
- return window.eventBus || (window.eventBus = Ie()), window.eventBus;
136
+ const c = function() {
137
+ return window.eventBus || (window.eventBus = Te()), window.eventBus;
181
138
  }();
182
- async function lt(e) {
183
- return new Promise((a) => {
184
- setTimeout(a, e);
139
+ async function st(e) {
140
+ return new Promise((t) => {
141
+ setTimeout(t, e);
185
142
  });
186
143
  }
187
- async function P(e, a, t) {
144
+ async function ee(e, t, a) {
188
145
  const l = Date.now();
189
146
  return new Promise((o) => {
190
147
  const r = async () => {
191
- e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(r, t ?? 30);
148
+ e() ? o(!0) : t && Date.now() - l > t ? o(!1) : setTimeout(r, a ?? 30);
192
149
  };
193
150
  r();
194
151
  });
195
152
  }
196
- function Oe(e, a) {
153
+ function Be(e, t) {
197
154
  var o;
198
- const t = "single-spa-application:" + e, l = (o = document.getElementById(t)) == null ? void 0 : o.classList;
199
- l && (l.remove("app-left", "app-right", "app-reset"), a ? l.add("app-left") : l.add("app-right"), setTimeout(() => {
155
+ const a = "single-spa-application:" + e, l = (o = document.getElementById(a)) == null ? void 0 : o.classList;
156
+ l && (l.remove("app-left", "app-right", "app-reset"), t ? l.add("app-left") : l.add("app-right"), setTimeout(() => {
200
157
  l.add("app-reset");
201
- }, 0));
158
+ }, 50));
202
159
  }
203
- let ae = Date.now();
160
+ let oe = Date.now();
204
161
  function ce() {
205
162
  const e = Date.now();
206
- return e - ae > 500 ? (ae = e, !0) : !1;
163
+ return e - oe > 500 ? (oe = e, !0) : !1;
207
164
  }
208
- let je = 0;
209
- function ue() {
210
- return ++je;
165
+ let Le = 0;
166
+ function se() {
167
+ return ++Le;
211
168
  }
212
- async function nt(e) {
169
+ async function ut(e) {
213
170
  if (!ce())
214
171
  return;
215
- let a = !1, t;
172
+ let t = !1, a;
216
173
  const l = (r) => {
217
- t = r, a = !0;
218
- }, o = ue();
219
- return u.on("confirmDlgResult" + o, l), u.emit("confirmDlg", { ...e, seq: o }), await P(() => a), console.log("confirm dlg closed", o, a, t), u.off("confirmDlgResult" + o, l), t;
174
+ a = r, t = !0;
175
+ }, o = se();
176
+ return c.on("confirmDlgResult" + o, l), c.emit("confirmDlg", { ...e, seq: o }), await ee(() => t), console.log("confirm dlg closed", o, t, a), c.off("confirmDlgResult" + o, l), a;
220
177
  }
221
- async function rt(e) {
178
+ async function pt(e) {
222
179
  if (!ce())
223
180
  return;
224
- let a = !1, t;
181
+ let t = !1, a;
225
182
  const l = (r) => {
226
- t = r, a = !0;
227
- }, o = ue();
228
- return u.on("promptDlgResult" + o, l), u.emit("promptDlg", { ...e, seq: o }), await P(() => a), console.log("prompt dlg closed", o, a, t), u.off("promptDlgResult" + o, l), t;
229
- }
230
- function ct() {
231
- u.emit("openWaitDlg");
232
- }
233
- function ut() {
234
- u.emit("closeWaitDlg");
183
+ a = r, t = !0;
184
+ }, o = se();
185
+ return c.on("promptDlgResult" + o, l), c.emit("promptDlg", { ...e, seq: o }), await ee(() => t), console.log("prompt dlg closed", o, t, a), c.off("promptDlgResult" + o, l), a;
186
+ }
187
+ function _t() {
188
+ c.emit("openWaitDlg");
189
+ }
190
+ function dt() {
191
+ c.emit("closeWaitDlg");
192
+ }
193
+ class it {
194
+ constructor(t, a) {
195
+ U(this, "master");
196
+ U(this, "localeHook");
197
+ U(this, "alreadySync", !1);
198
+ U(this, "handlers", [
199
+ (t) => this.onDarkChange(t),
200
+ (t) => this.onLocaleChange(t),
201
+ (t) => this.onPermissionChange(t),
202
+ (t) => this.onLastAppPathChange(t),
203
+ () => this.onSync()
204
+ ]);
205
+ this.master = t, this.localeHook = a, c.on("globalStateDarkChange", this.handlers[0]), c.on("globalStateLocaleChange", this.handlers[1]), c.on("globalStatePermissionChange", this.handlers[2]), c.on("globalStateLastAppPathChange", this.handlers[3]), this.master && c.on("globalStateSync", this.handlers[4]);
206
+ }
207
+ async sync() {
208
+ var a;
209
+ if (this.master) {
210
+ console.assert(!1, "master can not call sync");
211
+ return;
212
+ }
213
+ if (this.alreadySync) {
214
+ console.assert(!1, "call sync duplicate");
215
+ return;
216
+ }
217
+ c.emit("globalStateSync");
218
+ const t = C();
219
+ await ((a = this.localeHook) == null ? void 0 : a.call(this, t.locale)), this.alreadySync = !0;
220
+ }
221
+ dispose() {
222
+ c.off("globalStateDarkChange", this.handlers[0]), c.off("globalStateLocaleChange", this.handlers[1]), c.off("globalStatePermissionChange", this.handlers[2]), c.off("globalStateLastAppPathChange", this.handlers[3]), this.master && c.off("globalStateSync", this.handlers[4]);
223
+ }
224
+ onDarkChange(t) {
225
+ const a = C();
226
+ a.dark = t;
227
+ }
228
+ onLocaleChange(t) {
229
+ var l;
230
+ const a = C();
231
+ a.locale = t, this.alreadySync && ((l = this.localeHook) == null || l.call(this, t));
232
+ }
233
+ onPermissionChange(t) {
234
+ const a = C();
235
+ a.permissionObjects = t[0], a.permissionChecksum = t[1];
236
+ }
237
+ onLastAppPathChange(t) {
238
+ const a = C();
239
+ a.lastAppPath = t;
240
+ }
241
+ onSync() {
242
+ const t = C();
243
+ c.emit("globalStateDarkChange", t.dark), c.emit("globalStateLocaleChange", t.locale), c.emit("globalStatePermissionChange", [
244
+ t.permissionObjects,
245
+ t.permissionChecksum
246
+ ]), c.emit("globalStateLastAppPathChange", t.lastAppPath);
247
+ }
235
248
  }
236
- function pt(e, a) {
237
- u.emit("message", { type: "error", text: e, timeout: a });
249
+ function ft(e, t) {
250
+ c.emit("message", { type: "error", text: e, timeout: t });
238
251
  }
239
- function st(e, a) {
240
- u.emit("message", { type: "info", text: e, timeout: a });
252
+ function gt(e, t) {
253
+ c.emit("message", { type: "info", text: e, timeout: t });
241
254
  }
242
- function _t(e, a) {
243
- u.emit("message", { type: "success", text: e, timeout: a });
255
+ function vt(e, t) {
256
+ c.emit("message", { type: "success", text: e, timeout: t });
244
257
  }
245
- function dt(e, a) {
246
- u.emit("message", { type: "warning", text: e, timeout: a });
258
+ function mt(e, t) {
259
+ c.emit("message", { type: "warning", text: e, timeout: t });
247
260
  }
248
- var Te = /* @__PURE__ */ ((e) => (e.list_app_group = "list_app_group", e.create_app_group = "create_app_group", e.delete_app_group = "delete_app_group", e.update_app_group = "update_app_group", e.arrange_app_group = "arrange_app_group", e.list_app = "list_app", e.get_app = "get_app", e.create_app = "create_app", e.delete_app = "delete_app", e.update_app = "update_app", e.list_app_release = "list_app_release", e.get_app_release = "get_app_release", e.create_app_release = "create_app_release", e.delete_app_release = "delete_app_release", e.deploy_app_release = "deploy_app_release", e.open_app_layer = "open_app_layer", e.open_app = "open_app", e.list_calc_space = "list_calc_space", e.get_calc_space = "get_calc_space", e.create_calc_space = "create_calc_space", e.delete_calc_space = "delete_calc_space", e.update_calc_space = "update_calc_space", e.arrange_calc_space = "arrange_calc_space", e.list_func_group = "list_func_group", e.create_func_group = "create_func_group", e.delete_func_group = "delete_func_group", e.update_func_group = "update_func_group", e.arrange_func_group = "arrange_func_group", e.list_func = "list_func", e.get_func = "get_func", e.create_func = "create_func", e.delete_func = "delete_func", e.update_func = "update_func", e.debug_func = "debug_func", e.call_func = "call_func", e.list_func_release = "list_func_release", e.get_func_release = "get_func_release", e.create_func_release = "create_func_release", e.delete_func_release = "delete_func_release", e.deploy_func_release = "deploy_func_release", e.list_flow_group = "list_flow_group", e.create_flow_group = "create_flow_group", e.delete_flow_group = "delete_flow_group", e.update_flow_group = "update_flow_group", e.arrange_flow_group = "arrange_flow_group", e.list_flow = "list_flow", e.get_flow = "get_flow", e.create_flow = "create_flow", e.delete_flow = "delete_flow", e.update_flow = "update_flow", e.call_flow = "call_flow", e.list_flow_release = "list_flow_release", e.get_flow_release = "get_flow_release", e.create_flow_release = "create_flow_release", e.delete_flow_release = "delete_flow_release", e.deploy_flow_release = "deploy_flow_release", e.list_task = "list_task", e.get_task = "get_task", e.create_task = "create_task", e.delete_task = "delete_task", e.update_task = "update_task", e.call_task = "call_task", e.open_calc_layer = "open_calc_layer", e.list_db_space = "list_db_space", e.get_db_space = "get_db_space", e.create_db_space = "create_db_space", e.delete_db_space = "delete_db_space", e.update_db_space = "update_db_space", e.arrange_db_space = "arrange_db_space", e.list_model_group = "list_model_group", e.create_model_group = "create_model_group", e.delete_model_group = "delete_model_group", e.update_model_group = "update_model_group", e.arrange_model_group = "arrange_model_group", e.list_model = "list_model", e.get_model = "get_model", e.create_model = "create_model", e.delete_model = "delete_model", e.update_model = "update_model", e.get_model_data = "get_model_data", e.create_model_data = "create_model_data", e.delete_model_data = "delete_model_data", e.update_model_data = "update_model_data", e.get_graph = "get_graph", e.update_graph = "update_graph", e.list_change = "list_change", e.apply_change = "apply_change", e.open_data_layer = "open_data_layer", e.list_asset_space = "list_asset_space", e.get_asset_space = "get_asset_space", e.create_asset_space = "create_asset_space", e.delete_asset_space = "delete_asset_space", e.update_asset_space = "update_asset_space", e.arrange_asset_space = "arrange_asset_space", e.list_dir = "list_dir", e.create_dir = "create_dir", e.delete_dir = "delete_dir", e.update_dir = "update_dir", e.move_dir = "move_dir", e.list_asset = "list_asset", e.get_asset = "get_asset", e.create_asset = "create_asset", e.delete_asset = "delete_asset", e.update_asset = "update_asset", e.move_asset = "move_asset", e.open_asset_layer = "open_asset_layer", e.list_org_member = "list_org_member", e.add_org_member = "add_org_member", e.remove_org_member = "remove_org_member", e.update_org_member = "update_org_member", e.list_org_role = "list_org_role", e.get_org_role = "get_org_role", e.create_org_role = "create_org_role", e.delete_org_role = "delete_org_role", e.update_org_role = "update_org_role", e.arrange_org_role = "arrange_org_role", e.get_org_structure = "get_org_structure", e.update_org_structure = "update_org_structure", e.filter_model = "filter_model", e))(Te || {});
249
- function oe(e, a) {
261
+ var Ee = /* @__PURE__ */ ((e) => (e.list_app_group = "list_app_group", e.create_app_group = "create_app_group", e.delete_app_group = "delete_app_group", e.update_app_group = "update_app_group", e.arrange_app_group = "arrange_app_group", e.list_app = "list_app", e.get_app = "get_app", e.create_app = "create_app", e.delete_app = "delete_app", e.update_app = "update_app", e.list_app_release = "list_app_release", e.get_app_release = "get_app_release", e.create_app_release = "create_app_release", e.delete_app_release = "delete_app_release", e.deploy_app_release = "deploy_app_release", e.open_app_layer = "open_app_layer", e.open_app = "open_app", e.list_calc_space = "list_calc_space", e.get_calc_space = "get_calc_space", e.create_calc_space = "create_calc_space", e.delete_calc_space = "delete_calc_space", e.update_calc_space = "update_calc_space", e.arrange_calc_space = "arrange_calc_space", e.list_func_group = "list_func_group", e.create_func_group = "create_func_group", e.delete_func_group = "delete_func_group", e.update_func_group = "update_func_group", e.arrange_func_group = "arrange_func_group", e.list_func = "list_func", e.get_func = "get_func", e.create_func = "create_func", e.delete_func = "delete_func", e.update_func = "update_func", e.debug_func = "debug_func", e.call_func = "call_func", e.list_func_release = "list_func_release", e.get_func_release = "get_func_release", e.create_func_release = "create_func_release", e.delete_func_release = "delete_func_release", e.deploy_func_release = "deploy_func_release", e.list_flow_group = "list_flow_group", e.create_flow_group = "create_flow_group", e.delete_flow_group = "delete_flow_group", e.update_flow_group = "update_flow_group", e.arrange_flow_group = "arrange_flow_group", e.list_flow = "list_flow", e.get_flow = "get_flow", e.create_flow = "create_flow", e.delete_flow = "delete_flow", e.update_flow = "update_flow", e.call_flow = "call_flow", e.list_flow_release = "list_flow_release", e.get_flow_release = "get_flow_release", e.create_flow_release = "create_flow_release", e.delete_flow_release = "delete_flow_release", e.deploy_flow_release = "deploy_flow_release", e.list_task = "list_task", e.get_task = "get_task", e.create_task = "create_task", e.delete_task = "delete_task", e.update_task = "update_task", e.call_task = "call_task", e.open_calc_layer = "open_calc_layer", e.list_db_space = "list_db_space", e.get_db_space = "get_db_space", e.create_db_space = "create_db_space", e.delete_db_space = "delete_db_space", e.update_db_space = "update_db_space", e.arrange_db_space = "arrange_db_space", e.list_model_group = "list_model_group", e.create_model_group = "create_model_group", e.delete_model_group = "delete_model_group", e.update_model_group = "update_model_group", e.arrange_model_group = "arrange_model_group", e.list_model = "list_model", e.get_model = "get_model", e.create_model = "create_model", e.delete_model = "delete_model", e.update_model = "update_model", e.get_model_data = "get_model_data", e.create_model_data = "create_model_data", e.delete_model_data = "delete_model_data", e.update_model_data = "update_model_data", e.get_graph = "get_graph", e.update_graph = "update_graph", e.list_change = "list_change", e.apply_change = "apply_change", e.open_data_layer = "open_data_layer", e.list_asset_space = "list_asset_space", e.get_asset_space = "get_asset_space", e.create_asset_space = "create_asset_space", e.delete_asset_space = "delete_asset_space", e.update_asset_space = "update_asset_space", e.arrange_asset_space = "arrange_asset_space", e.list_dir = "list_dir", e.create_dir = "create_dir", e.delete_dir = "delete_dir", e.update_dir = "update_dir", e.move_dir = "move_dir", e.list_asset = "list_asset", e.get_asset = "get_asset", e.create_asset = "create_asset", e.delete_asset = "delete_asset", e.update_asset = "update_asset", e.move_asset = "move_asset", e.open_asset_layer = "open_asset_layer", e.list_org_member = "list_org_member", e.add_org_member = "add_org_member", e.remove_org_member = "remove_org_member", e.update_org_member = "update_org_member", e.list_org_role = "list_org_role", e.get_org_role = "get_org_role", e.create_org_role = "create_org_role", e.delete_org_role = "delete_org_role", e.update_org_role = "update_org_role", e.arrange_org_role = "arrange_org_role", e.get_org_structure = "get_org_structure", e.update_org_structure = "update_org_structure", e.filter_model = "filter_model", e))(Ee || {});
262
+ function le(e, t) {
250
263
  if (!e)
251
264
  return !1;
252
- let t = e;
253
- return Object.keys(t).length <= 0 || (a.split("/").forEach((o) => {
254
- if (Object.keys(t).length <= 0)
265
+ let a = e;
266
+ return Object.keys(a).length <= 0 || (t.split("/").forEach((o) => {
267
+ if (Object.keys(a).length <= 0)
255
268
  return !0;
256
- if (t[o])
257
- t = t[o];
269
+ if (a[o])
270
+ a = a[o];
258
271
  else
259
272
  return !1;
260
- }), Object.keys(t).length <= 0);
273
+ }), Object.keys(a).length <= 0);
261
274
  }
262
- const Be = [
275
+ const Me = [
263
276
  {
264
277
  app: "x-passport-mf",
265
278
  path: "/passport/login",
@@ -367,164 +380,229 @@ const Be = [
367
380
  mainActive: 2
368
381
  }
369
382
  ];
370
- function K(e) {
371
- let a, t = 0;
383
+ function G(e) {
384
+ let t, a = 0;
372
385
  const l = e.split("/").filter((o) => o.trim() !== "");
373
- return Be.forEach((o) => {
374
- const r = o.path.split("/").filter((c) => c.trim() !== "");
386
+ return Me.forEach((o) => {
387
+ const r = o.path.split("/").filter((s) => s.trim() !== "");
375
388
  let n = 0;
376
- for (let c = 0; c < l.length && !(c >= r.length || l[c] !== r[c]); c++)
389
+ for (let s = 0; s < l.length && !(s >= r.length || l[s] !== r[s]); s++)
377
390
  n++;
378
- n > 0 && n >= t && (a = o, t = n);
379
- }), a;
380
- }
381
- const N = i("");
382
- function b(e, a) {
383
- const t = Z();
384
- a === "/" && (a = t.lastAppPath);
385
- const l = K(e), o = K(a);
391
+ n > 0 && n >= a && (t = o, a = n);
392
+ }), t;
393
+ }
394
+ const X = i("");
395
+ function b(e, t) {
396
+ const a = C();
397
+ t === "/" && (t = a.lastAppPath);
398
+ const l = G(e), o = G(t);
386
399
  if (!l) {
387
400
  console.assert(!1, "invalid to route meta");
388
401
  return;
389
402
  }
390
- if (console.info(`~~~~routeChange~~~~ ${a} -> ${e}`), !o)
403
+ if (console.info(`~~~~routeChange~~~~ ${t} -> ${e}`), !o)
391
404
  return;
392
- const r = l.app === o.app, n = l.path === o.path, c = l.level >= o.level;
393
- r ? n ? N.value = "" : N.value = c ? "inner-left" : "inner-right" : (N.value = "", Oe(l.app, c));
405
+ const r = l.app === o.app, n = l.path === o.path, s = l.level >= o.level;
406
+ r ? n ? X.value = "" : X.value = s ? "inner-left" : "inner-right" : (X.value = "", Be(l.app, s));
394
407
  }
395
- function Ee() {
396
- return !!I.get("accessToken");
408
+ function Ue() {
409
+ return !!j.get("accessToken");
397
410
  }
398
- function Me() {
399
- return !!I.get("activeOrg");
411
+ function $e() {
412
+ return !!j.get("activeOrg");
400
413
  }
401
- function ft(e, a, t) {
402
- const l = Ee(), o = Me(), r = K(e.path);
414
+ function ht(e, t, a) {
415
+ const l = Ue(), o = $e(), r = G(e.path);
403
416
  if (!r) {
404
- t();
417
+ a();
405
418
  return;
406
419
  }
407
420
  if (r.requiredState === "auth")
408
421
  if (l)
409
422
  if (o) {
410
423
  const n = "/main";
411
- b(n, a.path), t({ path: n });
424
+ b(n, t.path), a({ path: n });
412
425
  } else
413
- b(e.path, a.path), t();
426
+ b(e.path, t.path), a();
414
427
  else {
415
428
  const n = "/passport/login";
416
- b(n, a.path), t({ path: n });
429
+ b(n, t.path), a({ path: n });
417
430
  }
418
431
  else if (r.requiredState === "org")
419
432
  if (l)
420
433
  if (o)
421
- b(e.path, a.path), t();
434
+ b(e.path, t.path), a();
422
435
  else {
423
436
  const n = "/org/joinOrCreate";
424
- b(n, a.path), t({ path: n });
437
+ b(n, t.path), a({ path: n });
425
438
  }
426
439
  else {
427
440
  const n = "/passport/login";
428
- b(n, a.path), t({ path: n });
441
+ b(n, t.path), a({ path: n });
429
442
  }
430
443
  else if (l)
431
444
  if (o) {
432
445
  const n = "/main";
433
- b(n, a.path), t({ path: n });
446
+ b(n, t.path), a({ path: n });
434
447
  } else {
435
448
  const n = "/org/joinOrCreate";
436
- b(n, a.path), t({ path: n });
449
+ b(n, t.path), a({ path: n });
437
450
  }
438
451
  else
439
- b(e.path, a.path), t();
440
- }
441
- function ee(e, a) {
442
- const t = re(), l = g({
452
+ b(e.path, t.path), a();
453
+ }
454
+ const C = ne(
455
+ "global",
456
+ () => {
457
+ const e = i(), t = i("en"), a = i({}), l = i(""), o = i("");
458
+ return R(e, (r) => {
459
+ c.emit("globalStateDarkChange", r);
460
+ }), R(t, (r) => {
461
+ c.emit("globalStateLocaleChange", r);
462
+ }), R([a, l], (r) => {
463
+ c.emit("globalStatePermissionChange", r);
464
+ }), R(o, (r) => {
465
+ c.emit("globalStateLastAppPathChange", r);
466
+ }), {
467
+ dark: e,
468
+ locale: t,
469
+ permissionObjects: a,
470
+ permissionChecksum: l,
471
+ lastAppPath: o
472
+ };
473
+ },
474
+ {
475
+ persist: [
476
+ {
477
+ paths: ["dark", "locale"],
478
+ storage: localStorage
479
+ }
480
+ ]
481
+ }
482
+ ), ue = ne("viewMgr", () => {
483
+ const e = i([]);
484
+ function t() {
485
+ return e.value.length <= 0;
486
+ }
487
+ function a() {
488
+ const u = e.value.length;
489
+ if (u > 0)
490
+ return e.value[u - 1];
491
+ }
492
+ function l(u) {
493
+ return e.value.find((_) => _ === u) !== void 0;
494
+ }
495
+ function o(u) {
496
+ e.value.push(u);
497
+ }
498
+ function r(u) {
499
+ const _ = e.value.findIndex((h) => h === u);
500
+ _ !== -1 && e.value.splice(_, 1);
501
+ }
502
+ function n() {
503
+ console.assert(e.value.length > 0), e.value.pop();
504
+ }
505
+ function s() {
506
+ e.value = [];
507
+ }
508
+ return {
509
+ views: e,
510
+ isEmpty: t,
511
+ lastView: a,
512
+ hasView: l,
513
+ addView: o,
514
+ delView: r,
515
+ popView: n,
516
+ clearViews: s
517
+ };
518
+ });
519
+ function te(e, t) {
520
+ const a = ue(), l = f({
443
521
  get() {
444
- return t.hasView(e);
522
+ return a.hasView(e);
445
523
  },
446
524
  set(r) {
447
- r ? t.addView(e) : t.delView(e);
525
+ r ? a.addView(e) : a.delView(e);
448
526
  }
449
527
  }), o = (r) => {
450
- a == null || a(r), l.value = !0;
528
+ t == null || t(r), l.value = !0;
451
529
  };
452
- return q(() => {
453
- u.on(e, o);
454
- }), j(() => {
455
- u.off(e, o);
530
+ return A(() => {
531
+ c.on(e, o);
532
+ }), T(() => {
533
+ c.off(e, o);
456
534
  }), { open: l };
457
535
  }
458
- const Ue = /* @__PURE__ */ T({
536
+ const We = /* @__PURE__ */ B({
459
537
  __name: "index",
460
538
  setup(e) {
461
- const a = Q(), { open: t } = ee("confirmDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), c = g(() => {
539
+ const t = Z(), { open: a } = te("confirmDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), s = f(() => {
462
540
  var d;
463
541
  return ((d = r.value) == null ? void 0 : d.color) ?? "primary";
464
- }), p = g(() => {
542
+ }), u = f(() => {
465
543
  var d;
466
- return ((d = r.value) == null ? void 0 : d.text) ?? a.t("cancel");
467
- }), s = g(() => {
544
+ return ((d = r.value) == null ? void 0 : d.text) ?? t.t("cancel");
545
+ }), _ = f(() => {
468
546
  var d;
469
547
  return ((d = n.value) == null ? void 0 : d.color) ?? "primary";
470
- }), v = g(() => {
548
+ }), h = f(() => {
471
549
  var d;
472
- return ((d = n.value) == null ? void 0 : d.text) ?? a.t("confirm");
550
+ return ((d = n.value) == null ? void 0 : d.text) ?? t.t("confirm");
473
551
  });
474
- let C = 0, f = !1;
475
- const R = (d) => {
476
- l.value = d.title, o.value = d.text, r.value = d.cancel, n.value = d.confirm, C = d.seq, f = !1, t.value = !0;
552
+ let q = 0, S = !1;
553
+ const W = (d) => {
554
+ l.value = d.title, o.value = d.text, r.value = d.cancel, n.value = d.confirm, q = d.seq, S = !1, a.value = !0;
477
555
  };
478
- q(() => {
479
- u.on("confirmDlg", R);
480
- }), j(() => {
481
- u.off("confirmDlg", R);
556
+ A(() => {
557
+ c.on("confirmDlg", W);
558
+ }), T(() => {
559
+ c.off("confirmDlg", W);
482
560
  });
483
- const $ = () => {
484
- t.value = !1, f || (u.emit("confirmDlgResult" + C, !0), f = !0);
561
+ const z = () => {
562
+ a.value = !1, S || (c.emit("confirmDlgResult" + q, !0), S = !0);
485
563
  };
486
- return G(t, (d) => {
487
- !d && !f && (u.emit("confirmDlgResult" + C, !1), f = !0);
488
- }), (d, k) => {
489
- const V = h("v-card-text"), B = h("v-btn"), L = h("v-card-actions"), _ = h("v-card"), x = h("v-dialog");
490
- return D(), O(x, {
491
- modelValue: z(t),
492
- "onUpdate:modelValue": k[1] || (k[1] = (E) => J(t) ? t.value = E : null),
564
+ return R(a, (d) => {
565
+ !d && !S && (c.emit("confirmDlgResult" + q, !1), S = !0);
566
+ }), (d, x) => {
567
+ const D = v("v-card-text"), L = v("v-btn"), H = v("v-card-actions"), p = v("v-card"), w = v("v-dialog");
568
+ return k(), I(w, {
569
+ modelValue: K(a),
570
+ "onUpdate:modelValue": x[1] || (x[1] = (E) => Y(a) ? a.value = E : null),
493
571
  onKeydown: [
494
- k[2] || (k[2] = F(U((E) => t.value = !1, ["stop", "prevent"]), ["esc"])),
495
- F(U($, ["stop", "prevent"]), ["enter"])
572
+ x[2] || (x[2] = N($((E) => a.value = !1, ["stop", "prevent"]), ["esc"])),
573
+ N($(z, ["stop", "prevent"]), ["enter"])
496
574
  ],
497
575
  transition: "dialog-top-transition",
498
576
  "max-width": "600px"
499
577
  }, {
500
- default: w(() => [
501
- y(_, { title: l.value }, {
502
- default: w(() => [
503
- y(V, null, {
504
- default: w(() => [
505
- A(S(o.value), 1)
578
+ default: m(() => [
579
+ y(p, { title: l.value }, {
580
+ default: m(() => [
581
+ y(D, null, {
582
+ default: m(() => [
583
+ O(V(o.value), 1)
506
584
  ]),
507
585
  _: 1
508
586
  }),
509
- y(L, { class: "d-flex justify-end" }, {
510
- default: w(() => [
511
- y(B, {
512
- onClick: k[0] || (k[0] = (E) => t.value = !1),
513
- color: c.value,
587
+ y(H, { class: "d-flex justify-end" }, {
588
+ default: m(() => [
589
+ y(L, {
590
+ onClick: x[0] || (x[0] = (E) => a.value = !1),
591
+ color: s.value,
514
592
  variant: "text"
515
593
  }, {
516
- default: w(() => [
517
- A(S(p.value), 1)
594
+ default: m(() => [
595
+ O(V(u.value), 1)
518
596
  ]),
519
597
  _: 1
520
598
  }, 8, ["color"]),
521
- y(B, {
522
- onClick: $,
523
- color: s.value,
599
+ y(L, {
600
+ onClick: z,
601
+ color: _.value,
524
602
  variant: "text"
525
603
  }, {
526
- default: w(() => [
527
- A(S(v.value), 1)
604
+ default: m(() => [
605
+ O(V(h.value), 1)
528
606
  ]),
529
607
  _: 1
530
608
  }, 8, ["color"])
@@ -539,22 +617,22 @@ const Ue = /* @__PURE__ */ T({
539
617
  }, 8, ["modelValue", "onKeydown"]);
540
618
  };
541
619
  }
542
- }), $e = (e) => (ve("data-v-f4ad116e"), e = e(), me(), e), Le = /* @__PURE__ */ $e(() => /* @__PURE__ */ m("div", { class: "lds-spinner" }, [
543
- /* @__PURE__ */ m("div"),
544
- /* @__PURE__ */ m("div"),
545
- /* @__PURE__ */ m("div"),
546
- /* @__PURE__ */ m("div"),
547
- /* @__PURE__ */ m("div"),
548
- /* @__PURE__ */ m("div"),
549
- /* @__PURE__ */ m("div"),
550
- /* @__PURE__ */ m("div"),
551
- /* @__PURE__ */ m("div"),
552
- /* @__PURE__ */ m("div"),
553
- /* @__PURE__ */ m("div"),
554
- /* @__PURE__ */ m("div")
555
- ], -1)), We = [
556
- Le
557
- ], ze = /* @__PURE__ */ T({
620
+ }), ze = (e) => (we("data-v-f4ad116e"), e = e(), ye(), e), He = /* @__PURE__ */ ze(() => /* @__PURE__ */ g("div", { class: "lds-spinner" }, [
621
+ /* @__PURE__ */ g("div"),
622
+ /* @__PURE__ */ g("div"),
623
+ /* @__PURE__ */ g("div"),
624
+ /* @__PURE__ */ g("div"),
625
+ /* @__PURE__ */ g("div"),
626
+ /* @__PURE__ */ g("div"),
627
+ /* @__PURE__ */ g("div"),
628
+ /* @__PURE__ */ g("div"),
629
+ /* @__PURE__ */ g("div"),
630
+ /* @__PURE__ */ g("div"),
631
+ /* @__PURE__ */ g("div"),
632
+ /* @__PURE__ */ g("div")
633
+ ], -1)), Fe = [
634
+ He
635
+ ], Ke = /* @__PURE__ */ B({
558
636
  __name: "index",
559
637
  props: {
560
638
  zIndex: {
@@ -563,21 +641,21 @@ const Ue = /* @__PURE__ */ T({
563
641
  }
564
642
  },
565
643
  setup(e) {
566
- const a = Y(), t = e, l = g(() => ({
567
- background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
568
- zIndex: t.zIndex
644
+ const t = P(), a = e, l = f(() => ({
645
+ background: t.current.value.dark ? "#1e1e1e" : "#ffffff",
646
+ zIndex: a.zIndex
569
647
  }));
570
- return (o, r) => (D(), H("div", {
648
+ return (o, r) => (k(), J("div", {
571
649
  class: "x-cont",
572
- style: ge(l.value)
573
- }, We, 4));
650
+ style: he(l.value)
651
+ }, Fe, 4));
574
652
  }
575
- }), pe = (e, a) => {
576
- const t = e.__vccOpts || e;
577
- for (const [l, o] of a)
578
- t[l] = o;
579
- return t;
580
- }, Fe = /* @__PURE__ */ pe(ze, [["__scopeId", "data-v-f4ad116e"]]), Ke = /* @__PURE__ */ T({
653
+ }), pe = (e, t) => {
654
+ const a = e.__vccOpts || e;
655
+ for (const [l, o] of t)
656
+ a[l] = o;
657
+ return a;
658
+ }, Ne = /* @__PURE__ */ pe(Ke, [["__scopeId", "data-v-f4ad116e"]]), Ge = /* @__PURE__ */ B({
581
659
  __name: "item",
582
660
  props: {
583
661
  id: {},
@@ -586,19 +664,19 @@ const Ue = /* @__PURE__ */ T({
586
664
  timeout: { default: 5e3 }
587
665
  },
588
666
  emits: ["timeout"],
589
- setup(e, { emit: a }) {
590
- const t = e, l = i(!0), o = a;
591
- return q(() => {
667
+ setup(e, { emit: t }) {
668
+ const a = e, l = i(!0), o = t;
669
+ return A(() => {
592
670
  setTimeout(() => {
593
- o("timeout", t.id);
594
- }, t.timeout);
595
- }), G(l, (r) => {
596
- r || o("timeout", t.id);
671
+ o("timeout", a.id);
672
+ }, a.timeout);
673
+ }), R(l, (r) => {
674
+ r || o("timeout", a.id);
597
675
  }), (r, n) => {
598
- const c = h("v-alert");
599
- return D(), O(c, {
676
+ const s = v("v-alert");
677
+ return k(), I(s, {
600
678
  modelValue: l.value,
601
- "onUpdate:modelValue": n[0] || (n[0] = (p) => l.value = p),
679
+ "onUpdate:modelValue": n[0] || (n[0] = (u) => l.value = u),
602
680
  class: "mt-2",
603
681
  "max-width": "90%",
604
682
  width: "500px",
@@ -610,128 +688,128 @@ const Ue = /* @__PURE__ */ T({
610
688
  }, null, 8, ["modelValue", "type", "text"]);
611
689
  };
612
690
  }
613
- }), Ne = /* @__PURE__ */ T({
691
+ }), Xe = /* @__PURE__ */ B({
614
692
  __name: "index",
615
693
  setup(e) {
616
- const a = he({ items: [] });
617
- q(() => {
618
- u.on("message", t);
619
- }), j(() => {
620
- u.off("message", t);
694
+ const t = xe({ items: [] });
695
+ A(() => {
696
+ c.on("message", a);
697
+ }), T(() => {
698
+ c.off("message", a);
621
699
  });
622
- const t = (c) => {
623
- r(c.type, c.text, c.timeout);
624
- }, l = (c) => {
625
- n(c);
700
+ const a = (s) => {
701
+ r(s.type, s.text, s.timeout);
702
+ }, l = (s) => {
703
+ n(s);
626
704
  };
627
705
  let o = 0;
628
- const r = (c, p, s) => {
629
- const v = o++;
630
- a.items.push({ id: v, type: c, text: p, timeout: s });
631
- }, n = (c) => {
632
- const p = a.items.findIndex((s) => s.id === c);
633
- p >= 0 && a.items.splice(p, 1);
706
+ const r = (s, u, _) => {
707
+ const h = o++;
708
+ t.items.push({ id: h, type: s, text: u, timeout: _ });
709
+ }, n = (s) => {
710
+ const u = t.items.findIndex((_) => _.id === s);
711
+ u >= 0 && t.items.splice(u, 1);
634
712
  };
635
- return (c, p) => (D(), H("div", {
636
- onClick: p[0] || (p[0] = U(() => {
713
+ return (s, u) => (k(), J("div", {
714
+ onClick: u[0] || (u[0] = $(() => {
637
715
  }, ["stop"])),
638
716
  class: "x-cont d-flex flex-column-reverse align-center"
639
717
  }, [
640
- (D(!0), H(we, null, xe(a.items, (s) => (D(), O(Ke, {
718
+ (k(!0), J(be, null, ke(t.items, (_) => (k(), I(Ge, {
641
719
  onTimeout: l,
642
- id: s.id,
643
- type: s.type,
644
- text: s.text,
645
- timeout: s.timeout,
646
- key: s.id
720
+ id: _.id,
721
+ type: _.type,
722
+ text: _.text,
723
+ timeout: _.timeout,
724
+ key: _.id
647
725
  }, null, 8, ["id", "type", "text", "timeout"]))), 128))
648
726
  ]));
649
727
  }
650
- }), He = /* @__PURE__ */ pe(Ne, [["__scopeId", "data-v-8c2268ea"]]), Xe = /* @__PURE__ */ T({
728
+ }), Je = /* @__PURE__ */ pe(Xe, [["__scopeId", "data-v-8c2268ea"]]), Qe = /* @__PURE__ */ B({
651
729
  __name: "index",
652
730
  setup(e) {
653
- const a = Q(), { open: t } = ee("promptDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), c = i(), p = i(""), s = i(), v = i(), C = g(() => {
654
- var _;
655
- return ((_ = s.value) == null ? void 0 : _.color) ?? "primary";
656
- }), f = g(() => {
657
- var _;
658
- return ((_ = s.value) == null ? void 0 : _.text) ?? a.t("cancel");
659
- }), R = g(() => {
660
- var _;
661
- return ((_ = v.value) == null ? void 0 : _.color) ?? "primary";
662
- }), $ = g(() => {
663
- var _;
664
- return ((_ = v.value) == null ? void 0 : _.text) ?? a.t("confirm");
731
+ const t = Z(), { open: a } = te("promptDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), s = i(), u = i(""), _ = i(), h = i(), q = f(() => {
732
+ var p;
733
+ return ((p = _.value) == null ? void 0 : p.color) ?? "primary";
734
+ }), S = f(() => {
735
+ var p;
736
+ return ((p = _.value) == null ? void 0 : p.text) ?? t.t("cancel");
737
+ }), W = f(() => {
738
+ var p;
739
+ return ((p = h.value) == null ? void 0 : p.color) ?? "primary";
740
+ }), z = f(() => {
741
+ var p;
742
+ return ((p = h.value) == null ? void 0 : p.text) ?? t.t("confirm");
665
743
  }), d = i();
666
- let k = 0, V = !1;
667
- const B = async (_) => {
668
- var x;
669
- l.value = _.title, o.value = _.text, r.value = _.label, n.value = _.placeholder, c.value = _.rules, p.value = _.value, s.value = _.cancel, v.value = _.confirm, k = _.seq, V = !1, t.value = !0, await P(() => d.value !== void 0, 1e3), (x = d.value) == null || x.focus();
744
+ let x = 0, D = !1;
745
+ const L = async (p) => {
746
+ var w;
747
+ l.value = p.title, o.value = p.text, r.value = p.label, n.value = p.placeholder, s.value = p.rules, u.value = p.value, _.value = p.cancel, h.value = p.confirm, x = p.seq, D = !1, a.value = !0, await ee(() => d.value !== void 0, 1e3), (w = d.value) == null || w.focus();
670
748
  };
671
- q(() => {
672
- u.on("promptDlg", B);
673
- }), j(() => {
674
- u.off("promptDlg", B);
749
+ A(() => {
750
+ c.on("promptDlg", L);
751
+ }), T(() => {
752
+ c.off("promptDlg", L);
675
753
  });
676
- const L = () => {
677
- t.value = !1, V || (u.emit("promptDlgResult" + k, p.value ?? ""), V = !0);
754
+ const H = () => {
755
+ a.value = !1, D || (c.emit("promptDlgResult" + x, u.value ?? ""), D = !0);
678
756
  };
679
- return G(t, (_) => {
680
- !_ && !V && (u.emit("promptDlgResult" + k, void 0), V = !0);
681
- }), (_, x) => {
682
- const E = h("v-card-text"), se = h("v-text-field"), _e = h("v-form"), te = h("v-btn"), de = h("v-card-actions"), fe = h("v-card"), ie = h("v-dialog");
683
- return D(), O(ie, {
684
- modelValue: z(t),
685
- "onUpdate:modelValue": x[2] || (x[2] = (M) => J(t) ? t.value = M : null),
757
+ return R(a, (p) => {
758
+ !p && !D && (c.emit("promptDlgResult" + x, void 0), D = !0);
759
+ }), (p, w) => {
760
+ const E = v("v-card-text"), _e = v("v-text-field"), de = v("v-form"), ae = v("v-btn"), ie = v("v-card-actions"), fe = v("v-card"), ge = v("v-dialog");
761
+ return k(), I(ge, {
762
+ modelValue: K(a),
763
+ "onUpdate:modelValue": w[2] || (w[2] = (M) => Y(a) ? a.value = M : null),
686
764
  onKeydown: [
687
- x[3] || (x[3] = F(U((M) => t.value = !1, ["stop", "prevent"]), ["esc"])),
688
- F(U(L, ["stop", "prevent"]), ["enter"])
765
+ w[3] || (w[3] = N($((M) => a.value = !1, ["stop", "prevent"]), ["esc"])),
766
+ N($(H, ["stop", "prevent"]), ["enter"])
689
767
  ],
690
768
  transition: "dialog-top-transition",
691
769
  "max-width": "600px"
692
770
  }, {
693
- default: w(() => [
771
+ default: m(() => [
694
772
  y(fe, { title: l.value }, {
695
- default: w(() => [
696
- o.value ? (D(), O(E, { key: 0 }, {
697
- default: w(() => [
698
- A(S(o.value), 1)
773
+ default: m(() => [
774
+ o.value ? (k(), I(E, { key: 0 }, {
775
+ default: m(() => [
776
+ O(V(o.value), 1)
699
777
  ]),
700
778
  _: 1
701
- })) : ye("", !0),
702
- y(_e, { class: "mx-3" }, {
703
- default: w(() => [
704
- y(se, {
705
- modelValue: p.value,
706
- "onUpdate:modelValue": x[0] || (x[0] = (M) => p.value = M),
779
+ })) : Ce("", !0),
780
+ y(de, { class: "mx-3" }, {
781
+ default: m(() => [
782
+ y(_e, {
783
+ modelValue: u.value,
784
+ "onUpdate:modelValue": w[0] || (w[0] = (M) => u.value = M),
707
785
  label: r.value,
708
786
  placeholder: n.value,
709
- rules: c.value,
787
+ rules: s.value,
710
788
  ref_key: "target",
711
789
  ref: d
712
790
  }, null, 8, ["modelValue", "label", "placeholder", "rules"])
713
791
  ]),
714
792
  _: 1
715
793
  }),
716
- y(de, { class: "d-flex justify-end" }, {
717
- default: w(() => [
718
- y(te, {
719
- onClick: x[1] || (x[1] = (M) => t.value = !1),
720
- color: C.value,
794
+ y(ie, { class: "d-flex justify-end" }, {
795
+ default: m(() => [
796
+ y(ae, {
797
+ onClick: w[1] || (w[1] = (M) => a.value = !1),
798
+ color: q.value,
721
799
  variant: "text"
722
800
  }, {
723
- default: w(() => [
724
- A(S(f.value), 1)
801
+ default: m(() => [
802
+ O(V(S.value), 1)
725
803
  ]),
726
804
  _: 1
727
805
  }, 8, ["color"]),
728
- y(te, {
729
- onClick: L,
730
- color: R.value,
806
+ y(ae, {
807
+ onClick: H,
808
+ color: W.value,
731
809
  variant: "text"
732
810
  }, {
733
- default: w(() => [
734
- A(S($.value), 1)
811
+ default: m(() => [
812
+ O(V(z.value), 1)
735
813
  ]),
736
814
  _: 1
737
815
  }, 8, ["color"])
@@ -746,37 +824,37 @@ const Ue = /* @__PURE__ */ T({
746
824
  }, 8, ["modelValue", "onKeydown"]);
747
825
  };
748
826
  }
749
- }), Ge = { class: "mx-auto my-auto" }, Je = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */ T({
827
+ }), Ye = { class: "mx-auto my-auto" }, Ze = { class: "d-flex align-center justify-center w-100 h-100" }, Pe = /* @__PURE__ */ B({
750
828
  __name: "index",
751
829
  setup(e) {
752
- const a = Q(), { open: t } = ee("waitDlg"), l = () => {
753
- t.value = !0;
830
+ const t = Z(), { open: a } = te("waitDlg"), l = () => {
831
+ a.value = !0;
754
832
  }, o = () => {
755
- t.value = !1;
833
+ a.value = !1;
756
834
  };
757
- return q(() => {
758
- u.on("openWaitDlg", l), u.on("closeWaitDlg", o);
759
- }), j(() => {
760
- u.off("openWaitDlg", l), u.off("closeWaitDlg", o);
835
+ return A(() => {
836
+ c.on("openWaitDlg", l), c.on("closeWaitDlg", o);
837
+ }), T(() => {
838
+ c.off("openWaitDlg", l), c.off("closeWaitDlg", o);
761
839
  }), (r, n) => {
762
- const c = h("v-card"), p = h("v-dialog");
763
- return D(), O(p, {
764
- modelValue: z(t),
765
- "onUpdate:modelValue": n[0] || (n[0] = (s) => J(t) ? t.value = s : null),
840
+ const s = v("v-card"), u = v("v-dialog");
841
+ return k(), I(u, {
842
+ modelValue: K(a),
843
+ "onUpdate:modelValue": n[0] || (n[0] = (_) => Y(a) ? a.value = _ : null),
766
844
  persistent: "",
767
845
  "no-click-animation": "",
768
846
  fullscreen: ""
769
847
  }, {
770
- default: w(() => [
771
- m("div", Ge, [
772
- y(c, {
848
+ default: m(() => [
849
+ g("div", Ye, [
850
+ y(s, {
773
851
  width: "300px",
774
852
  height: "80px",
775
853
  loading: ""
776
854
  }, {
777
- default: w(() => [
778
- m("div", Je, [
779
- m("span", null, S(z(a).t("waitingResponse")), 1)
855
+ default: m(() => [
856
+ g("div", Ze, [
857
+ g("span", null, V(K(t).t("waitingResponse")), 1)
780
858
  ])
781
859
  ]),
782
860
  _: 1
@@ -787,97 +865,90 @@ const Ue = /* @__PURE__ */ T({
787
865
  }, 8, ["modelValue"]);
788
866
  };
789
867
  }
790
- }), Ye = (e) => {
791
- e.component("x-confirm-dlg", Ue), e.component("x-loading", Fe), e.component("x-message", He), e.component("x-prompt-dlg", Xe), e.component("x-wait-dlg", Qe);
868
+ }), et = (e) => {
869
+ e.component("x-confirm-dlg", We), e.component("x-loading", Ne), e.component("x-message", Je), e.component("x-prompt-dlg", Qe), e.component("x-wait-dlg", Pe);
792
870
  };
793
- function it() {
794
- const e = Y(), a = g(() => e.global.current.value.colors.primary), t = g(() => e.global.current.value.colors.secondary), l = g(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = g(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = g(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), n = g(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = g(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
871
+ function wt() {
872
+ const e = P(), t = f(() => e.global.current.value.colors.primary), a = f(() => e.global.current.value.colors.secondary), l = f(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = f(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = f(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), n = f(() => e.current.value.dark ? "#303030" : "#f6f6f6"), s = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
795
873
  return {
796
- primaryColor: a,
797
- secondaryColor: t,
874
+ primaryColor: t,
875
+ secondaryColor: a,
798
876
  backgroundColor0: l,
799
877
  backgroundColor1: o,
800
878
  backgroundColor2: r,
801
879
  highlightColor: n,
802
- borderColor: c
880
+ borderColor: s
803
881
  };
804
882
  }
805
- function gt() {
806
- const e = be(), a = ne(), t = Z(), l = re(), o = () => {
883
+ function yt() {
884
+ const e = Re(), t = re(), a = ue(), l = () => {
807
885
  console.log("onPause");
808
- }, r = () => {
886
+ }, o = () => {
809
887
  console.log("onResume");
810
- }, n = () => {
811
- var R;
812
- if (!l.isEmpty()) {
813
- l.hasView("waitDlg") || l.popView();
888
+ }, r = () => {
889
+ var u;
890
+ if (!a.isEmpty()) {
891
+ a.hasView("waitDlg") || a.popView();
814
892
  return;
815
893
  }
816
- const f = K(e.path);
817
- (f == null ? void 0 : f.level) === 0 ? (R = navigator == null ? void 0 : navigator.Backbutton) == null || R.goHome(
894
+ const s = G(e.path);
895
+ (s == null ? void 0 : s.level) === 0 ? (u = navigator == null ? void 0 : navigator.Backbutton) == null || u.goHome(
818
896
  () => {
819
897
  },
820
898
  () => {
821
899
  }
822
- ) : a.back();
823
- }, c = (f) => {
824
- t.dark = f;
825
- }, p = (f) => {
826
- t.locale = f;
827
- }, s = (f) => {
828
- t.permissionObjects = f[0], t.permissionChecksum = f[1];
829
- }, v = (f) => {
830
- t.lastAppPath = f;
831
- }, C = (f) => {
832
- if (f.key === "Escape") {
833
- n();
900
+ ) : t.back();
901
+ }, n = (s) => {
902
+ if (s.key === "Escape") {
903
+ r();
834
904
  return;
835
905
  }
836
906
  };
837
- q(() => {
838
- u.on("pause", o), u.on("resume", r), u.on("backbutton", n), u.on("darkChange", c), u.on("localeChange", p), u.on("permissionChange", s), u.on("lastAppPathChange", v), window.addEventListener("keydown", C), u.emit("microAppReady");
839
- }), j(() => {
840
- u.off("pause", o), u.off("resume", r), u.off("backbutton", n), u.off("darkChange", c), u.off("localeChange", p), u.off("permissionChange", s), u.off("lastAppPathChange", v), window.removeEventListener("keydown", C);
907
+ A(() => {
908
+ c.on("pause", l), c.on("resume", o), c.on("backbutton", r), window.addEventListener("keydown", n);
909
+ }), T(() => {
910
+ c.off("pause", l), c.off("resume", o), c.off("backbutton", r), window.removeEventListener("keydown", n);
841
911
  });
842
912
  }
843
- function vt() {
844
- const e = Z();
845
- function a(t, l) {
846
- const o = e.permissionObjects[t];
847
- return o ? l ? !(!oe(o.includes, l) || oe(o.excludes, l)) : !0 : !1;
913
+ function xt() {
914
+ const e = C();
915
+ function t(a, l) {
916
+ const o = e.permissionObjects[a];
917
+ return o ? l ? !(!le(o.includes, l) || le(o.excludes, l)) : !0 : !1;
848
918
  }
849
- return { verifyPermission: a };
919
+ return { verifyPermission: t };
850
920
  }
851
- function mt() {
852
- const e = Y(), a = ke(), t = g(() => e.current.value.dark), l = g(() => !!window.cordova), o = g(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
853
- return { dark: t, sysBarAvail: l, compactWidth: o };
921
+ function bt() {
922
+ const e = P(), t = Se(), a = f(() => e.current.value.dark), l = f(() => !!window.cordova), o = f(() => t.width.value <= 1280 ? t.width.value + "px" : t.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
923
+ return { dark: a, sysBarAvail: l, compactWidth: o };
854
924
  }
855
- const ht = { install: Ye };
925
+ const kt = { install: et };
856
926
  export {
857
- Te as Permission,
858
- Oe as appAppear,
859
- ut as closeWaitDlg,
860
- ot as createAxios,
861
- ht as default,
862
- u as eventBus,
863
- oe as isExist,
864
- K as matchRouteMeta,
865
- pt as messageError,
866
- st as messageInfo,
867
- _t as messageSuccess,
868
- dt as messageWarning,
869
- ft as onBeforeEach,
870
- nt as openConfirmDlg,
871
- rt as openPromptDlg,
872
- ct as openWaitDlg,
873
- N as routeTransName,
874
- it as useColor,
875
- Z as useGlobalStore,
876
- gt as useMicroApp,
877
- vt as usePermission,
878
- mt as useSystem,
879
- re as useViewMgrStore,
880
- ee as useViewStack,
881
- lt as waitMs,
882
- P as waitUtil
927
+ it as GlobalState,
928
+ Ee as Permission,
929
+ Be as appAppear,
930
+ dt as closeWaitDlg,
931
+ ct as createAxios,
932
+ kt as default,
933
+ c as eventBus,
934
+ le as isExist,
935
+ G as matchRouteMeta,
936
+ ft as messageError,
937
+ gt as messageInfo,
938
+ vt as messageSuccess,
939
+ mt as messageWarning,
940
+ ht as onBeforeEach,
941
+ ut as openConfirmDlg,
942
+ pt as openPromptDlg,
943
+ _t as openWaitDlg,
944
+ X as routeTransName,
945
+ wt as useColor,
946
+ C as useGlobalStore,
947
+ yt as useMicroApp,
948
+ xt as usePermission,
949
+ bt as useSystem,
950
+ ue as useViewMgrStore,
951
+ te as useViewStack,
952
+ st as waitMs,
953
+ ee as waitUtil
883
954
  };