dsh-timeband 1.1.0 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,10 +1,18 @@
1
1
  # DSH TimeBand
2
2
 
3
+ **v1.3.9** 适配 DeepSeek Harness 0.2.1-rc.5,修复宿主升级后因旧版兼容声明而拒绝加载的问题。npm 包名自 v1.3.8 起恢复为 `dsh-timeband`,scoped 包 `@a961282799/dsh-timeband` 不再更新。保留 v1.3.4 的资源优化:关闭详情后释放面板内容,秒级刷新只影响倒计时区域,时间轴按分钟更新。提示音播放后暂停音频处理,关闭提醒时释放音频上下文;重新开启后可以再次播放。保留手动版本检查、日历自动更新、应用内提醒、系统通知反馈和轻柔提示音,没有新增运行时 npm 依赖。
4
+
5
+ 三轮本地对照中,测试页面的 JavaScript 堆占用减少约 0.07~0.15 MB,主线程耗时降低约 11%~19%。这是 Chrome 宿主模拟页的结果,不代表 Harness 整个进程的内存或 CPU 降幅,详见[资源优化记录](https://github.com/a961282799-crypto/dsh-timeband/blob/main/docs/performance.md)。
6
+
3
7
  DeepSeek Harness 桌面端头像右侧的峰谷时段插件。状态、切换倒计时、迷你时间轴常驻;点击查看北京时间 24 小时时间轴。没有价格、消费金额、Token、余额或预计节省功能,也不读取账户或 API Key。
4
8
 
5
- 支持浅色 / 深色、中英文、侧栏折叠与节假日全天谷时段。节假日卡片精简重复时段说明,规则与日历默认折叠;关键时间与刻度使用更清晰的字号和颜色。离线运行,采用宿主共享的 React 和 Cordis 原生插件接口。
9
+ 支持浅色 / 深色、中英文、侧栏折叠与节假日全天谷时段。节假日卡片精简重复时段说明,规则与提醒默认折叠;关键时间与刻度使用更清晰的字号和颜色。时段按已保存日历离线计算,日历临近到期或缺少本年度数据时联网更新,采用宿主共享的 React 和 Cordis 原生插件接口。
10
+
11
+ 日历自动更新并缓存,倒计时每秒刷新;时间切换、跨天、休眠唤醒和日历更新会刷新对应判断。
6
12
 
7
- v1.1.0 增加本地日历导入与恢复、到期前 30 天提示,并缓存时段计算。倒计时仍每秒刷新;时间切换、跨天、休眠唤醒和日历替换会刷新对应判断。
13
+ 可选的峰时段提醒默认关闭,开启后在下一次已核实的峰时段开始前 5 分钟显示应用内提醒并尝试发送系统通知。「测试提醒」可以立即查看效果与发送状态;设置会保存,同来源的现代窗口使用浏览器锁和已发送记录去重。休眠后不补发已过期的提醒,关闭或卸载会取消待发送通知。
14
+
15
+ 正式提醒和测试提醒会播放轻柔提示音。声音在本地合成,连续测试会替换上一声;关闭提醒或卸载会停止播放。音频不可用时说明原因,文字与系统通知继续工作。
8
16
 
9
17
  ## 展示
10
18
 
@@ -34,30 +42,34 @@ v1.1.0 增加本地日历导入与恢复、到期前 30 天提示,并缓存时
34
42
  </details>
35
43
 
36
44
  <details>
37
- <summary>日历更新:导入、恢复与来源</summary>
45
+ <summary>可选提醒:开启与测试</summary>
38
46
 
39
- ![日历更新入口](https://raw.githubusercontent.com/a961282799-crypto/dsh-timeband/main/docs/images/calendar-update.png)
47
+ ![提醒开关及测试按钮](https://raw.githubusercontent.com/a961282799-crypto/dsh-timeband/main/docs/images/reminders.png)
40
48
 
41
49
  </details>
42
50
 
43
51
  ## 安装
44
52
 
45
- 已针对 **DeepSeek Harness 0.2.0-rc.2** 制作。2026-10-03 核对 npm `latest` 仍为此版本,四个宿主测试依赖与随附桌面 CLI 版本一致。版本声明只覆盖此版本,宿主升级后应重新验证并更新 peer 范围。
53
+ 已针对 **DeepSeek Harness 0.2.1-rc.5** 验证。2026-10-30 核对四个宿主测试依赖与 npm 发布的宿主版本一致,Cordis 仍为 4.0.5。版本声明只覆盖此版本,宿主升级后应重新验证并更新 peer 范围。
46
54
 
47
- npm 包名可用后,可在桌面端「插件 → 添加插件」输入 `dsh-timeband@1.1.0`;或在退出桌面端后执行 `dsh plugin --profile desktop add dsh-timeband@1.1.0`。若 npm 包名尚不可用,请使用下方的 GitHub 安装包。
55
+ 使用 [npm 包 dsh-timeband](https://www.npmjs.com/package/dsh-timeband) 安装。从托盘完全退出 Harness 后执行:
48
56
 
49
- 从 [GitHub Releases](https://github.com/a961282799-crypto/dsh-timeband/releases/tag/v1.1.0) 下载预构建安装包 `dsh-timeband-1.1.0.tgz`。不需要安装开发依赖或自行编译。
57
+ ```powershell
58
+ dsh plugin --profile desktop add dsh-timeband@1.3.9
59
+ ```
60
+
61
+ 如果之前装过 scoped 包 `@a961282799/dsh-timeband`,请先执行 `dsh plugin --profile desktop remove @a961282799/dsh-timeband`,再安装 `dsh-timeband`,避免同一插件加载两次。原有日历和提醒设置使用相同的保存位置。
50
62
 
51
- 从托盘完全退出 Harness,在下载目录执行:
63
+ 也可从 [GitHub Releases](https://github.com/a961282799-crypto/dsh-timeband/releases/tag/v1.3.9) 下载预构建安装包 `dsh-timeband-1.3.9.tgz`。不需要安装开发依赖或自行编译。从托盘完全退出 Harness,在下载目录执行:
52
64
 
53
65
  ```powershell
54
- dsh plugin --profile desktop add ./dsh-timeband-1.1.0.tgz
66
+ dsh plugin --profile desktop add ./dsh-timeband-1.3.9.tgz
55
67
  ```
56
68
 
57
69
  如果 `dsh` 不在 PATH,使用桌面端安装目录中随附的命令,例如:
58
70
 
59
71
  ```powershell
60
- & 'C:\path\to\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd' plugin --profile desktop add ./dsh-timeband-1.1.0.tgz
72
+ & 'C:\path\to\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd' plugin --profile desktop add dsh-timeband@1.3.9
61
73
  ```
62
74
 
63
75
  安装后重新打开 Harness,侧栏底部即可看到插件。卸载:
@@ -98,19 +110,39 @@ Web 版可改成 `--profile web`,组件显示在侧栏底部原生插槽。
98
110
 
99
111
  `calendars/2026.json` 是内置日历的唯一数据源,取自[国务院办公厅通知的政府转载](https://www.lufengshi.gov.cn/swlfsjj/gkmlpt/content/1/1199/mpost_1199727.html),覆盖完整放假区间。尚未收录 2027 年官方假期,不预测下一年安排。
100
112
 
101
- 点击时间轴,在「时段规则与日历」内选择「获取新日历」,从本项目下载对应 JSON,再选择「导入日历」。日历覆盖年份与核对日期会随文件更新,侧栏和弹窗立即刷新;导入结果保存在当前 Harness 网页来源的本地存储,重启后继续使用,同来源的多个窗口同步。也可选择「恢复内置」。Web 与桌面端的来源不同,需要各自导入。
113
+ 到当前连续覆盖年份结束前 30 天,插件自动下载下一年度日历;若打开应用时已经缺少本年度数据,会立即检查本年度文件。更新源是自动抓取国务院公告的 [holiday-cn](https://github.com/NateScarlet/holiday-cn),固定地址为 `https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/{年份}.json`,不需要你每年在本项目上传文件。不发送账户信息、Cookie、API Key 或消费数据。有效数据合并进已有日历并保存在本地,重启继续使用,同来源的多个窗口同步。
114
+
115
+ 更新文件尚未发布、网络失败或内容不合格时保留已有数据,每 24 小时重试;网络恢复时可立即重试失败请求。启动、系统时钟恢复、跨日及后台每小时检查是否进入更新窗口;成功扩展覆盖后停止联网检查,直到再次临近到期。应用完全退出时不执行后台更新,重新打开后检查。检查记录在本地保存,支持 Web Locks 的同来源窗口会串行检查,避免重复下载。
116
+
117
+ 下载超时限制为 10 秒,内容最大 64 KB;验证目标年份、真实日期、休息日标记和政府公告来源地址。没有公告及日期的空占位文件表示尚未发布;错误文件或保存失败不会替换已有数据。仅将实际休息日转换为假期间隔,调休周末仍全天为谷时段;下一年公告涉及上年 12 月时,只补充已经有完整覆盖的年份。旧缓存不会覆盖更新的内置核对结果,新年份也不会删除此前年份。2026 年实时数据已与内置假期逐段比对一致。来源地址校验不等于再次在线核验公告内容;格式及维护步骤见[日历维护说明](https://github.com/a961282799-crypto/dsh-timeband/blob/main/docs/calendar-maintenance.md)。
102
118
 
103
- 导入日历替换整份当前日历;文件未包含的年份仍为待核实。到当前连续覆盖年份结束前 30 天,会在弹窗提示到期日期。错误文件、超过 64 KB、无效日期、范围重叠、覆盖年份缺少条目或非 HTTPS 政府来源的文件会被拒绝;保存失败保留原日历。来源字段校验只检查地址格式,不代表插件已在线核验公告内容,请使用本项目发布并人工核对的文件。日历格式及维护步骤见[日历维护说明](https://github.com/a961282799-crypto/dsh-timeband/blob/main/docs/calendar-maintenance.md)。
119
+ 正常界面没有日历操作区,仅在检查中、等待新年度文件或更新失败时显示简短状态。未收录年份的工作日峰时段显示「待核实」,不推断假日。倒计时遇到未知日历区间会停止给出确定峰谷切换时间。
104
120
 
105
- 未收录年份的工作日峰时段显示「待核实」,不推断假日。倒计时遇到未知日历区间会停止给出确定峰谷切换时间。插件离线计算,不自动抓网页、联网更新或收集数据;仅用户点击外部链接时打开浏览器。
121
+ ## 峰时段提醒
122
+
123
+ 展开「规则与提醒」,开启「峰时段前 5 分钟提醒」。只有手动开启时才申请系统通知权限;被拒绝、接口不支持或设置无法保存时,开关保持关闭并给出说明。允许通知后,可点击「测试提醒」立即显示应用内提示并检查系统通知的发送状态,测试不会改写峰时段的去重记录。5 秒没有系统回执时说明「未确认通知显示」;发送失败时保留应用内提醒,开关仍保持开启。
124
+
125
+ 提醒使用北京时间与当前日历,在 09:00、14:00 峰时段开始前的 5 分钟窗口内发送一次。节假日、周末和待核实的峰时段不发送确定提醒;窗口内开启或唤醒会提醒尚未开始的峰时段,已经开始则不补发。应用需要保持运行,退出后无法继续提醒。系统通知的展示还受宿主及操作系统设置影响,详见[提醒说明](https://github.com/a961282799-crypto/dsh-timeband/blob/main/docs/reminders.md)。
126
+
127
+ ## 插件版本更新(v1.3.3 起)
128
+
129
+ 展开「规则与提醒」,点击「检查更新」后查询本项目的 GitHub 最新正式 Release。有新版时在同一区域显示「更新」与更新说明;没有新版则给出检查结果。只有点击「更新」才安装,完成后按 Harness 的结果提示完全退出并重新打开应用。日历仍按原规则自动更新,插件版本只在点击按钮时检查。
130
+
131
+ 支持官方插件管理服务的 Harness 中,点击「更新」由 `remote.pluginManager.installBundle` 安装该版本固定地址的 GitHub 预构建包;已安装插件的升级按官方结果提示重启生效,不自动退出应用。版本兼容检查由宿主执行,不授予版本豁免或构建脚本许可。网络回执丢失时查询原请求的结果,不重新提交;仍未确认时提示到 Harness「插件」页面核对。插件卸载时取消自己尚在运行的安装请求。
132
+
133
+ 不提供官方远程安装服务的环境显示「下载新版」及更新说明。旧版需要先安装包含此功能的版本,之后才有「检查更新」和「更新」按钮。更新通过 GitHub 预构建包分发,不依赖 npm 发布。
134
+
135
+ 检查只请求 `https://api.github.com/repos/a961282799-crypto/dsh-timeband/releases/latest`,不携带账户凭证;限制 10 秒与 64 KB,失败后可手动重试。只接受本项目的正式版本及对应预构建包,预发布、草稿和不匹配的资源不用于更新。启动、窗口唤醒和普通使用不会触发插件版本查询,也不新增后台任务、缓存或首页提示点。
106
136
 
107
137
  ## 架构
108
138
 
109
139
  TypeScript 7 + React 18(宿主共享实例)+ Cordis 官方插槽生命周期;esbuild 生成 DSH 的 `__ModuleLoader__.load({ id, factory })` 格式。发布包没有运行时 npm 依赖,也不打包另一份 React。
110
140
 
111
- `src/schedule.ts` 是纯时间逻辑及按时段复用的日程读取器;`calendar.ts` 校验日历,`calendar-store.ts` 负责本地持久化与窗口同步;`clock.ts` 是单一可订阅时钟,隐藏时暂停,唤醒时重读系统时间;`client.ts` 持有注册、字典、样式及清理;`view.tsx` 接收宿主注入的时钟、日历存储和翻译函数。`cordis.patch.yml` 与 `dsh.bundle` 负责安装后进入宿主配置。
141
+ 安装包只包含构建后的运行文件、内置日历、插件配置和说明。源码映射仅保留在本地 `dist/client.js.map` 用于调试,不随安装包分发,客户端也不会请求这个文件。
142
+
143
+ `src/schedule.ts` 是纯时间逻辑及按时段复用的日程读取器;`calendar.ts` 校验并合并日历,`calendar-feed.ts` 将公告数据转换为计费假期,`calendar-store.ts` 负责本地持久化与窗口同步,`calendar-updater.ts` 负责到期检查、限量下载、每日重试和卸载取消;`clock.ts` 是单一可订阅时钟,隐藏时暂停,唤醒时重读系统时间;`reminder-store.ts` 管理提醒偏好与用户触发的授权,`reminders.ts` 在开启时保留一个截止时间计时器,重新核对日历、墙钟和发送记录;`reminder-delivery.ts` 保留应用内提醒并监测系统通知回执,`reminder-sound.ts` 合成提示音并管理播放与清理;`client.ts` 持有注册、字典及清理;`view.tsx` 接收宿主注入的状态、时钟和翻译函数。`cordis.patch.yml` 与 `dsh.bundle` 负责安装后进入宿主配置。
112
144
 
113
- 接口依据:[官方 Client Slots](https://deepseek-harness.github.io/deepseek-harness/en/reference/subsystems/slots)、npm 发布的 `0.2.0-rc.2` 类型与 SlotRegistry;源码布局参照上游提交 `639ed015397290b3745d163aafe02ffee4aa3f84`。不承诺未测试版本兼容。
145
+ 接口依据:[官方 Client Slots](https://deepseek-harness.github.io/deepseek-harness/en/reference/subsystems/slots)、npm 发布的 `0.2.1-rc.5` 类型与 SlotRegistry,以及本机同版本桌面的兼容检查函数。头像旁布局保留结构匹配保护,不承诺未测试版本兼容。
114
146
 
115
147
  ## 开发与验证
116
148
 
@@ -128,7 +160,7 @@ npm pack --pack-destination artifacts
128
160
 
129
161
  测试覆盖四个毫秒级切换边界、2026 全年时间轴一致性、多日假期、时区、跨年未知日历、休眠恢复和清理;使用真实 rc.2 Cordis/SlotRegistry 验证延迟插槽声明、移除重建及卸载;Chrome 检查头像右侧排列、弹层、键盘、外部关闭、窄窗口、中英文与浅深色截图。
130
162
 
131
- 当前验证:类型检查、15 项 Node 测试、10 项 Chrome 测试通过。新增验证覆盖日历导入与恢复、持久化、窗口同步、损坏文件、存储失败、到期提示、窄窗口与缓存失效。v1.0.2 的官方桌面 CLI 安装、bundle 启用与安装产物一致性已验证;v1.1.0 完成构建产物及真实 rc.2 注册器检查,独立预览和注册器测试不等同于新版桌面安装验收。
163
+ v1.3.2 发布检查包含 49 项 Node 检查和 27 项 Chrome 检查,共 76 项通过。自动更新覆盖 30 天边界、跨年、缓存、多窗口、404 每日重试、断网恢复、无效文件、限量下载、保存错误、超时和卸载取消。原有时间轴、提醒及生命周期检查继续保留。提醒反馈覆盖系统无回执、构造与异步错误、重复点击、关闭与卸载;提示音使用真实 Web Audio 验证波形、重复播放和清理。检查和桌面安装结果见[兼容性记录](https://github.com/a961282799-crypto/dsh-timeband/blob/main/docs/compatibility.md)。Chrome 中使用合成年度日历和受控网络响应,不表示 2027 官方安排已发布;通知替身不代表 Windows 实际横幅。
132
164
 
133
165
  `npm run compatibility` 核对 npm 最新正式标签与已验证版本,并检查四个宿主依赖版本。GitHub 的 Plugin checks 在提交、PR 或手动运行时执行此检查和功能测试;新宿主出现时会提示重新验证,不自动扩大兼容版本。详情见[兼容性记录](https://github.com/a961282799-crypto/dsh-timeband/blob/main/docs/compatibility.md)。
134
166
 
package/cordis.patch.yml CHANGED
@@ -1,3 +1,3 @@
1
1
  - insert:
2
2
  - id: dsh-timeband
3
- name: dsh-timeband
3
+ name: 'dsh-timeband'
package/dist/client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  window.__ModuleLoader__.load({id:"dsh-timeband",factory:function(require){var module={exports:{}};var exports=module.exports;
2
- "use strict";var A=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var he=Object.getOwnPropertyNames;var ge=Object.prototype.hasOwnProperty;var xe=(n,r)=>{for(var e in r)A(n,e,{get:r[e],enumerable:!0})},ye=(n,r,e,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of he(r))!ge.call(n,i)&&i!==e&&A(n,i,{get:()=>r[i],enumerable:!(a=fe(r,i))||a.enumerable});return n};var ve=n=>ye(A({},"__esModule",{value:!0}),n);var Le={};xe(Le,{apply:()=>$e,inject:()=>De});module.exports=ve(Le);function q(){let n=Date.now(),r=new Set,e=()=>{n=Date.now();for(let a of r)a()};return{getSnapshot:()=>n,subscribe(a){return r.add(a),()=>{r.delete(a)}},start(){let a,i=()=>{clearInterval(a),a=void 0,e(),document.visibilityState!=="hidden"&&(a=setInterval(e,1e3))};return document.addEventListener("visibilitychange",i),window.addEventListener("focus",i),window.addEventListener("pageshow",i),i(),()=>{clearInterval(a),document.removeEventListener("visibilitychange",i),window.removeEventListener("focus",i),window.removeEventListener("pageshow",i)}}}}var Q={schemaVersion:1,years:[2026],verifiedOn:"2026-09-30",source:"https://www.lufengshi.gov.cn/swlfsjj/gkmlpt/content/1/1199/mpost_1199727.html",holidays:[["2026-01-01","2026-01-03"],["2026-02-15","2026-02-23"],["2026-04-04","2026-04-06"],["2026-05-01","2026-05-05"],["2026-06-19","2026-06-21"],["2026-09-25","2026-09-27"],["2026-10-01","2026-10-07"]]};var ee="https://github.com/a961282799-crypto/dsh-timeband/tree/main/calendars",H=64*1024,f=class extends Error{kind;constructor(r){super(r),this.kind=r}};function B(n){if(typeof n!="string"||!/^\d{4}-\d{2}-\d{2}$/.test(n))return!1;let r=new Date(`${n}T00:00:00Z`);return Number.isFinite(r.getTime())&&r.toISOString().slice(0,10)===n}function E(n){try{if(new TextEncoder().encode(n).length>H)throw new Error;let r=JSON.parse(n);if(!r||typeof r!="object")throw new Error;let e=r;if(e.schemaVersion!==1||!Array.isArray(e.years)||!e.years.length||e.years.length>20)throw new Error;let a=e.years;if(a.some((l,s)=>!Number.isInteger(l)||l<2e3||l>9998||s>0&&l<=a[s-1]))throw new Error;if(!B(e.verifiedOn)||typeof e.source!="string")throw new Error;let i=new URL(e.source);if(i.protocol!=="https:"||i.username||i.password||!(i.hostname==="gov.cn"||i.hostname.endsWith(".gov.cn")))throw new Error;if(!Array.isArray(e.holidays)||e.holidays.length>400)throw new Error;let o=[];for(let l of e.holidays){if(!Array.isArray(l)||l.length!==2)throw new Error;let[s,p]=l;if(!B(s)||!B(p)||s>p||s.slice(0,4)!==p.slice(0,4)||!a.includes(Number(s.slice(0,4))))throw new Error;if(o.length&&s<=o.at(-1)[1])throw new Error;o.push([s,p])}if(a.some(l=>!o.some(([s])=>Number(s.slice(0,4))===l)))throw new Error;return{schemaVersion:1,years:[...a],verifiedOn:e.verifiedOn,source:i.href,holidays:o}}catch{throw new f("invalid")}}var m=E(JSON.stringify(Q));var T="dsh-timeband/calendar/v1";function te(n=()=>window.localStorage){let r=new Set,e=()=>{try{let o=n().getItem(T);return o===null?{data:m,imported:!1,issue:null}:{data:E(o),imported:!0,issue:null}}catch(o){return{data:m,imported:!1,issue:o instanceof f?o.kind:"storage"}}},a=e(),i=o=>{a=o;for(let l of r)l()};return{getSnapshot:()=>a,subscribe(o){return r.add(o),()=>{r.delete(o)}},import(o){let l=E(o);try{n().setItem(T,JSON.stringify(l))}catch{throw new f("storage")}i({data:l,imported:!0,issue:null})},restore(){try{n().removeItem(T)}catch{throw new f("storage")}i({data:m,imported:!1,issue:null})},start(){let o=()=>i(e()),l=s=>{(s.key===T||s.key===null)&&o()};return window.addEventListener("storage",l),window.addEventListener("focus",o),()=>{window.removeEventListener("storage",l),window.removeEventListener("focus",o)}}}}var c=require("react"),de=require("react-dom");var ae="https://api-docs.deepseek.com/quick_start/pricing/",x=36e5,ne=24*x,ke=8*x,j=[0,9,12,14,18,24];function k(n,r=m){if(!Number.isFinite(n)||!Number.isFinite(new Date(n).getTime()))throw new RangeError("Invalid timestamp");let e=new Date(n+ke),a=e.toISOString().slice(0,10),i=Date.parse(`${a}T00:00:00+08:00`),o=r.holidays.some(([u,g])=>a>=u&&a<=g),l=e.getUTCDay()===0||e.getUTCDay()===6,s=r.years.includes(e.getUTCFullYear());return{key:a,midnight:i,kind:o?"holiday":l?"weekend":s?"weekday":"unverified",covered:s,hour:(n-i)/x}}function Se(n,r=m){let{kind:e}=k(n,r);if(e==="holiday"||e==="weekend")return[{start:0,end:24,band:"offpeak"}];let a=e==="unverified"?"unknown":"peak";return[{start:0,end:9,band:"offpeak"},{start:9,end:12,band:a},{start:12,end:14,band:"offpeak"},{start:14,end:18,band:a},{start:18,end:24,band:"offpeak"}]}function M(n,r=m){let{hour:e,kind:a}=k(n,r);return a==="holiday"||a==="weekend"||e<9||e>=12&&e<14||e>=18?"offpeak":a==="unverified"?"unknown":"peak"}function Ne(n,r=m){let e=M(n,r),{midnight:a}=k(n,r);for(let i=0;i<370;i++)for(let o of j){let l=a+i*ne+o*x;if(l<=n)continue;let s=M(l,r);if(s!==e)return{at:l,band:s}}return null}function Ce(n,r=m){let e=k(n,r),a=Number(e.key.slice(0,4));if(!e.covered)return{expiresOn:null,notice:"uncovered"};for(;r.years.includes(a+1);)a++;let i=`${a}-12-31`,o=Date.parse(`${a+1}-01-01T00:00:00+08:00`);return{expiresOn:i,notice:o-e.midnight<=30*ne?"expiresSoon":null}}function re(){let n,r=0,e=0,a;return(i,o=m)=>{if(!Number.isFinite(i))throw new RangeError("Invalid timestamp");if(a&&n===o&&i>=r&&i<e)return a;let{hour:l,...s}=k(i,o),p=s.kind==="holiday"||s.kind==="weekend",u=p?0:j.findLast(y=>y<=l),g=p?24:j.find(y=>y>l);return r=s.midnight+u*x,e=s.midnight+g*x,n=o,a={day:s,band:M(i,o),next:Ne(i,o),segments:Se(i,o),coverage:Ce(i,o)},a}}function oe(n){let r=Math.max(0,Math.ceil(n/1e3)),e=Math.floor(r/86400),a=Math.floor(r/3600)%24,i=Math.floor(r/60)%60,o=[];return e>0&&o.push({value:e,unit:"days"}),r>=3600&&o.push({value:a,unit:"hours"}),r>=60&&o.push({value:i,unit:"minutes"}),{major:o,seconds:r%60}}var t=require("react/jsx-runtime"),Ee=new Intl.DateTimeFormat("zh-CN",{timeZone:"Asia/Shanghai",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),Te=new Intl.DateTimeFormat("en-GB",{timeZone:"Asia/Shanghai",hour:"2-digit",minute:"2-digit",hourCycle:"h23"});function ie({segments:n,hour:r,small:e=!1}){return(0,t.jsxs)("div",{className:`dtb-track${e?" dtb-track-small":""}`,"aria-hidden":"true",children:[n.map(a=>(0,t.jsx)("span",{className:`dtb-segment dtb-${a.band}`,style:{left:`${a.start/24*100}%`,width:`${(a.end-a.start)/24*100}%`}},a.start)),(0,t.jsx)("span",{className:"dtb-cursor",style:{left:`${r/24*100}%`}})]})}function se({wide:n,useClock:r,t:e,calendarStore:a}){let i=r(d=>d),o=(0,c.useSyncExternalStore)(a.subscribe,a.getSnapshot),l=(0,c.useMemo)(()=>re(),[]),{day:s,band:p,next:u,segments:g,coverage:y}=l(i,o.data),I=(i-s.midnight)/x,S=u!==null&&u.band!=="unknown"&&p!=="unknown",[D,P]=(0,c.useState)(!1),h=(0,c.useRef)(null),v=(0,c.useRef)(null),U=(0,c.useRef)(null),_=(0,c.useRef)(null),[F,N]=(0,c.useState)(null),[K,V]=(0,c.useState)(!1),w=(0,c.useId)(),$=S?oe(u.at-i):null,L=$?.major.map(d=>`${d.value}${e(d.unit)}`).join("")??"",R=$?`${$.seconds}${e("seconds")}`:"\u2014",z=`${L}${R}`,Y=(0,t.jsxs)("span",{className:"dtb-countdown",children:[(0,t.jsx)("span",{className:"dtb-count-main",children:L||R}),L&&(0,t.jsx)("small",{className:"dtb-count-seconds",children:R})]}),C=S?u.band==="peak"?"nextPeak":"nextOffpeak":"nextUnknown",W=(0,c.useMemo)(()=>S&&u?Ee.format(u.at):"",[S,u]),G=Te.format(i),J=d=>N(d instanceof f&&d.kind==="storage"?"calendarStorageError":"calendarInvalid"),ue=async d=>{V(!0),N(null);try{if(d.size>H)throw new f("invalid");a.import(await d.text()),N("calendarImported")}catch(b){J(b)}finally{V(!1)}};(0,c.useEffect)(()=>{let d=h.current;if(!d)return;let b=()=>P(d.matches(":popover-open"));return d.addEventListener("toggle",b),()=>d.removeEventListener("toggle",b)},[]),(0,c.useLayoutEffect)(()=>{if(!D)return;let d=()=>{if(!h.current||!v.current)return;let Z=v.current.getBoundingClientRect(),O=h.current.getBoundingClientRect(),be=Math.max(12,Math.min(Z.left,window.innerWidth-O.width-12)),me=Math.max(12,Math.min(Z.top-O.height-12,window.innerHeight-O.height-12));h.current.style.left=`${be}px`,h.current.style.top=`${me}px`};d(),U.current?.focus({preventScroll:!0});let b=new ResizeObserver(d);return h.current&&b.observe(h.current),v.current&&b.observe(v.current),window.addEventListener("resize",d),window.addEventListener("scroll",d,!0),()=>{b.disconnect(),window.removeEventListener("resize",d),window.removeEventListener("scroll",d,!0)}},[D,n]);let X=()=>{h.current?.hidePopover(),P(!1),v.current?.focus({preventScroll:!0})};return(0,t.jsxs)("div",{className:"dtb-root dtb-theme","data-wide":n,"data-band":p,children:[(0,t.jsxs)("button",{type:"button",className:"dtb-chip",ref:v,popovertarget:w,popovertargetaction:"toggle","aria-label":`${e("open")} \xB7 ${e(p)} \xB7 ${e(C)} ${z}`,"aria-expanded":D,"aria-haspopup":"dialog","aria-controls":w,title:`${e(p)} \xB7 ${e(C)} ${z}`,children:[(0,t.jsxs)("span",{className:"dtb-chip-top",children:[(0,t.jsx)("span",{className:`dtb-dot dtb-${p}`}),n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"dtb-chip-label",children:e(p)}),(0,t.jsx)("span",{className:"dtb-chip-count",children:Y})]})]}),n?(0,t.jsx)(ie,{segments:g,hour:I,small:!0}):(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"dtb-rail-icon","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M3 17 8 7l5 10 4-7 4 7"})})]}),(0,de.createPortal)((0,t.jsxs)("div",{ref:h,id:w,popover:"auto",role:"dialog","aria-labelledby":`${w}-title`,className:"dtb-card dtb-theme","data-band":p,onKeyDown:d=>{d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),X())},children:[(0,t.jsxs)("header",{className:"dtb-header",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"dtb-eyebrow",children:"DEEPSEEK / TIMEBAND"}),(0,t.jsx)("h2",{id:`${w}-title`,children:e("title")})]}),(0,t.jsx)("button",{type:"button",className:"dtb-close",ref:U,"aria-label":e("close"),onClick:X,children:"\xD7"})]}),(0,t.jsxs)("div",{className:"dtb-status",children:[(0,t.jsx)("span",{className:`dtb-dot dtb-${p}`}),(0,t.jsx)("strong",{children:e(p)})]}),(0,t.jsxs)("div",{className:"dtb-next",children:[(0,t.jsx)("span",{children:e(C)}),(0,t.jsx)("strong",{"aria-label":`${e(C)} ${z}`,children:Y})]}),(0,t.jsxs)("div",{className:"dtb-date",children:[(0,t.jsx)("span",{children:e("zone")}),(0,t.jsx)("span",{children:W&&(0,t.jsxs)(t.Fragment,{children:[e("nextSwitch")," ",W]})})]}),(0,t.jsxs)("div",{className:"dtb-axis",role:"img","aria-label":`${e("timeline")}\uFF1A${g.map(d=>`${d.start}:00\u2013${d.end}:00 ${e(d.band)}`).join("\uFF1B")}\u3002${e("now")} ${G}`,children:[(0,t.jsxs)("div",{className:"dtb-now",style:{left:`${Math.min(91,Math.max(9,I/24*100))}%`},children:[e("now")," ",G]}),(0,t.jsx)(ie,{segments:g,hour:I}),(0,t.jsxs)("div",{className:"dtb-ticks",children:[(0,t.jsx)("span",{children:"00"}),(0,t.jsx)("span",{children:"06"}),(0,t.jsx)("span",{children:"12"}),(0,t.jsx)("span",{children:"18"}),(0,t.jsx)("span",{children:"24"})]})]}),(0,t.jsxs)("div",{className:"dtb-day-kind",children:[s.key," ",(0,t.jsx)("span",{children:"\xB7"})," ",e(s.kind)]}),g.length>1&&(0,t.jsxs)("div",{className:"dtb-periods",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("i",{className:`dtb-dot dtb-${s.covered?"peak":"unknown"}`}),e(s.covered?"peak":"unknown")]}),(0,t.jsx)("b",{children:"09:00\u201312:00 \xB7 14:00\u201318:00"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("i",{className:"dtb-dot dtb-offpeak"}),e("offpeak")]}),(0,t.jsx)("b",{children:e("rest")})]})]}),!s.covered&&(0,t.jsx)("p",{className:"dtb-note",children:e("unknownNote")}),y.notice==="expiresSoon"&&(0,t.jsxs)("p",{className:"dtb-note dtb-calendar-notice",children:[e("calendarExpiresSoon")," ",y.expiresOn]}),(0,t.jsxs)("details",{className:"dtb-details",children:[(0,t.jsx)("summary",{children:e("details")}),(0,t.jsx)("p",{className:"dtb-note",children:e("note")}),(0,t.jsxs)("div",{className:"dtb-calendar-meta",children:[(0,t.jsxs)("span",{children:[e("calendar")," ",o.data.years.join("\u3001")," \xB7 ",e(o.imported?"calendarLocal":"calendarBuiltin")]}),(0,t.jsxs)("span",{children:[e("calendarVerified")," ",o.data.verifiedOn]})]}),(0,t.jsxs)("div",{className:"dtb-calendar-actions",children:[(0,t.jsx)("button",{type:"button",className:"dtb-button",disabled:K,onClick:()=>_.current?.click(),children:e("calendarImport")}),(0,t.jsx)("button",{type:"button",className:"dtb-button",disabled:K||!o.imported&&!o.issue,onClick:()=>{try{a.restore(),N("calendarRestored")}catch(d){J(d)}},children:e("calendarRestore")}),(0,t.jsxs)("a",{href:ee,target:"_blank",rel:"noreferrer",children:[e("calendarDownload")," \u2197"]}),(0,t.jsx)("input",{type:"file",accept:".json,application/json",ref:_,hidden:!0,"aria-label":e("calendarImport"),onChange:d=>{let b=d.currentTarget.files?.[0];d.currentTarget.value="",b&&ue(b)}})]}),(0,t.jsx)("p",{className:"dtb-note",children:e("calendarImportHint")}),(0,t.jsx)("p",{className:"dtb-note dtb-calendar-feedback",role:"status",children:F?e(F):o.issue?e(o.issue==="invalid"?"calendarSavedInvalid":"calendarStorageError"):""}),(0,t.jsxs)("footer",{className:"dtb-footer",children:[(0,t.jsxs)("a",{href:o.data.source,target:"_blank",rel:"noreferrer",children:[e("calendarSource")," \u2197"]}),(0,t.jsxs)("a",{href:ae,target:"_blank",rel:"noreferrer",children:[e("rule")," \u2197"]})]})]})]}),document.body)]})}var le={title:"\u4ECA\u65E5\u65F6\u6BB5",zone:"\u5317\u4EAC\u65F6\u95F4 \xB7 UTC+8",peak:"\u5CF0\u65F6\u6BB5",offpeak:"\u8C37\u65F6\u6BB5",unknown:"\u5F85\u6838\u5B9E",nextPeak:"\u8DDD\u79BB\u5CF0\u65F6\u6BB5",nextOffpeak:"\u8DDD\u79BB\u8C37\u65F6\u6BB5",nextUnknown:"\u540E\u7EED\u65E5\u5386\u5F85\u66F4\u65B0",weekday:"\u5468\u4E00\u81F3\u5468\u4E94",weekend:"\u5468\u672B \xB7 \u5168\u5929\u8C37\u65F6\u6BB5",holiday:"\u516C\u5171\u5047\u671F \xB7 \u5168\u5929\u8C37\u65F6\u6BB5",unverified:"\u672C\u5E74\u5EA6\u8282\u5047\u65E5\u65E5\u5386\u5F85\u66F4\u65B0",allDay:"\u5168\u5929",rest:"\u5176\u4F59\u65F6\u6BB5",now:"\u73B0\u5728",nextSwitch:"\u4E0B\u6B21\u5207\u6362\uFF1A",close:"\u5173\u95ED\u65F6\u95F4\u8F74",open:"\u67E5\u770B\u5CF0\u8C37\u65F6\u95F4\u8F74",rule:"DeepSeek \u5B98\u65B9\u65F6\u6BB5\u89C4\u5219",details:"\u65F6\u6BB5\u89C4\u5219\u4E0E\u65E5\u5386",calendar:"\u65E5\u5386\u8986\u76D6\uFF1A",note:"\u5468\u672B\uFF08\u542B\u8C03\u4F11\u4E0A\u73ED\u65E5\uFF09\u53CA\u516C\u5171\u5047\u671F\u5168\u5929\u4E3A\u8C37\u65F6\u6BB5\u3002",calendarBuiltin:"\u5185\u7F6E",calendarLocal:"\u672C\u5730\u5BFC\u5165",calendarVerified:"\u6838\u5BF9\u65E5\u671F\uFF1A",calendarImport:"\u5BFC\u5165\u65E5\u5386",calendarRestore:"\u6062\u590D\u5185\u7F6E",calendarDownload:"\u83B7\u53D6\u65B0\u65E5\u5386",calendarSource:"\u5047\u671F\u516C\u544A\u6765\u6E90",calendarImportHint:"\u9009\u62E9\u4ECE\u9879\u76EE\u83B7\u53D6\u7684\u65E5\u5386\u6587\u4EF6\u3002\u5BFC\u5165\u540E\u6309\u6587\u4EF6\u8986\u76D6\u7684\u5E74\u4EFD\u5224\u65AD\uFF1B\u672A\u6536\u5F55\u5E74\u4EFD\u4ECD\u63D0\u793A\u5F85\u6838\u5B9E\u3002",calendarImported:"\u65E5\u5386\u5DF2\u5BFC\u5165\u5E76\u4FDD\u5B58\uFF0C\u65F6\u95F4\u8F74\u5DF2\u66F4\u65B0\u3002",calendarRestored:"\u5DF2\u6062\u590D\u5185\u7F6E\u65E5\u5386\u3002",calendarInvalid:"\u65E5\u5386\u683C\u5F0F\u6216\u6765\u6E90\u4E0D\u7B26\u5408\u8981\u6C42\uFF0C\u8BF7\u4F7F\u7528\u9879\u76EE\u63D0\u4F9B\u7684\u6587\u4EF6\uFF08\u6700\u5927 64 KB\uFF09\u3002\u539F\u65E5\u5386\u4FDD\u6301\u4E0D\u53D8\u3002",calendarStorageError:"\u65E0\u6CD5\u4FDD\u5B58\u65E5\u5386\uFF0C\u8BF7\u68C0\u67E5\u5E94\u7528\u7684\u672C\u5730\u5B58\u50A8\u6743\u9650\u540E\u91CD\u8BD5\u3002",calendarSavedInvalid:"\u5DF2\u4FDD\u5B58\u7684\u65E5\u5386\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u5F53\u524D\u4F7F\u7528\u5185\u7F6E\u65E5\u5386\uFF1B\u53EF\u91CD\u65B0\u5BFC\u5165\u6216\u6062\u590D\u5185\u7F6E\u3002",calendarExpiresSoon:"\u65E5\u5386\u5373\u5C06\u5230\u671F\uFF0C\u8BF7\u53CA\u65F6\u66F4\u65B0\u3002\u6709\u6548\u81F3\uFF1A",unknownNote:"\u7F3A\u5C11\u672C\u5E74\u5EA6\u5047\u671F\u6570\u636E\uFF0C\u5DE5\u4F5C\u65E5\u5CF0\u65F6\u6BB5\u6682\u4E0D\u4F5C\u786E\u5B9A\u5224\u65AD\u3002",timeline:"\u5317\u4EAC\u65F6\u95F4 24 \u5C0F\u65F6\u65F6\u95F4\u8F74",days:"\u5929",hours:"\u5C0F\u65F6",minutes:"\u5206\u949F",seconds:"\u79D2"},ce={title:"Today\u2019s schedule",zone:"Beijing time \xB7 UTC+8",peak:"Peak",offpeak:"Off-peak",unknown:"Unverified",nextPeak:"Until peak hours",nextOffpeak:"Until off-peak",nextUnknown:"Calendar update needed",weekday:"Monday\u2013Friday",weekend:"Weekend \xB7 off-peak all day",holiday:"Public holiday \xB7 off-peak all day",unverified:"Holiday calendar needs an update",allDay:"All day",rest:"All other hours",now:"Now",nextSwitch:"Next change:",close:"Close timeline",open:"View peak hours timeline",rule:"DeepSeek official schedule",details:"Schedule rules and calendar",calendar:"Calendar coverage:",note:"Weekends (including makeup workdays) and public holidays are off-peak all day.",calendarBuiltin:"Built-in",calendarLocal:"Local import",calendarVerified:"Checked on:",calendarImport:"Import calendar",calendarRestore:"Restore built-in",calendarDownload:"Get new calendar",calendarSource:"Holiday notice source",calendarImportHint:"Choose a calendar file from this project. Imported coverage replaces the current calendar; other years remain unverified.",calendarImported:"Calendar saved. The timeline is updated.",calendarRestored:"Built-in calendar restored.",calendarInvalid:"Invalid calendar format or source. Use a project calendar file (up to 64 KB). Your current calendar is unchanged.",calendarStorageError:"Calendar could not be saved. Check local storage permissions and try again.",calendarSavedInvalid:"Saved calendar is unreadable; using the built-in calendar. Import again or restore it.",calendarExpiresSoon:"Calendar expires soon. Please update. Valid until:",unknownNote:"Holiday data for this year is unavailable; weekday peak periods are unverified.",timeline:"24-hour timeline in Beijing time",days:"d",hours:"h",minutes:"min",seconds:"s"};var pe=`.dtb-theme {
2
+ "use strict";var Y=Object.defineProperty;var ze=Object.getOwnPropertyDescriptor;var Be=Object.getOwnPropertyNames;var Fe=Object.prototype.hasOwnProperty;var Ke=(e,n)=>{for(var t in n)Y(e,t,{get:n[t],enumerable:!0})},qe=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of Be(n))!Fe.call(e,a)&&a!==t&&Y(e,a,{get:()=>n[a],enumerable:!(r=ze(n,a))||r.enumerable});return e};var Ve=e=>qe(Y({},"__esModule",{value:!0}),e);var vt={};Ke(vt,{apply:()=>yt,inject:()=>gt});module.exports=Ve(vt);function ce(){let e=Date.now(),n=new Set,t=()=>{e=Date.now();for(let r of n)r()};return{getSnapshot:()=>e,subscribe(r){return n.add(r),()=>{n.delete(r)}},start(){let r,a=()=>{clearInterval(r),r=void 0,t(),document.visibilityState!=="hidden"&&(r=setInterval(t,1e3))};return document.addEventListener("visibilitychange",a),window.addEventListener("focus",a),window.addEventListener("pageshow",a),a(),()=>{clearInterval(r),document.removeEventListener("visibilitychange",a),window.removeEventListener("focus",a),window.removeEventListener("pageshow",a)}}}}var ue={schemaVersion:1,years:[2026],verifiedOn:"2026-09-30",source:"https://www.lufengshi.gov.cn/swlfsjj/gkmlpt/content/1/1199/mpost_1199727.html",holidays:[["2026-01-01","2026-01-03"],["2026-02-15","2026-02-23"],["2026-04-04","2026-04-06"],["2026-05-01","2026-05-05"],["2026-06-19","2026-06-21"],["2026-09-25","2026-09-27"],["2026-10-01","2026-10-07"]]};var Ge="https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/",F=64*1024;function pe(e){if(!Number.isInteger(e)||e<2e3||e>9998)throw new C("invalid");return`${Ge}${e}.json`}var C=class extends Error{kind;constructor(n){super(n),this.kind=n}};function M(e){if(typeof e!="string"||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let n=new Date(`${e}T00:00:00Z`);return Number.isFinite(n.getTime())&&n.toISOString().slice(0,10)===e}function O(e){try{if(new TextEncoder().encode(e).length>F)throw new Error;let n=JSON.parse(e);if(!n||typeof n!="object")throw new Error;let t=n;if(t.schemaVersion!==1||!Array.isArray(t.years)||!t.years.length||t.years.length>20)throw new Error;let r=t.years;if(r.some((s,i)=>!Number.isInteger(s)||s<2e3||s>9998||i>0&&s<=r[i-1]))throw new Error;if(!M(t.verifiedOn)||typeof t.source!="string")throw new Error;let a=new URL(t.source);if(a.protocol!=="https:"||a.username||a.password||!(a.hostname==="gov.cn"||a.hostname.endsWith(".gov.cn")))throw new Error;if(!Array.isArray(t.holidays)||t.holidays.length>400)throw new Error;let o=[];for(let s of t.holidays){if(!Array.isArray(s)||s.length!==2)throw new Error;let[i,m]=s;if(!M(i)||!M(m)||i>m||i.slice(0,4)!==m.slice(0,4)||!r.includes(Number(i.slice(0,4))))throw new Error;if(o.length&&i<=o.at(-1)[1])throw new Error;o.push([i,m])}if(r.some(s=>!o.some(([i])=>Number(i.slice(0,4))===s)))throw new Error;return{schemaVersion:1,years:[...r],verifiedOn:t.verifiedOn,source:a.href,holidays:o}}catch{throw new C("invalid")}}var D=O(JSON.stringify(ue));function K(e,n){let t=n.verifiedOn>=e.verifiedOn,r=[...new Set([...e.years,...n.years])].sort((o,s)=>o-s),a=r.flatMap(o=>(n.years.includes(o)&&(t||!e.years.includes(o))?n:e).holidays.filter(([i])=>Number(i.slice(0,4))===o));return{...t?n:e,years:r,holidays:a}}var G="dsh-timeband/calendar/v1";function me(e=()=>window.localStorage){let n=new Set,t=()=>{try{let s=e().getItem(G);return s===null?{data:D,issue:null}:{data:K(D,O(s)),issue:null}}catch(s){return{data:D,issue:s instanceof C?s.kind:"storage"}}},r={...t(),update:"idle"},a=s=>{r=s;for(let i of n)i()},o=()=>{let s=t();s.issue===r.issue&&JSON.stringify(s.data)===JSON.stringify(r.data)||a({...s,update:r.update})};return{getSnapshot:()=>r,subscribe(s){return n.add(s),()=>{n.delete(s)}},refresh:o,save(s){let i=K(K(r.data,t().data),O(JSON.stringify(s)));try{e().setItem(G,JSON.stringify(i))}catch{throw new C("storage")}a({data:i,issue:null,update:"idle"})},setUpdateStatus(s,i=r.issue){(r.update!==s||r.issue!==i)&&a({...r,update:s,issue:i})},start(){let s=i=>{(i.key===G||i.key===null)&&o()};return window.addEventListener("storage",s),window.addEventListener("focus",o),()=>{window.removeEventListener("storage",s),window.removeEventListener("focus",o)}}}}function fe(e){let n=[];for(let t of[...new Set(e)].sort()){let r=n.at(-1);r&&Date.parse(`${t}T00:00:00Z`)-Date.parse(`${r[1]}T00:00:00Z`)===864e5?r[1]=t:n.push([t,t])}return n}function be(e,n,t,r){try{let a=JSON.parse(e);if(!a||typeof a!="object")throw new Error;let o=a;if(o.year!==n||!Array.isArray(o.papers)||!Array.isArray(o.days))throw new Error;if(o.papers.length===0&&o.days.length===0)return null;if(!o.papers.length||o.papers.length>20||!o.days.length||o.days.length>400)throw new Error;for(let p of o.papers){if(typeof p!="string")throw new Error;let l=new URL(p);if(l.protocol!=="https:"||l.username||l.password||!(l.hostname==="gov.cn"||l.hostname.endsWith(".gov.cn")))throw new Error}let s=[],i=[],m=new Set;for(let p of o.days){if(!p||typeof p!="object")throw new Error;let l=p;if(!M(l.date)||typeof l.isOffDay!="boolean"||typeof l.name!="string"||!l.name.trim()||m.has(l.date))throw new Error;if(l.date<`${n-1}-12-01`||l.date>`${n}-12-31`)throw new Error;m.add(l.date),l.isOffDay&&(l.date.startsWith(`${n}-`)?s:i).push(l.date)}if(!s.length)throw new Error;let f=[n],c=fe(s);if(i.length&&r.years.includes(n-1)){let p=r.holidays.filter(([w])=>w.startsWith(`${n-1}-`)),l=[...i];for(let[w,g]of p)for(let v=Date.parse(`${w}T00:00:00Z`);v<=Date.parse(`${g}T00:00:00Z`);v+=864e5)l.push(new Date(v).toISOString().slice(0,10));f.unshift(n-1),c.unshift(...fe(l))}return O(JSON.stringify({schemaVersion:1,years:f,verifiedOn:t,source:o.papers[0],holidays:c}))}catch{throw new C("invalid")}}var he="https://api-docs.deepseek.com/quick_start/pricing/",T=36e5,j=24*T,Je=8*T,J=[0,9,12,14,18,24];function A(e,n=D){if(!Number.isFinite(e)||!Number.isFinite(new Date(e).getTime()))throw new RangeError("Invalid timestamp");let t=new Date(e+Je),r=t.toISOString().slice(0,10),a=Date.parse(`${r}T00:00:00+08:00`),o=n.holidays.some(([f,c])=>r>=f&&r<=c),s=t.getUTCDay()===0||t.getUTCDay()===6,i=n.years.includes(t.getUTCFullYear());return{key:r,midnight:a,kind:o?"holiday":s?"weekend":i?"weekday":"unverified",covered:i,hour:(e-a)/T}}function We(e,n=D){let{kind:t}=A(e,n);if(t==="holiday"||t==="weekend")return[{start:0,end:24,band:"offpeak"}];let r=t==="unverified"?"unknown":"peak";return[{start:0,end:9,band:"offpeak"},{start:9,end:12,band:r},{start:12,end:14,band:"offpeak"},{start:14,end:18,band:r},{start:18,end:24,band:"offpeak"}]}function W(e,n=D){let{hour:t,kind:r}=A(e,n);return r==="holiday"||r==="weekend"||t<9||t>=12&&t<14||t>=18?"offpeak":r==="unverified"?"unknown":"peak"}function Z(e,n=D){let t=W(e,n),{midnight:r}=A(e,n);for(let a=0;a<370;a++)for(let o of J){let s=r+a*j+o*T;if(s<=e)continue;let i=W(s,n);if(i!==t)return{at:s,band:i}}return null}function X(e,n=D){let t=A(e,n),r=Number(t.key.slice(0,4));if(!t.covered)return{expiresOn:null,notice:"uncovered"};for(;n.years.includes(r+1);)r++;let a=`${r}-12-31`,o=Date.parse(`${r+1}-01-01T00:00:00+08:00`);return{expiresOn:a,notice:o-t.midnight<=30*j?"expiresSoon":null}}function q(){let e,n=0,t=0,r;return(a,o=D)=>{if(!Number.isFinite(a))throw new RangeError("Invalid timestamp");if(r&&e===o&&a>=n&&a<t)return r;let{hour:s,...i}=A(a,o),m=i.kind==="holiday"||i.kind==="weekend",f=m?0:J.findLast(p=>p<=s),c=m?24:J.find(p=>p>s);return n=i.midnight+f*T,t=i.midnight+c*T,e=o,r={day:i,band:W(a,o),next:Z(a,o),segments:We(a,o),coverage:X(a,o)},r}}function ge(e){let n=Math.max(0,Math.ceil(e/1e3)),t=Math.floor(n/86400),r=Math.floor(n/3600)%24,a=Math.floor(n/60)%60,o=[];return t>0&&o.push({value:t,unit:"days"}),n>=3600&&o.push({value:r,unit:"hours"}),n>=60&&o.push({value:a,unit:"minutes"}),{major:o,seconds:n%60}}var ye="dsh-timeband/calendar-check/v1",ve=j,Ze=1e4;async function Xe(e){if(Number(e.headers.get("content-length"))>F||!e.body)throw new C("invalid");let n=e.body.getReader(),t=new TextDecoder("utf-8",{fatal:!0}),r=0,a="";try{for(;;){let{done:o,value:s}=await n.read();if(o)break;if(r+=s.byteLength,r>F)throw new C("invalid");a+=t.decode(s,{stream:!0})}return a+t.decode()}finally{n.releaseLock()}}function we(e){let n=e.now??(()=>Date.now()),t=e.fetch??((u,y)=>fetch(u,y)),r=e.getStorage??(()=>window.localStorage),a=e.synchronize??(u=>typeof navigator<"u"&&navigator.locks?navigator.locks.request("dsh-timeband-calendar-update",u):u()),o=!1,s=!1,i=0,m,f,c,p=0,l=e.store.getSnapshot().data,w=()=>{let u=e.store.getSnapshot().data,y=n(),k=A(y,u),E=X(y,u);return k.covered?E.notice==="expiresSoon"?Number(E.expiresOn.slice(0,4))+1:null:Number(k.key.slice(0,4))},g=()=>{try{let u=JSON.parse(r().getItem(ye)??"null");if(u&&Number.isInteger(u.year)&&Number.isFinite(u.at)&&(u.status==="waiting"||u.status==="failed"))return u}catch{}return c},v=u=>{c=u;try{r().setItem(ye,JSON.stringify(u))}catch{}},b=async(u=!1)=>{if(!o||s)return;s=!0;let y=i;try{await a(async()=>{if(!o||y!==i)return;e.store.refresh();let k=w();if(k===null){e.store.setUpdateStatus("idle");return}let E=g();if(E?.year===k&&n()>=E.at&&n()-E.at<ve&&!(u&&E.status==="failed")){p=Math.min(p,E.at+ve),e.store.setUpdateStatus(E.status);return}e.store.setUpdateStatus("checking");let R=new AbortController;m=R;let U=setTimeout(()=>R.abort(),Ze);f=U;let P="failed";try{let I=await t(pe(k),{signal:R.signal,credentials:"omit",referrerPolicy:"no-referrer",cache:"no-cache",redirect:"error"});if(!o||y!==i||R.signal.aborted)return;if(I.status===404)P="waiting";else{if(!I.ok)throw new Error("Calendar request failed");let N=be(await Xe(I),k,A(n()).key,e.store.getSnapshot().data);if(!o||y!==i||R.signal.aborted)return;if(N===null)P="waiting";else{e.store.save(N);return}}}catch(I){if(!o||y!==i)return;I instanceof C&&I.kind==="storage"&&e.store.setUpdateStatus("failed","storage")}finally{clearTimeout(U),R.abort(),m===R&&(m=void 0),f===U&&(f=void 0)}!o||y!==i||(v({year:k,at:n(),status:P}),e.store.setUpdateStatus(P))})}catch{if(o&&y===i){let k=w();k!==null&&v({year:k,at:n(),status:"failed"}),e.store.setUpdateStatus("failed")}}finally{y===i&&(s=!1)}},h=()=>{let u=n(),y=e.store.getSnapshot().data;(y!==l||u<p-T||u>=p)&&(l=y,p=Math.min(u+T,A(u,y).midnight+j),b())};return{start(){o=!0,i++,s=!1,p=0;let u=window,y=[e.clock.subscribe(h),e.store.subscribe(h)],k=()=>{p=n()+T,b(!0)};u.addEventListener("online",k);let E=setInterval(h,T);return h(),()=>{o=!1,i++,s=!1,m?.abort(),clearTimeout(f),f=void 0,clearInterval(E),y.forEach(R=>R()),u.removeEventListener("online",k),e.store.getSnapshot().update==="checking"&&e.store.setUpdateStatus("idle")}}}}var H="dsh-timeband/reminders/v1",Qe={read:()=>typeof Notification=="function"?Notification.permission:"unsupported",request:()=>Notification.requestPermission()};function xe(e=()=>window.localStorage,n=Qe){let t=new Set,r=()=>{try{if(e().getItem(H)!=="true")return{enabled:!1,busy:!1,issue:null};let i=n.read();return i==="granted"?{enabled:!0,busy:!1,issue:null}:{enabled:!1,busy:!1,issue:i==="unsupported"?"unsupported":"denied"}}catch{return{enabled:!1,busy:!1,issue:"storage"}}},a=r(),o=0,s=i=>{if(!(i.enabled===a.enabled&&i.busy===a.busy&&i.issue===a.issue)){a=i;for(let m of t)m()}};return{getSnapshot:()=>a,subscribe(i){return t.add(i),()=>{t.delete(i)}},async setEnabled(i){let m=++o;if(!i){s({enabled:!1,busy:!1,issue:null});try{e().removeItem(H)}catch{s({enabled:!1,busy:!1,issue:"storage"})}return}s({enabled:!1,busy:!0,issue:null});let f;try{f=n.read(),f==="default"&&(f=await n.request())}catch{m===o&&s({enabled:!1,busy:!1,issue:"denied"});return}if(m===o){if(f!=="granted"){s({enabled:!1,busy:!1,issue:f==="unsupported"?"unsupported":"denied"});return}try{e().setItem(H,"true"),s({enabled:!0,busy:!1,issue:null})}catch{m===o&&s({enabled:!1,busy:!1,issue:"storage"})}}},fail(i){o++;try{e().removeItem(H)}catch{i="storage"}s({enabled:!1,busy:!1,issue:i})},start(){let i=()=>{a.busy||s(r())},m=f=>{(f.key===H||f.key===null)&&(o++,s(r()))};return window.addEventListener("storage",m),window.addEventListener("focus",i),window.addEventListener("pageshow",i),()=>{o++,window.removeEventListener("storage",m),window.removeEventListener("focus",i),window.removeEventListener("pageshow",i)}}}}var Q=5*6e4,z="dsh-timeband/reminder-sent/v1",et="dsh-timeband/peak-reminder";function tt(e){return typeof navigator<"u"&&navigator.locks?navigator.locks.request(et,e):Promise.resolve().then(e)}function ke(e){let n=q(),t=e.now??Date.now,r=e.getStorage??(()=>window.localStorage),a=e.synchronize??tt,o,s=null,i,m=null,f=null,c=!1,p=0,l=()=>{clearTimeout(i),i=void 0,m=null},w=b=>{let h=e.calendarStore.getSnapshot().data,u=n(b,h);if(u!==o){o=u;let y=u.band==="unknown"?null:u.next;y?.band==="offpeak"&&(y=Z(y.at,h)),s=y?.band==="peak"?y.at:null}return s},g=(b,h)=>{m!==b&&(l(),m=b,i=setTimeout(()=>{i=void 0,m=null,v()},Math.max(1,Math.min(2147483647,b-h))))},v=()=>{if(!c||!e.reminderStore.getSnapshot().enabled){l(),f=null;return}let b=t(),h=w(b);if(h===null){l(),f=null;return}if(b<h-Q){f=null,g(h-Q,b);return}if(g(h,b),f===h)return;f=h;let u=p;a(()=>{if(!c||p!==u||!e.reminderStore.getSnapshot().enabled)return;let y=t();if(y<h-Q||y>=h||w(y)!==h)return;let k;try{if(k=r().getItem(z),k!==null&&Number.isSafeInteger(Number(k))&&Number(k)>=h)return;r().setItem(z,String(h))}catch{e.reminderStore.fail("storage");return}let E=()=>{if(c){try{r().getItem(z)===String(h)&&(k===null?r().removeItem(z):r().setItem(z,k))}catch{}e.reminderStore.fail("delivery")}};try{e.notify(h,()=>{a(E).catch(()=>{c&&e.reminderStore.fail("delivery")})})}catch{E()}}).catch(()=>{c&&p===u&&e.reminderStore.fail("delivery")})};return{start(){c=!0,f=null;let b=()=>{p++,f=null,v()},h=[e.clock.subscribe(v),e.calendarStore.subscribe(b),e.reminderStore.subscribe(b)];return v(),()=>{c=!1,p++,l(),h.forEach(u=>u())}}}}function Se(e=()=>new AudioContext){let n,t=!1,r=0,a,o,s=!1,i,m=()=>((!n||n.state==="closed")&&(n=e()),n),f=()=>{r++,a?.(),a=void 0,o?.(),o=void 0},c=(g=n)=>{if(!(!g||g!==n||o||g.state==="closed"))try{g.suspend().catch(()=>{})}catch{}},p=()=>{f(),c()},l=()=>{f();let g=n;n=void 0,s=!1,i=void 0;try{g&&g.state!=="closed"&&g.close().catch(()=>{})}catch{}},w=(g,v)=>new Promise(b=>{let h=!1,u=E=>{h||(h=!0,clearTimeout(k),a===y&&(a=void 0),b(E))},y=()=>u(!1),k=setTimeout(()=>u(!1),1e3);a=y;try{g.resume().then(()=>{let E=!t&&n===g&&v===r;if(h||!E){E&&!o&&c(g),u(!1);return}s=g.state==="running",u(s)},()=>u(!1))}catch{u(!1)}});return{prime(){if(t)return Promise.resolve(!1);if(s)return Promise.resolve(!0);if(i)return i;try{let g=m(),v=r,b=w(g,v).then(h=>(v===r&&c(g),i===b&&(i=void 0),h));return i=b,b}catch{return Promise.resolve(!1)}},async play(){if(t)return!1;f();let g=r;try{let v=m();if(!await w(v,g)||t||g!==r||v.state!=="running")return!1;let b=v.createOscillator(),h=v.createGain(),u=v.currentTime+.01;b.type="sine",b.frequency.setValueAtTime(880,u),b.frequency.setValueAtTime(660,u+.26),h.gain.setValueAtTime(0,u),h.gain.linearRampToValueAtTime(.075,u+.015),h.gain.exponentialRampToValueAtTime(1e-4,u+.24),h.gain.setValueAtTime(0,u+.25),h.gain.linearRampToValueAtTime(.065,u+.275),h.gain.exponentialRampToValueAtTime(1e-4,u+.53),h.gain.linearRampToValueAtTime(0,u+.55),b.connect(h),h.connect(v.destination);let y=()=>{b.onended=null;try{b.stop()}catch{}b.disconnect(),h.disconnect()};return o=y,b.onended=()=>{y(),g===r&&(o=void 0,c(v))},b.start(u),b.stop(u+.56),!0}catch{return g===r&&p(),!1}},stop:p,release:l,dispose(){t=!0,l()}}}var nt=5e3;function Ee(e=(t,r)=>new Notification(t,r),n=Se()){let t=new Set,r=null,a=0,o=!1,s,i,m=p=>{r=p;for(let l of t)l()},f=()=>{if(clearTimeout(i),i=void 0,!!s){s.onshow=s.onerror=s.onclose=s.onclick=null;try{s.close()}catch{}s=void 0}},c=()=>{f(),n.stop(),r&&m(null)};return{getSnapshot:()=>r,subscribe(p){return t.add(p),()=>{t.delete(p)}},primeSound:()=>n.prime(),releaseSound(){c(),n.release()},show(p,l,w){if(o)return;f();let g=++a;m({id:g,title:p,body:l,delivery:"pending",sound:"pending"}),n.play().then(b=>{!o&&r?.id===g&&m({...r,sound:b?"played":"unavailable"})});let v=b=>{o||r?.id!==g||m({...r,delivery:b})};try{s=e(`DSH TimeBand \xB7 ${p}`,{body:l,tag:w,silent:!0}),s.onshow=()=>{clearTimeout(i),i=void 0,v("accepted")},s.onerror=()=>{f(),v("unavailable")},s.onclose=()=>{f(),r?.id===g&&r.delivery==="pending"&&v("unconfirmed")},s.onclick=()=>{window.focus(),c()},i=setTimeout(()=>{i=void 0,v("unconfirmed")},nt)}catch{f(),v("unavailable")}},dismiss:c,dispose(){o=!0,c(),n.dispose()}}}var Re={name:"dsh-timeband",version:"1.3.9",description:"\u5934\u50CF\u65C1\u7684 DeepSeek \u5CF0\u8C37\u65F6\u6BB5\u4E0E\u4ECA\u65E5\u65F6\u95F4\u8F74",type:"module",license:"MIT",publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},repository:{type:"git",url:"git+https://github.com/a961282799-crypto/dsh-timeband.git"},homepage:"https://github.com/a961282799-crypto/dsh-timeband#readme",bugs:{url:"https://github.com/a961282799-crypto/dsh-timeband/issues"},main:"./dist/index.js",exports:{".":"./dist/index.js","./client":"./dist/client.js","./package.json":"./package.json"},files:["dist/index.js","dist/client.js","calendars","cordis.patch.yml","README.md","LICENSE"],keywords:["dsh-plugin","deepseek-harness","timeline"],engines:{node:">=22"},dsh:{bundle:{patch:"./cordis.patch.yml"},client:{platform:"web",inject:["@deepseek-ai/dsh-api-remotes","@deepseek-ai/dsh-client-ui-renderer","@deepseek-ai/dsh-client-ui-sidebar","@deepseek-ai/dsh-client-locale"]}},peerDependencies:{"@deepseek-ai/dsh":"0.2.1-rc.5"},peerDependenciesMeta:{"@deepseek-ai/dsh":{optional:!0}},scripts:{build:"node scripts/build.mjs",typecheck:"tsc --noEmit",test:"node --experimental-strip-types --test tests/*.test.ts tests/*.test.mjs","test:browser":"playwright test",preview:"node scripts/preview.mjs",screenshots:"node scripts/screenshots.mjs",compatibility:"node scripts/check-compatibility.mjs next",check:"npm run typecheck && npm run build && npm test && npm run test:browser",prepack:"npm run typecheck && npm run build"},devDependencies:{"@deepseek-ai/cordis":"4.0.5","@deepseek-ai/dsh-client-locale":"0.2.1-rc.5","@deepseek-ai/dsh-client-ui-renderer":"0.2.1-rc.5","@deepseek-ai/dsh-client-ui-sidebar":"0.2.1-rc.5","@deepseek-ai/dsh-client-ui-slots":"0.2.1-rc.5","@playwright/test":"1.63.0","@types/node":"^24.0.0","@types/react":"~18.3.1","@types/react-dom":"~18.3.0",esbuild:"0.28.2",react:"18.3.1","react-dom":"18.3.1",typescript:"7.0.2"}};var Ne=Re.name,De=Ne.replace(/^@/,"").replace("/","-"),at="https://api.github.com/repos/a961282799-crypto/dsh-timeband/releases/latest",Ce="https://github.com/a961282799-crypto/dsh-timeband/releases",it=1e4,Te=64*1024;function ee(e){return typeof e!="string"||!/^(0|[1-9]\d{0,5})\.(0|[1-9]\d{0,5})\.(0|[1-9]\d{0,5})$/.test(e)?null:e.split(".").map(Number)}function te(e,n){let t=ee(e),r=ee(n);if(!t||!r)return!1;for(let a=0;a<3;a++)if(t[a]!==r[a])return t[a]>r[a];return!1}function ot(e){if(!ee(e))return null;let n=`v${e}`;return{version:String(e),url:`${Ce}/tag/${n}`,download:`${Ce}/download/${n}/${De}-${e}.tgz`}}function st(e){if(!e||typeof e!="object")throw new Error("Invalid release");let n=e,t=ot(typeof n.tag_name=="string"?n.tag_name.slice(1):null);if(!t||n.tag_name!==`v${t.version}`||n.draft!==!1||n.prerelease!==!1||n.html_url!==t.url||!Array.isArray(n.assets)||!n.assets.some(r=>r?.name===`${De}-${t.version}.tgz`&&r.state==="uploaded"&&r.browser_download_url===t.download))throw new Error("Invalid release");return t}async function dt(e){if(!e.ok||Number(e.headers.get("content-length"))>Te)throw new Error("Release check failed");let n=await e.text();if(new TextEncoder().encode(n).length>Te)throw new Error("Release too large");return st(JSON.parse(n))}function Ie(e){let n=e.fetch??((c,p)=>fetch(c,p)),t=new Set,r={latest:null,check:"idle",install:"idle"},a=!0,o,s,i,m=c=>{r={...r,...c};for(let p of t)p()},f=async()=>{if(!a||o||i)return;let c=new AbortController;o=c,m({check:"checking"}),s=setTimeout(()=>c.abort(),it);try{let p=await n(at,{signal:c.signal,credentials:"omit",referrerPolicy:"no-referrer",cache:"no-cache",redirect:"error"}),l=await dt(p);if(!a)return;if(c.signal.aborted)throw new Error("Release check timed out");m({latest:l,check:"current"})}catch{a&&m({check:"failed"})}finally{clearTimeout(s),s=void 0,o=void 0,c.abort()}};return{version:e.version,getSnapshot:()=>r,subscribe(c){return t.add(c),()=>{t.delete(c)}},canInstall:()=>!!e.manager(),check:f,async install(){let c=r.latest,p=e.manager();if(!a||!c||!te(c.version,e.version)||!p||o||i||["restart","applied","unknown"].includes(r.install))return;let l=crypto.randomUUID();i={manager:p,id:l},m({install:"installing"});try{let w=await p.installBundle(c.download,{requestId:l});if(!w.ok){let v=await p.waitForInstall(l);if(!v.ok||v.value===null){a&&m({install:"unknown"});return}w={ok:!0,value:v.value}}if(!a)return;let g=w.value;g.application==="failed"?m({install:g.error?.code==="incompatible-version"?"incompatible":"failed"}):["restart-required","applied"].includes(g.application)&&g.bundle===Ne?m({install:g.application==="applied"?"applied":"restart"}):m({install:"unknown"})}catch{a&&m({install:"unknown"})}finally{i=void 0}},dispose(){a=!1,o?.abort(),clearTimeout(s),s=void 0,i&&(i.manager.cancelInstall(i.id).catch(()=>{}),i=void 0)}}}var Ae="1.3.9";var x=require("react"),ne=require("react-dom");var d=require("react/jsx-runtime"),ct=new Intl.DateTimeFormat("zh-CN",{timeZone:"Asia/Shanghai",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),ut=new Intl.DateTimeFormat("en-GB",{timeZone:"Asia/Shanghai",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),pt={denied:"reminderDenied",unsupported:"reminderUnsupported",storage:"reminderStorageError",delivery:"reminderDeliveryError"},Pe={pending:"reminderSending",accepted:"reminderAccepted",unconfirmed:"reminderUnconfirmed",unavailable:"reminderFallback"},mt=(0,x.memo)(function({delivery:n,t}){let r=(0,x.useSyncExternalStore)(n.subscribe,n.getSnapshot),a=(0,x.useRef)(null);return(0,x.useEffect)(()=>{r?a.current?.showPopover():a.current?.hidePopover()},[r?.id]),r?(0,ne.createPortal)((0,d.jsx)("div",{ref:a,popover:"manual",className:"dtb-reminder-banner dtb-theme",role:"status","aria-live":"polite",children:r&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"dtb-header",children:[(0,d.jsx)("strong",{children:r.title}),(0,d.jsx)("button",{type:"button",className:"dtb-close","aria-label":t("dismissReminder"),onClick:n.dismiss,children:"\xD7"})]}),(0,d.jsx)("p",{children:r.body}),(0,d.jsx)("p",{className:"dtb-note dtb-delivery-status",children:t(Pe[r.delivery])}),r.sound==="unavailable"&&(0,d.jsx)("p",{className:"dtb-note dtb-sound-feedback",children:t("reminderSoundError")})]})}),document.body):null}),Ue=(0,x.memo)(function({segments:n,hour:t,small:r=!1}){return(0,d.jsxs)("div",{className:`dtb-track${r?" dtb-track-small":""}`,"aria-hidden":"true",children:[n.map(a=>(0,d.jsx)("span",{className:`dtb-segment dtb-${a.band}`,style:{left:`${a.start/24*100}%`,width:`${(a.end-a.start)/24*100}%`}},a.start)),(0,d.jsx)("span",{className:"dtb-cursor",style:{left:`${t/24*100}%`}})]})});function Le(e,n,t){let r=n===null?null:ge(n-e),a=r?.major.map(s=>`${s.value}${t(s.unit)}`).join("")??"",o=r?`${r.seconds}${t("seconds")}`:"\u2014";return{text:`${a}${o}`,view:(0,d.jsxs)("span",{className:"dtb-countdown",children:[(0,d.jsx)("span",{className:"dtb-count-main",children:a||o}),a&&(0,d.jsx)("small",{className:"dtb-count-seconds",children:o})]})}}function ft({useClock:e,t:n,until:t,nextLabel:r}){let a=e(i=>i),{text:o,view:s}=Le(a,t,n);return(0,d.jsxs)("div",{className:"dtb-next",children:[(0,d.jsx)("span",{children:n(r)}),(0,d.jsx)("strong",{"aria-label":`${n(r)} ${o}`,children:s})]})}function bt({wide:e,useClock:n,t,until:r,nextLabel:a,band:o,segments:s,hour:i,trigger:m,id:f,open:c}){let p=n(g=>e?g:Math.floor(g/6e4)*6e4),{text:l,view:w}=Le(p,r,t);return(0,d.jsxs)("button",{type:"button",className:"dtb-chip",ref:m,popovertarget:f,popovertargetaction:"toggle","aria-label":`${t("open")} \xB7 ${t(o)} \xB7 ${t(a)} ${l}`,"aria-expanded":c,"aria-haspopup":"dialog","aria-controls":f,title:`${t(o)} \xB7 ${t(a)} ${l}`,children:[(0,d.jsxs)("span",{className:"dtb-chip-top",children:[(0,d.jsx)("span",{className:`dtb-dot dtb-${o}`}),e&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"dtb-chip-label",children:t(o)}),(0,d.jsx)("span",{className:"dtb-chip-count",children:w})]})]}),e?(0,d.jsx)(Ue,{segments:s,hour:i,small:!0}):(0,d.jsx)("svg",{viewBox:"0 0 24 24",className:"dtb-rail-icon","aria-hidden":"true",children:(0,d.jsx)("path",{d:"M3 17 8 7l5 10 4-7 4 7"})})]})}function $e({wide:e,useClock:n,t,calendarStore:r,reminderStore:a,reminderDelivery:o,testReminder:s,pluginUpdates:i}){let m=n(S=>Math.floor(S/6e4)*6e4),f=(0,x.useSyncExternalStore)(r.subscribe,r.getSnapshot),c=(0,x.useSyncExternalStore)(a.subscribe,a.getSnapshot),p=(0,x.useSyncExternalStore)(o.subscribe,o.getSnapshot),l=(0,x.useSyncExternalStore)(i.subscribe,i.getSnapshot),w=l.latest&&te(l.latest.version,i.version),g=l.install==="restart"?"updateRestart":l.install==="applied"?"updateApplied":l.install==="unknown"?"updateUnknown":l.install==="failed"?"updateFailed":l.install==="incompatible"?"updateIncompatible":null,v=(0,x.useMemo)(()=>q(),[]),{day:b,band:h,next:u,segments:y}=v(m,f.data),k=(m-b.midnight)/T,E=u!==null&&u.band!=="unknown"&&h!=="unknown",[R,U]=(0,x.useState)(!1),P=(0,x.useRef)(!1),I=(0,x.useRef)(null),N=(0,x.useRef)(null),L=(0,x.useRef)(null),re=(0,x.useRef)(null),B=(0,x.useId)(),ae=E?u.at:null,ie=E?u.band==="peak"?"nextPeak":"nextOffpeak":"nextUnknown",oe=(0,x.useMemo)(()=>E&&u?ct.format(u.at):"",[E,u]),se=ut.format(m),de=f.issue==="storage"?"calendarStorageError":f.update==="checking"?"calendarChecking":f.update==="waiting"?"calendarWaiting":f.update==="failed"?"calendarUpdateFailed":null;(0,x.useEffect)(()=>{let S=N.current;if(!S)return;let $=()=>{I.current&&(P.current=I.current.open)},_=()=>U(S.matches(":popover-open"));return S.addEventListener("beforetoggle",$),S.addEventListener("toggle",_),()=>{S.removeEventListener("beforetoggle",$),S.removeEventListener("toggle",_)}},[]),(0,x.useLayoutEffect)(()=>{if(!R)return;let S=()=>{if(!N.current||!L.current)return;let _=L.current.getBoundingClientRect(),V=N.current.getBoundingClientRect(),je=Math.max(12,Math.min(_.left,window.innerWidth-V.width-12)),He=Math.max(12,Math.min(_.top-V.height-12,window.innerHeight-V.height-12));N.current.style.left=`${je}px`,N.current.style.top=`${He}px`};S(),re.current?.focus({preventScroll:!0});let $=new ResizeObserver(S);return N.current&&$.observe(N.current),L.current&&$.observe(L.current),window.addEventListener("resize",S),window.addEventListener("scroll",S,!0),()=>{$.disconnect(),window.removeEventListener("resize",S),window.removeEventListener("scroll",S,!0)}},[R,e]);let le=()=>{N.current?.hidePopover(),U(!1),L.current?.focus({preventScroll:!0})};return(0,d.jsxs)("div",{className:"dtb-root dtb-theme","data-wide":e,"data-band":h,children:[(0,d.jsx)(mt,{delivery:o,t}),(0,d.jsx)(bt,{wide:e,useClock:n,t,until:ae,nextLabel:ie,band:h,segments:y,hour:k,trigger:L,id:B,open:R}),(0,ne.createPortal)((0,d.jsx)("div",{ref:N,id:B,popover:"auto",role:"dialog","aria-labelledby":`${B}-title`,className:"dtb-card dtb-theme","data-band":h,onKeyDown:S=>{S.key==="Escape"&&(S.preventDefault(),S.stopPropagation(),le())},children:R&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("header",{className:"dtb-header",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"dtb-eyebrow",children:"DEEPSEEK / TIMEBAND"}),(0,d.jsx)("h2",{id:`${B}-title`,children:t("title")})]}),(0,d.jsx)("button",{type:"button",className:"dtb-close",ref:re,"aria-label":t("close"),onClick:le,children:"\xD7"})]}),(0,d.jsxs)("div",{className:"dtb-status",children:[(0,d.jsx)("span",{className:`dtb-dot dtb-${h}`}),(0,d.jsx)("strong",{children:t(h)})]}),(0,d.jsx)(ft,{useClock:n,t,until:ae,nextLabel:ie}),(0,d.jsxs)("div",{className:"dtb-date",children:[(0,d.jsx)("span",{children:t("zone")}),(0,d.jsx)("span",{children:oe&&(0,d.jsxs)(d.Fragment,{children:[t("nextSwitch")," ",oe]})})]}),(0,d.jsxs)("div",{className:"dtb-axis",role:"img","aria-label":`${t("timeline")}\uFF1A${y.map(S=>`${S.start}:00\u2013${S.end}:00 ${t(S.band)}`).join("\uFF1B")}\u3002${t("now")} ${se}`,children:[(0,d.jsxs)("div",{className:"dtb-now",style:{left:`${Math.min(91,Math.max(9,k/24*100))}%`},children:[t("now")," ",se]}),(0,d.jsx)(Ue,{segments:y,hour:k}),(0,d.jsxs)("div",{className:"dtb-ticks",children:[(0,d.jsx)("span",{children:"00"}),(0,d.jsx)("span",{children:"06"}),(0,d.jsx)("span",{children:"12"}),(0,d.jsx)("span",{children:"18"}),(0,d.jsx)("span",{children:"24"})]})]}),(0,d.jsxs)("div",{className:"dtb-day-kind",children:[b.key," ",(0,d.jsx)("span",{children:"\xB7"})," ",t(b.kind)]}),y.length>1&&(0,d.jsxs)("div",{className:"dtb-periods",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("span",{children:[(0,d.jsx)("i",{className:`dtb-dot dtb-${b.covered?"peak":"unknown"}`}),t(b.covered?"peak":"unknown")]}),(0,d.jsx)("b",{children:"09:00\u201312:00 \xB7 14:00\u201318:00"})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("span",{children:[(0,d.jsx)("i",{className:"dtb-dot dtb-offpeak"}),t("offpeak")]}),(0,d.jsx)("b",{children:t("rest")})]})]}),!b.covered&&(0,d.jsx)("p",{className:"dtb-note",children:t("unknownNote")}),de&&(0,d.jsx)("p",{className:"dtb-note dtb-calendar-notice",role:"status",children:t(de)}),(0,d.jsxs)("details",{className:"dtb-details",ref:I,open:P.current,children:[(0,d.jsx)("summary",{children:t("details")}),(0,d.jsx)("p",{className:"dtb-note",children:t("note")}),(0,d.jsxs)("div",{className:"dtb-reminder-settings",children:[(0,d.jsxs)("label",{className:"dtb-reminder-toggle",children:[(0,d.jsx)("span",{children:t("reminder")}),(0,d.jsx)("input",{type:"checkbox",role:"switch",checked:c.enabled,disabled:c.busy,onChange:S=>{S.currentTarget.checked&&o.primeSound(),a.setEnabled(S.currentTarget.checked)}})]}),c.enabled&&(0,d.jsx)("button",{type:"button",className:"dtb-button",onClick:s,children:t("reminderTest")}),(0,d.jsx)("p",{className:"dtb-note",children:t("reminderHint")}),p&&(0,d.jsx)("p",{className:"dtb-note dtb-test-feedback",role:"status",children:t(Pe[p.delivery])}),p?.sound==="unavailable"&&(0,d.jsx)("p",{className:"dtb-note dtb-sound-feedback",role:"status",children:t("reminderSoundError")}),c.issue&&(0,d.jsx)("p",{className:"dtb-note dtb-reminder-feedback",role:"status",children:t(pt[c.issue])})]}),(0,d.jsxs)("div",{className:"dtb-version-row",children:[(0,d.jsxs)("span",{children:["v",i.version]}),(0,d.jsx)("button",{type:"button",className:"dtb-button",disabled:l.check==="checking"||l.install==="installing",onClick:()=>{i.check()},children:t(l.check==="checking"?"updateChecking":"updateCheck")})]}),w&&(0,d.jsxs)("div",{className:"dtb-update-notice",role:"status",children:[(0,d.jsxs)("span",{children:[t("updateAvailable")," ",(0,d.jsxs)("b",{children:["v",l.latest.version]})]}),i.canInstall()?(0,d.jsx)("button",{type:"button",className:"dtb-button",disabled:l.check==="checking"||["installing","restart","applied","unknown"].includes(l.install),onClick:()=>{i.install()},children:t(l.install==="installing"?"updateInstalling":"updateInstall")}):(0,d.jsxs)("a",{href:l.latest.download,target:"_blank",rel:"noreferrer",children:[t("updateDownload")," \u2197"]}),(0,d.jsxs)("a",{href:l.latest.url,target:"_blank",rel:"noreferrer",children:[t("updateNotes")," \u2197"]}),g&&(0,d.jsx)("p",{className:"dtb-note",children:t(g)})]}),l.check==="failed"&&(0,d.jsx)("p",{className:"dtb-note",children:t("updateCheckFailed")}),l.check==="current"&&!w&&(0,d.jsx)("p",{className:"dtb-note",children:t("updateCurrent")}),(0,d.jsxs)("footer",{className:"dtb-footer",children:[(0,d.jsxs)("a",{href:f.data.source,target:"_blank",rel:"noreferrer",children:[t("calendarSource")," \u2197"]}),(0,d.jsxs)("a",{href:he,target:"_blank",rel:"noreferrer",children:[t("rule")," \u2197"]})]})]})]})}),document.body)]})}var Oe={title:"\u4ECA\u65E5\u65F6\u6BB5",zone:"\u5317\u4EAC\u65F6\u95F4 \xB7 UTC+8",peak:"\u5CF0\u65F6\u6BB5",offpeak:"\u8C37\u65F6\u6BB5",unknown:"\u5F85\u6838\u5B9E",nextPeak:"\u8DDD\u79BB\u5CF0\u65F6\u6BB5",nextOffpeak:"\u8DDD\u79BB\u8C37\u65F6\u6BB5",nextUnknown:"\u540E\u7EED\u65E5\u5386\u5F85\u66F4\u65B0",weekday:"\u5468\u4E00\u81F3\u5468\u4E94",weekend:"\u5468\u672B \xB7 \u5168\u5929\u8C37\u65F6\u6BB5",holiday:"\u516C\u5171\u5047\u671F \xB7 \u5168\u5929\u8C37\u65F6\u6BB5",unverified:"\u672C\u5E74\u5EA6\u8282\u5047\u65E5\u65E5\u5386\u5F85\u66F4\u65B0",allDay:"\u5168\u5929",rest:"\u5176\u4F59\u65F6\u6BB5",now:"\u73B0\u5728",nextSwitch:"\u4E0B\u6B21\u5207\u6362\uFF1A",close:"\u5173\u95ED\u65F6\u95F4\u8F74",open:"\u67E5\u770B\u5CF0\u8C37\u65F6\u95F4\u8F74",rule:"DeepSeek \u5B98\u65B9\u65F6\u6BB5\u89C4\u5219",details:"\u89C4\u5219\u4E0E\u63D0\u9192",note:"\u5468\u672B\uFF08\u542B\u8C03\u4F11\u4E0A\u73ED\u65E5\uFF09\u53CA\u516C\u5171\u5047\u671F\u5168\u5929\u4E3A\u8C37\u65F6\u6BB5\u3002",reminder:"\u5CF0\u65F6\u6BB5\u524D 5 \u5206\u949F\u63D0\u9192",reminderHint:"\u9ED8\u8BA4\u5173\u95ED\u3002\u5F00\u542F\u65F6\u7533\u8BF7\u901A\u77E5\u6388\u6743\uFF1B\u5E94\u7528\u8FD0\u884C\u65F6\u63D0\u9192\uFF0C\u5E76\u64AD\u653E\u8F7B\u67D4\u63D0\u793A\u97F3\u3002",reminderSoundError:"\u63D0\u793A\u97F3\u672A\u80FD\u64AD\u653E\uFF0C\u53EF\u70B9\u51FB\u300C\u6D4B\u8BD5\u63D0\u9192\u300D\u91CD\u8BD5\u3002",reminderDenied:"\u672A\u83B7\u5F97\u901A\u77E5\u6388\u6743\uFF0C\u8BF7\u5141\u8BB8\u6B64\u5E94\u7528\u7684\u901A\u77E5\u540E\u518D\u5F00\u542F\u3002",reminderUnsupported:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u7CFB\u7EDF\u901A\u77E5\u3002",reminderStorageError:"\u63D0\u9192\u8BBE\u7F6E\u65E0\u6CD5\u4FDD\u5B58\uFF0C\u8BF7\u68C0\u67E5\u672C\u5730\u5B58\u50A8\u6743\u9650\u3002",reminderDeliveryError:"\u63D0\u9192\u53D1\u9001\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u901A\u77E5\u8BBE\u7F6E\u540E\u91CD\u65B0\u5F00\u542F\u3002",reminderTitle:"\u5373\u5C06\u8FDB\u5165\u5CF0\u65F6\u6BB5",reminderBody:"\u5317\u4EAC\u65F6\u95F4 {time} \u5F00\u59CB\u5CF0\u65F6\u6BB5\u3002",reminderTest:"\u6D4B\u8BD5\u63D0\u9192",reminderTestTitle:"\u6D4B\u8BD5\u63D0\u9192",reminderTestBody:"\u8FD9\u662F\u4E00\u6761\u6D4B\u8BD5\u63D0\u9192\u3002\u6B63\u5F0F\u63D0\u9192\u4F1A\u5728\u5CF0\u65F6\u6BB5\u5F00\u59CB\u524D 5 \u5206\u949F\u53D1\u51FA\u3002",reminderSending:"\u5E94\u7528\u5185\u63D0\u9192\u5DF2\u663E\u793A\uFF0C\u6B63\u5728\u53D1\u9001\u7CFB\u7EDF\u901A\u77E5\u2026",reminderAccepted:"\u7CFB\u7EDF\u5DF2\u63A5\u6536\u901A\u77E5\u3002\u6CA1\u6709\u6A2A\u5E45\u65F6\uFF0C\u53EF\u67E5\u770B\u901A\u77E5\u4E2D\u5FC3\u6216\u68C0\u67E5\u52FF\u6270\u6A21\u5F0F\u3002",reminderUnconfirmed:"\u7CFB\u7EDF\u672A\u786E\u8BA4\u901A\u77E5\u663E\u793A\uFF0C\u5E94\u7528\u5185\u63D0\u9192\u5DF2\u4FDD\u7559\u3002",reminderFallback:"\u7CFB\u7EDF\u901A\u77E5\u53D1\u9001\u5931\u8D25\uFF0C\u5E94\u7528\u5185\u63D0\u9192\u5DF2\u4FDD\u7559\u3002\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u901A\u77E5\u8BBE\u7F6E\u3002",dismissReminder:"\u5173\u95ED\u63D0\u9192",updateAvailable:"\u6709\u65B0\u7248\u672C",updateCheck:"\u68C0\u67E5\u66F4\u65B0",updateChecking:"\u6B63\u5728\u68C0\u67E5\u2026",updateInstall:"\u66F4\u65B0",updateInstalling:"\u6B63\u5728\u66F4\u65B0\u2026",updateDownload:"\u4E0B\u8F7D\u65B0\u7248",updateNotes:"\u66F4\u65B0\u8BF4\u660E",updateRestart:"\u65B0\u7248\u5DF2\u5B89\u88C5\uFF0C\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u65B0\u6253\u5F00 Harness \u540E\u751F\u6548\u3002",updateApplied:"Harness \u5DF2\u786E\u8BA4\u5E94\u7528\u66F4\u65B0\u3002",updateUnknown:"\u66F4\u65B0\u7ED3\u679C\u5C1A\u672A\u786E\u8BA4\uFF0C\u8BF7\u5728 Harness\u300C\u63D2\u4EF6\u300D\u9875\u9762\u6838\u5BF9\u540E\u91CD\u542F\u3002",updateFailed:"\u66F4\u65B0\u672A\u6210\u529F\uFF0C\u5F53\u524D\u7248\u672C\u7EE7\u7EED\u4F7F\u7528\u3002\u53EF\u7A0D\u540E\u91CD\u8BD5\u6216\u4ECE\u53D1\u5E03\u9875\u4E0B\u8F7D\u3002",updateIncompatible:"\u65B0\u7248\u4E0E\u5F53\u524D Harness \u4E0D\u517C\u5BB9\uFF0C\u8BF7\u67E5\u770B\u66F4\u65B0\u8BF4\u660E\u3002",updateCheckFailed:"\u6682\u65F6\u65E0\u6CD5\u68C0\u67E5\u65B0\u7248\uFF0C\u8BF7\u7A0D\u540E\u70B9\u51FB\u91CD\u8BD5\u3002\u5F53\u524D\u63D2\u4EF6\u6B63\u5E38\u4F7F\u7528\u3002",updateCurrent:"\u6682\u65E0\u9700\u8981\u5B89\u88C5\u7684\u65B0\u7248\u3002",calendarSource:"\u5047\u671F\u516C\u544A\u6765\u6E90",calendarChecking:"\u6B63\u5728\u81EA\u52A8\u66F4\u65B0\u8282\u5047\u65E5\u65E5\u5386\u2026",calendarWaiting:"\u65B0\u5E74\u5EA6\u65E5\u5386\u5C1A\u672A\u53D1\u5E03\uFF0C\u5C06\u6BCF\u5929\u81EA\u52A8\u68C0\u67E5\u3002",calendarUpdateFailed:"\u65E5\u5386\u66F4\u65B0\u6682\u672A\u6210\u529F\uFF0C\u4FDD\u7559\u5DF2\u6709\u6570\u636E\u5E76\u81EA\u52A8\u91CD\u8BD5\u3002",calendarStorageError:"\u65E5\u5386\u6682\u65F6\u65E0\u6CD5\u4FDD\u5B58\uFF0C\u7EE7\u7EED\u4F7F\u7528\u5DF2\u6709\u6570\u636E\u5E76\u81EA\u52A8\u91CD\u8BD5\u3002",unknownNote:"\u7F3A\u5C11\u672C\u5E74\u5EA6\u5047\u671F\u6570\u636E\uFF0C\u5DE5\u4F5C\u65E5\u5CF0\u65F6\u6BB5\u6682\u4E0D\u4F5C\u786E\u5B9A\u5224\u65AD\u3002",timeline:"\u5317\u4EAC\u65F6\u95F4 24 \u5C0F\u65F6\u65F6\u95F4\u8F74",days:"\u5929",hours:"\u5C0F\u65F6",minutes:"\u5206\u949F",seconds:"\u79D2"},_e={title:"Today\u2019s schedule",zone:"Beijing time \xB7 UTC+8",peak:"Peak",offpeak:"Off-peak",unknown:"Unverified",nextPeak:"Until peak hours",nextOffpeak:"Until off-peak",nextUnknown:"Calendar update needed",weekday:"Monday\u2013Friday",weekend:"Weekend \xB7 off-peak all day",holiday:"Public holiday \xB7 off-peak all day",unverified:"Holiday calendar needs an update",allDay:"All day",rest:"All other hours",now:"Now",nextSwitch:"Next change:",close:"Close timeline",open:"View peak hours timeline",rule:"DeepSeek official schedule",details:"Rules and reminders",note:"Weekends (including makeup workdays) and public holidays are off-peak all day.",reminder:"Remind 5 minutes before peak",reminderHint:"Off by default. Enabling requests notification permission. Reminds with a gentle chime while the app is running.",reminderSoundError:"The chime could not play. Send a test notification to retry.",reminderDenied:"Notification permission was not granted. Allow this app\u2019s notifications, then enable reminders again.",reminderUnsupported:"System notifications are unavailable in this environment.",reminderStorageError:"Reminder settings could not be saved. Check local storage permissions.",reminderDeliveryError:"The reminder could not be delivered. Check system notification settings, then enable it again.",reminderTitle:"Peak hours start soon",reminderBody:"Peak hours start at {time} (Beijing time).",reminderTest:"Send test notification",reminderTestTitle:"Test reminder",reminderTestBody:"This is a test reminder. Peak reminders arrive 5 minutes before peak hours start.",reminderSending:"In-app reminder displayed. Sending system notification\u2026",reminderAccepted:"The system accepted the notification. If no banner appears, check Notification Center or Do Not Disturb.",reminderUnconfirmed:"System display was not confirmed. The in-app reminder remains available.",reminderFallback:"System notification failed. The in-app reminder remains available. Check system notification settings.",dismissReminder:"Dismiss reminder",updateAvailable:"Update available",updateCheck:"Check for updates",updateChecking:"Checking\u2026",updateInstall:"Update",updateInstalling:"Updating\u2026",updateDownload:"Download update",updateNotes:"Release notes",updateRestart:"Update installed. Fully quit and reopen Harness to apply it.",updateApplied:"Harness confirmed that the update was applied.",updateUnknown:"Update outcome is unconfirmed. Check Harness Plugins before restarting.",updateFailed:"Update failed. Keep using this version and retry or download from GitHub later.",updateIncompatible:"This release is incompatible with your Harness. Read its release notes.",updateCheckFailed:"Could not check for updates. Click to retry later; the plugin keeps working.",updateCurrent:"No newer release needs to be installed.",calendarSource:"Holiday notice source",calendarChecking:"Updating the holiday calendar automatically\u2026",calendarWaiting:"The new annual calendar is not published yet. Checking daily.",calendarUpdateFailed:"Calendar update failed. Keeping existing data and retrying automatically.",calendarStorageError:"Calendar could not be saved. Keeping existing data and retrying automatically.",unknownNote:"Holiday data for this year is unavailable; weekday peak periods are unverified.",timeline:"24-hour timeline in Beijing time",days:"d",hours:"h",minutes:"min",seconds:"s"};var Me=`.dtb-theme {
3
3
  --dtb-bg: var(--dsw-alias-bg-base, #fff);
4
4
  --dtb-text: var(--dsw-alias-label-primary, #252925);
5
5
  --dtb-muted: var(--dsw-alias-label-tertiary, #798079);
@@ -76,20 +76,34 @@ div:has(> div > .dtb-root[data-wide='true']:only-child):has(> div button[data-co
76
76
  .dtb-note { font-size: 11px; color: var(--dtb-secondary); line-height: 1.7; margin: 13px 0; }
77
77
  .dtb-details { border-top: 1px solid var(--dtb-line); margin-top: 16px; padding-top: 12px; }
78
78
  .dtb-details summary { width: fit-content; cursor: pointer; font-size: 11px; color: var(--dtb-secondary); line-height: 1.8; }
79
- .dtb-calendar-meta { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--dtb-secondary); }
80
- .dtb-calendar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 11px; }
79
+ .dtb-reminder-settings { border-bottom: 1px solid var(--dtb-line); margin-bottom: 14px; }
80
+ .dtb-reminder-settings .dtb-button { margin-top: 9px; font-size: 11px; }
81
+ .dtb-reminder-toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 11px; cursor: pointer; }
82
+ .dtb-reminder-toggle input { appearance: none; flex: none; position: relative; width: 30px; height: 17px; margin: 0; border: 1px solid var(--dtb-line); border-radius: 12px; background: var(--dtb-muted); cursor: pointer; }
83
+ .dtb-reminder-toggle input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--dtb-bg); }
84
+ .dtb-reminder-toggle input:checked { background: var(--dtb-green); }
85
+ .dtb-reminder-toggle input:checked::after { left: 15px; }
86
+ .dtb-reminder-toggle input:focus-visible { outline: 2px solid var(--dtb-green); outline-offset: 3px; }
87
+ .dtb-reminder-toggle input:disabled { opacity: .5; cursor: default; }
81
88
  .dtb-button { padding: 5px 9px; border: 1px solid var(--dtb-line); border-radius: 6px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
82
89
  .dtb-button:disabled { opacity: .5; cursor: default; }
83
- .dtb-calendar-actions a { color: var(--dtb-green); text-decoration: none; }
84
- .dtb-calendar-feedback:empty { display: none; }
90
+ .dtb-reminder-banner { position: fixed; inset: auto 24px 24px auto; margin: 0; width: 320px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 18px; border: 1px solid var(--dtb-line); border-left: 3px solid var(--dtb-green); border-radius: 12px; background: var(--dtb-bg); box-shadow: 0 8px 32px #0002; }
91
+ .dtb-reminder-banner::backdrop { background: transparent; pointer-events: none; }
92
+ .dtb-reminder-banner .dtb-header { align-items: center; gap: 10px; }
93
+ .dtb-reminder-banner .dtb-header strong { font-size: 14px; }
94
+ .dtb-reminder-banner p { line-height: 1.7; margin: 8px 0 0; overflow-wrap: anywhere; }
95
+ .dtb-reminder-banner .dtb-note { margin-bottom: 0; }
85
96
  .dtb-calendar-notice { border-left: 2px solid var(--dtb-peak); padding-left: 9px; }
86
97
  .dtb-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 3px; font-size: 10px; color: var(--dtb-muted); }
87
98
  .dtb-footer a { color: inherit; text-decoration: none; }
99
+ .dtb-update-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0; border-top: 1px solid var(--dtb-line); font-size: 11px; }
100
+ .dtb-update-notice p { flex-basis: 100%; margin: 0; }
101
+ .dtb-update-notice a { color: var(--dtb-green); text-decoration: none; }
102
+ .dtb-version-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; color: var(--dtb-secondary); }
88
103
  .dtb-footer a:hover { text-decoration: underline; }
