@qilin-agent/desktop 3.1.7 → 3.1.9
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/README.i18n.yaml +7 -4
- package/README.md +13 -2
- package/README.zh.md +13 -2
- package/lib/main.js +2508 -209
- package/lib/types/application-menu.d.ts +64 -0
- package/lib/types/file-actions.d.ts +8 -0
- package/lib/types/ipc.d.ts +4 -0
- package/lib/types/keyboard.d.ts +11 -1
- package/lib/types/locale.d.ts +46 -0
- package/lib/types/splash-window.d.ts +20 -0
- package/package.json +19 -17
package/lib/main.js
CHANGED
|
@@ -1,19 +1,296 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { mkdir, readFile, readdir, rename, rm, unlink, writeFile } from "node:fs/promises";
|
|
3
|
-
import { basename, delimiter, dirname, extname, isAbsolute, join, normalize, resolve, sep, win32 } from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
2
|
+
import fsPromises, { mkdir, readFile, readdir, rename, rm, unlink, writeFile } from "node:fs/promises";
|
|
3
|
+
import path, { basename, delimiter, dirname, extname, isAbsolute, join, normalize, resolve, sep, win32 } from "node:path";
|
|
4
|
+
import url, { fileURLToPath } from "node:url";
|
|
5
5
|
import { BrowserWindow, Menu, Notification, Tray, WebContentsView, app, clipboard, dialog, ipcMain, nativeImage, nativeTheme, net, powerMonitor, protocol, session, shell, systemPreferences } from "electron";
|
|
6
6
|
import { cpus, homedir, totalmem, userInfo } from "node:os";
|
|
7
|
-
import { appendFileSync, closeSync, existsSync, fsyncSync, lstatSync, mkdirSync, openSync, readFile as readFile$1, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
|
|
7
|
+
import fs, { appendFileSync, closeSync, existsSync, fsyncSync, lstatSync, mkdirSync, openSync, readFile as readFile$1, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
|
|
8
8
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
9
9
|
import { inspect, promisify } from "node:util";
|
|
10
10
|
import { gt, valid } from "semver";
|
|
11
|
-
import { Context, Service, composeError
|
|
11
|
+
import { Context, Service, composeError } from "@qilin-agent/kylin";
|
|
12
12
|
import "node:timers/promises";
|
|
13
13
|
import { execFile, spawn } from "node:child_process";
|
|
14
14
|
import electronUpdater from "electron-updater";
|
|
15
15
|
import { ElectronHttpExecutor } from "electron-updater/out/electronHttpExecutor.js";
|
|
16
16
|
import WebSocket from "ws";
|
|
17
|
+
//#region lib/types/application-menu.js
|
|
18
|
+
/** Standard desktop menu model: one definition drives the native menu bar and the Windows caption bar. */
|
|
19
|
+
/** Project home the Help menu opens. */
|
|
20
|
+
const PROJECT_HOME_URL = "https://github.com/kkutysllb/QiLin";
|
|
21
|
+
/** Issue tracker the Help menu opens. */
|
|
22
|
+
const PROJECT_ISSUES_URL = "https://github.com/kkutysllb/QiLin/issues";
|
|
23
|
+
/** Caption-bar menus drawn inside the Windows title bar, in bar order. */
|
|
24
|
+
const CAPTION_MENUS = [
|
|
25
|
+
"file",
|
|
26
|
+
"edit",
|
|
27
|
+
"view",
|
|
28
|
+
"help"
|
|
29
|
+
];
|
|
30
|
+
const command = (actions, id, label) => actions.command(id, label);
|
|
31
|
+
/** The application menu shared by macOS and Linux; macOS also owns About and quit roles. */
|
|
32
|
+
function applicationMenuItems(actions) {
|
|
33
|
+
const { messages, platform, development } = actions;
|
|
34
|
+
return [
|
|
35
|
+
platform === "darwin" ? {
|
|
36
|
+
role: "about",
|
|
37
|
+
label: messages.aboutMenu
|
|
38
|
+
} : {
|
|
39
|
+
label: messages.aboutMenu,
|
|
40
|
+
click: actions.showAbout
|
|
41
|
+
},
|
|
42
|
+
{ type: "separator" },
|
|
43
|
+
command(actions, "settings.open", messages.settingsMenu),
|
|
44
|
+
{
|
|
45
|
+
label: messages.checkUpdatesMenu,
|
|
46
|
+
click: actions.checkUpdates
|
|
47
|
+
},
|
|
48
|
+
...platform === "darwin" || platform === "win32" ? [{
|
|
49
|
+
label: messages.cliCommandMenu,
|
|
50
|
+
click: actions.manageCommand
|
|
51
|
+
}] : [],
|
|
52
|
+
...development ? [
|
|
53
|
+
{ type: "separator" },
|
|
54
|
+
{
|
|
55
|
+
label: messages.reloadPageMenu,
|
|
56
|
+
role: "reload"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
label: messages.restartAppHostMenu,
|
|
60
|
+
click: actions.restart
|
|
61
|
+
}
|
|
62
|
+
] : [],
|
|
63
|
+
{ type: "separator" },
|
|
64
|
+
...platform === "darwin" ? [
|
|
65
|
+
{
|
|
66
|
+
role: "services",
|
|
67
|
+
label: messages.servicesMenu,
|
|
68
|
+
submenu: []
|
|
69
|
+
},
|
|
70
|
+
{ type: "separator" },
|
|
71
|
+
{
|
|
72
|
+
role: "hide",
|
|
73
|
+
label: messages.hideApplication
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
role: "hideOthers",
|
|
77
|
+
label: messages.hideOtherApplications
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
role: "unhide",
|
|
81
|
+
label: messages.showAllApplications
|
|
82
|
+
},
|
|
83
|
+
{ type: "separator" },
|
|
84
|
+
{
|
|
85
|
+
role: "quit",
|
|
86
|
+
label: messages.quitApplication
|
|
87
|
+
}
|
|
88
|
+
] : [{
|
|
89
|
+
label: messages.exitApplication,
|
|
90
|
+
click: actions.quit
|
|
91
|
+
}]
|
|
92
|
+
];
|
|
93
|
+
}
|
|
94
|
+
/** File menu: session and workspace entry points, then window and application lifecycle. */
|
|
95
|
+
function fileMenuItems(actions) {
|
|
96
|
+
const { messages, platform } = actions;
|
|
97
|
+
return [
|
|
98
|
+
command(actions, "session.new", messages.newSessionMenu),
|
|
99
|
+
command(actions, "session.search", messages.searchSessionsMenu),
|
|
100
|
+
command(actions, "workspace.add", messages.addWorkspaceMenu),
|
|
101
|
+
{ type: "separator" },
|
|
102
|
+
...platform === "darwin" ? [] : [
|
|
103
|
+
command(actions, "settings.open", messages.settingsMenu),
|
|
104
|
+
...actions.development ? [{
|
|
105
|
+
label: messages.restartAppHostMenu,
|
|
106
|
+
click: actions.restart
|
|
107
|
+
}] : [],
|
|
108
|
+
{ type: "separator" }
|
|
109
|
+
],
|
|
110
|
+
command(actions, "page.close", messages.closeWindowMenu),
|
|
111
|
+
...platform === "darwin" ? [] : [{ type: "separator" }, {
|
|
112
|
+
label: messages.exitApplication,
|
|
113
|
+
click: actions.quit
|
|
114
|
+
}]
|
|
115
|
+
];
|
|
116
|
+
}
|
|
117
|
+
/** View menu: pane visibility, page zoom, and the developer lane. */
|
|
118
|
+
function viewMenuItems(actions) {
|
|
119
|
+
const { messages, development } = actions;
|
|
120
|
+
return [
|
|
121
|
+
command(actions, "sidebar.left.toggle", messages.toggleLeftSidebarMenu),
|
|
122
|
+
command(actions, "sidebar.right.toggle", messages.toggleRightSidebarMenu),
|
|
123
|
+
{ type: "separator" },
|
|
124
|
+
{
|
|
125
|
+
role: "resetZoom",
|
|
126
|
+
label: messages.resetZoomMenu
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
role: "zoomIn",
|
|
130
|
+
label: messages.zoomInMenu
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
role: "zoomOut",
|
|
134
|
+
label: messages.zoomOutMenu
|
|
135
|
+
},
|
|
136
|
+
{ type: "separator" },
|
|
137
|
+
{
|
|
138
|
+
role: "togglefullscreen",
|
|
139
|
+
label: messages.toggleFullScreenMenu
|
|
140
|
+
},
|
|
141
|
+
...development ? [
|
|
142
|
+
{ type: "separator" },
|
|
143
|
+
{
|
|
144
|
+
role: "reload",
|
|
145
|
+
label: messages.reloadPageMenu
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
role: "forceReload",
|
|
149
|
+
label: messages.forceReloadMenu
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
role: "toggleDevTools",
|
|
153
|
+
label: messages.toggleDevToolsMenu
|
|
154
|
+
}
|
|
155
|
+
] : []
|
|
156
|
+
];
|
|
157
|
+
}
|
|
158
|
+
/** Help menu: project destinations, then the update and About entries outside macOS. */
|
|
159
|
+
function helpMenuItems(actions) {
|
|
160
|
+
const { messages, platform } = actions;
|
|
161
|
+
return [
|
|
162
|
+
{
|
|
163
|
+
label: messages.projectHomeMenu,
|
|
164
|
+
click: () => {
|
|
165
|
+
actions.openExternal(PROJECT_HOME_URL);
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
label: messages.reportIssueMenu,
|
|
170
|
+
click: () => {
|
|
171
|
+
actions.openExternal(PROJECT_ISSUES_URL);
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
...platform === "darwin" ? [] : [
|
|
175
|
+
{ type: "separator" },
|
|
176
|
+
{
|
|
177
|
+
label: messages.checkUpdatesMenu,
|
|
178
|
+
click: actions.checkUpdates
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
label: messages.aboutMenu,
|
|
182
|
+
click: actions.showAbout
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
];
|
|
186
|
+
}
|
|
187
|
+
/** Edit menu: native roles with this product's labels, or the editor-owned keys the Windows caption bar needs. */
|
|
188
|
+
function editMenu(actions) {
|
|
189
|
+
if (actions.platform === "win32") return {
|
|
190
|
+
label: actions.messages.edit,
|
|
191
|
+
submenu: actions.editItems()
|
|
192
|
+
};
|
|
193
|
+
const { messages } = actions;
|
|
194
|
+
return {
|
|
195
|
+
label: messages.edit,
|
|
196
|
+
submenu: [
|
|
197
|
+
{
|
|
198
|
+
role: "undo",
|
|
199
|
+
label: messages.undo
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
role: "redo",
|
|
203
|
+
label: messages.redo
|
|
204
|
+
},
|
|
205
|
+
{ type: "separator" },
|
|
206
|
+
{
|
|
207
|
+
role: "cut",
|
|
208
|
+
label: messages.cut
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
role: "copy",
|
|
212
|
+
label: messages.copy
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
role: "paste",
|
|
216
|
+
label: messages.paste
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
role: "delete",
|
|
220
|
+
label: messages.delete
|
|
221
|
+
},
|
|
222
|
+
{ type: "separator" },
|
|
223
|
+
{
|
|
224
|
+
role: "selectAll",
|
|
225
|
+
label: messages.selectAll
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
/** Window menu with this product's labels; Electron's role menu would follow the OS language. */
|
|
231
|
+
function windowMenu(actions) {
|
|
232
|
+
const { messages, platform } = actions;
|
|
233
|
+
return {
|
|
234
|
+
label: messages.windowMenu,
|
|
235
|
+
submenu: [
|
|
236
|
+
{
|
|
237
|
+
role: "minimize",
|
|
238
|
+
label: messages.minimizeMenu
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
role: "zoom",
|
|
242
|
+
label: messages.zoomWindowMenu
|
|
243
|
+
},
|
|
244
|
+
...platform === "darwin" ? [{ type: "separator" }, {
|
|
245
|
+
role: "front",
|
|
246
|
+
label: messages.bringAllToFrontMenu
|
|
247
|
+
}] : []
|
|
248
|
+
]
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* The complete native menu template for this platform.
|
|
253
|
+
* @param actions - menu labels, renderer commands, and main-process callbacks.
|
|
254
|
+
* @returns menus for the native menu bar; Windows returns none because its caption bar owns them.
|
|
255
|
+
*/
|
|
256
|
+
function applicationMenu(actions) {
|
|
257
|
+
if (actions.platform === "win32") return [];
|
|
258
|
+
return [
|
|
259
|
+
{
|
|
260
|
+
label: actions.platform === "darwin" ? actions.applicationName : actions.messages.application,
|
|
261
|
+
submenu: applicationMenuItems(actions)
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
label: actions.messages.fileMenu,
|
|
265
|
+
submenu: fileMenuItems(actions)
|
|
266
|
+
},
|
|
267
|
+
editMenu(actions),
|
|
268
|
+
{
|
|
269
|
+
label: actions.messages.viewMenu,
|
|
270
|
+
submenu: viewMenuItems(actions)
|
|
271
|
+
},
|
|
272
|
+
windowMenu(actions),
|
|
273
|
+
{
|
|
274
|
+
label: actions.messages.helpMenu,
|
|
275
|
+
submenu: helpMenuItems(actions)
|
|
276
|
+
}
|
|
277
|
+
];
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* One Windows caption-bar menu, anchored by the shell's own title-bar buttons.
|
|
281
|
+
* @param actions - menu labels, renderer commands, and main-process callbacks.
|
|
282
|
+
* @param menu - caption menu identity.
|
|
283
|
+
* @returns that menu's entries.
|
|
284
|
+
*/
|
|
285
|
+
function captionMenu(actions, menu) {
|
|
286
|
+
switch (menu) {
|
|
287
|
+
case "file": return fileMenuItems(actions);
|
|
288
|
+
case "edit": return actions.editItems();
|
|
289
|
+
case "view": return viewMenuItems(actions);
|
|
290
|
+
case "help": return helpMenuItems(actions);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
//#endregion
|
|
17
294
|
//#region ../../packages/util/home-paths/lib/index.js
|
|
18
295
|
/**
|
|
19
296
|
* Shared filesystem path helpers for QiLin user data.
|
|
@@ -800,20 +1077,20 @@ function requireTimestamp() {
|
|
|
800
1077
|
});
|
|
801
1078
|
return timestamp;
|
|
802
1079
|
}
|
|
803
|
-
var merge;
|
|
1080
|
+
var merge$1;
|
|
804
1081
|
var hasRequiredMerge;
|
|
805
1082
|
function requireMerge() {
|
|
806
|
-
if (hasRequiredMerge) return merge;
|
|
1083
|
+
if (hasRequiredMerge) return merge$1;
|
|
807
1084
|
hasRequiredMerge = 1;
|
|
808
1085
|
const Type2 = requireType();
|
|
809
1086
|
function resolveYamlMerge(data) {
|
|
810
1087
|
return data === "<<" || data === null;
|
|
811
1088
|
}
|
|
812
|
-
merge = new Type2("tag:yaml.org,2002:merge", {
|
|
1089
|
+
merge$1 = new Type2("tag:yaml.org,2002:merge", {
|
|
813
1090
|
kind: "scalar",
|
|
814
1091
|
resolve: resolveYamlMerge
|
|
815
1092
|
});
|
|
816
|
-
return merge;
|
|
1093
|
+
return merge$1;
|
|
817
1094
|
}
|
|
818
1095
|
var binary;
|
|
819
1096
|
var hasRequiredBinary;
|
|
@@ -2585,30 +2862,30 @@ function requireJsYaml() {
|
|
|
2585
2862
|
jsYaml.safeDump = renamed("safeDump", "dump");
|
|
2586
2863
|
return jsYaml;
|
|
2587
2864
|
}
|
|
2588
|
-
const { Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load, loadAll, dump, YAMLException, types, safeLoad, safeLoadAll, safeDump } = /* @__PURE__ */ getDefaultExportFromCjs(requireJsYaml());
|
|
2865
|
+
const { Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load, loadAll, dump, YAMLException, types: types$3, safeLoad, safeLoadAll, safeDump } = /* @__PURE__ */ getDefaultExportFromCjs(requireJsYaml());
|
|
2589
2866
|
//#endregion
|
|
2590
2867
|
//#region ../../vendor/cosmokit/lib/index.js
|
|
2591
2868
|
/** Return true when a value is `null` or `undefined`. */
|
|
2592
|
-
function isNullable(value) {
|
|
2869
|
+
function isNullable$1(value) {
|
|
2593
2870
|
return value === null || value === void 0;
|
|
2594
2871
|
}
|
|
2595
2872
|
/** Return true when a value is neither `null` nor `undefined`. */
|
|
2596
2873
|
function isNonNullable(value) {
|
|
2597
|
-
return !isNullable(value);
|
|
2874
|
+
return !isNullable$1(value);
|
|
2598
2875
|
}
|
|
2599
2876
|
/** Map object values while preserving the original key set. */
|
|
2600
2877
|
function mapValues(object, transform) {
|
|
2601
2878
|
return Object.fromEntries(Object.entries(object).map(([key, value]) => [key, transform(value, key)]));
|
|
2602
2879
|
}
|
|
2603
2880
|
/** Shared config references used by schema validators and plugin runtimes. */
|
|
2604
|
-
const write = Symbol.for("cosmokit.volatile.write");
|
|
2881
|
+
const write$2 = Symbol.for("cosmokit.volatile.write");
|
|
2605
2882
|
/**
|
|
2606
2883
|
* Identify references across ESM/CJS copies of the shared library.
|
|
2607
2884
|
* @param value - a parsed config value.
|
|
2608
2885
|
* @returns whether the value implements the shared reference protocol.
|
|
2609
2886
|
*/
|
|
2610
|
-
function isVolatile(value) {
|
|
2611
|
-
return typeof value === "object" && value !== null && write in value;
|
|
2887
|
+
function isVolatile$1(value) {
|
|
2888
|
+
return typeof value === "object" && value !== null && write$2 in value;
|
|
2612
2889
|
}
|
|
2613
2890
|
/**
|
|
2614
2891
|
* Collect config references without descending into their snapshots or opaque objects.
|
|
@@ -2619,7 +2896,7 @@ function isVolatile(value) {
|
|
|
2619
2896
|
function volatileEntries(value) {
|
|
2620
2897
|
const ancestors = /* @__PURE__ */ new Set();
|
|
2621
2898
|
function visit(value, path) {
|
|
2622
|
-
if (isVolatile(value)) return [{
|
|
2899
|
+
if (isVolatile$1(value)) return [{
|
|
2623
2900
|
path,
|
|
2624
2901
|
ref: value
|
|
2625
2902
|
}];
|
|
@@ -2641,24 +2918,24 @@ function volatileEntries(value) {
|
|
|
2641
2918
|
* @param source - a newly parsed candidate reference.
|
|
2642
2919
|
*/
|
|
2643
2920
|
function updateVolatile(target, source) {
|
|
2644
|
-
target[write](source.get());
|
|
2921
|
+
target[write$2](source.get());
|
|
2645
2922
|
}
|
|
2646
2923
|
/** Test values using `instanceof` with a `toStringTag` fallback. */
|
|
2647
|
-
function is(type, value) {
|
|
2648
|
-
if (arguments.length === 1) return (value) => is(type, value);
|
|
2924
|
+
function is$1(type, value) {
|
|
2925
|
+
if (arguments.length === 1) return (value) => is$1(type, value);
|
|
2649
2926
|
return type in globalThis && value instanceof globalThis[type] || Object.prototype.toString.call(value).slice(8, -1) === type;
|
|
2650
2927
|
}
|
|
2651
|
-
function isArrayBufferLike(value) {
|
|
2652
|
-
return is("ArrayBuffer", value) || is("SharedArrayBuffer", value);
|
|
2928
|
+
function isArrayBufferLike$1(value) {
|
|
2929
|
+
return is$1("ArrayBuffer", value) || is$1("SharedArrayBuffer", value);
|
|
2653
2930
|
}
|
|
2654
|
-
function isArrayBufferSource(value) {
|
|
2655
|
-
return isArrayBufferLike(value) || ArrayBuffer.isView(value);
|
|
2931
|
+
function isArrayBufferSource$1(value) {
|
|
2932
|
+
return isArrayBufferLike$1(value) || ArrayBuffer.isView(value);
|
|
2656
2933
|
}
|
|
2657
2934
|
/** Binary source detection and base64/hex conversion helpers. */
|
|
2658
|
-
var Binary;
|
|
2935
|
+
var Binary$1;
|
|
2659
2936
|
(function(Binary) {
|
|
2660
|
-
Binary.is = isArrayBufferLike;
|
|
2661
|
-
Binary.isSource = isArrayBufferSource;
|
|
2937
|
+
Binary.is = isArrayBufferLike$1;
|
|
2938
|
+
Binary.isSource = isArrayBufferSource$1;
|
|
2662
2939
|
function fromSource(source) {
|
|
2663
2940
|
if (ArrayBuffer.isView(source)) return source.buffer.slice(source.byteOffset, source.byteOffset + source.byteLength);
|
|
2664
2941
|
else return source;
|
|
@@ -2692,11 +2969,11 @@ var Binary;
|
|
|
2692
2969
|
return Uint8Array.from(buffer).buffer;
|
|
2693
2970
|
}
|
|
2694
2971
|
Binary.fromHex = fromHex;
|
|
2695
|
-
})(Binary || (Binary = {}));
|
|
2696
|
-
Binary.fromBase64;
|
|
2697
|
-
Binary.toBase64;
|
|
2698
|
-
Binary.fromHex;
|
|
2699
|
-
Binary.toHex;
|
|
2972
|
+
})(Binary$1 || (Binary$1 = {}));
|
|
2973
|
+
Binary$1.fromBase64;
|
|
2974
|
+
Binary$1.toBase64;
|
|
2975
|
+
Binary$1.fromHex;
|
|
2976
|
+
Binary$1.toHex;
|
|
2700
2977
|
/**
|
|
2701
2978
|
* Compare values recursively, treating two volatile references as equal regardless of value.
|
|
2702
2979
|
* Strict comparison distinguishes null/undefined, treats opaque objects by identity,
|
|
@@ -2706,12 +2983,12 @@ Binary.toHex;
|
|
|
2706
2983
|
* @param strict - whether to require strict data equality outside volatile references.
|
|
2707
2984
|
* @returns whether the values compare equal.
|
|
2708
2985
|
*/
|
|
2709
|
-
function deepEqual(a, b, strict) {
|
|
2986
|
+
function deepEqual$1(a, b, strict) {
|
|
2710
2987
|
const ancestors = /* @__PURE__ */ new Set();
|
|
2711
2988
|
function compare(a, b) {
|
|
2712
2989
|
if (a === b) return true;
|
|
2713
|
-
if (isVolatile(a) || isVolatile(b)) return isVolatile(a) && isVolatile(b);
|
|
2714
|
-
if (!strict && isNullable(a) && isNullable(b)) return true;
|
|
2990
|
+
if (isVolatile$1(a) || isVolatile$1(b)) return isVolatile$1(a) && isVolatile$1(b);
|
|
2991
|
+
if (!strict && isNullable$1(a) && isNullable$1(b)) return true;
|
|
2715
2992
|
if (typeof a !== typeof b || typeof a !== "object" || !a || !b) return false;
|
|
2716
2993
|
if (ancestors.has(a)) return false;
|
|
2717
2994
|
function check(test, then) {
|
|
@@ -2723,7 +3000,7 @@ function deepEqual(a, b, strict) {
|
|
|
2723
3000
|
if (a.length !== b.length) return false;
|
|
2724
3001
|
for (let index = 0; index < a.length; index++) if (!compare(a[index], b[index])) return false;
|
|
2725
3002
|
return true;
|
|
2726
|
-
}) ?? check(is("Date"), (a, b) => a.valueOf() === b.valueOf()) ?? check(is("URL"), (a, b) => a.href === b.href) ?? check(is("RegExp"), (a, b) => a.source === b.source && a.flags === b.flags) ?? check(isArrayBufferLike, (a, b) => {
|
|
3003
|
+
}) ?? check(is$1("Date"), (a, b) => a.valueOf() === b.valueOf()) ?? check(is$1("URL"), (a, b) => a.href === b.href) ?? check(is$1("RegExp"), (a, b) => a.source === b.source && a.flags === b.flags) ?? check(isArrayBufferLike$1, (a, b) => {
|
|
2727
3004
|
if (a.byteLength !== b.byteLength) return false;
|
|
2728
3005
|
const viewA = new Uint8Array(a);
|
|
2729
3006
|
const viewB = new Uint8Array(b);
|
|
@@ -2740,7 +3017,7 @@ function deepEqual(a, b, strict) {
|
|
|
2740
3017
|
return compare(a, b);
|
|
2741
3018
|
}
|
|
2742
3019
|
/** Time constants plus parsing and formatting helpers. */
|
|
2743
|
-
var Time;
|
|
3020
|
+
var Time$1;
|
|
2744
3021
|
(function(Time) {
|
|
2745
3022
|
Time.millisecond = 1;
|
|
2746
3023
|
Time.second = 1e3;
|
|
@@ -2808,7 +3085,7 @@ var Time;
|
|
|
2808
3085
|
return template.replace("yyyy", time.getFullYear().toString()).replace("yy", time.getFullYear().toString().slice(2)).replace("MM", toDigits(time.getMonth() + 1)).replace("dd", toDigits(time.getDate())).replace("hh", toDigits(time.getHours())).replace("mm", toDigits(time.getMinutes())).replace("ss", toDigits(time.getSeconds())).replace("SSS", toDigits(time.getMilliseconds(), 3));
|
|
2809
3086
|
}
|
|
2810
3087
|
Time.template = template;
|
|
2811
|
-
})(Time || (Time = {}));
|
|
3088
|
+
})(Time$1 || (Time$1 = {}));
|
|
2812
3089
|
//#endregion
|
|
2813
3090
|
//#region ../../vendor/loader/lib/index.js
|
|
2814
3091
|
/** Helpers for locating the current Node internal module loader. */
|
|
@@ -2876,10 +3153,10 @@ var EntryGroup = class {
|
|
|
2876
3153
|
}
|
|
2877
3154
|
remove(id, isDispose = false) {
|
|
2878
3155
|
const entry = this.tree.store[id];
|
|
2879
|
-
if (!entry) return;
|
|
3156
|
+
if (!entry || entry.parent !== this) return;
|
|
3157
|
+
delete this.tree.store[id];
|
|
2880
3158
|
entry.fiber?.dispose();
|
|
2881
3159
|
if (!isDispose) this.unlink(entry.options);
|
|
2882
|
-
delete this.tree.store[id];
|
|
2883
3160
|
this.context.emit("loader/partial-dispose", entry, entry.options, false);
|
|
2884
3161
|
}
|
|
2885
3162
|
async update(config) {
|
|
@@ -2903,12 +3180,83 @@ var EntryGroup = class {
|
|
|
2903
3180
|
}
|
|
2904
3181
|
};
|
|
2905
3182
|
EntryGroup.key, Service.init;
|
|
3183
|
+
var __rewriteRelativeImportExtension$1 = function(path, preserveJsx) {
|
|
3184
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
|
|
3185
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
|
|
3186
|
+
});
|
|
3187
|
+
return path;
|
|
3188
|
+
};
|
|
3189
|
+
const HELPER_FILES = {
|
|
3190
|
+
".gitignore": "# created by cordis automatically\n*\n",
|
|
3191
|
+
"resolve.mjs": "export default (specifier) => import.meta.resolve(specifier)\n"
|
|
3192
|
+
};
|
|
3193
|
+
const cache = Object.create(null);
|
|
3194
|
+
/** Nearest ancestor of `dir` that owns a `package.json`, if any. */
|
|
3195
|
+
function findScope(dir) {
|
|
3196
|
+
while (true) {
|
|
3197
|
+
if (fs.existsSync(path.join(dir, "package.json"))) return dir;
|
|
3198
|
+
const parent = path.dirname(dir);
|
|
3199
|
+
if (parent === dir) return;
|
|
3200
|
+
dir = parent;
|
|
3201
|
+
}
|
|
3202
|
+
}
|
|
3203
|
+
function resolveScope(baseUrl) {
|
|
3204
|
+
if (!baseUrl) return;
|
|
3205
|
+
let dir;
|
|
3206
|
+
try {
|
|
3207
|
+
dir = url.fileURLToPath(new URL(".", baseUrl));
|
|
3208
|
+
} catch {
|
|
3209
|
+
return;
|
|
3210
|
+
}
|
|
3211
|
+
return findScope(path.resolve(dir));
|
|
3212
|
+
}
|
|
3213
|
+
async function write$1(filename, content) {
|
|
3214
|
+
const temp = `${filename}.${process.pid}`;
|
|
3215
|
+
await fsPromises.writeFile(temp, content);
|
|
3216
|
+
await fsPromises.rename(temp, filename);
|
|
3217
|
+
}
|
|
3218
|
+
async function _createResolve(scope) {
|
|
3219
|
+
const dir = path.join(scope, ".cordis");
|
|
3220
|
+
try {
|
|
3221
|
+
await fsPromises.mkdir(dir, { recursive: true });
|
|
3222
|
+
for (const [name, content] of Object.entries(HELPER_FILES)) await write$1(path.join(dir, name), content);
|
|
3223
|
+
} catch {
|
|
3224
|
+
return;
|
|
3225
|
+
}
|
|
3226
|
+
const helperUrl = url.pathToFileURL(path.join(dir, "resolve.mjs")).href;
|
|
3227
|
+
return (await import(__rewriteRelativeImportExtension$1(
|
|
3228
|
+
/* @vite-ignore */
|
|
3229
|
+
helperUrl
|
|
3230
|
+
))).default;
|
|
3231
|
+
}
|
|
3232
|
+
/**
|
|
3233
|
+
* Create or reuse a native ESM resolver anchored in the config project's package scope.
|
|
3234
|
+
* @param baseUrl Config file URL; absent, non-file or unscoped URLs cannot supply a resolver.
|
|
3235
|
+
* @returns The project resolver, or undefined when no package scope exists or its helper cannot be written.
|
|
3236
|
+
*/
|
|
3237
|
+
async function createResolve(baseUrl) {
|
|
3238
|
+
const scope = resolveScope(baseUrl);
|
|
3239
|
+
if (!scope) return;
|
|
3240
|
+
return await (cache[scope] ??= _createResolve(scope));
|
|
3241
|
+
}
|
|
2906
3242
|
var __rewriteRelativeImportExtension = function(path, preserveJsx) {
|
|
2907
3243
|
if (typeof path === "string" && /^\.\.?\//.test(path)) return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
|
|
2908
3244
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
|
|
2909
3245
|
});
|
|
2910
3246
|
return path;
|
|
2911
3247
|
};
|
|
3248
|
+
/** The entry and the same-tree members of its group, recursively. */
|
|
3249
|
+
function members(entry) {
|
|
3250
|
+
const { tree } = entry.parent;
|
|
3251
|
+
const result = [entry];
|
|
3252
|
+
const group = entry.subgroup;
|
|
3253
|
+
if (group?.tree !== tree) return result;
|
|
3254
|
+
for (const options of group.data) {
|
|
3255
|
+
const member = tree.store[options.id];
|
|
3256
|
+
if (member?.parent === group) result.push(...members(member));
|
|
3257
|
+
}
|
|
3258
|
+
return result;
|
|
3259
|
+
}
|
|
2912
3260
|
/** Mutable tree of loader entries. Persistence is supplied by subclasses. */
|
|
2913
3261
|
var EntryTree = class EntryTree {
|
|
2914
3262
|
static sep = ":";
|
|
@@ -2945,6 +3293,13 @@ var EntryTree = class EntryTree {
|
|
|
2945
3293
|
await Promise.allSettled(tasks);
|
|
2946
3294
|
}
|
|
2947
3295
|
}
|
|
3296
|
+
/**
|
|
3297
|
+
* Assign a random tree-local id when `options.id` is absent. Explicit ids
|
|
3298
|
+
* may contain `EntryTree.sep`; `resolve()` and `resolveGroup()` cannot
|
|
3299
|
+
* address such entries by nested path.
|
|
3300
|
+
* @param options - Entry options; a generated id is written to `options.id`.
|
|
3301
|
+
* @returns The existing or generated id.
|
|
3302
|
+
*/
|
|
2948
3303
|
ensureId(options) {
|
|
2949
3304
|
if (!options.id) do
|
|
2950
3305
|
options.id = Math.random().toString(16).slice(2, 10);
|
|
@@ -2973,29 +3328,71 @@ var EntryTree = class EntryTree {
|
|
|
2973
3328
|
/** Create an entry in the root group or a nested group. */
|
|
2974
3329
|
async create(options, parent = null, position = Infinity) {
|
|
2975
3330
|
const group = this.resolveGroup(parent);
|
|
3331
|
+
const id = group.tree.ensureId(options);
|
|
2976
3332
|
group.data.splice(position, 0, options);
|
|
2977
|
-
group.tree.
|
|
3333
|
+
group.tree.commit({
|
|
3334
|
+
id,
|
|
3335
|
+
group,
|
|
3336
|
+
options
|
|
3337
|
+
});
|
|
2978
3338
|
return group.create(options);
|
|
2979
3339
|
}
|
|
2980
3340
|
/** Stop and remove an entry from its parent group. */
|
|
2981
3341
|
remove(id) {
|
|
2982
3342
|
const entry = this.resolve(id);
|
|
2983
|
-
entry.parent
|
|
2984
|
-
entry.
|
|
3343
|
+
const group = entry.parent;
|
|
3344
|
+
const legacy = entry.options;
|
|
3345
|
+
group.remove(legacy.id);
|
|
3346
|
+
group.tree.commit({
|
|
3347
|
+
id: legacy.id,
|
|
3348
|
+
group,
|
|
3349
|
+
legacy
|
|
3350
|
+
});
|
|
2985
3351
|
}
|
|
2986
3352
|
/** Update an entry and optionally move it to another group. */
|
|
2987
3353
|
async update(id, options, parent, position) {
|
|
2988
3354
|
const entry = this.resolve(id);
|
|
2989
3355
|
const source = entry.parent;
|
|
3356
|
+
const legacy = { ...entry.options };
|
|
2990
3357
|
if (parent !== void 0) {
|
|
2991
3358
|
const target = this.resolveGroup(parent);
|
|
3359
|
+
const moved = target.tree === source.tree ? [] : members(entry);
|
|
3360
|
+
for (const member of moved) {
|
|
3361
|
+
const { id } = member.options;
|
|
3362
|
+
if (target.tree.store[id]) throw new Error(`entry ${id} already exists in the target tree`);
|
|
3363
|
+
}
|
|
2992
3364
|
source.unlink(entry.options);
|
|
2993
3365
|
target.data.splice(position ?? Infinity, 0, entry.options);
|
|
2994
|
-
target.tree.write();
|
|
2995
3366
|
entry.parent = target;
|
|
3367
|
+
for (const member of moved) {
|
|
3368
|
+
delete source.tree.store[member.options.id];
|
|
3369
|
+
target.tree.store[member.options.id] = member;
|
|
3370
|
+
if (member.subgroup?.tree === source.tree) member.subgroup.tree = target.tree;
|
|
3371
|
+
}
|
|
3372
|
+
}
|
|
3373
|
+
const task = entry.update(options, false, true);
|
|
3374
|
+
if (entry.parent.tree !== source.tree) {
|
|
3375
|
+
source.tree.commit({
|
|
3376
|
+
id: legacy.id,
|
|
3377
|
+
group: source,
|
|
3378
|
+
legacy
|
|
3379
|
+
});
|
|
3380
|
+
entry.parent.tree.commit({
|
|
3381
|
+
id: legacy.id,
|
|
3382
|
+
group: entry.parent,
|
|
3383
|
+
options: entry.options
|
|
3384
|
+
});
|
|
3385
|
+
} else {
|
|
3386
|
+
const from = entry.parent === source ? void 0 : source;
|
|
3387
|
+
entry.parent.tree.commit({
|
|
3388
|
+
id: legacy.id,
|
|
3389
|
+
group: entry.parent,
|
|
3390
|
+
from,
|
|
3391
|
+
options: entry.options,
|
|
3392
|
+
legacy
|
|
3393
|
+
});
|
|
2996
3394
|
}
|
|
2997
|
-
|
|
2998
|
-
return entry.update(options, false, true);
|
|
3395
|
+
return task;
|
|
2999
3396
|
}
|
|
3000
3397
|
/** Import a plugin module from a specifier or `cordis:` builtin. */
|
|
3001
3398
|
import(name, getOuterStack) {
|
|
@@ -3007,10 +3404,13 @@ var EntryTree = class EntryTree {
|
|
|
3007
3404
|
/* @vite-ignore */
|
|
3008
3405
|
new URL(name, this.ctx.baseUrl).href
|
|
3009
3406
|
));
|
|
3010
|
-
else
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3407
|
+
else {
|
|
3408
|
+
const resolve = await createResolve(this.ctx.baseUrl);
|
|
3409
|
+
return await import(__rewriteRelativeImportExtension(
|
|
3410
|
+
/* @vite-ignore */
|
|
3411
|
+
resolve ? resolve(name) : name
|
|
3412
|
+
));
|
|
3413
|
+
}
|
|
3014
3414
|
}, getOuterStack);
|
|
3015
3415
|
}
|
|
3016
3416
|
};
|
|
@@ -3041,10 +3441,10 @@ function isRecord(value) {
|
|
|
3041
3441
|
}
|
|
3042
3442
|
function equal(a, b, schema, ancestors) {
|
|
3043
3443
|
if (schema?.meta?.volatile) return true;
|
|
3044
|
-
if (schema?.type !== "object" || !schema.dict || ancestors.has(schema)) return deepEqual(a, b, true);
|
|
3444
|
+
if (schema?.type !== "object" || !schema.dict || ancestors.has(schema)) return deepEqual$1(a, b, true);
|
|
3045
3445
|
const left = a ?? schema.meta?.default;
|
|
3046
3446
|
const right = b ?? schema.meta?.default;
|
|
3047
|
-
if (!isRecord(left) || !isRecord(right)) return deepEqual(left, right, true);
|
|
3447
|
+
if (!isRecord(left) || !isRecord(right)) return deepEqual$1(left, right, true);
|
|
3048
3448
|
const { dict } = schema;
|
|
3049
3449
|
ancestors.add(schema);
|
|
3050
3450
|
try {
|
|
@@ -3066,7 +3466,7 @@ function equal(a, b, schema, ancestors) {
|
|
|
3066
3466
|
* @internal
|
|
3067
3467
|
*/
|
|
3068
3468
|
function equalExceptVolatile(previous, next, schema) {
|
|
3069
|
-
return isSchemastery(schema) ? equal(previous, next, schema, /* @__PURE__ */ new Set()) : deepEqual(previous, next, true);
|
|
3469
|
+
return isSchemastery(schema) ? equal(previous, next, schema, /* @__PURE__ */ new Set()) : deepEqual$1(previous, next, true);
|
|
3070
3470
|
}
|
|
3071
3471
|
function takeEntries(object, keys) {
|
|
3072
3472
|
const result = [];
|
|
@@ -3118,7 +3518,7 @@ var Entry = class Entry {
|
|
|
3118
3518
|
if (this.options.group) return false;
|
|
3119
3519
|
let entry = this;
|
|
3120
3520
|
do {
|
|
3121
|
-
if (this.
|
|
3521
|
+
if (this._resolveDisabled(entry.options)) return true;
|
|
3122
3522
|
entry = entry.parent.ctx.fiber.entry;
|
|
3123
3523
|
} while (entry);
|
|
3124
3524
|
return false;
|
|
@@ -3127,18 +3527,20 @@ var Entry = class Entry {
|
|
|
3127
3527
|
* Effective disabled state: a `!!js` expression evaluates against the loader
|
|
3128
3528
|
* context. The raw node stays in the options, so write-back keeps the form.
|
|
3129
3529
|
*/
|
|
3130
|
-
|
|
3530
|
+
_resolveDisabled(options) {
|
|
3131
3531
|
return isJsExpr(options.disabled) ? Boolean(this.evaluate(options.disabled.__jsExpr)) : Boolean(options.disabled);
|
|
3132
3532
|
}
|
|
3133
3533
|
evaluate(expr) {
|
|
3134
3534
|
return evaluate(this.ctx, expr);
|
|
3135
3535
|
}
|
|
3136
|
-
_patchContext(diff) {
|
|
3137
|
-
this.context.waterfall("loader/patch-context", this, () => {
|
|
3536
|
+
async _patchContext(diff) {
|
|
3537
|
+
await this.context.waterfall("loader/patch-context", this, async () => {
|
|
3138
3538
|
Object.setPrototypeOf(this.ctx, this.parent.ctx);
|
|
3139
|
-
if (this.fiber?.uid && (diff.includes("config") || this.options.group))
|
|
3140
|
-
this.ctx.
|
|
3141
|
-
|
|
3539
|
+
if (this.fiber?.uid && (diff.includes("config") || this.options.group)) {
|
|
3540
|
+
const fiber = this.fiber.ctx.fiber;
|
|
3541
|
+
for (const name of Object.keys(fiber.inject)) fiber._checkImpl(name);
|
|
3542
|
+
await fiber.update(this.options.config, true);
|
|
3543
|
+
}
|
|
3142
3544
|
});
|
|
3143
3545
|
}
|
|
3144
3546
|
async refresh() {
|
|
@@ -3150,24 +3552,24 @@ var Entry = class Entry {
|
|
|
3150
3552
|
async update(options, create = false, force = false) {
|
|
3151
3553
|
const legacy = { ...this.options };
|
|
3152
3554
|
if (create) this.options = options;
|
|
3153
|
-
else for (const [key, value] of Object.entries(options)) if (isNullable(value)) delete this.options[key];
|
|
3555
|
+
else for (const [key, value] of Object.entries(options)) if (isNullable$1(value)) delete this.options[key];
|
|
3154
3556
|
else this.options[key] = value;
|
|
3155
3557
|
sortKeys(this.options);
|
|
3156
3558
|
if (this.disabled) {
|
|
3157
|
-
this.fiber?.dispose();
|
|
3559
|
+
await this.fiber?.dispose();
|
|
3158
3560
|
return;
|
|
3159
3561
|
}
|
|
3160
3562
|
if (this.fiber?.uid) {
|
|
3161
3563
|
const changes = Object.keys({
|
|
3162
3564
|
...this.options,
|
|
3163
3565
|
...legacy
|
|
3164
|
-
}).filter((key) => !deepEqual(this.options[key], legacy[key], key === "config"));
|
|
3566
|
+
}).filter((key) => !deepEqual$1(this.options[key], legacy[key], key === "config"));
|
|
3165
3567
|
const volatileOnly = changes.length === 1 && changes[0] === "config" && this.fiber.state === 2 && Object.getPrototypeOf(this.ctx) === this.parent.ctx && equalExceptVolatile(legacy.config, this.options.config, this.fiber.runtime?.Config);
|
|
3166
|
-
if (volatileOnly) this.fiber.
|
|
3568
|
+
if (volatileOnly) this.fiber.rawConfig = this.options.config;
|
|
3167
3569
|
const pending = volatileOnly && this._commitVolatile() ? [] : changes;
|
|
3168
3570
|
if (!pending.length && !force) return;
|
|
3169
3571
|
this.context.emit("loader/partial-dispose", this, legacy, true);
|
|
3170
|
-
this._patchContext(pending);
|
|
3572
|
+
await this._patchContext(pending);
|
|
3171
3573
|
} else await this.init();
|
|
3172
3574
|
}
|
|
3173
3575
|
/**
|
|
@@ -3176,25 +3578,25 @@ var Entry = class Entry {
|
|
|
3176
3578
|
* @returns `false` when an ordinary effective value changed, so the caller applies the ordinary update lifecycle.
|
|
3177
3579
|
*/
|
|
3178
3580
|
_commitVolatile() {
|
|
3179
|
-
const fiber = this.fiber;
|
|
3180
|
-
const refs = volatileEntries(fiber.
|
|
3581
|
+
const fiber = this.fiber.ctx.fiber;
|
|
3582
|
+
const refs = volatileEntries(fiber.effectiveConfig);
|
|
3181
3583
|
if (!refs.length) return true;
|
|
3182
3584
|
const raw = this.options.config;
|
|
3183
3585
|
let candidate;
|
|
3184
3586
|
try {
|
|
3185
|
-
candidate =
|
|
3587
|
+
candidate = fiber.resolveConfig(raw);
|
|
3186
3588
|
} catch (error) {
|
|
3187
3589
|
this.ctx.logger.warn("volatile config update failed for %C", this.options.id);
|
|
3188
3590
|
this.ctx.logger.warn(error);
|
|
3189
3591
|
return true;
|
|
3190
3592
|
}
|
|
3191
|
-
if (!deepEqual(fiber.
|
|
3593
|
+
if (!deepEqual$1(fiber.effectiveConfig, candidate, true)) {
|
|
3192
3594
|
this.ctx.logger.debug("ordinary config values of %C changed with its volatile values; applying the ordinary update", this.options.id);
|
|
3193
3595
|
return false;
|
|
3194
3596
|
}
|
|
3195
3597
|
const paths = refs.flatMap(({ path, ref }) => {
|
|
3196
3598
|
const source = path.reduce((value, key) => Reflect.get(value, key), candidate);
|
|
3197
|
-
if (deepEqual(ref.get(), source.get(), true)) return [];
|
|
3599
|
+
if (deepEqual$1(ref.get(), source.get(), true)) return [];
|
|
3198
3600
|
updateVolatile(ref, source);
|
|
3199
3601
|
return [path];
|
|
3200
3602
|
});
|
|
@@ -3224,11 +3626,10 @@ var Entry = class Entry {
|
|
|
3224
3626
|
} finally {
|
|
3225
3627
|
this._initTask = void 0;
|
|
3226
3628
|
}
|
|
3227
|
-
|
|
3629
|
+
this.fiber?.await().catch(() => {}).finally(() => {
|
|
3228
3630
|
if (this.loader.getTasks().length) return;
|
|
3229
3631
|
this.ctx.reflect.notify(["loader"]);
|
|
3230
|
-
};
|
|
3231
|
-
this.fiber?.await().then(notify, notify);
|
|
3632
|
+
});
|
|
3232
3633
|
}
|
|
3233
3634
|
async _init() {
|
|
3234
3635
|
let moduleNamespace;
|
|
@@ -3237,13 +3638,11 @@ var Entry = class Entry {
|
|
|
3237
3638
|
} catch (error) {
|
|
3238
3639
|
this.ctx.logger.error(error);
|
|
3239
3640
|
return;
|
|
3240
|
-
} finally {
|
|
3241
|
-
this._initTask = void 0;
|
|
3242
3641
|
}
|
|
3243
3642
|
const plugin = this.loader.unwrapExports(moduleNamespace);
|
|
3244
|
-
this._patchContext([]);
|
|
3643
|
+
await this._patchContext([]);
|
|
3245
3644
|
this.loader.showLog(this, "apply");
|
|
3246
|
-
this.fiber = this.ctx.registry.plugin(plugin, this.options.config, this.getOuterStack)
|
|
3645
|
+
this.fiber = this.ctx.registry.plugin(plugin, this.options.config, this.getOuterStack);
|
|
3247
3646
|
this.moduleNamespace = moduleNamespace;
|
|
3248
3647
|
}
|
|
3249
3648
|
};
|
|
@@ -3342,8 +3741,155 @@ Object.fromEntries(Object.entries({
|
|
|
3342
3741
|
"skill-badge": "experimental-skill-badge",
|
|
3343
3742
|
"session-title-all-prompts-llm": "experimental-session-title-all-prompts-llm"
|
|
3344
3743
|
}).map(([dshHead, qilinHead]) => [qilinHead, dshHead]));
|
|
3345
|
-
|
|
3346
|
-
|
|
3744
|
+
/** Test values using `instanceof` with a `toStringTag` fallback. */
|
|
3745
|
+
function is(type, value) {
|
|
3746
|
+
if (arguments.length === 1) return (value) => is(type, value);
|
|
3747
|
+
return type in globalThis && value instanceof globalThis[type] || Object.prototype.toString.call(value).slice(8, -1) === type;
|
|
3748
|
+
}
|
|
3749
|
+
function isArrayBufferLike(value) {
|
|
3750
|
+
return is("ArrayBuffer", value) || is("SharedArrayBuffer", value);
|
|
3751
|
+
}
|
|
3752
|
+
function isArrayBufferSource(value) {
|
|
3753
|
+
return isArrayBufferLike(value) || ArrayBuffer.isView(value);
|
|
3754
|
+
}
|
|
3755
|
+
let Binary;
|
|
3756
|
+
(function(_Binary) {
|
|
3757
|
+
_Binary.is = isArrayBufferLike;
|
|
3758
|
+
_Binary.isSource = isArrayBufferSource;
|
|
3759
|
+
function fromSource(source) {
|
|
3760
|
+
if (ArrayBuffer.isView(source)) return source.buffer.slice(source.byteOffset, source.byteOffset + source.byteLength);
|
|
3761
|
+
else return source;
|
|
3762
|
+
}
|
|
3763
|
+
_Binary.fromSource = fromSource;
|
|
3764
|
+
function toBase64(source) {
|
|
3765
|
+
source = fromSource(source);
|
|
3766
|
+
if (typeof Buffer !== "undefined") return Buffer.from(source).toString("base64");
|
|
3767
|
+
let binary = "";
|
|
3768
|
+
const bytes = new Uint8Array(source);
|
|
3769
|
+
for (let i = 0; i < bytes.byteLength; i++) binary += String.fromCharCode(bytes[i]);
|
|
3770
|
+
return btoa(binary);
|
|
3771
|
+
}
|
|
3772
|
+
_Binary.toBase64 = toBase64;
|
|
3773
|
+
function fromBase64(source) {
|
|
3774
|
+
if (typeof Buffer !== "undefined") return fromSource(Buffer.from(source, "base64"));
|
|
3775
|
+
return Uint8Array.from(atob(source), (c) => c.charCodeAt(0));
|
|
3776
|
+
}
|
|
3777
|
+
_Binary.fromBase64 = fromBase64;
|
|
3778
|
+
function toHex(source) {
|
|
3779
|
+
source = fromSource(source);
|
|
3780
|
+
if (typeof Buffer !== "undefined") return Buffer.from(source).toString("hex");
|
|
3781
|
+
return Array.from(new Uint8Array(source), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
3782
|
+
}
|
|
3783
|
+
_Binary.toHex = toHex;
|
|
3784
|
+
function fromHex(source) {
|
|
3785
|
+
if (typeof Buffer !== "undefined") return fromSource(Buffer.from(source, "hex"));
|
|
3786
|
+
const hex = source.length % 2 === 0 ? source : source.slice(0, source.length - 1);
|
|
3787
|
+
const buffer = [];
|
|
3788
|
+
for (let i = 0; i < hex.length; i += 2) buffer.push(parseInt(`${hex[i]}${hex[i + 1]}`, 16));
|
|
3789
|
+
return Uint8Array.from(buffer).buffer;
|
|
3790
|
+
}
|
|
3791
|
+
_Binary.fromHex = fromHex;
|
|
3792
|
+
})(Binary || (Binary = {}));
|
|
3793
|
+
Binary.fromBase64;
|
|
3794
|
+
Binary.toBase64;
|
|
3795
|
+
Binary.fromHex;
|
|
3796
|
+
Binary.toHex;
|
|
3797
|
+
let Time;
|
|
3798
|
+
(function(_Time) {
|
|
3799
|
+
_Time.millisecond = 1;
|
|
3800
|
+
const second = _Time.second = 1e3;
|
|
3801
|
+
const minute = _Time.minute = second * 60;
|
|
3802
|
+
const hour = _Time.hour = minute * 60;
|
|
3803
|
+
const day = _Time.day = hour * 24;
|
|
3804
|
+
const week = _Time.week = day * 7;
|
|
3805
|
+
let timezoneOffset = (/* @__PURE__ */ new Date()).getTimezoneOffset();
|
|
3806
|
+
function setTimezoneOffset(offset) {
|
|
3807
|
+
timezoneOffset = offset;
|
|
3808
|
+
}
|
|
3809
|
+
_Time.setTimezoneOffset = setTimezoneOffset;
|
|
3810
|
+
function getTimezoneOffset() {
|
|
3811
|
+
return timezoneOffset;
|
|
3812
|
+
}
|
|
3813
|
+
_Time.getTimezoneOffset = getTimezoneOffset;
|
|
3814
|
+
function getDateNumber(date = /* @__PURE__ */ new Date(), offset) {
|
|
3815
|
+
if (typeof date === "number") date = new Date(date);
|
|
3816
|
+
if (offset === void 0) offset = timezoneOffset;
|
|
3817
|
+
return Math.floor((date.valueOf() / minute - offset) / 1440);
|
|
3818
|
+
}
|
|
3819
|
+
_Time.getDateNumber = getDateNumber;
|
|
3820
|
+
function fromDateNumber(value, offset) {
|
|
3821
|
+
const date = new Date(value * day);
|
|
3822
|
+
if (offset === void 0) offset = timezoneOffset;
|
|
3823
|
+
return new Date(+date + offset * minute);
|
|
3824
|
+
}
|
|
3825
|
+
_Time.fromDateNumber = fromDateNumber;
|
|
3826
|
+
const numeric = /\d+(?:\.\d+)?/.source;
|
|
3827
|
+
const timeRegExp = new RegExp(`^${[
|
|
3828
|
+
"w(?:eek(?:s)?)?",
|
|
3829
|
+
"d(?:ay(?:s)?)?",
|
|
3830
|
+
"h(?:our(?:s)?)?",
|
|
3831
|
+
"m(?:in(?:ute)?(?:s)?)?",
|
|
3832
|
+
"s(?:ec(?:ond)?(?:s)?)?"
|
|
3833
|
+
].map((unit) => `(${numeric}${unit})?`).join("")}$`);
|
|
3834
|
+
function parseTime(source) {
|
|
3835
|
+
const capture = timeRegExp.exec(source);
|
|
3836
|
+
if (!capture) return 0;
|
|
3837
|
+
return (parseFloat(capture[1]) * week || 0) + (parseFloat(capture[2]) * day || 0) + (parseFloat(capture[3]) * hour || 0) + (parseFloat(capture[4]) * minute || 0) + (parseFloat(capture[5]) * second || 0);
|
|
3838
|
+
}
|
|
3839
|
+
_Time.parseTime = parseTime;
|
|
3840
|
+
function parseDate(date) {
|
|
3841
|
+
const parsed = parseTime(date);
|
|
3842
|
+
if (parsed) date = Date.now() + parsed;
|
|
3843
|
+
else if (/^\d{1,2}(:\d{1,2}){1,2}$/.test(date)) date = `${(/* @__PURE__ */ new Date()).toLocaleDateString()}-${date}`;
|
|
3844
|
+
else if (/^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(date)) date = `${(/* @__PURE__ */ new Date()).getFullYear()}-${date}`;
|
|
3845
|
+
return date ? new Date(date) : /* @__PURE__ */ new Date();
|
|
3846
|
+
}
|
|
3847
|
+
_Time.parseDate = parseDate;
|
|
3848
|
+
function format(ms) {
|
|
3849
|
+
const abs = Math.abs(ms);
|
|
3850
|
+
if (abs >= day - hour / 2) return Math.round(ms / day) + "d";
|
|
3851
|
+
else if (abs >= hour - minute / 2) return Math.round(ms / hour) + "h";
|
|
3852
|
+
else if (abs >= minute - second / 2) return Math.round(ms / minute) + "m";
|
|
3853
|
+
else if (abs >= second) return Math.round(ms / second) + "s";
|
|
3854
|
+
return ms + "ms";
|
|
3855
|
+
}
|
|
3856
|
+
_Time.format = format;
|
|
3857
|
+
function toDigits(source, length = 2) {
|
|
3858
|
+
return source.toString().padStart(length, "0");
|
|
3859
|
+
}
|
|
3860
|
+
_Time.toDigits = toDigits;
|
|
3861
|
+
function template(template, time = /* @__PURE__ */ new Date()) {
|
|
3862
|
+
return template.replace("yyyy", time.getFullYear().toString()).replace("yy", time.getFullYear().toString().slice(2)).replace("MM", toDigits(time.getMonth() + 1)).replace("dd", toDigits(time.getDate())).replace("hh", toDigits(time.getHours())).replace("mm", toDigits(time.getMinutes())).replace("ss", toDigits(time.getSeconds())).replace("SSS", toDigits(time.getMilliseconds(), 3));
|
|
3863
|
+
}
|
|
3864
|
+
_Time.template = template;
|
|
3865
|
+
})(Time || (Time = {}));
|
|
3866
|
+
/** Index every entry (including nested group members) by id. */
|
|
3867
|
+
function flatten(data, parent = null, result = /* @__PURE__ */ new Map()) {
|
|
3868
|
+
data.forEach((options, position) => {
|
|
3869
|
+
if (options.id) result.set(options.id, {
|
|
3870
|
+
parent,
|
|
3871
|
+
position,
|
|
3872
|
+
options,
|
|
3873
|
+
list: data
|
|
3874
|
+
});
|
|
3875
|
+
if (options.group && Array.isArray(options.config)) flatten(options.config, options.id ?? null, result);
|
|
3876
|
+
});
|
|
3877
|
+
return result;
|
|
3878
|
+
}
|
|
3879
|
+
function randomId(used) {
|
|
3880
|
+
let id;
|
|
3881
|
+
do
|
|
3882
|
+
id = Math.random().toString(16).slice(2, 10);
|
|
3883
|
+
while (used(id));
|
|
3884
|
+
return id;
|
|
3885
|
+
}
|
|
3886
|
+
/** Give every entry (nested groups included) an id, in place. */
|
|
3887
|
+
function ensureIds(entries, used) {
|
|
3888
|
+
for (const entry of entries) {
|
|
3889
|
+
if (!entry.id) entry.id = randomId(used);
|
|
3890
|
+
if (entry.group && Array.isArray(entry.config)) ensureIds(entry.config, used);
|
|
3891
|
+
}
|
|
3892
|
+
}
|
|
3347
3893
|
const JsExpr = new Type("tag:yaml.org,2002:js", {
|
|
3348
3894
|
kind: "scalar",
|
|
3349
3895
|
resolve: (data) => typeof data === "string",
|
|
@@ -3352,11 +3898,6 @@ const JsExpr = new Type("tag:yaml.org,2002:js", {
|
|
|
3352
3898
|
represent: (data) => data["__jsExpr"]
|
|
3353
3899
|
});
|
|
3354
3900
|
JSON_SCHEMA.extend(JsExpr);
|
|
3355
|
-
new Set(Object.keys({
|
|
3356
|
-
".json": "application/json",
|
|
3357
|
-
".yaml": "application/yaml",
|
|
3358
|
-
".yml": "application/yaml"
|
|
3359
|
-
}));
|
|
3360
3901
|
EntryGroup.key, Service.init;
|
|
3361
3902
|
/** Legacy profile-link inspection shared by the disk materializer and runtime resolver. */
|
|
3362
3903
|
/** Profile-private package links projected into its pnpm-managed node_modules. */
|
|
@@ -4028,7 +4569,7 @@ function parseRemoteStreamServerMessage(raw) {
|
|
|
4028
4569
|
* @throws Error when the build carries no client version, instead of reporting a guessed one.
|
|
4029
4570
|
*/
|
|
4030
4571
|
function desktopClientVersion() {
|
|
4031
|
-
return "3.1.
|
|
4572
|
+
return "3.1.9";
|
|
4032
4573
|
}
|
|
4033
4574
|
/**
|
|
4034
4575
|
* Sample the Desktop client identity for one Platform request.
|
|
@@ -4317,10 +4858,1435 @@ var DesktopPlatformView = class {
|
|
|
4317
4858
|
}
|
|
4318
4859
|
};
|
|
4319
4860
|
//#endregion
|
|
4861
|
+
//#region ../../node_modules/.pnpm/mime@4.1.2/node_modules/mime/dist/types/other.js
|
|
4862
|
+
const types$1 = {
|
|
4863
|
+
"application/prs.cww": ["cww"],
|
|
4864
|
+
"application/prs.xsf+xml": ["xsf"],
|
|
4865
|
+
"application/vnd.1000minds.decision-model+xml": ["1km"],
|
|
4866
|
+
"application/vnd.3gpp.pic-bw-large": ["plb"],
|
|
4867
|
+
"application/vnd.3gpp.pic-bw-small": ["psb"],
|
|
4868
|
+
"application/vnd.3gpp.pic-bw-var": ["pvb"],
|
|
4869
|
+
"application/vnd.3gpp2.tcap": ["tcap"],
|
|
4870
|
+
"application/vnd.3m.post-it-notes": ["pwn"],
|
|
4871
|
+
"application/vnd.accpac.simply.aso": ["aso"],
|
|
4872
|
+
"application/vnd.accpac.simply.imp": ["imp"],
|
|
4873
|
+
"application/vnd.acucobol": ["acu"],
|
|
4874
|
+
"application/vnd.acucorp": ["atc", "acutc"],
|
|
4875
|
+
"application/vnd.adobe.air-application-installer-package+zip": ["air"],
|
|
4876
|
+
"application/vnd.adobe.formscentral.fcdt": ["fcdt"],
|
|
4877
|
+
"application/vnd.adobe.fxp": ["fxp", "fxpl"],
|
|
4878
|
+
"application/vnd.adobe.xdp+xml": ["xdp"],
|
|
4879
|
+
"application/vnd.adobe.xfdf": ["*xfdf"],
|
|
4880
|
+
"application/vnd.age": ["age"],
|
|
4881
|
+
"application/vnd.ahead.space": ["ahead"],
|
|
4882
|
+
"application/vnd.airzip.filesecure.azf": ["azf"],
|
|
4883
|
+
"application/vnd.airzip.filesecure.azs": ["azs"],
|
|
4884
|
+
"application/vnd.amazon.ebook": ["azw"],
|
|
4885
|
+
"application/vnd.americandynamics.acc": ["acc"],
|
|
4886
|
+
"application/vnd.amiga.ami": ["ami"],
|
|
4887
|
+
"application/vnd.android.package-archive": ["apk"],
|
|
4888
|
+
"application/vnd.anser-web-certificate-issue-initiation": ["cii"],
|
|
4889
|
+
"application/vnd.anser-web-funds-transfer-initiation": ["fti"],
|
|
4890
|
+
"application/vnd.antix.game-component": ["atx"],
|
|
4891
|
+
"application/vnd.apple.installer+xml": ["mpkg"],
|
|
4892
|
+
"application/vnd.apple.keynote": ["key"],
|
|
4893
|
+
"application/vnd.apple.mpegurl": ["m3u8"],
|
|
4894
|
+
"application/vnd.apple.numbers": ["numbers"],
|
|
4895
|
+
"application/vnd.apple.pages": ["pages"],
|
|
4896
|
+
"application/vnd.apple.pkpass": ["pkpass"],
|
|
4897
|
+
"application/vnd.aristanetworks.swi": ["swi"],
|
|
4898
|
+
"application/vnd.astraea-software.iota": ["iota"],
|
|
4899
|
+
"application/vnd.audiograph": ["aep"],
|
|
4900
|
+
"application/vnd.autodesk.fbx": ["fbx"],
|
|
4901
|
+
"application/vnd.balsamiq.bmml+xml": ["bmml"],
|
|
4902
|
+
"application/vnd.blueice.multipass": ["mpm"],
|
|
4903
|
+
"application/vnd.bmi": ["bmi"],
|
|
4904
|
+
"application/vnd.businessobjects": ["rep"],
|
|
4905
|
+
"application/vnd.chemdraw+xml": ["cdxml"],
|
|
4906
|
+
"application/vnd.chipnuts.karaoke-mmd": ["mmd"],
|
|
4907
|
+
"application/vnd.cinderella": ["cdy"],
|
|
4908
|
+
"application/vnd.citationstyles.style+xml": ["csl"],
|
|
4909
|
+
"application/vnd.claymore": ["cla"],
|
|
4910
|
+
"application/vnd.cloanto.rp9": ["rp9"],
|
|
4911
|
+
"application/vnd.clonk.c4group": [
|
|
4912
|
+
"c4g",
|
|
4913
|
+
"c4d",
|
|
4914
|
+
"c4f",
|
|
4915
|
+
"c4p",
|
|
4916
|
+
"c4u"
|
|
4917
|
+
],
|
|
4918
|
+
"application/vnd.cluetrust.cartomobile-config": ["c11amc"],
|
|
4919
|
+
"application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"],
|
|
4920
|
+
"application/vnd.commonspace": ["csp"],
|
|
4921
|
+
"application/vnd.contact.cmsg": ["cdbcmsg"],
|
|
4922
|
+
"application/vnd.cosmocaller": ["cmc"],
|
|
4923
|
+
"application/vnd.crick.clicker": ["clkx"],
|
|
4924
|
+
"application/vnd.crick.clicker.keyboard": ["clkk"],
|
|
4925
|
+
"application/vnd.crick.clicker.palette": ["clkp"],
|
|
4926
|
+
"application/vnd.crick.clicker.template": ["clkt"],
|
|
4927
|
+
"application/vnd.crick.clicker.wordbank": ["clkw"],
|
|
4928
|
+
"application/vnd.criticaltools.wbs+xml": ["wbs"],
|
|
4929
|
+
"application/vnd.ctc-posml": ["pml"],
|
|
4930
|
+
"application/vnd.cups-ppd": ["ppd"],
|
|
4931
|
+
"application/vnd.curl.car": ["car"],
|
|
4932
|
+
"application/vnd.curl.pcurl": ["pcurl"],
|
|
4933
|
+
"application/vnd.dart": ["dart"],
|
|
4934
|
+
"application/vnd.data-vision.rdz": ["rdz"],
|
|
4935
|
+
"application/vnd.dbf": ["dbf"],
|
|
4936
|
+
"application/vnd.dcmp+xml": ["dcmp"],
|
|
4937
|
+
"application/vnd.dece.data": [
|
|
4938
|
+
"uvf",
|
|
4939
|
+
"uvvf",
|
|
4940
|
+
"uvd",
|
|
4941
|
+
"uvvd"
|
|
4942
|
+
],
|
|
4943
|
+
"application/vnd.dece.ttml+xml": ["uvt", "uvvt"],
|
|
4944
|
+
"application/vnd.dece.unspecified": ["uvx", "uvvx"],
|
|
4945
|
+
"application/vnd.dece.zip": ["uvz", "uvvz"],
|
|
4946
|
+
"application/vnd.denovo.fcselayout-link": ["fe_launch"],
|
|
4947
|
+
"application/vnd.dna": ["dna"],
|
|
4948
|
+
"application/vnd.dolby.mlp": ["mlp"],
|
|
4949
|
+
"application/vnd.dpgraph": ["dpg"],
|
|
4950
|
+
"application/vnd.dreamfactory": ["dfac"],
|
|
4951
|
+
"application/vnd.ds-keypoint": ["kpxx"],
|
|
4952
|
+
"application/vnd.dvb.ait": ["ait"],
|
|
4953
|
+
"application/vnd.dvb.service": ["svc"],
|
|
4954
|
+
"application/vnd.dynageo": ["geo"],
|
|
4955
|
+
"application/vnd.ecowin.chart": ["mag"],
|
|
4956
|
+
"application/vnd.enliven": ["nml"],
|
|
4957
|
+
"application/vnd.epson.esf": ["esf"],
|
|
4958
|
+
"application/vnd.epson.msf": ["msf"],
|
|
4959
|
+
"application/vnd.epson.quickanime": ["qam"],
|
|
4960
|
+
"application/vnd.epson.salt": ["slt"],
|
|
4961
|
+
"application/vnd.epson.ssf": ["ssf"],
|
|
4962
|
+
"application/vnd.eszigno3+xml": ["es3", "et3"],
|
|
4963
|
+
"application/vnd.ezpix-album": ["ez2"],
|
|
4964
|
+
"application/vnd.ezpix-package": ["ez3"],
|
|
4965
|
+
"application/vnd.fdf": ["*fdf"],
|
|
4966
|
+
"application/vnd.fdsn.mseed": ["mseed"],
|
|
4967
|
+
"application/vnd.fdsn.seed": ["seed", "dataless"],
|
|
4968
|
+
"application/vnd.flographit": ["gph"],
|
|
4969
|
+
"application/vnd.fluxtime.clip": ["ftc"],
|
|
4970
|
+
"application/vnd.framemaker": [
|
|
4971
|
+
"fm",
|
|
4972
|
+
"frame",
|
|
4973
|
+
"maker",
|
|
4974
|
+
"book"
|
|
4975
|
+
],
|
|
4976
|
+
"application/vnd.frogans.fnc": ["fnc"],
|
|
4977
|
+
"application/vnd.frogans.ltf": ["ltf"],
|
|
4978
|
+
"application/vnd.fsc.weblaunch": ["fsc"],
|
|
4979
|
+
"application/vnd.fujitsu.oasys": ["oas"],
|
|
4980
|
+
"application/vnd.fujitsu.oasys2": ["oa2"],
|
|
4981
|
+
"application/vnd.fujitsu.oasys3": ["oa3"],
|
|
4982
|
+
"application/vnd.fujitsu.oasysgp": ["fg5"],
|
|
4983
|
+
"application/vnd.fujitsu.oasysprs": ["bh2"],
|
|
4984
|
+
"application/vnd.fujixerox.ddd": ["ddd"],
|
|
4985
|
+
"application/vnd.fujixerox.docuworks": ["xdw"],
|
|
4986
|
+
"application/vnd.fujixerox.docuworks.binder": ["xbd"],
|
|
4987
|
+
"application/vnd.fuzzysheet": ["fzs"],
|
|
4988
|
+
"application/vnd.genomatix.tuxedo": ["txd"],
|
|
4989
|
+
"application/vnd.geogebra.file": ["ggb"],
|
|
4990
|
+
"application/vnd.geogebra.slides": ["ggs"],
|
|
4991
|
+
"application/vnd.geogebra.tool": ["ggt"],
|
|
4992
|
+
"application/vnd.geometry-explorer": ["gex", "gre"],
|
|
4993
|
+
"application/vnd.geonext": ["gxt"],
|
|
4994
|
+
"application/vnd.geoplan": ["g2w"],
|
|
4995
|
+
"application/vnd.geospace": ["g3w"],
|
|
4996
|
+
"application/vnd.gmx": ["gmx"],
|
|
4997
|
+
"application/vnd.google-apps.document": ["gdoc"],
|
|
4998
|
+
"application/vnd.google-apps.drawing": ["gdraw"],
|
|
4999
|
+
"application/vnd.google-apps.form": ["gform"],
|
|
5000
|
+
"application/vnd.google-apps.jam": ["gjam"],
|
|
5001
|
+
"application/vnd.google-apps.map": ["gmap"],
|
|
5002
|
+
"application/vnd.google-apps.presentation": ["gslides"],
|
|
5003
|
+
"application/vnd.google-apps.script": ["gscript"],
|
|
5004
|
+
"application/vnd.google-apps.site": ["gsite"],
|
|
5005
|
+
"application/vnd.google-apps.spreadsheet": ["gsheet"],
|
|
5006
|
+
"application/vnd.google-earth.kml+xml": ["kml"],
|
|
5007
|
+
"application/vnd.google-earth.kmz": ["kmz"],
|
|
5008
|
+
"application/vnd.gov.sk.xmldatacontainer+xml": ["xdcf"],
|
|
5009
|
+
"application/vnd.grafeq": ["gqf", "gqs"],
|
|
5010
|
+
"application/vnd.groove-account": ["gac"],
|
|
5011
|
+
"application/vnd.groove-help": ["ghf"],
|
|
5012
|
+
"application/vnd.groove-identity-message": ["gim"],
|
|
5013
|
+
"application/vnd.groove-injector": ["grv"],
|
|
5014
|
+
"application/vnd.groove-tool-message": ["gtm"],
|
|
5015
|
+
"application/vnd.groove-tool-template": ["tpl"],
|
|
5016
|
+
"application/vnd.groove-vcard": ["vcg"],
|
|
5017
|
+
"application/vnd.hal+xml": ["hal"],
|
|
5018
|
+
"application/vnd.handheld-entertainment+xml": ["zmm"],
|
|
5019
|
+
"application/vnd.hbci": ["hbci"],
|
|
5020
|
+
"application/vnd.hhe.lesson-player": ["les"],
|
|
5021
|
+
"application/vnd.hp-hpgl": ["hpgl"],
|
|
5022
|
+
"application/vnd.hp-hpid": ["hpid"],
|
|
5023
|
+
"application/vnd.hp-hps": ["hps"],
|
|
5024
|
+
"application/vnd.hp-jlyt": ["jlt"],
|
|
5025
|
+
"application/vnd.hp-pcl": ["pcl"],
|
|
5026
|
+
"application/vnd.hp-pclxl": ["pclxl"],
|
|
5027
|
+
"application/vnd.hydrostatix.sof-data": ["sfd-hdstx"],
|
|
5028
|
+
"application/vnd.ibm.minipay": ["mpy"],
|
|
5029
|
+
"application/vnd.ibm.modcap": [
|
|
5030
|
+
"afp",
|
|
5031
|
+
"listafp",
|
|
5032
|
+
"list3820"
|
|
5033
|
+
],
|
|
5034
|
+
"application/vnd.ibm.rights-management": ["irm"],
|
|
5035
|
+
"application/vnd.ibm.secure-container": ["sc"],
|
|
5036
|
+
"application/vnd.iccprofile": ["icc", "icm"],
|
|
5037
|
+
"application/vnd.igloader": ["igl"],
|
|
5038
|
+
"application/vnd.immervision-ivp": ["ivp"],
|
|
5039
|
+
"application/vnd.immervision-ivu": ["ivu"],
|
|
5040
|
+
"application/vnd.insors.igm": ["igm"],
|
|
5041
|
+
"application/vnd.intercon.formnet": ["xpw", "xpx"],
|
|
5042
|
+
"application/vnd.intergeo": ["i2g"],
|
|
5043
|
+
"application/vnd.intu.qbo": ["qbo"],
|
|
5044
|
+
"application/vnd.intu.qfx": ["qfx"],
|
|
5045
|
+
"application/vnd.ipunplugged.rcprofile": ["rcprofile"],
|
|
5046
|
+
"application/vnd.irepository.package+xml": ["irp"],
|
|
5047
|
+
"application/vnd.is-xpr": ["xpr"],
|
|
5048
|
+
"application/vnd.isac.fcs": ["fcs"],
|
|
5049
|
+
"application/vnd.jam": ["jam"],
|
|
5050
|
+
"application/vnd.jcp.javame.midlet-rms": ["rms"],
|
|
5051
|
+
"application/vnd.jisp": ["jisp"],
|
|
5052
|
+
"application/vnd.joost.joda-archive": ["joda"],
|
|
5053
|
+
"application/vnd.kahootz": ["ktz", "ktr"],
|
|
5054
|
+
"application/vnd.kde.karbon": ["karbon"],
|
|
5055
|
+
"application/vnd.kde.kchart": ["chrt"],
|
|
5056
|
+
"application/vnd.kde.kformula": ["kfo"],
|
|
5057
|
+
"application/vnd.kde.kivio": ["flw"],
|
|
5058
|
+
"application/vnd.kde.kontour": ["kon"],
|
|
5059
|
+
"application/vnd.kde.kpresenter": ["kpr", "kpt"],
|
|
5060
|
+
"application/vnd.kde.kspread": ["ksp"],
|
|
5061
|
+
"application/vnd.kde.kword": ["kwd", "kwt"],
|
|
5062
|
+
"application/vnd.kenameaapp": ["htke"],
|
|
5063
|
+
"application/vnd.kidspiration": ["kia"],
|
|
5064
|
+
"application/vnd.kinar": ["kne", "knp"],
|
|
5065
|
+
"application/vnd.koan": [
|
|
5066
|
+
"skp",
|
|
5067
|
+
"skd",
|
|
5068
|
+
"skt",
|
|
5069
|
+
"skm"
|
|
5070
|
+
],
|
|
5071
|
+
"application/vnd.kodak-descriptor": ["sse"],
|
|
5072
|
+
"application/vnd.las.las+xml": ["lasxml"],
|
|
5073
|
+
"application/vnd.llamagraphics.life-balance.desktop": ["lbd"],
|
|
5074
|
+
"application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"],
|
|
5075
|
+
"application/vnd.lotus-1-2-3": ["123"],
|
|
5076
|
+
"application/vnd.lotus-approach": ["apr"],
|
|
5077
|
+
"application/vnd.lotus-freelance": ["pre"],
|
|
5078
|
+
"application/vnd.lotus-notes": ["nsf"],
|
|
5079
|
+
"application/vnd.lotus-organizer": ["org"],
|
|
5080
|
+
"application/vnd.lotus-screencam": ["scm"],
|
|
5081
|
+
"application/vnd.lotus-wordpro": ["lwp"],
|
|
5082
|
+
"application/vnd.macports.portpkg": ["portpkg"],
|
|
5083
|
+
"application/vnd.mapbox-vector-tile": ["mvt"],
|
|
5084
|
+
"application/vnd.mcd": ["mcd"],
|
|
5085
|
+
"application/vnd.medcalcdata": ["mc1"],
|
|
5086
|
+
"application/vnd.mediastation.cdkey": ["cdkey"],
|
|
5087
|
+
"application/vnd.mfer": ["mwf"],
|
|
5088
|
+
"application/vnd.mfmp": ["mfm"],
|
|
5089
|
+
"application/vnd.micrografx.flo": ["flo"],
|
|
5090
|
+
"application/vnd.micrografx.igx": ["igx"],
|
|
5091
|
+
"application/vnd.mif": ["mif"],
|
|
5092
|
+
"application/vnd.mobius.daf": ["daf"],
|
|
5093
|
+
"application/vnd.mobius.dis": ["dis"],
|
|
5094
|
+
"application/vnd.mobius.mbk": ["mbk"],
|
|
5095
|
+
"application/vnd.mobius.mqy": ["mqy"],
|
|
5096
|
+
"application/vnd.mobius.msl": ["msl"],
|
|
5097
|
+
"application/vnd.mobius.plc": ["plc"],
|
|
5098
|
+
"application/vnd.mobius.txf": ["txf"],
|
|
5099
|
+
"application/vnd.mophun.application": ["mpn"],
|
|
5100
|
+
"application/vnd.mophun.certificate": ["mpc"],
|
|
5101
|
+
"application/vnd.mozilla.xul+xml": ["xul"],
|
|
5102
|
+
"application/vnd.ms-artgalry": ["cil"],
|
|
5103
|
+
"application/vnd.ms-cab-compressed": ["cab"],
|
|
5104
|
+
"application/vnd.ms-excel": [
|
|
5105
|
+
"xls",
|
|
5106
|
+
"xlm",
|
|
5107
|
+
"xla",
|
|
5108
|
+
"xlc",
|
|
5109
|
+
"xlt",
|
|
5110
|
+
"xlw"
|
|
5111
|
+
],
|
|
5112
|
+
"application/vnd.ms-excel.addin.macroenabled.12": ["xlam"],
|
|
5113
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"],
|
|
5114
|
+
"application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"],
|
|
5115
|
+
"application/vnd.ms-excel.template.macroenabled.12": ["xltm"],
|
|
5116
|
+
"application/vnd.ms-fontobject": ["eot"],
|
|
5117
|
+
"application/vnd.ms-htmlhelp": ["chm"],
|
|
5118
|
+
"application/vnd.ms-ims": ["ims"],
|
|
5119
|
+
"application/vnd.ms-lrm": ["lrm"],
|
|
5120
|
+
"application/vnd.ms-officetheme": ["thmx"],
|
|
5121
|
+
"application/vnd.ms-outlook": ["msg"],
|
|
5122
|
+
"application/vnd.ms-pki.seccat": ["cat"],
|
|
5123
|
+
"application/vnd.ms-pki.stl": ["*stl"],
|
|
5124
|
+
"application/vnd.ms-powerpoint": [
|
|
5125
|
+
"ppt",
|
|
5126
|
+
"pps",
|
|
5127
|
+
"pot"
|
|
5128
|
+
],
|
|
5129
|
+
"application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"],
|
|
5130
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"],
|
|
5131
|
+
"application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"],
|
|
5132
|
+
"application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"],
|
|
5133
|
+
"application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"],
|
|
5134
|
+
"application/vnd.ms-project": ["*mpp", "mpt"],
|
|
5135
|
+
"application/vnd.ms-visio.viewer": ["vdx"],
|
|
5136
|
+
"application/vnd.ms-word.document.macroenabled.12": ["docm"],
|
|
5137
|
+
"application/vnd.ms-word.template.macroenabled.12": ["dotm"],
|
|
5138
|
+
"application/vnd.ms-works": [
|
|
5139
|
+
"wps",
|
|
5140
|
+
"wks",
|
|
5141
|
+
"wcm",
|
|
5142
|
+
"wdb"
|
|
5143
|
+
],
|
|
5144
|
+
"application/vnd.ms-wpl": ["wpl"],
|
|
5145
|
+
"application/vnd.ms-xpsdocument": ["xps"],
|
|
5146
|
+
"application/vnd.mseq": ["mseq"],
|
|
5147
|
+
"application/vnd.musician": ["mus"],
|
|
5148
|
+
"application/vnd.muvee.style": ["msty"],
|
|
5149
|
+
"application/vnd.mynfc": ["taglet"],
|
|
5150
|
+
"application/vnd.nato.bindingdataobject+xml": ["bdo"],
|
|
5151
|
+
"application/vnd.neurolanguage.nlu": ["nlu"],
|
|
5152
|
+
"application/vnd.nitf": ["ntf", "nitf"],
|
|
5153
|
+
"application/vnd.noblenet-directory": ["nnd"],
|
|
5154
|
+
"application/vnd.noblenet-sealer": ["nns"],
|
|
5155
|
+
"application/vnd.noblenet-web": ["nnw"],
|
|
5156
|
+
"application/vnd.nokia.n-gage.ac+xml": ["*ac"],
|
|
5157
|
+
"application/vnd.nokia.n-gage.data": ["ngdat"],
|
|
5158
|
+
"application/vnd.nokia.n-gage.symbian.install": ["n-gage"],
|
|
5159
|
+
"application/vnd.nokia.radio-preset": ["rpst"],
|
|
5160
|
+
"application/vnd.nokia.radio-presets": ["rpss"],
|
|
5161
|
+
"application/vnd.novadigm.edm": ["edm"],
|
|
5162
|
+
"application/vnd.novadigm.edx": ["edx"],
|
|
5163
|
+
"application/vnd.novadigm.ext": ["ext"],
|
|
5164
|
+
"application/vnd.oasis.opendocument.chart": ["odc"],
|
|
5165
|
+
"application/vnd.oasis.opendocument.chart-template": ["otc"],
|
|
5166
|
+
"application/vnd.oasis.opendocument.database": ["odb"],
|
|
5167
|
+
"application/vnd.oasis.opendocument.formula": ["odf"],
|
|
5168
|
+
"application/vnd.oasis.opendocument.formula-template": ["odft"],
|
|
5169
|
+
"application/vnd.oasis.opendocument.graphics": ["odg"],
|
|
5170
|
+
"application/vnd.oasis.opendocument.graphics-template": ["otg"],
|
|
5171
|
+
"application/vnd.oasis.opendocument.image": ["odi"],
|
|
5172
|
+
"application/vnd.oasis.opendocument.image-template": ["oti"],
|
|
5173
|
+
"application/vnd.oasis.opendocument.presentation": ["odp"],
|
|
5174
|
+
"application/vnd.oasis.opendocument.presentation-template": ["otp"],
|
|
5175
|
+
"application/vnd.oasis.opendocument.spreadsheet": ["ods"],
|
|
5176
|
+
"application/vnd.oasis.opendocument.spreadsheet-template": ["ots"],
|
|
5177
|
+
"application/vnd.oasis.opendocument.text": ["odt"],
|
|
5178
|
+
"application/vnd.oasis.opendocument.text-master": ["odm"],
|
|
5179
|
+
"application/vnd.oasis.opendocument.text-template": ["ott"],
|
|
5180
|
+
"application/vnd.oasis.opendocument.text-web": ["oth"],
|
|
5181
|
+
"application/vnd.olpc-sugar": ["xo"],
|
|
5182
|
+
"application/vnd.oma.dd2+xml": ["dd2"],
|
|
5183
|
+
"application/vnd.openblox.game+xml": ["obgx"],
|
|
5184
|
+
"application/vnd.openofficeorg.extension": ["oxt"],
|
|
5185
|
+
"application/vnd.openstreetmap.data+xml": ["osm"],
|
|
5186
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": ["pptx"],
|
|
5187
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slide": ["sldx"],
|
|
5188
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": ["ppsx"],
|
|
5189
|
+
"application/vnd.openxmlformats-officedocument.presentationml.template": ["potx"],
|
|
5190
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"],
|
|
5191
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.template": ["xltx"],
|
|
5192
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": ["docx"],
|
|
5193
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.template": ["dotx"],
|
|
5194
|
+
"application/vnd.osgeo.mapguide.package": ["mgp"],
|
|
5195
|
+
"application/vnd.osgi.dp": ["dp"],
|
|
5196
|
+
"application/vnd.osgi.subsystem": ["esa"],
|
|
5197
|
+
"application/vnd.palm": [
|
|
5198
|
+
"pdb",
|
|
5199
|
+
"pqa",
|
|
5200
|
+
"oprc"
|
|
5201
|
+
],
|
|
5202
|
+
"application/vnd.pawaafile": ["paw"],
|
|
5203
|
+
"application/vnd.pg.format": ["str"],
|
|
5204
|
+
"application/vnd.pg.osasli": ["ei6"],
|
|
5205
|
+
"application/vnd.picsel": ["efif"],
|
|
5206
|
+
"application/vnd.pmi.widget": ["wg"],
|
|
5207
|
+
"application/vnd.pocketlearn": ["plf"],
|
|
5208
|
+
"application/vnd.powerbuilder6": ["pbd"],
|
|
5209
|
+
"application/vnd.previewsystems.box": ["box"],
|
|
5210
|
+
"application/vnd.procrate.brushset": ["brushset"],
|
|
5211
|
+
"application/vnd.procreate.brush": ["brush"],
|
|
5212
|
+
"application/vnd.procreate.dream": ["drm"],
|
|
5213
|
+
"application/vnd.proteus.magazine": ["mgz"],
|
|
5214
|
+
"application/vnd.publishare-delta-tree": ["qps"],
|
|
5215
|
+
"application/vnd.pvi.ptid1": ["ptid"],
|
|
5216
|
+
"application/vnd.pwg-xhtml-print+xml": ["xhtm"],
|
|
5217
|
+
"application/vnd.quark.quarkxpress": [
|
|
5218
|
+
"qxd",
|
|
5219
|
+
"qxt",
|
|
5220
|
+
"qwd",
|
|
5221
|
+
"qwt",
|
|
5222
|
+
"qxl",
|
|
5223
|
+
"qxb"
|
|
5224
|
+
],
|
|
5225
|
+
"application/vnd.rar": ["rar"],
|
|
5226
|
+
"application/vnd.realvnc.bed": ["bed"],
|
|
5227
|
+
"application/vnd.recordare.musicxml": ["mxl"],
|
|
5228
|
+
"application/vnd.recordare.musicxml+xml": ["musicxml"],
|
|
5229
|
+
"application/vnd.rig.cryptonote": ["cryptonote"],
|
|
5230
|
+
"application/vnd.rim.cod": ["cod"],
|
|
5231
|
+
"application/vnd.rn-realmedia": ["rm"],
|
|
5232
|
+
"application/vnd.rn-realmedia-vbr": ["rmvb"],
|
|
5233
|
+
"application/vnd.route66.link66+xml": ["link66"],
|
|
5234
|
+
"application/vnd.sailingtracker.track": ["st"],
|
|
5235
|
+
"application/vnd.seemail": ["see"],
|
|
5236
|
+
"application/vnd.sema": ["sema"],
|
|
5237
|
+
"application/vnd.semd": ["semd"],
|
|
5238
|
+
"application/vnd.semf": ["semf"],
|
|
5239
|
+
"application/vnd.shana.informed.formdata": ["ifm"],
|
|
5240
|
+
"application/vnd.shana.informed.formtemplate": ["itp"],
|
|
5241
|
+
"application/vnd.shana.informed.interchange": ["iif"],
|
|
5242
|
+
"application/vnd.shana.informed.package": ["ipk"],
|
|
5243
|
+
"application/vnd.simtech-mindmapper": ["twd", "twds"],
|
|
5244
|
+
"application/vnd.smaf": ["mmf"],
|
|
5245
|
+
"application/vnd.smart.teacher": ["teacher"],
|
|
5246
|
+
"application/vnd.software602.filler.form+xml": ["fo"],
|
|
5247
|
+
"application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"],
|
|
5248
|
+
"application/vnd.spotfire.dxp": ["dxp"],
|
|
5249
|
+
"application/vnd.spotfire.sfs": ["sfs"],
|
|
5250
|
+
"application/vnd.stardivision.calc": ["sdc"],
|
|
5251
|
+
"application/vnd.stardivision.draw": ["sda"],
|
|
5252
|
+
"application/vnd.stardivision.impress": ["sdd"],
|
|
5253
|
+
"application/vnd.stardivision.math": ["smf"],
|
|
5254
|
+
"application/vnd.stardivision.writer": ["sdw", "vor"],
|
|
5255
|
+
"application/vnd.stardivision.writer-global": ["sgl"],
|
|
5256
|
+
"application/vnd.stepmania.package": ["smzip"],
|
|
5257
|
+
"application/vnd.stepmania.stepchart": ["sm"],
|
|
5258
|
+
"application/vnd.sun.wadl+xml": ["wadl"],
|
|
5259
|
+
"application/vnd.sun.xml.calc": ["sxc"],
|
|
5260
|
+
"application/vnd.sun.xml.calc.template": ["stc"],
|
|
5261
|
+
"application/vnd.sun.xml.draw": ["sxd"],
|
|
5262
|
+
"application/vnd.sun.xml.draw.template": ["std"],
|
|
5263
|
+
"application/vnd.sun.xml.impress": ["sxi"],
|
|
5264
|
+
"application/vnd.sun.xml.impress.template": ["sti"],
|
|
5265
|
+
"application/vnd.sun.xml.math": ["sxm"],
|
|
5266
|
+
"application/vnd.sun.xml.writer": ["sxw"],
|
|
5267
|
+
"application/vnd.sun.xml.writer.global": ["sxg"],
|
|
5268
|
+
"application/vnd.sun.xml.writer.template": ["stw"],
|
|
5269
|
+
"application/vnd.sus-calendar": ["sus", "susp"],
|
|
5270
|
+
"application/vnd.svd": ["svd"],
|
|
5271
|
+
"application/vnd.symbian.install": ["sis", "sisx"],
|
|
5272
|
+
"application/vnd.syncml+xml": ["xsm"],
|
|
5273
|
+
"application/vnd.syncml.dm+wbxml": ["bdm"],
|
|
5274
|
+
"application/vnd.syncml.dm+xml": ["xdm"],
|
|
5275
|
+
"application/vnd.syncml.dmddf+xml": ["ddf"],
|
|
5276
|
+
"application/vnd.tao.intent-module-archive": ["tao"],
|
|
5277
|
+
"application/vnd.tcpdump.pcap": [
|
|
5278
|
+
"pcap",
|
|
5279
|
+
"cap",
|
|
5280
|
+
"dmp"
|
|
5281
|
+
],
|
|
5282
|
+
"application/vnd.tmobile-livetv": ["tmo"],
|
|
5283
|
+
"application/vnd.trid.tpt": ["tpt"],
|
|
5284
|
+
"application/vnd.triscape.mxs": ["mxs"],
|
|
5285
|
+
"application/vnd.trueapp": ["tra"],
|
|
5286
|
+
"application/vnd.ufdl": ["ufd", "ufdl"],
|
|
5287
|
+
"application/vnd.uiq.theme": ["utz"],
|
|
5288
|
+
"application/vnd.umajin": ["umj"],
|
|
5289
|
+
"application/vnd.unity": ["unityweb"],
|
|
5290
|
+
"application/vnd.uoml+xml": ["uoml", "uo"],
|
|
5291
|
+
"application/vnd.vcx": ["vcx"],
|
|
5292
|
+
"application/vnd.visio": [
|
|
5293
|
+
"vsd",
|
|
5294
|
+
"vst",
|
|
5295
|
+
"vss",
|
|
5296
|
+
"vsw",
|
|
5297
|
+
"vsdx",
|
|
5298
|
+
"vtx"
|
|
5299
|
+
],
|
|
5300
|
+
"application/vnd.visionary": ["vis"],
|
|
5301
|
+
"application/vnd.vsf": ["vsf"],
|
|
5302
|
+
"application/vnd.wap.wbxml": ["wbxml"],
|
|
5303
|
+
"application/vnd.wap.wmlc": ["wmlc"],
|
|
5304
|
+
"application/vnd.wap.wmlscriptc": ["wmlsc"],
|
|
5305
|
+
"application/vnd.webturbo": ["wtb"],
|
|
5306
|
+
"application/vnd.wolfram.player": ["nbp"],
|
|
5307
|
+
"application/vnd.wordperfect": ["wpd"],
|
|
5308
|
+
"application/vnd.wqd": ["wqd"],
|
|
5309
|
+
"application/vnd.wt.stf": ["stf"],
|
|
5310
|
+
"application/vnd.xara": ["xar"],
|
|
5311
|
+
"application/vnd.xfdl": ["xfdl"],
|
|
5312
|
+
"application/vnd.yamaha.hv-dic": ["hvd"],
|
|
5313
|
+
"application/vnd.yamaha.hv-script": ["hvs"],
|
|
5314
|
+
"application/vnd.yamaha.hv-voice": ["hvp"],
|
|
5315
|
+
"application/vnd.yamaha.openscoreformat": ["osf"],
|
|
5316
|
+
"application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"],
|
|
5317
|
+
"application/vnd.yamaha.smaf-audio": ["saf"],
|
|
5318
|
+
"application/vnd.yamaha.smaf-phrase": ["spf"],
|
|
5319
|
+
"application/vnd.yellowriver-custom-menu": ["cmp"],
|
|
5320
|
+
"application/vnd.zul": ["zir", "zirz"],
|
|
5321
|
+
"application/vnd.zzazz.deck+xml": ["zaz"],
|
|
5322
|
+
"application/x-7z-compressed": ["7z"],
|
|
5323
|
+
"application/x-abiword": ["abw"],
|
|
5324
|
+
"application/x-ace-compressed": ["ace"],
|
|
5325
|
+
"application/x-apple-diskimage": ["*dmg"],
|
|
5326
|
+
"application/x-arj": ["arj"],
|
|
5327
|
+
"application/x-authorware-bin": [
|
|
5328
|
+
"aab",
|
|
5329
|
+
"x32",
|
|
5330
|
+
"u32",
|
|
5331
|
+
"vox"
|
|
5332
|
+
],
|
|
5333
|
+
"application/x-authorware-map": ["aam"],
|
|
5334
|
+
"application/x-authorware-seg": ["aas"],
|
|
5335
|
+
"application/x-bcpio": ["bcpio"],
|
|
5336
|
+
"application/x-bdoc": ["*bdoc"],
|
|
5337
|
+
"application/x-bittorrent": ["torrent"],
|
|
5338
|
+
"application/x-blender": ["blend"],
|
|
5339
|
+
"application/x-blorb": ["blb", "blorb"],
|
|
5340
|
+
"application/x-bzip": ["bz"],
|
|
5341
|
+
"application/x-bzip2": ["bz2", "boz"],
|
|
5342
|
+
"application/x-cbr": [
|
|
5343
|
+
"cbr",
|
|
5344
|
+
"cba",
|
|
5345
|
+
"cbt",
|
|
5346
|
+
"cbz",
|
|
5347
|
+
"cb7"
|
|
5348
|
+
],
|
|
5349
|
+
"application/x-cdlink": ["vcd"],
|
|
5350
|
+
"application/x-cfs-compressed": ["cfs"],
|
|
5351
|
+
"application/x-chat": ["chat"],
|
|
5352
|
+
"application/x-chess-pgn": ["pgn"],
|
|
5353
|
+
"application/x-chrome-extension": ["crx"],
|
|
5354
|
+
"application/x-cocoa": ["cco"],
|
|
5355
|
+
"application/x-compressed": ["*rar"],
|
|
5356
|
+
"application/x-conference": ["nsc"],
|
|
5357
|
+
"application/x-cpio": ["cpio"],
|
|
5358
|
+
"application/x-csh": ["csh"],
|
|
5359
|
+
"application/x-debian-package": ["*deb", "udeb"],
|
|
5360
|
+
"application/x-dgc-compressed": ["dgc"],
|
|
5361
|
+
"application/x-director": [
|
|
5362
|
+
"dir",
|
|
5363
|
+
"dcr",
|
|
5364
|
+
"dxr",
|
|
5365
|
+
"cst",
|
|
5366
|
+
"cct",
|
|
5367
|
+
"cxt",
|
|
5368
|
+
"w3d",
|
|
5369
|
+
"fgd",
|
|
5370
|
+
"swa"
|
|
5371
|
+
],
|
|
5372
|
+
"application/x-doom": ["wad"],
|
|
5373
|
+
"application/x-dtbncx+xml": ["ncx"],
|
|
5374
|
+
"application/x-dtbook+xml": ["dtb"],
|
|
5375
|
+
"application/x-dtbresource+xml": ["res"],
|
|
5376
|
+
"application/x-dvi": ["dvi"],
|
|
5377
|
+
"application/x-envoy": ["evy"],
|
|
5378
|
+
"application/x-eva": ["eva"],
|
|
5379
|
+
"application/x-font-bdf": ["bdf"],
|
|
5380
|
+
"application/x-font-ghostscript": ["gsf"],
|
|
5381
|
+
"application/x-font-linux-psf": ["psf"],
|
|
5382
|
+
"application/x-font-pcf": ["pcf"],
|
|
5383
|
+
"application/x-font-snf": ["snf"],
|
|
5384
|
+
"application/x-font-type1": [
|
|
5385
|
+
"pfa",
|
|
5386
|
+
"pfb",
|
|
5387
|
+
"pfm",
|
|
5388
|
+
"afm"
|
|
5389
|
+
],
|
|
5390
|
+
"application/x-freearc": ["arc"],
|
|
5391
|
+
"application/x-futuresplash": ["spl"],
|
|
5392
|
+
"application/x-gca-compressed": ["gca"],
|
|
5393
|
+
"application/x-glulx": ["ulx"],
|
|
5394
|
+
"application/x-gnumeric": ["gnumeric"],
|
|
5395
|
+
"application/x-gramps-xml": ["gramps"],
|
|
5396
|
+
"application/x-gtar": ["gtar"],
|
|
5397
|
+
"application/x-hdf": ["hdf"],
|
|
5398
|
+
"application/x-httpd-php": ["php"],
|
|
5399
|
+
"application/x-install-instructions": ["install"],
|
|
5400
|
+
"application/x-ipynb+json": ["ipynb"],
|
|
5401
|
+
"application/x-iso9660-image": ["*iso"],
|
|
5402
|
+
"application/x-iwork-keynote-sffkey": ["*key"],
|
|
5403
|
+
"application/x-iwork-numbers-sffnumbers": ["*numbers"],
|
|
5404
|
+
"application/x-iwork-pages-sffpages": ["*pages"],
|
|
5405
|
+
"application/x-java-archive-diff": ["jardiff"],
|
|
5406
|
+
"application/x-java-jnlp-file": ["jnlp"],
|
|
5407
|
+
"application/x-keepass2": ["kdbx"],
|
|
5408
|
+
"application/x-latex": ["latex"],
|
|
5409
|
+
"application/x-lua-bytecode": ["luac"],
|
|
5410
|
+
"application/x-lzh-compressed": ["lzh", "lha"],
|
|
5411
|
+
"application/x-makeself": ["run"],
|
|
5412
|
+
"application/x-mie": ["mie"],
|
|
5413
|
+
"application/x-mobipocket-ebook": ["*prc", "mobi"],
|
|
5414
|
+
"application/x-ms-application": ["application"],
|
|
5415
|
+
"application/x-ms-shortcut": ["lnk"],
|
|
5416
|
+
"application/x-ms-wmd": ["wmd"],
|
|
5417
|
+
"application/x-ms-wmz": ["wmz"],
|
|
5418
|
+
"application/x-ms-xbap": ["xbap"],
|
|
5419
|
+
"application/x-msaccess": ["mdb"],
|
|
5420
|
+
"application/x-msbinder": ["obd"],
|
|
5421
|
+
"application/x-mscardfile": ["crd"],
|
|
5422
|
+
"application/x-msclip": ["clp"],
|
|
5423
|
+
"application/x-msdos-program": ["*exe"],
|
|
5424
|
+
"application/x-msdownload": [
|
|
5425
|
+
"*exe",
|
|
5426
|
+
"*dll",
|
|
5427
|
+
"com",
|
|
5428
|
+
"bat",
|
|
5429
|
+
"*msi"
|
|
5430
|
+
],
|
|
5431
|
+
"application/x-msmediaview": [
|
|
5432
|
+
"mvb",
|
|
5433
|
+
"m13",
|
|
5434
|
+
"m14"
|
|
5435
|
+
],
|
|
5436
|
+
"application/x-msmetafile": [
|
|
5437
|
+
"*wmf",
|
|
5438
|
+
"*wmz",
|
|
5439
|
+
"*emf",
|
|
5440
|
+
"emz"
|
|
5441
|
+
],
|
|
5442
|
+
"application/x-msmoney": ["mny"],
|
|
5443
|
+
"application/x-mspublisher": ["pub"],
|
|
5444
|
+
"application/x-msschedule": ["scd"],
|
|
5445
|
+
"application/x-msterminal": ["trm"],
|
|
5446
|
+
"application/x-mswrite": ["wri"],
|
|
5447
|
+
"application/x-netcdf": ["nc", "cdf"],
|
|
5448
|
+
"application/x-ns-proxy-autoconfig": ["pac"],
|
|
5449
|
+
"application/x-nzb": ["nzb"],
|
|
5450
|
+
"application/x-perl": ["pl", "pm"],
|
|
5451
|
+
"application/x-pilot": ["*prc", "*pdb"],
|
|
5452
|
+
"application/x-pkcs12": ["p12", "pfx"],
|
|
5453
|
+
"application/x-pkcs7-certificates": ["p7b", "spc"],
|
|
5454
|
+
"application/x-pkcs7-certreqresp": ["p7r"],
|
|
5455
|
+
"application/x-rar-compressed": ["*rar"],
|
|
5456
|
+
"application/x-redhat-package-manager": ["rpm"],
|
|
5457
|
+
"application/x-research-info-systems": ["ris"],
|
|
5458
|
+
"application/x-sea": ["sea"],
|
|
5459
|
+
"application/x-sh": ["sh"],
|
|
5460
|
+
"application/x-shar": ["shar"],
|
|
5461
|
+
"application/x-shockwave-flash": ["swf"],
|
|
5462
|
+
"application/x-silverlight-app": ["xap"],
|
|
5463
|
+
"application/x-sql": ["*sql"],
|
|
5464
|
+
"application/x-stuffit": ["sit"],
|
|
5465
|
+
"application/x-stuffitx": ["sitx"],
|
|
5466
|
+
"application/x-subrip": ["srt"],
|
|
5467
|
+
"application/x-sv4cpio": ["sv4cpio"],
|
|
5468
|
+
"application/x-sv4crc": ["sv4crc"],
|
|
5469
|
+
"application/x-t3vm-image": ["t3"],
|
|
5470
|
+
"application/x-tads": ["gam"],
|
|
5471
|
+
"application/x-tar": ["tar"],
|
|
5472
|
+
"application/x-tcl": ["tcl", "tk"],
|
|
5473
|
+
"application/x-tex": ["tex"],
|
|
5474
|
+
"application/x-tex-tfm": ["tfm"],
|
|
5475
|
+
"application/x-texinfo": ["texinfo", "texi"],
|
|
5476
|
+
"application/x-tgif": ["*obj"],
|
|
5477
|
+
"application/x-ustar": ["ustar"],
|
|
5478
|
+
"application/x-virtualbox-hdd": ["hdd"],
|
|
5479
|
+
"application/x-virtualbox-ova": ["ova"],
|
|
5480
|
+
"application/x-virtualbox-ovf": ["ovf"],
|
|
5481
|
+
"application/x-virtualbox-vbox": ["vbox"],
|
|
5482
|
+
"application/x-virtualbox-vbox-extpack": ["vbox-extpack"],
|
|
5483
|
+
"application/x-virtualbox-vdi": ["vdi"],
|
|
5484
|
+
"application/x-virtualbox-vhd": ["vhd"],
|
|
5485
|
+
"application/x-virtualbox-vmdk": ["vmdk"],
|
|
5486
|
+
"application/x-wais-source": ["src"],
|
|
5487
|
+
"application/x-web-app-manifest+json": ["webapp"],
|
|
5488
|
+
"application/x-x509-ca-cert": [
|
|
5489
|
+
"der",
|
|
5490
|
+
"crt",
|
|
5491
|
+
"pem"
|
|
5492
|
+
],
|
|
5493
|
+
"application/x-xfig": ["fig"],
|
|
5494
|
+
"application/x-xliff+xml": ["*xlf"],
|
|
5495
|
+
"application/x-xpinstall": ["xpi"],
|
|
5496
|
+
"application/x-xz": ["xz"],
|
|
5497
|
+
"application/x-zip-compressed": ["*zip"],
|
|
5498
|
+
"application/x-zmachine": [
|
|
5499
|
+
"z1",
|
|
5500
|
+
"z2",
|
|
5501
|
+
"z3",
|
|
5502
|
+
"z4",
|
|
5503
|
+
"z5",
|
|
5504
|
+
"z6",
|
|
5505
|
+
"z7",
|
|
5506
|
+
"z8"
|
|
5507
|
+
],
|
|
5508
|
+
"audio/vnd.dece.audio": ["uva", "uvva"],
|
|
5509
|
+
"audio/vnd.digital-winds": ["eol"],
|
|
5510
|
+
"audio/vnd.dra": ["dra"],
|
|
5511
|
+
"audio/vnd.dts": ["dts"],
|
|
5512
|
+
"audio/vnd.dts.hd": ["dtshd"],
|
|
5513
|
+
"audio/vnd.lucent.voice": ["lvp"],
|
|
5514
|
+
"audio/vnd.ms-playready.media.pya": ["pya"],
|
|
5515
|
+
"audio/vnd.nuera.ecelp4800": ["ecelp4800"],
|
|
5516
|
+
"audio/vnd.nuera.ecelp7470": ["ecelp7470"],
|
|
5517
|
+
"audio/vnd.nuera.ecelp9600": ["ecelp9600"],
|
|
5518
|
+
"audio/vnd.rip": ["rip"],
|
|
5519
|
+
"audio/x-aac": ["*aac"],
|
|
5520
|
+
"audio/x-aiff": [
|
|
5521
|
+
"aif",
|
|
5522
|
+
"aiff",
|
|
5523
|
+
"aifc"
|
|
5524
|
+
],
|
|
5525
|
+
"audio/x-caf": ["caf"],
|
|
5526
|
+
"audio/x-flac": ["flac"],
|
|
5527
|
+
"audio/x-m4a": ["*m4a"],
|
|
5528
|
+
"audio/x-matroska": ["mka"],
|
|
5529
|
+
"audio/x-mpegurl": ["m3u"],
|
|
5530
|
+
"audio/x-ms-wax": ["wax"],
|
|
5531
|
+
"audio/x-ms-wma": ["wma"],
|
|
5532
|
+
"audio/x-pn-realaudio": ["ram", "ra"],
|
|
5533
|
+
"audio/x-pn-realaudio-plugin": ["rmp"],
|
|
5534
|
+
"audio/x-realaudio": ["*ra"],
|
|
5535
|
+
"audio/x-wav": ["*wav"],
|
|
5536
|
+
"chemical/x-cdx": ["cdx"],
|
|
5537
|
+
"chemical/x-cif": ["cif"],
|
|
5538
|
+
"chemical/x-cmdf": ["cmdf"],
|
|
5539
|
+
"chemical/x-cml": ["cml"],
|
|
5540
|
+
"chemical/x-csml": ["csml"],
|
|
5541
|
+
"chemical/x-xyz": ["xyz"],
|
|
5542
|
+
"image/prs.btif": ["btif", "btf"],
|
|
5543
|
+
"image/prs.pti": ["pti"],
|
|
5544
|
+
"image/vnd.adobe.photoshop": ["psd"],
|
|
5545
|
+
"image/vnd.airzip.accelerator.azv": ["azv"],
|
|
5546
|
+
"image/vnd.blockfact.facti": ["facti"],
|
|
5547
|
+
"image/vnd.dece.graphic": [
|
|
5548
|
+
"uvi",
|
|
5549
|
+
"uvvi",
|
|
5550
|
+
"uvg",
|
|
5551
|
+
"uvvg"
|
|
5552
|
+
],
|
|
5553
|
+
"image/vnd.djvu": ["djvu", "djv"],
|
|
5554
|
+
"image/vnd.dvb.subtitle": ["*sub"],
|
|
5555
|
+
"image/vnd.dwg": ["dwg"],
|
|
5556
|
+
"image/vnd.dxf": ["dxf"],
|
|
5557
|
+
"image/vnd.fastbidsheet": ["fbs"],
|
|
5558
|
+
"image/vnd.fpx": ["fpx"],
|
|
5559
|
+
"image/vnd.fst": ["fst"],
|
|
5560
|
+
"image/vnd.fujixerox.edmics-mmr": ["mmr"],
|
|
5561
|
+
"image/vnd.fujixerox.edmics-rlc": ["rlc"],
|
|
5562
|
+
"image/vnd.microsoft.icon": ["ico"],
|
|
5563
|
+
"image/vnd.ms-dds": ["dds"],
|
|
5564
|
+
"image/vnd.ms-modi": ["mdi"],
|
|
5565
|
+
"image/vnd.ms-photo": ["wdp"],
|
|
5566
|
+
"image/vnd.net-fpx": ["npx"],
|
|
5567
|
+
"image/vnd.pco.b16": ["b16"],
|
|
5568
|
+
"image/vnd.tencent.tap": ["tap"],
|
|
5569
|
+
"image/vnd.valve.source.texture": ["vtf"],
|
|
5570
|
+
"image/vnd.wap.wbmp": ["wbmp"],
|
|
5571
|
+
"image/vnd.xiff": ["xif"],
|
|
5572
|
+
"image/vnd.zbrush.pcx": ["pcx"],
|
|
5573
|
+
"image/x-3ds": ["3ds"],
|
|
5574
|
+
"image/x-adobe-dng": ["dng"],
|
|
5575
|
+
"image/x-cmu-raster": ["ras"],
|
|
5576
|
+
"image/x-cmx": ["cmx"],
|
|
5577
|
+
"image/x-freehand": [
|
|
5578
|
+
"fh",
|
|
5579
|
+
"fhc",
|
|
5580
|
+
"fh4",
|
|
5581
|
+
"fh5",
|
|
5582
|
+
"fh7"
|
|
5583
|
+
],
|
|
5584
|
+
"image/x-icon": ["*ico"],
|
|
5585
|
+
"image/x-jng": ["jng"],
|
|
5586
|
+
"image/x-mrsid-image": ["sid"],
|
|
5587
|
+
"image/x-ms-bmp": ["*bmp"],
|
|
5588
|
+
"image/x-pcx": ["*pcx"],
|
|
5589
|
+
"image/x-pict": ["pic", "pct"],
|
|
5590
|
+
"image/x-portable-anymap": ["pnm"],
|
|
5591
|
+
"image/x-portable-bitmap": ["pbm"],
|
|
5592
|
+
"image/x-portable-graymap": ["pgm"],
|
|
5593
|
+
"image/x-portable-pixmap": ["ppm"],
|
|
5594
|
+
"image/x-rgb": ["rgb"],
|
|
5595
|
+
"image/x-tga": ["tga"],
|
|
5596
|
+
"image/x-xbitmap": ["xbm"],
|
|
5597
|
+
"image/x-xpixmap": ["xpm"],
|
|
5598
|
+
"image/x-xwindowdump": ["xwd"],
|
|
5599
|
+
"message/vnd.wfa.wsc": ["wsc"],
|
|
5600
|
+
"model/vnd.bary": ["bary"],
|
|
5601
|
+
"model/vnd.cld": ["cld"],
|
|
5602
|
+
"model/vnd.collada+xml": ["dae"],
|
|
5603
|
+
"model/vnd.dwf": ["dwf"],
|
|
5604
|
+
"model/vnd.gdl": ["gdl"],
|
|
5605
|
+
"model/vnd.gtw": ["gtw"],
|
|
5606
|
+
"model/vnd.mts": ["*mts"],
|
|
5607
|
+
"model/vnd.opengex": ["ogex"],
|
|
5608
|
+
"model/vnd.parasolid.transmit.binary": ["x_b"],
|
|
5609
|
+
"model/vnd.parasolid.transmit.text": ["x_t"],
|
|
5610
|
+
"model/vnd.pytha.pyox": ["pyo", "pyox"],
|
|
5611
|
+
"model/vnd.sap.vds": ["vds"],
|
|
5612
|
+
"model/vnd.usda": ["usda"],
|
|
5613
|
+
"model/vnd.usdz+zip": ["usdz"],
|
|
5614
|
+
"model/vnd.valve.source.compiled-map": ["bsp"],
|
|
5615
|
+
"model/vnd.vtu": ["vtu"],
|
|
5616
|
+
"text/prs.lines.tag": ["dsc"],
|
|
5617
|
+
"text/vnd.curl": ["curl"],
|
|
5618
|
+
"text/vnd.curl.dcurl": ["dcurl"],
|
|
5619
|
+
"text/vnd.curl.mcurl": ["mcurl"],
|
|
5620
|
+
"text/vnd.curl.scurl": ["scurl"],
|
|
5621
|
+
"text/vnd.dvb.subtitle": ["sub"],
|
|
5622
|
+
"text/vnd.familysearch.gedcom": ["ged"],
|
|
5623
|
+
"text/vnd.fly": ["fly"],
|
|
5624
|
+
"text/vnd.fmi.flexstor": ["flx"],
|
|
5625
|
+
"text/vnd.graphviz": ["gv"],
|
|
5626
|
+
"text/vnd.in3d.3dml": ["3dml"],
|
|
5627
|
+
"text/vnd.in3d.spot": ["spot"],
|
|
5628
|
+
"text/vnd.sun.j2me.app-descriptor": ["jad"],
|
|
5629
|
+
"text/vnd.wap.wml": ["wml"],
|
|
5630
|
+
"text/vnd.wap.wmlscript": ["wmls"],
|
|
5631
|
+
"text/x-asm": ["s", "asm"],
|
|
5632
|
+
"text/x-c": [
|
|
5633
|
+
"c",
|
|
5634
|
+
"cc",
|
|
5635
|
+
"cxx",
|
|
5636
|
+
"cpp",
|
|
5637
|
+
"h",
|
|
5638
|
+
"hh",
|
|
5639
|
+
"dic"
|
|
5640
|
+
],
|
|
5641
|
+
"text/x-component": ["htc"],
|
|
5642
|
+
"text/x-fortran": [
|
|
5643
|
+
"f",
|
|
5644
|
+
"for",
|
|
5645
|
+
"f77",
|
|
5646
|
+
"f90"
|
|
5647
|
+
],
|
|
5648
|
+
"text/x-handlebars-template": ["hbs"],
|
|
5649
|
+
"text/x-java-source": ["java"],
|
|
5650
|
+
"text/x-lua": ["lua"],
|
|
5651
|
+
"text/x-markdown": ["mkd"],
|
|
5652
|
+
"text/x-nfo": ["nfo"],
|
|
5653
|
+
"text/x-opml": ["opml"],
|
|
5654
|
+
"text/x-org": ["*org"],
|
|
5655
|
+
"text/x-pascal": ["p", "pas"],
|
|
5656
|
+
"text/x-processing": ["pde"],
|
|
5657
|
+
"text/x-sass": ["sass"],
|
|
5658
|
+
"text/x-scss": ["scss"],
|
|
5659
|
+
"text/x-setext": ["etx"],
|
|
5660
|
+
"text/x-sfv": ["sfv"],
|
|
5661
|
+
"text/x-suse-ymp": ["ymp"],
|
|
5662
|
+
"text/x-uuencode": ["uu"],
|
|
5663
|
+
"text/x-vcalendar": ["vcs"],
|
|
5664
|
+
"text/x-vcard": ["vcf"],
|
|
5665
|
+
"video/vnd.dece.hd": ["uvh", "uvvh"],
|
|
5666
|
+
"video/vnd.dece.mobile": ["uvm", "uvvm"],
|
|
5667
|
+
"video/vnd.dece.pd": ["uvp", "uvvp"],
|
|
5668
|
+
"video/vnd.dece.sd": ["uvs", "uvvs"],
|
|
5669
|
+
"video/vnd.dece.video": ["uvv", "uvvv"],
|
|
5670
|
+
"video/vnd.dvb.file": ["dvb"],
|
|
5671
|
+
"video/vnd.fvt": ["fvt"],
|
|
5672
|
+
"video/vnd.mpegurl": ["mxu", "m4u"],
|
|
5673
|
+
"video/vnd.ms-playready.media.pyv": ["pyv"],
|
|
5674
|
+
"video/vnd.uvvu.mp4": ["uvu", "uvvu"],
|
|
5675
|
+
"video/vnd.vivo": ["viv"],
|
|
5676
|
+
"video/x-f4v": ["f4v"],
|
|
5677
|
+
"video/x-fli": ["fli"],
|
|
5678
|
+
"video/x-flv": ["flv"],
|
|
5679
|
+
"video/x-m4v": ["m4v"],
|
|
5680
|
+
"video/x-matroska": [
|
|
5681
|
+
"mkv",
|
|
5682
|
+
"mk3d",
|
|
5683
|
+
"mks"
|
|
5684
|
+
],
|
|
5685
|
+
"video/x-mng": ["mng"],
|
|
5686
|
+
"video/x-ms-asf": ["asf", "asx"],
|
|
5687
|
+
"video/x-ms-vob": ["vob"],
|
|
5688
|
+
"video/x-ms-wm": ["wm"],
|
|
5689
|
+
"video/x-ms-wmv": ["wmv"],
|
|
5690
|
+
"video/x-ms-wmx": ["wmx"],
|
|
5691
|
+
"video/x-ms-wvx": ["wvx"],
|
|
5692
|
+
"video/x-msvideo": ["avi"],
|
|
5693
|
+
"video/x-sgi-movie": ["movie"],
|
|
5694
|
+
"video/x-smv": ["smv"],
|
|
5695
|
+
"x-conference/x-cooltalk": ["ice"]
|
|
5696
|
+
};
|
|
5697
|
+
Object.freeze(types$1);
|
|
5698
|
+
//#endregion
|
|
5699
|
+
//#region ../../node_modules/.pnpm/mime@4.1.2/node_modules/mime/dist/types/standard.js
|
|
5700
|
+
const types = {
|
|
5701
|
+
"application/andrew-inset": ["ez"],
|
|
5702
|
+
"application/appinstaller": ["appinstaller"],
|
|
5703
|
+
"application/applixware": ["aw"],
|
|
5704
|
+
"application/appx": ["appx"],
|
|
5705
|
+
"application/appxbundle": ["appxbundle"],
|
|
5706
|
+
"application/atom+xml": ["atom"],
|
|
5707
|
+
"application/atomcat+xml": ["atomcat"],
|
|
5708
|
+
"application/atomdeleted+xml": ["atomdeleted"],
|
|
5709
|
+
"application/atomsvc+xml": ["atomsvc"],
|
|
5710
|
+
"application/atsc-dwd+xml": ["dwd"],
|
|
5711
|
+
"application/atsc-held+xml": ["held"],
|
|
5712
|
+
"application/atsc-rsat+xml": ["rsat"],
|
|
5713
|
+
"application/automationml-aml+xml": ["aml"],
|
|
5714
|
+
"application/automationml-amlx+zip": ["amlx"],
|
|
5715
|
+
"application/bdoc": ["bdoc"],
|
|
5716
|
+
"application/calendar+xml": ["xcs"],
|
|
5717
|
+
"application/ccxml+xml": ["ccxml"],
|
|
5718
|
+
"application/cdfx+xml": ["cdfx"],
|
|
5719
|
+
"application/cdmi-capability": ["cdmia"],
|
|
5720
|
+
"application/cdmi-container": ["cdmic"],
|
|
5721
|
+
"application/cdmi-domain": ["cdmid"],
|
|
5722
|
+
"application/cdmi-object": ["cdmio"],
|
|
5723
|
+
"application/cdmi-queue": ["cdmiq"],
|
|
5724
|
+
"application/cpl+xml": ["cpl"],
|
|
5725
|
+
"application/cu-seeme": ["cu"],
|
|
5726
|
+
"application/cwl": ["cwl"],
|
|
5727
|
+
"application/dash+xml": ["mpd"],
|
|
5728
|
+
"application/dash-patch+xml": ["mpp"],
|
|
5729
|
+
"application/davmount+xml": ["davmount"],
|
|
5730
|
+
"application/dicom": ["dcm"],
|
|
5731
|
+
"application/docbook+xml": ["dbk"],
|
|
5732
|
+
"application/dssc+der": ["dssc"],
|
|
5733
|
+
"application/dssc+xml": ["xdssc"],
|
|
5734
|
+
"application/ecmascript": ["ecma"],
|
|
5735
|
+
"application/emma+xml": ["emma"],
|
|
5736
|
+
"application/emotionml+xml": ["emotionml"],
|
|
5737
|
+
"application/epub+zip": ["epub"],
|
|
5738
|
+
"application/exi": ["exi"],
|
|
5739
|
+
"application/express": ["exp"],
|
|
5740
|
+
"application/fdf": ["fdf"],
|
|
5741
|
+
"application/fdt+xml": ["fdt"],
|
|
5742
|
+
"application/font-tdpfr": ["pfr"],
|
|
5743
|
+
"application/geo+json": ["geojson"],
|
|
5744
|
+
"application/gml+xml": ["gml"],
|
|
5745
|
+
"application/gpx+xml": ["gpx"],
|
|
5746
|
+
"application/gxf": ["gxf"],
|
|
5747
|
+
"application/gzip": ["gz"],
|
|
5748
|
+
"application/hjson": ["hjson"],
|
|
5749
|
+
"application/hyperstudio": ["stk"],
|
|
5750
|
+
"application/inkml+xml": ["ink", "inkml"],
|
|
5751
|
+
"application/ipfix": ["ipfix"],
|
|
5752
|
+
"application/its+xml": ["its"],
|
|
5753
|
+
"application/java-archive": [
|
|
5754
|
+
"jar",
|
|
5755
|
+
"war",
|
|
5756
|
+
"ear"
|
|
5757
|
+
],
|
|
5758
|
+
"application/java-serialized-object": ["ser"],
|
|
5759
|
+
"application/java-vm": ["class"],
|
|
5760
|
+
"application/javascript": ["*js"],
|
|
5761
|
+
"application/json": ["json", "map"],
|
|
5762
|
+
"application/json5": ["json5"],
|
|
5763
|
+
"application/jsonml+json": ["jsonml"],
|
|
5764
|
+
"application/ld+json": ["jsonld"],
|
|
5765
|
+
"application/lgr+xml": ["lgr"],
|
|
5766
|
+
"application/lost+xml": ["lostxml"],
|
|
5767
|
+
"application/mac-binhex40": ["hqx"],
|
|
5768
|
+
"application/mac-compactpro": ["cpt"],
|
|
5769
|
+
"application/mads+xml": ["mads"],
|
|
5770
|
+
"application/manifest+json": ["webmanifest"],
|
|
5771
|
+
"application/marc": ["mrc"],
|
|
5772
|
+
"application/marcxml+xml": ["mrcx"],
|
|
5773
|
+
"application/mathematica": [
|
|
5774
|
+
"ma",
|
|
5775
|
+
"nb",
|
|
5776
|
+
"mb"
|
|
5777
|
+
],
|
|
5778
|
+
"application/mathml+xml": ["mathml"],
|
|
5779
|
+
"application/mbox": ["mbox"],
|
|
5780
|
+
"application/media-policy-dataset+xml": ["mpf"],
|
|
5781
|
+
"application/mediaservercontrol+xml": ["mscml"],
|
|
5782
|
+
"application/metalink+xml": ["metalink"],
|
|
5783
|
+
"application/metalink4+xml": ["meta4"],
|
|
5784
|
+
"application/mets+xml": ["mets"],
|
|
5785
|
+
"application/mmt-aei+xml": ["maei"],
|
|
5786
|
+
"application/mmt-usd+xml": ["musd"],
|
|
5787
|
+
"application/mods+xml": ["mods"],
|
|
5788
|
+
"application/mp21": ["m21", "mp21"],
|
|
5789
|
+
"application/mp4": [
|
|
5790
|
+
"*mp4",
|
|
5791
|
+
"*mpg4",
|
|
5792
|
+
"mp4s",
|
|
5793
|
+
"m4p"
|
|
5794
|
+
],
|
|
5795
|
+
"application/msix": ["msix"],
|
|
5796
|
+
"application/msixbundle": ["msixbundle"],
|
|
5797
|
+
"application/msword": ["doc", "dot"],
|
|
5798
|
+
"application/mxf": ["mxf"],
|
|
5799
|
+
"application/n-quads": ["nq"],
|
|
5800
|
+
"application/n-triples": ["nt"],
|
|
5801
|
+
"application/node": ["cjs"],
|
|
5802
|
+
"application/octet-stream": [
|
|
5803
|
+
"bin",
|
|
5804
|
+
"dms",
|
|
5805
|
+
"lrf",
|
|
5806
|
+
"mar",
|
|
5807
|
+
"so",
|
|
5808
|
+
"dist",
|
|
5809
|
+
"distz",
|
|
5810
|
+
"pkg",
|
|
5811
|
+
"bpk",
|
|
5812
|
+
"dump",
|
|
5813
|
+
"elc",
|
|
5814
|
+
"deploy",
|
|
5815
|
+
"exe",
|
|
5816
|
+
"dll",
|
|
5817
|
+
"deb",
|
|
5818
|
+
"dmg",
|
|
5819
|
+
"iso",
|
|
5820
|
+
"img",
|
|
5821
|
+
"msi",
|
|
5822
|
+
"msp",
|
|
5823
|
+
"msm",
|
|
5824
|
+
"buffer"
|
|
5825
|
+
],
|
|
5826
|
+
"application/oda": ["oda"],
|
|
5827
|
+
"application/oebps-package+xml": ["opf"],
|
|
5828
|
+
"application/ogg": ["ogx"],
|
|
5829
|
+
"application/omdoc+xml": ["omdoc"],
|
|
5830
|
+
"application/onenote": [
|
|
5831
|
+
"onetoc",
|
|
5832
|
+
"onetoc2",
|
|
5833
|
+
"onetmp",
|
|
5834
|
+
"onepkg",
|
|
5835
|
+
"one",
|
|
5836
|
+
"onea"
|
|
5837
|
+
],
|
|
5838
|
+
"application/oxps": ["oxps"],
|
|
5839
|
+
"application/p2p-overlay+xml": ["relo"],
|
|
5840
|
+
"application/patch-ops-error+xml": ["xer"],
|
|
5841
|
+
"application/pdf": ["pdf"],
|
|
5842
|
+
"application/pgp-encrypted": ["pgp"],
|
|
5843
|
+
"application/pgp-keys": ["asc"],
|
|
5844
|
+
"application/pgp-signature": ["sig", "*asc"],
|
|
5845
|
+
"application/pics-rules": ["prf"],
|
|
5846
|
+
"application/pkcs10": ["p10"],
|
|
5847
|
+
"application/pkcs7-mime": ["p7m", "p7c"],
|
|
5848
|
+
"application/pkcs7-signature": ["p7s"],
|
|
5849
|
+
"application/pkcs8": ["p8"],
|
|
5850
|
+
"application/pkix-attr-cert": ["ac"],
|
|
5851
|
+
"application/pkix-cert": ["cer"],
|
|
5852
|
+
"application/pkix-crl": ["crl"],
|
|
5853
|
+
"application/pkix-pkipath": ["pkipath"],
|
|
5854
|
+
"application/pkixcmp": ["pki"],
|
|
5855
|
+
"application/pls+xml": ["pls"],
|
|
5856
|
+
"application/postscript": [
|
|
5857
|
+
"ai",
|
|
5858
|
+
"eps",
|
|
5859
|
+
"ps"
|
|
5860
|
+
],
|
|
5861
|
+
"application/provenance+xml": ["provx"],
|
|
5862
|
+
"application/pskc+xml": ["pskcxml"],
|
|
5863
|
+
"application/raml+yaml": ["raml"],
|
|
5864
|
+
"application/rdf+xml": ["rdf", "owl"],
|
|
5865
|
+
"application/reginfo+xml": ["rif"],
|
|
5866
|
+
"application/relax-ng-compact-syntax": ["rnc"],
|
|
5867
|
+
"application/resource-lists+xml": ["rl"],
|
|
5868
|
+
"application/resource-lists-diff+xml": ["rld"],
|
|
5869
|
+
"application/rls-services+xml": ["rs"],
|
|
5870
|
+
"application/route-apd+xml": ["rapd"],
|
|
5871
|
+
"application/route-s-tsid+xml": ["sls"],
|
|
5872
|
+
"application/route-usd+xml": ["rusd"],
|
|
5873
|
+
"application/rpki-ghostbusters": ["gbr"],
|
|
5874
|
+
"application/rpki-manifest": ["mft"],
|
|
5875
|
+
"application/rpki-roa": ["roa"],
|
|
5876
|
+
"application/rsd+xml": ["rsd"],
|
|
5877
|
+
"application/rss+xml": ["rss"],
|
|
5878
|
+
"application/rtf": ["rtf"],
|
|
5879
|
+
"application/sbml+xml": ["sbml"],
|
|
5880
|
+
"application/scvp-cv-request": ["scq"],
|
|
5881
|
+
"application/scvp-cv-response": ["scs"],
|
|
5882
|
+
"application/scvp-vp-request": ["spq"],
|
|
5883
|
+
"application/scvp-vp-response": ["spp"],
|
|
5884
|
+
"application/sdp": ["sdp"],
|
|
5885
|
+
"application/senml+xml": ["senmlx"],
|
|
5886
|
+
"application/sensml+xml": ["sensmlx"],
|
|
5887
|
+
"application/set-payment-initiation": ["setpay"],
|
|
5888
|
+
"application/set-registration-initiation": ["setreg"],
|
|
5889
|
+
"application/shf+xml": ["shf"],
|
|
5890
|
+
"application/sieve": ["siv", "sieve"],
|
|
5891
|
+
"application/smil+xml": ["smi", "smil"],
|
|
5892
|
+
"application/sparql-query": ["rq"],
|
|
5893
|
+
"application/sparql-results+xml": ["srx"],
|
|
5894
|
+
"application/sql": ["sql"],
|
|
5895
|
+
"application/srgs": ["gram"],
|
|
5896
|
+
"application/srgs+xml": ["grxml"],
|
|
5897
|
+
"application/sru+xml": ["sru"],
|
|
5898
|
+
"application/ssdl+xml": ["ssdl"],
|
|
5899
|
+
"application/ssml+xml": ["ssml"],
|
|
5900
|
+
"application/swid+xml": ["swidtag"],
|
|
5901
|
+
"application/tei+xml": ["tei", "teicorpus"],
|
|
5902
|
+
"application/thraud+xml": ["tfi"],
|
|
5903
|
+
"application/timestamped-data": ["tsd"],
|
|
5904
|
+
"application/toml": ["toml"],
|
|
5905
|
+
"application/trig": ["trig"],
|
|
5906
|
+
"application/ttml+xml": ["ttml"],
|
|
5907
|
+
"application/ubjson": ["ubj"],
|
|
5908
|
+
"application/urc-ressheet+xml": ["rsheet"],
|
|
5909
|
+
"application/urc-targetdesc+xml": ["td"],
|
|
5910
|
+
"application/voicexml+xml": ["vxml"],
|
|
5911
|
+
"application/wasm": ["wasm"],
|
|
5912
|
+
"application/watcherinfo+xml": ["wif"],
|
|
5913
|
+
"application/widget": ["wgt"],
|
|
5914
|
+
"application/winhlp": ["hlp"],
|
|
5915
|
+
"application/wsdl+xml": ["wsdl"],
|
|
5916
|
+
"application/wspolicy+xml": ["wspolicy"],
|
|
5917
|
+
"application/xaml+xml": ["xaml"],
|
|
5918
|
+
"application/xcap-att+xml": ["xav"],
|
|
5919
|
+
"application/xcap-caps+xml": ["xca"],
|
|
5920
|
+
"application/xcap-diff+xml": ["xdf"],
|
|
5921
|
+
"application/xcap-el+xml": ["xel"],
|
|
5922
|
+
"application/xcap-ns+xml": ["xns"],
|
|
5923
|
+
"application/xenc+xml": ["xenc"],
|
|
5924
|
+
"application/xfdf": ["xfdf"],
|
|
5925
|
+
"application/xhtml+xml": ["xhtml", "xht"],
|
|
5926
|
+
"application/xliff+xml": ["xlf"],
|
|
5927
|
+
"application/xml": [
|
|
5928
|
+
"xml",
|
|
5929
|
+
"xsl",
|
|
5930
|
+
"xsd",
|
|
5931
|
+
"rng"
|
|
5932
|
+
],
|
|
5933
|
+
"application/xml-dtd": ["dtd"],
|
|
5934
|
+
"application/xop+xml": ["xop"],
|
|
5935
|
+
"application/xproc+xml": ["xpl"],
|
|
5936
|
+
"application/xslt+xml": ["*xsl", "xslt"],
|
|
5937
|
+
"application/xspf+xml": ["xspf"],
|
|
5938
|
+
"application/xv+xml": [
|
|
5939
|
+
"mxml",
|
|
5940
|
+
"xhvml",
|
|
5941
|
+
"xvml",
|
|
5942
|
+
"xvm"
|
|
5943
|
+
],
|
|
5944
|
+
"application/yang": ["yang"],
|
|
5945
|
+
"application/yin+xml": ["yin"],
|
|
5946
|
+
"application/zip": ["zip"],
|
|
5947
|
+
"application/zip+dotlottie": ["lottie"],
|
|
5948
|
+
"audio/3gpp": ["*3gpp"],
|
|
5949
|
+
"audio/aac": ["adts", "aac"],
|
|
5950
|
+
"audio/adpcm": ["adp"],
|
|
5951
|
+
"audio/amr": ["amr"],
|
|
5952
|
+
"audio/basic": ["au", "snd"],
|
|
5953
|
+
"audio/midi": [
|
|
5954
|
+
"mid",
|
|
5955
|
+
"midi",
|
|
5956
|
+
"kar",
|
|
5957
|
+
"rmi"
|
|
5958
|
+
],
|
|
5959
|
+
"audio/mobile-xmf": ["mxmf"],
|
|
5960
|
+
"audio/mp3": ["*mp3"],
|
|
5961
|
+
"audio/mp4": [
|
|
5962
|
+
"m4a",
|
|
5963
|
+
"mp4a",
|
|
5964
|
+
"m4b"
|
|
5965
|
+
],
|
|
5966
|
+
"audio/mpeg": [
|
|
5967
|
+
"mpga",
|
|
5968
|
+
"mp2",
|
|
5969
|
+
"mp2a",
|
|
5970
|
+
"mp3",
|
|
5971
|
+
"m2a",
|
|
5972
|
+
"m3a"
|
|
5973
|
+
],
|
|
5974
|
+
"audio/ogg": [
|
|
5975
|
+
"oga",
|
|
5976
|
+
"ogg",
|
|
5977
|
+
"spx",
|
|
5978
|
+
"opus"
|
|
5979
|
+
],
|
|
5980
|
+
"audio/s3m": ["s3m"],
|
|
5981
|
+
"audio/silk": ["sil"],
|
|
5982
|
+
"audio/wav": ["wav"],
|
|
5983
|
+
"audio/wave": ["*wav"],
|
|
5984
|
+
"audio/webm": ["weba"],
|
|
5985
|
+
"audio/xm": ["xm"],
|
|
5986
|
+
"font/collection": ["ttc"],
|
|
5987
|
+
"font/otf": ["otf"],
|
|
5988
|
+
"font/ttf": ["ttf"],
|
|
5989
|
+
"font/woff": ["woff"],
|
|
5990
|
+
"font/woff2": ["woff2"],
|
|
5991
|
+
"image/aces": ["exr"],
|
|
5992
|
+
"image/apng": ["apng"],
|
|
5993
|
+
"image/avci": ["avci"],
|
|
5994
|
+
"image/avcs": ["avcs"],
|
|
5995
|
+
"image/avif": ["avif"],
|
|
5996
|
+
"image/bmp": ["bmp", "dib"],
|
|
5997
|
+
"image/cgm": ["cgm"],
|
|
5998
|
+
"image/dicom-rle": ["drle"],
|
|
5999
|
+
"image/dpx": ["dpx"],
|
|
6000
|
+
"image/emf": ["emf"],
|
|
6001
|
+
"image/fits": ["fits"],
|
|
6002
|
+
"image/g3fax": ["g3"],
|
|
6003
|
+
"image/gif": ["gif"],
|
|
6004
|
+
"image/heic": ["heic"],
|
|
6005
|
+
"image/heic-sequence": ["heics"],
|
|
6006
|
+
"image/heif": ["heif"],
|
|
6007
|
+
"image/heif-sequence": ["heifs"],
|
|
6008
|
+
"image/hej2k": ["hej2"],
|
|
6009
|
+
"image/ief": ["ief"],
|
|
6010
|
+
"image/jaii": ["jaii"],
|
|
6011
|
+
"image/jais": ["jais"],
|
|
6012
|
+
"image/jls": ["jls"],
|
|
6013
|
+
"image/jp2": ["jp2", "jpg2"],
|
|
6014
|
+
"image/jpeg": [
|
|
6015
|
+
"jpg",
|
|
6016
|
+
"jpeg",
|
|
6017
|
+
"jpe"
|
|
6018
|
+
],
|
|
6019
|
+
"image/jph": ["jph"],
|
|
6020
|
+
"image/jphc": ["jhc"],
|
|
6021
|
+
"image/jpm": ["jpm", "jpgm"],
|
|
6022
|
+
"image/jpx": ["jpx", "jpf"],
|
|
6023
|
+
"image/jxl": ["jxl"],
|
|
6024
|
+
"image/jxr": ["jxr"],
|
|
6025
|
+
"image/jxra": ["jxra"],
|
|
6026
|
+
"image/jxrs": ["jxrs"],
|
|
6027
|
+
"image/jxs": ["jxs"],
|
|
6028
|
+
"image/jxsc": ["jxsc"],
|
|
6029
|
+
"image/jxsi": ["jxsi"],
|
|
6030
|
+
"image/jxss": ["jxss"],
|
|
6031
|
+
"image/ktx": ["ktx"],
|
|
6032
|
+
"image/ktx2": ["ktx2"],
|
|
6033
|
+
"image/pjpeg": ["jfif"],
|
|
6034
|
+
"image/png": ["png"],
|
|
6035
|
+
"image/sgi": ["sgi"],
|
|
6036
|
+
"image/svg+xml": ["svg", "svgz"],
|
|
6037
|
+
"image/t38": ["t38"],
|
|
6038
|
+
"image/tiff": ["tif", "tiff"],
|
|
6039
|
+
"image/tiff-fx": ["tfx"],
|
|
6040
|
+
"image/webp": ["webp"],
|
|
6041
|
+
"image/wmf": ["wmf"],
|
|
6042
|
+
"message/disposition-notification": ["disposition-notification"],
|
|
6043
|
+
"message/global": ["u8msg"],
|
|
6044
|
+
"message/global-delivery-status": ["u8dsn"],
|
|
6045
|
+
"message/global-disposition-notification": ["u8mdn"],
|
|
6046
|
+
"message/global-headers": ["u8hdr"],
|
|
6047
|
+
"message/rfc822": [
|
|
6048
|
+
"eml",
|
|
6049
|
+
"mime",
|
|
6050
|
+
"mht",
|
|
6051
|
+
"mhtml"
|
|
6052
|
+
],
|
|
6053
|
+
"model/3mf": ["3mf"],
|
|
6054
|
+
"model/gltf+json": ["gltf"],
|
|
6055
|
+
"model/gltf-binary": ["glb"],
|
|
6056
|
+
"model/iges": ["igs", "iges"],
|
|
6057
|
+
"model/jt": ["jt"],
|
|
6058
|
+
"model/mesh": [
|
|
6059
|
+
"msh",
|
|
6060
|
+
"mesh",
|
|
6061
|
+
"silo"
|
|
6062
|
+
],
|
|
6063
|
+
"model/mtl": ["mtl"],
|
|
6064
|
+
"model/obj": ["obj"],
|
|
6065
|
+
"model/prc": ["prc"],
|
|
6066
|
+
"model/step": [
|
|
6067
|
+
"step",
|
|
6068
|
+
"stp",
|
|
6069
|
+
"stpnc",
|
|
6070
|
+
"p21",
|
|
6071
|
+
"210"
|
|
6072
|
+
],
|
|
6073
|
+
"model/step+xml": ["stpx"],
|
|
6074
|
+
"model/step+zip": ["stpz"],
|
|
6075
|
+
"model/step-xml+zip": ["stpxz"],
|
|
6076
|
+
"model/stl": ["stl"],
|
|
6077
|
+
"model/u3d": ["u3d"],
|
|
6078
|
+
"model/vrml": ["wrl", "vrml"],
|
|
6079
|
+
"model/x3d+binary": ["*x3db", "x3dbz"],
|
|
6080
|
+
"model/x3d+fastinfoset": ["x3db"],
|
|
6081
|
+
"model/x3d+vrml": ["*x3dv", "x3dvz"],
|
|
6082
|
+
"model/x3d+xml": ["x3d", "x3dz"],
|
|
6083
|
+
"model/x3d-vrml": ["x3dv"],
|
|
6084
|
+
"text/cache-manifest": ["appcache", "manifest"],
|
|
6085
|
+
"text/calendar": ["ics", "ifb"],
|
|
6086
|
+
"text/coffeescript": ["coffee", "litcoffee"],
|
|
6087
|
+
"text/css": ["css"],
|
|
6088
|
+
"text/csv": ["csv"],
|
|
6089
|
+
"text/html": [
|
|
6090
|
+
"html",
|
|
6091
|
+
"htm",
|
|
6092
|
+
"shtml"
|
|
6093
|
+
],
|
|
6094
|
+
"text/jade": ["jade"],
|
|
6095
|
+
"text/javascript": ["js", "mjs"],
|
|
6096
|
+
"text/jsx": ["jsx"],
|
|
6097
|
+
"text/less": ["less"],
|
|
6098
|
+
"text/markdown": ["md", "markdown"],
|
|
6099
|
+
"text/mathml": ["mml"],
|
|
6100
|
+
"text/mdx": ["mdx"],
|
|
6101
|
+
"text/n3": ["n3"],
|
|
6102
|
+
"text/plain": [
|
|
6103
|
+
"txt",
|
|
6104
|
+
"text",
|
|
6105
|
+
"conf",
|
|
6106
|
+
"def",
|
|
6107
|
+
"list",
|
|
6108
|
+
"log",
|
|
6109
|
+
"in",
|
|
6110
|
+
"ini"
|
|
6111
|
+
],
|
|
6112
|
+
"text/richtext": ["rtx"],
|
|
6113
|
+
"text/rtf": ["*rtf"],
|
|
6114
|
+
"text/sgml": ["sgml", "sgm"],
|
|
6115
|
+
"text/shex": ["shex"],
|
|
6116
|
+
"text/slim": ["slim", "slm"],
|
|
6117
|
+
"text/spdx": ["spdx"],
|
|
6118
|
+
"text/stylus": ["stylus", "styl"],
|
|
6119
|
+
"text/tab-separated-values": ["tsv"],
|
|
6120
|
+
"text/troff": [
|
|
6121
|
+
"t",
|
|
6122
|
+
"tr",
|
|
6123
|
+
"roff",
|
|
6124
|
+
"man",
|
|
6125
|
+
"me",
|
|
6126
|
+
"ms"
|
|
6127
|
+
],
|
|
6128
|
+
"text/turtle": ["ttl"],
|
|
6129
|
+
"text/uri-list": [
|
|
6130
|
+
"uri",
|
|
6131
|
+
"uris",
|
|
6132
|
+
"urls"
|
|
6133
|
+
],
|
|
6134
|
+
"text/vcard": ["vcard"],
|
|
6135
|
+
"text/vtt": ["vtt"],
|
|
6136
|
+
"text/wgsl": ["wgsl"],
|
|
6137
|
+
"text/xml": ["*xml"],
|
|
6138
|
+
"text/yaml": ["yaml", "yml"],
|
|
6139
|
+
"video/3gpp": ["3gp", "3gpp"],
|
|
6140
|
+
"video/3gpp2": ["3g2"],
|
|
6141
|
+
"video/h261": ["h261"],
|
|
6142
|
+
"video/h263": ["h263"],
|
|
6143
|
+
"video/h264": ["h264"],
|
|
6144
|
+
"video/iso.segment": ["m4s"],
|
|
6145
|
+
"video/jpeg": ["jpgv"],
|
|
6146
|
+
"video/jpm": ["*jpm", "*jpgm"],
|
|
6147
|
+
"video/mj2": ["mj2", "mjp2"],
|
|
6148
|
+
"video/mp2t": [
|
|
6149
|
+
"ts",
|
|
6150
|
+
"m2t",
|
|
6151
|
+
"m2ts",
|
|
6152
|
+
"mts"
|
|
6153
|
+
],
|
|
6154
|
+
"video/mp4": [
|
|
6155
|
+
"mp4",
|
|
6156
|
+
"mp4v",
|
|
6157
|
+
"mpg4"
|
|
6158
|
+
],
|
|
6159
|
+
"video/mpeg": [
|
|
6160
|
+
"mpeg",
|
|
6161
|
+
"mpg",
|
|
6162
|
+
"mpe",
|
|
6163
|
+
"m1v",
|
|
6164
|
+
"m2v"
|
|
6165
|
+
],
|
|
6166
|
+
"video/ogg": ["ogv"],
|
|
6167
|
+
"video/quicktime": ["qt", "mov"],
|
|
6168
|
+
"video/webm": ["webm"]
|
|
6169
|
+
};
|
|
6170
|
+
Object.freeze(types);
|
|
6171
|
+
//#endregion
|
|
6172
|
+
//#region ../../node_modules/.pnpm/mime@4.1.2/node_modules/mime/dist/src/Mime.js
|
|
6173
|
+
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
6174
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
6175
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
6176
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6177
|
+
};
|
|
6178
|
+
var _Mime_extensionToType, _Mime_typeToExtension, _Mime_typeToExtensions;
|
|
6179
|
+
var Mime = class {
|
|
6180
|
+
constructor(...args) {
|
|
6181
|
+
_Mime_extensionToType.set(this, /* @__PURE__ */ new Map());
|
|
6182
|
+
_Mime_typeToExtension.set(this, /* @__PURE__ */ new Map());
|
|
6183
|
+
_Mime_typeToExtensions.set(this, /* @__PURE__ */ new Map());
|
|
6184
|
+
for (const arg of args) this.define(arg);
|
|
6185
|
+
}
|
|
6186
|
+
define(typeMap, force = false) {
|
|
6187
|
+
for (let [type, extensions] of Object.entries(typeMap)) {
|
|
6188
|
+
type = type.toLowerCase();
|
|
6189
|
+
extensions = extensions.map((ext) => ext.toLowerCase());
|
|
6190
|
+
let allExtensions = __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type);
|
|
6191
|
+
if (!allExtensions) {
|
|
6192
|
+
allExtensions = /* @__PURE__ */ new Set();
|
|
6193
|
+
__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").set(type, allExtensions);
|
|
6194
|
+
}
|
|
6195
|
+
let first = true;
|
|
6196
|
+
for (let extension of extensions) {
|
|
6197
|
+
const starred = extension.startsWith("*");
|
|
6198
|
+
extension = starred ? extension.slice(1) : extension;
|
|
6199
|
+
allExtensions.add(extension);
|
|
6200
|
+
if (first) __classPrivateFieldGet(this, _Mime_typeToExtension, "f").set(type, extension);
|
|
6201
|
+
first = false;
|
|
6202
|
+
if (starred) continue;
|
|
6203
|
+
const currentType = __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(extension);
|
|
6204
|
+
if (currentType && currentType != type && !force) throw new Error(`"${type} -> ${extension}" conflicts with "${currentType} -> ${extension}". Pass \`force=true\` to override this definition.`);
|
|
6205
|
+
__classPrivateFieldGet(this, _Mime_extensionToType, "f").set(extension, type);
|
|
6206
|
+
}
|
|
6207
|
+
}
|
|
6208
|
+
return this;
|
|
6209
|
+
}
|
|
6210
|
+
getType(path) {
|
|
6211
|
+
if (typeof path !== "string") return null;
|
|
6212
|
+
const last = path.replace(/^.*[/\\]/s, "").toLowerCase();
|
|
6213
|
+
const ext = last.replace(/^.*\./s, "").toLowerCase();
|
|
6214
|
+
const hasPath = last.length < path.length;
|
|
6215
|
+
if (!(ext.length < last.length - 1) && hasPath) return null;
|
|
6216
|
+
return __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(ext) ?? null;
|
|
6217
|
+
}
|
|
6218
|
+
getExtension(type) {
|
|
6219
|
+
if (typeof type !== "string") return null;
|
|
6220
|
+
type = type?.split?.(";")[0];
|
|
6221
|
+
return (type && __classPrivateFieldGet(this, _Mime_typeToExtension, "f").get(type.trim().toLowerCase())) ?? null;
|
|
6222
|
+
}
|
|
6223
|
+
getAllExtensions(type) {
|
|
6224
|
+
if (typeof type !== "string") return null;
|
|
6225
|
+
type = type.split(";")[0].trim().toLowerCase();
|
|
6226
|
+
const extensions = __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type);
|
|
6227
|
+
return extensions ? new Set(extensions) : null;
|
|
6228
|
+
}
|
|
6229
|
+
_freeze() {
|
|
6230
|
+
this.define = () => {
|
|
6231
|
+
throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances");
|
|
6232
|
+
};
|
|
6233
|
+
Object.freeze(this);
|
|
6234
|
+
return this;
|
|
6235
|
+
}
|
|
6236
|
+
_getTestState() {
|
|
6237
|
+
return {
|
|
6238
|
+
types: __classPrivateFieldGet(this, _Mime_extensionToType, "f"),
|
|
6239
|
+
extensions: __classPrivateFieldGet(this, _Mime_typeToExtension, "f")
|
|
6240
|
+
};
|
|
6241
|
+
}
|
|
6242
|
+
};
|
|
6243
|
+
_Mime_extensionToType = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtension = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtensions = /* @__PURE__ */ new WeakMap();
|
|
6244
|
+
//#endregion
|
|
6245
|
+
//#region ../../node_modules/.pnpm/mime@4.1.2/node_modules/mime/dist/src/index.js
|
|
6246
|
+
var src_default = new Mime(types, types$1)._freeze();
|
|
6247
|
+
//#endregion
|
|
6248
|
+
//#region ../../packages/util/file-drag/lib/index.js
|
|
6249
|
+
/**
|
|
6250
|
+
* Resolve one platform-safe export filename. Explicit suffix wins; compatible suffixes survive.
|
|
6251
|
+
* A known conflicting suffix is replaced from MIME; unknown MIME never rejects a supplied name.
|
|
6252
|
+
* @param request - caller name, declared content type, and optional explicit suffix.
|
|
6253
|
+
* @returns cleaned filename, with MIME-derived suffix only when needed.
|
|
6254
|
+
*/
|
|
6255
|
+
function resolveDragFileName(request) {
|
|
6256
|
+
const { name = "file", mediaType, outputExtension } = request;
|
|
6257
|
+
let clean = name.replace(/[<>:"/\\|?*\x00-\x1f]/gu, "_").replace(/^[. ]+|[. ]+$/gu, "") || "file";
|
|
6258
|
+
const dot = clean.lastIndexOf(".");
|
|
6259
|
+
const suffix = dot < 0 ? "" : clean.slice(dot + 1);
|
|
6260
|
+
const declared = mediaType.replace(/;.*$/su, "").trim().toLowerCase();
|
|
6261
|
+
const preferred = src_default.getExtension(declared);
|
|
6262
|
+
const explicit = outputExtension?.replace(/^\./u, "").replace(/[^a-z\d_-]/giu, "");
|
|
6263
|
+
const compatible = src_default.getAllExtensions(declared)?.has(suffix.toLowerCase()) === true;
|
|
6264
|
+
const extension = explicit || (suffix === "" || preferred !== null && !compatible ? preferred : suffix);
|
|
6265
|
+
if (extension) clean = `${dot < 0 ? clean : clean.slice(0, dot)}.${extension}`;
|
|
6266
|
+
if (/^(con|prn|aux|nul|com[1-9¹²³]|lpt[1-9¹²³])(?:\.|$)/iu.test(clean)) clean = `_${clean}`;
|
|
6267
|
+
const finalDot = clean.lastIndexOf(".");
|
|
6268
|
+
const tail = finalDot < 0 ? "" : clean.slice(finalDot);
|
|
6269
|
+
const encoder = new TextEncoder();
|
|
6270
|
+
const truncate = (value, bytes) => {
|
|
6271
|
+
let result = "";
|
|
6272
|
+
for (const character of value) {
|
|
6273
|
+
const length = encoder.encode(character).length;
|
|
6274
|
+
if (length > bytes) break;
|
|
6275
|
+
result += character;
|
|
6276
|
+
bytes -= length;
|
|
6277
|
+
}
|
|
6278
|
+
return result;
|
|
6279
|
+
};
|
|
6280
|
+
const extensionTail = truncate(tail, 32);
|
|
6281
|
+
return `${truncate(finalDot < 0 ? clean : clean.slice(0, finalDot), 255 - encoder.encode(extensionTail).length)}${extensionTail}`;
|
|
6282
|
+
}
|
|
6283
|
+
//#endregion
|
|
4320
6284
|
//#region lib/types/ipc.js
|
|
4321
6285
|
/** Typed preload operations exposed only by the Electron shell. */
|
|
4322
6286
|
/** IPC channel names kept private to the desktop application bundle. */
|
|
4323
6287
|
const DESKTOP_IPC = {
|
|
6288
|
+
fileSave: "qilin-desktop:file-save",
|
|
6289
|
+
clipboardImageRead: "qilin-desktop:clipboard-image-read",
|
|
4324
6290
|
shortcutsInput: "qilin-desktop:shortcuts-input",
|
|
4325
6291
|
shortcutsCloseWindow: "qilin-desktop:shortcuts-close-window",
|
|
4326
6292
|
shortcutsGet: "qilin-desktop:shortcuts-get",
|
|
@@ -4361,6 +6327,242 @@ function assertDesktopSender(event, hostnames) {
|
|
|
4361
6327
|
if (url.protocol !== `qilin-app:` || !hostnames.includes(url.hostname)) throw new Error("qilin desktop: rejected IPC from an unowned renderer");
|
|
4362
6328
|
}
|
|
4363
6329
|
//#endregion
|
|
6330
|
+
//#region lib/types/duration-env.js
|
|
6331
|
+
/** Millisecond settings read from the Desktop process environment. */
|
|
6332
|
+
/**
|
|
6333
|
+
* Read a duration that `setTimeout` accepts without clamping.
|
|
6334
|
+
* @param env - Desktop process environment.
|
|
6335
|
+
* @param name - Variable to read; the validation error names it.
|
|
6336
|
+
* @param fallback - Value used when the variable is unset.
|
|
6337
|
+
* @returns Integer milliseconds from 1000 through 2147483647.
|
|
6338
|
+
*/
|
|
6339
|
+
function resolveDurationMs(env, name, fallback) {
|
|
6340
|
+
const value = Number(env[name] ?? fallback);
|
|
6341
|
+
if (!Number.isSafeInteger(value) || value < 1e3 || value > 2147483647) throw new Error(`${name} must be an integer from 1000 through 2147483647`);
|
|
6342
|
+
return value;
|
|
6343
|
+
}
|
|
6344
|
+
//#endregion
|
|
6345
|
+
//#region lib/types/file-actions.js
|
|
6346
|
+
/** Trusted-window Chromium downloads and clipboard fallback reads. */
|
|
6347
|
+
/** Download identity carried in the request fragment; Chromium preserves it in the URL chain. */
|
|
6348
|
+
const DOWNLOAD_MARKER = "qilin-download";
|
|
6349
|
+
/** @param value - untrusted IPC input. @returns captured URL and destination policy. */
|
|
6350
|
+
function saveRequest(value) {
|
|
6351
|
+
if (typeof value !== "object" || value === null || !("url" in value) || typeof value.url !== "string" || "name" in value && typeof value.name !== "string" || "mediaType" in value && typeof value.mediaType !== "string" || !("mode" in value) || value.mode !== "download" && value.mode !== "saveAs") throw new Error("Invalid file save request");
|
|
6352
|
+
const url = new URL(value.url);
|
|
6353
|
+
if (![
|
|
6354
|
+
"https:",
|
|
6355
|
+
"http:",
|
|
6356
|
+
"blob:",
|
|
6357
|
+
"data:"
|
|
6358
|
+
].includes(url.protocol) || url.username || url.password) throw new Error("Unsupported file source");
|
|
6359
|
+
return {
|
|
6360
|
+
url,
|
|
6361
|
+
mode: value.mode,
|
|
6362
|
+
..."name" in value ? { name: value.name } : {},
|
|
6363
|
+
..."mediaType" in value ? { mediaType: value.mediaType } : {}
|
|
6364
|
+
};
|
|
6365
|
+
}
|
|
6366
|
+
/**
|
|
6367
|
+
* Install trusted-window original-file operations.
|
|
6368
|
+
* @param assertOwner - rejects shell pages, subframes, and unowned windows.
|
|
6369
|
+
* @param hostUrl - current application Host excluded from image reads.
|
|
6370
|
+
*/
|
|
6371
|
+
function installFileActions(assertOwner, hostUrl = () => void 0) {
|
|
6372
|
+
const timeoutMs = resolveDurationMs(process.env, "QILIN_DESKTOP_IMAGE_READ_TIMEOUT_MS", 3e4);
|
|
6373
|
+
const maxBytes = Number(process.env.QILIN_DESKTOP_IMAGE_READ_MAX_BYTES ?? 64 * 1024 * 1024);
|
|
6374
|
+
if (!Number.isSafeInteger(maxBytes) || maxBytes < 1) throw new Error("QILIN_DESKTOP_IMAGE_READ_MAX_BYTES must be a positive integer");
|
|
6375
|
+
const pending = /* @__PURE__ */ new Map();
|
|
6376
|
+
session.defaultSession.on("will-download", (_event, item, contents) => {
|
|
6377
|
+
const url = item.getURLChain()[0];
|
|
6378
|
+
if (url === void 0 || !new URL(url).hash.startsWith(`#${DOWNLOAD_MARKER}=`)) return;
|
|
6379
|
+
const entry = pending.get(url);
|
|
6380
|
+
if (entry === void 0 || entry.owner.webContents !== contents) {
|
|
6381
|
+
item.cancel();
|
|
6382
|
+
return;
|
|
6383
|
+
}
|
|
6384
|
+
entry.started();
|
|
6385
|
+
entry.item = item;
|
|
6386
|
+
let reserved;
|
|
6387
|
+
try {
|
|
6388
|
+
assertOwner(entry.event);
|
|
6389
|
+
const name = resolveDragFileName({
|
|
6390
|
+
name: entry.request.name ?? item.getFilename(),
|
|
6391
|
+
mediaType: item.getMimeType() || entry.request.mediaType || ""
|
|
6392
|
+
});
|
|
6393
|
+
let destination = join(app.getPath("downloads"), name);
|
|
6394
|
+
if (entry.request.mode === "saveAs") item.setSaveDialogOptions({
|
|
6395
|
+
defaultPath: destination,
|
|
6396
|
+
properties: ["showOverwriteConfirmation", "createDirectory"]
|
|
6397
|
+
});
|
|
6398
|
+
else {
|
|
6399
|
+
const extension = extname(destination);
|
|
6400
|
+
const stem = destination.slice(0, destination.length - extension.length);
|
|
6401
|
+
for (let index = 0;; index++) {
|
|
6402
|
+
destination = index === 0 ? `${stem}${extension}` : `${stem} (${index})${extension}`;
|
|
6403
|
+
try {
|
|
6404
|
+
closeSync(openSync(destination, "wx"));
|
|
6405
|
+
break;
|
|
6406
|
+
} catch (error) {
|
|
6407
|
+
if (typeof error === "object" && error !== null && "code" in error && error.code === "EEXIST") continue;
|
|
6408
|
+
throw error;
|
|
6409
|
+
}
|
|
6410
|
+
}
|
|
6411
|
+
reserved = destination;
|
|
6412
|
+
item.setSavePath(destination);
|
|
6413
|
+
}
|
|
6414
|
+
item.once("done", (_doneEvent, state) => {
|
|
6415
|
+
try {
|
|
6416
|
+
if (state !== "completed") {
|
|
6417
|
+
if (reserved !== void 0) rmSync(reserved, { force: true });
|
|
6418
|
+
entry.finish(state === "cancelled" ? { status: "cancelled" } : /* @__PURE__ */ new Error("File download interrupted"));
|
|
6419
|
+
return;
|
|
6420
|
+
}
|
|
6421
|
+
if (!pending.has(url)) return;
|
|
6422
|
+
assertOwner(entry.event);
|
|
6423
|
+
entry.finish({
|
|
6424
|
+
status: "saved",
|
|
6425
|
+
path: item.getSavePath()
|
|
6426
|
+
});
|
|
6427
|
+
} catch (error) {
|
|
6428
|
+
entry.finish(error instanceof Error ? error : /* @__PURE__ */ new Error("File download unavailable"));
|
|
6429
|
+
}
|
|
6430
|
+
});
|
|
6431
|
+
} catch (error) {
|
|
6432
|
+
item.cancel();
|
|
6433
|
+
try {
|
|
6434
|
+
if (reserved !== void 0) rmSync(reserved, { force: true });
|
|
6435
|
+
} catch (cleanupError) {
|
|
6436
|
+
entry.finish(new AggregateError([error, cleanupError], "File download failed and its partial file could not be removed"));
|
|
6437
|
+
return;
|
|
6438
|
+
}
|
|
6439
|
+
entry.finish(error instanceof Error ? error : /* @__PURE__ */ new Error("File download unavailable"));
|
|
6440
|
+
}
|
|
6441
|
+
});
|
|
6442
|
+
const downloadTimeoutMs = resolveDurationMs(process.env, "QILIN_DESKTOP_FILE_DOWNLOAD_TIMEOUT_MS", 3e5);
|
|
6443
|
+
ipcMain.handle(DESKTOP_IPC.fileSave, (event, value) => {
|
|
6444
|
+
const owner = assertOwner(event);
|
|
6445
|
+
const request = saveRequest(value);
|
|
6446
|
+
request.url.hash = `${DOWNLOAD_MARKER}=${randomUUID()}`;
|
|
6447
|
+
const url = request.url.href;
|
|
6448
|
+
return new Promise((resolve, reject) => {
|
|
6449
|
+
const contents = owner.webContents;
|
|
6450
|
+
const finish = (result) => {
|
|
6451
|
+
if (!pending.delete(url)) return;
|
|
6452
|
+
clearTimeout(timer);
|
|
6453
|
+
owner.removeListener("closed", cancel);
|
|
6454
|
+
contents.removeListener("did-start-navigation", navigate);
|
|
6455
|
+
if (result instanceof Error) reject(result);
|
|
6456
|
+
else resolve(result);
|
|
6457
|
+
};
|
|
6458
|
+
const cancel = () => {
|
|
6459
|
+
const item = pending.get(url)?.item;
|
|
6460
|
+
finish({ status: "cancelled" });
|
|
6461
|
+
item?.cancel();
|
|
6462
|
+
};
|
|
6463
|
+
const navigate = (_event, _url, inPlace, mainFrame) => {
|
|
6464
|
+
if (mainFrame && !inPlace) cancel();
|
|
6465
|
+
};
|
|
6466
|
+
const timer = setTimeout(() => {
|
|
6467
|
+
const item = pending.get(url)?.item;
|
|
6468
|
+
finish(/* @__PURE__ */ new Error("File download timed out"));
|
|
6469
|
+
item?.cancel();
|
|
6470
|
+
}, downloadTimeoutMs);
|
|
6471
|
+
pending.set(url, {
|
|
6472
|
+
event,
|
|
6473
|
+
owner,
|
|
6474
|
+
request,
|
|
6475
|
+
finish,
|
|
6476
|
+
started: () => {
|
|
6477
|
+
clearTimeout(timer);
|
|
6478
|
+
}
|
|
6479
|
+
});
|
|
6480
|
+
owner.once("closed", cancel);
|
|
6481
|
+
contents.on("did-start-navigation", navigate);
|
|
6482
|
+
try {
|
|
6483
|
+
contents.downloadURL(url);
|
|
6484
|
+
} catch (error) {
|
|
6485
|
+
finish(error instanceof Error ? error : /* @__PURE__ */ new Error("File download unavailable"));
|
|
6486
|
+
}
|
|
6487
|
+
});
|
|
6488
|
+
});
|
|
6489
|
+
ipcMain.handle(DESKTOP_IPC.clipboardImageRead, async (event, value) => {
|
|
6490
|
+
const owner = assertOwner(event);
|
|
6491
|
+
if (typeof value !== "string") throw new Error("Invalid image URL");
|
|
6492
|
+
const checkedUrl = (input) => {
|
|
6493
|
+
const url = new URL(input);
|
|
6494
|
+
const host = hostUrl();
|
|
6495
|
+
const application = host === void 0 ? void 0 : new URL(host);
|
|
6496
|
+
if (!["https:", "http:"].includes(url.protocol) || url.username || url.password || application !== void 0 && url.port === application.port && (url.hostname === application.hostname || [
|
|
6497
|
+
"localhost",
|
|
6498
|
+
"127.0.0.1",
|
|
6499
|
+
"[::1]"
|
|
6500
|
+
].includes(url.hostname))) throw new Error("Invalid image URL");
|
|
6501
|
+
return url;
|
|
6502
|
+
};
|
|
6503
|
+
let url = checkedUrl(value);
|
|
6504
|
+
const contents = owner.webContents;
|
|
6505
|
+
const lifetime = new AbortController();
|
|
6506
|
+
const abort = () => {
|
|
6507
|
+
lifetime.abort();
|
|
6508
|
+
};
|
|
6509
|
+
owner.once("closed", abort);
|
|
6510
|
+
const navigate = (_event, _url, inPlace, mainFrame) => {
|
|
6511
|
+
if (mainFrame && !inPlace) abort();
|
|
6512
|
+
};
|
|
6513
|
+
contents.on("did-start-navigation", navigate);
|
|
6514
|
+
try {
|
|
6515
|
+
const signal = AbortSignal.any([lifetime.signal, AbortSignal.timeout(timeoutMs)]);
|
|
6516
|
+
let response;
|
|
6517
|
+
for (let redirects = 0;; redirects++) {
|
|
6518
|
+
response = await fetch(url, {
|
|
6519
|
+
signal,
|
|
6520
|
+
redirect: "manual",
|
|
6521
|
+
credentials: "omit",
|
|
6522
|
+
referrerPolicy: "no-referrer"
|
|
6523
|
+
});
|
|
6524
|
+
if (![
|
|
6525
|
+
301,
|
|
6526
|
+
302,
|
|
6527
|
+
303,
|
|
6528
|
+
307,
|
|
6529
|
+
308
|
|
6530
|
+
].includes(response.status)) break;
|
|
6531
|
+
await response.body?.cancel();
|
|
6532
|
+
const location = response.headers.get("location");
|
|
6533
|
+
if (redirects >= 20 || location === null) throw new Error("Invalid image redirect");
|
|
6534
|
+
url = checkedUrl(new URL(location, url).href);
|
|
6535
|
+
}
|
|
6536
|
+
if (!response.ok) throw new Error("Original image unavailable");
|
|
6537
|
+
const reader = response.body?.getReader();
|
|
6538
|
+
if (reader === void 0) throw new Error("Original image unavailable");
|
|
6539
|
+
const chunks = [];
|
|
6540
|
+
let size = 0;
|
|
6541
|
+
try {
|
|
6542
|
+
for (;;) {
|
|
6543
|
+
const chunk = await reader.read();
|
|
6544
|
+
if (chunk.done) break;
|
|
6545
|
+
size += chunk.value.byteLength;
|
|
6546
|
+
if (size > maxBytes) throw new Error("Original image exceeds the download limit");
|
|
6547
|
+
chunks.push(chunk.value);
|
|
6548
|
+
}
|
|
6549
|
+
} finally {
|
|
6550
|
+
await reader.cancel();
|
|
6551
|
+
reader.releaseLock();
|
|
6552
|
+
}
|
|
6553
|
+
assertOwner(event);
|
|
6554
|
+
lifetime.signal.throwIfAborted();
|
|
6555
|
+
return {
|
|
6556
|
+
bytes: new Uint8Array(Buffer.concat(chunks)),
|
|
6557
|
+
mediaType: response.headers.get("content-type") ?? ""
|
|
6558
|
+
};
|
|
6559
|
+
} finally {
|
|
6560
|
+
owner.removeListener("closed", abort);
|
|
6561
|
+
contents.removeListener("did-start-navigation", navigate);
|
|
6562
|
+
}
|
|
6563
|
+
});
|
|
6564
|
+
}
|
|
6565
|
+
//#endregion
|
|
4364
6566
|
//#region lib/types/directory-picker.js
|
|
4365
6567
|
/** Window-owned workspace directory dialogs for the local Desktop renderer. */
|
|
4366
6568
|
/**
|
|
@@ -4732,6 +6934,29 @@ const en = {
|
|
|
4732
6934
|
checkUpdatesMenu: "Check for Updates…",
|
|
4733
6935
|
reloadPageMenu: "Reload Page",
|
|
4734
6936
|
restartAppHostMenu: "Restart App and Host",
|
|
6937
|
+
settingsMenu: "Settings…",
|
|
6938
|
+
newSessionMenu: "New Session",
|
|
6939
|
+
searchSessionsMenu: "Search Sessions…",
|
|
6940
|
+
addWorkspaceMenu: "Add Workspace…",
|
|
6941
|
+
closeWindowMenu: "Close Window",
|
|
6942
|
+
viewMenu: "View",
|
|
6943
|
+
windowMenu: "Window",
|
|
6944
|
+
minimizeMenu: "Minimize",
|
|
6945
|
+
zoomWindowMenu: "Zoom",
|
|
6946
|
+
bringAllToFrontMenu: "Bring All to Front",
|
|
6947
|
+
servicesMenu: "Services",
|
|
6948
|
+
helpMenu: "Help",
|
|
6949
|
+
toggleLeftSidebarMenu: "Show or Hide Left Sidebar",
|
|
6950
|
+
toggleRightSidebarMenu: "Show or Hide Right Sidebar",
|
|
6951
|
+
resetZoomMenu: "Actual Size",
|
|
6952
|
+
zoomInMenu: "Zoom In",
|
|
6953
|
+
zoomOutMenu: "Zoom Out",
|
|
6954
|
+
toggleFullScreenMenu: "Toggle Full Screen",
|
|
6955
|
+
forceReloadMenu: "Force Reload",
|
|
6956
|
+
toggleDevToolsMenu: "Toggle Developer Tools",
|
|
6957
|
+
developerMenu: "Developer",
|
|
6958
|
+
projectHomeMenu: "QiLin Project Home",
|
|
6959
|
+
reportIssueMenu: "Report an Issue",
|
|
4735
6960
|
updateCheckFailedTitle: "Update Check Failed",
|
|
4736
6961
|
updateCheckFailed: "Could not check for updates. Please try again later.",
|
|
4737
6962
|
updateDownloadFailed: "Could not download the update. Please try again.",
|
|
@@ -4919,6 +7144,29 @@ const zh = {
|
|
|
4919
7144
|
checkUpdatesMenu: "检查更新…",
|
|
4920
7145
|
reloadPageMenu: "刷新页面",
|
|
4921
7146
|
restartAppHostMenu: "重启应用与 Host",
|
|
7147
|
+
settingsMenu: "设置…",
|
|
7148
|
+
newSessionMenu: "新建会话",
|
|
7149
|
+
searchSessionsMenu: "搜索会话…",
|
|
7150
|
+
addWorkspaceMenu: "添加工作区…",
|
|
7151
|
+
closeWindowMenu: "关闭窗口",
|
|
7152
|
+
viewMenu: "视图",
|
|
7153
|
+
windowMenu: "窗口",
|
|
7154
|
+
minimizeMenu: "最小化",
|
|
7155
|
+
zoomWindowMenu: "缩放",
|
|
7156
|
+
bringAllToFrontMenu: "前置全部窗口",
|
|
7157
|
+
servicesMenu: "服务",
|
|
7158
|
+
helpMenu: "帮助",
|
|
7159
|
+
toggleLeftSidebarMenu: "显示或隐藏左侧栏",
|
|
7160
|
+
toggleRightSidebarMenu: "显示或隐藏右侧栏",
|
|
7161
|
+
resetZoomMenu: "实际大小",
|
|
7162
|
+
zoomInMenu: "放大",
|
|
7163
|
+
zoomOutMenu: "缩小",
|
|
7164
|
+
toggleFullScreenMenu: "切换全屏",
|
|
7165
|
+
forceReloadMenu: "强制重新加载",
|
|
7166
|
+
toggleDevToolsMenu: "开发者工具",
|
|
7167
|
+
developerMenu: "开发者",
|
|
7168
|
+
projectHomeMenu: "QiLin 项目主页",
|
|
7169
|
+
reportIssueMenu: "报告问题",
|
|
4922
7170
|
updateCheckFailedTitle: "更新检查失败",
|
|
4923
7171
|
updateCheckFailed: "检查更新失败,请稍后重试。",
|
|
4924
7172
|
updateDownloadFailed: "下载更新失败,请重试。",
|
|
@@ -6036,8 +8284,8 @@ function needsWelcome(authentication) {
|
|
|
6036
8284
|
*/
|
|
6037
8285
|
function welcomeWindowOptions(platform, locale) {
|
|
6038
8286
|
return {
|
|
6039
|
-
width:
|
|
6040
|
-
height:
|
|
8287
|
+
width: 880,
|
|
8288
|
+
height: 560,
|
|
6041
8289
|
useContentSize: true,
|
|
6042
8290
|
center: true,
|
|
6043
8291
|
resizable: false,
|
|
@@ -6049,7 +8297,7 @@ function welcomeWindowOptions(platform, locale) {
|
|
|
6049
8297
|
...platform === "darwin" ? {
|
|
6050
8298
|
titleBarStyle: "hidden",
|
|
6051
8299
|
trafficLightPosition: {
|
|
6052
|
-
x:
|
|
8300
|
+
x: 341,
|
|
6053
8301
|
y: 21
|
|
6054
8302
|
},
|
|
6055
8303
|
vibrancy: "menu",
|
|
@@ -6564,6 +8812,82 @@ async function connectDesktopWelcome(authenticatedUrl, send, cookies = () => Pro
|
|
|
6564
8812
|
};
|
|
6565
8813
|
}
|
|
6566
8814
|
//#endregion
|
|
8815
|
+
//#region lib/types/splash-window.js
|
|
8816
|
+
/** Native launch splash: a presentational window shown while the Host boots. */
|
|
8817
|
+
/**
|
|
8818
|
+
* Resolve the frameless splash window's native material.
|
|
8819
|
+
* @param platform - operating system hosting Electron.
|
|
8820
|
+
* @returns fixed-size sandboxed window options without a preload or title bar.
|
|
8821
|
+
*/
|
|
8822
|
+
function splashWindowOptions(platform) {
|
|
8823
|
+
return {
|
|
8824
|
+
width: 360,
|
|
8825
|
+
height: 360,
|
|
8826
|
+
useContentSize: true,
|
|
8827
|
+
center: true,
|
|
8828
|
+
frame: false,
|
|
8829
|
+
resizable: false,
|
|
8830
|
+
minimizable: false,
|
|
8831
|
+
maximizable: false,
|
|
8832
|
+
fullscreenable: false,
|
|
8833
|
+
skipTaskbar: true,
|
|
8834
|
+
show: false,
|
|
8835
|
+
backgroundColor: platform === "linux" ? "#FFFFFF" : "#00000000",
|
|
8836
|
+
...platform === "darwin" ? {
|
|
8837
|
+
vibrancy: "menu",
|
|
8838
|
+
visualEffectState: "active"
|
|
8839
|
+
} : {},
|
|
8840
|
+
...platform === "win32" ? { backgroundMaterial: "acrylic" } : {},
|
|
8841
|
+
webPreferences: {
|
|
8842
|
+
nodeIntegration: false,
|
|
8843
|
+
contextIsolation: true,
|
|
8844
|
+
sandbox: true,
|
|
8845
|
+
webSecurity: true
|
|
8846
|
+
}
|
|
8847
|
+
};
|
|
8848
|
+
}
|
|
8849
|
+
let active;
|
|
8850
|
+
/**
|
|
8851
|
+
* Open the process's sole splash window; a repeated open focuses the existing one.
|
|
8852
|
+
* @returns the opened window, already loading its document; a failed document load
|
|
8853
|
+
* destroys it before rejecting.
|
|
8854
|
+
*/
|
|
8855
|
+
async function openSplashWindow() {
|
|
8856
|
+
if (active !== void 0 && !active.isDestroyed()) {
|
|
8857
|
+
active.focus();
|
|
8858
|
+
return active;
|
|
8859
|
+
}
|
|
8860
|
+
const window = new BrowserWindow(splashWindowOptions(process.platform));
|
|
8861
|
+
active = window;
|
|
8862
|
+
window.once("closed", () => {
|
|
8863
|
+
if (active === window) active = void 0;
|
|
8864
|
+
});
|
|
8865
|
+
window.once("ready-to-show", () => {
|
|
8866
|
+
if (active === window && !window.isDestroyed()) window.show();
|
|
8867
|
+
});
|
|
8868
|
+
window.webContents.setWindowOpenHandler(() => ({ action: "deny" }));
|
|
8869
|
+
window.webContents.on("will-navigate", (event) => {
|
|
8870
|
+
event.preventDefault();
|
|
8871
|
+
});
|
|
8872
|
+
try {
|
|
8873
|
+
await window.loadFile(join(app.getAppPath(), "renderer", "splash.html"));
|
|
8874
|
+
} catch (error) {
|
|
8875
|
+
if (active === window) active = void 0;
|
|
8876
|
+
if (!window.isDestroyed()) window.destroy();
|
|
8877
|
+
throw error;
|
|
8878
|
+
}
|
|
8879
|
+
return window;
|
|
8880
|
+
}
|
|
8881
|
+
/**
|
|
8882
|
+
* Close the splash wherever the launch reached a real surface or the process is
|
|
8883
|
+
* leaving. Repeated calls, and calls before the first open, do nothing.
|
|
8884
|
+
*/
|
|
8885
|
+
function closeSplashWindow() {
|
|
8886
|
+
const window = active;
|
|
8887
|
+
active = void 0;
|
|
8888
|
+
if (window !== void 0 && !window.isDestroyed()) window.destroy();
|
|
8889
|
+
}
|
|
8890
|
+
//#endregion
|
|
6567
8891
|
//#region lib/types/update-journal.js
|
|
6568
8892
|
/** Opt-in qualification evidence outside the installation directory; no raw diagnostics or request data. */
|
|
6569
8893
|
const ERROR_CODES = [
|
|
@@ -6649,21 +8973,6 @@ var DesktopUpdateJournal = class {
|
|
|
6649
8973
|
}
|
|
6650
8974
|
};
|
|
6651
8975
|
//#endregion
|
|
6652
|
-
//#region lib/types/duration-env.js
|
|
6653
|
-
/** Millisecond settings read from the Desktop process environment. */
|
|
6654
|
-
/**
|
|
6655
|
-
* Read a duration that `setTimeout` accepts without clamping.
|
|
6656
|
-
* @param env - Desktop process environment.
|
|
6657
|
-
* @param name - Variable to read; the validation error names it.
|
|
6658
|
-
* @param fallback - Value used when the variable is unset.
|
|
6659
|
-
* @returns Integer milliseconds from 1000 through 2147483647.
|
|
6660
|
-
*/
|
|
6661
|
-
function resolveDurationMs(env, name, fallback) {
|
|
6662
|
-
const value = Number(env[name] ?? fallback);
|
|
6663
|
-
if (!Number.isSafeInteger(value) || value < 1e3 || value > 2147483647) throw new Error(`${name} must be an integer from 1000 through 2147483647`);
|
|
6664
|
-
return value;
|
|
6665
|
-
}
|
|
6666
|
-
//#endregion
|
|
6667
8976
|
//#region lib/types/update-schedule.js
|
|
6668
8977
|
/** Ordinary feed polling; policy queries and user-authorized transfers keep their own lifetimes. */
|
|
6669
8978
|
/**
|
|
@@ -9435,31 +11744,49 @@ function installDesktopShortcuts(getWindow, userData, platform, updateMenu, over
|
|
|
9435
11744
|
let definitions = [];
|
|
9436
11745
|
let recording = false;
|
|
9437
11746
|
let revision;
|
|
9438
|
-
let
|
|
11747
|
+
let menuRows = [];
|
|
9439
11748
|
let editingInput;
|
|
9440
11749
|
const scopedDesktop = platform === "windows" || platform === "macos";
|
|
9441
11750
|
const disposers = /* @__PURE__ */ new Set();
|
|
9442
11751
|
const guestInputs = /* @__PURE__ */ new Map();
|
|
9443
|
-
|
|
9444
|
-
const
|
|
11752
|
+
/** The current binding of one command in Electron accelerator syntax; `undefined` when it has none. */
|
|
11753
|
+
const acceleratorOf = (id) => {
|
|
11754
|
+
const row = menuRows.find((candidate) => candidate.id === id);
|
|
11755
|
+
const usable = row !== void 0 && row.issue === null && row.conflicts.length === 0 ? row.binding : null;
|
|
11756
|
+
return usable === null ? void 0 : presentBinding(usable, platform).aria?.replace("Meta+", "Command+").replace(/Arrow(Up|Down|Left|Right)$/u, "$1");
|
|
11757
|
+
};
|
|
11758
|
+
const menuSignature = () => menuRows.map((row) => row.id + ":" + (row.issue === null && row.conflicts.length === 0 && row.binding !== null ? bindingKey(row.binding) : "")).join("|");
|
|
11759
|
+
const sendCommand = (commandId) => {
|
|
9445
11760
|
const window = getWindow();
|
|
9446
11761
|
if (window === void 0 || window.isDestroyed() || !window.isFocused() || !window.isEnabled() || revision === void 0 || recording || overlayInput(window).blocked) return;
|
|
9447
11762
|
window.webContents.send(DESKTOP_IPC.shortcutsInput, {
|
|
9448
11763
|
kind: "menu",
|
|
9449
|
-
commandId
|
|
11764
|
+
commandId,
|
|
9450
11765
|
revision
|
|
9451
11766
|
});
|
|
9452
11767
|
};
|
|
11768
|
+
const commandItem = (id, label, extra = {}) => {
|
|
11769
|
+
const accelerator = acceleratorOf(id);
|
|
11770
|
+
return {
|
|
11771
|
+
id: "dsh-menu-" + String(id),
|
|
11772
|
+
label,
|
|
11773
|
+
enabled: revision !== void 0,
|
|
11774
|
+
...accelerator === void 0 ? {} : { accelerator },
|
|
11775
|
+
click: () => {
|
|
11776
|
+
sendCommand(id);
|
|
11777
|
+
},
|
|
11778
|
+
...extra
|
|
11779
|
+
};
|
|
11780
|
+
};
|
|
9453
11781
|
let keys = /* @__PURE__ */ new Set();
|
|
9454
11782
|
const publish = (snapshot) => {
|
|
9455
11783
|
const wasEnabled = revision !== void 0;
|
|
9456
|
-
const
|
|
11784
|
+
const previousSignature = menuSignature();
|
|
9457
11785
|
revision = definitions.length === 0 || snapshot.status === "loading" ? void 0 : snapshot.revision;
|
|
9458
11786
|
const rows = snapshot.status === "loading" ? [] : effectiveShortcuts(definitions, snapshot.document, "desktop", platform);
|
|
9459
11787
|
keys = new Set(rows.flatMap((row) => row.binding !== null && row.issue === null && row.conflicts.length === 0 ? [bindingKey(row.binding)] : []));
|
|
9460
|
-
|
|
9461
|
-
|
|
9462
|
-
if (wasEnabled !== (revision !== void 0) || previousAccelerator !== closeAccelerator()) updateMenu();
|
|
11788
|
+
menuRows = rows;
|
|
11789
|
+
if (wasEnabled !== (revision !== void 0) || previousSignature !== menuSignature()) updateMenu();
|
|
9463
11790
|
const window = getWindow();
|
|
9464
11791
|
if (window !== void 0 && !window.isDestroyed() && window.webContents.mainFrame.url.startsWith("qilin-app://app/")) window.webContents.send(DESKTOP_IPC.shortcutsChanged, snapshot);
|
|
9465
11792
|
};
|
|
@@ -9563,7 +11890,7 @@ function installDesktopShortcuts(getWindow, userData, platform, updateMenu, over
|
|
|
9563
11890
|
modifiers
|
|
9564
11891
|
});
|
|
9565
11892
|
const match = keys.has(key);
|
|
9566
|
-
const menuMatch =
|
|
11893
|
+
const menuMatch = menuRows.some((row) => row.issue === null && row.conflicts.length === 0 && row.binding !== null && row.binding.secondCode === void 0 && row.binding.modifiers.join("+") === modifiers.join("+") && input.key.toUpperCase() === (row.binding.code.startsWith("Key") ? row.binding.code.slice(3) : input.code === row.binding.code ? input.key.toUpperCase() : ""));
|
|
9567
11894
|
contents.setIgnoreMenuShortcuts(recording || match || menuMatch);
|
|
9568
11895
|
const frame = contents.focusedFrame;
|
|
9569
11896
|
const composing = input.isComposing || input.key === "Dead" || deadKey || input.modifiers.includes("altgr");
|
|
@@ -9697,19 +12024,12 @@ function installDesktopShortcuts(getWindow, userData, platform, updateMenu, over
|
|
|
9697
12024
|
if (!contents.isDestroyed()) contents.setIgnoreMenuShortcuts(recording);
|
|
9698
12025
|
}
|
|
9699
12026
|
},
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
|
|
9706
|
-
label: labels.closePage,
|
|
9707
|
-
enabled: revision !== void 0,
|
|
9708
|
-
...accelerator === void 0 ? {} : { accelerator },
|
|
9709
|
-
click: sendMenuClose
|
|
9710
|
-
}]
|
|
9711
|
-
};
|
|
9712
|
-
},
|
|
12027
|
+
commandItem,
|
|
12028
|
+
menuEnabled: () => revision !== void 0,
|
|
12029
|
+
fileMenu: (labels) => ({
|
|
12030
|
+
label: labels.fileMenu,
|
|
12031
|
+
submenu: [commandItem("page.close", labels.closePage)]
|
|
12032
|
+
}),
|
|
9713
12033
|
attach(window) {
|
|
9714
12034
|
attachInput(window, window.webContents);
|
|
9715
12035
|
},
|
|
@@ -10085,6 +12405,7 @@ function reportFatal(error, source) {
|
|
|
10085
12405
|
persistCrashReport(error, source);
|
|
10086
12406
|
return;
|
|
10087
12407
|
}
|
|
12408
|
+
closeSplashWindow();
|
|
10088
12409
|
recovery.report(error, source).catch((failure) => {
|
|
10089
12410
|
console.error(failure);
|
|
10090
12411
|
app.exit(1);
|
|
@@ -10253,6 +12574,9 @@ function createWindow(preload, show = false, primary = false) {
|
|
|
10253
12574
|
return window;
|
|
10254
12575
|
}
|
|
10255
12576
|
async function main() {
|
|
12577
|
+
openSplashWindow().catch((error) => {
|
|
12578
|
+
console.warn("desktop splash: unavailable", error);
|
|
12579
|
+
});
|
|
10256
12580
|
const desktopSettings = readDesktopSettings(app.getPath("userData"));
|
|
10257
12581
|
pruneCrashReports(app.getPath("logs"));
|
|
10258
12582
|
const journalDirectory = process.env.QILIN_DESKTOP_UPDATE_JOURNAL_DIR;
|
|
@@ -10786,6 +13110,7 @@ async function main() {
|
|
|
10786
13110
|
if (owner === void 0 || event.sender !== owner.webContents || event.senderFrame !== owner.webContents.mainFrame || !event.senderFrame.url.startsWith("qilin-app://app/")) throw new Error("Rejected Platform command");
|
|
10787
13111
|
return owner;
|
|
10788
13112
|
};
|
|
13113
|
+
installFileActions(assertMainApplication, () => hostUrl);
|
|
10789
13114
|
ipcMain.on(PLATFORM_IPC.bootstrap, (event) => {
|
|
10790
13115
|
try {
|
|
10791
13116
|
event.returnValue = platformView.bootstrap(event);
|
|
@@ -11031,73 +13356,58 @@ async function main() {
|
|
|
11031
13356
|
iconPath: applicationIconPath
|
|
11032
13357
|
});
|
|
11033
13358
|
const darwin = process.platform === "darwin";
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
13359
|
+
/** Windows editing entries, whose history the editor owns instead of Chromium's undo stack. */
|
|
13360
|
+
const windowsEditItems = () => {
|
|
13361
|
+
const editItem = (label, keyCode, modifiers, accelerator) => ({
|
|
13362
|
+
label,
|
|
13363
|
+
...accelerator === void 0 ? {} : { accelerator },
|
|
13364
|
+
click: () => {
|
|
13365
|
+
shortcuts.sendEditingKey(keyCode, modifiers);
|
|
13366
|
+
}
|
|
13367
|
+
});
|
|
13368
|
+
const messages = currentDesktopLocale().messages;
|
|
13369
|
+
return [
|
|
13370
|
+
editItem(messages.undo, "Z", ["control"], "Ctrl+Z"),
|
|
13371
|
+
editItem(messages.redo, "Y", ["control"], "Ctrl+Y"),
|
|
13372
|
+
{ type: "separator" },
|
|
13373
|
+
editItem(messages.cut, "X", ["control"], "Ctrl+X"),
|
|
13374
|
+
editItem(messages.copy, "C", ["control"], "Ctrl+C"),
|
|
13375
|
+
editItem(messages.paste, "V", ["control"], "Ctrl+V"),
|
|
13376
|
+
editItem(messages.delete, "Delete", []),
|
|
13377
|
+
{ type: "separator" },
|
|
13378
|
+
editItem(messages.selectAll, "A", ["control"], "Ctrl+A")
|
|
13379
|
+
];
|
|
13380
|
+
};
|
|
13381
|
+
const menuActions = () => ({
|
|
13382
|
+
platform: darwin ? "darwin" : process.platform === "win32" ? "win32" : "linux",
|
|
13383
|
+
messages: currentDesktopLocale().messages,
|
|
13384
|
+
applicationName: app.name,
|
|
13385
|
+
development,
|
|
13386
|
+
showAbout: () => {
|
|
13387
|
+
showAbout().catch((error) => {
|
|
13388
|
+
console.error(error);
|
|
13389
|
+
});
|
|
11043
13390
|
},
|
|
11044
|
-
{
|
|
11045
|
-
|
|
11046
|
-
label: currentDesktopLocale().messages.hideOtherApplications
|
|
13391
|
+
checkUpdates: () => {
|
|
13392
|
+
openUpdatePrompt(true);
|
|
11047
13393
|
},
|
|
11048
|
-
{
|
|
11049
|
-
|
|
11050
|
-
label: currentDesktopLocale().messages.showAllApplications
|
|
13394
|
+
manageCommand: () => {
|
|
13395
|
+
commandManager.show();
|
|
11051
13396
|
},
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
label: currentDesktopLocale().messages.aboutMenu,
|
|
11057
|
-
click: () => {
|
|
11058
|
-
showAbout().catch((error) => {
|
|
11059
|
-
console.error(error);
|
|
11060
|
-
});
|
|
11061
|
-
}
|
|
11062
|
-
} : {
|
|
11063
|
-
label: currentDesktopLocale().messages.aboutMenu,
|
|
11064
|
-
role: "about"
|
|
13397
|
+
restart: () => {
|
|
13398
|
+
if (quitting) return;
|
|
13399
|
+
app.relaunch();
|
|
13400
|
+
quitWithoutConfirmation();
|
|
11065
13401
|
},
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
label: currentDesktopLocale().messages.checkUpdatesMenu,
|
|
11069
|
-
click: () => {
|
|
11070
|
-
openUpdatePrompt(true);
|
|
11071
|
-
}
|
|
13402
|
+
openExternal: (url) => {
|
|
13403
|
+
shell.openExternal(url);
|
|
11072
13404
|
},
|
|
11073
|
-
|
|
11074
|
-
|
|
11075
|
-
|
|
11076
|
-
|
|
11077
|
-
|
|
11078
|
-
|
|
11079
|
-
...development ? [
|
|
11080
|
-
{ type: "separator" },
|
|
11081
|
-
{
|
|
11082
|
-
label: currentDesktopLocale().messages.reloadPageMenu,
|
|
11083
|
-
role: "reload"
|
|
11084
|
-
},
|
|
11085
|
-
{
|
|
11086
|
-
label: currentDesktopLocale().messages.restartAppHostMenu,
|
|
11087
|
-
click: () => {
|
|
11088
|
-
if (quitting) return;
|
|
11089
|
-
app.relaunch();
|
|
11090
|
-
quitWithoutConfirmation();
|
|
11091
|
-
}
|
|
11092
|
-
}
|
|
11093
|
-
] : [],
|
|
11094
|
-
{ type: "separator" },
|
|
11095
|
-
...hideCommands,
|
|
11096
|
-
{
|
|
11097
|
-
role: "quit",
|
|
11098
|
-
...darwin ? { label: currentDesktopLocale().messages.quitApplication } : process.platform === "win32" ? { label: currentDesktopLocale().messages.exitApplication } : {}
|
|
11099
|
-
}
|
|
11100
|
-
];
|
|
13405
|
+
quit: () => {
|
|
13406
|
+
app.quit();
|
|
13407
|
+
},
|
|
13408
|
+
command: (id, label) => shortcuts.commandItem(id, label),
|
|
13409
|
+
editItems: windowsEditItems
|
|
13410
|
+
});
|
|
11101
13411
|
const devToolsItems = [{
|
|
11102
13412
|
role: "toggleDevTools",
|
|
11103
13413
|
visible: false
|
|
@@ -11107,10 +13417,11 @@ async function main() {
|
|
|
11107
13417
|
accelerator: "F12"
|
|
11108
13418
|
}];
|
|
11109
13419
|
const refreshApplicationMenu = () => {
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
submenu: [...
|
|
11113
|
-
}
|
|
13420
|
+
const template = process.platform === "win32" ? devToolsItems : applicationMenu(menuActions()).map((menu, index) => index === 0 ? {
|
|
13421
|
+
...menu,
|
|
13422
|
+
submenu: [...menu.submenu, ...devToolsItems]
|
|
13423
|
+
} : menu);
|
|
13424
|
+
Menu.setApplicationMenu(Menu.buildFromTemplate(template));
|
|
11114
13425
|
tray?.relabel();
|
|
11115
13426
|
};
|
|
11116
13427
|
refreshApplicationMenu();
|
|
@@ -11150,26 +13461,10 @@ async function main() {
|
|
|
11150
13461
|
ipcMain.handle(DESKTOP_IPC.windowsMenu, (event, name, x, y) => {
|
|
11151
13462
|
assertDesktopSender(event, ["app"]);
|
|
11152
13463
|
if (mainWindow === void 0 || event.sender !== mainWindow.webContents || event.senderFrame !== mainWindow.webContents.mainFrame) throw new Error("desktop menu: rejected sender");
|
|
11153
|
-
|
|
13464
|
+
const menu = CAPTION_MENUS.find((candidate) => candidate === name);
|
|
13465
|
+
if (menu === void 0 || typeof x !== "number" || typeof y !== "number" || !Number.isFinite(x) || !Number.isFinite(y) || x < 0 || y < 0 || x > 1e5 || y > 1e5) throw new Error("desktop menu: invalid popup request");
|
|
11154
13466
|
const window = mainWindow;
|
|
11155
|
-
const
|
|
11156
|
-
label,
|
|
11157
|
-
...accelerator === void 0 ? {} : { accelerator },
|
|
11158
|
-
click: () => {
|
|
11159
|
-
shortcuts.sendEditingKey(keyCode, modifiers);
|
|
11160
|
-
}
|
|
11161
|
-
});
|
|
11162
|
-
const items = name === "application" ? applicationItems() : [
|
|
11163
|
-
editItem(currentDesktopLocale().messages.undo, "Z", ["control"], "Ctrl+Z"),
|
|
11164
|
-
editItem(currentDesktopLocale().messages.redo, "Y", ["control"], "Ctrl+Y"),
|
|
11165
|
-
{ type: "separator" },
|
|
11166
|
-
editItem(currentDesktopLocale().messages.cut, "X", ["control"], "Ctrl+X"),
|
|
11167
|
-
editItem(currentDesktopLocale().messages.copy, "C", ["control"], "Ctrl+C"),
|
|
11168
|
-
editItem(currentDesktopLocale().messages.paste, "V", ["control"], "Ctrl+V"),
|
|
11169
|
-
editItem(currentDesktopLocale().messages.delete, "Delete", []),
|
|
11170
|
-
{ type: "separator" },
|
|
11171
|
-
editItem(currentDesktopLocale().messages.selectAll, "A", ["control"], "Ctrl+A")
|
|
11172
|
-
];
|
|
13467
|
+
const items = captionMenu(menuActions(), menu);
|
|
11173
13468
|
const zoom = mainWindow.webContents.getZoomFactor();
|
|
11174
13469
|
return new Promise((resolve) => {
|
|
11175
13470
|
Menu.buildFromTemplate(items).popup({
|
|
@@ -11256,6 +13551,7 @@ async function main() {
|
|
|
11256
13551
|
if (activate) window.show();
|
|
11257
13552
|
else window.showInactive();
|
|
11258
13553
|
enteredWorkspace = true;
|
|
13554
|
+
closeSplashWindow();
|
|
11259
13555
|
if (welcomeWindow !== void 0) {
|
|
11260
13556
|
welcomeWindow.close();
|
|
11261
13557
|
window.webContents.send(DESKTOP_IPC.enterWorkspace);
|
|
@@ -11271,6 +13567,7 @@ async function main() {
|
|
|
11271
13567
|
let openingWelcome;
|
|
11272
13568
|
const showWelcome = () => {
|
|
11273
13569
|
if (quitting) return Promise.resolve();
|
|
13570
|
+
closeSplashWindow();
|
|
11274
13571
|
if (welcomeWindow !== void 0 && !welcomeWindow.isDestroyed()) {
|
|
11275
13572
|
if (!welcomeWindow.isVisible()) track("auth_page_view", {});
|
|
11276
13573
|
welcomeWindow.show();
|
|
@@ -11429,6 +13726,7 @@ async function main() {
|
|
|
11429
13726
|
});
|
|
11430
13727
|
};
|
|
11431
13728
|
app.on("before-quit", (event) => {
|
|
13729
|
+
closeSplashWindow();
|
|
11432
13730
|
if (shellInstallerOwnsQuit) {
|
|
11433
13731
|
shuttingDown = true;
|
|
11434
13732
|
quitConfirmation.dispose();
|
|
@@ -11481,6 +13779,7 @@ async function main() {
|
|
|
11481
13779
|
}, (state) => {
|
|
11482
13780
|
if (state.error !== "authentication-required") policyAuthenticationQueued = false;
|
|
11483
13781
|
if (state.blocking) {
|
|
13782
|
+
closeSplashWindow();
|
|
11484
13783
|
for (const controller of ordinaryDialogs) controller.abort();
|
|
11485
13784
|
if (!wasBlocking) updateDialog.cancel();
|
|
11486
13785
|
}
|