zidane-gui 8.2.1 → 8.2.2

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/out/main/index.js CHANGED
@@ -7,7 +7,7 @@ import { config } from "dotenv";
7
7
  import { shell, app, BrowserWindow, ipcMain, nativeImage, Notification, session, webContents, utilityProcess, powerMonitor, dialog, net, protocol, nativeTheme } from "electron";
8
8
  import { migrateSessionArtifactDirs, createRingBufferSink, fanoutSink, consoleSink, createLogger, createSqliteDriver, createSqliteWriteQueue, createSqliteSessionStore, createExtensionBus, createExtensionHostRuntimeBridge, createExtensionHud, inlineLoadedExtension, discoverAndBuildExtensionRegistry, disposeExtensionRegistry, toWireConfigSchema, resolveCompletionSubmit, installExtensionFromSpec, ExtensionInstallError, updateInstalledExtension, removeInstalledExtension, sanitizeExtensionConfigActionPatch, loginMcpServer, clearMcpSignIn, mcpOAuthProviderFor, saveMcpClientSecret, refreshArtifact, BUILTIN_ARTIFACT_KINDS, renderArtifactRow, sessionBadges, normalizeBadgeTarget, extensionBadgeActions, runBadgeAction, resolveInlineSuggestion, createPathAutocompleteProvider, extensionScaffold, parseGithubRefKey, githubPullUrl, pullFromMeta, githubPullConfirmedAt, isPullFresh, viewForRead, queueGithubPull, pullMeta, referenceProviderWires, GITHUB_PULL_PROVIDER_ID, GITHUB_ISSUE_PROVIDER_ID, createReferenceResolver, isThinkingLevel, loadSession, githubClient, isGhRateLimitError, rateLimitResetFromJson, configureGithubClient, createFileGithubStateStore } from "zidane";
9
9
  import { randomUUID, createHash } from "node:crypto";
