@jxgame2020/dsh-token-quota 0.1.44 → 0.1.50

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/lib/client.js CHANGED
@@ -132,7 +132,7 @@ window.__ModuleLoader__.load({
132
132
  d.transcribe = settings;
133
133
  },
134
134
  setUpgrade: (d, upgrade) => {
135
- const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.44" ? upgrade : null;
135
+ const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.50" ? upgrade : null;
136
136
  if (d.upgrade === null || d.upgrade.latestVersion !== normalized?.latestVersion) d.upgradeDismissed = false;
137
137
  d.upgrade = normalized;
138
138
  },
@@ -252,157 +252,157 @@ window.__ModuleLoader__.load({
252
252
  }
253
253
  //#endregion
254
254
  //#region \0dsh-css:/Users/jxgame/Desktop/works/deepseek-harness-package/dsh-token-quota/packages/token-quota/src/client/TokenQuotaPanel.module.css.mjs
255
- const css$1 = ".NPLLIq_panel{box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;z-index:40;opacity:1;border-radius:12px;flex-direction:column;width:320px;max-height:min(72vh,560px);transition:opacity .18s;display:flex;position:fixed;top:56px;right:12px;overflow:hidden;box-shadow:0 8px 28px #0000002e}.NPLLIq_panelDim{opacity:.55}.NPLLIq_panelDimStrong{opacity:.3}.NPLLIq_header{border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;touch-action:none;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:8px;padding:10px 12px;display:flex}.NPLLIq_header:active{cursor:grabbing}.NPLLIq_headerText{flex-direction:column;gap:2px;min-width:0;display:flex}.NPLLIq_title{color:var(--dsw-alias-label-primary);align-items:baseline;gap:6px;font-size:13px;font-weight:600;display:flex}.NPLLIq_version{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:10px;font-weight:500}.NPLLIq_versionNew{color:var(--dsw-alias-status-warning-foreground,#b56900);background:var(--dsw-alias-status-warning-background,#fff6d7);cursor:default;border-radius:4px;padding:1px 6px}.NPLLIq_subtitle{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_notesBar{flex-wrap:wrap;flex:100%;align-items:center;gap:4px;padding:2px 0 0;display:flex}.NPLLIq_noteChip{width:20px;height:20px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;font-size:11px;line-height:1;transition:color .12s,border-color .12s;display:inline-flex}.NPLLIq_noteChip:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l2)}.NPLLIq_noteChipOpen{color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew{width:22px;height:20px;color:var(--dsw-alias-label-secondary);border:1px dashed var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;transition:color .12s,border-color .12s;display:inline-flex;position:relative}.NPLLIq_noteNew:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_noteNewPlus{color:inherit;font-size:10px;font-weight:700;line-height:1;position:absolute;bottom:-2px;right:-1px}.NPLLIq_noteWin{z-index:60;pointer-events:auto;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 24px #00000038}.NPLLIq_noteWinCollapsed{height:auto!important}.NPLLIq_noteWinBar{background:var(--dsw-alias-bg-layer-1);border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;flex:none;align-items:center;gap:4px;padding:4px 6px;display:flex}.NPLLIq_noteWinBar:active{cursor:grabbing}.NPLLIq_noteWinGripBar{color:var(--dsw-alias-label-secondary);opacity:.7;flex:none;font-size:10px}.NPLLIq_noteWinTitleText{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;padding:1px 2px;font-size:11px;font-weight:600;overflow:hidden}.NPLLIq_noteWinTitle{min-width:0;color:var(--dsw-alias-label-primary);background:0 0;border:1px solid #0000;border-radius:4px;outline:none;flex:1;padding:1px 2px;font-size:11px;font-weight:600}.NPLLIq_noteWinTitle:hover{border-color:var(--dsw-alias-border-l1)}.NPLLIq_noteWinTitle:focus{background:var(--dsw-alias-bg-overlay);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteWinBtn{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_noteWinBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2)}.NPLLIq_noteWinText{box-sizing:border-box;width:100%;min-height:0;color:var(--dsw-alias-label-primary);resize:none;background:0 0;border:none;outline:none;flex:1;padding:6px 8px;font-family:inherit;font-size:11px;line-height:1.5}.NPLLIq_noteWinResize{cursor:nwse-resize;background:linear-gradient(135deg, transparent 0 45%, var(--dsw-alias-border-l2) 45% 55%, transparent 55% 70%, var(--dsw-alias-border-l2) 70% 80%, transparent 80%);width:14px;height:14px;position:absolute;bottom:0;right:0}.NPLLIq_noteMenuBackdrop{z-index:100;pointer-events:auto;position:fixed;inset:0}.NPLLIq_noteMenu{z-index:101;pointer-events:auto;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;min-width:96px;padding:4px;display:flex;position:fixed;box-shadow:0 8px 24px #0000003d}.NPLLIq_noteMenuItem{text-align:left;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;border-radius:5px;padding:5px 8px;font-size:11px}.NPLLIq_noteMenuItem:hover{background:var(--dsw-alias-bg-layer-2)}.NPLLIq_collapse{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_collapse:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_body{padding:4px 0;overflow-y:auto}.NPLLIq_row{border-bottom:1px solid var(--dsw-alias-border-l1);flex-direction:column;gap:6px;padding:8px 12px;display:flex}.NPLLIq_rowHeader{justify-content:space-between;align-items:center;gap:8px;display:flex}.NPLLIq_rowDrag{cursor:grab;color:var(--dsw-alias-label-secondary);user-select:none;border-radius:4px;flex:none;margin-right:2px;padding:2px 3px;font-size:11px;line-height:1}.NPLLIq_rowDrag:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_rowDrag:active{cursor:grabbing}.NPLLIq_rowDragging{opacity:.45}.NPLLIq_rowDropTarget{box-shadow:inset 0 2px 0 var(--dsw-alias-brand-primary)}.NPLLIq_rowName{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;align-items:center;gap:6px;font-size:12px;font-weight:500;display:inline-flex;overflow:hidden}.NPLLIq_currentBadge{color:var(--dsw-alias-state-success-primary);border:1px solid var(--dsw-alias-state-success-primary);border-radius:8px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_rowMeta{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.NPLLIq_bar{background:var(--dsw-alias-bg-layer-1);border-radius:3px;height:6px;overflow:hidden}.NPLLIq_fillIdle{background:var(--dsw-alias-brand-primary);height:100%;transition:width .2s}.NPLLIq_fillWarn{background:var(--dsw-alias-state-warn-primary);height:100%;transition:width .2s}.NPLLIq_fillOver{background:var(--dsw-alias-state-error-primary);height:100%;transition:width .2s}.NPLLIq_controls{align-items:center;gap:6px;display:flex}.NPLLIq_input{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);min-width:0;color:var(--dsw-alias-label-primary);border-radius:6px;flex:1;padding:4px 8px;font-size:11px}.NPLLIq_input::placeholder{color:var(--dsw-alias-label-secondary)}.NPLLIq_save,.NPLLIq_switch{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;flex:none;padding:4px 10px;font-size:11px}.NPLLIq_save:hover,.NPLLIq_switch:hover:not(:disabled){background:var(--dsw-alias-bg-layer-2)}.NPLLIq_switch:disabled{opacity:.5;cursor:default}.NPLLIq_balanceToggle{margin-left:auto}.NPLLIq_balanceToggleOpen{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceWin{z-index:1199;background:var(--dsw-alias-bg-layer-2);width:280px;color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;border-radius:12px;flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 24px #00000029}.NPLLIq_balanceWinHeader{border-bottom:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-3);user-select:none;align-items:center;gap:6px;padding:6px 8px 6px 12px;display:flex}.NPLLIq_balanceWinTitle{flex:1;font-size:12px;font-weight:600;line-height:1}.NPLLIq_balanceWinBody{font-variant-numeric:tabular-nums;padding:6px 10px 10px;font-size:11px}.NPLLIq_balanceRowHeader{border-bottom:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);grid-template-columns:1fr auto 20px;align-items:center;gap:6px;padding:3px 2px;font-weight:600;display:grid}.NPLLIq_balanceSortBtn{all:unset;cursor:pointer;color:inherit;border-radius:4px;padding:1px 2px;font-size:10px;font-weight:600}.NPLLIq_balanceSortBtn:hover{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRefreshAll{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceRefreshAll:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRefreshAll:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_balanceRow{grid-template-columns:1fr auto 20px;align-items:center;gap:6px;padding:3px 2px;display:grid}.NPLLIq_balanceRow+.NPLLIq_balanceRow{border-top:1px dashed var(--dsw-alias-border-l1)}.NPLLIq_balanceRowName{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-weight:500;overflow:hidden}.NPLLIq_balanceRowValue{text-align:right;font-weight:600}.NPLLIq_balanceRowRefresh{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceRowRefresh:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRowRefresh:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_balanceValueOk{color:var(--dsw-alias-label-primary)}.NPLLIq_balanceValueLow{color:var(--dsw-alias-state-warn-primary)}.NPLLIq_balanceValueError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_balanceStateHint{color:var(--dsw-alias-label-secondary);font-style:italic;font-weight:500}.NPLLIq_balanceStateError{color:var(--dsw-alias-state-error-primary);font-weight:500}.NPLLIq_balanceLastLine{border-top:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-tertiary);margin-top:6px;padding-top:5px;font-size:10px}.NPLLIq_balanceBar{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);font-variant-numeric:tabular-nums;justify-content:space-between;align-items:center;gap:6px;padding:5px 12px;font-size:11px;display:flex}.NPLLIq_balanceBarText{text-overflow:ellipsis;white-space:nowrap;align-items:center;gap:6px;min-width:0;font-weight:600;display:inline-flex;overflow:hidden}.NPLLIq_balanceBarBadge{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1);border-radius:4px;flex:none;padding:0 4px;font-size:10px;font-weight:600}.NPLLIq_balanceBarDim{color:var(--dsw-alias-label-secondary);font-weight:500}.NPLLIq_balanceBarLow{color:var(--dsw-alias-state-warn-primary)}.NPLLIq_balanceBarError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_balanceBarRefresh{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceBarRefresh:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceBarRefresh:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_notice,.NPLLIq_noticeError{color:var(--dsw-alias-label-secondary);padding:10px 12px;font-size:12px}.NPLLIq_noticeError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_tab{background:var(--dsw-alias-brand-primary);border:1px solid var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay);pointer-events:auto;cursor:pointer;z-index:90;border-radius:10px;align-items:center;gap:6px;padding:9px 14px;font-size:12px;font-weight:600;display:inline-flex;position:fixed;top:56px;right:12px;box-shadow:0 6px 20px #00000040}.NPLLIq_tab:hover{filter:brightness(1.08)}.NPLLIq_tabIcon{font-size:12px;line-height:1}.NPLLIq_tabLabel{white-space:nowrap}.NPLLIq_headerActions{flex:none;align-items:center;gap:4px;display:flex}.NPLLIq_settingsBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_settingsBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_settingsBtnActive{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-2,#0000000f);box-shadow:inset 0 0 0 1px var(--dsw-alias-brand-primary);font-weight:700}.NPLLIq_selectBtn{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-brand-primary);cursor:pointer;background:0 0;border-radius:6px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_selectBtn:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_gearBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;flex:none;margin-left:6px;padding:0 2px;font-size:12px;line-height:1}.NPLLIq_gearBtn:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_fullNotice{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-state-error-primary);border-radius:8px;margin:6px 12px;padding:8px 10px;font-size:12px}.NPLLIq_upgradeBanner{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-divider-1,#0000001a);border-radius:8px;margin:6px 12px;padding:10px 30px 10px 10px;font-size:12px;position:relative}@keyframes NPLLIq_upgradeBannerFlash{0%,to{border-color:var(--dsw-alias-divider-1,#0000001a);box-shadow:0 0 #f0a02000}50%{border-color:var(--dsw-alias-status-warning-foreground,#b56900);box-shadow:0 0 0 5px #f0a02073}}.NPLLIq_upgradeBannerFlash{border-color:var(--dsw-alias-status-warning-foreground,#b56900);animation:.6s ease-in-out 4 NPLLIq_upgradeBannerFlash}.NPLLIq_upgradeBannerText{margin-bottom:6px;font-weight:600}.NPLLIq_upgradeCommands{flex-direction:column;gap:4px;display:flex}.NPLLIq_upgradeCommandRow{align-items:center;gap:6px;display:flex}.NPLLIq_upgradeCommand{background:var(--dsw-alias-bg-layer-2,#0000000a);white-space:nowrap;border-radius:4px;flex:1;min-width:0;padding:4px 6px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;overflow-x:auto}.NPLLIq_copyBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;flex:none;padding:3px 8px;font-size:11px;transition:transform 80ms,background .12s,color .12s}.NPLLIq_copyBtn:hover{background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_copyBtn:active{transform:scale(.92)}.NPLLIq_copyBtnDone{background:var(--dsw-alias-status-success-background,#14963c1f);border-color:var(--dsw-alias-status-success-foreground,#0a7d32);color:var(--dsw-alias-status-success-foreground,#0a7d32);font-weight:600}.NPLLIq_upgradeHint{color:var(--dsw-alias-label-secondary);margin-top:6px;font-size:11px}.NPLLIq_upgradeClose{width:20px;height:20px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;font-size:16px;line-height:1;position:absolute;top:4px;right:6px}.NPLLIq_upgradeClose:hover{background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary)}.NPLLIq_checkUpdatesRow{justify-content:space-between;align-items:center;gap:12px;display:flex}.NPLLIq_checkUpdatesLabel{color:var(--dsw-alias-label-primary);cursor:pointer;align-items:center;gap:6px;font-size:12px;display:flex}.NPLLIq_checkUpdatesLabel input{margin:0}.NPLLIq_checkUpdatesLabel input[type=range]{min-width:90px;accent-color:var(--dsw-alias-brand-primary);flex:1}.NPLLIq_checkUpdatesLabel select{background:var(--dsw-alias-bg-layer-2,#0000000a);min-width:90px;color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-divider-1,#00000026);border-radius:4px;flex:1;padding:2px 4px;font-size:12px}.NPLLIq_checkBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;text-align:center;border-radius:4px;flex:none;min-width:72px;padding:4px 10px;font-size:12px}.NPLLIq_checkBtn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_checkBtn:disabled{opacity:.6;cursor:default}.NPLLIq_checkErrorHint{color:var(--dsw-alias-state-error-primary,#c00);background:var(--dsw-alias-state-error-background,#ff00000f);border:1px solid var(--dsw-alias-state-error-border,#b4000040);word-break:break-all;border-radius:6px;margin-top:8px;padding:6px 8px;font-size:11px;line-height:1.4}.NPLLIq_dialog{z-index:100;pointer-events:auto;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;gap:12px;width:430px;max-width:94vw;max-height:80vh;padding:14px;display:flex;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%);box-shadow:0 8px 28px #00000040}.NPLLIq_dialogTabs{border-bottom:1px solid var(--dsw-alias-divider-1,#00000014);gap:2px;margin:-6px -14px 0;padding:0 14px;display:flex}.NPLLIq_dialogTab{appearance:none;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;padding:6px 12px 8px;font-size:12px}.NPLLIq_dialogTab:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_dialogTabActive{color:var(--dsw-alias-brand-primary);border-bottom-color:var(--dsw-alias-brand-primary);font-weight:600}.NPLLIq_settingsDialog{height:min(560px,80vh)}.NPLLIq_dialogTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}.NPLLIq_dialogSection{flex-direction:column;gap:6px;display:flex}.NPLLIq_dialogLabel{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:500}.NPLLIq_monitorHint{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_dialogHint{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:11px;line-height:1.4}.NPLLIq_monitorList{flex-direction:column;gap:2px;max-height:180px;display:flex;overflow-y:auto}.NPLLIq_monitorRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:2px 4px;font-size:12px;display:flex}.NPLLIq_monitorRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_monitorName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.NPLLIq_radioRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:3px 4px;font-size:12px;display:flex}.NPLLIq_radioRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_dialogActions{justify-content:flex-end;gap:6px;display:flex}.NPLLIq_dialogBtn,.NPLLIq_dialogBtnPrimary{border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:6px;padding:4px 12px;font-size:11px}.NPLLIq_dialogBtn{background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}.NPLLIq_dialogBtnPrimary{background:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay)}.NPLLIq_dialogHeader{z-index:2;background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;justify-content:space-between;align-items:center;gap:8px;margin:-14px -14px 0;padding:14px 14px 8px;display:flex;position:sticky;top:-14px}.NPLLIq_dialogHeader:active{cursor:grabbing}.NPLLIq_dialogClose{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:8px;flex:none;justify-content:center;align-items:center;font-size:18px;line-height:1;display:flex}.NPLLIq_dialogClose:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_resetRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.NPLLIq_resetSelect{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:6px;padding:3px 6px;font-size:12px}.NPLLIq_logTable{border-collapse:collapse;width:100%;font-size:11px}.NPLLIq_logTable th{text-align:left;color:var(--dsw-alias-label-secondary);border-bottom:1px solid var(--dsw-alias-border-l1);padding:4px 6px;font-weight:500}.NPLLIq_logTable td{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);font-variant-numeric:tabular-nums;padding:4px 6px}.NPLLIq_logDayCol{white-space:nowrap;color:var(--dsw-alias-label-secondary)}.NPLLIq_logModelCol{text-overflow:ellipsis;white-space:nowrap;max-width:160px;overflow:hidden}.NPLLIq_logUsedCol{text-align:right}.NPLLIq_logDialog{gap:0;width:380px;max-height:min(72vh,480px);padding:0}.NPLLIq_logHeader{background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;flex:none;justify-content:space-between;align-items:center;gap:8px;padding:14px 14px 8px;display:flex}.NPLLIq_logHeader:active{cursor:grabbing}.NPLLIq_logScroll{flex:1;min-height:0;padding:0 14px 14px;overflow:auto}.NPLLIq_logToolbar{flex:1;align-items:center;gap:6px;display:flex}.NPLLIq_logSearch{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);min-width:0;color:var(--dsw-alias-label-primary);border-radius:4px;flex:1;padding:3px 6px;font-size:11px}.NPLLIq_logSearch:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}.NPLLIq_logClearBtn{border:1px solid var(--dsw-alias-state-error-border,#b400004d);color:var(--dsw-alias-state-error-primary,#c00);cursor:pointer;white-space:nowrap;background:0 0;border-radius:4px;flex:none;padding:3px 8px;font-size:11px}.NPLLIq_logClearBtn:hover{background:var(--dsw-alias-state-error-background,#ff00000f)}.NPLLIq_logPager{border-top:1px solid var(--dsw-alias-divider-1,#00000014);background:var(--dsw-alias-bg-overlay);color:var(--dsw-alias-label-secondary);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:6px 14px;font-size:11px;display:flex}.NPLLIq_logPagerInfo{white-space:nowrap}.NPLLIq_logPagerControls{align-items:center;gap:4px;display:flex}.NPLLIq_logPagerBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:24px;height:24px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;font-size:13px;line-height:1}.NPLLIq_logPagerBtn:disabled{opacity:.4;cursor:default}.NPLLIq_logPagerPages{text-align:center;min-width:50px;color:var(--dsw-alias-label-secondary)}.NPLLIq_logPageSizeSelect{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;padding:2px 4px;font-size:11px}.NPLLIq_dialogOverlay{z-index:100001;pointer-events:auto;background:#0000004d;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.NPLLIq_logClearDialog{gap:0;width:320px;padding:16px}.NPLLIq_dialogBody{color:var(--dsw-alias-label-secondary);margin:6px 0 10px;font-size:12px;line-height:1.5}.NPLLIq_logClearDate{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:100%;color:var(--dsw-alias-label-primary);border-radius:6px;margin-bottom:12px;padding:6px 8px;font-size:13px}.NPLLIq_logClearDate:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}.NPLLIq_keyRow{align-items:center;gap:8px;margin-top:6px;display:flex}.NPLLIq_keySaveBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;border-radius:4px;flex:none;padding:4px 10px;font-size:12px}.NPLLIq_keySaveBtn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_keySaveBtn:disabled{opacity:.5;cursor:not-allowed}.NPLLIq_keyBadgeOk,.NPLLIq_keyBadgeOff{white-space:nowrap;border-radius:999px;padding:3px 7px;font-size:11px;line-height:1}.NPLLIq_keyBadgeOk{color:var(--dsw-alias-state-success-primary,#2f9e44);background:color-mix(in srgb, var(--dsw-alias-state-success-primary,#2f9e44) 14%, transparent)}.NPLLIq_keyBadgeOff{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2,#0000000f)}.NPLLIq_keyError{word-break:break-word;color:var(--dsw-alias-state-error-primary,#e03131);margin-top:4px;font-size:11px;line-height:1.4}";
256
- const tagId$1 = "@jxgame2020/dsh-token-quota/TokenQuotaPanel.module.css";
257
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
255
+ const css$2 = ".NPLLIq_panel{box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;z-index:40;opacity:1;border-radius:12px;flex-direction:column;width:320px;max-height:min(72vh,560px);transition:opacity .18s;display:flex;position:fixed;top:56px;right:12px;overflow:hidden;box-shadow:0 8px 28px #0000002e}.NPLLIq_panelDim{opacity:.55}.NPLLIq_panelDimStrong{opacity:.45}.NPLLIq_header{border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;touch-action:none;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:8px;padding:10px 12px;display:flex}.NPLLIq_header:active{cursor:grabbing}.NPLLIq_headerText{flex-direction:column;gap:2px;min-width:0;display:flex}.NPLLIq_title{color:var(--dsw-alias-label-primary);align-items:baseline;gap:6px;font-size:13px;font-weight:600;display:flex}.NPLLIq_version{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:10px;font-weight:500}.NPLLIq_versionNew{color:var(--dsw-alias-status-warning-foreground,#b56900);background:var(--dsw-alias-status-warning-background,#fff6d7);cursor:default;border-radius:4px;padding:1px 6px}.NPLLIq_subtitle{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_notesBar{flex-wrap:wrap;flex:100%;align-items:center;gap:4px;padding:2px 0 0;display:flex}.NPLLIq_noteChip{width:20px;height:20px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;font-size:11px;line-height:1;transition:color .12s,border-color .12s;display:inline-flex}.NPLLIq_noteChip:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l2)}.NPLLIq_noteChipOpen{color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew{width:22px;height:20px;color:var(--dsw-alias-label-secondary);border:1px dashed var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;transition:color .12s,border-color .12s;display:inline-flex;position:relative}.NPLLIq_noteNew:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_noteNewPlus{color:inherit;font-size:10px;font-weight:700;line-height:1;position:absolute;bottom:-2px;right:-1px}.NPLLIq_noteWin{z-index:60;pointer-events:auto;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 24px #00000038}.NPLLIq_noteWinCollapsed{height:auto!important}.NPLLIq_noteWinBar{background:var(--dsw-alias-bg-layer-1);border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;flex:none;align-items:center;gap:4px;padding:4px 6px;display:flex}.NPLLIq_noteWinBar:active{cursor:grabbing}.NPLLIq_noteWinGripBar{color:var(--dsw-alias-label-secondary);opacity:.7;flex:none;font-size:10px}.NPLLIq_noteWinTitleText{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;padding:1px 2px;font-size:11px;font-weight:600;overflow:hidden}.NPLLIq_noteWinTitle{min-width:0;color:var(--dsw-alias-label-primary);background:0 0;border:1px solid #0000;border-radius:4px;outline:none;flex:1;padding:1px 2px;font-size:11px;font-weight:600}.NPLLIq_noteWinTitle:hover{border-color:var(--dsw-alias-border-l1)}.NPLLIq_noteWinTitle:focus{background:var(--dsw-alias-bg-overlay);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteWinBtn{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_noteWinBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2)}.NPLLIq_noteWinText{box-sizing:border-box;width:100%;min-height:0;color:var(--dsw-alias-label-primary);resize:none;background:0 0;border:none;outline:none;flex:1;padding:6px 8px;font-family:inherit;font-size:11px;line-height:1.5}.NPLLIq_noteWinResize{cursor:nwse-resize;background:linear-gradient(135deg, transparent 0 45%, var(--dsw-alias-border-l2) 45% 55%, transparent 55% 70%, var(--dsw-alias-border-l2) 70% 80%, transparent 80%);width:14px;height:14px;position:absolute;bottom:0;right:0}.NPLLIq_noteMenuBackdrop{z-index:100;pointer-events:auto;position:fixed;inset:0}.NPLLIq_noteMenu{z-index:101;pointer-events:auto;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;min-width:96px;padding:4px;display:flex;position:fixed;box-shadow:0 8px 24px #0000003d}.NPLLIq_noteMenuItem{text-align:left;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;border-radius:5px;padding:5px 8px;font-size:11px}.NPLLIq_noteMenuItem:hover{background:var(--dsw-alias-bg-layer-2)}.NPLLIq_collapse{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_collapse:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_body{padding:4px 0;overflow-y:auto}.NPLLIq_row{border-bottom:1px solid var(--dsw-alias-border-l1);flex-direction:column;gap:6px;padding:8px 12px;display:flex}.NPLLIq_rowHeader{justify-content:space-between;align-items:center;gap:8px;display:flex}.NPLLIq_rowDrag{cursor:grab;color:var(--dsw-alias-label-secondary);user-select:none;border-radius:4px;flex:none;margin-right:2px;padding:2px 3px;font-size:11px;line-height:1}.NPLLIq_rowDrag:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_rowDrag:active{cursor:grabbing}.NPLLIq_rowDragging{opacity:.45}.NPLLIq_rowDropTarget{box-shadow:inset 0 2px 0 var(--dsw-alias-brand-primary)}.NPLLIq_rowName{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;align-items:center;gap:6px;font-size:12px;font-weight:500;display:inline-flex;overflow:hidden}.NPLLIq_currentBadge{color:var(--dsw-alias-state-success-primary);border:1px solid var(--dsw-alias-state-success-primary);border-radius:8px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_rowMeta{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.NPLLIq_bar{background:var(--dsw-alias-bg-layer-1);border-radius:3px;height:6px;overflow:hidden}.NPLLIq_fillIdle{background:var(--dsw-alias-brand-primary);height:100%;transition:width .2s}.NPLLIq_fillWarn{background:var(--dsw-alias-state-warn-primary);height:100%;transition:width .2s}.NPLLIq_fillOver{background:var(--dsw-alias-state-error-primary);height:100%;transition:width .2s}.NPLLIq_controls{align-items:center;gap:6px;display:flex}.NPLLIq_input{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);min-width:0;color:var(--dsw-alias-label-primary);border-radius:6px;flex:1;padding:4px 8px;font-size:11px}.NPLLIq_input::placeholder{color:var(--dsw-alias-label-secondary)}.NPLLIq_save,.NPLLIq_switch{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;flex:none;padding:4px 10px;font-size:11px}.NPLLIq_save:hover,.NPLLIq_switch:hover:not(:disabled){background:var(--dsw-alias-bg-layer-2)}.NPLLIq_switch:disabled{opacity:.5;cursor:default}.NPLLIq_balanceToggle{margin-left:auto}.NPLLIq_balanceToggleOpen{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceWin{z-index:1199;background:var(--dsw-alias-bg-layer-2);width:280px;color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;border-radius:12px;flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 24px #00000029}.NPLLIq_balanceWinHeader{border-bottom:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-3);user-select:none;align-items:center;gap:6px;padding:6px 8px 6px 12px;display:flex}.NPLLIq_balanceWinTitle{flex:1;font-size:12px;font-weight:600;line-height:1}.NPLLIq_balanceWinBody{font-variant-numeric:tabular-nums;padding:6px 10px 10px;font-size:11px}.NPLLIq_balanceRowHeader{border-bottom:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);grid-template-columns:1fr auto 20px;align-items:center;gap:6px;padding:3px 2px;font-weight:600;display:grid}.NPLLIq_balanceSortBtn{all:unset;cursor:pointer;color:inherit;border-radius:4px;padding:1px 2px;font-size:10px;font-weight:600}.NPLLIq_balanceSortBtn:hover{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRefreshAll{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceRefreshAll:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRefreshAll:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_balanceRow{grid-template-columns:1fr auto 20px;align-items:center;gap:6px;padding:3px 2px;display:grid}.NPLLIq_balanceRow+.NPLLIq_balanceRow{border-top:1px dashed var(--dsw-alias-border-l1)}.NPLLIq_balanceRowName{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-weight:500;overflow:hidden}.NPLLIq_balanceRowValue{text-align:right;font-weight:600}.NPLLIq_balanceRowRefresh{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceRowRefresh:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRowRefresh:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_balanceValueOk{color:var(--dsw-alias-label-primary)}.NPLLIq_balanceValueLow{color:var(--dsw-alias-state-warn-primary)}.NPLLIq_balanceValueError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_balanceStateHint{color:var(--dsw-alias-label-secondary);font-style:italic;font-weight:500}.NPLLIq_balanceStateError{color:var(--dsw-alias-state-error-primary);font-weight:500}.NPLLIq_balanceLastLine{border-top:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-tertiary);margin-top:6px;padding-top:5px;font-size:10px}.NPLLIq_balanceBar{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);font-variant-numeric:tabular-nums;justify-content:space-between;align-items:center;gap:6px;padding:5px 12px;font-size:11px;display:flex}.NPLLIq_balanceBarText{text-overflow:ellipsis;white-space:nowrap;align-items:center;gap:6px;min-width:0;font-weight:600;display:inline-flex;overflow:hidden}.NPLLIq_balanceBarBadge{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1);border-radius:4px;flex:none;padding:0 4px;font-size:10px;font-weight:600}.NPLLIq_balanceBarDim{color:var(--dsw-alias-label-secondary);font-weight:500}.NPLLIq_balanceBarLow{color:var(--dsw-alias-state-warn-primary)}.NPLLIq_balanceBarError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_balanceBarRefresh{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceBarRefresh:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceBarRefresh:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_notice,.NPLLIq_noticeError{color:var(--dsw-alias-label-secondary);padding:10px 12px;font-size:12px}.NPLLIq_noticeError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_tab{background:var(--dsw-alias-brand-primary);border:1px solid var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay);pointer-events:auto;cursor:pointer;z-index:90;border-radius:10px;align-items:center;gap:6px;padding:9px 14px;font-size:12px;font-weight:600;display:inline-flex;position:fixed;top:56px;right:12px;box-shadow:0 6px 20px #00000040}.NPLLIq_tab:hover{filter:brightness(1.08)}.NPLLIq_tabIcon{font-size:12px;line-height:1}.NPLLIq_tabLabel{white-space:nowrap}.NPLLIq_headerActions{flex:none;align-items:center;gap:4px;display:flex}.NPLLIq_settingsBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_settingsBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_settingsBtnActive{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-2,#0000000f);box-shadow:inset 0 0 0 1px var(--dsw-alias-brand-primary);font-weight:700}.NPLLIq_selectBtn{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-brand-primary);cursor:pointer;background:0 0;border-radius:6px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_selectBtn:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_gearBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;flex:none;margin-left:6px;padding:0 2px;font-size:12px;line-height:1}.NPLLIq_gearBtn:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_fullNotice{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-state-error-primary);border-radius:8px;margin:6px 12px;padding:8px 10px;font-size:12px}.NPLLIq_upgradeBanner{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-divider-1,#0000001a);border-radius:8px;margin:6px 12px;padding:10px 30px 10px 10px;font-size:12px;position:relative}@keyframes NPLLIq_upgradeBannerFlash{0%,to{border-color:var(--dsw-alias-divider-1,#0000001a);box-shadow:0 0 #f0a02000}50%{border-color:var(--dsw-alias-status-warning-foreground,#b56900);box-shadow:0 0 0 5px #f0a02073}}.NPLLIq_upgradeBannerFlash{border-color:var(--dsw-alias-status-warning-foreground,#b56900);animation:.6s ease-in-out 4 NPLLIq_upgradeBannerFlash}.NPLLIq_upgradeBannerText{margin-bottom:6px;font-weight:600}.NPLLIq_upgradeCommands{flex-direction:column;gap:4px;display:flex}.NPLLIq_upgradeCommandRow{align-items:center;gap:6px;display:flex}.NPLLIq_upgradeCommand{background:var(--dsw-alias-bg-layer-2,#0000000a);white-space:nowrap;border-radius:4px;flex:1;min-width:0;padding:4px 6px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;overflow-x:auto}.NPLLIq_copyBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;flex:none;padding:3px 8px;font-size:11px;transition:transform 80ms,background .12s,color .12s}.NPLLIq_copyBtn:hover{background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_copyBtn:active{transform:scale(.92)}.NPLLIq_copyBtnDone{background:var(--dsw-alias-status-success-background,#14963c1f);border-color:var(--dsw-alias-status-success-foreground,#0a7d32);color:var(--dsw-alias-status-success-foreground,#0a7d32);font-weight:600}.NPLLIq_upgradeHint{color:var(--dsw-alias-label-secondary);margin-top:6px;font-size:11px}.NPLLIq_upgradeClose{width:20px;height:20px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;font-size:16px;line-height:1;position:absolute;top:4px;right:6px}.NPLLIq_upgradeClose:hover{background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary)}.NPLLIq_checkUpdatesRow{justify-content:space-between;align-items:center;gap:12px;display:flex}.NPLLIq_checkUpdatesLabel{color:var(--dsw-alias-label-primary);cursor:pointer;align-items:center;gap:6px;font-size:12px;display:flex}.NPLLIq_checkUpdatesLabel input{margin:0}.NPLLIq_checkUpdatesLabel input[type=range]{min-width:90px;accent-color:var(--dsw-alias-brand-primary);flex:1}.NPLLIq_checkUpdatesLabel select{background:var(--dsw-alias-bg-layer-2,#0000000a);min-width:90px;color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-divider-1,#00000026);border-radius:4px;flex:1;padding:2px 4px;font-size:12px}.NPLLIq_checkBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;text-align:center;border-radius:4px;flex:none;min-width:72px;padding:4px 10px;font-size:12px}.NPLLIq_checkBtn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_checkBtn:disabled{opacity:.6;cursor:default}.NPLLIq_checkErrorHint{color:var(--dsw-alias-state-error-primary,#c00);background:var(--dsw-alias-state-error-background,#ff00000f);border:1px solid var(--dsw-alias-state-error-border,#b4000040);word-break:break-all;border-radius:6px;margin-top:8px;padding:6px 8px;font-size:11px;line-height:1.4}.NPLLIq_dialog{z-index:100;pointer-events:auto;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;gap:12px;width:430px;max-width:94vw;max-height:80vh;padding:14px;display:flex;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%);box-shadow:0 8px 28px #00000040}.NPLLIq_dialogTabs{border-bottom:1px solid var(--dsw-alias-divider-1,#00000014);gap:2px;margin:-6px -14px 0;padding:0 14px;display:flex}.NPLLIq_dialogTab{appearance:none;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;padding:6px 12px 8px;font-size:12px}.NPLLIq_dialogTab:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_dialogTabActive{color:var(--dsw-alias-brand-primary);border-bottom-color:var(--dsw-alias-brand-primary);font-weight:600}.NPLLIq_settingsDialog{height:min(560px,80vh)}.NPLLIq_dialogTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}.NPLLIq_dialogSection{flex-direction:column;gap:6px;display:flex}.NPLLIq_dialogLabel{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:500}.NPLLIq_monitorHint{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_dialogHint{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:11px;line-height:1.4}.NPLLIq_monitorList{flex-direction:column;gap:2px;max-height:180px;display:flex;overflow-y:auto}.NPLLIq_monitorRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:2px 4px;font-size:12px;display:flex}.NPLLIq_monitorRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_monitorName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.NPLLIq_radioRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:3px 4px;font-size:12px;display:flex}.NPLLIq_radioRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_dialogActions{justify-content:flex-end;gap:6px;display:flex}.NPLLIq_dialogBtn,.NPLLIq_dialogBtnPrimary{border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:6px;padding:4px 12px;font-size:11px}.NPLLIq_dialogBtn{background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}.NPLLIq_dialogBtnPrimary{background:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay)}.NPLLIq_dialogHeader{z-index:2;background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;justify-content:space-between;align-items:center;gap:8px;margin:-14px -14px 0;padding:14px 14px 8px;display:flex;position:sticky;top:-14px}.NPLLIq_dialogHeader:active{cursor:grabbing}.NPLLIq_dialogClose{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:8px;flex:none;justify-content:center;align-items:center;font-size:18px;line-height:1;display:flex}.NPLLIq_dialogClose:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_resetRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.NPLLIq_resetSelect{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:6px;padding:3px 6px;font-size:12px}.NPLLIq_logTable{border-collapse:collapse;width:100%;font-size:11px}.NPLLIq_logTable th{text-align:left;color:var(--dsw-alias-label-secondary);border-bottom:1px solid var(--dsw-alias-border-l1);padding:4px 6px;font-weight:500}.NPLLIq_logTable td{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);font-variant-numeric:tabular-nums;padding:4px 6px}.NPLLIq_logDayCol{white-space:nowrap;color:var(--dsw-alias-label-secondary)}.NPLLIq_logModelCol{text-overflow:ellipsis;white-space:nowrap;max-width:160px;overflow:hidden}.NPLLIq_logUsedCol{text-align:right}.NPLLIq_logDialog{gap:0;width:380px;max-height:min(72vh,480px);padding:0}.NPLLIq_logHeader{background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;flex:none;justify-content:space-between;align-items:center;gap:8px;padding:14px 14px 8px;display:flex}.NPLLIq_logHeader:active{cursor:grabbing}.NPLLIq_logScroll{flex:1;min-height:0;padding:0 14px 14px;overflow:auto}.NPLLIq_logToolbar{flex:1;align-items:center;gap:6px;display:flex}.NPLLIq_logSearch{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);min-width:0;color:var(--dsw-alias-label-primary);border-radius:4px;flex:1;padding:3px 6px;font-size:11px}.NPLLIq_logSearch:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}.NPLLIq_logClearBtn{border:1px solid var(--dsw-alias-state-error-border,#b400004d);color:var(--dsw-alias-state-error-primary,#c00);cursor:pointer;white-space:nowrap;background:0 0;border-radius:4px;flex:none;padding:3px 8px;font-size:11px}.NPLLIq_logClearBtn:hover{background:var(--dsw-alias-state-error-background,#ff00000f)}.NPLLIq_logPager{border-top:1px solid var(--dsw-alias-divider-1,#00000014);background:var(--dsw-alias-bg-overlay);color:var(--dsw-alias-label-secondary);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:6px 14px;font-size:11px;display:flex}.NPLLIq_logPagerInfo{white-space:nowrap}.NPLLIq_logPagerControls{align-items:center;gap:4px;display:flex}.NPLLIq_logPagerBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:24px;height:24px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;font-size:13px;line-height:1}.NPLLIq_logPagerBtn:disabled{opacity:.4;cursor:default}.NPLLIq_logPagerPages{text-align:center;min-width:50px;color:var(--dsw-alias-label-secondary)}.NPLLIq_logPageSizeSelect{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;padding:2px 4px;font-size:11px}.NPLLIq_dialogOverlay{z-index:100001;pointer-events:auto;background:#0000004d;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.NPLLIq_logClearDialog{gap:0;width:320px;padding:16px}.NPLLIq_dialogBody{color:var(--dsw-alias-label-secondary);margin:6px 0 10px;font-size:12px;line-height:1.5}.NPLLIq_logClearDate{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:100%;color:var(--dsw-alias-label-primary);border-radius:6px;margin-bottom:12px;padding:6px 8px;font-size:13px}.NPLLIq_logClearDate:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}.NPLLIq_keyRow{align-items:center;gap:8px;margin-top:6px;display:flex}.NPLLIq_keySaveBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;border-radius:4px;flex:none;padding:4px 10px;font-size:12px}.NPLLIq_keySaveBtn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_keySaveBtn:disabled{opacity:.5;cursor:not-allowed}.NPLLIq_keyBadgeOk,.NPLLIq_keyBadgeOff{white-space:nowrap;border-radius:999px;padding:3px 7px;font-size:11px;line-height:1}.NPLLIq_keyBadgeOk{color:var(--dsw-alias-state-success-primary,#2f9e44);background:color-mix(in srgb, var(--dsw-alias-state-success-primary,#2f9e44) 14%, transparent)}.NPLLIq_keyBadgeOff{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2,#0000000f)}.NPLLIq_keyError{word-break:break-word;color:var(--dsw-alias-state-error-primary,#e03131);margin-top:4px;font-size:11px;line-height:1.4}";
256
+ const tagId$2 = "@jxgame2020/dsh-token-quota/TokenQuotaPanel.module.css";
257
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
258
258
  const tag = document.createElement("style");
259
259
  tag.dataset.plugin = "@jxgame2020/dsh-token-quota";
260
- tag.dataset.pluginCss = tagId$1;
261
- tag.textContent = css$1;
260
+ tag.dataset.pluginCss = tagId$2;
261
+ tag.textContent = css$2;
262
262
  document.head.appendChild(tag);
263
263
  }
264
264
  var TokenQuotaPanel_module_css_default = {
265
- "tabIcon": "NPLLIq_tabIcon",
266
- "copyBtn": "NPLLIq_copyBtn",
267
- "balanceBarDim": "NPLLIq_balanceBarDim",
268
- "selectBtn": "NPLLIq_selectBtn",
269
- "radioRow": "NPLLIq_radioRow",
270
- "tab": "NPLLIq_tab",
271
- "rowHeader": "NPLLIq_rowHeader",
272
- "logModelCol": "NPLLIq_logModelCol",
273
- "balanceRowName": "NPLLIq_balanceRowName",
274
- "dialogSection": "NPLLIq_dialogSection",
275
- "dialogOverlay": "NPLLIq_dialogOverlay",
276
- "headerText": "NPLLIq_headerText",
277
- "balanceStateHint": "NPLLIq_balanceStateHint",
278
- "noteMenuBackdrop": "NPLLIq_noteMenuBackdrop",
279
- "balanceWinHeader": "NPLLIq_balanceWinHeader",
280
- "balanceRowHeader": "NPLLIq_balanceRowHeader",
265
+ "controls": "NPLLIq_controls",
281
266
  "noteWinResize": "NPLLIq_noteWinResize",
282
- "notice": "NPLLIq_notice",
283
- "panel": "NPLLIq_panel",
284
- "logPagerPages": "NPLLIq_logPagerPages",
285
- "keyBadgeOff": "NPLLIq_keyBadgeOff",
286
- "noteWinGripBar": "NPLLIq_noteWinGripBar",
287
- "checkErrorHint": "NPLLIq_checkErrorHint",
288
- "logTable": "NPLLIq_logTable",
289
- "dialogLabel": "NPLLIq_dialogLabel",
290
- "noteChipOpen": "NPLLIq_noteChipOpen",
291
- "balanceLastLine": "NPLLIq_balanceLastLine",
292
- "monitorList": "NPLLIq_monitorList",
293
- "logSearch": "NPLLIq_logSearch",
294
- "bar": "NPLLIq_bar",
295
267
  "balanceRefreshAll": "NPLLIq_balanceRefreshAll",
296
- "save": "NPLLIq_save",
297
- "balanceBar": "NPLLIq_balanceBar",
298
- "balanceSortBtn": "NPLLIq_balanceSortBtn",
299
- "balanceWinTitle": "NPLLIq_balanceWinTitle",
268
+ "logClearDate": "NPLLIq_logClearDate",
269
+ "balanceBarError": "NPLLIq_balanceBarError",
300
270
  "logClearBtn": "NPLLIq_logClearBtn",
301
- "noteWinBar": "NPLLIq_noteWinBar",
302
- "logClearDialog": "NPLLIq_logClearDialog",
303
- "noteMenu": "NPLLIq_noteMenu",
304
- "upgradeCommandRow": "NPLLIq_upgradeCommandRow",
305
- "monitorHint": "NPLLIq_monitorHint",
306
- "resetSelect": "NPLLIq_resetSelect",
307
- "subtitle": "NPLLIq_subtitle",
308
- "rowDropTarget": "NPLLIq_rowDropTarget",
309
- "settingsBtnActive": "NPLLIq_settingsBtnActive",
310
- "notesBar": "NPLLIq_notesBar",
311
- "upgradeCommands": "NPLLIq_upgradeCommands",
312
- "logDayCol": "NPLLIq_logDayCol",
313
- "balanceStateError": "NPLLIq_balanceStateError",
271
+ "version": "NPLLIq_version",
272
+ "balanceWinBody": "NPLLIq_balanceWinBody",
273
+ "balanceValueError": "NPLLIq_balanceValueError",
274
+ "gearBtn": "NPLLIq_gearBtn",
275
+ "settingsBtn": "NPLLIq_settingsBtn",
276
+ "rowDrag": "NPLLIq_rowDrag",
277
+ "upgradeBanner": "NPLLIq_upgradeBanner",
278
+ "balanceSortBtn": "NPLLIq_balanceSortBtn",
279
+ "logPagerInfo": "NPLLIq_logPagerInfo",
280
+ "noteNewPlus": "NPLLIq_noteNewPlus",
281
+ "fillIdle": "NPLLIq_fillIdle",
282
+ "balanceBarLow": "NPLLIq_balanceBarLow",
314
283
  "upgradeHint": "NPLLIq_upgradeHint",
315
- "controls": "NPLLIq_controls",
316
- "input": "NPLLIq_input",
317
- "noteChip": "NPLLIq_noteChip",
318
- "logPagerBtn": "NPLLIq_logPagerBtn",
319
- "logDialog": "NPLLIq_logDialog",
320
- "dialogHeader": "NPLLIq_dialogHeader",
321
- "monitorName": "NPLLIq_monitorName",
322
- "noteWinCollapsed": "NPLLIq_noteWinCollapsed",
323
- "panelDimStrong": "NPLLIq_panelDimStrong",
284
+ "notesBar": "NPLLIq_notesBar",
285
+ "noteWinBtn": "NPLLIq_noteWinBtn",
286
+ "balanceWinHeader": "NPLLIq_balanceWinHeader",
324
287
  "header": "NPLLIq_header",
325
- "switch": "NPLLIq_switch",
288
+ "balanceRowName": "NPLLIq_balanceRowName",
289
+ "balanceWin": "NPLLIq_balanceWin",
326
290
  "balanceBarBadge": "NPLLIq_balanceBarBadge",
327
- "fillIdle": "NPLLIq_fillIdle",
328
- "balanceBarLow": "NPLLIq_balanceBarLow",
329
- "gearBtn": "NPLLIq_gearBtn",
330
- "dialogBtn": "NPLLIq_dialogBtn",
331
- "dialogTabs": "NPLLIq_dialogTabs",
332
- "currentBadge": "NPLLIq_currentBadge",
333
- "rowDragging": "NPLLIq_rowDragging",
334
- "fillWarn": "NPLLIq_fillWarn",
335
- "balanceRowRefresh": "NPLLIq_balanceRowRefresh",
336
- "body": "NPLLIq_body",
337
- "title": "NPLLIq_title",
338
- "keyRow": "NPLLIq_keyRow",
339
- "versionNew": "NPLLIq_versionNew",
340
- "noteWinText": "NPLLIq_noteWinText",
341
291
  "dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
342
- "balanceToggleOpen": "NPLLIq_balanceToggleOpen",
292
+ "body": "NPLLIq_body",
293
+ "noteWinBar": "NPLLIq_noteWinBar",
294
+ "balanceRowValue": "NPLLIq_balanceRowValue",
295
+ "fillWarn": "NPLLIq_fillWarn",
296
+ "fullNotice": "NPLLIq_fullNotice",
297
+ "logDialog": "NPLLIq_logDialog",
298
+ "balanceBarDim": "NPLLIq_balanceBarDim",
299
+ "panelDimStrong": "NPLLIq_panelDimStrong",
300
+ "logPageSizeSelect": "NPLLIq_logPageSizeSelect",
301
+ "dialogHeader": "NPLLIq_dialogHeader",
302
+ "balanceLastLine": "NPLLIq_balanceLastLine",
303
+ "notice": "NPLLIq_notice",
304
+ "checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
305
+ "balanceBarRefresh": "NPLLIq_balanceBarRefresh",
343
306
  "upgradeBannerText": "NPLLIq_upgradeBannerText",
344
- "logPagerControls": "NPLLIq_logPagerControls",
345
- "balanceWin": "NPLLIq_balanceWin",
346
- "noteWin": "NPLLIq_noteWin",
347
- "noteNewPlus": "NPLLIq_noteNewPlus",
348
- "rowDrag": "NPLLIq_rowDrag",
349
- "logPager": "NPLLIq_logPager",
350
- "balanceValueError": "NPLLIq_balanceValueError",
351
- "upgradeBanner": "NPLLIq_upgradeBanner",
307
+ "selectBtn": "NPLLIq_selectBtn",
308
+ "balanceRow": "NPLLIq_balanceRow",
309
+ "monitorName": "NPLLIq_monitorName",
310
+ "dialog": "NPLLIq_dialog",
311
+ "logToolbar": "NPLLIq_logToolbar",
312
+ "checkErrorHint": "NPLLIq_checkErrorHint",
313
+ "logPagerBtn": "NPLLIq_logPagerBtn",
314
+ "dialogHint": "NPLLIq_dialogHint",
315
+ "fillOver": "NPLLIq_fillOver",
316
+ "headerText": "NPLLIq_headerText",
317
+ "balanceToggleOpen": "NPLLIq_balanceToggleOpen",
318
+ "balanceStateError": "NPLLIq_balanceStateError",
319
+ "upgradeCommandRow": "NPLLIq_upgradeCommandRow",
320
+ "dialogOverlay": "NPLLIq_dialogOverlay",
321
+ "panel": "NPLLIq_panel",
322
+ "keyBadgeOk": "NPLLIq_keyBadgeOk",
323
+ "noticeError": "NPLLIq_noticeError",
352
324
  "collapse": "NPLLIq_collapse",
353
- "copyBtnDone": "NPLLIq_copyBtnDone",
354
- "checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
355
- "checkBtn": "NPLLIq_checkBtn",
325
+ "noteChip": "NPLLIq_noteChip",
326
+ "balanceWinTitle": "NPLLIq_balanceWinTitle",
327
+ "dialogTab": "NPLLIq_dialogTab",
356
328
  "dialogTabActive": "NPLLIq_dialogTabActive",
357
- "noteWinTitleText": "NPLLIq_noteWinTitleText",
358
- "keyBadgeOk": "NPLLIq_keyBadgeOk",
329
+ "keyBadgeOff": "NPLLIq_keyBadgeOff",
330
+ "tabLabel": "NPLLIq_tabLabel",
331
+ "rowDragging": "NPLLIq_rowDragging",
332
+ "settingsDialog": "NPLLIq_settingsDialog",
333
+ "balanceValueOk": "NPLLIq_balanceValueOk",
334
+ "dialogTabs": "NPLLIq_dialogTabs",
335
+ "balanceStateHint": "NPLLIq_balanceStateHint",
336
+ "keyRow": "NPLLIq_keyRow",
359
337
  "keyError": "NPLLIq_keyError",
360
- "settingsBtn": "NPLLIq_settingsBtn",
361
- "dialog": "NPLLIq_dialog",
362
- "noteMenuItem": "NPLLIq_noteMenuItem",
363
- "balanceRow": "NPLLIq_balanceRow",
364
- "balanceValueLow": "NPLLIq_balanceValueLow",
365
- "balanceBarError": "NPLLIq_balanceBarError",
366
- "rowMeta": "NPLLIq_rowMeta",
367
338
  "checkUpdatesRow": "NPLLIq_checkUpdatesRow",
368
- "balanceToggle": "NPLLIq_balanceToggle",
369
- "balanceBarText": "NPLLIq_balanceBarText",
370
- "balanceWinBody": "NPLLIq_balanceWinBody",
371
- "noteNew": "NPLLIq_noteNew",
339
+ "radioRow": "NPLLIq_radioRow",
340
+ "logModelCol": "NPLLIq_logModelCol",
372
341
  "logUsedCol": "NPLLIq_logUsedCol",
373
- "logPagerInfo": "NPLLIq_logPagerInfo",
374
- "rowName": "NPLLIq_rowName",
375
- "dialogActions": "NPLLIq_dialogActions",
376
- "balanceValueOk": "NPLLIq_balanceValueOk",
377
- "settingsDialog": "NPLLIq_settingsDialog",
378
- "version": "NPLLIq_version",
379
- "upgradeClose": "NPLLIq_upgradeClose",
380
- "balanceRowValue": "NPLLIq_balanceRowValue",
381
- "fillOver": "NPLLIq_fillOver",
342
+ "tab": "NPLLIq_tab",
343
+ "currentBadge": "NPLLIq_currentBadge",
344
+ "checkBtn": "NPLLIq_checkBtn",
345
+ "noteWinCollapsed": "NPLLIq_noteWinCollapsed",
346
+ "logSearch": "NPLLIq_logSearch",
382
347
  "panelDim": "NPLLIq_panelDim",
383
- "logPageSizeSelect": "NPLLIq_logPageSizeSelect",
348
+ "noteWinTitle": "NPLLIq_noteWinTitle",
349
+ "subtitle": "NPLLIq_subtitle",
350
+ "noteMenu": "NPLLIq_noteMenu",
351
+ "tabIcon": "NPLLIq_tabIcon",
352
+ "upgradeCommand": "NPLLIq_upgradeCommand",
353
+ "resetSelect": "NPLLIq_resetSelect",
354
+ "noteChipOpen": "NPLLIq_noteChipOpen",
355
+ "bar": "NPLLIq_bar",
356
+ "switch": "NPLLIq_switch",
357
+ "balanceRowHeader": "NPLLIq_balanceRowHeader",
358
+ "logPagerPages": "NPLLIq_logPagerPages",
359
+ "logScroll": "NPLLIq_logScroll",
360
+ "title": "NPLLIq_title",
361
+ "rowName": "NPLLIq_rowName",
362
+ "headerActions": "NPLLIq_headerActions",
363
+ "rowMeta": "NPLLIq_rowMeta",
364
+ "dialogBody": "NPLLIq_dialogBody",
384
365
  "upgradeBannerFlash": "NPLLIq_upgradeBannerFlash",
385
- "row": "NPLLIq_row",
386
- "tabLabel": "NPLLIq_tabLabel",
387
- "dialogHint": "NPLLIq_dialogHint",
366
+ "balanceBarText": "NPLLIq_balanceBarText",
388
367
  "dialogClose": "NPLLIq_dialogClose",
389
- "logHeader": "NPLLIq_logHeader",
390
- "logScroll": "NPLLIq_logScroll",
391
- "monitorRow": "NPLLIq_monitorRow",
368
+ "noteWin": "NPLLIq_noteWin",
369
+ "upgradeClose": "NPLLIq_upgradeClose",
370
+ "copyBtn": "NPLLIq_copyBtn",
371
+ "dialogActions": "NPLLIq_dialogActions",
372
+ "dialogLabel": "NPLLIq_dialogLabel",
373
+ "noteWinTitleText": "NPLLIq_noteWinTitleText",
374
+ "upgradeCommands": "NPLLIq_upgradeCommands",
375
+ "copyBtnDone": "NPLLIq_copyBtnDone",
376
+ "resetRow": "NPLLIq_resetRow",
377
+ "noteWinGripBar": "NPLLIq_noteWinGripBar",
378
+ "dialogBtn": "NPLLIq_dialogBtn",
379
+ "logPagerControls": "NPLLIq_logPagerControls",
380
+ "input": "NPLLIq_input",
381
+ "logDayCol": "NPLLIq_logDayCol",
382
+ "logClearDialog": "NPLLIq_logClearDialog",
383
+ "rowDropTarget": "NPLLIq_rowDropTarget",
384
+ "rowHeader": "NPLLIq_rowHeader",
392
385
  "dialogTitle": "NPLLIq_dialogTitle",
393
- "balanceBarRefresh": "NPLLIq_balanceBarRefresh",
394
- "noteWinBtn": "NPLLIq_noteWinBtn",
395
- "logToolbar": "NPLLIq_logToolbar",
386
+ "dialogSection": "NPLLIq_dialogSection",
387
+ "noteWinText": "NPLLIq_noteWinText",
388
+ "noteMenuBackdrop": "NPLLIq_noteMenuBackdrop",
389
+ "balanceToggle": "NPLLIq_balanceToggle",
390
+ "save": "NPLLIq_save",
391
+ "row": "NPLLIq_row",
392
+ "logTable": "NPLLIq_logTable",
393
+ "monitorList": "NPLLIq_monitorList",
394
+ "noteMenuItem": "NPLLIq_noteMenuItem",
395
+ "monitorHint": "NPLLIq_monitorHint",
396
+ "balanceBar": "NPLLIq_balanceBar",
397
+ "logHeader": "NPLLIq_logHeader",
398
+ "logPager": "NPLLIq_logPager",
399
+ "balanceRowRefresh": "NPLLIq_balanceRowRefresh",
396
400
  "keySaveBtn": "NPLLIq_keySaveBtn",
397
- "upgradeCommand": "NPLLIq_upgradeCommand",
398
- "resetRow": "NPLLIq_resetRow",
399
- "headerActions": "NPLLIq_headerActions",
400
- "dialogTab": "NPLLIq_dialogTab",
401
- "dialogBody": "NPLLIq_dialogBody",
402
- "fullNotice": "NPLLIq_fullNotice",
403
- "noticeError": "NPLLIq_noticeError",
404
- "logClearDate": "NPLLIq_logClearDate",
405
- "noteWinTitle": "NPLLIq_noteWinTitle"
401
+ "balanceValueLow": "NPLLIq_balanceValueLow",
402
+ "versionNew": "NPLLIq_versionNew",
403
+ "noteNew": "NPLLIq_noteNew",
404
+ "settingsBtnActive": "NPLLIq_settingsBtnActive",
405
+ "monitorRow": "NPLLIq_monitorRow"
406
406
  };
407
407
  //#endregion
408
408
  //#region lib/types/client/TokenQuotaPanel.js
@@ -778,13 +778,33 @@ window.__ModuleLoader__.load({
778
778
  });
779
779
  };
