x-essential-lib 0.5.20 → 0.5.22
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/composables/microApp.d.ts +2 -1
- package/dist/index.js +287 -231
- package/package.json +1 -1
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
export declare function useMicroApp(prod: boolean, instance?: AxiosInstance): void;
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
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 f, computed as i, onMounted as
|
|
3
|
-
import {
|
|
4
|
-
import { defineStore as le
|
|
5
|
-
import
|
|
6
|
-
import { useRouter as re, useRoute as
|
|
2
|
+
import { ref as f, watch as N, computed as i, onMounted as S, onBeforeUnmount as O, defineComponent as M, resolveComponent as h, openBlock as V, createBlock as A, unref as z, isRef as G, withKeys as L, withModifiers as K, withCtx as w, createVNode as k, createTextVNode as B, toDisplayString as j, createElementBlock as J, normalizeStyle as ve, pushScopeId as me, popScopeId as he, createElementVNode as m, reactive as we, Fragment as ye, renderList as xe, createCommentVNode as ke } from "vue";
|
|
3
|
+
import { useTheme as H, useLocale as Q, useDisplay as be } from "vuetify";
|
|
4
|
+
import { defineStore as le } from "pinia";
|
|
5
|
+
import Ce from "axios";
|
|
6
|
+
import { useRouter as re, useRoute as De } from "vue-router";
|
|
7
7
|
const ne = le(
|
|
8
8
|
"global",
|
|
9
9
|
() => {
|
|
10
|
-
const e =
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
const e = H(), a = f(), t = f("en"), l = f({}), o = f("");
|
|
11
|
+
return N(
|
|
12
|
+
a,
|
|
13
|
+
() => {
|
|
14
|
+
e.global.name.value = a.value ? "dark" : "light";
|
|
15
|
+
},
|
|
16
|
+
{ immediate: !0 }
|
|
17
|
+
), {
|
|
18
|
+
dark: a,
|
|
19
|
+
locale: t,
|
|
20
|
+
permissionObjects: l,
|
|
21
|
+
permissionChecksum: o
|
|
16
22
|
};
|
|
17
23
|
},
|
|
18
24
|
{
|
|
@@ -29,19 +35,19 @@ const ne = le(
|
|
|
29
35
|
return e.value.length <= 0;
|
|
30
36
|
}
|
|
31
37
|
function t() {
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
return e.value[
|
|
38
|
+
const s = e.value.length;
|
|
39
|
+
if (s > 0)
|
|
40
|
+
return e.value[s - 1];
|
|
35
41
|
}
|
|
36
|
-
function l(
|
|
37
|
-
return e.value.find((
|
|
42
|
+
function l(s) {
|
|
43
|
+
return e.value.find((_) => _ === s) !== void 0;
|
|
38
44
|
}
|
|
39
|
-
function o(
|
|
40
|
-
e.value.push(
|
|
45
|
+
function o(s) {
|
|
46
|
+
e.value.push(s);
|
|
41
47
|
}
|
|
42
|
-
function n(
|
|
43
|
-
const
|
|
44
|
-
|
|
48
|
+
function n(s) {
|
|
49
|
+
const _ = e.value.findIndex((v) => v === s);
|
|
50
|
+
_ !== -1 && e.value.splice(_, e.value.length - _);
|
|
45
51
|
}
|
|
46
52
|
function r() {
|
|
47
53
|
console.assert(e.value.length > 0), e.value.pop();
|
|
@@ -61,7 +67,7 @@ const ne = le(
|
|
|
61
67
|
};
|
|
62
68
|
});
|
|
63
69
|
/*! js-cookie v3.0.5 | MIT */
|
|
64
|
-
function
|
|
70
|
+
function W(e) {
|
|
65
71
|
for (var a = 1; a < arguments.length; a++) {
|
|
66
72
|
var t = arguments[a];
|
|
67
73
|
for (var l in t)
|
|
@@ -69,7 +75,7 @@ function L(e) {
|
|
|
69
75
|
}
|
|
70
76
|
return e;
|
|
71
77
|
}
|
|
72
|
-
var
|
|
78
|
+
var Se = {
|
|
73
79
|
read: function(e) {
|
|
74
80
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
75
81
|
},
|
|
@@ -83,20 +89,20 @@ var Ve = {
|
|
|
83
89
|
function X(e, a) {
|
|
84
90
|
function t(o, n, r) {
|
|
85
91
|
if (!(typeof document > "u")) {
|
|
86
|
-
r =
|
|
92
|
+
r = W({}, a, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
87
93
|
var c = "";
|
|
88
|
-
for (var
|
|
89
|
-
r[
|
|
94
|
+
for (var s in r)
|
|
95
|
+
r[s] && (c += "; " + s, r[s] !== !0 && (c += "=" + r[s].split(";")[0]));
|
|
90
96
|
return document.cookie = o + "=" + e.write(n, o) + c;
|
|
91
97
|
}
|
|
92
98
|
}
|
|
93
99
|
function l(o) {
|
|
94
100
|
if (!(typeof document > "u" || arguments.length && !o)) {
|
|
95
101
|
for (var n = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < n.length; c++) {
|
|
96
|
-
var
|
|
102
|
+
var s = n[c].split("="), _ = s.slice(1).join("=");
|
|
97
103
|
try {
|
|
98
|
-
var v = decodeURIComponent(
|
|
99
|
-
if (r[v] = e.read(
|
|
104
|
+
var v = decodeURIComponent(s[0]);
|
|
105
|
+
if (r[v] = e.read(_, v), o === v)
|
|
100
106
|
break;
|
|
101
107
|
} catch {
|
|
102
108
|
}
|
|
@@ -112,16 +118,16 @@ function X(e, a) {
|
|
|
112
118
|
t(
|
|
113
119
|
o,
|
|
114
120
|
"",
|
|
115
|
-
|
|
121
|
+
W({}, n, {
|
|
116
122
|
expires: -1
|
|
117
123
|
})
|
|
118
124
|
);
|
|
119
125
|
},
|
|
120
126
|
withAttributes: function(o) {
|
|
121
|
-
return X(this.converter,
|
|
127
|
+
return X(this.converter, W({}, this.attributes, o));
|
|
122
128
|
},
|
|
123
129
|
withConverter: function(o) {
|
|
124
|
-
return X(
|
|
130
|
+
return X(W({}, this.converter, o), this.attributes);
|
|
125
131
|
}
|
|
126
132
|
},
|
|
127
133
|
{
|
|
@@ -130,47 +136,47 @@ function X(e, a) {
|
|
|
130
136
|
}
|
|
131
137
|
);
|
|
132
138
|
}
|
|
133
|
-
var
|
|
139
|
+
var E = X(Se, { path: "/" });
|
|
134
140
|
function lt(e) {
|
|
135
|
-
const a =
|
|
141
|
+
const a = Ce.create({
|
|
136
142
|
timeout: 6e3
|
|
137
143
|
});
|
|
138
144
|
return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
|
|
139
|
-
(t) =>
|
|
145
|
+
(t) => Ve(t),
|
|
140
146
|
(t) => {
|
|
141
|
-
|
|
147
|
+
Re(t, e.onError);
|
|
142
148
|
}
|
|
143
149
|
), a.interceptors.response.use(
|
|
144
|
-
(t) =>
|
|
145
|
-
(t) =>
|
|
150
|
+
(t) => qe(t),
|
|
151
|
+
(t) => Oe(t, e.onError)
|
|
146
152
|
), a;
|
|
147
153
|
}
|
|
148
|
-
function
|
|
149
|
-
const a =
|
|
154
|
+
function Ve(e) {
|
|
155
|
+
const a = E.get("accessToken") ?? "";
|
|
150
156
|
return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
151
157
|
}
|
|
152
|
-
function
|
|
158
|
+
function Re(e, a) {
|
|
153
159
|
console.error(e), a("request timeout");
|
|
154
160
|
}
|
|
155
|
-
function
|
|
161
|
+
function qe(e) {
|
|
156
162
|
return e.data;
|
|
157
163
|
}
|
|
158
|
-
function
|
|
164
|
+
function Oe(e, a) {
|
|
159
165
|
var o;
|
|
160
166
|
const t = e.response;
|
|
161
167
|
if (!t)
|
|
162
168
|
return Promise.reject(e);
|
|
163
|
-
t.status === 401 &&
|
|
169
|
+
t.status === 401 && Te();
|
|
164
170
|
let l = (o = t.data) == null ? void 0 : o.message;
|
|
165
171
|
return l || (l = {
|
|
166
172
|
code: t.status,
|
|
167
173
|
message: t.statusText
|
|
168
174
|
}), a(l), Promise.reject(e);
|
|
169
175
|
}
|
|
170
|
-
function
|
|
171
|
-
|
|
176
|
+
function Te() {
|
|
177
|
+
E.remove("accessToken"), E.remove("refreshToken"), E.remove("activeOrg"), re().replace({ path: "/passport/login" });
|
|
172
178
|
}
|
|
173
|
-
function
|
|
179
|
+
function je(e) {
|
|
174
180
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
|
|
175
181
|
var l = e.get(a);
|
|
176
182
|
l ? l.push(t) : e.set(a, [t]);
|
|
@@ -187,14 +193,14 @@ function Te(e) {
|
|
|
187
193
|
} };
|
|
188
194
|
}
|
|
189
195
|
const p = function() {
|
|
190
|
-
return window.eventBus || (window.eventBus =
|
|
196
|
+
return window.eventBus || (window.eventBus = je()), window.eventBus;
|
|
191
197
|
}();
|
|
192
198
|
async function rt(e) {
|
|
193
199
|
return new Promise((a) => {
|
|
194
200
|
setTimeout(a, e);
|
|
195
201
|
});
|
|
196
202
|
}
|
|
197
|
-
async function
|
|
203
|
+
async function Y(e, a, t) {
|
|
198
204
|
const l = Date.now();
|
|
199
205
|
return new Promise((o) => {
|
|
200
206
|
const n = async () => {
|
|
@@ -219,9 +225,9 @@ function ue() {
|
|
|
219
225
|
const e = Date.now();
|
|
220
226
|
return e - ee > 500 ? (ee = e, !0) : !1;
|
|
221
227
|
}
|
|
222
|
-
let
|
|
223
|
-
function
|
|
224
|
-
return ++
|
|
228
|
+
let Ie = 0;
|
|
229
|
+
function se() {
|
|
230
|
+
return ++Ie;
|
|
225
231
|
}
|
|
226
232
|
async function ct(e) {
|
|
227
233
|
if (!ue())
|
|
@@ -229,8 +235,8 @@ async function ct(e) {
|
|
|
229
235
|
let a = !1, t;
|
|
230
236
|
const l = (n) => {
|
|
231
237
|
t = n, a = !0;
|
|
232
|
-
}, o =
|
|
233
|
-
return p.on("confirmDlgResult" + o, l), p.emit("confirmDlg", { ...e, seq: o }), await
|
|
238
|
+
}, o = se();
|
|
239
|
+
return p.on("confirmDlgResult" + o, l), p.emit("confirmDlg", { ...e, seq: o }), await Y(() => a), p.off("confirmDlgResult" + o, l), t;
|
|
234
240
|
}
|
|
235
241
|
async function ut(e) {
|
|
236
242
|
if (!ue())
|
|
@@ -238,13 +244,13 @@ async function ut(e) {
|
|
|
238
244
|
let a = !1, t;
|
|
239
245
|
const l = (n) => {
|
|
240
246
|
t = n, a = !0;
|
|
241
|
-
}, o =
|
|
242
|
-
return p.on("promptDlgResult" + o, l), p.emit("promptDlg", { ...e, seq: o }), await
|
|
247
|
+
}, o = se();
|
|
248
|
+
return p.on("promptDlgResult" + o, l), p.emit("promptDlg", { ...e, seq: o }), await Y(() => a), p.off("promptDlgResult" + o, l), t;
|
|
243
249
|
}
|
|
244
|
-
function
|
|
250
|
+
function st() {
|
|
245
251
|
p.emit("openWaitDlg");
|
|
246
252
|
}
|
|
247
|
-
function
|
|
253
|
+
function pt() {
|
|
248
254
|
p.emit("closeWaitDlg");
|
|
249
255
|
}
|
|
250
256
|
function _t(e, a) {
|
|
@@ -259,7 +265,7 @@ function ft(e, a) {
|
|
|
259
265
|
function it(e, a) {
|
|
260
266
|
p.emit("message", { type: "warning", text: e, timeout: a });
|
|
261
267
|
}
|
|
262
|
-
var
|
|
268
|
+
var Be = /* @__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))(Be || {});
|
|
263
269
|
function te(e, a) {
|
|
264
270
|
if (!e)
|
|
265
271
|
return !1;
|
|
@@ -273,7 +279,7 @@ function te(e, a) {
|
|
|
273
279
|
return !1;
|
|
274
280
|
}), Object.keys(t).length <= 0);
|
|
275
281
|
}
|
|
276
|
-
const
|
|
282
|
+
const Ee = [
|
|
277
283
|
{ path: "/passport/login", level: 0 },
|
|
278
284
|
{ path: "/passport/loginAccount", level: 1 },
|
|
279
285
|
{ path: "/passport/register", level: 1 },
|
|
@@ -292,10 +298,10 @@ const Ae = [
|
|
|
292
298
|
{ path: "/calc", level: 1, requiredState: "org" },
|
|
293
299
|
{ path: "/data", level: 1, requiredState: "org" }
|
|
294
300
|
];
|
|
295
|
-
function
|
|
301
|
+
function F(e) {
|
|
296
302
|
let a, t = 0;
|
|
297
303
|
const l = e.split("/").filter((o) => o.trim() !== "");
|
|
298
|
-
return
|
|
304
|
+
return Ee.forEach((o) => {
|
|
299
305
|
const n = o.path.split("/").filter((c) => c.trim() !== "");
|
|
300
306
|
let r = 0;
|
|
301
307
|
for (let c = 0; c < l.length && !(c >= n.length || l[c] !== n[c]); c++)
|
|
@@ -306,7 +312,7 @@ function Y(e) {
|
|
|
306
312
|
function ae(e) {
|
|
307
313
|
if (e === "/")
|
|
308
314
|
return { app: "", path: "/", level: -1 };
|
|
309
|
-
const a =
|
|
315
|
+
const a = F(e);
|
|
310
316
|
if (!a)
|
|
311
317
|
return { app: "invalidApp", path: "/invalidApp/invalidRoute", level: -1 };
|
|
312
318
|
const t = e.split("/");
|
|
@@ -319,14 +325,14 @@ function D(e, a) {
|
|
|
319
325
|
`~~~~before route change~~~~ ${l.path} -> ${t.path} inner=${o} forward=${r}`
|
|
320
326
|
), o ? n ? oe.value = "" : oe.value = r ? "inner-left" : "inner-right" : window.routeExtras = { forward: r };
|
|
321
327
|
}
|
|
322
|
-
function
|
|
323
|
-
return !!
|
|
328
|
+
function Ae() {
|
|
329
|
+
return !!E.get("accessToken");
|
|
324
330
|
}
|
|
325
331
|
function Me() {
|
|
326
|
-
return !!
|
|
332
|
+
return !!E.get("activeOrg");
|
|
327
333
|
}
|
|
328
334
|
function gt(e, a, t) {
|
|
329
|
-
const l =
|
|
335
|
+
const l = Ae(), o = Me(), n = F(e.path);
|
|
330
336
|
if (!n) {
|
|
331
337
|
t();
|
|
332
338
|
return;
|
|
@@ -376,82 +382,82 @@ function Z(e, a) {
|
|
|
376
382
|
}), o = (n) => {
|
|
377
383
|
a == null || a(n), l.value = !0;
|
|
378
384
|
};
|
|
379
|
-
return
|
|
385
|
+
return S(() => {
|
|
380
386
|
p.on(e, o);
|
|
381
|
-
}),
|
|
387
|
+
}), O(() => {
|
|
382
388
|
p.off(e, o);
|
|
383
389
|
}), { open: l };
|
|
384
390
|
}
|
|
385
|
-
const
|
|
391
|
+
const Ue = /* @__PURE__ */ M({
|
|
386
392
|
__name: "index",
|
|
387
393
|
setup(e) {
|
|
388
|
-
const a =
|
|
389
|
-
var
|
|
390
|
-
return ((
|
|
391
|
-
}), u = i(() => {
|
|
392
|
-
var d;
|
|
393
|
-
return ((d = n.value) == null ? void 0 : d.text) ?? a.t("cancel");
|
|
394
|
+
const a = Q(), { open: t } = Z("confirmDlg"), l = f(""), o = f(""), n = f(), r = f(), c = i(() => {
|
|
395
|
+
var u;
|
|
396
|
+
return ((u = n.value) == null ? void 0 : u.color) ?? "primary";
|
|
394
397
|
}), s = i(() => {
|
|
395
|
-
var
|
|
396
|
-
return ((
|
|
398
|
+
var u;
|
|
399
|
+
return ((u = n.value) == null ? void 0 : u.text) ?? a.t("cancel");
|
|
400
|
+
}), _ = i(() => {
|
|
401
|
+
var u;
|
|
402
|
+
return ((u = r.value) == null ? void 0 : u.color) ?? "primary";
|
|
397
403
|
}), v = i(() => {
|
|
398
|
-
var
|
|
399
|
-
return ((
|
|
404
|
+
var u;
|
|
405
|
+
return ((u = r.value) == null ? void 0 : u.text) ?? a.t("confirm");
|
|
400
406
|
});
|
|
401
|
-
let
|
|
402
|
-
const
|
|
403
|
-
l.value =
|
|
407
|
+
let x = 0, C = !1;
|
|
408
|
+
const T = (u) => {
|
|
409
|
+
l.value = u.title, o.value = u.text, n.value = u.cancel, r.value = u.confirm, x = u.seq, C = !1, t.value = !0;
|
|
404
410
|
};
|
|
405
|
-
|
|
406
|
-
p.on("confirmDlg",
|
|
407
|
-
}),
|
|
408
|
-
p.off("confirmDlg",
|
|
411
|
+
S(() => {
|
|
412
|
+
p.on("confirmDlg", T);
|
|
413
|
+
}), O(() => {
|
|
414
|
+
p.off("confirmDlg", T);
|
|
409
415
|
});
|
|
410
|
-
const
|
|
411
|
-
t.value = !1,
|
|
416
|
+
const I = () => {
|
|
417
|
+
t.value = !1, C || (p.emit("confirmDlgResult" + x, !0), C = !0);
|
|
412
418
|
};
|
|
413
|
-
return
|
|
414
|
-
!
|
|
415
|
-
}), (
|
|
416
|
-
const
|
|
417
|
-
return
|
|
419
|
+
return N(t, (u) => {
|
|
420
|
+
!u && !C && (p.emit("confirmDlgResult" + x, !1), C = !0);
|
|
421
|
+
}), (u, g) => {
|
|
422
|
+
const b = h("v-card-text"), R = h("v-btn"), q = h("v-card-actions"), d = h("v-card"), y = h("v-dialog");
|
|
423
|
+
return V(), A(y, {
|
|
418
424
|
modelValue: z(t),
|
|
419
|
-
"onUpdate:modelValue":
|
|
425
|
+
"onUpdate:modelValue": g[1] || (g[1] = (U) => G(t) ? t.value = U : null),
|
|
420
426
|
onKeydown: [
|
|
421
|
-
|
|
422
|
-
|
|
427
|
+
g[2] || (g[2] = L(K((U) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
428
|
+
L(K(I, ["stop", "prevent"]), ["enter"])
|
|
423
429
|
],
|
|
424
430
|
transition: "dialog-top-transition",
|
|
425
431
|
"max-width": "600px"
|
|
426
432
|
}, {
|
|
427
433
|
default: w(() => [
|
|
428
|
-
|
|
434
|
+
k(d, { title: l.value }, {
|
|
429
435
|
default: w(() => [
|
|
430
|
-
|
|
436
|
+
k(b, null, {
|
|
431
437
|
default: w(() => [
|
|
432
|
-
j(
|
|
438
|
+
B(j(o.value), 1)
|
|
433
439
|
]),
|
|
434
440
|
_: 1
|
|
435
441
|
}),
|
|
436
|
-
|
|
442
|
+
k(q, { class: "d-flex justify-end" }, {
|
|
437
443
|
default: w(() => [
|
|
438
|
-
|
|
439
|
-
onClick:
|
|
444
|
+
k(R, {
|
|
445
|
+
onClick: g[0] || (g[0] = (U) => t.value = !1),
|
|
440
446
|
color: c.value,
|
|
441
447
|
variant: "text"
|
|
442
448
|
}, {
|
|
443
449
|
default: w(() => [
|
|
444
|
-
j(
|
|
450
|
+
B(j(s.value), 1)
|
|
445
451
|
]),
|
|
446
452
|
_: 1
|
|
447
453
|
}, 8, ["color"]),
|
|
448
|
-
|
|
449
|
-
onClick:
|
|
450
|
-
color:
|
|
454
|
+
k(R, {
|
|
455
|
+
onClick: I,
|
|
456
|
+
color: _.value,
|
|
451
457
|
variant: "text"
|
|
452
458
|
}, {
|
|
453
459
|
default: w(() => [
|
|
454
|
-
j(
|
|
460
|
+
B(j(v.value), 1)
|
|
455
461
|
]),
|
|
456
462
|
_: 1
|
|
457
463
|
}, 8, ["color"])
|
|
@@ -466,7 +472,7 @@ const $e = /* @__PURE__ */ E({
|
|
|
466
472
|
}, 8, ["modelValue", "onKeydown"]);
|
|
467
473
|
};
|
|
468
474
|
}
|
|
469
|
-
}),
|
|
475
|
+
}), $e = (e) => (me("data-v-f4ad116e"), e = e(), he(), e), Ke = /* @__PURE__ */ $e(() => /* @__PURE__ */ m("div", { class: "lds-spinner" }, [
|
|
470
476
|
/* @__PURE__ */ m("div"),
|
|
471
477
|
/* @__PURE__ */ m("div"),
|
|
472
478
|
/* @__PURE__ */ m("div"),
|
|
@@ -479,9 +485,9 @@ const $e = /* @__PURE__ */ E({
|
|
|
479
485
|
/* @__PURE__ */ m("div"),
|
|
480
486
|
/* @__PURE__ */ m("div"),
|
|
481
487
|
/* @__PURE__ */ m("div")
|
|
482
|
-
], -1)),
|
|
483
|
-
|
|
484
|
-
],
|
|
488
|
+
], -1)), We = [
|
|
489
|
+
Ke
|
|
490
|
+
], ze = /* @__PURE__ */ M({
|
|
485
491
|
__name: "index",
|
|
486
492
|
props: {
|
|
487
493
|
zIndex: {
|
|
@@ -490,21 +496,21 @@ const $e = /* @__PURE__ */ E({
|
|
|
490
496
|
}
|
|
491
497
|
},
|
|
492
498
|
setup(e) {
|
|
493
|
-
const a =
|
|
499
|
+
const a = H(), t = e, l = i(() => ({
|
|
494
500
|
background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
495
501
|
zIndex: t.zIndex
|
|
496
502
|
}));
|
|
497
|
-
return (o, n) => (
|
|
503
|
+
return (o, n) => (V(), J("div", {
|
|
498
504
|
class: "x-cont",
|
|
499
505
|
style: ve(l.value)
|
|
500
|
-
},
|
|
506
|
+
}, We, 4));
|
|
501
507
|
}
|
|
502
|
-
}),
|
|
508
|
+
}), pe = (e, a) => {
|
|
503
509
|
const t = e.__vccOpts || e;
|
|
504
510
|
for (const [l, o] of a)
|
|
505
511
|
t[l] = o;
|
|
506
512
|
return t;
|
|
507
|
-
},
|
|
513
|
+
}, Le = /* @__PURE__ */ pe(ze, [["__scopeId", "data-v-f4ad116e"]]), Fe = /* @__PURE__ */ M({
|
|
508
514
|
__name: "item",
|
|
509
515
|
props: {
|
|
510
516
|
id: {},
|
|
@@ -515,17 +521,17 @@ const $e = /* @__PURE__ */ E({
|
|
|
515
521
|
emits: ["timeout"],
|
|
516
522
|
setup(e, { emit: a }) {
|
|
517
523
|
const t = e, l = f(!0), o = a;
|
|
518
|
-
return
|
|
524
|
+
return S(() => {
|
|
519
525
|
setTimeout(() => {
|
|
520
526
|
o("timeout", t.id);
|
|
521
527
|
}, t.timeout);
|
|
522
|
-
}),
|
|
528
|
+
}), N(l, (n) => {
|
|
523
529
|
n || o("timeout", t.id);
|
|
524
530
|
}), (n, r) => {
|
|
525
531
|
const c = h("v-alert");
|
|
526
|
-
return
|
|
532
|
+
return V(), A(c, {
|
|
527
533
|
modelValue: l.value,
|
|
528
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
534
|
+
"onUpdate:modelValue": r[0] || (r[0] = (s) => l.value = s),
|
|
529
535
|
class: "mt-2",
|
|
530
536
|
"max-width": "90%",
|
|
531
537
|
width: "500px",
|
|
@@ -537,13 +543,13 @@ const $e = /* @__PURE__ */ E({
|
|
|
537
543
|
}, null, 8, ["modelValue", "type", "text"]);
|
|
538
544
|
};
|
|
539
545
|
}
|
|
540
|
-
}),
|
|
546
|
+
}), Ne = /* @__PURE__ */ M({
|
|
541
547
|
__name: "index",
|
|
542
548
|
setup(e) {
|
|
543
549
|
const a = we({ items: [] });
|
|
544
|
-
|
|
550
|
+
S(() => {
|
|
545
551
|
p.on("message", t);
|
|
546
|
-
}),
|
|
552
|
+
}), O(() => {
|
|
547
553
|
p.off("message", t);
|
|
548
554
|
});
|
|
549
555
|
const t = (c) => {
|
|
@@ -552,113 +558,113 @@ const $e = /* @__PURE__ */ E({
|
|
|
552
558
|
r(c);
|
|
553
559
|
};
|
|
554
560
|
let o = 0;
|
|
555
|
-
const n = (c,
|
|
561
|
+
const n = (c, s, _) => {
|
|
556
562
|
const v = o++;
|
|
557
|
-
a.items.push({ id: v, type: c, text:
|
|
563
|
+
a.items.push({ id: v, type: c, text: s, timeout: _ });
|
|
558
564
|
}, r = (c) => {
|
|
559
|
-
const
|
|
560
|
-
|
|
565
|
+
const s = a.items.findIndex((_) => _.id === c);
|
|
566
|
+
s >= 0 && a.items.splice(s, 1);
|
|
561
567
|
};
|
|
562
|
-
return (c,
|
|
563
|
-
onClick:
|
|
568
|
+
return (c, s) => (V(), J("div", {
|
|
569
|
+
onClick: s[0] || (s[0] = K(() => {
|
|
564
570
|
}, ["stop"])),
|
|
565
571
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
566
572
|
}, [
|
|
567
|
-
(
|
|
573
|
+
(V(!0), J(ye, null, xe(a.items, (_) => (V(), A(Fe, {
|
|
568
574
|
onTimeout: l,
|
|
569
|
-
id:
|
|
570
|
-
type:
|
|
571
|
-
text:
|
|
572
|
-
timeout:
|
|
573
|
-
key:
|
|
575
|
+
id: _.id,
|
|
576
|
+
type: _.type,
|
|
577
|
+
text: _.text,
|
|
578
|
+
timeout: _.timeout,
|
|
579
|
+
key: _.id
|
|
574
580
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
575
581
|
]));
|
|
576
582
|
}
|
|
577
|
-
}),
|
|
583
|
+
}), He = /* @__PURE__ */ pe(Ne, [["__scopeId", "data-v-8c2268ea"]]), Je = /* @__PURE__ */ M({
|
|
578
584
|
__name: "index",
|
|
579
585
|
setup(e) {
|
|
580
|
-
const a =
|
|
581
|
-
var
|
|
582
|
-
return ((
|
|
583
|
-
}),
|
|
584
|
-
var
|
|
585
|
-
return ((
|
|
586
|
-
}),
|
|
587
|
-
var
|
|
588
|
-
return ((
|
|
589
|
-
}),
|
|
590
|
-
var
|
|
591
|
-
return ((
|
|
592
|
-
}),
|
|
593
|
-
let
|
|
594
|
-
const
|
|
586
|
+
const a = Q(), { open: t } = Z("promptDlg"), l = f(""), o = f(""), n = f(), r = f(), c = f(), s = f(""), _ = f(), v = f(), x = i(() => {
|
|
587
|
+
var d;
|
|
588
|
+
return ((d = _.value) == null ? void 0 : d.color) ?? "primary";
|
|
589
|
+
}), C = i(() => {
|
|
590
|
+
var d;
|
|
591
|
+
return ((d = _.value) == null ? void 0 : d.text) ?? a.t("cancel");
|
|
592
|
+
}), T = i(() => {
|
|
593
|
+
var d;
|
|
594
|
+
return ((d = v.value) == null ? void 0 : d.color) ?? "primary";
|
|
595
|
+
}), I = i(() => {
|
|
596
|
+
var d;
|
|
597
|
+
return ((d = v.value) == null ? void 0 : d.text) ?? a.t("confirm");
|
|
598
|
+
}), u = f();
|
|
599
|
+
let g = 0, b = !1;
|
|
600
|
+
const R = async (d) => {
|
|
595
601
|
var y;
|
|
596
|
-
l.value =
|
|
602
|
+
l.value = d.title, o.value = d.text, n.value = d.label, r.value = d.placeholder, c.value = d.rules, s.value = d.value, _.value = d.cancel, v.value = d.confirm, g = d.seq, b = !1, t.value = !0, await Y(() => u.value !== void 0, 1e3), (y = u.value) == null || y.focus();
|
|
597
603
|
};
|
|
598
|
-
|
|
599
|
-
p.on("promptDlg",
|
|
600
|
-
}),
|
|
601
|
-
p.off("promptDlg",
|
|
604
|
+
S(() => {
|
|
605
|
+
p.on("promptDlg", R);
|
|
606
|
+
}), O(() => {
|
|
607
|
+
p.off("promptDlg", R);
|
|
602
608
|
});
|
|
603
|
-
const
|
|
604
|
-
t.value = !1,
|
|
609
|
+
const q = () => {
|
|
610
|
+
t.value = !1, b || (p.emit("promptDlgResult" + g, s.value ?? ""), b = !0);
|
|
605
611
|
};
|
|
606
|
-
return
|
|
607
|
-
!
|
|
608
|
-
}), (
|
|
612
|
+
return N(t, (d) => {
|
|
613
|
+
!d && !b && (p.emit("promptDlgResult" + g, void 0), b = !0);
|
|
614
|
+
}), (d, y) => {
|
|
609
615
|
const U = h("v-card-text"), _e = h("v-text-field"), de = h("v-form"), P = h("v-btn"), fe = h("v-card-actions"), ie = h("v-card"), ge = h("v-dialog");
|
|
610
|
-
return
|
|
616
|
+
return V(), A(ge, {
|
|
611
617
|
modelValue: z(t),
|
|
612
|
-
"onUpdate:modelValue": y[2] || (y[2] = (
|
|
618
|
+
"onUpdate:modelValue": y[2] || (y[2] = ($) => G(t) ? t.value = $ : null),
|
|
613
619
|
onKeydown: [
|
|
614
|
-
y[3] || (y[3] =
|
|
615
|
-
|
|
620
|
+
y[3] || (y[3] = L(K(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
621
|
+
L(K(q, ["stop", "prevent"]), ["enter"])
|
|
616
622
|
],
|
|
617
623
|
transition: "dialog-top-transition",
|
|
618
624
|
"max-width": "600px"
|
|
619
625
|
}, {
|
|
620
626
|
default: w(() => [
|
|
621
|
-
|
|
627
|
+
k(ie, { title: l.value }, {
|
|
622
628
|
default: w(() => [
|
|
623
|
-
o.value ? (
|
|
629
|
+
o.value ? (V(), A(U, { key: 0 }, {
|
|
624
630
|
default: w(() => [
|
|
625
|
-
j(
|
|
631
|
+
B(j(o.value), 1)
|
|
626
632
|
]),
|
|
627
633
|
_: 1
|
|
628
634
|
})) : ke("", !0),
|
|
629
|
-
|
|
635
|
+
k(de, { class: "mx-3" }, {
|
|
630
636
|
default: w(() => [
|
|
631
|
-
|
|
632
|
-
modelValue:
|
|
633
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
637
|
+
k(_e, {
|
|
638
|
+
modelValue: s.value,
|
|
639
|
+
"onUpdate:modelValue": y[0] || (y[0] = ($) => s.value = $),
|
|
634
640
|
label: n.value,
|
|
635
641
|
placeholder: r.value,
|
|
636
642
|
rules: c.value,
|
|
637
643
|
ref_key: "target",
|
|
638
|
-
ref:
|
|
644
|
+
ref: u
|
|
639
645
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"])
|
|
640
646
|
]),
|
|
641
647
|
_: 1
|
|
642
648
|
}),
|
|
643
|
-
|
|
649
|
+
k(fe, { class: "d-flex justify-end" }, {
|
|
644
650
|
default: w(() => [
|
|
645
|
-
|
|
646
|
-
onClick: y[1] || (y[1] = (
|
|
647
|
-
color:
|
|
651
|
+
k(P, {
|
|
652
|
+
onClick: y[1] || (y[1] = ($) => t.value = !1),
|
|
653
|
+
color: x.value,
|
|
648
654
|
variant: "text"
|
|
649
655
|
}, {
|
|
650
656
|
default: w(() => [
|
|
651
|
-
j(
|
|
657
|
+
B(j(C.value), 1)
|
|
652
658
|
]),
|
|
653
659
|
_: 1
|
|
654
660
|
}, 8, ["color"]),
|
|
655
|
-
|
|
656
|
-
onClick:
|
|
657
|
-
color:
|
|
661
|
+
k(P, {
|
|
662
|
+
onClick: q,
|
|
663
|
+
color: T.value,
|
|
658
664
|
variant: "text"
|
|
659
665
|
}, {
|
|
660
666
|
default: w(() => [
|
|
661
|
-
j(
|
|
667
|
+
B(j(I.value), 1)
|
|
662
668
|
]),
|
|
663
669
|
_: 1
|
|
664
670
|
}, 8, ["color"])
|
|
@@ -673,37 +679,37 @@ const $e = /* @__PURE__ */ E({
|
|
|
673
679
|
}, 8, ["modelValue", "onKeydown"]);
|
|
674
680
|
};
|
|
675
681
|
}
|
|
676
|
-
}),
|
|
682
|
+
}), Xe = { class: "mx-auto my-auto" }, Ge = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */ M({
|
|
677
683
|
__name: "index",
|
|
678
684
|
setup(e) {
|
|
679
|
-
const a =
|
|
685
|
+
const a = Q(), { open: t } = Z("waitDlg"), l = () => {
|
|
680
686
|
t.value = !0;
|
|
681
687
|
}, o = () => {
|
|
682
688
|
t.value = !1;
|
|
683
689
|
};
|
|
684
|
-
return
|
|
690
|
+
return S(() => {
|
|
685
691
|
p.on("openWaitDlg", l), p.on("closeWaitDlg", o);
|
|
686
|
-
}),
|
|
692
|
+
}), O(() => {
|
|
687
693
|
p.off("openWaitDlg", l), p.off("closeWaitDlg", o);
|
|
688
694
|
}), (n, r) => {
|
|
689
|
-
const c = h("v-card"),
|
|
690
|
-
return
|
|
695
|
+
const c = h("v-card"), s = h("v-dialog");
|
|
696
|
+
return V(), A(s, {
|
|
691
697
|
modelValue: z(t),
|
|
692
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
698
|
+
"onUpdate:modelValue": r[0] || (r[0] = (_) => G(t) ? t.value = _ : null),
|
|
693
699
|
persistent: "",
|
|
694
700
|
"no-click-animation": "",
|
|
695
701
|
fullscreen: ""
|
|
696
702
|
}, {
|
|
697
703
|
default: w(() => [
|
|
698
|
-
m("div",
|
|
699
|
-
|
|
704
|
+
m("div", Xe, [
|
|
705
|
+
k(c, {
|
|
700
706
|
width: "300px",
|
|
701
707
|
height: "80px",
|
|
702
708
|
loading: ""
|
|
703
709
|
}, {
|
|
704
710
|
default: w(() => [
|
|
705
|
-
m("div",
|
|
706
|
-
m("span", null,
|
|
711
|
+
m("div", Ge, [
|
|
712
|
+
m("span", null, j(z(a).t("waitingResponse")), 1)
|
|
707
713
|
])
|
|
708
714
|
]),
|
|
709
715
|
_: 1
|
|
@@ -714,11 +720,11 @@ const $e = /* @__PURE__ */ E({
|
|
|
714
720
|
}, 8, ["modelValue"]);
|
|
715
721
|
};
|
|
716
722
|
}
|
|
717
|
-
}),
|
|
718
|
-
e.component("x-confirm-dlg",
|
|
723
|
+
}), Ye = (e) => {
|
|
724
|
+
e.component("x-confirm-dlg", Ue), e.component("x-loading", Le), e.component("x-message", He), e.component("x-prompt-dlg", Je), e.component("x-wait-dlg", Qe);
|
|
719
725
|
};
|
|
720
726
|
function vt() {
|
|
721
|
-
const e =
|
|
727
|
+
const e = H(), a = i(() => e.global.current.value.colors.primary), t = i(() => e.global.current.value.colors.secondary), l = i(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = i(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = i(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), r = i(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = i(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
722
728
|
return {
|
|
723
729
|
primaryColor: a,
|
|
724
730
|
secondaryColor: t,
|
|
@@ -729,38 +735,88 @@ function vt() {
|
|
|
729
735
|
borderColor: c
|
|
730
736
|
};
|
|
731
737
|
}
|
|
732
|
-
function
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
)
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
n.
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
738
|
+
function Ze(e, a) {
|
|
739
|
+
return e.post("pullPermission", a);
|
|
740
|
+
}
|
|
741
|
+
function mt(e, a) {
|
|
742
|
+
const t = De(), l = re(), o = ne(), n = ce();
|
|
743
|
+
let r = !0;
|
|
744
|
+
const c = () => {
|
|
745
|
+
r = !1;
|
|
746
|
+
}, s = () => {
|
|
747
|
+
r = !0;
|
|
748
|
+
}, _ = () => {
|
|
749
|
+
var g;
|
|
750
|
+
if (!n.isEmpty()) {
|
|
751
|
+
n.hasView("waitDlg") || n.popView();
|
|
752
|
+
return;
|
|
753
|
+
}
|
|
754
|
+
const u = F(t.path);
|
|
755
|
+
(u == null ? void 0 : u.level) === 0 ? (g = navigator == null ? void 0 : navigator.Backbutton) == null || g.goHome(
|
|
756
|
+
() => {
|
|
757
|
+
},
|
|
758
|
+
() => {
|
|
759
|
+
}
|
|
760
|
+
) : l.back();
|
|
761
|
+
};
|
|
762
|
+
S(() => {
|
|
763
|
+
p.on("pause", c), p.on("resume", s), p.on("backbutton", _);
|
|
764
|
+
}), O(() => {
|
|
765
|
+
p.off("pause", c), p.off("resume", s), p.off("backbutton", _);
|
|
766
|
+
});
|
|
767
|
+
const v = (u) => {
|
|
768
|
+
if (u.key === "Escape") {
|
|
769
|
+
_();
|
|
750
770
|
return;
|
|
751
771
|
}
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
}, V = (g) => {
|
|
755
|
-
if (g.key === "Escape") {
|
|
756
|
-
k();
|
|
772
|
+
if (!e && u.ctrlKey && u.altKey && u.code === "KeyD") {
|
|
773
|
+
o.dark = !o.dark;
|
|
757
774
|
return;
|
|
758
775
|
}
|
|
776
|
+
if (!e && u.ctrlKey && u.altKey && u.code === "KeyL") {
|
|
777
|
+
o.locale === "en" ? o.locale = "zhHans" : o.locale = "en";
|
|
778
|
+
return;
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
S(() => {
|
|
782
|
+
window.addEventListener("keydown", v);
|
|
783
|
+
}), O(() => {
|
|
784
|
+
window.removeEventListener("keydown", v);
|
|
785
|
+
});
|
|
786
|
+
let x;
|
|
787
|
+
const C = async () => {
|
|
788
|
+
if (!r)
|
|
789
|
+
return;
|
|
790
|
+
const u = F(t.path);
|
|
791
|
+
if (!(!u || u.requiredState !== "org"))
|
|
792
|
+
try {
|
|
793
|
+
const { update: g, permissions: b } = await Ze(a, {
|
|
794
|
+
checksum: o.permissionChecksum
|
|
795
|
+
});
|
|
796
|
+
if (!g)
|
|
797
|
+
return;
|
|
798
|
+
const R = {};
|
|
799
|
+
for (const q in b) {
|
|
800
|
+
if (q === "checksum")
|
|
801
|
+
continue;
|
|
802
|
+
const d = b[q];
|
|
803
|
+
R[q] = JSON.parse(d);
|
|
804
|
+
}
|
|
805
|
+
o.permissionObjects = R, o.permissionChecksum = b.checksum ?? "";
|
|
806
|
+
} catch (g) {
|
|
807
|
+
console.error(g);
|
|
808
|
+
}
|
|
809
|
+
}, T = async (u) => {
|
|
810
|
+
u && await C(), clearTimeout(x), x = setTimeout(async () => {
|
|
811
|
+
await C(), x && T();
|
|
812
|
+
}, 3e3);
|
|
813
|
+
}, I = () => {
|
|
814
|
+
clearTimeout(x), x = void 0;
|
|
759
815
|
};
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
}),
|
|
763
|
-
|
|
816
|
+
S(() => {
|
|
817
|
+
a && T(!0);
|
|
818
|
+
}), O(() => {
|
|
819
|
+
I();
|
|
764
820
|
});
|
|
765
821
|
}
|
|
766
822
|
function ht() {
|
|
@@ -772,19 +828,19 @@ function ht() {
|
|
|
772
828
|
return { verifyPermission: a };
|
|
773
829
|
}
|
|
774
830
|
function wt() {
|
|
775
|
-
const e =
|
|
831
|
+
const e = H(), a = be(), t = i(() => e.current.value.dark), l = i(() => !!window.cordova), o = i(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
776
832
|
return { dark: t, sysBarAvail: l, compactWidth: o };
|
|
777
833
|
}
|
|
778
|
-
const yt = { install:
|
|
834
|
+
const yt = { install: Ye };
|
|
779
835
|
export {
|
|
780
|
-
|
|
836
|
+
Be as Permission,
|
|
781
837
|
nt as appAppear,
|
|
782
|
-
|
|
838
|
+
pt as closeWaitDlg,
|
|
783
839
|
lt as createAxios,
|
|
784
840
|
yt as default,
|
|
785
841
|
p as eventBus,
|
|
786
842
|
te as isExist,
|
|
787
|
-
|
|
843
|
+
F as matchRouteMeta,
|
|
788
844
|
_t as messageError,
|
|
789
845
|
dt as messageInfo,
|
|
790
846
|
ft as messageSuccess,
|
|
@@ -792,7 +848,7 @@ export {
|
|
|
792
848
|
gt as onBeforeEach,
|
|
793
849
|
ct as openConfirmDlg,
|
|
794
850
|
ut as openPromptDlg,
|
|
795
|
-
|
|
851
|
+
st as openWaitDlg,
|
|
796
852
|
oe as routeTransName,
|
|
797
853
|
vt as useColor,
|
|
798
854
|
ne as useGlobalStore,
|
|
@@ -802,5 +858,5 @@ export {
|
|
|
802
858
|
ce as useViewMgrStore,
|
|
803
859
|
Z as useViewStack,
|
|
804
860
|
rt as waitMs,
|
|
805
|
-
|
|
861
|
+
Y as waitUtil
|
|
806
862
|
};
|