10
- import { parseEditorCommand, keybindingsPath, stripJsonComments, normalizeBindingValue, ensureKeybindingsFile, readProjects, writeProjects, credentialsPath, applyApiKeyEnv, BUILTIN_PROVIDERS, readCredentials, detectAuth, supportsOAuth, runOAuthLogin, DEFAULT_OAUTH_ACCOUNT_LABEL, setProviderCredential, resolveConfig, scopeCwd, settingsFromStored, DEFAULT_SETTINGS, SETTINGS_DEFAULTS_VERSION_KEY, SETTINGS_DEFAULTS_VERSION, enforceSettingsInvariants, sparseSettingsUpdate, createExtensionMcpHost, createFileMcpCredentialStore, mcpsWritePath, upsertMcpServer, discoverProjectMcps, removeMcpServer, compactPath as compactPath$1, loadMcpToolsCache, subscribeMcpToolsCache, refreshMcpToolsCatalog, classifyMcpTest, describeForkFailure, DEFAULT_SPACE_ID, SPACE_METADATA_KEY, TITLE_SOURCE_KEY, toTodosSnapshot, projectRootOf, createChatHost, findGitRoot, fileEntriesFromPaths, toolResultText, sumRunCosts, lastContextSizeFromTurns, availableAgents, groupArtifacts, defaultModelOf, restoreModelOptions, enabledModelOptions, modelOptionsFor, readProviderCredential, removeProviderCredential, setPreferredCredential, removeStoredCredential, setCredentialLabel, hasClaudeCodeSetup, countClaudeSessionFiles, previewClaudeImport, importFromClaudeCode, runInProgress, runProgress, resolveSessionCwd, effectiveContextWindow, getContextWindow, modelSupportsReasoning, fmtTokens, listProjectFiles, discoverProjectPlugins, applyEnvironmentSettingsChange, hasUntimedOpenCalls, withRunningCallStarts, buildModelCatalog, modelsForDescriptor, listDecisionModels, testDecisionModel, testModel, providerFactoryOptions, describeTitleStatus, overlayHostSettings, splitHostSettingsPatch, settingsToWire, onboardingInstallSignals, needsOnboarding, mergeOnboardingState, migratedOnboardingRecords, detectOnboardingEnvironment, onboardingProviders, BUILTIN_THEMES, connectorGithubToken, searchSessionHistory, searchableTurnText, deriveSessionTitle, spaceIdForNewSession, newSessionModel, defaultSessionModel, defaultSessionKnobs, sessionModelFallbacks, defaultSessionAgent, deleteSessionData, writeSessionExport, sessionEnvironmentSummary, readSessionSpaceId, isMainSession, readSessionAccount, isStaleRunMarker, toolCallPreview, readSessionEnvironment, assertEnvironmentReady, discoverProjectSkills, selectActiveTodos, setTodosForRun, sanitizeTodoItems, DEFAULT_MAX_TODO_ITEMS, fetchAllProviderUsage, fetchProviderUsage, fetchGithubUsage, watchInstalledVersion, checkForUpdate, upgradeInstalledPackages, performSelfUpdate, compareSemver, findInstalledCompanion } from "zidane/chat";
10
+ import { parseEditorCommand, keybindingsPath, stripJsonComments, normalizeBindingValue, ensureKeybindingsFile, readProjects, writeProjects, credentialsPath, applyApiKeyEnv, BUILTIN_PROVIDERS, readCredentials, detectAuth, supportsOAuth, runOAuthLogin, DEFAULT_OAUTH_ACCOUNT_LABEL, setProviderCredential, resolveConfig, scopeCwd, settingsFromStored, DEFAULT_SETTINGS, SETTINGS_DEFAULTS_VERSION_KEY, SETTINGS_DEFAULTS_VERSION, enforceSettingsInvariants, sparseSettingsUpdate, createExtensionMcpHost, createFileMcpCredentialStore, mcpsWritePath, upsertMcpServer, discoverProjectMcps, removeMcpServer, compactPath as compactPath$1, loadMcpToolsCache, subscribeMcpToolsCache, refreshMcpToolsCatalog, classifyMcpTest, describeForkFailure, DEFAULT_SPACE_ID, SPACE_METADATA_KEY, TITLE_SOURCE_KEY, toTodosSnapshot, projectRootOf, createChatHost, findGitRoot, fileEntriesFromPaths, toolResultText, sumRunCosts, lastContextSizeFromTurns, availableAgents, groupArtifacts, defaultModelOf, restoreModelOptions, enabledModelOptions, modelOptionsFor, readProviderCredential, removeProviderCredential, setPreferredCredential, removeStoredCredential, setCredentialLabel, hasClaudeCodeSetup, countClaudeSessionFiles, previewClaudeImport, importFromClaudeCode, runInProgress, runProgress, resolveSessionCwd, effectiveContextWindow, getContextWindow, modelSupportsReasoning, fmtTokens, listProjectFiles, discoverProjectPlugins, applyEnvironmentSettingsChange, hasUntimedOpenCalls, withRunningCallStarts, buildModelCatalog, modelsForDescriptor, listDecisionModels, listImageModels, testDecisionModel, testModel, providerFactoryOptions, describeTitleStatus, overlayHostSettings, splitHostSettingsPatch, settingsToWire, onboardingInstallSignals, needsOnboarding, mergeOnboardingState, migratedOnboardingRecords, detectOnboardingEnvironment, onboardingProviders, BUILTIN_THEMES, connectorGithubToken, searchSessionHistory, searchableTurnText, deriveSessionTitle, spaceIdForNewSession, newSessionModel, defaultSessionModel, defaultSessionKnobs, sessionModelFallbacks, defaultSessionAgent, deleteSessionData, writeSessionExport, sessionEnvironmentSummary, readSessionSpaceId, isMainSession, readSessionAccount, isStaleRunMarker, toolCallPreview, readSessionEnvironment, assertEnvironmentReady, discoverProjectSkills, selectActiveTodos, setTodosForRun, sanitizeTodoItems, DEFAULT_MAX_TODO_ITEMS, fetchAllProviderUsage, fetchProviderUsage, fetchGithubUsage, watchInstalledVersion, checkForUpdate, upgradeInstalledPackages, performSelfUpdate, compareSemver, findInstalledCompanion } from "zidane/chat";
11
11
  import { execFile, spawn } from "node:child_process";