780
780
  (0, react.useEffect)(() => {
781
- const onFocusIn = (event) => {
782
- const target = event.target;
783
- setInputActive(target !== null && (target.matches("input, textarea, [contenteditable=\"true\"]") || target.closest("input, textarea, [contenteditable=\"true\"]") !== null));
781
+ const isEditable = (el) => el !== null && (el.matches("input, textarea, [contenteditable=\"true\"]") || el.closest("input, textarea, [contenteditable=\"true\"]") !== null);
782
+ const isOwnSurface = (el) => {
783
+ if (el === null) return false;
784
+ for (const node of [
785
+ panelRef.current,
786
+ settingsRef.current,
787
+ logRef.current
788
+ ]) if (node !== null && node.contains(el)) return true;
789
+ return false;
790
+ };
791
+ const sync = () => {
792
+ const active = document.activeElement;
793
+ setInputActive(!isOwnSurface(active) && isEditable(active));
784
794
  };
785
- window.addEventListener("focusin", onFocusIn);
795
+ const deferredSync = () => {
796
+ window.setTimeout(sync, 0);
797
+ };
798
+ document.addEventListener("focusin", sync);
799
+ document.addEventListener("focusout", deferredSync);
800
+ document.addEventListener("pointerdown", deferredSync, true);
801
+ window.addEventListener("blur", sync);
802
+ sync();
786
803
  return () => {
787
- window.removeEventListener("focusin", onFocusIn);
804
+ document.removeEventListener("focusin", sync);
805
+ document.removeEventListener("focusout", deferredSync);
806
+ document.removeEventListener("pointerdown", deferredSync, true);
807
+ window.removeEventListener("blur", sync);
788
808
  };
789
809
  }, []);
790
810
  (0, react.useEffect)(() => {
@@ -882,30 +902,6 @@ window.__ModuleLoader__.load({
882
902
  cancelled = true;
883
903
  };
884
904
  }, [logOpen, actions]);
885
- if (collapsed) return (0, react_jsx_runtime.jsxs)("div", {
886
- className: TokenQuotaPanel_module_css_default.tab,
887
- role: "button",
888
- tabIndex: 0,
889
- title: t("expandHint"),
890
- "aria-label": t("expandHint"),
891
- onClick: () => {
892
- setCollapsed(false);
893
- },
894
- onKeyDown: (event) => {
895
- if (event.key === "Enter" || event.key === " ") {
896
- event.preventDefault();
897
- setCollapsed(false);
898
- }
899
- },
900
- children: [(0, react_jsx_runtime.jsx)("span", {
901
- className: TokenQuotaPanel_module_css_default.tabIcon,
902
- "aria-hidden": "true",
903
- children: "▸"
904
- }), (0, react_jsx_runtime.jsx)("span", {
905
- className: TokenQuotaPanel_module_css_default.tabLabel,
906
- children: t("expand")
907
- })]
908
- });
909
905
  const openSettings = () => {
910
906
  actions.setDialogOpen(true);
911
907
  };
@@ -1086,9 +1082,34 @@ window.__ModuleLoader__.load({
1086
1082
  return { text: "" };
1087
1083
  };
1088
1084
  const panelDimClass = dimWhenIdle ? hovered || upgradeFlash ? "" : inputActive ? TokenQuotaPanel_module_css_default.panelDimStrong : TokenQuotaPanel_module_css_default.panelDim : "";
1085
+ if (collapsed) return (0, react_jsx_runtime.jsxs)("div", {
1086
+ className: TokenQuotaPanel_module_css_default.tab,
1087
+ role: "button",
1088
+ tabIndex: 0,
1089
+ title: t("expandHint"),
1090
+ "aria-label": t("expandHint"),
1091
+ onClick: () => {
1092
+ setCollapsed(false);
1093
+ },
1094
+ onKeyDown: (event) => {
1095
+ if (event.key === "Enter" || event.key === " ") {
1096
+ event.preventDefault();
1097
+ setCollapsed(false);
1098
+ }
1099
+ },
1100
+ children: [(0, react_jsx_runtime.jsx)("span", {
1101
+ className: TokenQuotaPanel_module_css_default.tabIcon,
1102
+ "aria-hidden": "true",
1103
+ children: "▸"
1104
+ }), (0, react_jsx_runtime.jsx)("span", {
1105
+ className: TokenQuotaPanel_module_css_default.tabLabel,
1106
+ children: t("expand")
1107
+ })]
1108
+ });
1089
1109
  return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
1090
1110
  (0, react_jsx_runtime.jsxs)("div", {
1091
1111
  ref: panelRef,
1112
+ "data-token-quota-panel": "",
1092
1113
  className: `${TokenQuotaPanel_module_css_default.panel}${panelDimClass !== "" ? ` ${panelDimClass}` : ""}`,
1093
1114
  style: panelPos !== null ? {
1094
1115
  left: panelPos.x,
@@ -1116,13 +1137,13 @@ window.__ModuleLoader__.load({
1116
1137
  title: t("upgradeAvailableHint"),
1117
1138
  children: [
1118
1139
  "v",
1119
- "0.1.44",
1140
+ "0.1.50",
1120
1141
  " → v",
1121
1142
  upgrade.latestVersion
1122
1143
  ]
1123
1144
  }) : (0, react_jsx_runtime.jsxs)("span", {
1124
1145
  className: TokenQuotaPanel_module_css_default.version,
1125
- children: ["v", "0.1.44"]
1146
+ children: ["v", "0.1.50"]
1126
1147
  })]
1127
1148
  })
1128
1149
  }),
@@ -2972,23 +2993,23 @@ window.__ModuleLoader__.load({
2972
2993
  };
2973
2994
  //#endregion
2974
2995
  //#region \0dsh-css:/Users/jxgame/Desktop/works/deepseek-harness-package/dsh-token-quota/packages/token-quota/src/client/mic.module.css.mjs
2975
- const css = ".KCoVpa_micWrap{z-index:10;pointer-events:auto;align-items:center;gap:4px;display:flex;position:absolute;top:4px;right:6px}.KCoVpa_micBtn{width:26px;height:26px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:8px;justify-content:center;align-items:center;padding:0;font-size:14px;line-height:1;transition:color .15s,background .15s,border-color .15s;display:inline-flex}.KCoVpa_micBtn:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-3)}.KCoVpa_micRec{color:#fff;background:var(--dsw-alias-state-error-primary);border-color:var(--dsw-alias-state-error-primary);animation:1.2s ease-in-out infinite KCoVpa_micPulse}.KCoVpa_micBusy{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-3);cursor:progress}.KCoVpa_micErr{border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}.KCoVpa_micErrTip{background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-state-error-primary);max-width:180px;color:var(--dsw-alias-state-error-primary);white-space:normal;word-break:break-word;border-radius:6px;padding:3px 6px;font-size:10px;line-height:1.3}@keyframes KCoVpa_micPulse{0%,to{opacity:1}50%{opacity:.5}}";
2976
- const tagId = "@jxgame2020/dsh-token-quota/mic.module.css";
2977
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
2996
+ const css$1 = ".KCoVpa_micWrap{z-index:10;pointer-events:auto;align-items:center;gap:4px;display:flex;position:absolute;top:4px;right:6px}.KCoVpa_micBtn{width:26px;height:26px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:8px;justify-content:center;align-items:center;padding:0;font-size:14px;line-height:1;transition:color .15s,background .15s,border-color .15s;display:inline-flex}.KCoVpa_micBtn:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-3)}.KCoVpa_micRec{color:#fff;background:var(--dsw-alias-state-error-primary);border-color:var(--dsw-alias-state-error-primary);animation:1.2s ease-in-out infinite KCoVpa_micPulse}.KCoVpa_micBusy{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-3);cursor:progress}.KCoVpa_micErr{border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}.KCoVpa_micErrTip{background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-state-error-primary);max-width:180px;color:var(--dsw-alias-state-error-primary);white-space:normal;word-break:break-word;border-radius:6px;padding:3px 6px;font-size:10px;line-height:1.3}@keyframes KCoVpa_micPulse{0%,to{opacity:1}50%{opacity:.5}}";
2997
+ const tagId$1 = "@jxgame2020/dsh-token-quota/mic.module.css";
2998
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
2978
2999
  const tag = document.createElement("style");
2979
3000
  tag.dataset.plugin = "@jxgame2020/dsh-token-quota";
2980
- tag.dataset.pluginCss = tagId;
2981
- tag.textContent = css;
3001
+ tag.dataset.pluginCss = tagId$1;
3002
+ tag.textContent = css$1;
2982
3003
  document.head.appendChild(tag);
2983
3004
  }
2984
3005
  var mic_module_css_default = {
2985
- "micErr": "KCoVpa_micErr",
3006
+ "micWrap": "KCoVpa_micWrap",
3007
+ "micRec": "KCoVpa_micRec",
2986
3008
  "micErrTip": "KCoVpa_micErrTip",
3009
+ "micErr": "KCoVpa_micErr",
3010
+ "micPulse": "KCoVpa_micPulse",
2987
3011
  "micBtn": "KCoVpa_micBtn",
2988
- "micRec": "KCoVpa_micRec",
2989
- "micBusy": "KCoVpa_micBusy",
2990
- "micWrap": "KCoVpa_micWrap",
2991
- "micPulse": "KCoVpa_micPulse"
3012
+ "micBusy": "KCoVpa_micBusy"
2992
3013
  };
2993
3014
  //#endregion
2994
3015
  //#region lib/types/client/mic.js
@@ -3118,6 +3139,7 @@ window.__ModuleLoader__.load({
3118
3139
  const state = transcribing ? "busy" : recording ? "rec" : "idle";
3119
3140
  return (0, react_jsx_runtime.jsxs)("div", {
3120
3141
  className: mic_module_css_default.micWrap,
3142
+ "data-token-quota-mic": "",
3121
3143
  title: error ?? t("transcribeHint"),
3122
3144
  children: [(0, react_jsx_runtime.jsx)("button", {
3123
3145
  type: "button",
@@ -3139,6 +3161,360 @@ window.__ModuleLoader__.load({
3139
3161
  })]
3140
3162
  });
3141
3163
  }
3164
+ /** Base persist key; the engine appends `.<sessionId>` for scoped instances. */
3165
+ const STASH_PERSIST_KEY = "dsh-token-quota:stash";
3166
+ let sequence = 0;
3167
+ /**
3168
+ * Declares the per-session stash state and write surface.
3169
+ * @returns the store handle, to be registered on a session-scoped slot entry.
3170
+ */
3171
+ function createTokenQuotaStashStore() {
3172
+ return (0, _deepseek_ai_dsh_client_store.defineStore)({
3173
+ init: () => ({ items: [] }),
3174
+ persist: STASH_PERSIST_KEY,
3175
+ actions: {
3176
+ add: (d, text) => {
3177
+ const trimmed = text.trim();
3178
+ if (trimmed === "") return;
3179
+ if (d.items.some((item) => item.text === trimmed)) return;
3180
+ sequence += 1;
3181
+ const id = `${Date.now().toString(36)}-${sequence.toString(36)}`;
3182
+ const next = [...d.items, {
3183
+ id,
3184
+ text: trimmed
3185
+ }];
3186
+ d.items = next.length > 9 ? next.slice(next.length - 9) : next;
3187
+ },
3188
+ remove: (d, id) => {
3189
+ d.items = d.items.filter((item) => item.id !== id);
3190
+ }
3191
+ }
3192
+ });
3193
+ }
3194
+ //#endregion
3195
+ //#region \0dsh-css:/Users/jxgame/Desktop/works/deepseek-harness-package/dsh-token-quota/packages/token-quota/src/client/TokenQuotaStash.module.css.mjs
3196
+ const css = ".x_tEcG_stashRow{pointer-events:auto;z-index:10;flex-direction:row-reverse;gap:4px;display:flex;position:absolute;top:-42px;right:2px}.x_tEcG_stashChip{width:26px;height:26px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:999px;justify-content:center;align-items:center;padding:0;font-size:13px;line-height:1;transition:background .15s,border-color .15s;display:inline-flex}.x_tEcG_stashChip:hover{border-color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-3)}.x_tEcG_stashTip{z-index:200;white-space:pre-wrap;word-break:break-word;max-width:min(360px,60vw);max-height:240px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);pointer-events:none;border-radius:8px;padding:8px 10px;font-size:12px;line-height:1.5;position:fixed;overflow:auto;box-shadow:0 8px 24px #0000002e}.x_tEcG_selPopup{z-index:200;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;border-radius:8px;align-items:center;gap:2px;padding:3px;display:flex;position:fixed;transform:translate(-50%);box-shadow:0 8px 24px #0003}.x_tEcG_selBtn{color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:5px;align-items:center;gap:4px;padding:3px 8px;font-size:12px;display:inline-flex}.x_tEcG_selBtn:hover{background:var(--dsw-alias-bg-layer-3)}.x_tEcG_selDivider{background:var(--dsw-alias-border-l1);align-self:stretch;width:1px}";
3197
+ const tagId = "@jxgame2020/dsh-token-quota/TokenQuotaStash.module.css";
3198
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
3199
+ const tag = document.createElement("style");
3200
+ tag.dataset.plugin = "@jxgame2020/dsh-token-quota";
3201
+ tag.dataset.pluginCss = tagId;
3202
+ tag.textContent = css;
3203
+ document.head.appendChild(tag);
3204
+ }
3205
+ var TokenQuotaStash_module_css_default = {
3206
+ "stashChip": "x_tEcG_stashChip",
3207
+ "stashRow": "x_tEcG_stashRow",
3208
+ "selDivider": "x_tEcG_selDivider",
3209
+ "selPopup": "x_tEcG_selPopup",
3210
+ "selBtn": "x_tEcG_selBtn",
3211
+ "stashTip": "x_tEcG_stashTip"
3212
+ };
3213
+ //#endregion
3214
+ //#region lib/types/client/TokenQuotaStash.js
3215
+ /**
3216
+ * Session-scoped stash UI, registered into `conversation.input.overlay` so it
3217
+ * sits inside the composer card beside the mic.
3218
+ *
3219
+ * Capture (two ways, as requested):
3220
+ * 1. select text — in a message OR in the composer draft — and use the small
3221
+ * popup that offers 复制 / 临存;
3222
+ * 2. press Cmd/Ctrl+Shift+S on any selection.
3223
+ *
3224
+ * Retrieval: one numbered chip per snippet to the left of the mic. Hovering a
3225
+ * chip shows the whole text; clicking drops it into the composer at the caret
3226
+ * and retires the chip.
3227
+ *
3228
+ * The snippets themselves live in a per-session persisted store (see stash.ts),
3229
+ * so they follow their session across reloads and never reach another session.
3230
+ */
3231
+ /** The harness composer's editable surface. */
3232
+ const COMPOSER_INPUT = "[data-composer-input]";
3233
+ /** Anything matching this is "not capturable text": this plugin's own layers
3234
+ and form fields — selecting text inside an input is editing, not quoting.
3235
+ The composer is deliberately NOT excluded: stashing part of a draft is a
3236
+ supported flow. */
3237
+ const IGNORED_SELECTION = "[data-token-quota-stash], [data-token-quota-panel], input, textarea, select";
3238
+ /** The composer's contentEditable, when the composer is on screen. */
3239
+ function composerEditor() {
3240
+ return document.querySelector(COMPOSER_INPUT);
3241
+ }
3242
+ /** Copy text, falling back to a hidden textarea when the clipboard API is denied. */
3243
+ function copyText(text) {
3244
+ navigator.clipboard?.writeText(text).catch(() => {
3245
+ const scratch = document.createElement("textarea");
3246
+ scratch.value = text;
3247
+ scratch.style.position = "fixed";
3248
+ scratch.style.opacity = "0";
3249
+ document.body.appendChild(scratch);
3250
+ scratch.select();
3251
+ try {
3252
+ document.execCommand("copy");
3253
+ } catch {}
3254
+ document.body.removeChild(scratch);
3255
+ });
3256
+ }
3257
+ /**
3258
+ * Drop text into the composer at the caret the user last had there. Falls back
3259
+ * to the end of the editor when no caret was recorded, and to the clipboard
3260
+ * when the composer is not on screen at all.
3261
+ */
3262
+ function insertIntoComposer(text, caret) {
3263
+ const editor = composerEditor();
3264
+ if (editor === null) {
3265
+ copyText(text);
3266
+ return;
3267
+ }
3268
+ editor.focus();
3269
+ const selection = window.getSelection();
3270
+ if (selection !== null) {
3271
+ if (caret !== null && editor.contains(caret.startContainer)) {
3272
+ selection.removeAllRanges();
3273
+ selection.addRange(caret);
3274
+ } else if (!editor.contains(selection.anchorNode)) {
3275
+ const range = document.createRange();
3276
+ range.selectNodeContents(editor);
3277
+ range.collapse(false);
3278
+ selection.removeAllRanges();
3279
+ selection.addRange(range);
3280
+ }
3281
+ }
3282
+ let inserted = false;
3283
+ try {
3284
+ inserted = document.execCommand("insertText", false, text);
3285
+ } catch {}
3286
+ if (!inserted) editor.appendChild(document.createTextNode(text));
3287
+ }
3288
+ /**
3289
+ * Remove the live selection when it sits inside the composer: stashing part of
3290
+ * a draft means MOVING it out of the way ("cut"), so the user does not have to
3291
+ * delete it by hand and cannot accidentally send it. Selections anywhere else
3292
+ * (a message) are left untouched.
3293
+ */
3294
+ function cutComposerSelection() {
3295
+ const editor = composerEditor();
3296
+ const selection = window.getSelection();
3297
+ if (editor === null || selection === null || selection.rangeCount === 0) return;
3298
+ const anchor = selection.anchorNode;
3299
+ if (anchor === null || !editor.contains(anchor) || selection.isCollapsed) return;
3300
+ const before = editor.textContent ?? "";
3301
+ for (const attempt of [
3302
+ "cut",
3303
+ "delete",
3304
+ "insertText"
3305
+ ]) {
3306
+ try {
3307
+ if (attempt === "insertText") document.execCommand("insertText", false, "");
3308
+ else document.execCommand(attempt);
3309
+ } catch {}
3310
+ if ((editor.textContent ?? "") !== before) return;
3311
+ }
3312
+ }
3313
+ /** Keycap emoji for the chip badges; index 0 renders as 1️⃣. */
3314
+ const STASH_BADGES = [
3315
+ "1️⃣",
3316
+ "2️⃣",
3317
+ "3️⃣",
3318
+ "4️⃣",
3319
+ "5️⃣",
3320
+ "6️⃣",
3321
+ "7️⃣",
3322
+ "8️⃣",
3323
+ "9️⃣"
3324
+ ];
3325
+ /** The badge for the n-th (0-based) chip, falling back to a plain digit. */
3326
+ function stashBadge(index) {
3327
+ return STASH_BADGES[index] ?? String(index + 1);
3328
+ }
3329
+ /**
3330
+ * Numbered stash chips plus the capture popup, rendered inside the composer.
3331
+ */
3332
+ function TokenQuotaStash({ t, useStore, actions }) {
3333
+ const items = useStore((s) => s.items);
3334
+ const [hovered, setHovered] = (0, react.useState)(null);
3335
+ const [pending, setPending] = (0, react.useState)(null);
3336
+ const caretRef = (0, react.useRef)(null);
3337
+ const pendingRef = (0, react.useRef)(null);
3338
+ pendingRef.current = pending;
3339
+ (0, react.useEffect)(() => {
3340
+ const sync = () => {
3341
+ const selection = window.getSelection();
3342
+ if (selection === null || selection.rangeCount === 0) {
3343
+ setPending(null);
3344
+ return;
3345
+ }
3346
+ const editor = composerEditor();
3347
+ const anchor = selection.anchorNode;
3348
+ if (editor !== null && anchor !== null && editor.contains(anchor)) {
3349
+ if (selection.isCollapsed) caretRef.current = selection.getRangeAt(0).cloneRange();
3350
+ }
3351
+ if (selection.isCollapsed) {
3352
+ setPending(null);
3353
+ return;
3354
+ }
3355
+ const text = selection.toString().trim();
3356
+ if (text === "") {
3357
+ setPending(null);
3358
+ return;
3359
+ }
3360
+ const range = selection.getRangeAt(0);
3361
+ const container = range.commonAncestorContainer;
3362
+ const element = container.nodeType === Node.ELEMENT_NODE ? container : container.parentElement;
3363
+ if (element !== null && element.closest(IGNORED_SELECTION) !== null) {
3364
+ setPending(null);
3365
+ return;
3366
+ }
3367
+ const rects = range.getClientRects();
3368
+ const rect = rects.length > 0 ? rects[rects.length - 1] : range.getBoundingClientRect();
3369
+ if (rect === void 0) {
3370
+ setPending(null);
3371
+ return;
3372
+ }
3373
+ const half = 70;
3374
+ const POPUP_HEIGHT = 34;
3375
+ const below = rect.bottom + 6;
3376
+ const y = below + POPUP_HEIGHT > window.innerHeight ? Math.max(8, rect.top - POPUP_HEIGHT - 6) : below;
3377
+ setPending({
3378
+ text,
3379
+ x: Math.min(Math.max(rect.left + rect.width / 2, 78), window.innerWidth - half - 8),
3380
+ y
3381
+ });
3382
+ };
3383
+ document.addEventListener("selectionchange", sync);
3384
+ return () => {
3385
+ document.removeEventListener("selectionchange", sync);
3386
+ };
3387
+ }, []);
3388
+ (0, react.useEffect)(() => {
3389
+ const onKeyDown = (event) => {
3390
+ if (!(event.metaKey || event.ctrlKey) || !event.shiftKey) return;
3391
+ if (event.key.toLowerCase() !== "s") return;
3392
+ const selection = window.getSelection();
3393
+ if (selection === null || selection.isCollapsed) return;
3394
+ const text = selection.toString().trim();
3395
+ if (text === "") return;
3396
+ event.preventDefault();
3397
+ actions.add(text);
3398
+ cutComposerSelection();
3399
+ setPending(null);
3400
+ };
3401
+ window.addEventListener("keydown", onKeyDown);
3402
+ return () => {
3403
+ window.removeEventListener("keydown", onKeyDown);
3404
+ };
3405
+ }, [actions]);
3406
+ const stash = () => {
3407
+ const text = pendingRef.current?.text;
3408
+ if (text === void 0) return;
3409
+ actions.add(text);
3410
+ cutComposerSelection();
3411
+ setPending(null);
3412
+ window.getSelection()?.removeAllRanges();
3413
+ };
3414
+ const hoveredItem = hovered === null ? void 0 : items.find((item) => item.id === hovered.id);
3415
+ return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
3416
+ items.length > 0 && (0, react_jsx_runtime.jsx)("div", {
3417
+ className: TokenQuotaStash_module_css_default.stashRow,
3418
+ "data-token-quota-stash": "",
3419
+ children: items.map((item, index) => (0, react_jsx_runtime.jsx)("button", {
3420
+ type: "button",
3421
+ className: TokenQuotaStash_module_css_default.stashChip,
3422
+ onMouseDown: (event) => {
3423
+ event.preventDefault();
3424
+ },
3425
+ onMouseEnter: (event) => {
3426
+ const rect = event.currentTarget.getBoundingClientRect();
3427
+ setHovered({
3428
+ id: item.id,
3429
+ left: rect.left,
3430
+ top: rect.top
3431
+ });
3432
+ },
3433
+ onMouseLeave: () => {
3434
+ setHovered(null);
3435
+ },
3436
+ onClick: () => {
3437
+ insertIntoComposer(item.text, caretRef.current);
3438
+ actions.remove(item.id);
3439
+ setHovered(null);
3440
+ },
3441
+ "aria-label": t("stashChipHint").replace("{n}", String(index + 1)),
3442
+ children: stashBadge(index)
3443
+ }, item.id))
3444
+ }),
3445
+ hovered !== null && hoveredItem !== void 0 && (0, react_jsx_runtime.jsx)("div", {
3446
+ className: TokenQuotaStash_module_css_default.stashTip,
3447
+ "data-token-quota-stash": "",
3448
+ style: {
3449
+ left: Math.min(hovered.left, Math.max(8, window.innerWidth - 368)),
3450
+ bottom: window.innerHeight - hovered.top + 6
3451
+ },
3452
+ children: hoveredItem.text
3453
+ }),
3454
+ pending !== null && (0, react_jsx_runtime.jsxs)("div", {
3455
+ className: TokenQuotaStash_module_css_default.selPopup,
3456
+ "data-token-quota-stash": "",
3457
+ style: {
3458
+ left: pending.x,
3459
+ top: pending.y
3460
+ },
3461
+ onMouseDown: (event) => {
3462
+ event.preventDefault();
3463
+ },
3464
+ children: [
3465
+ (0, react_jsx_runtime.jsxs)("button", {
3466
+ type: "button",
3467
+ className: TokenQuotaStash_module_css_default.selBtn,
3468
+ onClick: () => {
3469
+ copyText(pending.text);
3470
+ setPending(null);
3471
+ },
3472
+ children: [(0, react_jsx_runtime.jsxs)("svg", {
3473
+ viewBox: "0 0 16 16",
3474
+ width: "12",
3475
+ height: "12",
3476
+ "aria-hidden": "true",
3477
+ children: [(0, react_jsx_runtime.jsx)("rect", {
3478
+ x: "5.6",
3479
+ y: "5.6",
3480
+ width: "7.8",
3481
+ height: "7.8",
3482
+ rx: "1.4",
3483
+ fill: "none",
3484
+ stroke: "currentColor",
3485
+ strokeWidth: "1.3"
3486
+ }), (0, react_jsx_runtime.jsx)("path", {
3487
+ d: "M10.4 5.6V4a1.4 1.4 0 0 0-1.4-1.4H4A1.4 1.4 0 0 0 2.6 4v5A1.4 1.4 0 0 0 4 10.4h1.6",
3488
+ fill: "none",
3489
+ stroke: "currentColor",
3490
+ strokeWidth: "1.3",
3491
+ strokeLinecap: "round"
3492
+ })]
3493
+ }), t("stashCopy")]
3494
+ }),
3495
+ (0, react_jsx_runtime.jsx)("span", {
3496
+ className: TokenQuotaStash_module_css_default.selDivider,
3497
+ "aria-hidden": "true"
3498
+ }),
3499
+ (0, react_jsx_runtime.jsxs)("button", {
3500
+ type: "button",
3501
+ className: TokenQuotaStash_module_css_default.selBtn,
3502
+ onClick: stash,
3503
+ children: [(0, react_jsx_runtime.jsx)("svg", {
3504
+ viewBox: "0 0 16 16",
3505
+ width: "12",
3506
+ height: "12",
3507
+ "aria-hidden": "true",
3508
+ children: (0, react_jsx_runtime.jsx)("path", {
3509
+ d: "M9.3 1.5 3.8 8.7h3.4l-.9 5.8 5.5-7.3H8.4z",
3510
+ fill: "currentColor"
3511
+ })
3512
+ }), t("stashSave")]
3513
+ })
3514
+ ]
3515
+ })
3516
+ ] });
3517
+ }
3142
3518
  //#endregion
