@xmanrui/dsh-im 5.3.0 → 5.4.0

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.
Files changed (49) hide show
  1. package/THIRD_PARTY_NOTICES.md +209 -0
  2. package/docs/client-integration.md +2 -2
  3. package/lib/client.js +1688 -233
  4. package/lib/index.js +322 -318
  5. package/package.json +1 -1
  6. package/plugin-src/client/channels/telegram/group-triggers-settings.js +393 -0
  7. package/plugin-src/client/delivery-settings.js +21 -1
  8. package/plugin-src/client/ds-bot-avatar-data.js +537 -0
  9. package/plugin-src/client/ds-bot-avatar.js +55 -0
  10. package/plugin-src/client/ds-bot-session-avatars.js +77 -0
  11. package/plugin-src/client/ds-bot-settings.js +194 -0
  12. package/plugin-src/client/i18n.js +59 -1
  13. package/plugin-src/client/index.js +12 -1
  14. package/plugin-src/client/plugin-page.js +3 -8
  15. package/plugin-src/client/styles.js +25 -5
  16. package/plugin-src/host/channels/dingtalk/production.mjs +2 -1
  17. package/plugin-src/host/channels/feishu/production.mjs +13 -5
  18. package/plugin-src/host/channels/qq/production.mjs +2 -1
  19. package/plugin-src/host/channels/shared/group-triggers-rpc.mjs +110 -0
  20. package/plugin-src/host/channels/shared/production.mjs +7 -1
  21. package/plugin-src/host/channels/slack/production.mjs +2 -1
  22. package/plugin-src/host/channels/telegram/index.mjs +1 -0
  23. package/plugin-src/host/channels/telegram/production.mjs +2 -0
  24. package/plugin-src/host/channels/telegram/rpc.mjs +17 -2
  25. package/plugin-src/host/channels/wecom/production.mjs +4 -1
  26. package/plugin-src/host/channels/wecom-app/production.mjs +2 -1
  27. package/plugin-src/host/channels/weixin/production.mjs +2 -1
  28. package/plugin-src/host/channels/whatsapp/production.mjs +2 -1
  29. package/plugin-src/host/delivery-adapter.mjs +89 -9
  30. package/plugin-src/host/delivery-rpc.mjs +33 -1
  31. package/plugin-src/host/delivery-service.mjs +70 -1
  32. package/plugin-src/host/delivery-suggestions.mjs +11 -0
  33. package/plugin-src/host/ds-bot-client.mjs +74 -0
  34. package/plugin-src/host/index.mjs +5 -1
  35. package/src/channels/feishu/feishu-cards.mjs +11 -7
  36. package/src/channels/shared/bot-workspace-store.mjs +136 -7
  37. package/src/channels/shared/group-history-store.mjs +26 -0
  38. package/src/channels/shared/i18n-en/feishu.mjs +1 -0
  39. package/src/channels/shared/i18n-en/wecom.mjs +4 -0
  40. package/src/channels/shared/session-binding-lock.mjs +2 -0
  41. package/src/channels/shared/workspace-session.mjs +5 -1
  42. package/src/channels/telegram/config-store.mjs +5 -1
  43. package/src/channels/telegram/group-triggers.mjs +229 -0
  44. package/src/channels/telegram/telegram-api.mjs +12 -0
  45. package/src/channels/telegram/telegram-controller.mjs +110 -1
  46. package/src/channels/telegram/telegram-runtime.mjs +15 -2
  47. package/src/channels/wecom/stream-supervisor.mjs +184 -0
  48. package/src/channels/wecom/wecom-bridge.mjs +25 -11
  49. package/src/channels/wecom/wecom-runtime.mjs +12 -1
package/lib/client.js CHANGED
@@ -590,12 +590,12 @@ async function callManagementRpc(connection, channel7, method, payload, signal)
590
590
  }
591
591
 
592
592
  // plugin-src/client/index.js
593
- var React42 = __toESM(require("react"), 1);
593
+ var React46 = __toESM(require("react"), 1);
594
594
 
595
595
  // package.json