12
12
  import { parseSessionKey as parseSessionKey$1, LOCAL_HOST_KEY, sessionKey as sessionKey$1, createPresenceMerge, createHostIndex, LOCAL_HOST_NAME, isMethodNotFound, HostRemovedError, sideSessionParent, orchestratedBy, BrowserOpError, normalizeBrowserUrl, isAllowedBrowserUrl, BROWSER_OUTLINE_MAX_ELEMENTS, BROWSER_TEXT_MAX_CHARS, BROWSER_EVALUATE_MAX_BYTES, BROWSER_MAX_WAIT_MS, BROWSER_ACTION_TIMEOUT_MS, BROWSER_WAIT_TIMEOUT_MS, BROWSER_OPEN_MOUNT_MS, TERMINAL_VIEW_MAX_LINES, daemonGate, remoteHostsGate, resolvePanelLoadContext, normalizePanelContent, normalizePaletteItems, normalizePaletteRunResult, HostRegistryError, SYNC_MODES, SYNC_CATEGORIES, toMachineName, isValidMachineName, engagedKillSwitches, isPaletteContext, BASH_CALL_ID_PREFIX, parseMachineKind } from "zidane/chat/pure";
13
13
  import { createRequire } from "node:module";
@@ -1417,6 +1417,18 @@ function invalidateExtensionRegistries() {
1417
1417
  }
1418
1418
  registryCache.clear();
1419
1419
  }
1420
+ function cachedExtensionDirs() {
1421
+ const dirs = /* @__PURE__ */ new Set();
1422
+ for (const entry of registryCache.values()) {
1423
+ if (!entry.registry) continue;
1424
+ for (const ext of [...entry.registry.loaded, ...entry.registry.inactive]) {
1425
+ if (ext.dir && (ext.source === "user" || ext.source === "project") && !existsSync(join(ext.dir, ".install.json"))) {
1426
+ dirs.add(ext.dir);
1427
+ }
1428
+ }
1429
+ }
1430
+ return dirs;
1431
+ }
1420
1432
  const builtListeners = /* @__PURE__ */ new Set();
1421
1433
  const warmed = /* @__PURE__ */ new Set();
1422
1434
  function onExtensionRegistryBuilt(listener) {
@@ -6374,7 +6386,7 @@ function onStateTick(listener, intervalMs = STATE_TICK_MS) {
6374
6386
  }
6375
6387
  };
6376
6388
  }
6377
- const RETRY_MS = 5e3;
6389
+ const RETRY_MS$1 = 5e3;
6378
6390
  let client = null;
6379
6391
  let retryTimer = null;
6380
6392
  let offStateTick = null;
@@ -6456,7 +6468,7 @@ function scheduleRetry() {
6456
6468
  retryTimer = setTimeout(() => {
6457
6469
  retryTimer = null;
6458
6470
  refreshDaemonClient();
6459
- }, RETRY_MS);
6471
+ }, RETRY_MS$1);
6460
6472
  retryTimer.unref?.();
6461
6473
  }