3143
3519
  //#region lib/types/client/locales.js
3144
3520
  /**
@@ -3192,6 +3568,10 @@ window.__ModuleLoader__.load({
3192
3568
  transcribeKeyConfigured: "已配置",
3193
3569
  transcribeKeyMissing: "未配置",
3194
3570
  transcribeKeyFailed: "保存失败",
3571
+ stashTitle: "临存",
3572
+ stashCopy: "复制",
3573
+ stashSave: "临存",
3574
+ stashChipHint: "点击把第 {n} 条插入输入框",
3195
3575
  transcribeModelLabel: "模型",
3196
3576
  transcribeModelHint: "语音转文本模型名",
3197
3577
  reorderHint: "拖动排序",
@@ -3331,6 +3711,10 @@ window.__ModuleLoader__.load({
3331
3711
  transcribeKeyConfigured: "Configured",
3332
3712
  transcribeKeyMissing: "Not configured",
3333
3713
  transcribeKeyFailed: "Save failed",
3714
+ stashTitle: "Stash",
3715
+ stashCopy: "Copy",
3716
+ stashSave: "Stash",
3717
+ stashChipHint: "Insert snippet {n} into the composer",
3334
3718
  transcribeModelLabel: "Model",
3335
3719
  transcribeModelHint: "Speech-to-text model name",
3336
3720
  reorderHint: "Drag to reorder",
@@ -3989,6 +4373,15 @@ window.__ModuleLoader__.load({
3989
4373
  t
3990
4374
  })
3991
4375
  }, TokenQuotaMic));
4376
+ const stashStore = createTokenQuotaStashStore();
4377
+ ctx.slots.inject("conversation.input.overlay", () => ctx.slots.register({
4378
+ name: "conversation.input.overlay",
4379
+ id: "token-quota-stash",
4380
+ order: 90,
4381
+ label: () => t("stashTitle"),
4382
+ store: stashStore,
4383
+ locale: NS
4384
+ }, TokenQuotaStash));
3992
4385
  }
3993
4386
  //#endregion
3994
4387
  exports.apply = apply;