89
104
  @media (prefers-color-scheme: dark) {
90
105
  .dtb-theme { --dtb-secondary: var(--dsw-alias-label-secondary, #b6bfb6); }
91
106
  .dtb-theme { --dtb-bg: var(--dsw-alias-bg-base, #242624); --dtb-text: var(--dsw-alias-label-primary, #e5eae5); --dtb-muted: var(--dsw-alias-label-tertiary, #9aa59e); --dtb-line: var(--dsw-alias-border-primary, #3b413c); --dtb-hover: var(--dsw-alias-interactive-bg-hover, #303630); --dtb-green: #6cbd9e; --dtb-peak: #eaa77a; }
92
107
  }
93
- `;var De=["slots","locale"];function $e(n){n.effect(()=>n.locale.register("timeband",{zh:le,en:ce})),n.effect(()=>{let a=document.createElement("style");return a.dataset.plugin="dsh-timeband",a.textContent=pe,document.head.append(a),()=>a.remove()});let r=q(),e=te();n.effect(()=>r.start()),n.effect(()=>e.start()),n.slots.inject("sidebar.footer.action",()=>n.slots.register({name:"sidebar.footer.action",id:"dsh-timeband",order:100,locale:"timeband",inject:()=>({hooks:{clock:r},props:{calendarStore:e}})},se))}
108
+ `;var gt=["slots","locale"];function yt(e){e.effect(()=>e.locale.register("timeband",{zh:Oe,en:_e})),e.effect(()=>{let c=document.createElement("style");return c.dataset.plugin="dsh-timeband",c.textContent=Me,document.head.append(c),()=>c.remove()});let n=ce(),t=me(),r=we({clock:n,store:t}),a=xe(),o=Ee(),s=Ie({version:Ae,manager:()=>{if(e.get("remote.pluginManager"))return e.get("remote")?.pluginManager}}),i=new Intl.DateTimeFormat("en-GB",{timeZone:"Asia/Shanghai",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),m=ke({clock:n,calendarStore:t,reminderStore:a,notify(c){let p=e.locale.bind("timeband");o.show(p("reminderTitle"),p("reminderBody",{time:i.format(c)}),`dsh-timeband-peak-${c}`)}}),f=()=>{if(!a.getSnapshot().enabled)return;o.primeSound();let c=e.locale.bind("timeband");try{o.show(c("reminderTestTitle"),c("reminderTestBody"),"dsh-timeband-test")}catch{a.fail("delivery")}};e.effect(()=>n.start()),e.effect(()=>t.start()),e.effect(()=>r.start()),e.effect(()=>a.start()),e.effect(()=>m.start()),e.effect(()=>()=>s.dispose()),e.effect(()=>{let c=!0,p=!1,l=()=>{document.removeEventListener("pointerdown",w,!0),document.removeEventListener("keydown",w,!0)},w=()=>{p&&o.primeSound().then(b=>{c&&b&&l()})},g=()=>{let b=a.getSnapshot();!b.enabled&&!b.busy&&o.releaseSound(),p!==b.enabled&&(p=b.enabled,p?(document.addEventListener("pointerdown",w,!0),document.addEventListener("keydown",w,!0)):l())},v=a.subscribe(g);return g(),()=>{c=!1,l(),v()}}),e.effect(()=>()=>o.dispose()),e.slots.inject("sidebar.footer.action",()=>e.slots.register({name:"sidebar.footer.action",id:"dsh-timeband",order:100,locale:"timeband",inject:()=>({hooks:{clock:n},calendarStore:t,reminderStore:a,reminderDelivery:o,testReminder:f,pluginUpdates:s})},$e))}
94
109
  return module.exports;}});
95
- //# sourceMappingURL=client.js.map
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "dsh-timeband",
3
- "version": "1.1.0",
3
+ "version": "1.3.9",
4
4
  "description": "头像旁的 DeepSeek 峰谷时段与今日时间轴",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
+ "publishConfig": {
8
+ "access": "public",
9
+ "registry": "https://registry.npmjs.org/"
10
+ },
7
11
  "repository": {
8
12
  "type": "git",
9
13
  "url": "git+https://github.com/a961282799-crypto/dsh-timeband.git"
@@ -19,7 +23,8 @@
19
23
  "./package.json": "./package.json"
20
24
  },
21
25
  "files": [
22
- "dist",
26
+ "dist/index.js",
27
+ "dist/client.js",
23
28
  "calendars",
24
29
  "cordis.patch.yml",
25
30
  "README.md",
@@ -40,6 +45,7 @@
40
45
  "client": {
41
46
  "platform": "web",
42
47
  "inject": [
48
+ "@deepseek-ai/dsh-api-remotes",
43
49
  "@deepseek-ai/dsh-client-ui-renderer",
44
50
  "@deepseek-ai/dsh-client-ui-sidebar",
45
51
  "@deepseek-ai/dsh-client-locale"
@@ -47,7 +53,7 @@
47
53
  }
48
54
  },
49
55
  "peerDependencies": {
50
- "@deepseek-ai/dsh": "0.2.0-rc.2"
56
+ "@deepseek-ai/dsh": "0.2.1-rc.5"
51
57
  },
52
58
  "peerDependenciesMeta": {
53
59
  "@deepseek-ai/dsh": {
@@ -61,16 +67,16 @@
61
67
  "test:browser": "playwright test",
62
68
  "preview": "node scripts/preview.mjs",
63
69
  "screenshots": "node scripts/screenshots.mjs",
64
- "compatibility": "node scripts/check-compatibility.mjs",
70
+ "compatibility": "node scripts/check-compatibility.mjs next",
65
71
  "check": "npm run typecheck && npm run build && npm test && npm run test:browser",
66
72
  "prepack": "npm run typecheck && npm run build"
67
73
  },
68
74
  "devDependencies": {
69
- "@deepseek-ai/cordis": "4.0.4",
70
- "@deepseek-ai/dsh-client-locale": "0.2.0-rc.2",
71
- "@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.2",
72
- "@deepseek-ai/dsh-client-ui-sidebar": "0.2.0-rc.2",
73
- "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2",
75
+ "@deepseek-ai/cordis": "4.0.5",
76
+ "@deepseek-ai/dsh-client-locale": "0.2.1-rc.5",
77
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.5",
78
+ "@deepseek-ai/dsh-client-ui-sidebar": "0.2.1-rc.5",
79
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.5",
74
80
  "@playwright/test": "1.63.0",
75
81
  "@types/node": "^24.0.0",
76
82
  "@types/react": "~18.3.1",
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/client.ts", "../src/clock.ts", "../calendars/2026.json", "../src/calendar.ts", "../src/calendar-store.ts", "../src/view.tsx", "../src/schedule.ts", "../src/locales.ts", "../src/style.css"],
4
- "sourcesContent": ["import type { Context } from '@deepseek-ai/cordis';\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client';\nimport type {} from '@deepseek-ai/dsh-client-ui-sidebar/client';\nimport type {} from '@deepseek-ai/dsh-client-locale/client';\nimport { createClock } from './clock.ts';\nimport { createCalendarStore } from './calendar-store.ts';\nimport { TimeBand } from './view.tsx';\nimport { zh, en } from './locales.ts';\nimport css from './style.css';\n\nexport const inject = ['slots', 'locale'];\nexport function apply(ctx: Context): void {\n ctx.effect(() => ctx.locale.register('timeband', { zh, en }));\n ctx.effect(() => {\n const style = document.createElement('style');\n style.dataset.plugin = 'dsh-timeband';\n style.textContent = css;\n document.head.append(style);\n return () => style.remove();\n });\n const clock = createClock();\n const calendarStore = createCalendarStore();\n ctx.effect(() => clock.start());\n ctx.effect(() => calendarStore.start());\n ctx.slots.inject('sidebar.footer.action', () => ctx.slots.register({\n name: 'sidebar.footer.action', id: 'dsh-timeband', order: 100, locale: 'timeband',\n inject: () => ({ hooks: { clock }, props: { calendarStore } }),\n }, TimeBand));\n}\n", "/** One Cordis-owned clock for every mounted view. Always re-read wall time after sleep. */\nexport function createClock() {\n let snapshot = Date.now();\n const listeners = new Set<() => void>();\n const update = () => {\n snapshot = Date.now();\n for (const listener of listeners) listener();\n };\n return {\n getSnapshot: () => snapshot,\n subscribe(listener: () => void) { listeners.add(listener); return () => { listeners.delete(listener); }; },\n start() {\n let timer: ReturnType<typeof setInterval> | undefined;\n const resume = () => {\n clearInterval(timer);\n timer = undefined;\n update();\n if (document.visibilityState !== 'hidden') timer = setInterval(update, 1000);\n };\n document.addEventListener('visibilitychange', resume);\n window.addEventListener('focus', resume);\n window.addEventListener('pageshow', resume);\n resume();\n return () => {\n clearInterval(timer);\n document.removeEventListener('visibilitychange', resume);\n window.removeEventListener('focus', resume);\n window.removeEventListener('pageshow', resume);\n };\n },\n };\n}\n", "{\n \"schemaVersion\": 1,\n \"years\": [2026],\n \"verifiedOn\": \"2026-09-30\",\n \"source\": \"https://www.lufengshi.gov.cn/swlfsjj/gkmlpt/content/1/1199/mpost_1199727.html\",\n \"holidays\": [\n [\"2026-01-01\", \"2026-01-03\"],\n [\"2026-02-15\", \"2026-02-23\"],\n [\"2026-04-04\", \"2026-04-06\"],\n [\"2026-05-01\", \"2026-05-05\"],\n [\"2026-06-19\", \"2026-06-21\"],\n [\"2026-09-25\", \"2026-09-27\"],\n [\"2026-10-01\", \"2026-10-07\"]\n ]\n}\n", "import bundled from '../calendars/2026.json' with { type: 'json' };\n\nexport interface HolidayCalendar {\n readonly schemaVersion: 1;\n readonly years: readonly number[];\n readonly verifiedOn: string;\n readonly source: string;\n readonly holidays: readonly (readonly [string, string])[];\n}\nexport const CALENDAR_DOWNLOAD = 'https://github.com/a961282799-crypto/dsh-timeband/tree/main/calendars';\nexport const MAX_CALENDAR_BYTES = 64 * 1024;\n\nexport class CalendarError extends Error {\n readonly kind: 'invalid' | 'storage';\n constructor(kind: 'invalid' | 'storage') { super(kind); this.kind = kind; }\n}\n\nfunction validDate(value: unknown): value is string {\n if (typeof value !== 'string' || !/^\\d{4}-\\d{2}-\\d{2}$/.test(value)) return false;\n const parsed = new Date(`${value}T00:00:00Z`);\n return Number.isFinite(parsed.getTime()) && parsed.toISOString().slice(0, 10) === value;\n}\n\n/** Import only data, with valid dates, explicit coverage and a government source. */\nexport function parseCalendar(text: string): HolidayCalendar {\n try {\n if (new TextEncoder().encode(text).length > MAX_CALENDAR_BYTES) throw new Error();\n const value: unknown = JSON.parse(text);\n if (!value || typeof value !== 'object') throw new Error();\n const data = value as Record<string, unknown>;\n if (data.schemaVersion !== 1 || !Array.isArray(data.years) || !data.years.length || data.years.length > 20) throw new Error();\n const years: number[] = data.years;\n if (years.some((year, index) => !Number.isInteger(year) || year < 2000 || year > 9998 || (index > 0 && year <= years[index - 1]!))) throw new Error();\n if (!validDate(data.verifiedOn) || typeof data.source !== 'string') throw new Error();\n const source = new URL(data.source);\n if (source.protocol !== 'https:' || source.username || source.password || !(source.hostname === 'gov.cn' || source.hostname.endsWith('.gov.cn'))) throw new Error();\n if (!Array.isArray(data.holidays) || data.holidays.length > 400) throw new Error();\n const holidays: [string, string][] = [];\n for (const interval of data.holidays) {\n if (!Array.isArray(interval) || interval.length !== 2) throw new Error();\n const [start, end] = interval;\n if (!validDate(start) || !validDate(end) || start > end || start.slice(0, 4) !== end.slice(0, 4) || !years.includes(Number(start.slice(0, 4)))) throw new Error();\n if (holidays.length && start <= holidays.at(-1)![1]) throw new Error();\n holidays.push([start, end]);\n }\n // A covered year must have actual holiday entries, rather than an empty claim.\n if (years.some(year => !holidays.some(([start]) => Number(start.slice(0, 4)) === year))) throw new Error();\n return { schemaVersion: 1, years: [...years], verifiedOn: data.verifiedOn, source: source.href, holidays };\n } catch { throw new CalendarError('invalid'); }\n}\n\n/** Verified public-holiday intervals, inclusive; makeup weekends remain off-peak. */\nexport const calendar = parseCalendar(JSON.stringify(bundled));\n", "import { calendar, CalendarError, parseCalendar } from './calendar.ts';\nimport type { HolidayCalendar } from './calendar.ts';\n\nexport const CALENDAR_STORAGE_KEY = 'dsh-timeband/calendar/v1';\ntype CalendarStorage = Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>;\nexport interface CalendarState {\n readonly data: HolidayCalendar;\n readonly imported: boolean;\n readonly issue: 'invalid' | 'storage' | null;\n}\n\n/** One persisted calendar shared by the plugin views, scoped to this web origin. */\nexport function createCalendarStore(getStorage: () => CalendarStorage = () => window.localStorage) {\n const listeners = new Set<() => void>();\n const read = (): CalendarState => {\n try {\n const saved = getStorage().getItem(CALENDAR_STORAGE_KEY);\n return saved === null ? { data: calendar, imported: false, issue: null } : { data: parseCalendar(saved), imported: true, issue: null };\n } catch (error) {\n return { data: calendar, imported: false, issue: error instanceof CalendarError ? error.kind : 'storage' };\n }\n };\n let snapshot = read();\n const update = (state: CalendarState) => { snapshot = state; for (const listener of listeners) listener(); };\n return {\n getSnapshot: () => snapshot,\n subscribe(listener: () => void) { listeners.add(listener); return () => { listeners.delete(listener); }; },\n import(text: string) {\n const data = parseCalendar(text);\n try { getStorage().setItem(CALENDAR_STORAGE_KEY, JSON.stringify(data)); }\n catch { throw new CalendarError('storage'); }\n update({ data, imported: true, issue: null });\n },\n restore() {\n try { getStorage().removeItem(CALENDAR_STORAGE_KEY); }\n catch { throw new CalendarError('storage'); }\n update({ data: calendar, imported: false, issue: null });\n },\n start() {\n const refresh = () => update(read());\n const onStorage = (event: StorageEvent) => { if (event.key === CALENDAR_STORAGE_KEY || event.key === null) refresh(); };\n window.addEventListener('storage', onStorage);\n window.addEventListener('focus', refresh);\n return () => { window.removeEventListener('storage', onStorage); window.removeEventListener('focus', refresh); };\n },\n };\n}\nexport type CalendarStore = ReturnType<typeof createCalendarStore>;\n", "import { useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';\nimport { createPortal } from 'react-dom';\nimport type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';\nimport type {} from '@deepseek-ai/dsh-client-ui-sidebar/client';\nimport { countdown, createScheduleReader, HOUR, PRICING_SOURCE } from './schedule.ts';\nimport { CalendarError, CALENDAR_DOWNLOAD, MAX_CALENDAR_BYTES } from './calendar.ts';\nimport type { CalendarStore } from './calendar-store.ts';\nimport type { Segment } from './schedule.ts';\nimport type { TextKey } from './locales.ts';\n\nexport type TimeBandProps = PropsRuntime<'sidebar.footer.action'> & PropsLocale<'timeband'> & {\n useClock: (select: (now: number) => number) => number;\n calendarStore: CalendarStore;\n};\n\nconst dateFormatter = new Intl.DateTimeFormat('zh-CN', {\n timeZone: 'Asia/Shanghai', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', hourCycle: 'h23',\n});\nconst timeFormatter = new Intl.DateTimeFormat('en-GB', { timeZone: 'Asia/Shanghai', hour: '2-digit', minute: '2-digit', hourCycle: 'h23' });\n\nfunction Track({ segments, hour, small = false }: { segments: Segment[]; hour: number; small?: boolean }) {\n return <div className={`dtb-track${small ? ' dtb-track-small' : ''}`} aria-hidden=\"true\">\n {segments.map(segment => <span key={segment.start} className={`dtb-segment dtb-${segment.band}`}\n style={{ left: `${segment.start / 24 * 100}%`, width: `${(segment.end - segment.start) / 24 * 100}%` }} />)}\n <span className=\"dtb-cursor\" style={{ left: `${hour / 24 * 100}%` }} />\n </div>;\n}\n\nexport function TimeBand({ wide, useClock, t, calendarStore }: TimeBandProps) {\n const now = useClock(value => value);\n const calendarState = useSyncExternalStore(calendarStore.subscribe, calendarStore.getSnapshot);\n const readSchedule = useMemo(() => createScheduleReader(), []);\n const { day, band, next, segments, coverage } = readSchedule(now, calendarState.data);\n const hour = (now - day.midnight) / HOUR;\n const knownNext = next !== null && next.band !== 'unknown' && band !== 'unknown';\n const [open, setOpen] = useState(false);\n const panel = useRef<HTMLDivElement>(null);\n const trigger = useRef<HTMLButtonElement>(null);\n const close = useRef<HTMLButtonElement>(null);\n const calendarInput = useRef<HTMLInputElement>(null);\n const [feedback, setFeedback] = useState<TextKey | null>(null);\n const [importing, setImporting] = useState(false);\n const id = useId();\n const remaining = knownNext ? countdown(next.at - now) : null;\n const mainText = remaining?.major.map(part => `${part.value}${t(part.unit)}`).join('') ?? '';\n const secondsText = remaining ? `${remaining.seconds}${t('seconds')}` : '\u2014';\n const countdownText = `${mainText}${secondsText}`;\n const countdownView = <span className=\"dtb-countdown\"><span className=\"dtb-count-main\">{mainText || secondsText}</span>\n {mainText && <small className=\"dtb-count-seconds\">{secondsText}</small>}</span>;\n const nextLabel: TextKey = !knownNext ? 'nextUnknown' : next.band === 'peak' ? 'nextPeak' : 'nextOffpeak';\n const nextDate = useMemo(() => knownNext && next ? dateFormatter.format(next.at) : '', [knownNext, next]);\n const time = timeFormatter.format(now);\n const showError = (error: unknown) => setFeedback(error instanceof CalendarError && error.kind === 'storage' ? 'calendarStorageError' : 'calendarInvalid');\n const importCalendar = async (file: File) => {\n setImporting(true); setFeedback(null);\n try {\n if (file.size > MAX_CALENDAR_BYTES) throw new CalendarError('invalid');\n calendarStore.import(await file.text()); setFeedback('calendarImported');\n } catch (error) { showError(error); }\n finally { setImporting(false); }\n };\n\n useEffect(() => {\n const element = panel.current;\n if (!element) return;\n const onToggle = () => setOpen(element.matches(':popover-open'));\n element.addEventListener('toggle', onToggle);\n return () => element.removeEventListener('toggle', onToggle);\n }, []);\n\n useLayoutEffect(() => {\n if (!open) return;\n const position = () => {\n if (!panel.current || !trigger.current) return;\n const anchor = trigger.current.getBoundingClientRect();\n const box = panel.current.getBoundingClientRect();\n const left = Math.max(12, Math.min(anchor.left, window.innerWidth - box.width - 12));\n const top = Math.max(12, Math.min(anchor.top - box.height - 12, window.innerHeight - box.height - 12));\n panel.current.style.left = `${left}px`;\n panel.current.style.top = `${top}px`;\n };\n position();\n close.current?.focus({ preventScroll: true });\n const observer = new ResizeObserver(position);\n if (panel.current) observer.observe(panel.current);\n if (trigger.current) observer.observe(trigger.current);\n window.addEventListener('resize', position);\n window.addEventListener('scroll', position, true);\n return () => { observer.disconnect(); window.removeEventListener('resize', position); window.removeEventListener('scroll', position, true); };\n }, [open, wide]);\n\n const hide = () => { panel.current?.hidePopover(); setOpen(false); trigger.current?.focus({ preventScroll: true }); };\n return <div className=\"dtb-root dtb-theme\" data-wide={wide} data-band={band}>\n <button type=\"button\" className=\"dtb-chip\" ref={trigger} popovertarget={id} popovertargetaction=\"toggle\"\n aria-label={`${t('open')} \u00B7 ${t(band)} \u00B7 ${t(nextLabel)} ${countdownText}`}\n aria-expanded={open} aria-haspopup=\"dialog\" aria-controls={id} title={`${t(band)} \u00B7 ${t(nextLabel)} ${countdownText}`}>\n <span className=\"dtb-chip-top\"><span className={`dtb-dot dtb-${band}`} />\n {wide && <><span className=\"dtb-chip-label\">{t(band)}</span><span className=\"dtb-chip-count\">{countdownView}</span></>}\n </span>\n {wide ? <Track segments={segments} hour={hour} small /> : <svg viewBox=\"0 0 24 24\" className=\"dtb-rail-icon\" aria-hidden=\"true\"><path d=\"M3 17 8 7l5 10 4-7 4 7\" /></svg>}\n </button>\n {createPortal(<div ref={panel} id={id} popover=\"auto\" role=\"dialog\" aria-labelledby={`${id}-title`}\n className=\"dtb-card dtb-theme\" data-band={band}\n onKeyDown={event => { if (event.key === 'Escape') { event.preventDefault(); event.stopPropagation(); hide(); } }}>\n <header className=\"dtb-header\"><div><div className=\"dtb-eyebrow\">DEEPSEEK / TIMEBAND</div><h2 id={`${id}-title`}>{t('title')}</h2></div>\n <button type=\"button\" className=\"dtb-close\" ref={close} aria-label={t('close')} onClick={hide}>\u00D7</button></header>\n <div className=\"dtb-status\"><span className={`dtb-dot dtb-${band}`} /><strong>{t(band)}</strong></div>\n <div className=\"dtb-next\"><span>{t(nextLabel)}</span><strong aria-label={`${t(nextLabel)} ${countdownText}`}>{countdownView}</strong></div>\n <div className=\"dtb-date\"><span>{t('zone')}</span><span>{nextDate && <>{t('nextSwitch')} {nextDate}</>}</span></div>\n <div className=\"dtb-axis\" role=\"img\" aria-label={`${t('timeline')}\uFF1A${segments.map(s => `${s.start}:00\u2013${s.end}:00 ${t(s.band)}`).join('\uFF1B')}\u3002${t('now')} ${time}`}>\n <div className=\"dtb-now\" style={{ left: `${Math.min(91, Math.max(9, hour / 24 * 100))}%` }}>{t('now')} {time}</div>\n <Track segments={segments} hour={hour} />\n <div className=\"dtb-ticks\"><span>00</span><span>06</span><span>12</span><span>18</span><span>24</span></div>\n </div>\n <div className=\"dtb-day-kind\">{day.key} <span>\u00B7</span> {t(day.kind)}</div>\n {segments.length > 1 && <div className=\"dtb-periods\">\n <div><span><i className={`dtb-dot dtb-${day.covered ? 'peak' : 'unknown'}`} />{t(day.covered ? 'peak' : 'unknown')}</span><b>09:00\u201312:00 \u00B7 14:00\u201318:00</b></div>\n <div><span><i className=\"dtb-dot dtb-offpeak\" />{t('offpeak')}</span><b>{t('rest')}</b></div>\n </div>}\n {!day.covered && <p className=\"dtb-note\">{t('unknownNote')}</p>}\n {coverage.notice === 'expiresSoon' && <p className=\"dtb-note dtb-calendar-notice\">{t('calendarExpiresSoon')} {coverage.expiresOn}</p>}\n <details className=\"dtb-details\">\n <summary>{t('details')}</summary>\n <p className=\"dtb-note\">{t('note')}</p>\n <div className=\"dtb-calendar-meta\">\n <span>{t('calendar')} {calendarState.data.years.join('\u3001')} \u00B7 {t(calendarState.imported ? 'calendarLocal' : 'calendarBuiltin')}</span>\n <span>{t('calendarVerified')} {calendarState.data.verifiedOn}</span>\n </div>\n <div className=\"dtb-calendar-actions\">\n <button type=\"button\" className=\"dtb-button\" disabled={importing} onClick={() => calendarInput.current?.click()}>{t('calendarImport')}</button>\n <button type=\"button\" className=\"dtb-button\" disabled={importing || (!calendarState.imported && !calendarState.issue)} onClick={() => {\n try { calendarStore.restore(); setFeedback('calendarRestored'); } catch (error) { showError(error); }\n }}>{t('calendarRestore')}</button>\n <a href={CALENDAR_DOWNLOAD} target=\"_blank\" rel=\"noreferrer\">{t('calendarDownload')} \u2197</a>\n <input type=\"file\" accept=\".json,application/json\" ref={calendarInput} hidden aria-label={t('calendarImport')} onChange={event => {\n const file = event.currentTarget.files?.[0]; event.currentTarget.value = ''; if (file) void importCalendar(file);\n }} />\n </div>\n <p className=\"dtb-note\">{t('calendarImportHint')}</p>\n <p className=\"dtb-note dtb-calendar-feedback\" role=\"status\">{feedback ? t(feedback) : calendarState.issue ? t(calendarState.issue === 'invalid' ? 'calendarSavedInvalid' : 'calendarStorageError') : ''}</p>\n <footer className=\"dtb-footer\"><a href={calendarState.data.source} target=\"_blank\" rel=\"noreferrer\">{t('calendarSource')} \u2197</a><a href={PRICING_SOURCE} target=\"_blank\" rel=\"noreferrer\">{t('rule')} \u2197</a></footer>\n </details>\n </div>, document.body)}\n </div>;\n}\n", "import { calendar } from './calendar.ts';\nimport type { HolidayCalendar } from './calendar.ts';\n\nexport const PRICING_SOURCE = 'https://api-docs.deepseek.com/quick_start/pricing/';\nexport const HOUR = 3_600_000;\nexport const DAY = 24 * HOUR;\nconst CHINA_OFFSET = 8 * HOUR;\nconst BOUNDARIES = [0, 9, 12, 14, 18, 24] as const;\nexport type Band = 'peak' | 'offpeak' | 'unknown';\nexport type DayKind = 'weekday' | 'weekend' | 'holiday' | 'unverified';\nexport interface Segment { start: number; end: number; band: Band }\nexport interface Transition { at: number; band: Band }\n\n/** Shanghai has no daylight-saving transitions in the supported calendar. */\nexport function chinaDay(now: number, data: HolidayCalendar = calendar) {\n if (!Number.isFinite(now) || !Number.isFinite(new Date(now).getTime())) throw new RangeError('Invalid timestamp');\n const date = new Date(now + CHINA_OFFSET);\n const key = date.toISOString().slice(0, 10);\n const midnight = Date.parse(`${key}T00:00:00+08:00`);\n const holiday = data.holidays.some(([start, end]) => key >= start && key <= end);\n const weekend = date.getUTCDay() === 0 || date.getUTCDay() === 6;\n const covered = data.years.includes(date.getUTCFullYear());\n const kind: DayKind = holiday ? 'holiday' : weekend ? 'weekend' : covered ? 'weekday' : 'unverified';\n return { key, midnight, kind, covered, hour: (now - midnight) / HOUR };\n}\n\nexport function todaySegments(now: number, data: HolidayCalendar = calendar): Segment[] {\n const { kind } = chinaDay(now, data);\n if (kind === 'holiday' || kind === 'weekend') return [{ start: 0, end: 24, band: 'offpeak' }];\n const peak: Band = kind === 'unverified' ? 'unknown' : 'peak';\n return [\n { start: 0, end: 9, band: 'offpeak' }, { start: 9, end: 12, band: peak },\n { start: 12, end: 14, band: 'offpeak' }, { start: 14, end: 18, band: peak },\n { start: 18, end: 24, band: 'offpeak' },\n ];\n}\n\nexport function bandAt(now: number, data: HolidayCalendar = calendar): Band {\n const { hour, kind } = chinaDay(now, data);\n if (kind === 'holiday' || kind === 'weekend' || hour < 9 || (hour >= 12 && hour < 14) || hour >= 18) return 'offpeak';\n return kind === 'unverified' ? 'unknown' : 'peak';\n}\n\n/** First real band change, skipping nights, weekends and multi-day public holidays.\n * Stop at an uncertain interval: never promise a peak date beyond calendar coverage.\n */\nexport function nextTransition(now: number, data: HolidayCalendar = calendar): Transition | null {\n const current = bandAt(now, data);\n const { midnight } = chinaDay(now, data);\n for (let day = 0; day < 370; day++) {\n for (const hour of BOUNDARIES) {\n const at = midnight + day * DAY + hour * HOUR;\n if (at <= now) continue;\n const band = bandAt(at, data);\n if (band !== current) return { at, band };\n }\n }\n return null;\n}\n\nexport function calendarCoverage(now: number, data: HolidayCalendar = calendar) {\n const day = chinaDay(now, data);\n let endYear = Number(day.key.slice(0, 4));\n if (!day.covered) return { expiresOn: null, notice: 'uncovered' as const };\n while (data.years.includes(endYear + 1)) endYear++;\n const expiresOn = `${endYear}-12-31`;\n const until = Date.parse(`${endYear + 1}-01-01T00:00:00+08:00`);\n return { expiresOn, notice: until - day.midnight <= 30 * DAY ? 'expiresSoon' as const : null };\n}\n\nexport interface ScheduleSnapshot {\n day: Omit<ReturnType<typeof chinaDay>, 'hour'>;\n band: Band;\n next: Transition | null;\n segments: Segment[];\n coverage: ReturnType<typeof calendarCoverage>;\n}\n\n/** Reuse a schedule within an interval; invalidate at boundaries, midnight,\n * calendar replacement, clock rewind, or a jump after sleep. */\nexport function createScheduleReader() {\n let previous: HolidayCalendar | undefined;\n let start = 0, end = 0;\n let cached: ScheduleSnapshot | undefined;\n return (now: number, data: HolidayCalendar = calendar): ScheduleSnapshot => {\n if (!Number.isFinite(now)) throw new RangeError('Invalid timestamp');\n if (cached && previous === data && now >= start && now < end) return cached;\n const { hour, ...day } = chinaDay(now, data);\n const daily = day.kind === 'holiday' || day.kind === 'weekend';\n const before = daily ? 0 : BOUNDARIES.findLast(boundary => boundary <= hour)!;\n const after = daily ? 24 : BOUNDARIES.find(boundary => boundary > hour)!;\n start = day.midnight + before * HOUR;\n end = day.midnight + after * HOUR;\n previous = data;\n cached = { day, band: bandAt(now, data), next: nextTransition(now, data), segments: todaySegments(now, data), coverage: calendarCoverage(now, data) };\n return cached;\n };\n}\n\n/** Ceiling avoids displaying zero before the boundary actually arrives. */\nexport function countdown(milliseconds: number) {\n const total = Math.max(0, Math.ceil(milliseconds / 1000));\n const days = Math.floor(total / 86400);\n const hours = Math.floor(total / 3600) % 24;\n const minutes = Math.floor(total / 60) % 60;\n const major: { value: number; unit: 'days' | 'hours' | 'minutes' }[] = [];\n if (days > 0) major.push({ value: days, unit: 'days' });\n if (total >= 3600) major.push({ value: hours, unit: 'hours' });\n if (total >= 60) major.push({ value: minutes, unit: 'minutes' });\n return { major, seconds: total % 60 };\n}\n", "export const zh = {\n title: '\u4ECA\u65E5\u65F6\u6BB5', zone: '\u5317\u4EAC\u65F6\u95F4 \u00B7 UTC+8', peak: '\u5CF0\u65F6\u6BB5', offpeak: '\u8C37\u65F6\u6BB5', unknown: '\u5F85\u6838\u5B9E',\n nextPeak: '\u8DDD\u79BB\u5CF0\u65F6\u6BB5', nextOffpeak: '\u8DDD\u79BB\u8C37\u65F6\u6BB5', nextUnknown: '\u540E\u7EED\u65E5\u5386\u5F85\u66F4\u65B0',\n weekday: '\u5468\u4E00\u81F3\u5468\u4E94', weekend: '\u5468\u672B \u00B7 \u5168\u5929\u8C37\u65F6\u6BB5', holiday: '\u516C\u5171\u5047\u671F \u00B7 \u5168\u5929\u8C37\u65F6\u6BB5',\n unverified: '\u672C\u5E74\u5EA6\u8282\u5047\u65E5\u65E5\u5386\u5F85\u66F4\u65B0', allDay: '\u5168\u5929', rest: '\u5176\u4F59\u65F6\u6BB5', now: '\u73B0\u5728',\n nextSwitch: '\u4E0B\u6B21\u5207\u6362\uFF1A', close: '\u5173\u95ED\u65F6\u95F4\u8F74', open: '\u67E5\u770B\u5CF0\u8C37\u65F6\u95F4\u8F74', rule: 'DeepSeek \u5B98\u65B9\u65F6\u6BB5\u89C4\u5219',\n details: '\u65F6\u6BB5\u89C4\u5219\u4E0E\u65E5\u5386', calendar: '\u65E5\u5386\u8986\u76D6\uFF1A', note: '\u5468\u672B\uFF08\u542B\u8C03\u4F11\u4E0A\u73ED\u65E5\uFF09\u53CA\u516C\u5171\u5047\u671F\u5168\u5929\u4E3A\u8C37\u65F6\u6BB5\u3002',\n calendarBuiltin: '\u5185\u7F6E', calendarLocal: '\u672C\u5730\u5BFC\u5165', calendarVerified: '\u6838\u5BF9\u65E5\u671F\uFF1A',\n calendarImport: '\u5BFC\u5165\u65E5\u5386', calendarRestore: '\u6062\u590D\u5185\u7F6E', calendarDownload: '\u83B7\u53D6\u65B0\u65E5\u5386', calendarSource: '\u5047\u671F\u516C\u544A\u6765\u6E90',\n calendarImportHint: '\u9009\u62E9\u4ECE\u9879\u76EE\u83B7\u53D6\u7684\u65E5\u5386\u6587\u4EF6\u3002\u5BFC\u5165\u540E\u6309\u6587\u4EF6\u8986\u76D6\u7684\u5E74\u4EFD\u5224\u65AD\uFF1B\u672A\u6536\u5F55\u5E74\u4EFD\u4ECD\u63D0\u793A\u5F85\u6838\u5B9E\u3002',\n calendarImported: '\u65E5\u5386\u5DF2\u5BFC\u5165\u5E76\u4FDD\u5B58\uFF0C\u65F6\u95F4\u8F74\u5DF2\u66F4\u65B0\u3002', calendarRestored: '\u5DF2\u6062\u590D\u5185\u7F6E\u65E5\u5386\u3002',\n calendarInvalid: '\u65E5\u5386\u683C\u5F0F\u6216\u6765\u6E90\u4E0D\u7B26\u5408\u8981\u6C42\uFF0C\u8BF7\u4F7F\u7528\u9879\u76EE\u63D0\u4F9B\u7684\u6587\u4EF6\uFF08\u6700\u5927 64 KB\uFF09\u3002\u539F\u65E5\u5386\u4FDD\u6301\u4E0D\u53D8\u3002',\n calendarStorageError: '\u65E0\u6CD5\u4FDD\u5B58\u65E5\u5386\uFF0C\u8BF7\u68C0\u67E5\u5E94\u7528\u7684\u672C\u5730\u5B58\u50A8\u6743\u9650\u540E\u91CD\u8BD5\u3002',\n calendarSavedInvalid: '\u5DF2\u4FDD\u5B58\u7684\u65E5\u5386\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u5F53\u524D\u4F7F\u7528\u5185\u7F6E\u65E5\u5386\uFF1B\u53EF\u91CD\u65B0\u5BFC\u5165\u6216\u6062\u590D\u5185\u7F6E\u3002',\n calendarExpiresSoon: '\u65E5\u5386\u5373\u5C06\u5230\u671F\uFF0C\u8BF7\u53CA\u65F6\u66F4\u65B0\u3002\u6709\u6548\u81F3\uFF1A',\n unknownNote: '\u7F3A\u5C11\u672C\u5E74\u5EA6\u5047\u671F\u6570\u636E\uFF0C\u5DE5\u4F5C\u65E5\u5CF0\u65F6\u6BB5\u6682\u4E0D\u4F5C\u786E\u5B9A\u5224\u65AD\u3002',\n timeline: '\u5317\u4EAC\u65F6\u95F4 24 \u5C0F\u65F6\u65F6\u95F4\u8F74', days: '\u5929', hours: '\u5C0F\u65F6', minutes: '\u5206\u949F', seconds: '\u79D2',\n};\nexport type TextKey = keyof typeof zh;\nexport const en: Record<TextKey, string> = {\n title: 'Today\u2019s schedule', zone: 'Beijing time \u00B7 UTC+8', peak: 'Peak', offpeak: 'Off-peak', unknown: 'Unverified',\n nextPeak: 'Until peak hours', nextOffpeak: 'Until off-peak', nextUnknown: 'Calendar update needed',\n weekday: 'Monday\u2013Friday', weekend: 'Weekend \u00B7 off-peak all day', holiday: 'Public holiday \u00B7 off-peak all day',\n unverified: 'Holiday calendar needs an update', allDay: 'All day', rest: 'All other hours', now: 'Now',\n nextSwitch: 'Next change:', close: 'Close timeline', open: 'View peak hours timeline', rule: 'DeepSeek official schedule',\n details: 'Schedule rules and calendar', calendar: 'Calendar coverage:', note: 'Weekends (including makeup workdays) and public holidays are off-peak all day.',\n calendarBuiltin: 'Built-in', calendarLocal: 'Local import', calendarVerified: 'Checked on:',\n calendarImport: 'Import calendar', calendarRestore: 'Restore built-in', calendarDownload: 'Get new calendar', calendarSource: 'Holiday notice source',\n calendarImportHint: 'Choose a calendar file from this project. Imported coverage replaces the current calendar; other years remain unverified.',\n calendarImported: 'Calendar saved. The timeline is updated.', calendarRestored: 'Built-in calendar restored.',\n calendarInvalid: 'Invalid calendar format or source. Use a project calendar file (up to 64 KB). Your current calendar is unchanged.',\n calendarStorageError: 'Calendar could not be saved. Check local storage permissions and try again.',\n calendarSavedInvalid: 'Saved calendar is unreadable; using the built-in calendar. Import again or restore it.',\n calendarExpiresSoon: 'Calendar expires soon. Please update. Valid until:',\n unknownNote: 'Holiday data for this year is unavailable; weekday peak periods are unverified.',\n timeline: '24-hour timeline in Beijing time', days: 'd', hours: 'h', minutes: 'min', seconds: 's',\n};\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface LocaleNamespaceMap { timeband: TextKey }\n}\n", ".dtb-theme {\n --dtb-bg: var(--dsw-alias-bg-base, #fff);\n --dtb-text: var(--dsw-alias-label-primary, #252925);\n --dtb-muted: var(--dsw-alias-label-tertiary, #798079);\n --dtb-secondary: var(--dsw-alias-label-secondary, #596459);\n --dtb-line: var(--dsw-alias-border-primary, #e7ebe7);\n --dtb-hover: var(--dsw-alias-interactive-bg-hover, #f4f6f3);\n --dtb-green: #338468; --dtb-peak: #cf7850; --dtb-unknown: #909897;\n color: var(--dtb-text); font-family: inherit; font-size: 12px; box-sizing: border-box;\n}\n.dtb-theme *, .dtb-theme *::before, .dtb-theme *::after { box-sizing: border-box; }\n.dtb-root { min-width: 0; width: 100%; }\n.dtb-chip { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 100%; min-width: 126px; height: 44px; padding: 5px 9px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; }\n.dtb-chip:hover, .dtb-chip[aria-expanded='true'], .dtb-close:hover, .dtb-button:hover:enabled { background: var(--dtb-hover); }\n.dtb-chip:focus-visible, .dtb-close:focus-visible, .dtb-button:focus-visible, .dtb-card a:focus-visible, .dtb-details summary:focus-visible { outline: 2px solid var(--dtb-green); outline-offset: 3px; }\n.dtb-chip-top { display: flex; flex-wrap: wrap; align-items: center; width: 100%; gap: 2px 6px; }\n.dtb-chip-label { white-space: nowrap; font-size: 11px; }\n.dtb-chip-count { flex-shrink: 0; margin-left: auto; color: var(--dtb-muted); font-size: 9px; font-variant-numeric: tabular-nums; }\n.dtb-countdown { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }\n.dtb-count-seconds { font-size: .58em; color: var(--dtb-muted); letter-spacing: 0; }\n.dtb-chip-count .dtb-countdown { gap: 2px; }\n.dtb-chip-count .dtb-count-seconds { font-size: .8em; }\n.dtb-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex: none; }\n.dtb-offpeak { background: var(--dtb-green); }\n.dtb-peak { background: var(--dtb-peak); }\n.dtb-unknown { background: repeating-linear-gradient(135deg, var(--dtb-unknown) 0 3px, transparent 3px 5px); }\n.dtb-track { width: 100%; height: 12px; position: relative; border-radius: 4px; }\n.dtb-segment { position: absolute; height: 100%; opacity: .8; border-left: 2px solid var(--dtb-bg); }\n.dtb-segment:first-child { border-radius: 3px 0 0 3px; border-left: 0; }\n.dtb-segment:nth-last-child(2) { border-radius: 0 3px 3px 0; }\n.dtb-segment:first-child:nth-last-child(2) { border-radius: 3px; }\n.dtb-cursor { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--dtb-text); box-shadow: 0 0 0 2px var(--dtb-bg); transform: translateX(-1px); }\n.dtb-track-small { height: 4px; }\n.dtb-track-small .dtb-segment { border-left-width: 1px; }\n.dtb-track-small .dtb-cursor { top: -2px; bottom: -2px; width: 1px; box-shadow: 0 0 0 1px var(--dtb-bg); }\n.dtb-root[data-wide='false'] { width: 36px; }\n.dtb-root[data-wide='false'] .dtb-chip { min-width: 0; width: 36px; height: 36px; padding: 6px; position: relative; }\n.dtb-root[data-wide='false'] .dtb-chip-top { position: absolute; right: 4px; top: 5px; width: auto; }\n.dtb-rail-icon { width: 23px; height: 23px; stroke: currentColor; stroke-width: 1.5; fill: none; }\n/* DSH rc.2 layout adapter: only reflow the two native footer containers when\n this plugin is their sole action and the Desktop account launcher exists.\n No DOM mutation, private class names, account replacement or hidden labels.\n Other footer plugins / unknown layouts retain the native stacked layout. */\ndiv:has(> div > .dtb-root[data-wide='true']:only-child):has(> div button[data-collapsed='false']) {\n display: flex; flex-direction: row-reverse; flex-wrap: wrap; align-items: center; gap: 4px;\n}\ndiv:has(> div > .dtb-root[data-wide='true']:only-child):has(> div button[data-collapsed='false']) > div:has(> .dtb-root) {\n flex: 1 1 126px; width: auto; min-width: 126px;\n}\ndiv:has(> div > .dtb-root[data-wide='true']:only-child):has(> div button[data-collapsed='false']) > div:not(:has(> .dtb-root)) {\n flex: 1 1 40px; width: auto; min-width: 40px;\n}\n.dtb-card { position: fixed; inset: auto; margin: 0; padding: 22px; width: 362px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; background: var(--dtb-bg); border: 1px solid var(--dtb-line); border-radius: 16px; box-shadow: 0 12px 48px #0002, 0 2px 6px #0001; }\n.dtb-card::backdrop { background: transparent; }\n.dtb-header { display: flex; justify-content: space-between; align-items: start; }\n.dtb-eyebrow { font-size: 9px; letter-spacing: .16em; color: var(--dtb-muted); }\n.dtb-header h2 { margin: 6px 0 0; font-size: 15px; font-weight: 550; letter-spacing: .02em; }\n.dtb-close { border: 0; background: transparent; color: var(--dtb-muted); width: 28px; height: 28px; border-radius: 7px; font-size: 22px; line-height: 24px; cursor: pointer; }\n.dtb-status { display: flex; gap: 9px; align-items: center; margin-top: 28px; }\n.dtb-status .dtb-dot { width: 8px; height: 8px; }\n.dtb-status strong { font-weight: 550; font-size: 25px; letter-spacing: -.04em; }\n.dtb-next { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 17px; }\n.dtb-next > span { color: var(--dtb-secondary); font-size: 12px; }\n.dtb-next strong { margin-left: auto; max-width: 100%; font-size: 24px; font-weight: 400; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }\n.dtb-date { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; color: var(--dtb-secondary); font-size: 11px; margin-top: 6px; }\n.dtb-date > span:last-child { margin-left: auto; }\n.dtb-axis { position: relative; margin: 39px 0 19px; }\n.dtb-now { position: absolute; top: -12px; transform: translate(-50%, -100%); font-size: 11px; white-space: nowrap; color: var(--dtb-secondary); }\n.dtb-ticks { display: flex; justify-content: space-between; margin-top: 10px; color: var(--dtb-secondary); font-size: 11px; font-variant-numeric: tabular-nums; }\n.dtb-day-kind { border-top: 1px solid var(--dtb-line); padding-top: 16px; margin-bottom: 13px; font-size: 11px; color: var(--dtb-secondary); }\n.dtb-day-kind > span { padding: 0 4px; }\n.dtb-periods > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 11px 0; font-size: 11px; }\n.dtb-periods span { display: flex; align-items: center; gap: 7px; white-space: nowrap; }\n.dtb-periods b { font-weight: 400; font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }\n.dtb-note { font-size: 11px; color: var(--dtb-secondary); line-height: 1.7; margin: 13px 0; }\n.dtb-details { border-top: 1px solid var(--dtb-line); margin-top: 16px; padding-top: 12px; }\n.dtb-details summary { width: fit-content; cursor: pointer; font-size: 11px; color: var(--dtb-secondary); line-height: 1.8; }\n.dtb-calendar-meta { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--dtb-secondary); }\n.dtb-calendar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 11px; }\n.dtb-button { padding: 5px 9px; border: 1px solid var(--dtb-line); border-radius: 6px; background: transparent; color: inherit; font: inherit; cursor: pointer; }\n.dtb-button:disabled { opacity: .5; cursor: default; }\n.dtb-calendar-actions a { color: var(--dtb-green); text-decoration: none; }\n.dtb-calendar-feedback:empty { display: none; }\n.dtb-calendar-notice { border-left: 2px solid var(--dtb-peak); padding-left: 9px; }\n.dtb-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 3px; font-size: 10px; color: var(--dtb-muted); }\n.dtb-footer a { color: inherit; text-decoration: none; }\n.dtb-footer a:hover { text-decoration: underline; }\n@media (prefers-color-scheme: dark) {\n .dtb-theme { --dtb-secondary: var(--dsw-alias-label-secondary, #b6bfb6); }\n .dtb-theme { --dtb-bg: var(--dsw-alias-bg-base, #242624); --dtb-text: var(--dsw-alias-label-primary, #e5eae5); --dtb-muted: var(--dsw-alias-label-tertiary, #9aa59e); --dtb-line: var(--dsw-alias-border-primary, #3b413c); --dtb-hover: var(--dsw-alias-interactive-bg-hover, #303630); --dtb-green: #6cbd9e; --dtb-peak: #eaa77a; }\n}\n"],
5
- "mappings": ";mbAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,WAAAE,GAAA,WAAAC,KAAA,eAAAC,GAAAJ,ICCO,SAASK,GAAc,CAC5B,IAAIC,EAAW,KAAK,IAAI,EAClBC,EAAY,IAAI,IAChBC,EAAS,IAAM,CACnBF,EAAW,KAAK,IAAI,EACpB,QAAWG,KAAYF,EAAWE,EAAS,CAC7C,EACA,MAAO,CACL,YAAa,IAAMH,EACnB,UAAUG,EAAsB,CAAE,OAAAF,EAAU,IAAIE,CAAQ,EAAU,IAAM,CAAEF,EAAU,OAAOE,CAAQ,CAAG,CAAG,EACzG,OAAQ,CACN,IAAIC,EACEC,EAAS,IAAM,CACnB,cAAcD,CAAK,EACnBA,EAAQ,OACRF,EAAO,EACH,SAAS,kBAAoB,WAAUE,EAAQ,YAAYF,EAAQ,GAAI,EAC7E,EACA,gBAAS,iBAAiB,mBAAoB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AAO,wBAAyB,IAAMA,EAAI,MAAM,SAAS,CACjE,KAAM,wBAAyB,GAAI,eAAgB,MAAO,IAAK,OAAQ,WACvE,OAAQ,KAAO,CAAE,MAAO,CAAE,MAAAK,CAAM,EAAG,MAAO,CAAE,cAAAE,CAAc,CAAE,EAC9D,EAAGE,EAAQ,CAAC,CACd",
6
- "names": ["client_exports", "__export", "apply", "inject", "__toCommonJS", "createClock", "snapshot", "listeners", "update", "listener", "timer", "resume", "__default", "CALENDAR_DOWNLOAD", "MAX_CALENDAR_BYTES", "CalendarError", "kind", "validDate", "value", "parsed", "parseCalendar", "text", "data", "years", "year", "index", "source", "holidays", "interval", "start", "end", "calendar", "__default", "CALENDAR_STORAGE_KEY", "createCalendarStore", "getStorage", "listeners", "read", "saved", "calendar", "parseCalendar", "error", "CalendarError", "snapshot", "update", "state", "listener", "text", "data", "refresh", "onStorage", "event", "import_react", "import_react_dom", "PRICING_SOURCE", "HOUR", "DAY", "CHINA_OFFSET", "BOUNDARIES", "chinaDay", "now", "data", "calendar", "date", "key", "midnight", "holiday", "start", "end", "weekend", "covered", "todaySegments", "kind", "peak", "bandAt", "hour", "nextTransition", "current", "day", "at", "band", "calendarCoverage", "endYear", "expiresOn", "until", "createScheduleReader", "previous", "cached", "daily", "before", "boundary", "after", "countdown", "milliseconds", "total", "days", "hours", "minutes", "major", "import_jsx_runtime", "dateFormatter", "timeFormatter", "Track", "segments", "hour", "small", "segment", "TimeBand", "wide", "useClock", "t", "calendarStore", "now", "value", "calendarState", "readSchedule", "createScheduleReader", "day", "band", "next", "coverage", "HOUR", "knownNext", "open", "setOpen", "panel", "trigger", "close", "calendarInput", "feedback", "setFeedback", "importing", "setImporting", "id", "remaining", "countdown", "mainText", "part", "secondsText", "countdownText", "countdownView", "nextLabel", "nextDate", "time", "showError", "error", "CalendarError", "importCalendar", "file", "MAX_CALENDAR_BYTES", "element", "onToggle", "position", "anchor", "box", "left", "top", "observer", "hide", "event", "s", "CALENDAR_DOWNLOAD", "PRICING_SOURCE", "zh", "en", "style_default", "inject", "apply", "ctx", "zh", "en", "style", "style_default", "clock", "createClock", "calendarStore", "createCalendarStore", "TimeBand"]
7
- }