6462
6474
  function stopRetry() {
@@ -8497,6 +8509,72 @@ function createExtension(input, deps) {
8497
8509
  writeFileSync(join(dir, "index.ts"), extensionScaffold(name), "utf8");
8498
8510
  return { dir, name, ...needsTrust ? { needsTrust: true } : {} };
8499
8511
  }
8512
+ const SETTLE_MS$1 = 300;
8513
+ const RETRY_MS = 1e3;
8514
+ const SOURCE_FILE = /\.(?:[cm]?[jt]sx?)$/;
8515
+ function isExtensionSourceChange(name) {
8516
+ if (!name) return true;
8517
+ const parts = name.split(/[\\/]/);
8518
+ if (parts.some((part) => part === "node_modules" || part.startsWith("."))) return false;
8519
+ if (parts.length === 1 && parts[0] === "package.json") return true;
8520
+ return SOURCE_FILE.test(name);
8521
+ }
8522
+ const defaultWatch = (dir, onFile) => watch$1(dir, { recursive: true, persistent: false }, (_event, name) => onFile(name ? String(name) : null));
8523
+ function createExtensionDirWatcher(onChange, opts = {}) {
8524
+ const settleMs = opts.settleMs ?? SETTLE_MS$1;
8525
+ const retryMs = opts.retryMs ?? RETRY_MS;
8526
+ const canReload = opts.canReload ?? (() => true);
8527
+ const watch2 = opts.watch ?? defaultWatch;
8528
+ const watchers = /* @__PURE__ */ new Map();
8529
+ let timer;
8530
+ const schedule = (delay) => {
8531
+ if (timer) clearTimeout(timer);
8532
+ timer = setTimeout(() => {
8533
+ timer = void 0;
8534
+ if (canReload()) onChange();
8535
+ else schedule(retryMs);
8536
+ }, delay);
8537
+ };
8538
+ const stop = (dir) => {
8539
+ const watcher2 = watchers.get(dir);
8540
+ if (!watcher2) return;
8541
+ watchers.delete(dir);
8542
+ try {
8543
+ watcher2.close();
8544
+ } catch {
8545
+ }
8546
+ };
8547
+ const start = (dir) => {
8548
+ let watcher2;
8549
+ try {
8550
+ watcher2 = watch2(dir, (name) => {
8551
+ if (isExtensionSourceChange(name)) schedule(settleMs);
8552
+ });
8553
+ } catch {
8554
+ return;
8555
+ }
8556
+ watcher2.on("error", () => {
8557
+ if (watchers.get(dir) === watcher2) stop(dir);
8558
+ });
8559
+ watchers.set(dir, watcher2);
8560
+ };
8561
+ return {
8562
+ sync(dirs) {
8563
+ const wanted = new Set(dirs);
8564
+ for (const dir of [...watchers.keys()]) {
8565
+ if (!wanted.has(dir)) stop(dir);
8566
+ }
8567
+ for (const dir of wanted) {
8568
+ if (!watchers.has(dir)) start(dir);
8569
+ }
8570
+ },
8571
+ close() {
8572
+ if (timer) clearTimeout(timer);
8573
+ timer = void 0;
8574
+ for (const dir of [...watchers.keys()]) stop(dir);
8575
+ }
8576
+ };
8577
+ }
8500
8578
  const LAST_FOLDER_KEY$1 = "last_folder";
8501
8579
  function resolveCheckoutRoot(cwd) {
8502
8580
  return findGitRoot(cwd) ?? cwd;
@@ -8550,6 +8628,16 @@ function toGuiTheme(theme) {
8550
8628
  };
8551
8629
  }
8552
8630
  function registerExtensionChannels({ ipc }) {
8631
+ const watcher2 = createExtensionDirWatcher(
8632
+ () => {
8633
+ invalidateExtensionsAndNotify();
8634
+ invalidateConfig();
8635
+ shutdownChat();
8636
+ },
8637
+ { canReload: () => !getChatHost().hasActiveRuns() }
8638
+ );
8639
+ onExtensionRegistryBuilt(() => watcher2.sync(cachedExtensionDirs()));
8640
+ app.on("will-quit", () => watcher2.close());
8553
8641
  ipc.handle(
8554
8642
  "extensions:list",
8555
8643
  (_e, cwd) => listExtensions(scopeCwd(cwd), readSettings())
@@ -9609,6 +9697,36 @@ function registerModelChannels({ ipc }) {
9609
9697
  return listDecisionModels({ providers, authed: detectAuth(userDataDir(), providers) });
9610
9698
  }
9611
9699
  );
9700
+ ipc.handle(
9701
+ "sessions:listImageModels",
9702
+ async (_e, cwd, hostId2) => {
9703
+ const host2 = serverHost(hostId2);
9704
+ if (host2) {
9705
+ try {
9706
+ const { providers: providers2 } = await host2.call("models.list", cwd ? { cwd } : {});
9707
+ return providers2.flatMap(
9708
+ (p) => (p.imageModels ?? []).map((m) => ({
9709
+ providerKey: p.key,
9710
+ providerLabel: p.label,
9711
+ modelId: m.id,
9712
+ modelName: m.name,
9713
+ references: m.references,
9714
+ transparency: m.transparency,
9715
+ available: m.available,
9716
+ ...m.reason ? { reason: m.reason } : {},
9717
+ ...m.isDefault ? { isDefault: true } : {}
9718
+ }))
9719
+ );
9720
+ } catch (err) {
9721
+ if (isUnsupportedMethod(err)) return [];
9722
+ throw err;
9723
+ }
9724
+ }
9725
+ applyAuthEnv();
9726
+ const providers = cwd ? (await getRuntimeConfig(cwd)).providers : BUILTIN_PROVIDERS;
9727
+ return listImageModels({ providers, authed: detectAuth(userDataDir(), providers) });
9728
+ }
9729
+ );
9612
9730
  ipc.handle(
9613
9731
  "sessions:testDecisionModel",
9614
9732
  async (_e, cwd, hostId2, model) => {
@@ -723,10 +723,10 @@ ${tail}` : message;
723
723
  this.#idleTimer = setTimeout(() => void this.stop(), this.#idleMs);
724
724
  }
725
725
  async open(path, text, changes) {
726
- if (!this.running && Date.now() < this.#retryAfter) return;
726
+ if (!this.running && Date.now() < this.#retryAfter) return this.#keepText(path, text);
727
727
  await this.#start().catch(() => void 0);
728
728
  const conn = this.#conn;
729
- if (!conn || !this.#initialized) return;
729
+ if (!conn || !this.#initialized) return this.#keepText(path, text);
730
730
  const existing = this.#docs.get(path);
731
731
  if (existing) {
732
732
  if (existing.text === text) return;
@@ -746,6 +746,12 @@ ${tail}` : message;
746
746
  this.#pullDiagnostics(path);
747
747
  this.#touch();
748
748
  }
749
+ /** Nothing was sent: keep the latest text so the restart's reseed opens it (the caller's edits are spent). */
750
+ #keepText(path, text) {
751
+ const doc = this.#docs.get(path);
752
+ if (doc) doc.text = text;
753
+ else this.#docs.set(path, { version: 0, text });
754
+ }
749
755
  close(path) {
750
756
  if (!this.#docs.delete(path)) return;
751
757
  this.#pulls.get(path)?.();
@@ -1139,6 +1145,10 @@ class LspManager {
1139
1145
  if (step.kind === "attach" && client.isOpen(path)) return client.diagnosticsFor(path);
1140
1146
  const incremental = step.kind === "change" && !step.full ? changes : void 0;
1141
1147
  await client.open(path, text, incremental).catch(() => void 0);
1148
+ if (!this.#owners.has(docKey)) {
1149
+ client.close(path);
1150
+ return [];
1151
+ }
1142
1152
  return client.diagnosticsFor(path);
1143
1153
  }
1144
1154
  /** `owner` closed `path`; the server hears `didClose` when it was the last one. */
@@ -53,6 +53,7 @@ const api = {
53
53
  setModel: (id, pick, fallbacks) => ipcRenderer.invoke("sessions:setModel", id, pick, fallbacks),
54
54
  listModels: (cwd, hostId) => ipcRenderer.invoke("sessions:listModels", cwd, hostId),
55
55
  listDecisionModels: (cwd, hostId) => ipcRenderer.invoke("sessions:listDecisionModels", cwd, hostId),
56
+ listImageModels: (cwd, hostId) => ipcRenderer.invoke("sessions:listImageModels", cwd, hostId),
56
57
  testDecisionModel: (cwd, hostId, model) => ipcRenderer.invoke("sessions:testDecisionModel", cwd, hostId, model),
57
58
  testModel: (cwd, hostId, model) => ipcRenderer.invoke("sessions:testModel", cwd, hostId, model),
58
59
  titleStatus: (id) => ipcRenderer.invoke("sessions:titleStatus", id),
@@ -1,4 +1,4 @@
1
- import { _ as __vitePreload } from "./index-CPTV1As9.js";
1
+ import { _ as __vitePreload } from "./index-BGEXnnpi.js";
2
2
  var p = /* @__PURE__ */ ((B) => (B[B.CURSOR_KEY_APPLICATION = 0] = "CURSOR_KEY_APPLICATION", B[B.KEYPAD_KEY_APPLICATION = 1] = "KEYPAD_KEY_APPLICATION", B[B.IGNORE_KEYPAD_WITH_NUMLOCK = 2] = "IGNORE_KEYPAD_WITH_NUMLOCK", B[B.ALT_ESC_PREFIX = 3] = "ALT_ESC_PREFIX", B[B.MODIFY_OTHER_KEYS_STATE_2 = 4] = "MODIFY_OTHER_KEYS_STATE_2", B[B.KITTY_KEYBOARD_FLAGS = 5] = "KITTY_KEYBOARD_FLAGS", B))(p || {}), u = /* @__PURE__ */ ((B) => (B[B.RELEASE = 0] = "RELEASE", B[B.PRESS = 1] = "PRESS", B[B.REPEAT = 2] = "REPEAT", B))(u || {}), i = /* @__PURE__ */ ((B) => (B[B.UNIDENTIFIED = 0] = "UNIDENTIFIED", B[B.GRAVE = 1] = "GRAVE", B[B.BACKSLASH = 2] = "BACKSLASH", B[B.BRACKET_LEFT = 3] = "BRACKET_LEFT", B[B.BRACKET_RIGHT = 4] = "BRACKET_RIGHT", B[B.COMMA = 5] = "COMMA", B[B.ZERO = 6] = "ZERO", B[B.ONE = 7] = "ONE", B[B.TWO = 8] = "TWO", B[B.THREE = 9] = "THREE", B[B.FOUR = 10] = "FOUR", B[B.FIVE = 11] = "FIVE", B[B.SIX = 12] = "SIX", B[B.SEVEN = 13] = "SEVEN", B[B.EIGHT = 14] = "EIGHT", B[B.NINE = 15] = "NINE", B[B.EQUAL = 16] = "EQUAL", B[B.INTL_BACKSLASH = 17] = "INTL_BACKSLASH", B[B.INTL_RO = 18] = "INTL_RO", B[B.INTL_YEN = 19] = "INTL_YEN", B[B.A = 20] = "A", B[B.B = 21] = "B", B[B.C = 22] = "C", B[B.D = 23] = "D", B[B.E = 24] = "E", B[B.F = 25] = "F", B[B.G = 26] = "G", B[B.H = 27] = "H", B[B.I = 28] = "I", B[B.J = 29] = "J", B[B.K = 30] = "K", B[B.L = 31] = "L", B[B.M = 32] = "M", B[B.N = 33] = "N", B[B.O = 34] = "O", B[B.P = 35] = "P", B[B.Q = 36] = "Q", B[B.R = 37] = "R", B[B.S = 38] = "S", B[B.T = 39] = "T", B[B.U = 40] = "U", B[B.V = 41] = "V", B[B.W = 42] = "W", B[B.X = 43] = "X", B[B.Y = 44] = "Y", B[B.Z = 45] = "Z", B[B.MINUS = 46] = "MINUS", B[B.PERIOD = 47] = "PERIOD", B[B.QUOTE = 48] = "QUOTE", B[B.SEMICOLON = 49] = "SEMICOLON", B[B.SLASH = 50] = "SLASH", B[B.ALT_LEFT = 51] = "ALT_LEFT", B[B.ALT_RIGHT = 52] = "ALT_RIGHT", B[B.BACKSPACE = 53] = "BACKSPACE", B[B.CAPS_LOCK = 54] = "CAPS_LOCK", B[B.CONTEXT_MENU = 55] = "CONTEXT_MENU", B[B.CONTROL_LEFT = 56] = "CONTROL_LEFT", B[B.CONTROL_RIGHT = 57] = "CONTROL_RIGHT", B[B.ENTER = 58] = "ENTER", B[B.META_LEFT = 59] = "META_LEFT", B[B.META_RIGHT = 60] = "META_RIGHT", B[B.SHIFT_LEFT = 61] = "SHIFT_LEFT", B[B.SHIFT_RIGHT = 62] = "SHIFT_RIGHT", B[B.SPACE = 63] = "SPACE", B[B.TAB = 64] = "TAB", B[B.CONVERT = 65] = "CONVERT", B[B.KANA_MODE = 66] = "KANA_MODE", B[B.NON_CONVERT = 67] = "NON_CONVERT", B[B.DELETE = 68] = "DELETE", B[B.END = 69] = "END", B[B.HELP = 70] = "HELP", B[B.HOME = 71] = "HOME", B[B.INSERT = 72] = "INSERT", B[B.PAGE_DOWN = 73] = "PAGE_DOWN", B[B.PAGE_UP = 74] = "PAGE_UP", B[B.DOWN = 75] = "DOWN", B[B.LEFT = 76] = "LEFT", B[B.RIGHT = 77] = "RIGHT", B[B.UP = 78] = "UP", B[B.NUM_LOCK = 79] = "NUM_LOCK", B[B.KP_0 = 80] = "KP_0", B[B.KP_1 = 81] = "KP_1", B[B.KP_2 = 82] = "KP_2", B[B.KP_3 = 83] = "KP_3", B[B.KP_4 = 84] = "KP_4", B[B.KP_5 = 85] = "KP_5", B[B.KP_6 = 86] = "KP_6", B[B.KP_7 = 87] = "KP_7", B[B.KP_8 = 88] = "KP_8", B[B.KP_9 = 89] = "KP_9", B[B.KP_PLUS = 90] = "KP_PLUS", B[B.KP_BACKSPACE = 91] = "KP_BACKSPACE", B[B.KP_CLEAR = 92] = "KP_CLEAR", B[B.KP_CLEAR_ENTRY = 93] = "KP_CLEAR_ENTRY", B[B.KP_COMMA = 94] = "KP_COMMA", B[B.KP_PERIOD = 95] = "KP_PERIOD", B[B.KP_DIVIDE = 96] = "KP_DIVIDE", B[B.KP_ENTER = 97] = "KP_ENTER", B[B.KP_EQUAL = 98] = "KP_EQUAL", B[B.KP_MEMORY_ADD = 99] = "KP_MEMORY_ADD", B[B.KP_MEMORY_CLEAR = 100] = "KP_MEMORY_CLEAR", B[B.KP_MEMORY_RECALL = 101] = "KP_MEMORY_RECALL", B[B.KP_MEMORY_STORE = 102] = "KP_MEMORY_STORE", B[B.KP_MEMORY_SUBTRACT = 103] = "KP_MEMORY_SUBTRACT", B[B.KP_MULTIPLY = 104] = "KP_MULTIPLY", B[B.KP_PAREN_LEFT = 105] = "KP_PAREN_LEFT", B[B.KP_PAREN_RIGHT = 106] = "KP_PAREN_RIGHT", B[B.KP_MINUS = 107] = "KP_MINUS", B[B.KP_SEPARATOR = 108] = "KP_SEPARATOR", B[B.NUMPAD_UP = 109] = "NUMPAD_UP", B[B.NUMPAD_DOWN = 110] = "NUMPAD_DOWN", B[B.NUMPAD_RIGHT = 111] = "NUMPAD_RIGHT", B[B.NUMPAD_LEFT = 112] = "NUMPAD_LEFT", B[B.NUMPAD_BEGIN = 113] = "NUMPAD_BEGIN", B[B.NUMPAD_HOME = 114] = "NUMPAD_HOME", B[B.NUMPAD_END = 115] = "NUMPAD_END", B[B.NUMPAD_INSERT = 116] = "NUMPAD_INSERT", B[B.NUMPAD_DELETE = 117] = "NUMPAD_DELETE", B[B.NUMPAD_PAGE_UP = 118] = "NUMPAD_PAGE_UP", B[B.NUMPAD_PAGE_DOWN = 119] = "NUMPAD_PAGE_DOWN", B[B.ESCAPE = 120] = "ESCAPE", B[B.F1 = 121] = "F1", B[B.F2 = 122] = "F2", B[B.F3 = 123] = "F3", B[B.F4 = 124] = "F4", B[B.F5 = 125] = "F5", B[B.F6 = 126] = "F6", B[B.F7 = 127] = "F7", B[B.F8 = 128] = "F8", B[B.F9 = 129] = "F9", B[B.F10 = 130] = "F10", B[B.F11 = 131] = "F11", B[B.F12 = 132] = "F12", B[B.F13 = 133] = "F13", B[B.F14 = 134] = "F14", B[B.F15 = 135] = "F15", B[B.F16 = 136] = "F16", B[B.F17 = 137] = "F17", B[B.F18 = 138] = "F18", B[B.F19 = 139] = "F19", B[B.F20 = 140] = "F20", B[B.F21 = 141] = "F21", B[B.F22 = 142] = "F22", B[B.F23 = 143] = "F23", B[B.F24 = 144] = "F24", B[B.F25 = 145] = "F25", B[B.FN_LOCK = 146] = "FN_LOCK", B[B.PRINT_SCREEN = 147] = "PRINT_SCREEN", B[B.SCROLL_LOCK = 148] = "SCROLL_LOCK", B[B.PAUSE = 149] = "PAUSE", B[B.BROWSER_BACK = 150] = "BROWSER_BACK", B[B.BROWSER_FAVORITES = 151] = "BROWSER_FAVORITES", B[B.BROWSER_FORWARD = 152] = "BROWSER_FORWARD", B[B.BROWSER_HOME = 153] = "BROWSER_HOME", B[B.BROWSER_REFRESH = 154] = "BROWSER_REFRESH", B[B.BROWSER_SEARCH = 155] = "BROWSER_SEARCH", B[B.BROWSER_STOP = 156] = "BROWSER_STOP", B[B.EJECT = 157] = "EJECT", B[B.LAUNCH_APP_1 = 158] = "LAUNCH_APP_1", B[B.LAUNCH_APP_2 = 159] = "LAUNCH_APP_2", B[B.LAUNCH_MAIL = 160] = "LAUNCH_MAIL", B[B.MEDIA_PLAY_PAUSE = 161] = "MEDIA_PLAY_PAUSE", B[B.MEDIA_SELECT = 162] = "MEDIA_SELECT", B[B.MEDIA_STOP = 163] = "MEDIA_STOP", B[B.MEDIA_TRACK_NEXT = 164] = "MEDIA_TRACK_NEXT", B[B.MEDIA_TRACK_PREVIOUS = 165] = "MEDIA_TRACK_PREVIOUS", B[B.POWER = 166] = "POWER", B[B.SLEEP = 167] = "SLEEP", B[B.AUDIO_VOLUME_DOWN = 168] = "AUDIO_VOLUME_DOWN", B[B.AUDIO_VOLUME_MUTE = 169] = "AUDIO_VOLUME_MUTE", B[B.AUDIO_VOLUME_UP = 170] = "AUDIO_VOLUME_UP", B[B.WAKE_UP = 171] = "WAKE_UP", B[B.COPY = 172] = "COPY", B[B.CUT = 173] = "CUT", B[B.PASTE = 174] = "PASTE", B))(i || {}), r = /* @__PURE__ */ ((B) => (B[B.NONE = 0] = "NONE", B[B.SHIFT = 1] = "SHIFT", B[B.CTRL = 2] = "CTRL", B[B.ALT = 4] = "ALT", B[B.SUPER = 8] = "SUPER", B[B.CAPSLOCK = 16] = "CAPSLOCK", B[B.NUMLOCK = 32] = "NUMLOCK", B))(r || {}), S = /* @__PURE__ */ ((B) => (B[B.NONE = 0] = "NONE", B[B.PARTIAL = 1] = "PARTIAL", B[B.FULL = 2] = "FULL", B))(S || {});
3
3
  const f = 80;
4
4
  var G = /* @__PURE__ */ ((B) => (B[B.BOLD = 1] = "BOLD", B[B.ITALIC = 2] = "ITALIC", B[B.UNDERLINE = 4] = "UNDERLINE", B[B.STRIKETHROUGH = 8] = "STRIKETHROUGH", B[B.INVERSE = 16] = "INVERSE", B[B.INVISIBLE = 32] = "INVISIBLE", B[B.BLINK = 64] = "BLINK", B[B.FAINT = 128] = "FAINT", B))(G || {});