596
596
  var package_default = {
597
597
  name: "@xmanrui/dsh-im",
598
- version: "5.3.0",
598
+ version: "5.4.0",
599
599
  icon: "./assets/logo-plugin-message-link-gradient.webp",
600
600
  description: "\u628A\u5FAE\u4FE1\u3001\u98DE\u4E66\u3001\u4F01\u5FAE\u3001\u9489\u9489\u3001QQ\u3001Telegram\u3001WhatsApp\u3001Slack\u3001Discord\u3001Matrix\u63A5\u5165DSH\u3002 Connect Telegram, WhatsApp, Slack, Discord, Matrix, WeChat, Feishu, WeCom, DingTalk, and QQ to DSH.",
601
601
  keywords: [
@@ -1184,6 +1184,31 @@ var connection_error_en_default = {
1184
1184
  var React2 = __toESM(require("react"), 1);
1185
1185
  var IM_LOCALE_NAMESPACE = "dsh-im";
1186
1186
  var EN = Object.freeze({
1187
+ "\u79C1\u804A\u5BF9\u8C61": "Private chat",
1188
+ "\u9009\u62E9\u79C1\u804A\u5BF9\u8C61": "Select a private chat",
1189
+ "\u4EC5\u652F\u6301\u5DF2\u7ECF\u5EFA\u7ACB\u4F1A\u8BDD\u7684\u79C1\u804A\uFF0C\u8BF7\u5148\u4E0E\u673A\u5668\u4EBA\u79C1\u804A\u540E\u5237\u65B0\u3002": "Only established private chats are supported. Message the bot privately, then refresh.",
1190
+ "\u9009\u62E9 DS Bot \u548C\u79C1\u804A\u5BF9\u8C61\uFF0C\u76F4\u63A5\u4F7F\u7528 Bot \u7684\u4F1A\u8BDD\u3002": "Choose a DS Bot and a private chat to use the Bot\u2019s session.",
1191
+ "\u8FD8\u6CA1\u6709\u53EF\u7ED1\u5B9A\u7684\u79C1\u804A\u3002\u5148\u7ED9\u8FD9\u4E2A\u673A\u5668\u4EBA\u53D1\u4E00\u6761\u79C1\u804A\u6D88\u606F\uFF0C\u518D\u70B9\u51FB\u5237\u65B0\u3002": "No private chats yet. Send this bot a private message, then refresh.",
1192
+ "\u7ED1\u5B9Abot": "Bind bot",
1193
+ "\u6B63\u5728\u68C0\u6D4B DS Bot\u2026": "Checking DS Bot\u2026",
1194
+ "\u9009\u62E9 DS Bot": "Select DS Bot",
1195
+ "\u6682\u65E0\u53EF\u9009 DS Bot": "No available DS Bots",
1196
+ "\u6682\u65E0\u53EF\u9009\u79C1\u804A\u5BF9\u8C61": "No available private chats",
1197
+ "\u5DF2\u7ED1\u5B9A\u7684 DS Bot \u548C\u79C1\u804A\u5BF9\u8C61\u4E0D\u53EF\u91CD\u590D\u9009\u62E9\uFF0C\u89E3\u9664\u7ED1\u5B9A\u540E\u53EF\u91CD\u65B0\u9009\u62E9\u3002": "Bound DS Bots and private chats cannot be selected again. Unbind them to make them available.",
1198
+ "\u6240\u9009 DS Bot \u6216\u79C1\u804A\u5BF9\u8C61\u5DF2\u7ED1\u5B9A\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u65B0\u9009\u62E9\u3002": "The selected DS Bot or private chat is already bound. Refresh and choose again.",
1199
+ "\u89E3\u9664\u7ED1\u5B9A": "Unbind",
1200
+ "\u5DF2\u7ED1\u5B9A": "Bound",
1201
+ "\u672A\u5B89\u88C5 DS Bot\uFF0C\u8BF7\u5148\u5728 DSH \u63D2\u4EF6\u7BA1\u7406\u4E2D\u5B89\u88C5 ds-bot\uFF0C\u7136\u540E\u5237\u65B0\u3002": "DS Bot is not installed. Install ds-bot in DSH plugin management, then refresh.",
1202
+ "DS Bot \u5C1A\u672A\u542F\u7528\uFF0C\u8BF7\u5728 DSH \u63D2\u4EF6\u7BA1\u7406\u4E2D\u542F\u7528\u540E\u5237\u65B0\u3002": "DS Bot is disabled. Enable it in DSH plugin management, then refresh.",
1203
+ "\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6 DS Bot\uFF0C\u8BF7\u68C0\u67E5\u63D2\u4EF6\u662F\u5426\u6B63\u5E38\u8FD0\u884C\u540E\u91CD\u8BD5\u3002": "Unable to read DS Bot. Check that the plugin is running, then retry.",
1204
+ "DS Bot \u5F53\u524D\u7531\u5176\u4ED6 Host \u7BA1\u7406\uFF0C\u8BF7\u5728\u8FD0\u884C\u5B83\u7684 Host \u4E2D\u7ED1\u5B9A\u3002": "DS Bot is managed by another Host. Bind it on that Host.",
1205
+ "\u7ED1\u5B9Abot\u4EC5\u652F\u6301\u5F53\u524D Host \u7684\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u68C0\u67E5\u673A\u5668\u4EBA\u7684 Harness \u8FDE\u63A5\u8BBE\u7F6E\u3002": "Bot binding requires the current Host. Check the bot\u2019s Harness connection settings.",
1206
+ "\u6240\u9009 DS Bot \u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u65B0\u9009\u62E9\u3002": "The selected DS Bot no longer exists. Refresh and select another.",
1207
+ "\u7ED1\u5B9A\u8BBE\u7F6E\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002": "Could not save the binding. Refresh and retry.",
1208
+ "\u7ED1\u5B9A\u5DF2\u4FDD\u5B58\u3002": "Binding saved.",
1209
+ "\u5DF2\u89E3\u9664\u7ED1\u5B9A\uFF0C\u804A\u5929\u8BB0\u5F55\u4FDD\u7559\u3002": "Binding removed. Chat history is preserved.",
1210
+ "\u8FD8\u6CA1\u6709 DS Bot\uFF0C\u8BF7\u5148\u5728 DS Bot \u4E2D\u521B\u5EFA\u673A\u5668\u4EBA\u540E\u5237\u65B0\u3002": "No bots yet. Create a bot in DS Bot, then refresh.",
1211
+ "DS Bot \u6682\u4E0D\u53EF\u7528": "DS Bot unavailable",
1187
1212
  ...connection_error_en_default,
1188
1213
  ...diagnostics_default,
1189
1214
  ...image_input_default,
@@ -1245,7 +1270,6 @@ var EN = Object.freeze({
1245
1270
  "macOS Messages \u6743\u9650": "macOS Messages permissions",
1246
1271
  "IM\u673A\u5668\u4EBA": "IM bots",
1247
1272
  "\u6253\u5F00 IM\u673A\u5668\u4EBA": "Open IM bots",
1248
- "\u8FD4\u56DE\u63D2\u4EF6\u8BE6\u60C5": "Back to plugin details",
1249
1273
  "IM\u673A\u5668\u4EBA\u8BBE\u7F6E": "IM bot settings",
1250
1274
  "IM \u9762\u677F\u52A0\u8F7D\u5931\u8D25": "Could not load the IM panel",
1251
1275
  "\u66F4\u591A\u673A\u5668\u4EBA\u8BBE\u7F6E": "More bot settings",
@@ -1256,6 +1280,38 @@ var EN = Object.freeze({
1256
1280
  "\u673A\u5668\u4EBA\u8BBE\u7F6E": "Bot settings",
1257
1281
  "\u673A\u5668\u4EBA\u8BBE\u7F6E\u9875\u7B7E": "Bot settings tabs",
1258
1282
  "\u6295\u9012\u8BBE\u7F6E": "Delivery settings",
1283
+ "\u673A\u5668\u4EBA\u7FA4\u804A\u884C\u4E3A": "Bot in groups",
1284
+ "\u65B0\u7FA4\u804A\u9ED8\u8BA4\u8BBE\u7F6E": "Default for new groups",
1285
+ "\u54CD\u5E94\u6761\u4EF6": "React to",
1286
+ "\u4E0D\u54CD\u5E94": "Do not react",
1287
+ "\u88AB @ \u6216\u56DE\u590D\u65F6\uFF08\u4EFB\u4F55\u4EBA\uFF09": "Mention or reply, anyone",
1288
+ "\u88AB @ \u6216\u56DE\u590D\u65F6\uFF08\u4EC5\u540D\u5355\u6210\u5458\uFF09": "Mention or reply, listed members only",
1289
+ "\u6240\u6709\u6D88\u606F\uFF08\u4EFB\u4F55\u4EBA\uFF09": "All messages, anyone",
1290
+ "\u6240\u6709\u6D88\u606F\uFF08\u4EC5\u540D\u5355\u6210\u5458\uFF09": "All messages, listed members only",
1291
+ "\u6210\u5458\u540D\u5355": "Members list",
1292
+ "\u540D\u5355\u4E3A\u7A7A\uFF1A\u8BE5\u6A21\u5F0F\u4E0D\u4F1A\u54CD\u5E94\u4EFB\u4F55\u6210\u5458\u3002": "The list is empty, so nobody can trigger the bot in this mode.",
1293
+ "\u5F53\u524D\u6A21\u5F0F\u4E0D\u4F7F\u7528\u540D\u5355\u3002": "This mode does not use the list.",
1294
+ "\u7FA4 ID": "Group",
1295
+ "\u6807\u9898": "Title",
1296
+ "\u6700\u8FD1\u6D3B\u52A8": "Last activity",
1297
+ "\uFF08\u9ED8\u8BA4\uFF09": " (default)",
1298
+ "\xD7 \u79FB\u9664": "\xD7 Remove",
1299
+ "\u81EA\u5B9A\u4E49": "Customize",
1300
+ "\u6DFB\u52A0\u7FA4\u804A": "Add group",
1301
+ "\u7FA4 ID\u3001@\u7528\u6237\u540D\u6216\u6D88\u606F\u94FE\u63A5": "Group ID, @username or message link",
1302
+ "\u652F\u6301\u6570\u5B57 ID\u3001@\u7528\u6237\u540D\u3001t.me/<name> \u6216 t.me/c/<id>/<msg>\uFF1B\u771F\u5B9E ID \u901A\u8FC7 getChat \u89E3\u6790\u3002": "Accepts a numeric ID, @username, t.me/<name> or t.me/c/<id>/<msg>; the real ID is resolved through getChat.",
1303
+ "+ \u6DFB\u52A0": "+ Add",
1304
+ "\u4FDD\u5B58\u7FA4\u804A\u8BBE\u7F6E": "Save group settings",
1305
+ "\u5DF2\u4ECE\u5217\u8868\u79FB\u9664\uFF0C\u4FDD\u5B58\u540E\u751F\u6548\u3002": "Removed from the list. Save to apply.",
1306
+ "\u5DF2\u6DFB\u52A0\uFF0C\u4FDD\u5B58\u540E\u751F\u6548\u3002": "Added. Save to apply.",
1307
+ "\u5DF2\u6DFB\u52A0\u3002Telegram \u672A\u786E\u8BA4\u8BE5\u7FA4\uFF08\u673A\u5668\u4EBA\u53EF\u80FD\u8FD8\u4E0D\u5728\u7FA4\u91CC\uFF09\uFF0C\u4FDD\u5B58\u540E\u751F\u6548\u3002": "Added without Telegram confirmation (the bot may not be in that group yet). Save to apply.",
1308
+ "\u7FA4\u804A\u8BBE\u7F6E\u5DF2\u4FDD\u5B58\u3002": "Group settings saved.",
1309
+ "\u6B63\u5728\u8BFB\u53D6\u7FA4\u804A\u8BBE\u7F6E\u2026": "Loading group settings\u2026",
1310
+ "\u65E0\u6CD5\u8BFB\u53D6\u7FA4\u804A\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002": "Unable to read group settings. Try again.",
1311
+ "\u65E0\u6CD5\u4FDD\u5B58\u7FA4\u804A\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002": "Unable to save group settings. Try again.",
1312
+ "\u65E0\u6CD5\u8BFB\u53D6\u6216\u4FDD\u5B58\u7FA4\u804A\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002": "Unable to read or save group settings. Try again.",
1313
+ "\u65E0\u6CD5\u89E3\u6790\u8BE5\u7FA4\u804A\uFF0C\u8BF7\u91CD\u8BD5\u6216\u586B\u5199\u6570\u5B57\u7FA4 ID\u3002": "Could not resolve this group. Try again or enter the numeric group ID.",
1314
+ "\u8BE5\u7FA4\u5DF2\u5728\u5217\u8868\u4E2D\uFF0C\u8BF7\u7F16\u8F91\u4E0A\u65B9\u7684\u5361\u7247\u3002": "This group is already in the list. Edit its card above instead.",
1259
1315
  "\u8BBF\u95EE\u8BBE\u7F6E": "Access settings",
1260
1316
  "\u67E5\u770B\u8BBF\u95EE\u6743\u9650\u8BF4\u660E": "View access permission details",
1261
1317
  "\u5141\u8BB8\u6240\u6709\u7528\u6237": "Allow all users",
@@ -6673,7 +6729,7 @@ var TOKEN_BOT_ENDPOINTS = Object.freeze({
6673
6729
  function createTokenChannelApi(channel7, connectionSummary, {
6674
6730
  normalizeBotExtension = () => ({})
6675
6731
  } = {}) {
6676
- const unwrapRpcResult17 = (result2) => {
6732
+ const unwrapRpcResult18 = (result2) => {
6677
6733
  if (!isRecord2(result2) || typeof result2.ok !== "boolean") {
6678
6734
  throw new Error(`${channel7} \u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94`);
6679
6735
  }
@@ -6744,7 +6800,7 @@ function createTokenChannelApi(channel7, connectionSummary, {
6744
6800
  code: text2(error?.code, `${channel7.toUpperCase()}_ERROR`, 80),
6745
6801
  message: text2(error?.message, `${channel7}\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5`)
6746
6802
  });
6747
- return Object.freeze({ unwrapRpcResult: unwrapRpcResult17, normalizeSnapshot: normalizeSnapshot13, presentError: presentError17 });
6803
+ return Object.freeze({ unwrapRpcResult: unwrapRpcResult18, normalizeSnapshot: normalizeSnapshot13, presentError: presentError17 });
6748
6804
  }
6749
6805
 
6750
6806
  // plugin-src/client/channels/discord/api.js
@@ -16363,7 +16419,7 @@ function installInterfaceLanguageMirror(ctx, {
16363
16419
  }
16364
16420
 
16365
16421
  // plugin-src/client/delivery-settings.js
16366
- var React35 = __toESM(require("react"), 1);
16422
+ var React38 = __toESM(require("react"), 1);
16367
16423
 
16368
16424
  // plugin-src/client/access-policy-settings.js
16369
16425
  var React28 = __toESM(require("react"), 1);
@@ -17056,8 +17112,904 @@ function BotSettingsTabs({ tabs, activeTabId, onChange }) {
17056
17112
  );
17057
17113
  }
17058
17114
 
17059
- // plugin-src/client/channels/feishu/group-settings.js
17115
+ // plugin-src/client/ds-bot-settings.js
17116
+ var React32 = __toESM(require("react"), 1);
17117
+
17118
+ // plugin-src/client/ds-bot-avatar.js
17060
17119
  var React31 = __toESM(require("react"), 1);
17120
+
17121
+ // plugin-src/client/ds-bot-avatar-data.js
17122
+ var SHAPES = {
17123
+ "whale": {
17124
+ "label": "Whale",
17125
+ "body": "M65.3 20.9l5.1 .1 4.8 .9 4.8 1.7 4.3 2.3 3.8 3.1 3 3.4 2.3 3.8 1.6 4.3 .9 4.3 0 4.8-.8 4.8-1.4 4.3-2.3 4.3-3.2 4.3-3.4 3.3-4.3 3.1-7.2 3.5-7.6 1.7-7.2 .1-9.6-1.6-3.3-1-2.9-1.7-8.8-8.9-6-4.7-3.3-.5-7.7 1.1-4.8-.1-4.7-1.2-1.9-1.2-1-1-.5-1.5 .4-1.4 1.1-1.3 1.9-1.3 4.7-1.5 7.7-.6 1.1-.5 .7-1 0-1.4-2.8-7.2-1.2-5.3-.1-4.3 .4-1.4 .9-1.2 1.9-.2 2 1 2.2 2.3 2.2 3.4 3.2 7.6 1.9 9.7 .5-.1 1.1-7.2 1.8-4.8 3.2-5.2 3.9-4.3 4.9-3.9 5.6-2.9 5.8-1.9z",
17126
+ "paints": [
17127
+ [
17128
+ "M93.3 55.8l1-.3 .1 1.2-2.4 5.3-3.4 4.8-3.8 3.8-4.8 3.4-5.7 2.8-4.8 1.5-4.8 .4 20.1-17.4 5.2-3.7z",
17129
+ "#fff",
17130
+ 1
17131
+ ]
17132
+ ],
17133
+ "shade": "M88.6 29.5l2.4 2.9 1.9 2.8 2.4 6.3 .5 3.3 .1 5.3-1.5 6.6-1.9 4.3-2 3.3-4.8 5.4-5.7 4.3-7.2 3.3-6.2 1.5-6.7 .1-3.3-.2-9.6-1.8-3.3-1.5-2.4-1.9-8.6-8.9-5.3-3.9-3.3-.1-2.9 .2-3.3 .8-5.8 0-4.3-1-2.9-1.9 .6-.6 3.8-1.3 10.5-2.5 4.3 .9 1.4-.1 2.2-1.7 .5-1.4-.3-1.5-1.2-1.4-2.2-1.4-1.2-1.9-.6-12 .4-3.3 .5-.5 2.9 3.8 2.4 4.8 1.9 5.7 .7 5.8 .7 2.8 2.1 2.4 2.7 5.5 3.8 4.3 2.9 2.2 3.3 1 3.4-.4 6.2-3 7.1-4.5 7.3-5.6 6.6-5.9 5.9-6.5 3.7-5.3 1.7-4.2 .1-2.9z",
17134
+ "light": "M55.6 22.8l1.9-.3 1.5 .3 .6 1 .1 .9-2 4.3-3.8 5.3-5.8 6.2-5.4 4.4-4.8 2.3-1.4 0-1.2-.5-.8-1.9 .5-3.3 2.5-4.8 3.3-4.3 2.4-2.4 5.3-3.9zM19.3 28.1l-1.4 2 .3-1.1zM21.7 49.1l.6 .5-.3 .5-.8 0zM35.8 52l1.2-.4 .9 .7 .7 1.6-.4 .9-1.2 .1-2.6-.5zM7.2 52.9l-2.9 2.9 1.2-1.6z",
17135
+ "eyes": [
17136
+ [
17137
+ 72.5,
17138
+ 48.4,
17139
+ 9.3,
17140
+ 23,
17141
+ -15.8
17142
+ ],
17143
+ [
17144
+ 85.6,
17145
+ 43.4,
17146
+ 7,
17147
+ 22.9,
17148
+ -21.2
17149
+ ]
17150
+ ]
17151
+ },
17152
+ "star": {
17153
+ "label": "Star",
17154
+ "body": "M40.1 4.4l1.5-.4 1.9 .1 5.2 1.1 1.9 .9 13.2 14.9 17.1-.8 5.2 1.1 1.8 .9 1.7 1.6 .7 2.4-.4 1.9-9.7 23.6 5.6 23.7 .1 1.9-.6 1.4-2.1 1.8-2.3 .5-19.9-1.8-16.6 15.5-1.9 1-1.9 .3-7-1.5-2.6-2.1-.9-2.4-2.8-24.1-16-13.6-1.1-1.5-.5-1.9 .4-1.9 1.2-1.5 18.9-13.6 7.1-24.6 1-1.7z",
17155
+ "shade": "M52 7.7l14.3 16.1 1 2.9 .3 3.1 19.4-1.3 2-1.4 .7-2.3-.4-1 .5 .5 .5 1.9-.4 1.9-9.8 23.2 5.5 23.1 .1 3.4-2 2.4-2.8 .8-19.4-2.1-1.9 1.4-14.7 14-2.4 1.4-3.3 .1-4.7-1-2-1 .6-.2 3.3 .8 2.8 .1 5.1-2.1 .7-.9 .4-2.4-2.6-22.7-.3-.3-1.4 .2-1.4 .7-5.7 .7-5.6-1.2-16.7-13.8 1-.1 5.2 1 3.8-1.1 1-.7 1.9-.4 .4-.4 1.5 .3 .4-.4 1 .2 18-12.8 6.7-23.5 0-1.8-.4-.5-.3-1.9 .4-2.4z",
17156
+ "light": "M40.1 4.4l2-.1 4.7 1 .7 1-.5 1.4-2.8 1.5-6.6 23.1 .7 1.2 .6 .3-18.1 12.5-1.8 2.1-3.4 .7-5.2-1.2-.3-.4 .3-.9 1.4-1.4 18.3-12.9 .9-2.3 6.4-22.7 .8-1.4z",
17157
+ "eyes": [
17158
+ [
17159
+ 53.9,
17160
+ 53.4,
17161
+ 7.2,
17162
+ 18.8,
17163
+ -10
17164
+ ],
17165
+ [
17166
+ 65.1,
17167
+ 49.2,
17168
+ 7.2,
17169
+ 18.8,
17170
+ -10
17171
+ ]
17172
+ ]
17173
+ },
17174
+ "moon": {
17175
+ "label": "Moon",
17176
+ "body": "M45.8 4.2l4.7-.2 4.2 .4 10.2 2.4 3.7 1.6 3.6 2.1 3.3 2.5 3 3.1 4.6 6.7 3.4 8.3 1.5 8.8 .1 4.6-.8 7.8-2.6 8.8-3.9 7.7-5.1 6.7-6.1 5.3-4.1 2.6-3.6 1.6-27.2 10.2-2.8 .7-2.6 0-5.7-1.3-2-.8-1.9-1.7-1.1-2.6-6.5-37.7-.2-5.2 .8-7.7 1.3-5.2 3.1-7.8 4.2-6.7 3-3.6 3.9-3.6 6.3-4.2 4.1-1.8z",
17177
+ "paints": [
17178
+ [
17179
+ "M57.6 9.9l.2-.3 .2 .3 2 4.7 1.9 1.9 2.6 .5 1.5-.7 1.1-1.1 .4 .4-.1 1.6-.7 1.5-2.2 2.5-1.6 .7-2 0-1.6-.8-1.3-1.4-.8-2-.4-2.6 .1-3.1z",
17180
+ "#1783FF",
17181
+ 1
17182
+ ]
17183
+ ],
17184
+ "shade": "M74.3 13.5l2.1 1.5 .3-.4-.3-.6 2.1 2.1 4.6 6.7 3.1 7.4 1.5 7.6 .1 10.4-.6 4.6-2.5 8.3-4.2 8.2-3.1 4.2-5.7 5.7-6.2 4.2-4.6 2-28 10.3-4.1 0-5.2-1.1-2-.9-.5-.7 .5 .5 1.5 0 3.6 1 2.6-.3 5.7-2.1 2.1-2.1-5.4-31.5-.2-4.1 .4-1.1-.1-2.6 .5-3.6 1.8-7.7 2.8-6.7 1.9-3.1 3.9-5.2 3.2-3.1 2.5-2 5.2-2.9 3.1-1.1 3.1-.8 2.1 0 .5-.4 2.6 .2 1-.3 1.6 .4 1-.5 2.1 .8 1-.8 2.1 1.2z",
17185
+ "light": "M38 6.3l1.7-.3 2.5 .2 .6 .4 1.5 0 .5 .5 1.6 .3-3.1 1.3 .4 .7-2.5 1.6-.5 1-2.5 2.1-2.7 2.9-6.2 7.9-1.5 2.7-1 .9-1.2 2.6-1.4 1-1.3 3.7-1.3 .3-6-1.4-1 3.6-.8 0 .9-3.6-.5-1 1.1-3.6 2.7-5.7 4.1-6.2 5.7-5.8 3.1-2.4 3.6-2.2z",
17186
+ "eyes": [
17187
+ [
17188
+ 51.6,
17189
+ 48.5,
17190
+ 8.4,
17191
+ 22.1,
17192
+ -10
17193
+ ],
17194
+ [
17195
+ 66.8,
17196
+ 42.9,
17197
+ 8.4,
17198
+ 22.1,
17199
+ -10
17200
+ ]
17201
+ ]
17202
+ },
17203
+ "wave": {
17204
+ "label": "Wave",
17205
+ "body": "M46.1 4l6.1 .3 9.6 2.1 4.5 1.8 4.1 2.4 3.5 2.8 4.4 4.8 2.6 4 2.1 4.1 2.2 6 4.8 26 .5 5.3-.3 4.1-1.2 3.8-1.5 2.8-2.4 2.5-2.1 1.4-3.1 1-3 .3-8.1-1.5-3.2 5.3-2.1 2.1-2.5 1.5-2.8 1-3 .4-9.1-1.6-2.7 4.2-3.4 3.1-4 1.7-4.6 .1-7-1.5-3.5-1.9-3.4-3.5-2.1-4-1.5-5.6-3.7-20.7-.6-5.6-.1-5 .5-6.1 2.3-9.6 2.3-5.5 2.7-4.9 2.7-3.7 3.2-3.6 4.2-3.6 4.7-2.9 4.4-2 4-1.2z",
17206
+ "paints": [
17207
+ [
17208
+ "M61.6 48.5l2.2-.3 2 1.1 1.1 2.2 .3 3-.6 3.1-1.5 3.5-2.5 4.1-2.4 2.8-5-2.2-3-2.2-2.3-3-.7-3.5 .6-2.6 1.8-2.1 1.6-.7 1.5 0 1.5 .6 1.5 1.3 2-3.6z",
17209
+ "#fff",
17210
+ 0.4
17211
+ ]
17212
+ ],
17213
+ "shade": "M69.3 13.6l2.6 1.3 .5-.3 .5-1.3 2 1.7 .5 0 2.5 2.7 3.5 5.5 3.6 8.6 1.5 6.6 3.5 19.7 .5 5.5-.4 4.6-2 5-1 1.6-2.6 2.5-3 1.5-2.1 .5-4 0-6.6-1.4-1.4 2.9-1.9 2.5-2.7 2.6-3.1 1.5-2.5 .6-4 .1-7.1-1.5-1.5 2.8-2.6 3-2 1.6-3 1.4-4.5 .6-7.1-1.5-3.6-1.5-3.5-3.1 6.6 1.5 2.8-.5 .5-.5-.3-.5 3.2-2-.4-1 1.4-1.5-.3-1 .7-1.6-.2-2.5-3.4-19.2 .3-.5-.6-5 .5-.5-.1-4.6 .4-.5 .3-4 1-4.1 1.5-4.5 3.8-7.7 5.5-6.9 3.1-2.6 6.5-3.9 7.6-2.2 3.1 0 .5-.4 3 .5 1-.5 2.5 1z",
17214
+ "light": "M36.5 6.1l2-.3 .5 .6 4.1 .5 1 .7-3.3 1.5-.3 1.2-3 2-.3 .8-2.8 2.6-3.5 4-3.9 5-2 3.6-1 .5-1.7 4-1.5 .5-1.4 4.6-1.6 .2-.5-.4-5.6-.9-.4-.4 1.4-5.1 1.5-3.5 2.6-5.1 4-5.5 6.6-6.2 4-2.5z",
17215
+ "eyes": [
17216
+ [
17217
+ 47.5,
17218
+ 37.2,
17219
+ 8.4,
17220
+ 22.1,
17221
+ -10
17222
+ ],
17223
+ [
17224
+ 61.6,
17225
+ 31.9,
17226
+ 8.4,
17227
+ 22.1,
17228
+ -10
17229
+ ]
17230
+ ]
17231
+ },
17232
+ "squircle": {
17233
+ "label": "Squircle",
17234
+ "body": "M54.5 4.2l3.9-.2 3.7 .3 11.6 2.7 3.1 1.6 2.8 1.9 2.6 2.7 2.2 3.1 2.4 4.8 1.9 5.8 3.7 19.4 .8 11.1-.4 4.7-1 4.7-1.3 3.5-1.8 3.4-4.8 5.8-6.4 4.7-8 4-14.2 5.3-9.5 2.2-7.4 .1-10.5-2.2-5.3-2.5-4.3-3.7-3.3-4.8-2.7-6.3-2.4-9.5-2.8-17.9-.2-7.8 1.3-7.9 2.2-5.3 2.8-4.2 4.1-4.2 4.3-3.1 6.3-3.4 11.6-4.6 7.9-2.7z",
17235
+ "shade": "M80.5 11.6l2.1 2.1 2.1 3.2 3.2 7.3 2.1 8.4 2.7 15.8 .5 7.9-.6 7.4-2 6.3-3.8 6.3-4.2 4.3-2.6 2-6.9 3.8-15.2 6.2-9.5 2.7-6.8 .6-6.2-.7-8.5-2-5.8-3.2-3.2-3.3 .5 .4 1.1-.2 5.8 1.4 2.1-.8 1.4-.7-.3-.5 1.4-1.1-.1-1 .8-.5 0-1.1 1.1-1 .1-2.1 .4-.6-.2-3.6-2.4-17.9-.2-9.5 .8-5.3 1.1-3.6 1.2-2.7 2.2-3.5 2.7-2.8 3.1-2.5 5.8-3.2 17.9-6.9 5.3-1.4 8.4-1.4 1.6-1.1 .5 .1 .9-1.5z",
17236
+ "light": "M39.4 8.4l1.2 0-1.6 .7-1-.1 1-.1zM36.8 9.5l1 0 .6 .9 4.2 .6 .7 .6-3.8-.4-.3 .4 1.9 .3 .1 .7-3.2 1.6-6.9 5.8-5.3 6-4.7 6.1-3.8 3.7-.2 .5-1.8 .1-6.8-1.7 .4-3.6 2.1-4.2 2.2-3.2 4.2-4.3 4.2-3 3.1-1.8 5.3-2.5zM35.1 10.5l1.7 0-.5 .4zM36.5 11.1l.3-.5 2.2 .1 .4 .4-.4 .3z",
17237
+ "eyes": [
17238
+ [
17239
+ 52.6,
17240
+ 52.4,
17241
+ 8.4,
17242
+ 22.1,
17243
+ -10
17244
+ ],
17245
+ [
17246
+ 67.3,
17247
+ 46.9,
17248
+ 8.4,
17249
+ 22.1,
17250
+ -10
17251
+ ]
17252
+ ]
17253
+ },
17254
+ "zed": {
17255
+ "label": "Bull",
17256
+ "body": "M77 4.4l1.1-.4 1.1 .2 1.2 1.3 2 9.8 2.2 5.9 .4 2.8-.3 2.1-.8 1.7-4.7 5.1-1.3 1.9-.4 1.7 .1 1.6 1 1.7 4.4 .2 3.8 1.3 2 1.7 .6 1.6-.3 1.7-.7 1.1-3.5 2.7 1.7 6 .4 5.9-.8 6.6-1.9 6-3.4 5.9-4.4 5.3-5.5 4.4-6 3.1-6.5 2-7.1 .7-6.5-.7-6.5-2.1-6-3.4-4.8-4.4-3.5-4.9-3.1-6.7-3.3 1.1-2.7 .3-2-.6-1.1-1.1-.3-2.2 .9-2.7 2.9-3.8 4.6-3.8 1.8-7.1-6.3-1.8-1.6-1.3-1.3-1.8-.6-2.7 0-6.6-1.4-8.7 .2-1.1 1.5-1.4 1.1-.1 1 .5 5.5 7.9 2.2 2.2 2.7 1.4 4.9 .4 .5-.1 6.5-5.1 6.6-3.2 6-1.6 8.7-.7 3.8-.9 2.7-1.5 3.9-3.2 3-3.8 2.4-4.9 2.1-10z",
17257
+ "paints": [
17258
+ [
17259
+ "M61 36.5l1.9 .7 1.4 2-.7 5.4 .3 .4 2.8-1.2 1.1 0 1 .9 .5 1.6-.5 .8-1 .5-7.1 2.4-1.1-.5-.9-1.6 1.4-5.4-.5-.6-3.3 1.1-1.1-.1-1.6-1-1-1.6 .5-.9z",
17260
+ "#fff",
17261
+ 1
17262
+ ]
17263
+ ],
17264
+ "shade": "M80.2 5.5l.6 1.6 1.3 8.2 2.5 6 .2 3.7-.1 1.1-1.2 2.2-5.2 5.4-1.1 3.3 .9 2.7 3.8 3.9 1.6 .1 4.4-1.4 1.2 1.2 .1 1.1-.2 1.7-.6 1.1-3.6 2.7 .9 2.2 1.1 5.4 .1 6-1.1 6.5-2.3 6-3.8 6-6 6-4.9 3.3-5.9 2.6-7.1 1.7-7.1 .1-6-1.1-5.9-2.3-4.4-2.7-4.4-4.5 3.8 .4 5.5-1.5 7.6-3.9 6.8-4.7 7.9-6.5 7.1-6.9 5.4-6.5 4.4-6.7 1.8-4.4 .4-3.2-.3-1.1-3.3-3.8-.8-2.8 .8-2.7 6.2-7 .8-2.2-.1-2.7-1.7-4.4-.8-8.2zM14.9 29.9l.1-.5 4 6.5 2.3 2.7-1.4 .1-2-.6-3.6-7.1zM24.3 44.6l1-.3 1.1 .2 3.3 2.9 1.7 .5 .3 1.6-.5 2.2-1 1.6-1.6 1.5-1.6 .7-1.7 .1-3.2-2.2-2.2 0-2.7-.6-2.9-1.6 3.9-1.6 2.2-1.7 2.2-2.3zM21 68.6l.5-.5 1.1 .1 1.1 .5 .8 1 .6 2.7-.1 1.1-.7 1.1-.6 .1-2.2-1.2-2.7 1.1-3.8 .6-2.7-1.2 3.4-1.6z",
17265
+ "light": "M77 4.4l.6-.2 .1 .7-1.2 .8-.1-.8zM74.2 15.8l.6 1.1 .1 2.7-.6 2.2-1 1.6-5.5 5-1.7 .7-3.3 .3 .1-.6 2.1-1.2 4.2-3.6 2.7-3.9zM11.7 28.9l.8 0-.1 .5-1.2 .8-.1-.8zM44.3 32.1l3.1 0 .8 1.1 0 1.1-1.9 4.3-3 4.1-1.7-1.1-2.1-.8-4.4-.6-4.4 .1 5.5-4.4zM22 54.4l.6 0-.3 .6 .2 .5 2.3 2.7 .4 1.7-1 .9-4.8 2.3-7.1 7.8 0-1.8 2.1-3.3 6.4-5.4 1.2-4.3z",
17266
+ "eyes": [
17267
+ [
17268
+ 61.8,
17269
+ 69,
17270
+ 9.5,
17271
+ 22.3,
17272
+ -10.5
17273
+ ],
17274
+ [
17275
+ 78.4,
17276
+ 62.7,
17277
+ 6.9,
17278
+ 22.2,
17279
+ -11.2
17280
+ ]
17281
+ ]
17282
+ },
17283
+ "hex": {
17284
+ "label": "Blossom",
17285
+ "body": "M38.8 4.2l2.6-.1 6 1.3 2 1.3 3 3.3 12-4.5 2-.5 6.5 1.1 2.9 1.6 4.9 6 .8 2 .3 2-.2 2.5-1.9 7-1.3 2.2-1.9 1.8 2.9 1.3 1.8 1.7 10.1 12.5 1.5 3 .1 4-1.8 7-.9 2-2.8 2.7-7.1 2.7-5.2 20-.8 2-1.4 1.9-1.5 1.1-6.5 2.6-3 .2-6.5-1.6-2-1.4-4-4.9-16 5.7-2 .1-4.5-1-3-1.2-5.2-6-1.3-3 0-3.5 2-8.5-10.8-13.4-1.4-3-.3-2 .3-2.5 1.7-6.5 1.8-3 2.2-1.8 5.9-2.2 2.1-.4 2.5 .3 .4-.4-.7-2.5 .1-2.5 4.8-18.5 1-2.5 2.9-2.9z",
17286
+ "shade": "M49.7 7.7l.2-.4 .5 .4 2 2.3 0 .7 1.6 1.5 1 2 .1 1.5-.3 .5 .6 1.3 17.5-6.5 2.5-1.3 1-1.5 4.5 6 .6 1.5 .3 3-1.9 8-1 2-3 3-.3 1 .4 .5-1.7 3 .1 .5-.5 .5 0 .7 5.5-2.2 1.5-1.5 2 2 8 10 1 1.5 1 2.5-.1 4-1.9 7-1.1 1.9-2.9 2.5-6.8 2.5-4.7 19-1.5 3.5-2.5 2.5-6.5 2.6-4 0-5.5-1.4-2.2-1.7-3.2-4 4.9 .8 2.5-1.4 1.5-2.6 .7-2.3 1.7-6.5-.4-.3-.6 .8-.7 3.5-1.1 1.5 .3 .5-.3 .5-.7-.5-1.4-5.5-.5 1-.2 2-.9 1-.1 1.5-1.1 2-2.7 2.8-1 .4-1 .1-15.5 5.8-3-.1-4.5-1-2-1-2-2-2.2-3 .2-.2 4 .9 2-1.1 1.7-1.6 1.3-3.2 1.7-6.3 1.1-2.5-.3-.3-.5 .2-6.5-.3-.5-.5-2 0-.5-.5-1.7-.1-10.4-13.4 4.1 .7 3.1-1.7 1.3-2 2.5-8.5 .9-1.5 1.7-1.3 6.5-2.7 2-1.5-.3-.5 .3-.5 1.5-1.2 1.5-3 5.6-20.3 1.9-2 6-2.4 1.1-.6zM73.2 31.2l1.5 0-.8 1-34 12.7-1 .1-1.5-.5-2 .8-1.9-2.6 .4-.9 2 .5 1.5 1 .5-.4 1 .5 1-.3 1 .4 3-1.5 1 .1 3-1.6 1 .1 3-1.6 1 .1 3-1.6 2.5-.5 1.5-1 2.5-.5 1.5-1 2.5-.5 1.5-1 2.5-.5 1.5-1 1 0zM61.3 74.6l.1-.2 .4 .2-.4 1.7z",
17287
+ "light": "M33.4 6.2l3 .1 1.9 .9-.1 .5-1.8 2.5-3.4 3.5-4.5 17-3.6-.9-1 .4 0-1 4.4-16.5 0-1.5 2.1-3.1zM68.2 6.2l1.2 0zM14.9 37.7l3.5 .9 .4 .6-.3 1-5 5.5-1.1 4.6-2.5-.5-2 .1 0-1.7 1-4.5 1-2.5 2-2.1zM19.4 71.6l4 .7 1.8 .8-1.2 1-1.1 5.1-4.5-.5-.5-.6 1.4-5z",
17288
+ "eyes": [
17289
+ [
17290
+ 49.8,
17291
+ 55.5,
17292
+ 6.7,
17293
+ 17.7,
17294
+ -10
17295
+ ],
17296
+ [
17297
+ 61.6,
17298
+ 51.1,
17299
+ 6.7,
17300
+ 17.7,
17301
+ -10
17302
+ ]
17303
+ ]
17304
+ },
17305
+ "gumdrop": {
17306
+ "body": "M38.7 4.5l4.4-.5 4.6 .8 4.1 1.9 3.7 3.2 23.2 36.6 2.3 5 1.4 5.1 .7 6.4-.7 6.4-1.8 6.1-3.1 5.7-4.1 5.1-5.2 4.2-5.8 3.1-6 1.8-6.4 .6-6.4-.6-6-1.8-5.9-3.1-5.1-4.2-4.1-5.1-3-5.4-1.9-6.4-.7-6 .5-5.9 9-41.6 2-4.1 2.6-3.2 3.4-2.5z",
17307
+ "shade": "M54.9 9.5l1.9 2.3 22.9 36.5 1.8 4.6 .9 3.7 .6 4.1-.1 5.9-1.4 6.4-2.3 5.5-3.7 5.4-4.1 4.2-4.5 3.3-7.3 3.2-6.4 1.2-6.4 0-5.1-.9-5.9-2.1-5.5-3.3-4.6-4.1 .5-.3 4.1 .8 5.5-1 6.4-2.6 7.3-4.5 7.2-5.7 6.5-6.4 5.5-6.9 3.5-5.9-18.1-37 1.1-3.7 .2-2.3z",
17308
+ "light": "M37.1 4.9l2.5 0 .8 1.4-.5 2.1-1.8 2.9-3.2 3.2-3.2 2.1-2.3 .7-1.8-.1-.7-.9 .1-1.8 2.4-4.1 2.7-2.8z",
17309
+ "eyes": [
17310
+ [
17311
+ 52.1,
17312
+ 40.3,
17313
+ 9.7,
17314
+ 22.9,
17315
+ -15.2
17316
+ ],
17317
+ [
17318
+ 64.8,
17319
+ 35.6,
17320
+ 6.3,
17321
+ 23,
17322
+ -27
17323
+ ]
17324
+ ]
17325
+ },
17326
+ "peanut": {
17327
+ "body": "M43.5 4l6.6 .7 5.8 2.2 5.4 3.8 4.1 4.7 2 3.8 1.4 4.3 1.3 11.9 1 4.3 1.6 3.8 5.8 10.5 1.4 3.8 .8 4.3 .1 6.2-1 5.7-2.1 5.5-3.2 4.9-4.1 4.3-4.8 3.4-5.6 2.4-5.7 1.3-6.1 .1-5.8-1.1-5.7-2.2-4.7-3.1-4.3-4.1-3.3-4.8-2.5-5.7-1.2-5.7-.1-6.7 1.7-9 .4-4.3-.5-4.7-2.5-9.6-.6-3.8 .2-5.2 1.2-5.2 1.5-3.4 2.2-3.3 2.5-2.9 2.8-2.3 3.4-2.1 3.4-1.4 3.8-.9z",
17328
+ "shade": "M62.7 12.6l2.6 2.8 2.8 5.8 1.1 4.2 1 11.9 1 3.4 2.3 4.7 4.2 6.7 1.9 4.7 .9 3.8 .2 2.9-.1 6.2-.5 3.3-1.9 5.3-3.4 5.7-3.4 3.8-4.2 3.3-5.7 2.9-4.8 1.4-5.7 .6-6.2-.6-3.8-1-5.2-2.3-4.8-3.4-2.9-2.8 3.9 .8 5.2-.7 6.2-2.5 5.7-3.3 6.7-5.1 6.2-5.9 5.1-6.2 3.5-5.7-1.1-2.8-2.4-2.4-3.2-1.7-11.5-4.1-2.7-1.8-1.6-2.4-.2-2.4 .8-2.9 7.8-8 4.9-7.7 1.6-5.2z",
17329
+ "light": "M35.9 5.4l3.2-.2 1.3 .7 .5 1-.5 3.3-2.9 4.8-4.1 4.1-4.8 3.3-4.2 1.5-1.5 0-1.4-.6-.7-1.2 .2-2.4 1.9-3.8 2.4-3.3 4.3-3.9z",
17330
+ "eyes": [
17331
+ [
17332
+ 50.9,
17333
+ 31.5,
17334
+ 8.7,
17335
+ 20.5,
17336
+ -11.9
17337
+ ],
17338
+ [
17339
+ 64.2,
17340
+ 26.5,
17341
+ 5.7,
17342
+ 20.3,
17343
+ -16.3
17344
+ ]
17345
+ ]
17346
+ },
17347
+ "saucer": {
17348
+ "body": "M45 22.7l6.7 .1 6.7 1.9 4.3 2.5 3.5 3.1 2.8 3.5 2.5 4.5 6.8 .9 5.6 1.2 4.5 1.6 3.5 2.1 2.8 2.8 1.3 3.5-.5 3.5-2 3.5-2.6 2.8-3.5 2.8-4.5 2.8-5.1 2.6-12 4.4-13.6 3.1-13.6 1.5-12.6-.3-5.5-.7-5-1.2-4.1-1.6-3.5-2-2.8-3.1-1.1-3 .5-3.5 2-3.6 2.7-3 3.7-2.9 10.3-5.6 .7-5.1 1.5-4.5 2.6-4.5 3.1-3.5 3-2.4 3.5-2 3.5-1.4z",
17349
+ "shade": "M66.5 31.3l.3-.2 .6 .7 1.9 2.5 2 4.5 1.6 1.5 .1 1.5-1.7 1.7-3 1.2-3.1 .5-3.1-.3 4-8.1 .7-3.5zM94.9 47.4l1.1 3-.5 3.5-2.1 3.5-4 4.1-5 3.5-6.1 3.1-7 2.9-6.6 2.1-8 2-9.1 1.5-6.5 .6-11.6 0-4.5-.2-8-1.4-4.6-1.5-3.6-2.1 4.1 1.2 5.1 .8 7 .3 6-.2 15.1-1.9 15.6-3.6 14.5-5.1 5.4-2.5 5.3-3.1 4-3 2.3-2.5 1.2-2.1zM7.3 71l.7 .5z",
17350
+ "light": "M40.6 23.7l2.8 0 .8 .5 .7 1.5-.8 3.6-2.6 4-3.9 4-4.5 3.2-4.6 1.7-2.5-.4-1-1.4 0-1.6 .9-2.5 2.1-3.5 2.6-3 3-2.6 3.5-2.1zM22.4 47.4l.7 0-.5 .5 0 1.5 .4 .8 2 1.4 3 1.2 9.1 2 15.1 1.1-.2 1.5-2.2 3.6-3 2.5-4.9 2.5-6 2-7.9 1.5-6.5 .5-7.1-.4-4.9-1.1-3-1.5-1.6-1.7-.6-2.3 1.1-3.1 2.9-3.5 4.1-3.5 4.1-2.6z",
17351
+ "eyes": [
17352
+ [
17353
+ 53.6,
17354
+ 45,
17355
+ 7.8,
17356
+ 18.4,
17357
+ -14.5
17358
+ ],
17359
+ [
17360
+ 66.2,
17361
+ 40.3,
17362
+ 5,
17363
+ 18.3,
17364
+ -25.1
17365
+ ]
17366
+ ]
17367
+ },
17368
+ "bunny": {
17369
+ "body": "M49.3 4.4l1.5-.4 2 1.2 1.6 2.7 1.2 3.4 1.6 8.9 .2 6-.2 6.4 .6 3 2.4 2.5 5.4 3 3.4 2.4 5.1 5.5 2.4 3.9 1.7 4 1.1 4.4 .4 4.5-.5 5.9-1.6 5.5-2.8 5.4-3.6 4.5-4.6 3.8-4.9 2.7-5.5 1.7-5.9 .7-6-.5-5.4-1.7-4.9-2.5-4.7-3.7-3.8-4.5-2.7-4.9-1.8-5.5-.7-5.9 .6-6.5 1.9-5.9 3.1-5.4 4.6-5.5-.4-2-3.4-8.4-1.8-6.9-.6-6.9 .3-3 .6-2 1.3-1.4 2-.1 2.5 1.5 2.1 2.5 4 6.9 2.1 5.5 1.7 5.9 1.5 2.1 1.8-1.6 .7-2-.4-12.4 1-8.9 1.6-4.9z",
17370
+ "shade": "M52.7 5.4l2.1 3.5 1.9 7.4 .7 7.9-.5 8.4 .8 3.6-4.4-2.5-2.1-2.6 1.4-17.3zM31.2 15.3l.3-.5 2 2.5 2.9 4.9 2.5 6 1.7 6.4 1.4 2.5 0 .5-1.1 .9-4.5 1.9-2.4 .2-1.2-.6zM71.5 46l3.6 4.4 2.9 6 1.5 6.4 .1 5.5-1.1 6.3-2 5-3.4 5.4-3.5 3.6-4 2.9-6.4 3-4 1-6.9 .5-5.9-1-5.5-2-5.4-3.5-3.6-3.4 2.6 .7 2.5 .1 2.9-.5 4-1.3 8.4-4.6 8.7-6.8 7.4-7.9 5.3-7.9 1.3-3 1-3.5 .2-2.9-.2-2z",
17371
+ "light": "M49.3 4.4l.6 0-3.6 6.2 1-3.7zM26 13.3l.5-.4 .2 .4-1.7 2.2 0-.7zM44.8 34.6l.5-.1 1.2 1.1 .8 1 0 .7-.5 .3-4-.5zM45.1 42.5l.8 0-.3 1-2.4 4.5-3.8 4.4-4.1 3.5-3.8 2.4-4 1.6-2.9 .1-1.8-1.1-.4-2.5 1.1-3.5 3.5-5.4 3-3.1 .2 1.6 .8 .8 3 .1 4.4-1.2z",
17372
+ "eyes": [
17373
+ [
17374
+ 59.2,
17375
+ 69.2,
17376
+ 8.2,
17377
+ 19.3,
17378
+ -12
17379
+ ],
17380
+ [
17381
+ 72.9,
17382
+ 64,
17383
+ 5.6,
17384
+ 19.1,
17385
+ -15.4
17386
+ ]
17387
+ ]
17388
+ },
17389
+ "kitty": {
17390
+ "body": "M62.4 4.2l1.6-.1 1.5 1.2 7.4 21.3 3.7 6.4 6.2 7.4 3.1 5.9 1.5 4.8 .7 5.3-.2 5.4-1.1 5.3-3 7.4-4.4 6.4-5.3 5.4-6.9 4.6-7.5 3.1-8 1.7-8 .2-7.4-1.4-4.3-1.5-3.7-1.8-3.8-2.5-3.1-2.7-2.7-3-2.5-3.7-1.9-3.7-1.4-4.3-.9-5.3 .1-5.8 1.4-7 1.6-4.2 2-3.8 .8-3.2 .2-20.2 1.1-1.4 1.1-.3 1.1 .3 12.2 9.7 5.9-2.5 8-2.1 3.2-1.8 2.3-2.4 8.3-16z",
17391
+ "shade": "M64.9 5.8l.1-.3 .7 .3 6.5 19.7 3.1 5.9 2.5 3.2-1.6-.8-2.6-2.4-5.1-8zM79.4 36.7l2.2 2.1 1.6 2.2 3.3 6.9 1.5 6.9-.1 6.4-1.6 7.5-3.1 6.9-3.8 5.3-5.3 5.4-6.4 4.3-7 3.1-6.3 1.6-4.3 .6-5.3 0-7.5-1.1-5.8-2-5.9-3.3-5.9-5.4 2.7 .7 3.2-.1 3.7-.8 5.2-1.9 10.3-5.5 11-7.8 10.7-9.6 7.8-9.1 3-4.6 1.6-3.4 .7-3.2z",
17392
+ "light": "M62.4 4.2l.5-.1 0 .6-.8 1.1-4.5 14.4 .2 2.7-.3 1.6-1.1 1-2 .6-6.9-.5 2.6-1.3 3.1-3 8.1-16zM18.7 20.7l1.1-.5 0 .8-1.1 .9-.6-.1zM39.5 27.7l2.6-.3 1.9 .8 .4 1.6-.7 1.8-4.2-1.5-5.4 .2 0-.5zM16 47.4l.3 4.2 1.6 2.2 3 2.1-.6 .5-3.7 .6-1.1-.3-1.1-1.1-.4-1.8 .4-2.7z",
17393
+ "eyes": [
17394
+ [
17395
+ 59.6,
17396
+ 65.1,
17397
+ 9.4,
17398
+ 22.6,
17399
+ -11.9
17400
+ ],
17401
+ [
17402
+ 77.5,
17403
+ 58.4,
17404
+ 7,
17405
+ 22.5,
17406
+ -14
17407
+ ]
17408
+ ]
17409
+ },
17410
+ "beacon": {
17411
+ "body": "M40 4.1l2.7 0 2.5 .9 2 1.7 1.1 2.1 .5 2-.2 2.1-2.1 4.1-.4 1.6 1.5 7.7 9-3.1 4.1-.2 18.5 4 3.1 1.6 2.4 2.3 1.3 2.1 .9 2.6 5.8 33.4-.4 3.1-1.3 3.1-2 2.5-2.6 1.9-41.7 15.7-4.1 .7-19.6-4-3.5-1.9-2.5-2.5-1.2-2.1-.8-2.6-5.7-32.9 .4-3.1 1-2.7 1.7-2.5 2.4-1.9 28.4-10.9-1.5-9.3-.7-1-3.5-3.3-.9-1.9-.4-2 .5-2.6 1.1-2.1 1.7-1.5z",
17412
+ "shade": "M47.1 7.2l.4 0 .8 1.6 .3 2-.2 2.6-2.5 4.7 1.5 8.2 0 2 .5 .6 .1 1.5 .5 1-1.2 .4-1.3-.4-.3-.5-1.9-10.3-4.1-1.5-3.2-2.6 3.1-.9 3.2-2.2 2.5-2.6zM84.2 30.9l1.2 1.1 1.5 3.6 5.7 32.4 0 2.6-1 3.6-1 1.5-3.1 3.2-4.2 1.9-40.6 15-4.2 0-16.4-3.6-3.6-1.4-2.6-2.2 .5 .4 17.5 3.4 3.8-1.2 5-3.4 1-1.3-5.4-30.3 .2-.6 3.1-3.4 40.2-15.1 2-3.6z",
17413
+ "light": "M38.5 4.7l2 0-.1 1-.8 1.4-2.6 2.2-1 .4-1.1-.1-.1-.8 .7-1.6 1.5-1.6zM55 23.7l1.1 .1-1.6 .6-.9-.2 .9 0zM52.4 24.7l1 0-3 1.2-.9-.1 2.4-.6zM48.3 26.3l1 0-1.5 .6zM40 29.4l1.1 0-3.1 1.2-.9-.2 2.5-.5zM35.9 30.9l1 0-3 1.2-.9-.1 2.5-.6zM31.8 32.5l1 0-3 1.2-.9-.2 2.4-.5zM40.2 33l.4-.4 1-.1 1.6 .8 3 .7-1.5 .5-4.1 0-.9-1zM27.7 34l1 0-3 1.2-1-.2 2.5-.5zM23.6 35.6l1 0-3 1.1-1-.1 2.5-.5zM19.4 37.1l1 0-2.4 .8-.5 .7 15.4 3.3 .5 .3 .3 1.1-1.1 2.6-3.3 3.3-3.1 1.5-17.5-3.6-.6-1.2 .5-1.6 3.2-3.7 2.1-1.4 2.5-1.1 1 0 .6-.5 1 0z",
17414
+ "eyes": [
17415
+ [
17416
+ 55.5,
17417
+ 65.3,
17418
+ 8.4,
17419
+ 22.1,
17420
+ -10
17421
+ ],
17422
+ [
17423
+ 74.2,
17424
+ 58.3,
17425
+ 8.4,
17426
+ 22.1,
17427
+ -10
17428
+ ]
17429
+ ]
17430
+ },
17431
+ "plus": {
17432
+ "body": "M44.6 4.3l3.3-.1 11.9 2.5 2.5 1.3 1.3 1.4 .7 1.6 2.1 11.4 4.1-1.2 2.1 0 12.3 2.6 2.8 1.6 1.2 1.5 .7 1.5 3.8 21.6-.5 3.1-1 1.5-1.3 1.3-17 6.6 3.4 20.4-.4 2.5-1.2 2.1-2.3 1.6-19 6.9-2-.2-11.9-2.5-2.5-1.3-1.3-1.4-.7-1.6-2.1-11.4-4.1 1.2-2.1 0-12.3-2.6-2.8-1.6-1.2-1.5-.7-1.5-3.8-21.6 .5-3.1 1-1.5 1.3-1.3 17-6.6-3.4-20.4 .2-2 1.1-2.2 2.6-2z",
17433
+ "shade": "M63.2 9.4l.7 .6 .5 1.5 2.1 13.3 .6 .6 0 2.5 .5 .5 .1 2.6 .5 .5 .1 2.1-.8 3.1 19-7.1 1-1.2 1-2.1 1.1 2.1 .4 2.6 3.2 18 0 3.1-1 2-2.2 2.1-15.9 5.8-.8 .8 3.6 19.5-.1 2.6-1.5 2.6-2.2 1.6-16.4 6.1-2.1 .6-2.5 0-12.4-2.7-2.2-1.5 12.5 2.5 2.4-1 2.7-2-3.9-22.1-3.8 3.5-1 .4-2.6 .5-1.5 1-2.6 .5-1.5 1-2.6 .4-1.5 1-4.6 1.5-2.5 0-11.9-2.6-2.7-1.6 12.4 2.3 2.6-.9 2.4-1.9-3.4-20.5 .3-.5 1.7-1.8 18.6-6.9 .3-.6-.7-1-3.8-22.1 2.1-2.1 16.4-6.1 .6-.5z",
17434
+ "light": "M28.4 10.5l1.1 .5 10.2 2.1 .5 .4-.1 1.1-1.9 2.3-2.1 1-12.3-2.5-.1-1.3 1-1.6 1.2-1zM11.4 43.3l11.4 2.2 1 .6 0 .8-1.5 2.3-2.6 1.4-12.3-2.6-.2-1.1 .6-1 2.2-2.1z",
17435
+ "eyes": [
17436
+ [
17437
+ 54.5,
17438
+ 53.1,
17439
+ 6.1,
17440
+ 15.9,
17441
+ -10
17442
+ ],
17443
+ [
17444
+ 64.5,
17445
+ 49.4,
17446
+ 6.1,
17447
+ 15.9,
17448
+ -10
17449
+ ]
17450
+ ]
17451
+ },
17452
+ "magnet": {
17453
+ "body": "M71.9 4.2l1.2-.2 12.1 2.6 .5 .3 .6 1 6.2 35.6 .6 5.8-.1 5.7-.7 5.8-1.5 5.7-2.2 5.8-4.2 7.3-5.5 6.5-6.5 5-7.1 3.4-6.3 1.3-6.3 0-15.2-3.1-5.2-1.8-5.2-3-4.6-4.1-4-5.2-2.9-5.8-2.4-7.8-6.4-36.2 25-9.5 13.1 2.9 .5 .9 6.3 35.3 1.8-3.9 .5-4.7-6.3-36.1 .4-.6z",
17454
+ "shade": "M86.2 9.5l.5 1 5.8 33 .6 4.7 0 5.2-.6 5.8-2.1 8.4-3.1 7.3-3.7 5.8-6.3 6.8-5.7 4.1-5.8 2.7-6.8 1.5-6.3 0-15.2-3.1-5.7-2-5.2-3.2-5.9-5.8 .1-.7 11.5 2.5 .3-3.4-1.9-13.6-5.7-32.4 1-.1 18.3-6.9 .9-.9 .4-1 6.1 35 1.6 2.1 .1 .6 4 4.7 3.2 1.1 3.6-.6 3.2-1.9 2.4-2.8 1.9-4.2 .6-3.7-6.4-36.6 19.3-7.1 .8-.8z",
17455
+ "light": "M53.6 54.5l.7-.4 12 2.8 .6 1.8-.6 2.1-2.1 2.4-2.6 1-1.5 0-6.3-1.4-1.6-2.6-.2-2.1z",
17456
+ "eyes": [
17457
+ [
17458
+ 59.6,
17459
+ 82.1,
17460
+ 6.1,
17461
+ 15.9,
17462
+ -10
17463
+ ],
17464
+ [
17465
+ 72,
17466
+ 77.5,
17467
+ 6.1,
17468
+ 15.9,
17469
+ -10
17470
+ ]
17471
+ ]
17472
+ },
17473
+ "acorn": {
17474
+ "body": "M47.6 4l2.1 .6 1.3 1.5 .4 1.5-.4 5.2 .3 .3 8.8-.1 7.7 1 7.3 2.1 5.7 2.9 3.6 2.9 2.6 3 1.8 3.4 .9 3.7 0 4.1-1 3.6-1.7 2.2-3.9 3 2.9 8.3 .9 8.3-.9 8.3-2.7 7.7-4.2 6.8-2.9 3.1-3.2 2.6-6.7 3.8-3.7 1.2-4.1 .8-7.2 0-7.3-1.7-7-3.6-5.9-5.1-4.8-6.3-3.3-7.3-1.8-7.7-.1-8.3-4.5-1.5-2.6-1.7-2.6-4.1-1.1-4.1 0-4.2 1.2-4.1 2.2-4.1 2.8-3.7 5.2-4.6 6.3-3.8 7.2-3.2 8.3-2.3 .9-8.3 1.2-1.4z",
17475
+ "shade": "M50.6 6.1l.1-.5 .6 2-.6 5.7 .2 2.1-1.2 .2-1.2-.7 .5-6.8zM85.8 23.7l1.7 2 1.6 3.7 .6 2.6-.1 4.1-.5 2.6-1.1 2.1-2.1 2-2.9 2.1 1.4 3.1 1.6 5.2 .9 8.8-.5 5.7-1.4 5.7-2.2 5.1-2.6 4.2-5.1 5.7-5.2 3.6-4.7 2.2-6.2 1.5-7.7 .1-5.7-1.2-6.8-3-4.6-3.2-4.2-4.2 2.1 1 2.1 .3 3.1-.3 3.1-.9 6.4-3.1 6.5-4.6 6.6-5.8 5.9-6.4 5.6-7.9 4-7.4-2.4 .4-.5 .5-1.1 0-.5 .5-1 0-.5 .5-1.1 0-.5 .5-1 0-.5 .6-1.6-.1-.5 .5-1.6 0-.5 .5-3.6 .5-.5 .5-2.1-.1-.5 .6-2.1-.1-.5 .7-3.1-.2-.5 .5-3.1 0-.5 .7-4.7-.2-.5 .7-15.6-.3 0-.3 8.3-.6 11.4-2.4 11.4-3.8 10.5-4.8 9.2-5.7 6-5.2 2.2-2.6 1.6-2.9 .5-1.7z",
17476
+ "light": "M46 4.5l1.1-.1 0 .6-1.5 1.6-1.1 .2-.1-.7zM38.5 15.9l5 0 3.3 1.6 1.6 3.1 .1 3.1-.9 3.1-1.9 3.1-3.2 3.6-4 3.1-3.6 2.1-8.5 3.2-4.1 .7-4.2 .1-3.1-.5-2.6-1.5-1.1-2 .1-2.1 .5-1.5 2.1-3.7 4.1-4.6 3.7-3.1 5.1-3.2 6.3-3z",
17477
+ "eyes": [
17478
+ [
17479
+ 63.6,
17480
+ 63.3,
17481
+ 9.6,
17482
+ 22.7,
17483
+ -11.9
17484
+ ],
17485
+ [
17486
+ 79.5,
17487
+ 57.3,
17488
+ 6.5,
17489
+ 22.5,
17490
+ -15.5
17491
+ ]
17492
+ ]
17493
+ },
17494
+ "pebbles": {
17495
+ "body": "M47.3 4.5l2.7-.4 2.7 .1 13.7 3 4.3 2.1 3.3 3.4 1.3 2.2 1 2.8 2 12-.5 4.3-3.1 7.7 .2 .5 8.4 1.9 2.7 1 3.3 2.1 2.7 2.8 2.4 4.3 1.4 6.5 .1 4.4-.8 3.8-1.3 2.7-2 2.8-2.4 2.2-2.7 1.6-45.5 17-3.3 .6-3.2-.2-19.2-4.2-4.9-2.8-3.4-3.8-1.9-4.4-1.3-7.7 .2-3.2 .8-2.8 1.3-2.7 2-2.7 3.2-2.8 7.9-3.8 2.5-2.2-.4-1.6-5.4-6.1-1.8-3.8-2.3-12.5 .2-3.3 .7-2.7 2.6-4.4 2.2-2 2.2-1.4z",
17496
+ "shade": "M73.2 12.2l.4 0 1.5 2.2 1.2 3.3 1.8 11.4-.2 4.4-3.3 7.6 0 1.1 .6 1.1-1.2 1.3-26.8 10.1-3.2 .5-5.8-.4-15.2-3.3-1.4-.5-3.5-3.8 .2-.3 1.6 .2 10.9 2.2 2.8-.5 4.4-2.2 5-3.8 .1-.6-1.5-8.7 4-4.5 24.2-9.2 2.4-3.8zM90.9 48.8l2.8 3.8 1 2.8 1.2 6 0 4.3-1.1 3.9-1.7 3.2-3.8 3.9-2.7 1.7-42.1 15.8-5.5 1.6-3.8 0-18-3.8-4.9-2.1-3.4-2.9 17.6 3.8 2.7-.2 3.3-1.2 4.3-2.6 4.4-3.6-.4-3.8 4.4-4.9 42.5-16 2.1-3.1 1.1-2.8 .5-3.3z",
17497
+ "light": "M45.6 5.1l1.5 0-.4 .2-22.9 8.5 11.4 2.5 .6 .8 0 1.6-1.5 2.8-1.9 2.2-2.8 2.1-3.1 1.2-13.2-2.8-.1-2.2 1.2-2.2 1.7-2.2 2.7-2.2 2.2-1.1 2.2-.5 .5-.5 2.8-.6 1.6-1.1 2.7-.5 1.7-1.1 2.7-.6 1.6-1 2.8-.6 1.6-1.1 2.8-.5zM21.6 53.2l15.8 3.6 1.2 .7-.1 .9-.8 .8-3.1 1.6-1.3 3.8-3 3.8-3.3 2.5-3.3 1.4-18-3.6-.6-1.3 .6-2.2 1.6-2.7 1.7-1.8 3.8-2.8 5.5-2.2z",
17498
+ "eyes": [
17499
+ [
17500
+ 51.2,
17501
+ 34.1,
17502
+ 6.9,
17503
+ 18.1,
17504
+ -10
17505
+ ],
17506
+ [
17507
+ 66.4,
17508
+ 28.4,
17509
+ 6.9,
17510
+ 18.1,
17511
+ -10
17512
+ ]
17513
+ ]
17514
+ },
17515
+ "cushion": {
17516
+ "body": "M64.2 4.4l3.3-.4 2.8 .2 3.9 .8 2.8 1.1 2.7 1.7 2.4 2.1 1.9 2.4 1.5 2.8 1.2 3.9 7.1 40.6-.1 5-1.4 4.5-1.6 2.9-1.9 2.2-2.2 1.9-2.8 1.7-45.6 17.1-3.4 .9-3.4 .2-4.5-.7-3.4-1.2-3.3-2-2.9-2.7-2.3-3.4-1.5-3.9-7.3-41.7 .1-5 1.4-4.5 1.6-2.9 1.9-2.2 2.2-1.9 2.8-1.7z",
17517
+ "shade": "M82.1 10l2.9 4 1.6 4.5 7.3 42.2-.5 5.1-1.1 3.3-1.7 2.9-4.6 4.5-3.3 1.7-46.8 17.4-5.6 .2-4-.7-3.3-1.2-3.4-2.2-1.7-1.8 .6 .4 3.3 .2 4.5-1.2 5.1-2.8 5.3-4.4-6.9-39.4 5-5.7 43.9-16.4 2.3-3.6 1.1-2.8 .5-3.6z",
17518
+ "light": "M62.3 4.9l1.8 .1-43.4 16.1 1.1 .4 .8 .9 .1 1.7-1.6 3.4-2.6 3-3.4 2.7-3.4 1.5-3.4-.2-.8-.8-.2-1.2 .4-1.6 1.7-2.9 3.4-3.5 2.3-1.6 3.4-1.6 5.6-1.8 .6-.5 1.1 0 .5-.6 2.3-.5 .6-.6 1.1 0 .6-.6 2.2-.5 .6-.6 1.1 0 .6-.6 2.2-.5 .6-.6 1.1 0 .6-.5 2.2-.6 .6-.6 1.1 0 .6-.5 2.2-.6 .6-.5 1.1-.1 .6-.5 2.2-.6 .6-.5 1.1-.1 .6-.5 2.2-.6 .6-.5 1.1 0 .6-.6 2.2-.6 .6-.5 1.1 0z",
17519
+ "eyes": [
17520
+ [
17521
+ 51.1,
17522
+ 57.2,
17523
+ 8.4,
17524
+ 22.1,
17525
+ -10
17526
+ ],
17527
+ [
17528
+ 69.9,
17529
+ 50.1,
17530
+ 8.4,
17531
+ 22.1,
17532
+ -10
17533
+ ]
17534
+ ]
17535
+ },
17536
+ "ring": {
17537
+ "body": "M48.1 4.3l8-.1 7.8 1.8 7.3 3.5 6.7 5.4 5.2 6.7 4.1 8.3 2.3 8.9 .7 9-1 9.5-2.5 8.9-4.1 8.3-5.3 7.3-6.6 6.1-7.3 4.5-7.8 2.7-8.4 .9-7.2-.8-7.3-2.5-6.7-4.1-5.6-5.3-4.5-6.5-3.5-7.8-2-8.4-.6-8.4 .9-8.9 2.2-8.4 3.5-7.8 4.9-7.2 5.8-6.1 6.3-4.5 7.1-3.3zM50.5 33.8l2.3-.3 1.7 .4 1.6 1.1 2 2.2 1.3 2.8 .8 2.7 .4 3.4-.1 3.3-1.4 6.2-3 5.6-2.2 2.4-2.2 1.6-2.3 1-2.2 .3-1.7-.4-1.6-1.1-2.8-3.7-1.5-5.2-.1-5.5 1.2-5.6 2.4-5 3.6-4z",
17538
+ "shade": "M76.2 14.9l1.1-.5 3.4 3.8 2.8 3.9 2.3 4.5 1.6 3.9 1.6 5.6 1.1 8.3-.4 10.1-1.3 6.1-2.6 7.8-4.6 8.3-4.4 5.6-6.2 5.7-6.1 3.8-7.2 2.9-6.2 1.1-7.8-.1-7.2-1.7-3.9-1.6-4-2.2-5.5-4.5-2.8-3.4 1.7-.6 2.4-2.1 2-2.8 1.2-2.8 1.2-5 1.1-13.4 1.4-7.8 2.5-7.8 3.8-7.3 3.3-4.5 3.4-3.4 3.9-3.1 4.4-2.6 3.9-1.5 4.5-1.1 12.3-.9zM50.5 33.8l.6-.3 2.8 0 1.6 .9 2.7 2.8 3 1.4 3.3 .5 6.1 .2 3.9 .9 1.7 1 1.7 1.6 2.1 4.4 .7 4.5-.3 5-1.2 5-1.9 4.5-2.8 4.2-3.3 3.6-3.9 2.8-3.9 1.7-3.4 .6-3.3-.1-3.4-1.1-2.5-1.7-2.5-3-3.6-7-2.9-3.4-2.1-5-.6-5.6 .6-4.4 1-3.4 2.3-4.4 1.4-2.1 2.3-2.2 2.7-1.7z",
17539
+ "light": "M41.1 5.9l.5 .1 .2 .5-.3 .6-12.4 13.3-13.1 18.1-2.3 2.1-1.1 0-.2-1.2 .2-2.8 1.6-5 4.6-8.3 3.9-5.1 4.4-4.4 4.5-3.4 5-2.8zM60.5 53.3l1.2-.3 1.1 .6 1.1 1.3 .8 1.8-.2 3.3-1.5 2.8-2 1.7-2.6 1-7.3 .2 2.2-1.4 2.6-2.6z",
17540
+ "eyes": [
17541
+ [
17542
+ 56.2,
17543
+ 84.6,
17544
+ 5.3,
17545
+ 13.3,
17546
+ -6.8
17547
+ ],
17548
+ [
17549
+ 71.7,
17550
+ 78.8,
17551
+ 5.1,
17552
+ 13.4,
17553
+ -6.5
17554
+ ]
17555
+ ]
17556
+ },
17557
+ "gem": {
17558
+ "body": "M57 9.3l2.9-.4 14.9 3.5 19.6 14.1 1 1.4 .6 1.6-.5 2.6-27.1 56.5-1.6 1.8-2.1 .7-15.9-3.4-42.9-30.7-1.3-1.6-.6-1.6 .5-2.6 12-25.2 1.1-1.5 1.5-1z",
17559
+ "shade": "M75.7 14.6l.1-.4 .6 .2 16.9 12.3 1.1 .7 .5-.2 .5 .7 .6 2.6-.5 1.6-26.4 55.1-1.2 2.1-1.1 1.1-1.6 .6-2.1 0-14.3-3.3-42.8-30.7 1.5-.2 11.6 2.5 2.2-.7 2.8-2.6 11.9-24.9 .6-.8 38.2-14.2z",
17560
+ "light": "M19.1 23.6l1.1-.4 .5 .5 11.7 2.2 1 .9-.2 .5-1.8 2.7-11.7 24.4-1.6 .6-13.3-2.8-.5-.5 12.1-25.4 1.2-1.7z",
17561
+ "eyes": [
17562
+ [
17563
+ 51.4,
17564
+ 42.9,
17565
+ 6.7,
17566
+ 17.7,
17567
+ -10
17568
+ ],
17569
+ [
17570
+ 66.1,
17571
+ 37.4,
17572
+ 6.7,
17573
+ 17.7,
17574
+ -10
17575
+ ]
17576
+ ]
17577
+ }
17578
+ };
17579
+ var INKS = {
17580
+ "deepseek": [
17581
+ "#4D6BFE",
17582
+ "#6A84FF"
17583
+ ],
17584
+ "charcoal": [
17585
+ "#141416",
17586
+ "#F1F2F4"
17587
+ ],
17588
+ "graphite": [
17589
+ "#2D2D2D",
17590
+ "#D6D6DA"
17591
+ ],
17592
+ "rose": [
17593
+ "#EC2F6B",
17594
+ "#FF5A7A"
17595
+ ],
17596
+ "sky": [
17597
+ "#0AA8D6",
17598
+ "#2EE6E0"
17599
+ ],
17600
+ "tangerine": [
17601
+ "#FF6900",
17602
+ "#FF8A2E"
17603
+ ],
17604
+ "cobalt": [
17605
+ "#082DFF",
17606
+ "#5C78FF"
17607
+ ],
17608
+ "black": [
17609
+ "#000000",
17610
+ "#FFFFFF"
17611
+ ],
17612
+ "brown": [
17613
+ "#A27952",
17614
+ "#855C36"
17615
+ ],
17616
+ "red": [
17617
+ "#FF3E51",
17618
+ "#E02135"
17619
+ ],
17620
+ "orange": [
17621
+ "#FF781C",
17622
+ "#FF6700"
17623
+ ],
17624
+ "yellow": [
17625
+ "#FFAF38",
17626
+ "#FF9800"
17627
+ ],
17628
+ "green": [
17629
+ "#00C972",
17630
+ "#009957"
17631
+ ],
17632
+ "cyan": [
17633
+ "#1CC3B0",
17634
+ "#00A592"
17635
+ ],
17636
+ "blue": [
17637
+ "#2A92FE",
17638
+ "#0E74E0"
17639
+ ],
17640
+ "violet": [
17641
+ "#A97EFE",
17642
+ "#804EE0"
17643
+ ],
17644
+ "magenta": [
17645
+ "#FF5EB1",
17646
+ "#E02A88"
17647
+ ],
17648
+ "gray": [
17649
+ "#959595",
17650
+ "#777777"
17651
+ ],
17652
+ "aurora": [
17653
+ "#00B8D4",
17654
+ "#2EE6E0"
17655
+ ]
17656
+ };
17657
+
17658
+ // plugin-src/client/ds-bot-avatar.js
17659
+ function defaultLook(id6 = "") {
17660
+ let hash = 2166136261;
17661
+ for (const char of id6) hash = Math.imul(hash ^ char.charCodeAt(0), 16777619);
17662
+ let shape = Math.imul(hash ^ hash >>> 16, 73244475);
17663
+ shape = Math.imul(shape ^ shape >>> 13, 3266489909);
17664
+ const shapes = ["star", "moon", "gumdrop", "peanut", "bunny", "kitty", "acorn"];
17665
+ const seed = hash + 1831565813 | 0;
17666
+ let color = Math.imul(seed ^ seed >>> 15, 1 | seed);
17667
+ color = color + Math.imul(color ^ color >>> 7, 61 | color) ^ color;
17668
+ const colors = ["red", "orange", "yellow", "green", "cyan", "blue", "violet", "magenta"];
17669
+ return {
17670
+ shape: shapes[((shape ^ shape >>> 16) >>> 0) % shapes.length],
17671
+ color: colors[Math.floor(((color ^ color >>> 14) >>> 0) / 4294967296 * colors.length)]
17672
+ };
17673
+ }
17674
+ function DsBotAvatar({ bot, size = 24 }) {
17675
+ const id6 = React31.useId().replaceAll(":", "");
17676
+ const fallback = defaultLook(bot?.id);
17677
+ const shape = Object.hasOwn(SHAPES, bot?.avatar?.shape) ? SHAPES[bot.avatar.shape] : SHAPES[fallback.shape];
17678
+ const color = bot?.color ?? fallback.color;
17679
+ const fill = /^#[0-9a-f]{6}$/i.test(color) ? color : (Object.hasOwn(INKS, color) ? INKS[color] : INKS[fallback.color])[0];
17680
+ const image = bot?.avatar?.image;
17681
+ if (typeof image === "string" && /^data:image\/(?:png|jpeg|webp|gif);base64,[A-Za-z0-9+/=]+$/.test(image)) {
17682
+ return React31.createElement("img", {
17683
+ className: "dim-dsBotAvatar",
17684
+ src: image,
17685
+ width: size,
17686
+ height: size,
17687
+ alt: ""
17688
+ });
17689
+ }
17690
+ const h4 = React31.createElement;
17691
+ return h4(
17692
+ "svg",
17693
+ { className: "dim-dsBotAvatar", width: size, height: size, viewBox: "0 0 100 100", "aria-hidden": true },
17694
+ h4(
17695
+ "defs",
17696
+ null,
17697
+ h4(
17698
+ "mask",
17699
+ { id: `${id6}mask` },
17700
+ h4("rect", { width: 100, height: 100, fill: "#fff" }),
17701
+ shape.eyes.map(([x, y, w, height, angle], index) => h4("rect", {
17702
+ key: index,
17703
+ x: -w / 2,
17704
+ y: -height / 2,
17705
+ width: w,
17706
+ height,
17707
+ rx: w / 2,
17708
+ fill: "#000",
17709
+ transform: `translate(${x} ${y}) rotate(${angle})`
17710
+ }))
17711
+ ),
17712
+ color === "aurora" ? h4(
17713
+ "linearGradient",
17714
+ { id: `${id6}gradient`, x1: "0%", y1: "0%", x2: "100%", y2: "100%" },
17715
+ h4("stop", { offset: 0, stopColor: "#A4FFB0" }),
17716
+ h4("stop", { offset: ".42", stopColor: "#00F0E4" }),
17717
+ h4("stop", { offset: 1, stopColor: "#2E9EF7" })
17718
+ ) : null
17719
+ ),
17720
+ h4(
17721
+ "g",
17722
+ { mask: `url(#${id6}mask)`, fillRule: "evenodd" },
17723
+ h4("path", { d: shape.body, fill: color === "aurora" ? `url(#${id6}gradient)` : fill }),
17724
+ (shape.paints ?? []).map(([d, paint, opacity], index) => h4("path", { key: index, d, fill: paint, opacity })),
17725
+ h4("path", { d: shape.shade, fill: "#000", opacity: 0.14 }),
17726
+ h4("path", { d: shape.light, fill: "#fff", opacity: 0.16 })
17727
+ )
17728
+ );
17729
+ }
17730
+
17731
+ // plugin-src/client/ds-bot-settings.js
17732
+ var DS_BOT_MESSAGES = Object.freeze({
17733
+ missing: "\u672A\u5B89\u88C5 DS Bot\uFF0C\u8BF7\u5148\u5728 DSH \u63D2\u4EF6\u7BA1\u7406\u4E2D\u5B89\u88C5 ds-bot\uFF0C\u7136\u540E\u5237\u65B0\u3002",
17734
+ disabled: "DS Bot \u5C1A\u672A\u542F\u7528\uFF0C\u8BF7\u5728 DSH \u63D2\u4EF6\u7BA1\u7406\u4E2D\u542F\u7528\u540E\u5237\u65B0\u3002",
17735
+ unavailable: "\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6 DS Bot\uFF0C\u8BF7\u68C0\u67E5\u63D2\u4EF6\u662F\u5426\u6B63\u5E38\u8FD0\u884C\u540E\u91CD\u8BD5\u3002",
17736
+ readonly: "DS Bot \u5F53\u524D\u7531\u5176\u4ED6 Host \u7BA1\u7406\uFF0C\u8BF7\u5728\u8FD0\u884C\u5B83\u7684 Host \u4E2D\u7ED1\u5B9A\u3002",
17737
+ remote: "\u7ED1\u5B9Abot\u4EC5\u652F\u6301\u5F53\u524D Host \u7684\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u68C0\u67E5\u673A\u5668\u4EBA\u7684 Harness \u8FDE\u63A5\u8BBE\u7F6E\u3002"
17738
+ });
17739
+ function dsBotErrorMessage(error) {
17740
+ return {
17741
+ "ds-bot-unavailable": DS_BOT_MESSAGES.unavailable,
17742
+ "ds-bot-not-found": "\u6240\u9009 DS Bot \u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u65B0\u9009\u62E9\u3002",
17743
+ "ds-bot-private-required": "\u4EC5\u652F\u6301\u5DF2\u7ECF\u5EFA\u7ACB\u4F1A\u8BDD\u7684\u79C1\u804A\uFF0C\u8BF7\u5148\u4E0E\u673A\u5668\u4EBA\u79C1\u804A\u540E\u5237\u65B0\u3002",
17744
+ "ds-bot-binding-conflict": "\u6240\u9009 DS Bot \u6216\u79C1\u804A\u5BF9\u8C61\u5DF2\u7ED1\u5B9A\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u65B0\u9009\u62E9\u3002"
17745
+ }[error?.code] ?? "\u7ED1\u5B9A\u8BBE\u7F6E\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002";
17746
+ }
17747
+ function DsBotPicker({ bots, value, onChange, disabled }) {
17748
+ const [open, setOpen] = React32.useState(false);
17749
+ const [active, setActive] = React32.useState(0);
17750
+ const root = React32.useRef(null);
17751
+ const trigger = React32.useRef(null);
17752
+ const listId = React32.useId();
17753
+ const selected = bots.find((bot) => bot.id === value);
17754
+ const isOpen = open && !disabled && bots.length > 0;
17755
+ React32.useEffect(() => {
17756
+ const dismiss = (event) => {
17757
+ if (!root.current?.contains(event.target)) setOpen(false);
17758
+ };
17759
+ if (open) globalThis.document?.addEventListener("pointerdown", dismiss);
17760
+ return () => globalThis.document?.removeEventListener("pointerdown", dismiss);
17761
+ }, [open]);
17762
+ const choose = (bot) => {
17763
+ onChange(bot.id);
17764
+ setOpen(false);
17765
+ trigger.current?.focus();
17766
+ };
17767
+ const optionId = (index) => `${listId}-${index}`;
17768
+ return h2(
17769
+ "div",
17770
+ { className: "dim-dsBotPicker", ref: root },
17771
+ h2(
17772
+ "button",
17773
+ {
17774
+ type: "button",
17775
+ role: "combobox",
17776
+ ref: trigger,
17777
+ className: "dim-dsBotPickerTrigger",
17778
+ disabled: disabled || !bots.length,
17779
+ "aria-label": "DS Bot",
17780
+ "aria-expanded": isOpen,
17781
+ "aria-controls": listId,
17782
+ "aria-haspopup": "listbox",
17783
+ "aria-activedescendant": isOpen ? optionId(active) : void 0,
17784
+ onClick: () => {
17785
+ setActive(Math.max(0, bots.findIndex((bot) => bot.id === value)));
17786
+ setOpen(!open);
17787
+ },
17788
+ onKeyDown: (event) => {
17789
+ if (disabled || !bots.length) return;
17790
+ if (["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key)) {
17791
+ event.preventDefault();
17792
+ const index = event.key === "Home" ? 0 : event.key === "End" ? bots.length - 1 : open ? (active + (event.key === "ArrowDown" ? 1 : -1) + bots.length) % bots.length : Math.max(0, bots.findIndex((bot) => bot.id === value));
17793
+ setActive(index);
17794
+ setOpen(true);
17795
+ } else if (open && ["Enter", " "].includes(event.key)) {
17796
+ event.preventDefault();
17797
+ if (bots[active]) choose(bots[active]);
17798
+ } else if (event.key === "Escape" || event.key === "Tab") setOpen(false);
17799
+ }
17800
+ },
17801
+ selected ? h2(DsBotAvatar, { bot: selected }) : null,
17802
+ selected ? React32.createElement("span", { className: "dim-dsBotPickerName" }, selected.name) : h2("span", { className: "dim-dsBotPickerName" }, bots.length ? "\u9009\u62E9 DS Bot" : "\u6682\u65E0\u53EF\u9009 DS Bot"),
17803
+ h2(
17804
+ "svg",
17805
+ { width: 14, height: 14, viewBox: "0 0 16 16", "aria-hidden": true },
17806
+ h2("path", { d: "m4 6 4 4 4-4", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" })
17807
+ )
17808
+ ),
17809
+ isOpen ? h2(
17810
+ "div",
17811
+ { id: listId, role: "listbox", "aria-label": "DS Bot", className: "dim-dsBotOptions" },
17812
+ bots.map((bot, index) => h2(
17813
+ "button",
17814
+ {
17815
+ key: bot.id,
17816
+ id: optionId(index),
17817
+ type: "button",
17818
+ role: "option",
17819
+ tabIndex: -1,
17820
+ "aria-selected": value === bot.id,
17821
+ "data-active": active === index,
17822
+ onMouseDown: (event) => event.preventDefault(),
17823
+ onMouseEnter: () => setActive(index),
17824
+ onClick: () => choose(bot)
17825
+ },
17826
+ h2(DsBotAvatar, { bot }),
17827
+ React32.createElement("span", { className: "dim-dsBotPickerName" }, bot.name),
17828
+ value === bot.id ? h2("span", { "aria-hidden": true }, "\u2713") : null
17829
+ ))
17830
+ ) : null
17831
+ );
17832
+ }
17833
+ function conversationLabel(conversation) {
17834
+ if (conversation.name) return conversation.name;
17835
+ const value = conversation.address;
17836
+ return value.length > 24 ? `${value.slice(0, 10)}\u2026${value.slice(-8)}` : value;
17837
+ }
17838
+ function DsBotSettingsPage({ botId, rpcCall }) {
17839
+ const [status, setStatus] = React32.useState(null);
17840
+ const [dsBotId, setDsBotId] = React32.useState("");
17841
+ const [conversationKey, setConversationKey] = React32.useState("");
17842
+ const [loading, setLoading] = React32.useState(true);
17843
+ const [busy, setBusy] = React32.useState(false);
17844
+ const [feedback, setFeedback] = React32.useState(null);
17845
+ const [feedbackTone, setFeedbackTone] = React32.useState("success");
17846
+ const requests = React32.useRef({ revision: 0, busy: false, controller: null });
17847
+ const refresh = React32.useCallback(async (signal = requests.current.controller?.signal) => {
17848
+ const state = requests.current;
17849
+ if (signal?.aborted) return;
17850
+ const revision = ++state.revision;
17851
+ const current = () => !signal?.aborted && revision === state.revision;
17852
+ setLoading(true);
17853
+ try {
17854
+ const value = await rpcCall("ds-bot.status", { botId }, signal);
17855
+ if (current()) setStatus(value);
17856
+ } catch {
17857
+ if (current()) setStatus((previous) => ({ ...previous, state: "unavailable" }));
17858
+ } finally {
17859
+ if (current()) setLoading(false);
17860
+ }
17861
+ }, [botId, rpcCall]);
17862
+ React32.useEffect(() => {
17863
+ const controller = new AbortController();
17864
+ requests.current.controller = controller;
17865
+ void refresh(controller.signal);
17866
+ return () => {
17867
+ controller.abort();
17868
+ requests.current.revision++;
17869
+ };
17870
+ }, [refresh]);
17871
+ const conversations = status?.conversations ?? [];
17872
+ const bots = status?.bots ?? [];
17873
+ const bindings = conversations.filter((conversation) => conversation.dsBotId);
17874
+ const usedBotIds = new Set(bindings.map((binding) => binding.dsBotId));
17875
+ const availableBots = bots.filter((bot) => !usedBotIds.has(bot.id));
17876
+ const availableConversations = conversations.filter((conversation) => !conversation.dsBotId);
17877
+ const canSave = !busy && !loading && status?.state === "ready" && availableBots.some((bot) => bot.id === dsBotId) && availableConversations.some((conversation) => conversation.conversationKey === conversationKey);
17878
+ React32.useEffect(() => {
17879
+ setDsBotId((value) => availableBots.some((bot) => bot.id === value) ? value : "");
17880
+ setConversationKey((value) => availableConversations.some((conversation) => conversation.conversationKey === value) ? value : "");
17881
+ }, [status]);
17882
+ const save = async (event) => {
17883
+ event.preventDefault();
17884
+ if (!canSave || requests.current.busy) return;
17885
+ requests.current.busy = true;
17886
+ requests.current.revision++;
17887
+ setBusy(true);
17888
+ setFeedback(null);
17889
+ try {
17890
+ await rpcCall("ds-bot.bind", { botId, conversationKey, dsBotId });
17891
+ setDsBotId("");
17892
+ setConversationKey("");
17893
+ await refresh();
17894
+ setFeedbackTone("success");
17895
+ setFeedback("\u7ED1\u5B9A\u5DF2\u4FDD\u5B58\u3002");
17896
+ } catch (error) {
17897
+ if (error?.code === "ds-bot-binding-conflict") await refresh();
17898
+ setFeedbackTone("error");
17899
+ setFeedback(dsBotErrorMessage(error));
17900
+ } finally {
17901
+ requests.current.busy = false;
17902
+ setBusy(false);
17903
+ }
17904
+ };
17905
+ const unbind = async (key) => {
17906
+ if (requests.current.busy) return;
17907
+ requests.current.busy = true;
17908
+ requests.current.revision++;
17909
+ setBusy(true);
17910
+ setFeedback(null);
17911
+ try {
17912
+ await rpcCall("ds-bot.unbind", { botId, conversationKey: key });
17913
+ await refresh();
17914
+ setFeedbackTone("success");
17915
+ setFeedback("\u5DF2\u89E3\u9664\u7ED1\u5B9A\uFF0C\u804A\u5929\u8BB0\u5F55\u4FDD\u7559\u3002");
17916
+ } catch (error) {
17917
+ setFeedbackTone("error");
17918
+ setFeedback(dsBotErrorMessage(error));
17919
+ } finally {
17920
+ requests.current.busy = false;
17921
+ setBusy(false);
17922
+ }
17923
+ };
17924
+ return h2(
17925
+ "section",
17926
+ { className: "dim-deliveryTargets dim-dsBotSettings", "aria-label": "\u7ED1\u5B9Abot" },
17927
+ h2(
17928
+ "div",
17929
+ { className: "dim-deliverySectionHeading" },
17930
+ h2("div", null, h2("h3", null, "\u7ED1\u5B9Abot"), h2("p", null, "\u9009\u62E9 DS Bot \u548C\u79C1\u804A\u5BF9\u8C61\uFF0C\u76F4\u63A5\u4F7F\u7528 Bot \u7684\u4F1A\u8BDD\u3002")),
17931
+ h2("button", { className: "dim-deliveryButton", type: "button", disabled: busy || loading, onClick: () => void refresh() }, "\u5237\u65B0")
17932
+ ),
17933
+ !status ? h2("p", { className: "dim-dsBotNotice", role: "status" }, "\u6B63\u5728\u68C0\u6D4B DS Bot\u2026") : status.state !== "ready" ? h2("p", { className: "dim-dsBotNotice", role: "status" }, DS_BOT_MESSAGES[status.state] ?? DS_BOT_MESSAGES.unavailable) : !bots.length ? h2("p", { className: "dim-dsBotNotice" }, "\u8FD8\u6CA1\u6709 DS Bot\uFF0C\u8BF7\u5148\u5728 DS Bot \u4E2D\u521B\u5EFA\u673A\u5668\u4EBA\u540E\u5237\u65B0\u3002") : !conversations.length ? h2("p", { className: "dim-dsBotNotice" }, "\u8FD8\u6CA1\u6709\u53EF\u7ED1\u5B9A\u7684\u79C1\u804A\u3002\u5148\u7ED9\u8FD9\u4E2A\u673A\u5668\u4EBA\u53D1\u4E00\u6761\u79C1\u804A\u6D88\u606F\uFF0C\u518D\u70B9\u51FB\u5237\u65B0\u3002") : h2(
17934
+ "form",
17935
+ { className: "dim-dsBotForm", onSubmit: save },
17936
+ h2(
17937
+ "div",
17938
+ { className: "dim-targetFormGrid" },
17939
+ h2(
17940
+ "div",
17941
+ { className: "dim-targetField" },
17942
+ h2("span", null, "DS Bot"),
17943
+ h2(DsBotPicker, { bots: availableBots, value: dsBotId, onChange: setDsBotId, disabled: busy || loading })
17944
+ ),
17945
+ h2(
17946
+ "label",
17947
+ { className: "dim-targetField" },
17948
+ h2("span", null, "\u79C1\u804A\u5BF9\u8C61"),
17949
+ h2(
17950
+ "select",
17951
+ {
17952
+ value: conversationKey,
17953
+ required: true,
17954
+ disabled: busy || loading || !availableConversations.length,
17955
+ onChange: (event) => setConversationKey(event.target.value)
17956
+ },
17957
+ h2("option", { value: "" }, availableConversations.length ? "\u9009\u62E9\u79C1\u804A\u5BF9\u8C61" : "\u6682\u65E0\u53EF\u9009\u79C1\u804A\u5BF9\u8C61"),
17958
+ availableConversations.map((conversation) => React32.createElement("option", {
17959
+ key: conversation.conversationKey,
17960
+ value: conversation.conversationKey
17961
+ }, conversationLabel(conversation)))
17962
+ )
17963
+ )
17964
+ ),
17965
+ !availableBots.length || !availableConversations.length ? h2("p", { className: "dim-dsBotNotice" }, "\u5DF2\u7ED1\u5B9A\u7684 DS Bot \u548C\u79C1\u804A\u5BF9\u8C61\u4E0D\u53EF\u91CD\u590D\u9009\u62E9\uFF0C\u89E3\u9664\u7ED1\u5B9A\u540E\u53EF\u91CD\u65B0\u9009\u62E9\u3002") : null,
17966
+ h2(
17967
+ "div",
17968
+ { className: "dim-targetFormActions" },
17969
+ h2("button", {
17970
+ type: "submit",
17971
+ className: "dim-deliveryButton",
17972
+ "data-kind": "primary",
17973
+ disabled: !canSave
17974
+ }, busy ? "\u6B63\u5728\u4FDD\u5B58\u2026" : "\u4FDD\u5B58\u7ED1\u5B9A")
17975
+ )
17976
+ ),
17977
+ bindings.length ? h2("ul", { className: "dim-targetList" }, bindings.map((conversation) => {
17978
+ const bot = bots.find((entry) => entry.id === conversation.dsBotId);
17979
+ return h2(
17980
+ "li",
17981
+ { className: "dim-targetRow dim-dsBotBinding", key: conversation.conversationKey },
17982
+ h2(
17983
+ "div",
17984
+ { className: "dim-dsBotBoundIdentity" },
17985
+ h2(DsBotAvatar, { bot: bot ?? { id: conversation.dsBotId }, size: 32 }),
17986
+ h2(
17987
+ "div",
17988
+ { className: "dim-targetSummary" },
17989
+ h2(
17990
+ "div",
17991
+ { className: "dim-targetTitle" },
17992
+ bot ? React32.createElement("strong", null, bot.name) : h2("strong", null, "DS Bot \u6682\u4E0D\u53EF\u7528"),
17993
+ h2("span", null, "\u5DF2\u7ED1\u5B9A")
17994
+ ),
17995
+ React32.createElement("p", { className: "dim-dsBotDestination" }, conversationLabel(conversation))
17996
+ )
17997
+ ),
17998
+ h2("button", {
17999
+ type: "button",
18000
+ className: "dim-deliveryButton",
18001
+ "data-kind": "danger",
18002
+ disabled: busy || loading,
18003
+ onClick: () => void unbind(conversation.conversationKey)
18004
+ }, "\u89E3\u9664\u7ED1\u5B9A")
18005
+ );
18006
+ })) : null,
18007
+ feedback ? h2("p", { role: "status", className: "dim-targetFeedback", "data-tone": feedbackTone }, feedback) : null
18008
+ );
18009
+ }
18010
+
18011
+ // plugin-src/client/channels/feishu/group-settings.js
18012
+ var React33 = __toESM(require("react"), 1);
17061
18013
  var GROUP_MESSAGE_PERMISSION_OPERATION2 = FEISHU_REGISTRATION_OPERATIONS.GROUP_MESSAGE_PERMISSION;
17062
18014
  function SettingsButton({ children, kind = "secondary", className = "", ...props }) {
17063
18015
  return h2("button", {
@@ -17118,9 +18070,9 @@ function GroupResponseModeEditor({
17118
18070
  onAuthorize
17119
18071
  }) {
17120
18072
  const current = normalizeGroupResponseMode(value);
17121
- const [saving, setSaving] = React31.useState(false);
17122
- const [authorizing, setAuthorizing] = React31.useState(false);
17123
- const [error, setError] = React31.useState(null);
18073
+ const [saving, setSaving] = React33.useState(false);
18074
+ const [authorizing, setAuthorizing] = React33.useState(false);
18075
+ const [error, setError] = React33.useState(null);
17124
18076
  const change = async (event) => {
17125
18077
  const next = normalizeGroupResponseMode(event.target.value);
17126
18078
  if (next === current || saving || disabled) return;
@@ -17201,8 +18153,8 @@ function GroupResponseModeEditor({
17201
18153
  }
17202
18154
  function MentionTopicReplyEditor({ value = true, disabled = false, onSave }) {
17203
18155
  const current = value === true ? "on" : "off";
17204
- const [saving, setSaving] = React31.useState(false);
17205
- const [error, setError] = React31.useState(null);
18156
+ const [saving, setSaving] = React33.useState(false);
18157
+ const [error, setError] = React33.useState(null);
17206
18158
  const change = async (event) => {
17207
18159
  const next = event.target.value === "on";
17208
18160
  if ((next ? "on" : "off") === current || saving || disabled) return;
@@ -17389,14 +18341,14 @@ function PermissionFlow({ provision, now, busy, botName, onRetry, onCancel, onCl
17389
18341
  );
17390
18342
  }
17391
18343
  function FeishuGroupSettingsPage({ account, rpcCall }) {
17392
- const [settings, setSettings] = React31.useState(() => groupSettingsFrom(account));
17393
- const [refreshing, setRefreshing] = React31.useState(false);
17394
- const [refreshError, setRefreshError] = React31.useState(null);
17395
- const [provision, setProvision] = React31.useState(null);
17396
- const [provisionBusy, setProvisionBusy] = React31.useState(false);
17397
- const [now, setNow] = React31.useState(() => Date.now());
17398
- const mounted = React31.useRef(true);
17399
- React31.useEffect(() => {
18344
+ const [settings, setSettings] = React33.useState(() => groupSettingsFrom(account));
18345
+ const [refreshing, setRefreshing] = React33.useState(false);
18346
+ const [refreshError, setRefreshError] = React33.useState(null);
18347
+ const [provision, setProvision] = React33.useState(null);
18348
+ const [provisionBusy, setProvisionBusy] = React33.useState(false);
18349
+ const [now, setNow] = React33.useState(() => Date.now());
18350
+ const mounted = React33.useRef(true);
18351
+ React33.useEffect(() => {
17400
18352
  setSettings(groupSettingsFrom(account));
17401
18353
  }, [
17402
18354
  account.botId,
@@ -17404,22 +18356,22 @@ function FeishuGroupSettingsPage({ account, rpcCall }) {
17404
18356
  account.mentionTopicReply,
17405
18357
  account.groupMessagePermissionGranted
17406
18358
  ]);
17407
- React31.useEffect(() => {
18359
+ React33.useEffect(() => {
17408
18360
  mounted.current = true;
17409
18361
  return () => {
17410
18362
  mounted.current = false;
17411
18363
  };
17412
18364
  }, []);
17413
- const invoke = React31.useCallback(async (endpoint, payload = {}, signal) => {
18365
+ const invoke = React33.useCallback(async (endpoint, payload = {}, signal) => {
17414
18366
  if (typeof rpcCall !== "function") throw new Error("\u98DE\u4E66\u7FA4\u804A\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002");
17415
18367
  return unwrapRpcResult3(await rpcCall(endpoint, payload, signal));
17416
18368
  }, [rpcCall]);
17417
- const applySnapshot = React31.useCallback((value) => {
18369
+ const applySnapshot = React33.useCallback((value) => {
17418
18370
  const result2 = targetBotFromSnapshot(value, account.botId);
17419
18371
  if (mounted.current) setSettings(groupSettingsFrom(result2.bot));
17420
18372
  return result2;
17421
18373
  }, [account.botId]);
17422
- const loadSettings = React31.useCallback(async ({ signal, restoreProvisioning = false } = {}) => {
18374
+ const loadSettings = React33.useCallback(async ({ signal, restoreProvisioning = false } = {}) => {
17423
18375
  setRefreshing(true);
17424
18376
  setRefreshError(null);
17425
18377
  try {
@@ -17448,16 +18400,16 @@ function FeishuGroupSettingsPage({ account, rpcCall }) {
17448
18400
  if (!signal?.aborted && mounted.current) setRefreshing(false);
17449
18401
  }
17450
18402
  }, [account.botId, applySnapshot, invoke]);
17451
- React31.useEffect(() => {
18403
+ React33.useEffect(() => {
17452
18404
  const controller = new AbortController();
17453
18405
  void loadSettings({ signal: controller.signal, restoreProvisioning: true });
17454
18406
  return () => controller.abort();
17455
18407
  }, [loadSettings]);
17456
- const saveSetting = React31.useCallback(async (endpoint, payload) => {
18408
+ const saveSetting = React33.useCallback(async (endpoint, payload) => {
17457
18409
  const value = await invoke(endpoint, { botId: account.botId, ...payload });
17458
18410
  applySnapshot(value);
17459
18411
  }, [account.botId, applySnapshot, invoke]);
17460
- const startAuthorization = React31.useCallback(async ({ replace = false, preserveResponseMode = provision?.preserveResponseMode === true } = {}) => {
18412
+ const startAuthorization = React33.useCallback(async ({ replace = false, preserveResponseMode = provision?.preserveResponseMode === true } = {}) => {
17461
18413
  if (provisionBusy) return;
17462
18414
  const previousAttemptId = provision?.attemptId;
17463
18415
  setProvisionBusy(true);
@@ -17499,13 +18451,13 @@ function FeishuGroupSettingsPage({ account, rpcCall }) {
17499
18451
  if (mounted.current) setProvisionBusy(false);
17500
18452
  }
17501
18453
  }, [account.botId, invoke, provision?.attemptId, provisionBusy]);
17502
- const finishAuthorization = React31.useCallback(async (signal) => {
18454
+ const finishAuthorization = React33.useCallback(async (signal) => {
17503
18455
  const bot = await loadSettings({ signal, restoreProvisioning: false });
17504
18456
  if (signal?.aborted || !mounted.current) return;
17505
18457
  if (!bot) throw new Error("\u7FA4\u6D88\u606F\u6743\u9650\u5DF2\u66F4\u65B0\uFF0C\u4F46\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u673A\u5668\u4EBA\u8FDE\u63A5\u72B6\u6001");
17506
18458
  setProvision(null);
17507
18459
  }, [loadSettings]);
17508
- React31.useEffect(() => {
18460
+ React33.useEffect(() => {
17509
18461
  if (!provision?.attemptId || !["qr", "connecting"].includes(provision.phase) || provision.expired) return void 0;
17510
18462
  const timerHost = globalThis.window ?? globalThis;
17511
18463
  const controller = new AbortController();
@@ -17549,7 +18501,7 @@ function FeishuGroupSettingsPage({ account, rpcCall }) {
17549
18501
  timerHost.clearTimeout(timer);
17550
18502
  };
17551
18503
  }, [account.botId, finishAuthorization, invoke, provision]);
17552
- React31.useEffect(() => {
18504
+ React33.useEffect(() => {
17553
18505
  if (!provision?.attemptId || provision.phase !== "qr" || provision.expired) return void 0;
17554
18506
  const timerHost = globalThis.window ?? globalThis;
17555
18507
  const tick = () => {
@@ -17563,7 +18515,7 @@ function FeishuGroupSettingsPage({ account, rpcCall }) {
17563
18515
  const timer = timerHost.setInterval(tick, 1e3);
17564
18516
  return () => timerHost.clearInterval(timer);
17565
18517
  }, [provision?.attemptId, provision?.expired, provision?.expiresAt, provision?.phase]);
17566
- const cancelAuthorization = React31.useCallback(async () => {
18518
+ const cancelAuthorization = React33.useCallback(async () => {
17567
18519
  if (!provision?.attemptId || provisionBusy) {
17568
18520
  setProvision(null);
17569
18521
  return;
@@ -17652,21 +18604,21 @@ function FeishuGroupSettingsPage({ account, rpcCall }) {
17652
18604
  }
17653
18605
 
17654
18606
  // plugin-src/client/channels/feishu/voice-settings.js
17655
- var React33 = __toESM(require("react"), 1);
18607
+ var React35 = __toESM(require("react"), 1);
17656
18608
 
17657
18609
  // plugin-src/client/channels/feishu/voice-editor.js
17658
- var React32 = __toESM(require("react"), 1);
18610
+ var React34 = __toESM(require("react"), 1);
17659
18611
  function VoiceEditor({ value = null, disabled = false, onSave }) {
17660
- const [enabled, setEnabled] = React32.useState(value != null);
17661
- const [secretRef, setSecretRef] = React32.useState(value?.secretRef ?? "DASHSCOPE_API_KEY");
17662
- const [asrModel, setAsrModel] = React32.useState(value?.asrModel ?? "qwen3-asr-flash");
17663
- const [ttsModel, setTtsModel] = React32.useState(value?.ttsModel ?? "qwen3-tts-flash");
17664
- const [ttsVoice, setTtsVoice] = React32.useState(value?.ttsVoice ?? "Momo");
17665
- const [saving, setSaving] = React32.useState(false);
17666
- const [error, setError] = React32.useState(null);
17667
- const titleId = React32.useId();
18612
+ const [enabled, setEnabled] = React34.useState(value != null);
18613
+ const [secretRef, setSecretRef] = React34.useState(value?.secretRef ?? "DASHSCOPE_API_KEY");
18614
+ const [asrModel, setAsrModel] = React34.useState(value?.asrModel ?? "qwen3-asr-flash");
18615
+ const [ttsModel, setTtsModel] = React34.useState(value?.ttsModel ?? "qwen3-tts-flash");
18616
+ const [ttsVoice, setTtsVoice] = React34.useState(value?.ttsVoice ?? "Momo");
18617
+ const [saving, setSaving] = React34.useState(false);
18618
+ const [error, setError] = React34.useState(null);
18619
+ const titleId = React34.useId();
17668
18620
  const helpId = `${titleId}-help`;
17669
- React32.useEffect(() => {
18621
+ React34.useEffect(() => {
17670
18622
  setEnabled(value != null);
17671
18623
  if (value) {
17672
18624
  setSecretRef(value.secretRef ?? "DASHSCOPE_API_KEY");
@@ -17780,20 +18732,20 @@ function VoiceEditor({ value = null, disabled = false, onSave }) {
17780
18732
 
17781
18733
  // plugin-src/client/channels/feishu/voice-settings.js
17782
18734
  function FeishuVoiceSettingsPage({ account, rpcCall }) {
17783
- const [voice, setVoice] = React33.useState(null);
17784
- const [phase, setPhase] = React33.useState("loading");
17785
- const [error, setError] = React33.useState(null);
17786
- const mounted = React33.useRef(true);
17787
- const invoke = React33.useCallback(async (endpoint, payload, signal) => {
18735
+ const [voice, setVoice] = React35.useState(null);
18736
+ const [phase, setPhase] = React35.useState("loading");
18737
+ const [error, setError] = React35.useState(null);
18738
+ const mounted = React35.useRef(true);
18739
+ const invoke = React35.useCallback(async (endpoint, payload, signal) => {
17788
18740
  if (typeof rpcCall !== "function") throw new Error("\u98DE\u4E66\u8BED\u97F3\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002");
17789
18741
  return unwrapRpcResult3(await rpcCall(endpoint, payload, signal));
17790
18742
  }, [rpcCall]);
17791
- const applySnapshot = React33.useCallback((value) => {
18743
+ const applySnapshot = React35.useCallback((value) => {
17792
18744
  const bot = normalizeBotsSnapshot(value).bots.find((entry) => entry.botId === account.botId);
17793
18745
  if (!bot) throw new Error("\u672A\u627E\u5230\u5F53\u524D\u98DE\u4E66\u673A\u5668\u4EBA\uFF0C\u8BF7\u8FD4\u56DE\u5217\u8868\u540E\u91CD\u8BD5\u3002");
17794
18746
  if (mounted.current) setVoice(bot.voice);
17795
18747
  }, [account.botId]);
17796
- const loadSettings = React33.useCallback(async (signal) => {
18748
+ const loadSettings = React35.useCallback(async (signal) => {
17797
18749
  setPhase("loading");
17798
18750
  setError(null);
17799
18751
  try {
@@ -17807,7 +18759,7 @@ function FeishuVoiceSettingsPage({ account, rpcCall }) {
17807
18759
  setPhase("error");
17808
18760
  }
17809
18761
  }, [applySnapshot, invoke]);
17810
- React33.useEffect(() => {
18762
+ React35.useEffect(() => {
17811
18763
  mounted.current = true;
17812
18764
  const controller = new AbortController();
17813
18765
  void loadSettings(controller.signal);
@@ -17846,7 +18798,7 @@ function FeishuVoiceSettingsPage({ account, rpcCall }) {
17846
18798
  }
17847
18799
 
17848
18800
  // plugin-src/client/channels/feishu/slash-panel-settings.js
17849
- var React34 = __toESM(require("react"), 1);
18801
+ var React36 = __toESM(require("react"), 1);
17850
18802
  var MANIFEST_BY_NAME = new Map(SLASH_COMMAND_MANIFEST.map((entry) => [entry.command, entry]));
17851
18803
  var ALL_COMMANDS = Object.freeze(SLASH_COMMAND_MANIFEST.map((entry) => entry.command));
17852
18804
  function PanelButton({ children, disabled = false, onClick, ...props }) {
@@ -17867,30 +18819,30 @@ function commandText(name2) {
17867
18819
  return `/${name2} \u2014 ${entry?.default ?? name2}`;
17868
18820
  }
17869
18821
  function FeishuSlashPanelSettingsPage({ account, rpcCall, onSaved }) {
17870
- const incoming = React34.useMemo(() => normalizeSlashPanelConfig(account.slashPanel), [account.botId, panelSignature(account.slashPanel)]);
17871
- const [mode, setMode] = React34.useState(incoming.mode);
17872
- const [order, setOrder] = React34.useState(() => [...incoming.order]);
17873
- const [pending, setPending] = React34.useState("");
17874
- const [dirty, setDirty] = React34.useState(false);
17875
- const [saving, setSaving] = React34.useState(false);
17876
- const [saved, setSaved] = React34.useState(false);
17877
- const [syncing, setSyncing] = React34.useState(false);
17878
- const [syncTargets, setSyncTargets] = React34.useState(null);
17879
- const [syncNotice, setSyncNotice] = React34.useState(null);
17880
- const [error, setError] = React34.useState(null);
17881
- const mounted = React34.useRef(true);
17882
- React34.useEffect(() => {
18822
+ const incoming = React36.useMemo(() => normalizeSlashPanelConfig(account.slashPanel), [account.botId, panelSignature(account.slashPanel)]);
18823
+ const [mode, setMode] = React36.useState(incoming.mode);
18824
+ const [order, setOrder] = React36.useState(() => [...incoming.order]);
18825
+ const [pending, setPending] = React36.useState("");
18826
+ const [dirty, setDirty] = React36.useState(false);
18827
+ const [saving, setSaving] = React36.useState(false);
18828
+ const [saved, setSaved] = React36.useState(false);
18829
+ const [syncing, setSyncing] = React36.useState(false);
18830
+ const [syncTargets, setSyncTargets] = React36.useState(null);
18831
+ const [syncNotice, setSyncNotice] = React36.useState(null);
18832
+ const [error, setError] = React36.useState(null);
18833
+ const mounted = React36.useRef(true);
18834
+ React36.useEffect(() => {
17883
18835
  mounted.current = true;
17884
18836
  return () => {
17885
18837
  mounted.current = false;
17886
18838
  };
17887
18839
  }, []);
17888
- React34.useEffect(() => {
18840
+ React36.useEffect(() => {
17889
18841
  if (dirty) return;
17890
18842
  setMode(incoming.mode);
17891
18843
  setOrder([...incoming.order]);
17892
18844
  }, [incoming.mode, incoming.order, dirty]);
17893
- const edit = React34.useCallback((update) => {
18845
+ const edit = React36.useCallback((update) => {
17894
18846
  setSaved(false);
17895
18847
  setDirty(true);
17896
18848
  update();
@@ -18027,7 +18979,7 @@ function FeishuSlashPanelSettingsPage({ account, rpcCall, onSaved }) {
18027
18979
  h2("option", { value: SLASH_PANEL_MODES.CUSTOM }, "\u81EA\u5B9A\u4E49\uFF08\u81EA\u5DF1\u6311\u6307\u4EE4\u548C\u987A\u5E8F\uFF09")
18028
18980
  ),
18029
18981
  mode === SLASH_PANEL_MODES.CUSTOM ? h2(
18030
- React34.Fragment,
18982
+ React36.Fragment,
18031
18983
  null,
18032
18984
  order.length === 0 ? h2("p", { className: "dim-feishuGroupHelp" }, "\u5F53\u524D\u6CA1\u6709\u9009\u62E9\u4EFB\u4F55\u6307\u4EE4\uFF0C\u4FDD\u5B58\u540E\u300C/\u300D\u9762\u677F\u4F1A\u53D8\u6210\u7A7A\u7684\u3002") : h2(
18033
18985
  "ul",
@@ -18148,9 +19100,391 @@ function FeishuSlashPanelSettingsPage({ account, rpcCall, onSaved }) {
18148
19100
  );
18149
19101
  }
18150
19102
 
18151
- // plugin-src/client/delivery-settings.js
18152
- var DELIVERY_RPC_CHANNEL = "/dsh-im-delivery";
18153
- var DELIVERY_DOCS_URL = Object.freeze({
19103
+ // plugin-src/client/channels/telegram/group-triggers-settings.js
19104
+ var React37 = __toESM(require("react"), 1);
19105
+ var GROUP_TRIGGERS_ENDPOINTS = Object.freeze({
19106
+ get: "bot.group-triggers.get",
19107
+ set: "bot.group-triggers.set",
19108
+ resolve: "bot.group-triggers.resolve"
19109
+ });
19110
+ var GROUP_TRIGGER_MODE_OPTIONS = Object.freeze([
19111
+ Object.freeze({ value: "off", label: "\u4E0D\u54CD\u5E94" }),
19112
+ Object.freeze({ value: "mention", label: "\u88AB @ \u6216\u56DE\u590D\u65F6\uFF08\u4EFB\u4F55\u4EBA\uFF09" }),
19113
+ Object.freeze({ value: "mention-list", label: "\u88AB @ \u6216\u56DE\u590D\u65F6\uFF08\u4EC5\u540D\u5355\u6210\u5458\uFF09" }),
19114
+ Object.freeze({ value: "all", label: "\u6240\u6709\u6D88\u606F\uFF08\u4EFB\u4F55\u4EBA\uFF09" }),
19115
+ Object.freeze({ value: "all-list", label: "\u6240\u6709\u6D88\u606F\uFF08\u4EC5\u540D\u5355\u6210\u5458\uFF09" })
19116
+ ]);
19117
+ var LIST_MODES = /* @__PURE__ */ new Set(["mention-list", "all-list"]);
19118
+ var DEFAULT_ENTRY = Object.freeze({ mode: "off", sendersText: "" });
19119
+ function isListMode(mode) {
19120
+ return LIST_MODES.has(mode);
19121
+ }
19122
+ function modeLabel(value) {
19123
+ return GROUP_TRIGGER_MODE_OPTIONS.find((option) => option.value === value)?.label ?? GROUP_TRIGGER_MODE_OPTIONS[0].label;
19124
+ }
19125
+ function splitMemberIds(text8) {
19126
+ return String(text8 ?? "").split(/[\s,;]+/).map((item) => item.trim()).filter(Boolean);
19127
+ }
19128
+ function entryFromConfig(value) {
19129
+ const mode = GROUP_TRIGGER_MODE_OPTIONS.some((option) => option.value === value?.mode) ? value.mode : "off";
19130
+ const senders = Array.isArray(value?.senders) ? value.senders.map((id6) => String(id6)) : [];
19131
+ return { mode, sendersText: senders.join("\n") };
19132
+ }
19133
+ function stateFromSnapshot(value) {
19134
+ const source = value && typeof value === "object" ? value : {};
19135
+ const groups = {};
19136
+ for (const [chatId, entry] of Object.entries(source.groups ?? {})) {
19137
+ groups[String(chatId)] = entryFromConfig(entry);
19138
+ }
19139
+ const seen = {};
19140
+ for (const entry of Array.isArray(source.seen) ? source.seen : []) {
19141
+ const chatId = typeof entry?.chatId === "string" ? entry.chatId : "";
19142
+ if (!chatId) continue;
19143
+ seen[chatId] = {
19144
+ title: typeof entry.title === "string" ? entry.title : null,
19145
+ type: typeof entry.type === "string" ? entry.type : null,
19146
+ lastSeenAt: typeof entry.lastSeenAt === "string" ? entry.lastSeenAt : null,
19147
+ lastSenderName: typeof entry.lastSenderName === "string" ? entry.lastSenderName : null
19148
+ };
19149
+ }
19150
+ return { defaults: entryFromConfig(source.defaults), groups, seen, removed: [] };
19151
+ }
19152
+ function unwrapRpcResult15(result2) {
19153
+ if (result2?.ok === false) {
19154
+ const error = new Error(result2.error?.message || "\u65E0\u6CD5\u8BFB\u53D6\u6216\u4FDD\u5B58\u7FA4\u804A\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002");
19155
+ error.code = result2.error?.code;
19156
+ throw error;
19157
+ }
19158
+ return result2?.ok === true ? result2.value : result2;
19159
+ }
19160
+ function formatMoment(value) {
19161
+ if (typeof value !== "string" || !value) return "\u2014";
19162
+ return value.slice(0, 16).replace("T", " ");
19163
+ }
19164
+ function memberHelp(entry) {
19165
+ if (splitMemberIds(entry.sendersText).length > 0) return null;
19166
+ return isListMode(entry.mode) ? "\u540D\u5355\u4E3A\u7A7A\uFF1A\u8BE5\u6A21\u5F0F\u4E0D\u4F1A\u54CD\u5E94\u4EFB\u4F55\u6210\u5458\u3002" : "\u5F53\u524D\u6A21\u5F0F\u4E0D\u4F7F\u7528\u540D\u5355\u3002";
19167
+ }
19168
+ function ModeField({ entry, onChange, disabled }) {
19169
+ return h2(
19170
+ "label",
19171
+ { className: "dim-accessField" },
19172
+ h2("span", null, "\u54CD\u5E94\u6761\u4EF6"),
19173
+ h2("select", {
19174
+ value: entry.mode,
19175
+ disabled,
19176
+ onChange: (event) => onChange(event.target.value)
19177
+ }, GROUP_TRIGGER_MODE_OPTIONS.map((option) => h2("option", {
19178
+ key: option.value,
19179
+ value: option.value
19180
+ }, option.label)))
19181
+ );
19182
+ }
19183
+ function MembersField({ entry, onChange, disabled }) {
19184
+ const help = memberHelp(entry);
19185
+ return h2(
19186
+ "label",
19187
+ { className: "dim-accessField" },
19188
+ h2("span", null, "\u6210\u5458\u540D\u5355"),
19189
+ h2("textarea", {
19190
+ ...AUTOFILL_GUARD,
19191
+ value: entry.sendersText,
19192
+ rows: 2,
19193
+ disabled,
19194
+ spellCheck: false,
19195
+ placeholder: "123456789",
19196
+ onChange: (event) => onChange(event.target.value)
19197
+ }),
19198
+ help ? h2("span", { className: "dim-channelHelp" }, help) : null
19199
+ );
19200
+ }
19201
+ function ValueRow({ label, value, suffix }) {
19202
+ return h2(
19203
+ "div",
19204
+ { className: "dim-accessField" },
19205
+ h2("span", null, label),
19206
+ h2("code", { className: "dim-groupTriggerValue" }, value, suffix ?? null)
19207
+ );
19208
+ }
19209
+ var AUTOFILL_GUARD = Object.freeze({
19210
+ autoComplete: "off",
19211
+ autoCapitalize: "none",
19212
+ autoCorrect: "off",
19213
+ "data-1p-ignore": "true",
19214
+ "data-lpignore": "true",
19215
+ "data-bwignore": "true",
19216
+ "data-form-type": "other"
19217
+ });
19218
+ function TelegramGroupTriggersSettings({ account, rpcCall }) {
19219
+ const [state, setState] = React37.useState(null);
19220
+ const [addDraft, setAddDraft] = React37.useState(null);
19221
+ const [manualId, setManualId] = React37.useState("");
19222
+ const [phase, setPhase] = React37.useState("loading");
19223
+ const [saving, setSaving] = React37.useState(false);
19224
+ const [resolving, setResolving] = React37.useState(false);
19225
+ const [feedback, setFeedback] = React37.useState(null);
19226
+ const botId = account?.botId;
19227
+ const load = React37.useCallback(async () => {
19228
+ setPhase("loading");
19229
+ setFeedback(null);
19230
+ try {
19231
+ const value = unwrapRpcResult15(await rpcCall(GROUP_TRIGGERS_ENDPOINTS.get, { botId }));
19232
+ setState(stateFromSnapshot(value));
19233
+ setAddDraft(null);
19234
+ setPhase("ready");
19235
+ } catch (error) {
19236
+ setPhase("error");
19237
+ setFeedback({ tone: "error", message: error?.message || "\u65E0\u6CD5\u8BFB\u53D6\u7FA4\u804A\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002" });
19238
+ }
19239
+ }, [botId, rpcCall]);
19240
+ React37.useEffect(() => {
19241
+ void load();
19242
+ }, [load]);
19243
+ if (phase === "loading") {
19244
+ return h2("div", { className: "dim-accessState", "aria-busy": "true" }, "\u6B63\u5728\u8BFB\u53D6\u7FA4\u804A\u8BBE\u7F6E\u2026");
19245
+ }
19246
+ if (phase === "error" || !state) {
19247
+ return h2(
19248
+ "div",
19249
+ { className: "dim-accessState", role: "alert" },
19250
+ h2("p", null, feedback?.message || "\u65E0\u6CD5\u8BFB\u53D6\u7FA4\u804A\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"),
19251
+ h2(
19252
+ "button",
19253
+ { type: "button", className: "dim-deliveryButton", onClick: () => void load() },
19254
+ "\u91CD\u8BD5"
19255
+ )
19256
+ );
19257
+ }
19258
+ const removed = new Set(state.removed);
19259
+ const chatIds = [.../* @__PURE__ */ new Set([...Object.keys(state.groups), ...Object.keys(state.seen)])].filter((chatId) => !removed.has(chatId));
19260
+ const addEntry = addDraft ?? DEFAULT_ENTRY;
19261
+ const updateDefault = (patch) => {
19262
+ setState((current) => ({ ...current, defaults: { ...current.defaults, ...patch } }));
19263
+ setFeedback(null);
19264
+ };
19265
+ const updateGroup = (chatId, patch) => {
19266
+ setState((current) => ({
19267
+ ...current,
19268
+ groups: { ...current.groups, [chatId]: { ...current.groups[chatId] ?? current.defaults, ...patch } }
19269
+ }));
19270
+ setFeedback(null);
19271
+ };
19272
+ const removeGroup = (chatId) => {
19273
+ setState((current) => {
19274
+ const groups = { ...current.groups };
19275
+ delete groups[chatId];
19276
+ return { ...current, groups, removed: [...current.removed, chatId] };
19277
+ });
19278
+ setFeedback({ tone: "success", message: "\u5DF2\u4ECE\u5217\u8868\u79FB\u9664\uFF0C\u4FDD\u5B58\u540E\u751F\u6548\u3002" });
19279
+ };
19280
+ const addGroup = async () => {
19281
+ const raw = manualId.replace(/[\s\u00a0]+/g, "");
19282
+ if (!raw) return;
19283
+ setResolving(true);
19284
+ setFeedback(null);
19285
+ try {
19286
+ const resolved = unwrapRpcResult15(await rpcCall(GROUP_TRIGGERS_ENDPOINTS.resolve, { botId, input: raw }));
19287
+ const chatId = typeof resolved?.chatId === "string" ? resolved.chatId : "";
19288
+ if (!chatId) throw new Error("\u65E0\u6CD5\u89E3\u6790\u8BE5\u7FA4\u804A\uFF0C\u8BF7\u91CD\u8BD5\u6216\u586B\u5199\u6570\u5B57\u7FA4 ID\u3002");
19289
+ if (Object.hasOwn(state.groups, chatId)) {
19290
+ setFeedback({
19291
+ tone: "error",
19292
+ message: "\u8BE5\u7FA4\u5DF2\u5728\u5217\u8868\u4E2D\uFF0C\u8BF7\u7F16\u8F91\u4E0A\u65B9\u7684\u5361\u7247\u3002",
19293
+ detail: chatId
19294
+ });
19295
+ return;
19296
+ }
19297
+ setState((current) => ({
19298
+ ...current,
19299
+ groups: { ...current.groups, [chatId]: { ...addEntry } },
19300
+ // Re-adding a hidden chat must undo the previous removal.
19301
+ removed: current.removed.filter((entry) => entry !== chatId),
19302
+ seen: resolved?.title ? { ...current.seen, [chatId]: { ...current.seen[chatId] ?? {}, title: resolved.title } } : current.seen
19303
+ }));
19304
+ setManualId("");
19305
+ setAddDraft(null);
19306
+ setFeedback({
19307
+ tone: "success",
19308
+ message: resolved?.verified === false ? "\u5DF2\u6DFB\u52A0\u3002Telegram \u672A\u786E\u8BA4\u8BE5\u7FA4\uFF08\u673A\u5668\u4EBA\u53EF\u80FD\u8FD8\u4E0D\u5728\u7FA4\u91CC\uFF09\uFF0C\u4FDD\u5B58\u540E\u751F\u6548\u3002" : "\u5DF2\u6DFB\u52A0\uFF0C\u4FDD\u5B58\u540E\u751F\u6548\u3002"
19309
+ });
19310
+ } catch (error) {
19311
+ setFeedback({ tone: "error", message: error?.message || "\u65E0\u6CD5\u89E3\u6790\u8BE5\u7FA4\u804A\uFF0C\u8BF7\u91CD\u8BD5\u6216\u586B\u5199\u6570\u5B57\u7FA4 ID\u3002" });
19312
+ } finally {
19313
+ setResolving(false);
19314
+ }
19315
+ };
19316
+ const save = async (event) => {
19317
+ event.preventDefault();
19318
+ setSaving(true);
19319
+ setFeedback(null);
19320
+ try {
19321
+ const groups = {};
19322
+ for (const [chatId, entry] of Object.entries(state.groups)) {
19323
+ groups[chatId] = { mode: entry.mode, senders: splitMemberIds(entry.sendersText) };
19324
+ }
19325
+ const value = unwrapRpcResult15(await rpcCall(GROUP_TRIGGERS_ENDPOINTS.set, {
19326
+ botId,
19327
+ config: {
19328
+ defaults: { mode: state.defaults.mode, senders: splitMemberIds(state.defaults.sendersText) },
19329
+ groups
19330
+ },
19331
+ removed: state.removed
19332
+ }));
19333
+ setState(stateFromSnapshot(value));
19334
+ setAddDraft(null);
19335
+ setFeedback({ tone: "success", message: "\u7FA4\u804A\u8BBE\u7F6E\u5DF2\u4FDD\u5B58\u3002" });
19336
+ } catch (error) {
19337
+ setFeedback({ tone: "error", message: error?.message || "\u65E0\u6CD5\u4FDD\u5B58\u7FA4\u804A\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002" });
19338
+ } finally {
19339
+ setSaving(false);
19340
+ }
19341
+ };
19342
+ return h2(
19343
+ "form",
19344
+ { className: "dim-accessPage", onSubmit: (event) => void save(event) },
19345
+ h2(
19346
+ "fieldset",
19347
+ { className: "dim-accessScene" },
19348
+ h2("legend", null, "\u65B0\u7FA4\u804A\u9ED8\u8BA4\u8BBE\u7F6E"),
19349
+ h2(
19350
+ "div",
19351
+ { className: "dim-accessControls" },
19352
+ h2(ModeField, {
19353
+ entry: state.defaults,
19354
+ disabled: saving,
19355
+ onChange: (mode) => updateDefault({ mode })
19356
+ })
19357
+ ),
19358
+ h2(MembersField, {
19359
+ entry: state.defaults,
19360
+ disabled: saving,
19361
+ onChange: (sendersText) => updateDefault({ sendersText })
19362
+ })
19363
+ ),
19364
+ chatIds.map((chatId) => {
19365
+ const configured = Object.hasOwn(state.groups, chatId);
19366
+ const entry = state.groups[chatId] ?? state.defaults;
19367
+ const info = state.seen[chatId] ?? {};
19368
+ return h2(
19369
+ "fieldset",
19370
+ { key: chatId, className: "dim-accessScene" },
19371
+ h2("legend", null, info.title || chatId),
19372
+ h2(ValueRow, { label: "\u7FA4 ID", value: chatId }),
19373
+ info.title ? h2(ValueRow, { label: "\u6807\u9898", value: info.title }) : null,
19374
+ h2(ValueRow, {
19375
+ label: "\u6700\u8FD1\u6D3B\u52A8",
19376
+ value: `${formatMoment(info.lastSeenAt)}${info.lastSenderName ? ` \xB7 ${info.lastSenderName}` : ""}`
19377
+ }),
19378
+ configured ? h2(ModeField, {
19379
+ entry,
19380
+ disabled: saving,
19381
+ onChange: (mode) => updateGroup(chatId, { mode })
19382
+ }) : h2(ValueRow, {
19383
+ label: "\u54CD\u5E94\u6761\u4EF6",
19384
+ value: modeLabel(state.defaults.mode),
19385
+ suffix: "\uFF08\u9ED8\u8BA4\uFF09"
19386
+ }),
19387
+ configured ? h2(MembersField, {
19388
+ entry,
19389
+ disabled: saving,
19390
+ onChange: (sendersText) => updateGroup(chatId, { sendersText })
19391
+ }) : null,
19392
+ h2(
19393
+ "div",
19394
+ { className: "dim-accessActions" },
19395
+ configured ? null : h2("button", {
19396
+ type: "button",
19397
+ className: "dim-deliveryButton",
19398
+ "data-kind": "primary",
19399
+ disabled: saving,
19400
+ onClick: () => updateGroup(chatId, {})
19401
+ }, "\u81EA\u5B9A\u4E49"),
19402
+ h2("button", {
19403
+ type: "button",
19404
+ className: "dim-deliveryButton",
19405
+ "data-kind": "danger",
19406
+ disabled: saving,
19407
+ onClick: () => removeGroup(chatId)
19408
+ }, "\xD7 \u79FB\u9664")
19409
+ )
19410
+ );
19411
+ }),
19412
+ h2(
19413
+ "fieldset",
19414
+ { className: "dim-accessScene" },
19415
+ h2("legend", null, "\u6DFB\u52A0\u7FA4\u804A"),
19416
+ h2(
19417
+ "label",
19418
+ { className: "dim-accessField" },
19419
+ h2("span", null, "\u7FA4 ID\u3001@\u7528\u6237\u540D\u6216\u6D88\u606F\u94FE\u63A5"),
19420
+ h2("textarea", {
19421
+ ...AUTOFILL_GUARD,
19422
+ value: manualId,
19423
+ rows: 1,
19424
+ spellCheck: false,
19425
+ placeholder: "-1001234567890",
19426
+ style: { resize: "none", minHeight: "2.4em", overflow: "hidden" },
19427
+ onChange: (event) => setManualId(event.target.value.replace(/[\s\u00a0]+/g, "")),
19428
+ onKeyDown: (event) => {
19429
+ if (event.key !== "Enter") return;
19430
+ event.preventDefault();
19431
+ if (!saving && !resolving && manualId) void addGroup();
19432
+ }
19433
+ }),
19434
+ h2(
19435
+ "span",
19436
+ { className: "dim-channelHelp" },
19437
+ "\u652F\u6301\u6570\u5B57 ID\u3001@\u7528\u6237\u540D\u3001t.me/<name> \u6216 t.me/c/<id>/<msg>\uFF1B\u771F\u5B9E ID \u901A\u8FC7 getChat \u89E3\u6790\u3002"
19438
+ )
19439
+ ),
19440
+ h2(
19441
+ "div",
19442
+ { className: "dim-accessControls" },
19443
+ h2(ModeField, {
19444
+ entry: addEntry,
19445
+ disabled: saving,
19446
+ onChange: (mode) => setAddDraft({ ...addEntry, mode })
19447
+ })
19448
+ ),
19449
+ h2(MembersField, {
19450
+ entry: addEntry,
19451
+ disabled: saving,
19452
+ onChange: (sendersText) => setAddDraft({ ...addEntry, sendersText })
19453
+ }),
19454
+ h2(
19455
+ "div",
19456
+ { className: "dim-accessActions" },
19457
+ h2("button", {
19458
+ type: "button",
19459
+ className: "dim-deliveryButton",
19460
+ "data-kind": "primary",
19461
+ disabled: saving || resolving || !manualId,
19462
+ onClick: () => void addGroup()
19463
+ }, resolving ? "\u2026" : "+ \u6DFB\u52A0")
19464
+ )
19465
+ ),
19466
+ feedback ? h2("p", {
19467
+ className: "dim-accessFeedback",
19468
+ "data-tone": feedback.tone,
19469
+ role: feedback.tone === "error" ? "alert" : "status",
19470
+ "aria-live": "polite"
19471
+ }, feedback.message, feedback.detail ? h2("code", { className: "dim-groupTriggerValue" }, feedback.detail) : null) : null,
19472
+ h2(
19473
+ "div",
19474
+ { className: "dim-accessActions" },
19475
+ h2("button", {
19476
+ type: "submit",
19477
+ className: "dim-deliveryButton",
19478
+ "data-kind": "primary",
19479
+ disabled: saving
19480
+ }, saving ? "\u6B63\u5728\u4FDD\u5B58\u2026" : "\u4FDD\u5B58\u7FA4\u804A\u8BBE\u7F6E")
19481
+ )
19482
+ );
19483
+ }
19484
+
19485
+ // plugin-src/client/delivery-settings.js
19486
+ var DELIVERY_RPC_CHANNEL = "/dsh-im-delivery";
19487
+ var DELIVERY_DOCS_URL = Object.freeze({
18154
19488
  zh: "https://github.com/xmanrui/dsh-im/blob/main/PROACTIVE_DELIVERY.md",
18155
19489
  en: "https://github.com/xmanrui/dsh-im/blob/main/PROACTIVE_DELIVERY.en.md"
18156
19490
  });
@@ -18166,6 +19500,7 @@ var DELIVERY_ENDPOINTS = Object.freeze({
18166
19500
  var BOT_SETTINGS_TABS = Object.freeze([
18167
19501
  Object.freeze({ id: "general", label: "\u901A\u7528" }),
18168
19502
  Object.freeze({ id: "delivery", label: "\u6295\u9012\u8BBE\u7F6E" }),
19503
+ Object.freeze({ id: "ds-bot", label: "\u7ED1\u5B9Abot" }),
18169
19504
  Object.freeze({ id: "access", label: "\u8BBF\u95EE\u8BBE\u7F6E" })
18170
19505
  ]);
18171
19506
  var FEISHU_BOT_SETTINGS_TABS = Object.freeze([
@@ -18174,8 +19509,14 @@ var FEISHU_BOT_SETTINGS_TABS = Object.freeze([
18174
19509
  Object.freeze({ id: "slash", label: "\u6307\u4EE4\u9762\u677F" }),
18175
19510
  Object.freeze({ id: "voice", label: "\u8BED\u97F3\u4EA4\u4E92" })
18176
19511
  ]);
19512
+ var TELEGRAM_BOT_SETTINGS_TABS = Object.freeze([
19513
+ ...BOT_SETTINGS_TABS,
19514
+ Object.freeze({ id: "groups", label: "\u673A\u5668\u4EBA\u7FA4\u804A\u884C\u4E3A" })
19515
+ ]);
18177
19516
  function botSettingsTabsForChannel(channel7) {
18178
- return channel7 === "feishu" ? FEISHU_BOT_SETTINGS_TABS : BOT_SETTINGS_TABS;
19517
+ if (channel7 === "feishu") return FEISHU_BOT_SETTINGS_TABS;
19518
+ if (channel7 === "telegram") return TELEGRAM_BOT_SETTINGS_TABS;
19519
+ return BOT_SETTINGS_TABS;
18179
19520
  }
18180
19521
  var CHANNEL_DEFINITIONS = Object.freeze({
18181
19522
  weixin: {
@@ -18266,7 +19607,7 @@ var CHANNEL_DEFINITIONS = Object.freeze({
18266
19607
  function presentError14(error, fallback) {
18267
19608
  return error?.message || fallback;
18268
19609
  }
18269
- function unwrapRpcResult15(result2) {
19610
+ function unwrapRpcResult16(result2) {
18270
19611
  if (result2?.ok === true) return result2.value;
18271
19612
  if (result2?.ok === false) {
18272
19613
  const error = new Error(result2.error?.message || "\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002");
@@ -18384,13 +19725,13 @@ function TargetForm({
18384
19725
  }) {
18385
19726
  const editing = mode === "edit";
18386
19727
  const initialKind = initialValue?.kind && definition.fields[initialValue.kind] ? initialValue.kind : definition.kinds[0].value;
18387
- const [targetId, setTargetId] = React35.useState(initialValue?.targetId ?? "");
18388
- const [name2, setName] = React35.useState(initialValue?.name ?? "");
18389
- const [kind, setKind] = React35.useState(initialKind);
18390
- const [route, setRoute] = React35.useState(initialValue?.route ?? {});
18391
- const [error, setError] = React35.useState(null);
18392
- const [testing, setTesting] = React35.useState(false);
18393
- const [testState, setTestState] = React35.useState(null);
19728
+ const [targetId, setTargetId] = React38.useState(initialValue?.targetId ?? "");
19729
+ const [name2, setName] = React38.useState(initialValue?.name ?? "");
19730
+ const [kind, setKind] = React38.useState(initialKind);
19731
+ const [route, setRoute] = React38.useState(initialValue?.route ?? {});
19732
+ const [error, setError] = React38.useState(null);
19733
+ const [testing, setTesting] = React38.useState(false);
19734
+ const [testState, setTestState] = React38.useState(null);
18394
19735
  const currentTarget = () => {
18395
19736
  const normalizedRoute = Object.fromEntries(fieldsFor(definition, kind).map((field2) => {
18396
19737
  const raw = String(route[field2.key] ?? "").trim();
@@ -18607,7 +19948,7 @@ function TargetSuggestionPicker({
18607
19948
  suggestions.map((suggestion, index) => {
18608
19949
  const identity = routeIdentity(definition, suggestion);
18609
19950
  const added = configured.has(identity);
18610
- return React35.createElement("option", {
19951
+ return React38.createElement("option", {
18611
19952
  key: suggestion.id ?? suggestion.suggestionId ?? `${identity}:${index}`,
18612
19953
  value: String(index),
18613
19954
  disabled: added
@@ -18624,11 +19965,11 @@ function TargetSuggestionPicker({
18624
19965
  );
18625
19966
  }
18626
19967
  function TargetRow({ definition, target, botId, connected, rpcCall, onChanged, onEdit }) {
18627
- const [action, setAction] = React35.useState(null);
18628
- const [testState, setTestState] = React35.useState(null);
18629
- const [syncFeedback, setSyncFeedback] = React35.useState(null);
18630
- const [copyState, setCopyState] = React35.useState(null);
18631
- const [confirmDelete, setConfirmDelete] = React35.useState(false);
19968
+ const [action, setAction] = React38.useState(null);
19969
+ const [testState, setTestState] = React38.useState(null);
19970
+ const [syncFeedback, setSyncFeedback] = React38.useState(null);
19971
+ const [copyState, setCopyState] = React38.useState(null);
19972
+ const [confirmDelete, setConfirmDelete] = React38.useState(false);
18632
19973
  const sessionSync = target.sessionSync ?? { enabled: false, state: "unavailable" };
18633
19974
  const syncDescription = sessionSync.state === "active" ? "\u81EA\u52A8\u8DDF\u968F\u8BE5\u79C1\u804A\u7684\u5F53\u524D\u4F1A\u8BDD" : sessionSync.state === "waiting" ? "\u7B49\u5F85\u8BE5\u79C1\u804A\u5EFA\u7ACB\u65B0\u4F1A\u8BDD" : sessionSync.state === "unavailable" ? "\u4EC5\u652F\u6301\u5DF2\u7ECF\u804A\u8FC7\u3001\u5DF2\u5EFA\u7ACB\u5F53\u524D\u4F1A\u8BDD\u4E14\u4F7F\u7528\u5F53\u524D Host Harness \u7684\u79C1\u804A\u76EE\u6807" : "\u5173\u95ED\u65F6\u4E0D\u53D1\u9001 DSH \u4F1A\u8BDD\u6D88\u606F";
18634
19975
  const testTarget = async () => {
@@ -18691,7 +20032,7 @@ function TargetRow({ definition, target, botId, connected, rpcCall, onChanged, o
18691
20032
  h2(
18692
20033
  "div",
18693
20034
  { className: "dim-targetTitle" },
18694
- React35.createElement("strong", null, target.name || target.targetId),
20035
+ React38.createElement("strong", null, target.name || target.targetId),
18695
20036
  h2("span", null, kindLabel(definition, target.kind))
18696
20037
  ),
18697
20038
  h2("code", null, `targetId: ${target.targetId}`)
@@ -18777,30 +20118,30 @@ function DeliveryTargetSettingsPage({
18777
20118
  onBack
18778
20119
  }) {
18779
20120
  const definition = CHANNEL_DEFINITIONS[channel7];
18780
- const [activeTabId, setActiveTabId] = React35.useState(BOT_SETTINGS_TABS[0].id);
18781
- const [phase, setPhase] = React35.useState("loading");
18782
- const [targets, setTargets] = React35.useState([]);
18783
- const [suggestionPhase, setSuggestionPhase] = React35.useState("idle");
18784
- const [suggestions, setSuggestions] = React35.useState([]);
18785
- const [suggestionError, setSuggestionError] = React35.useState(null);
18786
- const [error, setError] = React35.useState(null);
18787
- const [editor, setEditor] = React35.useState(null);
18788
- const [saving, setSaving] = React35.useState(false);
18789
- const [botCopyState, setBotCopyState] = React35.useState(null);
18790
- const [accessPolicy, setAccessPolicy] = React35.useState(account.accessPolicy);
18791
- const [slashPanel, setSlashPanel] = React35.useState(account.slashPanel);
18792
- const mounted = React35.useRef(true);
18793
- React35.useEffect(() => {
20121
+ const [activeTabId, setActiveTabId] = React38.useState(BOT_SETTINGS_TABS[0].id);
20122
+ const [phase, setPhase] = React38.useState("loading");
20123
+ const [targets, setTargets] = React38.useState([]);
20124
+ const [suggestionPhase, setSuggestionPhase] = React38.useState("idle");
20125
+ const [suggestions, setSuggestions] = React38.useState([]);
20126
+ const [suggestionError, setSuggestionError] = React38.useState(null);
20127
+ const [error, setError] = React38.useState(null);
20128
+ const [editor, setEditor] = React38.useState(null);
20129
+ const [saving, setSaving] = React38.useState(false);
20130
+ const [botCopyState, setBotCopyState] = React38.useState(null);
20131
+ const [accessPolicy, setAccessPolicy] = React38.useState(account.accessPolicy);
20132
+ const [slashPanel, setSlashPanel] = React38.useState(account.slashPanel);
20133
+ const mounted = React38.useRef(true);
20134
+ React38.useEffect(() => {
18794
20135
  setAccessPolicy(account.accessPolicy);
18795
20136
  }, [account.botId, account.accessPolicy]);
18796
- React35.useEffect(() => {
20137
+ React38.useEffect(() => {
18797
20138
  setSlashPanel(account.slashPanel);
18798
20139
  }, [account.botId, account.slashPanel]);
18799
- const invoke = React35.useCallback(async (endpoint, payload = {}, signal) => {
20140
+ const invoke = React38.useCallback(async (endpoint, payload = {}, signal) => {
18800
20141
  if (typeof rpcCall !== "function") throw new Error("\u6295\u9012\u76EE\u6807\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002");
18801
- return unwrapRpcResult15(await rpcCall(endpoint, payload, signal));
20142
+ return unwrapRpcResult16(await rpcCall(endpoint, payload, signal));
18802
20143
  }, [rpcCall]);
18803
- const loadTargets = React35.useCallback(async ({ signal, silent = false } = {}) => {
20144
+ const loadTargets = React38.useCallback(async ({ signal, silent = false } = {}) => {
18804
20145
  if (!silent) setPhase("loading");
18805
20146
  setError(null);
18806
20147
  try {
@@ -18814,7 +20155,7 @@ function DeliveryTargetSettingsPage({
18814
20155
  setPhase("error");
18815
20156
  }
18816
20157
  }, [account.botId, invoke]);
18817
- const loadSuggestions = React35.useCallback(async () => {
20158
+ const loadSuggestions = React38.useCallback(async () => {
18818
20159
  setSuggestionPhase("loading");
18819
20160
  setSuggestionError(null);
18820
20161
  try {
@@ -18828,7 +20169,7 @@ function DeliveryTargetSettingsPage({
18828
20169
  setSuggestionPhase("error");
18829
20170
  }
18830
20171
  }, [account.botId, definition, invoke]);
18831
- React35.useEffect(() => {
20172
+ React38.useEffect(() => {
18832
20173
  mounted.current = true;
18833
20174
  const controller = new AbortController();
18834
20175
  void loadTargets({ signal: controller.signal });
@@ -18923,11 +20264,19 @@ function DeliveryTargetSettingsPage({
18923
20264
  role: "tabpanel",
18924
20265
  "aria-labelledby": activeTabDomId
18925
20266
  },
18926
- activeTab.id === "general" ? h2(BotGeneralSettingsPage, { key: `${channel7}:${account.botId}`, channel: channel7, account, rpcCall: accessRpcCall }) : activeTab.id === "access" ? h2(AccessPolicySettingsPage, {
20267
+ activeTab.id === "general" ? h2(BotGeneralSettingsPage, { key: `${channel7}:${account.botId}`, channel: channel7, account, rpcCall: accessRpcCall }) : activeTab.id === "ds-bot" ? h2(DsBotSettingsPage, {
20268
+ key: account.botId,
20269
+ botId: account.botId,
20270
+ rpcCall: invoke
20271
+ }) : activeTab.id === "access" ? h2(AccessPolicySettingsPage, {
18927
20272
  channel: channel7,
18928
20273
  account: { ...account, accessPolicy },
18929
20274
  rpcCall: accessRpcCall,
18930
20275
  onSaved: setAccessPolicy
20276
+ }) : activeTab.id === "groups" && channel7 === "telegram" ? h2(TelegramGroupTriggersSettings, {
20277
+ key: `${channel7}:${account.botId}:groups`,
20278
+ account,
20279
+ rpcCall: accessRpcCall
18931
20280
  }) : activeTab.id === "group" && channel7 === "feishu" ? h2(FeishuGroupSettingsPage, {
18932
20281
  account,
18933
20282
  rpcCall: accessRpcCall
@@ -18940,7 +20289,7 @@ function DeliveryTargetSettingsPage({
18940
20289
  account,
18941
20290
  rpcCall: accessRpcCall
18942
20291
  }) : h2(
18943
- React35.Fragment,
20292
+ React38.Fragment,
18944
20293
  null,
18945
20294
  h2(
18946
20295
  "section",
@@ -19051,7 +20400,7 @@ function DeliveryTargetSettingsPage({
19051
20400
  }
19052
20401
 
19053
20402
  // plugin-src/client/group-history-settings.js
19054
- var React36 = __toESM(require("react"), 1);
20403
+ var React39 = __toESM(require("react"), 1);
19055
20404
  var GROUP_HISTORY_SETTINGS_ENDPOINTS = Object.freeze({
19056
20405
  get: "settings.group-history.get",
19057
20406
  set: "settings.group-history.set"
@@ -19061,14 +20410,14 @@ function result(value) {
19061
20410
  return value?.ok === true ? value.value : value;
19062
20411
  }
19063
20412
  function GroupHistorySettings({ rpcCall }) {
19064
- const [days, setDays] = React36.useState("14");
19065
- const [phase, setPhase] = React36.useState("loading");
19066
- const [error, setError] = React36.useState(null);
19067
- const [notice, setNotice] = React36.useState(null);
19068
- const mounted = React36.useRef(false);
19069
- const busy = React36.useRef(false);
19070
- const id6 = React36.useId();
19071
- const load = React36.useCallback(async (signal) => {
20413
+ const [days, setDays] = React39.useState("14");
20414
+ const [phase, setPhase] = React39.useState("loading");
20415
+ const [error, setError] = React39.useState(null);
20416
+ const [notice, setNotice] = React39.useState(null);
20417
+ const mounted = React39.useRef(false);
20418
+ const busy = React39.useRef(false);
20419
+ const id6 = React39.useId();
20420
+ const load = React39.useCallback(async (signal) => {
19072
20421
  setPhase("loading");
19073
20422
  setError(null);
19074
20423
  try {
@@ -19084,7 +20433,7 @@ function GroupHistorySettings({ rpcCall }) {
19084
20433
  setPhase("error");
19085
20434
  }
19086
20435
  }, [rpcCall]);
19087
- React36.useEffect(() => {
20436
+ React39.useEffect(() => {
19088
20437
  mounted.current = true;
19089
20438
  const controller = new AbortController();
19090
20439
  void load(controller.signal);
@@ -19171,7 +20520,7 @@ function GroupHistorySettings({ rpcCall }) {
19171
20520
  }
19172
20521
 
19173
20522
  // plugin-src/client/sidebar-settings.js
19174
- var React37 = __toESM(require("react"), 1);
20523
+ var React40 = __toESM(require("react"), 1);
19175
20524
  var SIDEBAR_SETTINGS_RPC_CHANNEL = "/dsh-im-sidebar";
19176
20525
  var SIDEBAR_SETTINGS_ENDPOINTS = Object.freeze({
19177
20526
  get: "settings.sidebar-entry.get",
@@ -19237,16 +20586,16 @@ function installSidebarVisibilitySync({
19237
20586
  };
19238
20587
  }
19239
20588
  function SidebarSettings({ rpcCall }) {
19240
- const [mode, setMode] = React37.useState("auto");
19241
- const [phase, setPhase] = React37.useState("loading");
19242
- const [error, setError] = React37.useState(null);
19243
- const [saved, setSaved] = React37.useState(false);
19244
- const mounted = React37.useRef(false);
19245
- const busy = React37.useRef(false);
19246
- const failedMode = React37.useRef(null);
19247
- const id6 = React37.useId();
20589
+ const [mode, setMode] = React40.useState("auto");
20590
+ const [phase, setPhase] = React40.useState("loading");
20591
+ const [error, setError] = React40.useState(null);
20592
+ const [saved, setSaved] = React40.useState(false);
20593
+ const mounted = React40.useRef(false);
20594
+ const busy = React40.useRef(false);
20595
+ const failedMode = React40.useRef(null);
20596
+ const id6 = React40.useId();
19248
20597
  const disabled = phase === "loading" || phase === "saving";
19249
- const load = React37.useCallback(async (signal) => {
20598
+ const load = React40.useCallback(async (signal) => {
19250
20599
  setPhase("loading");
19251
20600
  setError(null);
19252
20601
  setSaved(false);
@@ -19262,7 +20611,7 @@ function SidebarSettings({ rpcCall }) {
19262
20611
  setPhase("error");
19263
20612
  }
19264
20613
  }, [rpcCall]);
19265
- React37.useEffect(() => {
20614
+ React40.useEffect(() => {
19266
20615
  mounted.current = true;
19267
20616
  const abort = new AbortController();
19268
20617
  void load(abort.signal);
@@ -19357,7 +20706,7 @@ function SidebarSettings({ rpcCall }) {
19357
20706
  }
19358
20707
 
19359
20708
  // plugin-src/client/global-settings.js
19360
- var React38 = __toESM(require("react"), 1);
20709
+ var React41 = __toESM(require("react"), 1);
19361
20710
 
19362
20711
  // src/channels/shared/inbound-ttl.mjs
19363
20712
  var DEFAULT_INBOUND_TTL_HOURS = 168;
@@ -19412,7 +20761,7 @@ var GLOBAL_SETTINGS_ENDPOINTS = Object.freeze({
19412
20761
  function presentError15(error, fallback) {
19413
20762
  return error?.message || fallback;
19414
20763
  }
19415
- function unwrapRpcResult16(result2) {
20764
+ function unwrapRpcResult17(result2) {
19416
20765
  if (result2?.ok === true) return result2.value;
19417
20766
  if (result2?.ok === false) {
19418
20767
  const error = new Error(result2.error?.message || "\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002");
@@ -19442,18 +20791,18 @@ function GlobalButton({ children, kind = "secondary", className = "", ...props }
19442
20791
  }, children);
19443
20792
  }
19444
20793
  function ImageInputSettings({ rpcCall }) {
19445
- const [values, setValues] = React38.useState(DEFAULT_IMAGE_INPUT_SETTINGS);
19446
- const [phase, setPhase] = React38.useState("loading");
19447
- const [error, setError] = React38.useState(null);
19448
- const [saved, setSaved] = React38.useState(false);
19449
- const mounted = React38.useRef(false);
19450
- const saving = React38.useRef(false);
19451
- const id6 = React38.useId();
19452
- const load = React38.useCallback(async (signal) => {
20794
+ const [values, setValues] = React41.useState(DEFAULT_IMAGE_INPUT_SETTINGS);
20795
+ const [phase, setPhase] = React41.useState("loading");
20796
+ const [error, setError] = React41.useState(null);
20797
+ const [saved, setSaved] = React41.useState(false);
20798
+ const mounted = React41.useRef(false);
20799
+ const saving = React41.useRef(false);
20800
+ const id6 = React41.useId();
20801
+ const load = React41.useCallback(async (signal) => {
19453
20802
  setPhase("loading");
19454
20803
  setError(null);
19455
20804
  try {
19456
- const result2 = unwrapRpcResult16(await rpcCall(GLOBAL_SETTINGS_ENDPOINTS.getImages, {}, signal));
20805
+ const result2 = unwrapRpcResult17(await rpcCall(GLOBAL_SETTINGS_ENDPOINTS.getImages, {}, signal));
19457
20806
  if (signal?.aborted || !mounted.current) return;
19458
20807
  const settings = normalizeImageInputSettings(result2);
19459
20808
  if (!settings) throw new Error("\u901A\u7528\u8BBE\u7F6E\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002");
@@ -19465,7 +20814,7 @@ function ImageInputSettings({ rpcCall }) {
19465
20814
  setPhase("error");
19466
20815
  }
19467
20816
  }, [rpcCall]);
19468
- React38.useEffect(() => {
20817
+ React41.useEffect(() => {
19469
20818
  mounted.current = true;
19470
20819
  const controller = new AbortController();
19471
20820
  void load(controller.signal);
@@ -19487,7 +20836,7 @@ function ImageInputSettings({ rpcCall }) {
19487
20836
  setPhase("saving");
19488
20837
  setError(null);
19489
20838
  try {
19490
- const result2 = unwrapRpcResult16(await rpcCall(GLOBAL_SETTINGS_ENDPOINTS.setImages, settings));
20839
+ const result2 = unwrapRpcResult17(await rpcCall(GLOBAL_SETTINGS_ENDPOINTS.setImages, settings));
19491
20840
  if (!normalizeImageInputSettings(result2)) throw new Error("\u901A\u7528\u8BBE\u7F6E\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002");
19492
20841
  if (mounted.current) {
19493
20842
  setValues(result2);
@@ -19572,29 +20921,29 @@ function ImageInputSettings({ rpcCall }) {
19572
20921
  );
19573
20922
  }
19574
20923
  function AttachmentSettingsPanel({ rpcCall }) {
19575
- const [phase, setPhase] = React38.useState("loading");
19576
- const [loadError, setLoadError] = React38.useState(null);
19577
- const [ttlInput, setTtlInput] = React38.useState("");
19578
- const [savedTtl, setSavedTtl] = React38.useState(null);
19579
- const [ttlError, setTtlError] = React38.useState(false);
19580
- const [saveError, setSaveError] = React38.useState(null);
19581
- const [saveSucceeded, setSaveSucceeded] = React38.useState(false);
19582
- const [isSaving, setIsSaving] = React38.useState(false);
19583
- const [sweepConfirming, setSweepConfirming] = React38.useState(false);
19584
- const [sweeping, setSweeping] = React38.useState(false);
19585
- const ttlErrorId = React38.useId();
19586
- const ttlHintsId = React38.useId();
19587
- const sweepTriggerId = React38.useId();
19588
- const sweepConfirmId = React38.useId();
19589
- const sweepConfirmTextId = React38.useId();
19590
- const sweepConfirmButtonId = React38.useId();
19591
- const mounted = React38.useRef(true);
19592
- const saving = React38.useRef(false);
19593
- const invoke = React38.useCallback(async (endpoint, payload = {}, signal) => {
20924
+ const [phase, setPhase] = React41.useState("loading");
20925
+ const [loadError, setLoadError] = React41.useState(null);
20926
+ const [ttlInput, setTtlInput] = React41.useState("");
20927
+ const [savedTtl, setSavedTtl] = React41.useState(null);
20928
+ const [ttlError, setTtlError] = React41.useState(false);
20929
+ const [saveError, setSaveError] = React41.useState(null);
20930
+ const [saveSucceeded, setSaveSucceeded] = React41.useState(false);
20931
+ const [isSaving, setIsSaving] = React41.useState(false);
20932
+ const [sweepConfirming, setSweepConfirming] = React41.useState(false);
20933
+ const [sweeping, setSweeping] = React41.useState(false);
20934
+ const ttlErrorId = React41.useId();
20935
+ const ttlHintsId = React41.useId();
20936
+ const sweepTriggerId = React41.useId();
20937
+ const sweepConfirmId = React41.useId();
20938
+ const sweepConfirmTextId = React41.useId();
20939
+ const sweepConfirmButtonId = React41.useId();
20940
+ const mounted = React41.useRef(true);
20941
+ const saving = React41.useRef(false);
20942
+ const invoke = React41.useCallback(async (endpoint, payload = {}, signal) => {
19594
20943
  if (typeof rpcCall !== "function") throw new Error("\u901A\u7528\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002");
19595
- return unwrapRpcResult16(await rpcCall(endpoint, payload, signal));
20944
+ return unwrapRpcResult17(await rpcCall(endpoint, payload, signal));
19596
20945
  }, [rpcCall]);
19597
- const loadSettings = React38.useCallback(async ({ signal } = {}) => {
20946
+ const loadSettings = React41.useCallback(async ({ signal } = {}) => {
19598
20947
  setPhase("loading");
19599
20948
  setLoadError(null);
19600
20949
  try {
@@ -19618,7 +20967,7 @@ function AttachmentSettingsPanel({ rpcCall }) {
19618
20967
  setPhase("error");
19619
20968
  }
19620
20969
  }, [invoke]);
19621
- React38.useEffect(() => {
20970
+ React41.useEffect(() => {
19622
20971
  mounted.current = true;
19623
20972
  const controller = new AbortController();
19624
20973
  void loadSettings({ signal: controller.signal });
@@ -19627,7 +20976,7 @@ function AttachmentSettingsPanel({ rpcCall }) {
19627
20976
  controller.abort();
19628
20977
  };
19629
20978
  }, [loadSettings]);
19630
- React38.useEffect(() => {
20979
+ React41.useEffect(() => {
19631
20980
  if (!sweepConfirming) return;
19632
20981
  globalThis.document?.getElementById(sweepConfirmButtonId)?.focus();
19633
20982
  }, [sweepConfirmButtonId, sweepConfirming]);
@@ -19849,7 +21198,7 @@ function AttachmentSettingsPanel({ rpcCall }) {
19849
21198
  );
19850
21199
  }
19851
21200
  function GlobalSettingsPanel({ rpcCall }) {
19852
- const [tab, setTab] = React38.useState("general");
21201
+ const [tab, setTab] = React41.useState("general");
19853
21202
  const tabs = [{ key: "general", label: "\u901A\u7528" }, { key: "attachments", label: "\u9644\u4EF6" }];
19854
21203
  return h2(
19855
21204
  "section",
@@ -19951,13 +21300,10 @@ var CSS15 = String.raw`
19951
21300
  .dim-sidebarIcon { display: block; flex: none; }
19952
21301
  .dim-pluginOpen { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 14px; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 8px; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-bg-layer-1, #fff); font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; }
19953
21302
  .dim-pluginOpen:hover { background: var(--dsw-alias-interactive-bg-hover, #f7f8fa); }
19954
- .dim-pluginOpen:focus-visible, .dim-pluginBack:focus-visible { outline: 2px solid var(--dsw-alias-state-business-primary, #3370ff); outline-offset: 3px; }
21303
+ .dim-pluginOpen:focus-visible { outline: 2px solid var(--dsw-alias-state-business-primary, #3370ff); outline-offset: 3px; }
19955
21304
  .dim-pluginPage { height: 100%; min-height: 0; overflow: auto; box-sizing: border-box; padding: 24px clamp(16px, 4vw, 48px) 32px; color: var(--dsw-alias-label-primary, #1f2329); }
19956
21305
  .dim-pluginPageContent { max-width: 1080px; margin: 0 auto; }
19957
- .dim-pluginBack { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; margin: 0 0 24px; padding: 6px 8px; border: 0; border-radius: 8px; color: var(--dsw-alias-label-secondary, #646a73); background: transparent; font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; }
19958
- .dim-pluginBack:hover { color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-interactive-bg-hover, #f7f8fa); }
19959
- .dim-pluginBack > span { font-size: 22px; line-height: 20px; }
19960
- @media (pointer: coarse) { .dim-pluginOpen, .dim-pluginBack { min-height: 44px; } }
21306
+ @media (pointer: coarse) { .dim-pluginOpen { min-height: 44px; } }
19961
21307
  .dim-connectionDiagnostic { min-width: 0; width: 100%; color: var(--dsw-alias-label-secondary, #646a73); overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
19962
21308
  .dim-connectionDiagnostic[data-warning="true"] { color: var(--dsw-alias-state-warn-primary, #d97706); }
19963
21309
  .dim-connectionDiagnostic p { margin: 4px 0; }
@@ -20549,6 +21895,25 @@ var CSS15 = String.raw`
20549
21895
  .dim-targetField input[readonly] { color: var(--dsw-alias-label-secondary, #646a73); background: var(--dsw-alias-bg-module-platform, #f7f8fa); }
20550
21896
  .dim-targetFormError { margin: 10px 0 0; font-size: 12px; line-height: 18px; }
20551
21897
  .dim-targetFormActions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; }
21898
+ .dim-dsBotForm { margin-top: 20px; }
21899
+ .dim-dsBotForm .dim-targetFormGrid { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); margin-top: 0; gap: 16px; }
21900
+ .dim-dsBotForm .dim-targetFormActions { margin-top: 16px; }
21901
+ .dim-targetRow.dim-dsBotBinding { grid-template-columns: minmax(0, 1fr) max-content; align-items: center; }
21902
+ .dim-dsBotDestination { margin: 3px 0 0; color: var(--dsw-alias-label-secondary, #646a73); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
21903
+ .dim-dsBotNotice { margin: 20px 0 0; color: var(--dsw-alias-label-secondary, #646a73); font-size: 12px; line-height: 20px; }
21904
+ .dim-dsBotNotice p { margin: 0 0 10px; }
21905
+ .dim-dsBotSettings > .dim-targetFeedback { margin-top: 12px; }
21906
+ .dim-dsBotAvatar { display: block; flex: none; object-fit: cover; border-radius: 5px; }
21907
+ .dim-dsBotBoundIdentity { display: flex; align-items: center; gap: 10px; min-width: 0; }
21908
+ .dim-dsBotPicker { position: relative; min-width: 0; }
21909
+ .dim-dsBotPickerTrigger { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 9px; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 7px; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-bg-layer-1, #fff); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
21910
+ .dim-dsBotPickerName { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
21911
+ .dim-dsBotPickerTrigger:focus-visible { outline: 2px solid color-mix(in srgb, var(--dsw-alias-state-business-primary, #3370ff) 28%, transparent); border-color: var(--dsw-alias-state-business-primary, #3370ff); }
21912
+ .dim-dsBotPickerTrigger:disabled { opacity: .5; cursor: not-allowed; }
21913
+ .dim-dsBotOptions { position: absolute; z-index: 20; inset: calc(100% + 5px) 0 auto; max-height: 240px; overflow-y: auto; padding: 4px; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 9px; background: var(--dsw-alias-bg-layer-1, #fff); box-shadow: 0 5px 18px rgb(0 0 0 / 10%); }
21914
+ .dim-dsBotOptions > button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 5px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--dsw-alias-label-primary, #1f2329); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
21915
+ .dim-dsBotOptions > button[data-active="true"] { background: var(--dsw-alias-interactive-bg-hover, #eef0f3); }
21916
+ .dim-dsBotOptions > button[aria-selected="true"] { color: var(--dsw-alias-state-business-primary, #3370ff); }
20552
21917
  .dim-accessPage { min-width: 0; display: grid; gap: 14px; }
20553
21918
  .dim-accessScene { position: relative; min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 12px; background: var(--dsw-alias-bg-layer-3, #fff); }
20554
21919
  .dim-accessScene > legend { padding: 0 6px; color: var(--dsw-alias-label-primary, #1f2329); font-size: 15px; line-height: 22px; font-weight: 650; }
@@ -20559,6 +21924,10 @@ var CSS15 = String.raw`
20559
21924
  .dim-accessControls[data-mode="allowlist"] { grid-template-columns: minmax(0, 1fr); }
20560
21925
  .dim-accessField { min-width: 0; display: grid; align-content: start; gap: 5px; color: var(--dsw-alias-label-secondary, #646a73); font-size: 11px; line-height: 16px; }
20561
21926
  .dim-accessField input, .dim-accessField select { width: 100%; min-width: 0; height: 36px; padding: 0 9px; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 7px; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-bg-layer-1, #fff); font: inherit; font-size: 12px; }
21927
+ .dim-accessField textarea { width: 100%; min-width: 0; padding: 7px 9px; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 7px; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-bg-layer-1, #fff); font: inherit; font-size: 12px; line-height: 18px; resize: vertical; }
21928
+ .dim-accessField textarea:focus { outline: 2px solid color-mix(in srgb, var(--dsw-alias-state-business-primary, #3370ff) 28%, transparent); border-color: var(--dsw-alias-state-business-primary, #3370ff); }
21929
+ .dim-accessField textarea:disabled { opacity: .6; }
21930
+ .dim-groupTriggerValue { color: var(--dsw-alias-label-primary, #1f2329); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
20562
21931
  .dim-accessField input:focus, .dim-accessField select:focus { outline: 2px solid color-mix(in srgb, var(--dsw-alias-state-business-primary, #3370ff) 28%, transparent); border-color: var(--dsw-alias-state-business-primary, #3370ff); }
20563
21932
  .dim-accessUsers { min-width: 0; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--dsw-alias-border-l1, #eef0f3); }
20564
21933
  .dim-accessUsersHeading { position: relative; min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
@@ -21009,8 +22378,91 @@ function installSessionChannelLogos(document2 = globalThis.document) {
21009
22378
  };
21010
22379
  }
21011
22380
 
22381
+ // plugin-src/client/ds-bot-session-avatars.js
22382
+ var React42 = __toESM(require("react"), 1);
22383
+ var DS_BOT_SESSIONS_ENDPOINT = "ds-bot.sessions.list";
22384
+ function installDsBotSessionAvatars(ctx, {
22385
+ rpcCall,
22386
+ setTimeoutFn = globalThis.setTimeout,
22387
+ clearTimeoutFn = globalThis.clearTimeout,
22388
+ document: document2 = globalThis.document,
22389
+ window: window2 = globalThis.window
22390
+ }) {
22391
+ let refresh = () => {
22392
+ };
22393
+ const stop = ctx.slots.inject("sidebar.session.row.leading", () => {
22394
+ const abort = new AbortController();
22395
+ const listeners = /* @__PURE__ */ new Set();
22396
+ let bots = /* @__PURE__ */ new Map();
22397
+ let signature = "";
22398
+ let timer;
22399
+ let running = false;
22400
+ let revision = 0;
22401
+ const publish = (entries) => {
22402
+ const next = JSON.stringify(entries);
22403
+ if (next === signature) return;
22404
+ signature = next;
22405
+ bots = new Map(entries.map(({ sessionId, bot }) => [sessionId, bot]));
22406
+ for (const listener of listeners) listener();
22407
+ };
22408
+ const subscribe = (listener) => {
22409
+ listeners.add(listener);
22410
+ return () => listeners.delete(listener);
22411
+ };
22412
+ function SessionAvatar({ sessionId }) {
22413
+ const bot = React42.useSyncExternalStore(subscribe, () => bots.get(sessionId) ?? null);
22414
+ return bot ? React42.createElement(DsBotAvatar, { bot, size: 16 }) : null;
22415
+ }
22416
+ const schedule = () => {
22417
+ clearTimeoutFn(timer);
22418
+ if (!abort.signal.aborted) timer = setTimeoutFn(load, 0);
22419
+ };
22420
+ const load = async () => {
22421
+ if (abort.signal.aborted || running) return;
22422
+ running = true;
22423
+ const current = revision;
22424
+ try {
22425
+ const result2 = await rpcCall(DS_BOT_SESSIONS_ENDPOINT, {}, abort.signal);
22426
+ if (result2?.ok !== true || !Array.isArray(result2.value)) throw new Error("Unavailable");
22427
+ if (!abort.signal.aborted && current === revision) publish(result2.value);
22428
+ } catch {
22429
+ if (!abort.signal.aborted && current === revision) publish([]);
22430
+ } finally {
22431
+ running = false;
22432
+ if (current !== revision) schedule();
22433
+ }
22434
+ };
22435
+ refresh = () => {
22436
+ revision++;
22437
+ if (!running) schedule();
22438
+ };
22439
+ const wake = () => {
22440
+ if (!document2?.hidden) refresh();
22441
+ };
22442
+ window2?.addEventListener("focus", wake);
22443
+ document2?.addEventListener("visibilitychange", wake);
22444
+ const unregister = ctx.slots.register({
22445
+ name: "sidebar.session.row.leading",
22446
+ id: "dsh-im-ds-bot-avatar",
22447
+ order: 0
22448
+ }, SessionAvatar);
22449
+ void load();
22450
+ return () => {
22451
+ abort.abort();
22452
+ clearTimeoutFn(timer);
22453
+ window2?.removeEventListener("focus", wake);
22454
+ document2?.removeEventListener("visibilitychange", wake);
22455
+ refresh = () => {
22456
+ };
22457
+ unregister();
22458
+ listeners.clear();
22459
+ };
22460
+ });
22461
+ return { refresh: () => refresh(), dispose: stop };
22462
+ }
22463
+
21012
22464
  // plugin-src/client/update-panel.js
21013
- var React39 = __toESM(require("react"), 1);
22465
+ var React43 = __toESM(require("react"), 1);
21014
22466
  var import_react_dom4 = require("react-dom");
21015
22467
  var import_valid = __toESM(require_valid(), 1);
21016
22468
  var import_rcompare = __toESM(require_rcompare(), 1);
@@ -21103,11 +22555,11 @@ function manualUpdateCommand(snapshot) {
21103
22555
  return `dsh plugin --profile ${profileArgument} add -w @xmanrui/dsh-im@${version}`;
21104
22556
  }
21105
22557
  function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) {
21106
- const [copyState, setCopyState] = React39.useState("idle");
21107
- const commandRef = React39.useRef(null);
21108
- const mounted = React39.useRef(false);
21109
- const copying = React39.useRef(false);
21110
- React39.useEffect(() => {
22558
+ const [copyState, setCopyState] = React43.useState("idle");
22559
+ const commandRef = React43.useRef(null);
22560
+ const mounted = React43.useRef(false);
22561
+ const copying = React43.useRef(false);
22562
+ React43.useEffect(() => {
21111
22563
  mounted.current = true;
21112
22564
  return () => {
21113
22565
  mounted.current = false;
@@ -21139,7 +22591,7 @@ function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) {
21139
22591
  { className: "dim-updateManual", "aria-label": "\u624B\u5DE5\u66F4\u65B0" },
21140
22592
  h2("h4", { className: "dim-updateManualHeading" }, "\u624B\u5DE5\u66F4\u65B0"),
21141
22593
  command ? h2(
21142
- React39.Fragment,
22594
+ React43.Fragment,
21143
22595
  null,
21144
22596
  h2("p", { className: "dim-updateManualHint" }, "\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u53EF\u4EE5\u4F7F\u7528\u547D\u4EE4\u66F4\u65B0\uFF1A"),
21145
22597
  h2(
@@ -21175,7 +22627,7 @@ function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) {
21175
22627
  "aria-hidden": "true",
21176
22628
  focusable: "false"
21177
22629
  }, copyState === "copied" ? h2("path", { d: "m4 10 4 4 8-8" }) : h2(
21178
- React39.Fragment,
22630
+ React43.Fragment,
21179
22631
  null,
21180
22632
  h2("rect", { x: 7, y: 7, width: 10, height: 11, rx: 1.5 }),
21181
22633
  h2("path", { d: "M5 13H3.5A1.5 1.5 0 0 1 2 11.5v-8A1.5 1.5 0 0 1 3.5 2h8A1.5 1.5 0 0 1 13 3.5V5" })
@@ -21200,10 +22652,10 @@ function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) {
21200
22652
  );
21201
22653
  }
21202
22654
  function UpdateDialog({ children, onClose }) {
21203
- const dialogRef = React39.useRef(null);
21204
- const titleId = React39.useId();
21205
- const descriptionId = React39.useId();
21206
- React39.useEffect(() => {
22655
+ const dialogRef = React43.useRef(null);
22656
+ const titleId = React43.useId();
22657
+ const descriptionId = React43.useId();
22658
+ React43.useEffect(() => {
21207
22659
  const previous = globalThis.document?.activeElement;
21208
22660
  dialogRef.current?.focus?.();
21209
22661
  return () => {
@@ -21261,20 +22713,20 @@ function UpdateDialog({ children, onClose }) {
21261
22713
  return typeof document !== "undefined" && document.body ? (0, import_react_dom4.createPortal)(content, document.body) : content;
21262
22714
  }
21263
22715
  function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
21264
- const tooltipId = React39.useId();
21265
- const [snapshot, setSnapshot] = React39.useState(null);
21266
- const [action, setAction] = React39.useState("status");
21267
- const [error, setError] = React39.useState(null);
21268
- const [open, setOpen] = React39.useState(false);
21269
- const [uncertainInstall, setUncertainInstall] = React39.useState(false);
21270
- const mounted = React39.useRef(false);
21271
- const busy = React39.useRef(false);
21272
- const readController = React39.useRef(null);
21273
- const pollReadController = React39.useRef(null);
21274
- const installRequest = React39.useRef(null);
21275
- const onStatusRef = React39.useRef(onStatus);
22716
+ const tooltipId = React43.useId();
22717
+ const [snapshot, setSnapshot] = React43.useState(null);
22718
+ const [action, setAction] = React43.useState("status");
22719
+ const [error, setError] = React43.useState(null);
22720
+ const [open, setOpen] = React43.useState(false);
22721
+ const [uncertainInstall, setUncertainInstall] = React43.useState(false);
22722
+ const mounted = React43.useRef(false);
22723
+ const busy = React43.useRef(false);
22724
+ const readController = React43.useRef(null);
22725
+ const pollReadController = React43.useRef(null);
22726
+ const installRequest = React43.useRef(null);
22727
+ const onStatusRef = React43.useRef(onStatus);
21276
22728
  onStatusRef.current = onStatus;
21277
- const accept = React39.useCallback((next) => {
22729
+ const accept = React43.useCallback((next) => {
21278
22730
  setSnapshot(next);
21279
22731
  onStatusRef.current?.(next);
21280
22732
  }, []);
@@ -21283,7 +22735,7 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
21283
22735
  setUncertainInstall(false);
21284
22736
  accept(next);
21285
22737
  };
21286
- const invoke = React39.useCallback(async (endpoint, payload = {}, signal) => {
22738
+ const invoke = React43.useCallback(async (endpoint, payload = {}, signal) => {
21287
22739
  if (typeof rpcCall !== "function") {
21288
22740
  const unavailable = new Error("\u5F53\u524D Host \u4E0D\u652F\u6301\u66F4\u65B0\u63A5\u53E3\uFF0C\u8BF7\u5148\u624B\u52A8\u66F4\u65B0\u63D2\u4EF6\u5E76\u91CD\u542F\u3002");
21289
22741
  unavailable.code = "update-unavailable";
@@ -21291,7 +22743,7 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
21291
22743
  }
21292
22744
  return unwrapSnapshot(await rpcCall(endpoint, payload, signal));
21293
22745
  }, [rpcCall]);
21294
- React39.useEffect(() => {
22746
+ React43.useEffect(() => {
21295
22747
  mounted.current = true;
21296
22748
  busy.current = true;
21297
22749
  const controller = new AbortController();
@@ -21314,7 +22766,7 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
21314
22766
  const activeJob = ACTIVE_STATES4.has(snapshot?.job?.state);
21315
22767
  const restartRequired = snapshot?.job?.state === "restart-required" || snapshot?.blockedReason === "pending-restart";
21316
22768
  const shouldPoll = activeJob || uncertainInstall;
21317
- React39.useEffect(() => {
22769
+ React43.useEffect(() => {
21318
22770
  if (!shouldPoll) return void 0;
21319
22771
  let controller;
21320
22772
  const scheduler = createPollScheduler({
@@ -21415,7 +22867,7 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
21415
22867
  const buttonLabel = action === "checking" ? "\u68C0\u67E5\u4E2D\u2026" : action === "starting" || activeJob ? "\u6B63\u5728\u66F4\u65B0\u2026" : restartRequired ? "\u5F85\u624B\u52A8\u91CD\u542F" : snapshot?.canInstall ? "\u66F4\u65B0\u81F3" : "\u68C0\u67E5\u66F4\u65B0";
21416
22868
  const buttonDescription = localizeText(buttonLabel) + (buttonLabel === "\u66F4\u65B0\u81F3" ? ` v${snapshot.latestVersion}` : "");
21417
22869
  return h2(
21418
- React39.Fragment,
22870
+ React43.Fragment,
21419
22871
  null,
21420
22872
  h2(
21421
22873
  "span",
@@ -21465,25 +22917,25 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
21465
22917
  h2("dt", null, "\u8FD0\u884C\u7248\u672C"),
21466
22918
  h2("dd", null, `v${snapshot?.runningVersion ?? clientVersion}`),
21467
22919
  snapshot?.installedVersion && snapshot.installedVersion !== snapshot.runningVersion ? h2(
21468
- React39.Fragment,
22920
+ React43.Fragment,
21469
22921
  null,
21470
22922
  h2("dt", null, "\u5DF2\u5B89\u88C5\u7248\u672C"),
21471
22923
  h2("dd", null, `v${snapshot.installedVersion}`)
21472
22924
  ) : null,
21473
22925
  targetVersion ? h2(
21474
- React39.Fragment,
22926
+ React43.Fragment,
21475
22927
  null,
21476
22928
  h2("dt", null, "\u76EE\u6807\u7248\u672C"),
21477
22929
  h2("dd", null, `v${targetVersion}`)
21478
22930
  ) : null,
21479
22931
  latestVersion ? h2(
21480
- React39.Fragment,
22932
+ React43.Fragment,
21481
22933
  null,
21482
22934
  h2("dt", null, "\u6700\u65B0\u7248\u672C"),
21483
22935
  h2("dd", null, `v${latestVersion}`)
21484
22936
  ) : null,
21485
22937
  historicalTargetVersion ? h2(
21486
- React39.Fragment,
22938
+ React43.Fragment,
21487
22939
  null,
21488
22940
  h2("dt", null, "\u4E0A\u6B21\u66F4\u65B0\u76EE\u6807"),
21489
22941
  h2("dd", null, `v${historicalTargetVersion}`)
@@ -21560,8 +23012,8 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
21560
23012
  }
21561
23013
 
21562
23014
  // plugin-src/client/panel-error-boundary.js
21563
- var React40 = __toESM(require("react"), 1);
21564
- var IMPanelErrorBoundary = class extends React40.Component {
23015
+ var React44 = __toESM(require("react"), 1);
23016
+ var IMPanelErrorBoundary = class extends React44.Component {
21565
23017
  state = { failed: false };
21566
23018
  static getDerivedStateFromError() {
21567
23019
  return { failed: true };
@@ -21581,9 +23033,9 @@ var IMPanelErrorBoundary = class extends React40.Component {
21581
23033
  };
21582
23034
 
21583
23035
  // plugin-src/client/plugin-page.js
21584
- var React41 = __toESM(require("react"), 1);
23036
+ var React45 = __toESM(require("react"), 1);
21585
23037
  var IM_MAIN_PANEL_ID = "xmanrui-dsh-im";
21586
- var h3 = React41.createElement;
23038
+ var h3 = React45.createElement;
21587
23039
  function OpenImAction({ subject, packageName, onOpen, t }) {
21588
23040
  if (subject?.kind !== "bundle" && subject?.kind !== "row") return null;
21589
23041
  if (subject.pkg?.name !== packageName) return null;
@@ -21594,19 +23046,13 @@ function OpenImAction({ subject, packageName, onOpen, t }) {
21594
23046
  onClick: onOpen
21595
23047
  }, t("\u6253\u5F00 IM\u673A\u5668\u4EBA"));
21596
23048
  }
21597
- function ImPluginPage({ renderPanel, onBack, t }) {
23049
+ function ImPluginPage({ renderPanel }) {
21598
23050
  return h3(
21599
23051
  "div",
21600
23052
  { className: "dim-pluginPage" },
21601
23053
  h3(
21602
23054
  "div",
21603
23055
  { className: "dim-pluginPageContent" },
21604
- h3(
21605
- "button",
21606
- { type: "button", className: "dim-pluginBack", onClick: onBack },
21607
- h3("span", { "aria-hidden": true }, "\u2039"),
21608
- t("\u8FD4\u56DE\u63D2\u4EF6\u8BE6\u60C5")
21609
- ),
21610
23056
  renderPanel()
21611
23057
  )
21612
23058
  );
@@ -21642,15 +23088,12 @@ function installImPluginPage(ctx, { packageName, renderPanel, sidebarVisible = f
21642
23088
  }
21643
23089
  };
21644
23090
  if (typeof ctx.inject !== "function") return controller;
21645
- ctx.inject(["layout", "pluginNavigation"], (pageCtx) => pageCtx.slots.inject("main", () => {
23091
+ ctx.inject(["layout"], (pageCtx) => pageCtx.slots.inject("main", () => {
21646
23092
  const unregisterPage = pageCtx.slots.register({
21647
23093
  name: "main",
21648
23094
  key: IM_MAIN_PANEL_ID,
21649
23095
  locale: IM_LOCALE_NAMESPACE,
21650
- inject: () => ({
21651
- renderPanel,
21652
- onBack: () => pageCtx.pluginNavigation.openBundle(packageName)
21653
- })
23096
+ inject: () => ({ renderPanel })
21654
23097
  }, ImPluginPage);
21655
23098
  let stopSidebar = null;
21656
23099
  const update = () => {
@@ -21865,28 +23308,28 @@ function IMSettingsTab({
21865
23308
  browserLocation = globalThis.location,
21866
23309
  navigateToRecoveryUrl = replacePageLocation
21867
23310
  }) {
21868
- const [selected, setSelected] = React42.useState(() => preferredSectionId === GLOBAL_SETTINGS_TAB_ID || CHANNELS.some((channel7) => channel7.id === preferredSectionId) ? preferredSectionId : "weixin");
21869
- const [loopbackRecovery, setLoopbackRecovery] = React42.useState(null);
21870
- const [runningVersion, setRunningVersion] = React42.useState(IM_PLUGIN_VERSION);
21871
- const [deliverySettings, setDeliverySettings] = React42.useState(null);
23311
+ const [selected, setSelected] = React46.useState(() => preferredSectionId === GLOBAL_SETTINGS_TAB_ID || CHANNELS.some((channel7) => channel7.id === preferredSectionId) ? preferredSectionId : "weixin");
23312
+ const [loopbackRecovery, setLoopbackRecovery] = React46.useState(null);
23313
+ const [runningVersion, setRunningVersion] = React46.useState(IM_PLUGIN_VERSION);
23314
+ const [deliverySettings, setDeliverySettings] = React46.useState(null);
21872
23315
  const emailEnabled = useEmailChannelEnabled(emailRpcCall);
21873
- const visibleChannels = React42.useMemo(
23316
+ const visibleChannels = React46.useMemo(
21874
23317
  () => CHANNELS.filter((channel7) => channel7.id !== "email" || emailEnabled),
21875
23318
  [emailEnabled]
21876
23319
  );
21877
- const githubTooltipId = React42.useId();
21878
- const generalSettingsTooltipId = React42.useId();
23320
+ const githubTooltipId = React46.useId();
23321
+ const generalSettingsTooltipId = React46.useId();
21879
23322
  const globalSettingsSelected = selected === GLOBAL_SETTINGS_TAB_ID;
21880
23323
  const active = visibleChannels.find((channel7) => channel7.id === selected) ?? visibleChannels[0];
21881
23324
  const activeTabId = globalSettingsSelected ? "dim-general-settings-trigger" : `dim-tab-${active.id}`;
21882
23325
  const activePanelId = globalSettingsSelected ? `dim-panel-${GLOBAL_SETTINGS_TAB_ID}` : `dim-panel-${active.id}`;
21883
- const reportLoopbackRecovery = React42.useCallback((recovery) => {
23326
+ const reportLoopbackRecovery = React46.useCallback((recovery) => {
21884
23327
  setLoopbackRecovery((current) => current?.url === recovery.url ? current : recovery);
21885
23328
  }, []);
21886
- const reportUpdateStatus = React42.useCallback((snapshot) => {
23329
+ const reportUpdateStatus = React46.useCallback((snapshot) => {
21887
23330
  setRunningVersion(snapshot.runningVersion);
21888
23331
  }, []);
21889
- const rpcCalls = React42.useMemo(() => createLoopbackAwareRpcCalls({
23332
+ const rpcCalls = React46.useMemo(() => createLoopbackAwareRpcCalls({
21890
23333
  dingtalkRpcCall,
21891
23334
  discordRpcCall,
21892
23335
  feishuRpcCall,
@@ -21928,7 +23371,7 @@ function IMSettingsTab({
21928
23371
  weixinRpcCall,
21929
23372
  whatsappRpcCall
21930
23373
  ]);
21931
- const botSettingsContext = React42.useMemo(() => Object.freeze({
23374
+ const botSettingsContext = React46.useMemo(() => Object.freeze({
21932
23375
  openBotSettings: setDeliverySettings
21933
23376
  }), []);
21934
23377
  return h2(
@@ -22086,6 +23529,16 @@ function apply(ctx) {
22086
23529
  "im-settings: mirror the DSH interface language"
22087
23530
  );
22088
23531
  ctx.effect(() => installSessionChannelLogos(), "im-settings: Session channel logos");
23532
+ let dsBotAvatars;
23533
+ ctx.effect(() => {
23534
+ dsBotAvatars = installDsBotSessionAvatars(ctx, {
23535
+ rpcCall: (endpoint, payload, signal) => callManagementRpc(ctx.connection, DELIVERY_RPC_CHANNEL, endpoint, payload, signal)
23536
+ });
23537
+ return () => {
23538
+ dsBotAvatars.dispose();
23539
+ dsBotAvatars = null;
23540
+ };
23541
+ }, "im-settings: bound DS Bot session avatars");
22089
23542
  ctx.effect(() => {
22090
23543
  const disposers = [
22091
23544
  installFeishuStyles(),
@@ -22111,8 +23564,10 @@ function apply(ctx) {
22111
23564
  const managementRpc = async (connection, channel7, endpoint, payload, signal) => {
22112
23565
  const result2 = await callManagementRpc(connection, channel7, endpoint, payload, signal);
22113
23566
  if (result2?.ok === true) {
23567
+ const dsBotRead = channel7 === DELIVERY_RPC_CHANNEL && endpoint === "ds-bot.status";
23568
+ if (channel7 === DELIVERY_RPC_CHANNEL && ["ds-bot.bind", "ds-bot.unbind"].includes(endpoint)) dsBotAvatars?.refresh();
22114
23569
  if (endpoint === SIDEBAR_SETTINGS_ENDPOINTS.set) sidebarSync?.apply(result2);
22115
- else if (endpoint !== SIDEBAR_SETTINGS_ENDPOINTS.get) sidebarSync?.refresh();
23570
+ else if (!dsBotRead && endpoint !== SIDEBAR_SETTINGS_ENDPOINTS.get) sidebarSync?.refresh();
22116
23571
  }
22117
23572
  return result2;
22118
23573
  };
@@ -22161,7 +23616,7 @@ function apply(ctx) {
22161
23616
  };
22162
23617
  const localeSnapshot = () => ctx.locale.getLocale?.()?.active ?? "";
22163
23618
  function IMPanel({ preferredSectionId }) {
22164
- React42.useSyncExternalStore(subscribeLocale, localeSnapshot, localeSnapshot);
23619
+ React46.useSyncExternalStore(subscribeLocale, localeSnapshot, localeSnapshot);
22165
23620
  return h2(
22166
23621
  IMPanelErrorBoundary,
22167
23622
  null,