@wanji_dsh/dsh-sales 0.10.1 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.js CHANGED
@@ -91,65 +91,13 @@ function IntentBadge({ intent, t }) {
91
91
  return /* @__PURE__ */ React.createElement("span", { className: "ws-intent-badge", "data-grade": rank?.grade, title: t("intentLabel") }, rank ? rank.grade + " \xB7 " + rank.score : t("intentUnknown"));
92
92
  }
93
93
  function IntentDetails({ intent, t }) {
94
- const [mode, setMode] = React.useState("closed");
95
- const container = React.useRef(null);
96
- const trigger = React.useRef(null);
97
- const panelId = React.useId();
98
- const open = mode !== "closed";
99
94
  const rank = rankedIntent(intent);
100
95
  const status = intent?.retryAt ? t("intentWaitingForQuota") : intent?.status === "pending" ? t("intentPending") : intent?.status === "failed" ? t("intentFailed") : void 0;
101
96
  const product = rank && "product" in rank ? rank.product : void 0;
102
- React.useEffect(() => {
103
- if (!open) return;
104
- const closeOutside = (event) => {
105
- if (event.target instanceof Node && !container.current?.contains(event.target)) setMode("closed");
106
- };
107
- const closeOnEscape = (event) => {
108
- if (event.key !== "Escape") return;
109
- if (container.current?.contains(document.activeElement)) trigger.current?.focus();
110
- setMode("closed");
111
- };
112
- document.addEventListener("pointerdown", closeOutside);
113
- document.addEventListener("keydown", closeOnEscape);
114
- return () => {
115
- document.removeEventListener("pointerdown", closeOutside);
116
- document.removeEventListener("keydown", closeOnEscape);
117
- };
118
- }, [open]);
119
- return /* @__PURE__ */ React.createElement(
120
- "div",
121
- {
122
- className: "ws-intent-details",
123
- ref: container,
124
- onPointerEnter: (event) => {
125
- if (event.pointerType === "mouse") setMode((current) => current === "closed" ? "hover" : current);
126
- },
127
- onPointerLeave: (event) => {
128
- if (event.pointerType === "mouse") setMode((current) => current === "hover" ? "closed" : current);
129
- },
130
- onBlur: (event) => {
131
- if (!event.currentTarget.contains(event.relatedTarget)) setMode("closed");
132
- }
133
- },
134
- /* @__PURE__ */ React.createElement(
135
- "button",
136
- {
137
- className: "ws-intent-trigger",
138
- type: "button",
139
- ref: trigger,
140
- "aria-controls": panelId,
141
- "aria-expanded": open,
142
- onClick: () => setMode((current) => current === "pinned" ? "closed" : "pinned")
143
- },
144
- /* @__PURE__ */ React.createElement("span", null, t("intentLabel")),
145
- /* @__PURE__ */ React.createElement("span", { "aria-hidden": "true" }, "\xB7"),
146
- /* @__PURE__ */ React.createElement("span", { className: "ws-intent-value" }, rank ? rank.grade + " \xB7 " + rank.score + " " + t("intentPoints") : t("intentUnknown"))
147
- ),
148
- /* @__PURE__ */ React.createElement("div", { className: "ws-intent-popover", hidden: !open }, /* @__PURE__ */ React.createElement("div", { className: "ws-intent-panel", id: panelId, role: "region", "aria-label": t("intentLabel"), tabIndex: 0 }, status && /* @__PURE__ */ React.createElement("p", { role: "status" }, status), intent?.updatedAt && /* @__PURE__ */ React.createElement("p", null, t("intentUpdated"), " ", /* @__PURE__ */ React.createElement("time", { dateTime: intent.updatedAt }, new Date(intent.updatedAt).toLocaleString())), intent?.crm && /* @__PURE__ */ React.createElement("p", null, t("intentCrm"), " ", intent.crm.grade, " \xB7 ", intent.crm.score, " ", t("intentPoints")), intent?.crmUnavailable && /* @__PURE__ */ React.createElement("p", null, t("intentCrmUnavailable")), !rank && !status && /* @__PURE__ */ React.createElement("p", null, t("intentUnknownReason")), /* @__PURE__ */ React.createElement("dl", null, intentProducts.map((key) => {
149
- const item = intent?.products[key];
150
- return /* @__PURE__ */ React.createElement(React.Fragment, { key }, /* @__PURE__ */ React.createElement("dt", null, productIntentNames[key], product === key ? " \xB7 " + t("intentTopProduct") : ""), /* @__PURE__ */ React.createElement("dd", null, item?.score == null ? item?.stage === "service" ? t("intentService") : t("intentUnknown") : gradeOf(item.score) + " \xB7 " + item.score + " " + t("intentPoints"), item && /* @__PURE__ */ React.createElement("blockquote", null, t(item.evidence.source === "call" ? "intentCallEvidence" : "intentWechatEvidence"), " \xB7 ", /* @__PURE__ */ React.createElement("q", null, item.evidence.quote))));
151
- }))))
152
- );
97
+ return /* @__PURE__ */ React.createElement("details", { className: "ws-intent-details" }, /* @__PURE__ */ React.createElement("summary", null, t("intentLabel"), /* @__PURE__ */ React.createElement("span", { className: "ws-intent-badge", "data-grade": rank?.grade }, rank ? rank.grade + " \xB7 " + rank.score + " " + t("intentPoints") : t("intentUnknown"))), /* @__PURE__ */ React.createElement("div", { className: "ws-intent-panel" }, status && /* @__PURE__ */ React.createElement("p", { role: "status" }, status), intent?.updatedAt && /* @__PURE__ */ React.createElement("p", null, t("intentUpdated"), " ", /* @__PURE__ */ React.createElement("time", { dateTime: intent.updatedAt }, new Date(intent.updatedAt).toLocaleString())), intent?.crm && /* @__PURE__ */ React.createElement("p", null, t("intentCrm"), " ", intent.crm.grade, " \xB7 ", intent.crm.score, " ", t("intentPoints")), intent?.crmUnavailable && /* @__PURE__ */ React.createElement("p", null, t("intentCrmUnavailable")), !rank && !status && /* @__PURE__ */ React.createElement("p", null, t("intentUnknownReason")), /* @__PURE__ */ React.createElement("dl", null, intentProducts.map((key) => {
98
+ const item = intent?.products[key];
99
+ return /* @__PURE__ */ React.createElement(React.Fragment, { key }, /* @__PURE__ */ React.createElement("dt", null, productIntentNames[key], product === key ? " \xB7 " + t("intentTopProduct") : ""), /* @__PURE__ */ React.createElement("dd", null, item?.score == null ? item?.stage === "service" ? t("intentService") : t("intentUnknown") : gradeOf(item.score) + " \xB7 " + item.score + " " + t("intentPoints"), item && /* @__PURE__ */ React.createElement("blockquote", null, t(item.evidence.source === "call" ? "intentCallEvidence" : "intentWechatEvidence"), " \xB7 ", /* @__PURE__ */ React.createElement("q", null, item.evidence.quote))));
100
+ }))));
153
101
  }
154
102
 
155
103
  // src/reply-editor.tsx
@@ -158,7 +106,7 @@ var import_react3 = __toESM(require("react"), 1);
158
106
  // src/reply-content.tsx
159
107
  var import_react2 = __toESM(require("react"), 1);
160
108
 
161
- // ../../../../../node_modules/mdast-util-to-string/lib/index.js
109
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-to-string/lib/index.js
162
110
  var emptyOptions = {};
163
111
  function toString(value, options) {
164
112
  const settings = options || emptyOptions;
@@ -195,7 +143,7 @@ function node(value) {
195
143
  return Boolean(value && typeof value === "object");
196
144
  }
197
145
 
198
- // ../../../../../node_modules/decode-named-character-reference/index.dom.js
146
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/decode-named-character-reference/index.dom.js
199
147
  var element = document.createElement("i");
200
148
  function decodeNamedCharacterReference(value) {
201
149
  const characterReference2 = "&" + value + ";";
@@ -207,7 +155,7 @@ function decodeNamedCharacterReference(value) {
207
155
  return character === characterReference2 ? false : character;
208
156
  }
209
157
 
210
- // ../../../../../node_modules/micromark-util-chunked/index.js
158
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-chunked/index.js
211
159
  function splice(list2, start, remove, items) {
212
160
  const end = list2.length;
213
161
  let chunkStart = 0;
@@ -241,7 +189,7 @@ function push(list2, items) {
241
189
  return items;
242
190
  }
243
191
 
244
- // ../../../../../node_modules/micromark-util-combine-extensions/index.js
192
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-combine-extensions/index.js
245
193
  var hasOwnProperty = {}.hasOwnProperty;
246
194
  function combineExtensions(extensions) {
247
195
  const all2 = {};
@@ -281,7 +229,7 @@ function constructs(existing, list2) {
281
229
  splice(existing, 0, 0, before);
282
230
  }
283
231
 
284
- // ../../../../../node_modules/micromark-util-decode-numeric-character-reference/index.js
232
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-decode-numeric-character-reference/index.js
285
233
  function decodeNumericCharacterReference(value, base) {
286
234
  const code2 = Number.parseInt(value, base);
287
235
  if (
@@ -299,12 +247,12 @@ function decodeNumericCharacterReference(value, base) {
299
247
  return String.fromCodePoint(code2);
300
248
  }
301
249
 
302
- // ../../../../../node_modules/micromark-util-normalize-identifier/index.js
250
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-normalize-identifier/index.js
303
251
  function normalizeIdentifier(value) {
304
252
  return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
305
253
  }
306
254
 
307
- // ../../../../../node_modules/micromark-util-character/index.js
255
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-character/index.js
308
256
  var asciiAlpha = regexCheck(/[A-Za-z]/);
309
257
  var asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);
310
258
  var asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/);
@@ -336,7 +284,7 @@ function regexCheck(regex) {
336
284
  }
337
285
  }
338
286
 
339
- // ../../../../../node_modules/micromark-factory-space/index.js
287
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-factory-space/index.js
340
288
  function factorySpace(effects, ok3, type, max) {
341
289
  const limit = max ? max - 1 : Infinity;
342
290
  let size = 0;
@@ -381,7 +329,7 @@ function factorySpaceMinMax(effects, ok3, nok, type, min, max) {
381
329
  }
382
330
  }
383
331
 
384
- // ../../../../../node_modules/micromark/lib/initialize/content.js
332
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/initialize/content.js
385
333
  var content = {
386
334
  tokenize: initializeContent
387
335
  };
@@ -431,7 +379,7 @@ function initializeContent(effects) {
431
379
  }
432
380
  }
433
381
 
434
- // ../../../../../node_modules/micromark-util-edit-map/index.js
382
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-edit-map/index.js
435
383
  var EditMap = class {
436
384
  /**
437
385
  * Create a new edit map.
@@ -529,7 +477,7 @@ function addImplementation(editMap, at, remove, add, before) {
529
477
  editMap.index.set(at, change);
530
478
  }
531
479
 
532
- // ../../../../../node_modules/micromark/lib/initialize/document.js
480
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/initialize/document.js
533
481
  var document2 = {
534
482
  tokenize: initializeDocument
535
483
  };
@@ -723,7 +671,7 @@ function tokenizeContainer(effects, ok3, nok) {
723
671
  return factorySpace(effects, effects.attempt(this.parser.constructs.document, ok3, nok), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
724
672
  }
725
673
 
726
- // ../../../../../node_modules/micromark-util-classify-character/index.js
674
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-classify-character/index.js
727
675
  function classifyCharacter(code2) {
728
676
  if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
729
677
  return 1;
@@ -733,7 +681,7 @@ function classifyCharacter(code2) {
733
681
  }
734
682
  }
735
683
 
736
- // ../../../../../node_modules/micromark-util-resolve-all/index.js
684
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-resolve-all/index.js
737
685
  function resolveAll(constructs2, events, context) {
738
686
  const called = [];
739
687
  let index2 = -1;
@@ -747,7 +695,7 @@ function resolveAll(constructs2, events, context) {
747
695
  return events;
748
696
  }
749
697
 
750
- // ../../../../../node_modules/micromark-core-commonmark/lib/attention.js
698
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/attention.js
751
699
  var attention = {
752
700
  name: "attention",
753
701
  resolveAll: resolveAllAttention,
@@ -870,7 +818,7 @@ function movePoint(point3, offset) {
870
818
  point3._bufferIndex += offset;
871
819
  }
872
820
 
873
- // ../../../../../node_modules/micromark-core-commonmark/lib/autolink.js
821
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/autolink.js
874
822
  var autolink = {
875
823
  name: "autolink",
876
824
  tokenize: tokenizeAutolink
@@ -971,7 +919,7 @@ function tokenizeAutolink(effects, ok3, nok) {
971
919
  }
972
920
  }
973
921
 
974
- // ../../../../../node_modules/micromark-core-commonmark/lib/blank-line.js
922
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/blank-line.js
975
923
  var blankLine = {
976
924
  partial: true,
977
925
  tokenize: tokenizeBlankLine
@@ -986,7 +934,7 @@ function tokenizeBlankLine(effects, ok3, nok) {
986
934
  }
987
935
  }
988
936
 
989
- // ../../../../../node_modules/micromark-core-commonmark/lib/block-quote.js
937
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/block-quote.js
990
938
  var blockQuote = {
991
939
  continuation: {
992
940
  tokenize: tokenizeBlockQuoteContinuation
@@ -1044,7 +992,7 @@ function exit(effects) {
1044
992
  effects.exit("blockQuote");
1045
993
  }
1046
994
 
1047
- // ../../../../../node_modules/micromark-core-commonmark/lib/character-escape.js
995
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/character-escape.js
1048
996
  var characterEscape = {
1049
997
  name: "characterEscape",
1050
998
  tokenize: tokenizeCharacterEscape
@@ -1070,7 +1018,7 @@ function tokenizeCharacterEscape(effects, ok3, nok) {
1070
1018
  }
1071
1019
  }
1072
1020
 
1073
- // ../../../../../node_modules/micromark-core-commonmark/lib/character-reference.js
1021
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/character-reference.js
1074
1022
  var characterReference = {
1075
1023
  name: "characterReference",
1076
1024
  tokenize: tokenizeCharacterReference
@@ -1135,7 +1083,7 @@ function tokenizeCharacterReference(effects, ok3, nok) {
1135
1083
  }
1136
1084
  }
1137
1085
 
1138
- // ../../../../../node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js
1086
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js
1139
1087
  var nonLazyContinuation = {
1140
1088
  partial: true,
1141
1089
  tokenize: tokenizeNonLazyContinuation
@@ -1157,7 +1105,7 @@ function tokenizeNonLazyContinuation(effects, ok3, nok) {
1157
1105
  }
1158
1106
  }
1159
1107
 
1160
- // ../../../../../node_modules/micromark-core-commonmark/lib/code-fenced.js
1108
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/code-fenced.js
1161
1109
  var codeFenced = {
1162
1110
  concrete: true,
1163
1111
  name: "codeFenced",
@@ -1320,7 +1268,7 @@ function tokenizeCodeFenced(effects, ok3, nok) {
1320
1268
  }
1321
1269
  }
1322
1270
 
1323
- // ../../../../../node_modules/micromark-core-commonmark/lib/code-indented.js
1271
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/code-indented.js
1324
1272
  var codeIndented = {
1325
1273
  name: "codeIndented",
1326
1274
  tokenize: tokenizeCodeIndented
@@ -1378,7 +1326,7 @@ function tokenizeFurtherStart(effects, ok3, nok) {
1378
1326
  }
1379
1327
  }
1380
1328
 
1381
- // ../../../../../node_modules/micromark-core-commonmark/lib/code-text.js
1329
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/code-text.js
1382
1330
  var codeText = {
1383
1331
  name: "codeText",
1384
1332
  previous,
@@ -1493,7 +1441,7 @@ function tokenizeCodeText(effects, ok3, nok) {
1493
1441
  }
1494
1442
  }
1495
1443
 
1496
- // ../../../../../node_modules/micromark-util-subtokenize/lib/splice-buffer.js
1444
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-subtokenize/lib/splice-buffer.js
1497
1445
  var SpliceBuffer = class {
1498
1446
  /**
1499
1447
  * @param {ReadonlyArray<T> | null | undefined} [initial]
@@ -1686,7 +1634,7 @@ function chunkedPush(list2, right) {
1686
1634
  }
1687
1635
  }
1688
1636
 
1689
- // ../../../../../node_modules/micromark-util-subtokenize/index.js
1637
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-subtokenize/index.js
1690
1638
  function subtokenize(eventsArray) {
1691
1639
  const jumps = {};
1692
1640
  let index2 = -1;
@@ -1839,7 +1787,7 @@ function subcontent(events, eventIndex) {
1839
1787
  return gaps;
1840
1788
  }
1841
1789
 
1842
- // ../../../../../node_modules/micromark-core-commonmark/lib/content.js
1790
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/content.js
1843
1791
  var content2 = {
1844
1792
  resolve: resolveContent,
1845
1793
  tokenize: tokenizeContent
@@ -1910,7 +1858,7 @@ function tokenizeContinuation(effects, ok3, nok) {
1910
1858
  }
1911
1859
  }
1912
1860
 
1913
- // ../../../../../node_modules/micromark-factory-destination/index.js
1861
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-factory-destination/index.js
1914
1862
  function factoryDestination(effects, ok3, nok, type, literalType, literalMarkerType, rawType, stringType, max) {
1915
1863
  const limit = max || Number.POSITIVE_INFINITY;
1916
1864
  let balance = 0;
@@ -2002,7 +1950,7 @@ function factoryDestination(effects, ok3, nok, type, literalType, literalMarkerT
2002
1950
  }
2003
1951
  }
2004
1952
 
2005
- // ../../../../../node_modules/micromark-factory-label/index.js
1953
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-factory-label/index.js
2006
1954
  function factoryLabel(effects, ok3, nok, type, markerType, stringType) {
2007
1955
  const self = this;
2008
1956
  let size = 0;
@@ -2063,7 +2011,7 @@ function factoryLabel(effects, ok3, nok, type, markerType, stringType) {
2063
2011
  }
2064
2012
  }
2065
2013
 
2066
- // ../../../../../node_modules/micromark-factory-title/index.js
2014
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-factory-title/index.js
2067
2015
  function factoryTitle(effects, ok3, nok, type, markerType, stringType) {
2068
2016
  let marker;
2069
2017
  return start;
@@ -2125,7 +2073,7 @@ function factoryTitle(effects, ok3, nok, type, markerType, stringType) {
2125
2073
  }
2126
2074
  }
2127
2075
 
2128
- // ../../../../../node_modules/micromark-factory-whitespace/index.js
2076
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-factory-whitespace/index.js
2129
2077
  function factoryWhitespace(effects, ok3) {
2130
2078
  let seen;
2131
2079
  return start;
@@ -2144,7 +2092,7 @@ function factoryWhitespace(effects, ok3) {
2144
2092
  }
2145
2093
  }
2146
2094
 
2147
- // ../../../../../node_modules/micromark-core-commonmark/lib/definition.js
2095
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/definition.js
2148
2096
  var definition = {
2149
2097
  name: "definition",
2150
2098
  tokenize: tokenizeDefinition
@@ -2230,7 +2178,7 @@ function tokenizeTitleBefore(effects, ok3, nok) {
2230
2178
  }
2231
2179
  }
2232
2180
 
2233
- // ../../../../../node_modules/micromark-core-commonmark/lib/hard-break-escape.js
2181
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/hard-break-escape.js
2234
2182
  var hardBreakEscape = {
2235
2183
  name: "hardBreakEscape",
2236
2184
  tokenize: tokenizeHardBreakEscape
@@ -2251,7 +2199,7 @@ function tokenizeHardBreakEscape(effects, ok3, nok) {
2251
2199
  }
2252
2200
  }
2253
2201
 
2254
- // ../../../../../node_modules/micromark-core-commonmark/lib/heading-atx.js
2202
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/heading-atx.js
2255
2203
  var headingAtx = {
2256
2204
  name: "headingAtx",
2257
2205
  resolve: resolveHeadingAtx,
@@ -2340,7 +2288,7 @@ function tokenizeHeadingAtx(effects, ok3, nok) {
2340
2288
  }
2341
2289
  }
2342
2290
 
2343
- // ../../../../../node_modules/micromark-util-html-tag-name/index.js
2291
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-html-tag-name/index.js
2344
2292
  var htmlBlockNames = [
2345
2293
  "address",
2346
2294
  "article",
@@ -2407,7 +2355,7 @@ var htmlBlockNames = [
2407
2355
  ];
2408
2356
  var htmlRawNames = ["pre", "script", "style", "textarea"];
2409
2357
 
2410
- // ../../../../../node_modules/micromark-core-commonmark/lib/html-flow.js
2358
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/html-flow.js
2411
2359
  var htmlFlow = {
2412
2360
  concrete: true,
2413
2361
  name: "htmlFlow",
@@ -2766,7 +2714,7 @@ function tokenizeBlankLineBefore(effects, ok3, nok) {
2766
2714
  }
2767
2715
  }
2768
2716
 
2769
- // ../../../../../node_modules/micromark-core-commonmark/lib/html-text.js
2717
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/html-text.js
2770
2718
  var htmlText = {
2771
2719
  name: "htmlText",
2772
2720
  tokenize: tokenizeHtmlText
@@ -3072,7 +3020,7 @@ function tokenizeHtmlText(effects, ok3, nok) {
3072
3020
  }
3073
3021
  }
3074
3022
 
3075
- // ../../../../../node_modules/micromark-core-commonmark/lib/label-end.js
3023
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/label-end.js
3076
3024
  var labelEnd = {
3077
3025
  name: "labelEnd",
3078
3026
  resolveAll: resolveAllLabelEnd,
@@ -3298,7 +3246,7 @@ function tokenizeReferenceCollapsed(effects, ok3, nok) {
3298
3246
  }
3299
3247
  }
3300
3248
 
3301
- // ../../../../../node_modules/micromark-core-commonmark/lib/label-start-image.js
3249
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/label-start-image.js
3302
3250
  var labelStartImage = {
3303
3251
  name: "labelStartImage",
3304
3252
  resolveAll: labelEnd.resolveAll,
@@ -3335,7 +3283,7 @@ function tokenizeLabelStartImage(effects, ok3, nok) {
3335
3283
  }
3336
3284
  }
3337
3285
 
3338
- // ../../../../../node_modules/micromark-core-commonmark/lib/label-start-link.js
3286
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/label-start-link.js
3339
3287
  var labelStartLink = {
3340
3288
  name: "labelStartLink",
3341
3289
  resolveAll: labelEnd.resolveAll,
@@ -3363,7 +3311,7 @@ function tokenizeLabelStartLink(effects, ok3, nok) {
3363
3311
  }
3364
3312
  }
3365
3313
 
3366
- // ../../../../../node_modules/micromark-core-commonmark/lib/line-ending.js
3314
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/line-ending.js
3367
3315
  var lineEnding = {
3368
3316
  name: "lineEnding",
3369
3317
  tokenize: tokenizeLineEnding
@@ -3378,7 +3326,7 @@ function tokenizeLineEnding(effects, ok3) {
3378
3326
  }
3379
3327
  }
3380
3328
 
3381
- // ../../../../../node_modules/micromark-core-commonmark/lib/thematic-break.js
3329
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/thematic-break.js
3382
3330
  var thematicBreak = {
3383
3331
  name: "thematicBreak",
3384
3332
  tokenize: tokenizeThematicBreak
@@ -3417,7 +3365,7 @@ function tokenizeThematicBreak(effects, ok3, nok) {
3417
3365
  }
3418
3366
  }
3419
3367
 
3420
- // ../../../../../node_modules/micromark-core-commonmark/lib/list.js
3368
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/list.js
3421
3369
  var list = {
3422
3370
  continuation: {
3423
3371
  tokenize: tokenizeListContinuation
@@ -3547,7 +3495,7 @@ function tokenizeListItemPrefixWhitespace(effects, ok3, nok) {
3547
3495
  }
3548
3496
  }
3549
3497
 
3550
- // ../../../../../node_modules/micromark-core-commonmark/lib/setext-underline.js
3498
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/setext-underline.js
3551
3499
  var setextUnderline = {
3552
3500
  name: "setextUnderline",
3553
3501
  resolveTo: resolveToSetextUnderline,
@@ -3641,7 +3589,7 @@ function tokenizeSetextUnderline(effects, ok3, nok) {
3641
3589
  }
3642
3590
  }
3643
3591
 
3644
- // ../../../../../node_modules/micromark/lib/initialize/flow.js
3592
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/initialize/flow.js
3645
3593
  var flow = {
3646
3594
  tokenize: initializeFlow
3647
3595
  };
@@ -3679,7 +3627,7 @@ function initializeFlow(effects) {
3679
3627
  }
3680
3628
  }
3681
3629
 
3682
- // ../../../../../node_modules/micromark/lib/initialize/text.js
3630
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/initialize/text.js
3683
3631
  var resolver = {
3684
3632
  resolveAll: createResolver()
3685
3633
  };
@@ -3821,7 +3769,7 @@ function resolveAllLineSuffixes(events, context) {
3821
3769
  return events;
3822
3770
  }
3823
3771
 
3824
- // ../../../../../node_modules/micromark/lib/constructs.js
3772
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/constructs.js
3825
3773
  var constructs_exports = {};
3826
3774
  __export(constructs_exports, {
3827
3775
  attentionMarkers: () => attentionMarkers,
@@ -3896,7 +3844,7 @@ var disable = {
3896
3844
  null: []
3897
3845
  };
3898
3846
 
3899
- // ../../../../../node_modules/micromark/lib/create-tokenizer.js
3847
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/create-tokenizer.js
3900
3848
  function createTokenizer(parser, initialize, from) {
3901
3849
  let point3 = {
3902
3850
  _bufferIndex: -1,
@@ -4222,7 +4170,7 @@ function serializeChunks(chunks, expandTabs) {
4222
4170
  return result.join("");
4223
4171
  }
4224
4172
 
4225
- // ../../../../../node_modules/micromark/lib/parse.js
4173
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/parse.js
4226
4174
  function parse(options) {
4227
4175
  const settings = options || {};
4228
4176
  const constructs2 = (
@@ -4248,14 +4196,14 @@ function parse(options) {
4248
4196
  }
4249
4197
  }
4250
4198
 
4251
- // ../../../../../node_modules/micromark/lib/postprocess.js
4199
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/postprocess.js
4252
4200
  function postprocess(events) {
4253
4201
  while (!subtokenize(events)) {
4254
4202
  }
4255
4203
  return events;
4256
4204
  }
4257
4205
 
4258
- // ../../../../../node_modules/micromark/lib/preprocess.js
4206
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/preprocess.js
4259
4207
  var search = /[\0\t\n\r]/g;
4260
4208
  function preprocess() {
4261
4209
  let column = 1;
@@ -4335,7 +4283,7 @@ function preprocess() {
4335
4283
  }
4336
4284
  }
4337
4285
 
4338
- // ../../../../../node_modules/micromark-util-decode-string/index.js
4286
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-decode-string/index.js
4339
4287
  var characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
4340
4288
  function decodeString(value) {
4341
4289
  return value.replace(characterEscapeOrReference, decode);
@@ -4353,7 +4301,7 @@ function decode($0, $1, $2) {
4353
4301
  return decodeNamedCharacterReference($2) || $0;
4354
4302
  }
4355
4303
 
4356
- // ../../../../../node_modules/unist-util-stringify-position/lib/index.js
4304
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/unist-util-stringify-position/lib/index.js
4357
4305
  function stringifyPosition(value) {
4358
4306
  if (!value || typeof value !== "object") {
4359
4307
  return "";
@@ -4379,7 +4327,7 @@ function index(value) {
4379
4327
  return value && typeof value === "number" ? value : 1;
4380
4328
  }
4381
4329
 
4382
- // ../../../../../node_modules/mdast-util-from-markdown/lib/index.js
4330
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-from-markdown/lib/index.js
4383
4331
  var own = {}.hasOwnProperty;
4384
4332
  function fromMarkdown(value, encoding, options) {
4385
4333
  if (encoding && typeof encoding === "object") {
@@ -5088,7 +5036,7 @@ function defaultOnError(left, right) {
5088
5036
  }
5089
5037
  }
5090
5038
 
5091
- // ../../../../../node_modules/ccount/index.js
5039
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/ccount/index.js
5092
5040
  function ccount(value, character) {
5093
5041
  const source = String(value);
5094
5042
  if (typeof character !== "string") {
@@ -5103,11 +5051,11 @@ function ccount(value, character) {
5103
5051
  return count;
5104
5052
  }
5105
5053
 
5106
- // ../../../../../node_modules/devlop/lib/default.js
5054
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/devlop/lib/default.js
5107
5055
  function ok() {
5108
5056
  }
5109
5057
 
5110
- // ../../../../../node_modules/escape-string-regexp/index.js
5058
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/escape-string-regexp/index.js
5111
5059
  function escapeStringRegexp(string5) {
5112
5060
  if (typeof string5 !== "string") {
5113
5061
  throw new TypeError("Expected a string");
@@ -5115,7 +5063,7 @@ function escapeStringRegexp(string5) {
5115
5063
  return string5.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
5116
5064
  }
5117
5065
 
5118
- // ../../../../../node_modules/unist-util-is/lib/index.js
5066
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/unist-util-is/lib/index.js
5119
5067
  var convert = (
5120
5068
  // Note: overloads in JSDoc can’t yet use different `@template`s.
5121
5069
  /**
@@ -5214,12 +5162,12 @@ function looksLikeANode(value) {
5214
5162
  return value !== null && typeof value === "object" && "type" in value;
5215
5163
  }
5216
5164
 
5217
- // ../../../../../node_modules/unist-util-visit-parents/lib/color.js
5165
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/unist-util-visit-parents/lib/color.js
5218
5166
  function color(d) {
5219
5167
  return d;
5220
5168
  }
5221
5169
 
5222
- // ../../../../../node_modules/unist-util-visit-parents/lib/index.js
5170
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/unist-util-visit-parents/lib/index.js
5223
5171
  var empty = [];
5224
5172
  var CONTINUE = true;
5225
5173
  var EXIT = false;
@@ -5339,7 +5287,7 @@ function toResult(value) {
5339
5287
  return value === null || value === void 0 ? empty : [value];
5340
5288
  }
5341
5289
 
5342
- // ../../../../../node_modules/mdast-util-find-and-replace/lib/index.js
5290
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-find-and-replace/lib/index.js
5343
5291
  function findAndReplace(tree, list2, options) {
5344
5292
  const settings = options || {};
5345
5293
  const ignored = convert(settings.ignore || []);
@@ -5440,7 +5388,7 @@ function toFunction(replace2) {
5440
5388
  };
5441
5389
  }
5442
5390
 
5443
- // ../../../../../node_modules/mdast-util-gfm-autolink-literal/lib/index.js
5391
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-gfm-autolink-literal/lib/index.js
5444
5392
  function gfmAutolinkLiteralFromMarkdown() {
5445
5393
  return {
5446
5394
  transforms: [transformGfmAutolinkLiterals],
@@ -5605,7 +5553,7 @@ function previous2(match) {
5605
5553
  return match.index === 0 || unicodeWhitespace(code2) || unicodePunctuation(code2);
5606
5554
  }
5607
5555
 
5608
- // ../../../../../node_modules/mdast-util-gfm-footnote/lib/index.js
5556
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-gfm-footnote/lib/index.js
5609
5557
  footnoteReference.peek = footnoteReferencePeek;
5610
5558
  function enterFootnoteCallString() {
5611
5559
  this.buffer();
@@ -5679,7 +5627,7 @@ function gfmFootnoteFromMarkdown() {
5679
5627
  };
5680
5628
  }
5681
5629
 
5682
- // ../../../../../node_modules/mdast-util-gfm-strikethrough/lib/index.js
5630
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-gfm-strikethrough/lib/index.js
5683
5631
  handleDelete.attention = attentionDelete;
5684
5632
  handleDelete.peek = peekDelete;
5685
5633
  function gfmStrikethroughFromMarkdown() {
@@ -5716,7 +5664,7 @@ function peekDelete() {
5716
5664
  return "~";
5717
5665
  }
5718
5666
 
5719
- // ../../../../../node_modules/mdast-util-gfm-table/lib/index.js
5667
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-gfm-table/lib/index.js
5720
5668
  function gfmTableFromMarkdown() {
5721
5669
  return {
5722
5670
  enter: {
@@ -5777,7 +5725,7 @@ function replace($0, $1) {
5777
5725
  return $1 === "|" ? $1 : $0;
5778
5726
  }
5779
5727
 
5780
- // ../../../../../node_modules/mdast-util-gfm-task-list-item/lib/index.js
5728
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-gfm-task-list-item/lib/index.js
5781
5729
  function gfmTaskListItemFromMarkdown() {
5782
5730
  return {
5783
5731
  exit: {
@@ -5824,7 +5772,7 @@ function exitParagraphWithTaskListItem(token) {
5824
5772
  this.exit(token);
5825
5773
  }
5826
5774
 
5827
- // ../../../../../node_modules/mdast-util-gfm/lib/index.js
5775
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-gfm/lib/index.js
5828
5776
  function gfmFromMarkdown() {
5829
5777
  return [
5830
5778
  gfmAutolinkLiteralFromMarkdown(),
@@ -5835,7 +5783,7 @@ function gfmFromMarkdown() {
5835
5783
  ];
5836
5784
  }
5837
5785
 
5838
- // ../../../../../node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js
5786
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js
5839
5787
  var wwwPrefix = {
5840
5788
  tokenize: tokenizeWwwPrefix,
5841
5789
  partial: true
@@ -6177,7 +6125,7 @@ function previousUnbalanced(events) {
6177
6125
  return result;
6178
6126
  }
6179
6127
 
6180
- // ../../../../../node_modules/micromark-extension-gfm-footnote/lib/syntax.js
6128
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm-footnote/lib/syntax.js
6181
6129
  var indent = {
6182
6130
  tokenize: tokenizeIndent2,
6183
6131
  partial: true
@@ -6452,7 +6400,7 @@ function tokenizeIndent2(effects, ok3, nok) {
6452
6400
  }
6453
6401
  }
6454
6402
 
6455
- // ../../../../../node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js
6403
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js
6456
6404
  function gfmStrikethrough(options) {
6457
6405
  const options_ = options || {};
6458
6406
  let single = options_.singleTilde;
@@ -6546,7 +6494,7 @@ function gfmStrikethrough(options) {
6546
6494
  }
6547
6495
  }
6548
6496
 
6549
- // ../../../../../node_modules/micromark-extension-gfm-table/lib/edit-map.js
6497
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm-table/lib/edit-map.js
6550
6498
  var EditMap2 = class {
6551
6499
  /**
6552
6500
  * Create a new edit map.
@@ -6632,7 +6580,7 @@ function addImplementation2(editMap, at, remove, add) {
6632
6580
  editMap.index.set(at, change);
6633
6581
  }
6634
6582
 
6635
- // ../../../../../node_modules/micromark-extension-gfm-table/lib/infer.js
6583
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm-table/lib/infer.js
6636
6584
  function gfmTableAlign(events, index2) {
6637
6585
  let inDelimiterRow = false;
6638
6586
  const align = [];
@@ -6659,7 +6607,7 @@ function gfmTableAlign(events, index2) {
6659
6607
  return align;
6660
6608
  }
6661
6609
 
6662
- // ../../../../../node_modules/micromark-extension-gfm-table/lib/syntax.js
6610
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm-table/lib/syntax.js
6663
6611
  function gfmTable() {
6664
6612
  return {
6665
6613
  flow: {
@@ -7050,7 +6998,7 @@ function getPoint(events, index2) {
7050
6998
  return event[1][side];
7051
6999
  }
7052
7000
 
7053
- // ../../../../../node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js
7001
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js
7054
7002
  var tasklistCheck = {
7055
7003
  name: "tasklistCheck",
7056
7004
  tokenize: tokenizeTasklistCheck
@@ -7124,7 +7072,7 @@ function spaceThenNonSpace(effects, ok3, nok) {
7124
7072
  }
7125
7073
  }
7126
7074
 
7127
- // ../../../../../node_modules/micromark-extension-gfm/index.js
7075
+ // ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm/index.js
7128
7076
  function gfm(options) {
7129
7077
  return combineExtensions([
7130
7078
  gfmAutolinkLiteral(),
@@ -9685,8 +9633,7 @@ var zh = {
9685
9633
  wxImageUnavailable: "\u56FE\u7247\u6682\u4E0D\u53EF\u7528",
9686
9634
  wxAudioUnavailable: "\u8BED\u97F3\u6682\u4E0D\u53EF\u7528",
9687
9635
  wxMediaRetry: "\u91CD\u8BD5",
9688
- wxImageListPreview: "[\u56FE\u7247]",
9689
- wxLive: "\u5FAE\u4FE1\u5DF2\u8FDE\u63A5\uFF0C\u81EA\u52A8\u540C\u6B65\u5DF2\u5F00\u542F",
9636
+ wxLive: "\u5FAE\u4FE1\u5DF2\u8FDE\u63A5\uFF0C\u81EA\u52A8\u540C\u6B65\u4E2D",
9690
9637
  wxPaused: "\u5FAE\u4FE1\u540C\u6B65\u5DF2\u6682\u505C",
9691
9638
  wxSyncing: "\u6B63\u5728\u540C\u6B65\u5FAE\u4FE1",
9692
9639
  wxLoading: "\u6B63\u5728\u8FDE\u63A5\u5FAE\u4FE1",
@@ -9759,6 +9706,7 @@ var zh = {
9759
9706
  sync: "\u540C\u6B65\u5FAE\u4FE1",
9760
9707
  unavailable: "\u6B64\u529F\u80FD\u5C1A\u672A\u63A5\u5165",
9761
9708
  settings: "\u8FDE\u63A5\u8BBE\u7F6E",
9709
+ back: "\u8FD4\u56DE\u4F1A\u8BDD",
9762
9710
  customers: "\u5BA2\u6237\u4F1A\u8BDD",
9763
9711
  search: "\u641C\u7D22\u5BA2\u6237\u3001\u673A\u578B\u6216\u5173\u952E\u8BCD",
9764
9712
  all: "\u5168\u90E8",
@@ -9967,8 +9915,7 @@ var en = {
9967
9915
  wxImageUnavailable: "Image unavailable",
9968
9916
  wxAudioUnavailable: "Voice message unavailable",
9969
9917
  wxMediaRetry: "Retry",
9970
- wxImageListPreview: "[image]",
9971
- wxLive: "WeChat connected \xB7 Auto-sync enabled",
9918
+ wxLive: "WeChat connected \xB7 syncing automatically",
9972
9919
  wxPaused: "WeChat sync paused",
9973
9920
  wxSyncing: "Syncing WeChat",
9974
9921
  wxLoading: "Connecting to WeChat",
@@ -10041,6 +9988,7 @@ var en = {
10041
9988
  sync: "Sync WeChat",
10042
9989
  unavailable: "This integration is not connected yet",
10043
9990
  settings: "Connections",
9991
+ back: "Back to chat",
10044
9992
  customers: "Conversations",
10045
9993
  search: "Search customers, devices or keywords",
10046
9994
  all: "All",
@@ -12385,7 +12333,7 @@ function mountSales(ctx, Page, Icon) {
12385
12333
  store.reset();
12386
12334
  restores.clear();
12387
12335
  if (ws) for (const c of contacts.filter((c2) => !c2.crm && !c2.wechat)) void journal.reset(ws, c).catch((e) => store.dispatch({ type: "history-error", id: c.id, error: e.message }));
12388
- } })
12336
+ }, back: () => ctx.layout.selectPanel(null) })
12389
12337
  }, Page));
12390
12338
  ctx.slots.inject("sidebar.panellist", () => ctx.slots.register({
12391
12339
  name: "sidebar.panellist",
@@ -12402,30 +12350,26 @@ function mountSales(ctx, Page, Icon) {
12402
12350
 
12403
12351
  // src/intent-styles.ts
12404
12352
  var intentCss = `
12405
- .ws-intent-sortline { display:flex; align-items:center; justify-content:space-between; gap:6px; min-height:28px; margin-bottom:10px; }
12406
- .ws-intent-sortline h2 { min-width:0; font-size:13px; overflow-wrap:anywhere; }
12407
- .ws-intent-sort-control { position:relative; min-width:0; max-width:58%; }
12408
- .ws-intent-sort-control > svg { position:absolute; inset-inline-end:3px; top:50%; transform:translateY(-50%) rotate(90deg); pointer-events:none; color:var(--ws-muted); }
12409
- .ws-intent-sort { appearance:none; field-sizing:content; max-width:100%; min-height:28px; text-align:end; padding:3px 19px 3px 5px; border:0; border-radius:5px; color:var(--ws-muted); background:transparent; font-size:11px; cursor:pointer; }
12410
- .ws-intent-sort:hover { background:var(--ws-soft); }
12411
- .ws-intent-sort option { color:var(--ws-ink); background:var(--ws-bg); }
12353
+ .ws-intent-sortline { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; margin-bottom:13px; }
12354
+ .ws-intent-sortline .ws-section-title { margin:0; }
12355
+ .ws-intent-sort { min-width:0; max-width:100%; color:var(--ws-ink); background:var(--ws-bg); border:1px solid var(--ws-line); border-radius:7px; padding:5px 7px; font-size:11px; }
12412
12356
  .ws-intent-badge { display:inline-flex; justify-content:center; align-items:center; width:max-content; white-space:nowrap; border:1px solid var(--ws-line); border-radius:6px; padding:1px 5px; font-size:10px; font-weight:600; color:var(--ws-muted); }
12413
12357
  .ws-intent-badge[data-grade] { color:var(--ws-ink); background:var(--ws-soft); }
12414
12358
  .ws-intent-badge[data-grade="A"] { border-color:currentColor; }
12415
12359
  .ws-contact-content > .ws-intent-badge { grid-column:2; grid-row:2; align-self:center; line-height:14px; }
12416
- .ws-intent-sort:focus-visible { outline:2px solid var(--ws-accent); outline-offset:2px; }
12360
+ .ws-intent-sort:focus-visible, .ws-intent-details summary:focus-visible { outline:2px solid var(--ws-accent); outline-offset:2px; }
12361
+ .ws-person-title .ws-intent-title { display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; }
12362
+ .ws-person-title .ws-intent-title h2 { min-width:0; overflow-wrap:anywhere; }
12417
12363
  .ws-intent-details { position:relative; flex:none; margin:0; font-size:11px; }
12418
- .ws-intent-details > .ws-intent-trigger { display:flex; align-items:center; gap:4px; min-height:21px; padding:0 2px; border:0; background:none; color:var(--ws-muted); white-space:nowrap; user-select:none; -webkit-tap-highlight-color:transparent; }
12419
- .ws-intent-trigger:hover .ws-intent-value, .ws-intent-trigger[aria-expanded=true] .ws-intent-value { text-decoration:underline; text-underline-offset:2px; }
12420
- .ws-intent-value { color:var(--ws-ink); font-weight:600; }
12421
- .ws-intent-popover { position:absolute; inset-inline-start:0; top:100%; z-index:6; width:min(310px,66vw); padding-top:5px; }
12422
- .ws-intent-panel { max-height:52vh; overflow:auto; background:var(--ws-bg); color:var(--ws-ink); border:1px solid var(--ws-line); border-radius:9px; padding:11px 13px; box-shadow:0 6px 20px #0002; }
12364
+ .ws-intent-details summary { cursor:pointer; display:flex; align-items:center; gap:4px; color:var(--ws-muted); }
12365
+ .ws-intent-details summary::after { content:"\u25BE"; font-size:10px; }
12366
+ .ws-intent-details[open] summary::after { content:"\u25B4"; }
12367
+ .ws-intent-panel { position:absolute; inset-inline-start:0; top:calc(100% + 7px); z-index:6; width:min(310px,66vw); max-height:52vh; overflow:auto; box-sizing:border-box; background:var(--ws-bg); color:var(--ws-ink); border:1px solid var(--ws-line); border-radius:9px; padding:11px 13px; box-shadow:0 6px 20px #0002; }
12423
12368
  .ws-intent-panel dl, .ws-intent-panel dd { margin:0; }
12424
12369
  .ws-intent-panel dt { margin-top:9px; font-weight:650; }
12425
12370
  .ws-intent-panel blockquote { margin:3px 0 0; white-space:normal; overflow-wrap:anywhere; color:var(--ws-muted); }
12426
12371
  .ws-intent-panel > p { display:block; white-space:normal; margin:0 0 5px; }
12427
- @container(max-width:760px){ .ws-person-meta { position:relative; } .ws-intent-details { position:static; } .ws-intent-popover { width:min(310px,100%); } }
12428
- @media(max-width:640px) and (hover:none){ .ws-intent-popover { position:fixed; inset:30vh 12px auto; width:auto; padding:0; } .ws-intent-panel { max-height:54vh; } }
12372
+ @media(max-width:640px){ .ws-intent-panel { position:fixed; inset:30vh 12px auto; width:auto; max-height:54vh; } }
12429
12373
  `;
12430
12374
 
12431
12375
  // src/reply-styles.ts
@@ -12437,10 +12381,10 @@ var replyStyles = `
12437
12381
  .ws-reply-editor-bar [role=tab]{border:0;border-radius:5px;background:transparent;color:var(--ws-muted);padding:5px 11px;font-size:12px;cursor:pointer}
12438
12382
  .ws-reply-editor-bar [role=tab][aria-selected=true]{background:var(--ws-bg);color:var(--ws-ink);box-shadow:0 1px 3px rgb(0 0 0 / .06)}
12439
12383
  .ws-reply-editor-bar>small{color:var(--ws-muted);font-size:10px}
12440
- .ws-reply-editor-body{height:110px;overflow:auto;padding:12px 13px;scrollbar-gutter:stable}
12384
+ .ws-reply-editor-body{min-height:110px;max-height:clamp(120px,34vh,300px);overflow:auto;padding:12px 13px;scrollbar-gutter:stable}
12441
12385
  .ws-reply-editor-body:focus-visible{outline:2px solid var(--ws-accent);outline-offset:-3px}
12442
- .ws-reply-editor-body .ws-editor{height:100%;padding:0;border:0;background:none}
12443
- .ws-reply-editor-body .ws-editor textarea{height:100%;min-height:0;max-height:none;resize:none}
12386
+ .ws-reply-editor-body .ws-editor{padding:0;border:0;background:none}
12387
+ .ws-reply-editor-body textarea{height:130px;min-height:100px;max-height:250px;resize:vertical}
12444
12388
  .ws-reply-empty{font-size:12px;color:var(--ws-muted)}
12445
12389
  .ws-reply-markdown{font-size:12px;line-height:1.8;overflow-wrap:anywhere;color:var(--ws-ink)}
12446
12390
  .ws-reply-markdown p{margin:0 0 .6em;white-space:pre-wrap}.ws-reply-markdown p:last-child{margin-bottom:0}
@@ -12487,24 +12431,11 @@ var mediaStyles = `
12487
12431
  // src/styles.ts
12488
12432
  var styles = `
12489
12433
  .ws-page{--ws-line:var(--dsw-alias-border-l3);--ws-ink:var(--dsw-alias-label-primary);--ws-muted:var(--dsw-alias-label-tertiary);--ws-bg:var(--dsw-alias-bg-base);--ws-soft:var(--dsw-alias-bg-layer-1);--ws-hover:var(--dsw-alias-interactive-bg-hover);--ws-accent:var(--dsw-alias-brand-primary);display:flex;flex-direction:column;position:relative;height:100%;min-height:0;min-width:0;overflow:hidden;color:var(--ws-ink);background:var(--ws-bg);font-family:inherit;font-size:13px;line-height:1.6;container-type:inline-size}
12490
- .ws-page *{box-sizing:border-box}.ws-page button,.ws-page input,.ws-page textarea,.ws-dialog button{font:inherit}.ws-page h1,.ws-page h2,.ws-page h3,.ws-page p,.ws-page dl,.ws-page dd,.ws-dialog h2,.ws-dialog p{margin:0}.ws-page button,.ws-dialog button{cursor:pointer;color:inherit}.ws-page button:disabled{cursor:not-allowed;opacity:.42}.ws-page button:focus-visible,.ws-page input:focus-visible,.ws-page textarea:focus-visible,.ws-dialog button:focus-visible{outline:2px solid var(--ws-accent,var(--dsw-alias-brand-primary));outline-offset:3px}.ws-page svg,.ws-dialog svg{flex-shrink:0}.ws-page strong,.ws-page h1,.ws-page h2,.ws-page h3,.ws-dialog h2,.ws-dialog strong{font-weight:500}.ws-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px 28px 20px;padding-inline-start:max(28px,var(--dsh-frame-leading-clearance,0px));flex-shrink:0;-webkit-app-region:drag}.ws-header button{-webkit-app-region:no-drag}.ws-heading{display:flex;align-items:center;gap:12px}.ws-brand{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;color:var(--ws-accent);background:var(--ws-soft)}.ws-title-line{display:flex;align-items:center;gap:10px}.ws-title-line h1{font-size:20px;line-height:1.4}.ws-heading p{color:var(--ws-muted);font-size:12px;margin-top:3px}.ws-demo-label,.ws-example-badge{display:inline-flex;align-items:center;font-size:10px;line-height:18px;border:1px solid var(--ws-line);padding:0 6px;border-radius:4px;color:var(--ws-muted);white-space:nowrap}.ws-header-actions{display:flex;align-items:center;gap:14px}.ws-knowledge{display:flex;align-items:center;gap:6px;border:0;background:none;font-size:11px;color:var(--ws-muted)!important;white-space:nowrap}.ws-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:32px;padding:6px 11px;background:transparent;border:1px solid var(--ws-line);border-radius:7px;white-space:nowrap;font-size:12px!important}.ws-button:hover:not(:disabled){background:var(--ws-hover)}.ws-button.ws-primary{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground);border-color:transparent}.ws-button.ws-primary:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}.ws-icon-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:30px;height:30px;background:transparent;border:0;border-radius:6px}.ws-icon-button:hover{background:var(--ws-hover,var(--dsw-alias-interactive-bg-hover))}.ws-demo-note{display:flex;align-items:center;gap:8px;flex-shrink:0;padding:8px 28px;color:var(--ws-muted);background:var(--ws-soft);border-block:1px solid var(--ws-line);font-size:11px}.ws-dot{display:inline-block;width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0;opacity:.65}.ws-demo-note button{background:none;border:0;color:var(--ws-muted);white-space:nowrap;margin-left:auto;padding:0 0 0 12px;font-size:11px}.ws-demo-note button:hover{color:var(--ws-ink)}.ws-body{--ws-contacts-width:244px;position:relative;display:grid;grid-template-columns:var(--ws-contacts-width) minmax(0,1fr) 264px;flex:1;min-height:0;overflow:hidden}.ws-contacts{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--ws-line)}.ws-contacts-head{padding:18px 16px 10px}.ws-search{display:flex;gap:7px;align-items:center;padding:6px 9px;border:1px solid transparent;border-radius:6px;color:var(--ws-muted);background:var(--ws-soft)}.ws-search:focus-within{border-color:var(--ws-accent)}.ws-search input{min-width:0;width:100%;border:0;background:none;color:var(--ws-ink);font-size:11px;line-height:20px;outline:none!important}.ws-search input::placeholder{color:var(--ws-muted)}
12491
- .ws-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:6px;border-bottom:1px solid var(--ws-line)}
12492
- .ws-filters button{position:relative;display:flex;flex-wrap:wrap;gap:0 4px;align-content:center;align-items:center;justify-content:center;min-width:0;min-height:36px;border:0;padding:4px 2px;background:none;color:var(--ws-muted);font-size:11px}
12493
- .ws-filters button[aria-pressed=true]{color:var(--ws-ink);font-weight:600}
12494
- .ws-filters button[aria-pressed=true]::after{content:"";position:absolute;inset-inline:10px;bottom:-1px;height:2px;border-radius:2px 2px 0 0;background:currentColor}
12495
- .ws-filters span{font-size:10px;font-weight:400;font-variant-numeric:tabular-nums}
12496
- @media(forced-colors:active){.ws-filters button[aria-pressed=true]::after{background:CanvasText}}
12497
- .ws-contact-list{overflow:auto;flex:1;padding:0 8px}.ws-contact{display:flex;align-items:center;gap:10px;width:100%;padding:14px 10px;border:0;border-radius:8px;margin-bottom:3px;background:none;text-align:left}.ws-contact:hover{background:var(--ws-hover)}.ws-contact.is-selected{background:var(--dsw-alias-interactive-bg-active)}.ws-avatar{display:grid;place-items:center;width:38px;height:38px;flex-shrink:0;border-radius:11px;background:var(--ws-soft);color:var(--dsw-alias-label-secondary);font-size:15px}.ws-contact.is-selected .ws-avatar{background:var(--ws-bg);color:var(--ws-accent)}.ws-contact-content{min-width:0;flex:1;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:22px 18px;column-gap:8px;row-gap:3px}.ws-contact-line{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:6px;line-height:20px}.ws-contact-line strong{font-size:13px}.ws-contact-line time{font-size:10px;color:var(--ws-muted);font-variant-numeric:tabular-nums;white-space:nowrap}.ws-preview{grid-column:1;grid-row:2;display:block;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;color:var(--dsw-alias-label-secondary);font-size:11px;line-height:18px;margin:0}.ws-sync{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-top:1px solid var(--ws-line);color:var(--ws-muted);font-size:10px}.ws-sync>span{display:flex;align-items:center;gap:5px}.ws-text-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:none;border:0;padding:3px 0;color:var(--ws-muted)!important;font-size:11px!important}.ws-text-button:hover:not(:disabled){color:var(--ws-ink)!important}.ws-empty{display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--ws-muted);padding:48px 10px;text-align:center;font-size:12px}.ws-conversation{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:auto}.ws-conversation-head{display:flex;align-items:center;gap:10px;padding:19px 24px;border-bottom:1px solid var(--ws-line);min-height:83px}.ws-person-title{flex:1;min-width:0}.ws-person-title h2{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:16px}.ws-person-title h2>span{font-size:10px;color:var(--ws-muted);font-weight:400}
12498
- .ws-person-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin-top:2px;color:var(--ws-muted);font-size:10px}
12499
- .ws-person-source{display:inline-flex;flex-wrap:wrap;align-items:center;gap:5px;min-width:0}
12500
- .ws-separator{opacity:.5;margin:0 3px}.ws-conversation-actions{display:flex;align-items:center;gap:5px;margin-left:auto}.ws-handle{font-size:11px!important;min-height:28px;padding:4px 8px}.ws-messages{flex:1;min-height:100px;overflow:auto;padding:20px 24px 16px;scrollbar-gutter:stable}.ws-date{display:flex;align-items:center;justify-content:center;margin:0 0 24px;color:var(--ws-muted);font-size:10px}.ws-date span{background:var(--ws-soft);border-radius:5px;padding:1px 10px}.ws-message{display:flex;align-items:flex-start;gap:9px;margin-bottom:22px}.ws-message-avatar{width:30px;height:30px;border-radius:9px;font-size:12px}.ws-message-content{min-width:0;max-width:82%}.ws-message-meta{display:flex;gap:8px;align-items:center;margin-bottom:5px;color:var(--ws-muted);font-size:10px;line-height:14px}.ws-message-meta time{font-variant-numeric:tabular-nums}.ws-bubble{padding:10px 13px;border-radius:2px 10px 10px 10px;background:var(--ws-soft);font-size:12px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}.ws-out{flex-direction:row-reverse}.ws-out .ws-message-meta{justify-content:flex-end}.ws-out .ws-bubble{background:var(--dsw-alias-interactive-bg-active);border-radius:10px 2px 10px 10px}.ws-out .ws-message-avatar{color:var(--ws-accent)}.ws-replies{flex-shrink:0;border-top:1px solid var(--ws-line);padding:15px 24px 0}.ws-reply-heading,.ws-reply-heading>div{display:flex;align-items:center;gap:7px}.ws-reply-heading{justify-content:space-between}.ws-reply-heading h3{font-size:12px}.ws-reply-heading>div>svg{color:var(--ws-accent)}.ws-candidates{display:flex;flex-wrap:wrap;gap:6px;margin:11px 0 10px}.ws-candidates button{border:1px solid var(--ws-line);border-radius:5px;background:none;padding:3px 9px;color:var(--ws-muted);font-size:11px}.ws-candidates button[aria-pressed=true]{color:var(--ws-accent);border-color:var(--ws-accent);background:var(--ws-soft)}.ws-editor{display:block;padding:10px 12px;background:var(--ws-soft);border:1px solid var(--ws-line);border-radius:8px}.ws-editor:focus-within{border-color:var(--ws-accent)}.ws-editor textarea{display:block;width:100%;height:82px;min-height:56px;resize:vertical;max-height:180px;border:0;background:none;color:var(--ws-ink);font-size:12px;line-height:1.9;outline:none!important}.ws-editor-footer{display:flex;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap}.ws-draft-note{display:flex;align-items:center;gap:5px;font-size:10px;color:var(--ws-muted)}.ws-char-count{margin-left:auto;color:var(--ws-muted);font-size:10px;white-space:nowrap}.ws-notice{font-size:10px;line-height:21px;min-height:24px;color:var(--ws-accent)}.ws-profile{display:flex;flex-direction:column;min-height:0;overflow:auto;border-left:1px solid var(--ws-line);background:var(--ws-bg)}.ws-profile-head{display:flex;align-items:center;justify-content:space-between;padding:22px 20px 0}.ws-profile-head h2{font-size:12px}.ws-profile-person{display:flex;flex-direction:column;align-items:center;padding:23px 20px 25px}.ws-profile-avatar{width:54px;height:54px;border-radius:16px;font-size:22px}.ws-profile-person h3{font-size:17px;margin-top:10px}.ws-profile-person>p{font-size:11px;color:var(--ws-muted);margin-top:2px}.ws-tags{display:flex;justify-content:center;flex-wrap:wrap;gap:5px;margin-top:14px}.ws-tags>span{font-size:10px;color:var(--ws-muted);background:var(--ws-soft);padding:2px 7px;border-radius:4px}.ws-profile-section{margin:0 20px;padding:18px 0;border-top:1px solid var(--ws-line)}.ws-profile-section>h3{font-size:11px;margin-bottom:13px}.ws-product{display:flex;align-items:center;gap:10px;padding:11px;background:var(--ws-soft);border-radius:7px}.ws-product>svg{color:var(--ws-accent)}.ws-product strong{font-size:11px}.ws-product p{color:var(--ws-muted);font-size:9px;margin-top:2px}.ws-budget{display:flex;align-items:center;justify-content:space-between;font-size:10px;margin-top:12px;gap:8px}.ws-budget>span{color:var(--ws-muted)}.ws-budget strong{font-size:11px}.ws-profile dl{display:flex;flex-direction:column;gap:15px}.ws-profile dt{color:var(--ws-muted);font-size:10px;margin-bottom:3px}.ws-profile dd{font-size:11px;line-height:1.8}.ws-profile-caption{margin-top:auto;display:flex;align-items:flex-start;gap:6px;color:var(--ws-muted);font-size:9px;padding:15px 20px}.ws-profile-toggle,.ws-mobile-back{display:none}
12501
- .ws-body[data-profile=closed]{grid-template-columns:var(--ws-contacts-width) minmax(0,1fr)}
12502
- .ws-body[data-profile=closed]>.ws-profile{display:none}
12503
- .ws-body[data-profile=closed] .ws-profile-toggle{display:inline-flex}.ws-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
12434
+ .ws-page *{box-sizing:border-box}.ws-page button,.ws-page input,.ws-page textarea,.ws-dialog button{font:inherit}.ws-page h1,.ws-page h2,.ws-page h3,.ws-page p,.ws-page dl,.ws-page dd,.ws-dialog h2,.ws-dialog p{margin:0}.ws-page button,.ws-dialog button{cursor:pointer;color:inherit}.ws-page button:disabled{cursor:not-allowed;opacity:.42}.ws-page button:focus-visible,.ws-page input:focus-visible,.ws-page textarea:focus-visible,.ws-dialog button:focus-visible{outline:2px solid var(--ws-accent,var(--dsw-alias-brand-primary));outline-offset:3px}.ws-page svg,.ws-dialog svg{flex-shrink:0}.ws-page strong,.ws-page h1,.ws-page h2,.ws-page h3,.ws-dialog h2,.ws-dialog strong{font-weight:500}.ws-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px 28px 20px;padding-inline-start:max(28px,var(--dsh-frame-leading-clearance,0px));flex-shrink:0;-webkit-app-region:drag}.ws-header button{-webkit-app-region:no-drag}.ws-heading{display:flex;align-items:center;gap:12px}.ws-brand{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;color:var(--ws-accent);background:var(--ws-soft)}.ws-title-line{display:flex;align-items:center;gap:10px}.ws-title-line h1{font-size:20px;line-height:1.4}.ws-heading p{color:var(--ws-muted);font-size:12px;margin-top:3px}.ws-demo-label,.ws-example-badge{display:inline-flex;align-items:center;font-size:10px;line-height:18px;border:1px solid var(--ws-line);padding:0 6px;border-radius:4px;color:var(--ws-muted);white-space:nowrap}.ws-header-actions{display:flex;align-items:center;gap:14px}.ws-knowledge{display:flex;align-items:center;gap:6px;border:0;background:none;font-size:11px;color:var(--ws-muted)!important;white-space:nowrap}.ws-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:32px;padding:6px 11px;background:transparent;border:1px solid var(--ws-line);border-radius:7px;white-space:nowrap;font-size:12px!important}.ws-button:hover:not(:disabled){background:var(--ws-hover)}.ws-button.ws-primary{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground);border-color:transparent}.ws-button.ws-primary:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}.ws-icon-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:30px;height:30px;background:transparent;border:0;border-radius:6px}.ws-icon-button:hover{background:var(--ws-hover,var(--dsw-alias-interactive-bg-hover))}.ws-demo-note{display:flex;align-items:center;gap:8px;flex-shrink:0;padding:8px 28px;color:var(--ws-muted);background:var(--ws-soft);border-block:1px solid var(--ws-line);font-size:11px}.ws-dot{display:inline-block;width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0;opacity:.65}.ws-demo-note button{background:none;border:0;color:var(--ws-muted);white-space:nowrap;margin-left:auto;padding:0 0 0 12px;font-size:11px}.ws-demo-note button:hover{color:var(--ws-ink)}.ws-body{position:relative;display:grid;grid-template-columns:244px minmax(0,1fr) 264px;flex:1;min-height:0;overflow:hidden}.ws-contacts{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--ws-line)}.ws-contacts-head{padding:22px 16px 14px}.ws-section-title{display:flex;align-items:center;gap:7px;margin-bottom:13px}.ws-section-title h2{font-size:13px}.ws-section-title>span{font-size:10px;color:var(--ws-muted);background:var(--ws-soft);padding:0 5px;border-radius:4px}.ws-section-title .ws-icon-button{margin-left:auto;width:24px;height:24px}.ws-search{display:flex;gap:7px;align-items:center;padding:7px 9px;border:1px solid var(--ws-line);border-radius:7px;color:var(--ws-muted);background:var(--ws-soft)}.ws-search:focus-within{border-color:var(--ws-accent)}.ws-search input{min-width:0;width:100%;border:0;background:none;color:var(--ws-ink);font-size:11px;line-height:20px;outline:none!important}.ws-search input::placeholder{color:var(--ws-muted)}.ws-filters{display:flex;gap:4px;margin-top:12px}.ws-filters button{display:flex;gap:5px;align-items:center;justify-content:center;flex:1;border:0;border-radius:6px;padding:5px 2px;background:none;color:var(--ws-muted);font-size:11px}.ws-filters button[aria-pressed=true]{background:var(--ws-soft);color:var(--ws-ink);font-weight:500}.ws-filters span{font-size:10px;font-variant-numeric:tabular-nums;opacity:.7}.ws-contact-list{overflow:auto;flex:1;padding:0 8px}.ws-contact{display:flex;align-items:center;gap:10px;width:100%;padding:14px 10px;border:0;border-radius:8px;margin-bottom:3px;background:none;text-align:left}.ws-contact:hover{background:var(--ws-hover)}.ws-contact.is-selected{background:var(--dsw-alias-interactive-bg-active)}.ws-avatar{display:grid;place-items:center;width:38px;height:38px;flex-shrink:0;border-radius:11px;background:var(--ws-soft);color:var(--dsw-alias-label-secondary);font-size:15px}.ws-contact.is-selected .ws-avatar{background:var(--ws-bg);color:var(--ws-accent)}.ws-contact-content{min-width:0;flex:1;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:22px 18px;column-gap:8px;row-gap:3px}.ws-contact-line{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:6px;line-height:20px}.ws-contact-line strong{font-size:13px}.ws-contact-line time{font-size:10px;color:var(--ws-muted);font-variant-numeric:tabular-nums;white-space:nowrap}.ws-preview{grid-column:1;grid-row:2;display:block;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;color:var(--dsw-alias-label-secondary);font-size:11px;line-height:18px;margin:0}.ws-sync{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-top:1px solid var(--ws-line);color:var(--ws-muted);font-size:10px}.ws-sync>span{display:flex;align-items:center;gap:5px}.ws-text-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:none;border:0;padding:3px 0;color:var(--ws-muted)!important;font-size:11px!important}.ws-text-button:hover:not(:disabled){color:var(--ws-ink)!important}.ws-empty{display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--ws-muted);padding:48px 10px;text-align:center;font-size:12px}.ws-conversation{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:auto}.ws-conversation-head{display:flex;align-items:center;gap:10px;padding:19px 24px;border-bottom:1px solid var(--ws-line);min-height:83px}.ws-person-title{min-width:0}.ws-person-title h2{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:16px}.ws-person-title h2>span{font-size:10px;color:var(--ws-muted);font-weight:400}.ws-person-title p{display:flex;gap:5px;align-items:center;color:var(--ws-muted);font-size:10px;margin-top:2px}.ws-separator{opacity:.5;margin:0 3px}.ws-conversation-actions{display:flex;align-items:center;gap:5px;margin-left:auto}.ws-handle{font-size:11px!important;min-height:28px;padding:4px 8px}.ws-messages{flex:1;min-height:100px;overflow:auto;padding:20px 24px 16px;scrollbar-gutter:stable}.ws-date{display:flex;align-items:center;justify-content:center;margin:0 0 24px;color:var(--ws-muted);font-size:10px}.ws-date span{background:var(--ws-soft);border-radius:5px;padding:1px 10px}.ws-message{display:flex;align-items:flex-start;gap:9px;margin-bottom:22px}.ws-message-avatar{width:30px;height:30px;border-radius:9px;font-size:12px}.ws-message-content{min-width:0;max-width:82%}.ws-message-meta{display:flex;gap:8px;align-items:center;margin-bottom:5px;color:var(--ws-muted);font-size:10px;line-height:14px}.ws-message-meta time{font-variant-numeric:tabular-nums}.ws-bubble{padding:10px 13px;border-radius:2px 10px 10px 10px;background:var(--ws-soft);font-size:12px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}.ws-out{flex-direction:row-reverse}.ws-out .ws-message-meta{justify-content:flex-end}.ws-out .ws-bubble{background:var(--dsw-alias-interactive-bg-active);border-radius:10px 2px 10px 10px}.ws-out .ws-message-avatar{color:var(--ws-accent)}.ws-replies{flex-shrink:0;border-top:1px solid var(--ws-line);padding:15px 24px 0}.ws-reply-heading,.ws-reply-heading>div{display:flex;align-items:center;gap:7px}.ws-reply-heading{justify-content:space-between}.ws-reply-heading h3{font-size:12px}.ws-reply-heading>div>svg{color:var(--ws-accent)}.ws-candidates{display:flex;flex-wrap:wrap;gap:6px;margin:11px 0 10px}.ws-candidates button{border:1px solid var(--ws-line);border-radius:5px;background:none;padding:3px 9px;color:var(--ws-muted);font-size:11px}.ws-candidates button[aria-pressed=true]{color:var(--ws-accent);border-color:var(--ws-accent);background:var(--ws-soft)}.ws-editor{display:block;padding:10px 12px;background:var(--ws-soft);border:1px solid var(--ws-line);border-radius:8px}.ws-editor:focus-within{border-color:var(--ws-accent)}.ws-editor textarea{display:block;width:100%;height:82px;min-height:56px;resize:vertical;max-height:180px;border:0;background:none;color:var(--ws-ink);font-size:12px;line-height:1.9;outline:none!important}.ws-editor-footer{display:flex;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap}.ws-draft-note{display:flex;align-items:center;gap:5px;font-size:10px;color:var(--ws-muted)}.ws-char-count{margin-left:auto;color:var(--ws-muted);font-size:10px;white-space:nowrap}.ws-notice{font-size:10px;line-height:21px;min-height:24px;color:var(--ws-accent)}.ws-profile{display:flex;flex-direction:column;min-height:0;overflow:auto;border-left:1px solid var(--ws-line);background:var(--ws-bg)}.ws-profile-head{display:flex;align-items:center;justify-content:space-between;padding:22px 20px 0}.ws-profile-head h2{font-size:12px}.ws-profile-person{display:flex;flex-direction:column;align-items:center;padding:23px 20px 25px}.ws-profile-avatar{width:54px;height:54px;border-radius:16px;font-size:22px}.ws-profile-person h3{font-size:17px;margin-top:10px}.ws-profile-person>p{font-size:11px;color:var(--ws-muted);margin-top:2px}.ws-tags{display:flex;justify-content:center;flex-wrap:wrap;gap:5px;margin-top:14px}.ws-tags>span{font-size:10px;color:var(--ws-muted);background:var(--ws-soft);padding:2px 7px;border-radius:4px}.ws-profile-section{margin:0 20px;padding:18px 0;border-top:1px solid var(--ws-line)}.ws-profile-section>h3{font-size:11px;margin-bottom:13px}.ws-product{display:flex;align-items:center;gap:10px;padding:11px;background:var(--ws-soft);border-radius:7px}.ws-product>svg{color:var(--ws-accent)}.ws-product strong{font-size:11px}.ws-product p{color:var(--ws-muted);font-size:9px;margin-top:2px}.ws-budget{display:flex;align-items:center;justify-content:space-between;font-size:10px;margin-top:12px;gap:8px}.ws-budget>span{color:var(--ws-muted)}.ws-budget strong{font-size:11px}.ws-profile dl{display:flex;flex-direction:column;gap:15px}.ws-profile dt{color:var(--ws-muted);font-size:10px;margin-bottom:3px}.ws-profile dd{font-size:11px;line-height:1.8}.ws-profile-caption{margin-top:auto;display:flex;align-items:flex-start;gap:6px;color:var(--ws-muted);font-size:9px;padding:15px 20px}.ws-profile-toggle,.ws-profile-close,.ws-mobile-back{display:none}.ws-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
12504
12435
  .ws-dialog{--ws-accent:var(--dsw-alias-brand-primary);width:min(500px,calc(100vw - 32px));padding:24px;border:1px solid var(--dsw-alias-border-l3);border-radius:14px;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font-family:inherit;font-size:13px;line-height:1.7}.ws-dialog::backdrop{background:var(--dsw-alias-bg-module-platform);opacity:.7}.ws-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.ws-dialog-head h2{font-size:17px}.ws-dialog-note{margin:12px 0 20px!important;color:var(--dsw-alias-label-tertiary);font-size:12px}.ws-connection{display:flex;align-items:center;gap:13px;padding:17px 0;border-top:1px solid var(--dsw-alias-border-l3)}.ws-connection>svg{color:var(--dsw-alias-label-tertiary)}.ws-connection>div{flex:1;min-width:0}.ws-connection strong{font-size:12px}.ws-connection p{font-size:11px;color:var(--dsw-alias-label-tertiary);margin-top:2px}.ws-state{font-size:10px;color:var(--dsw-alias-label-tertiary);white-space:nowrap}.ws-dialog-foot{display:flex;justify-content:flex-end;padding-top:16px}.ws-dialog .ws-button{border-color:var(--dsw-alias-border-l3)}
12505
- @container(max-width:1050px){.ws-body{--ws-contacts-width:230px;grid-template-columns:var(--ws-contacts-width) minmax(0,1fr)}.ws-profile{display:none}.ws-profile-toggle{display:inline-flex}.ws-body[data-profile=open] .ws-profile-toggle{display:none}.ws-body[data-profile=open]>.ws-profile{display:flex;position:absolute;inset:0 0 0 auto;width:min(272px,100%);z-index:5}.ws-header{padding:20px 22px;padding-inline-start:max(22px,var(--dsh-frame-leading-clearance,0px))}.ws-demo-note{padding-inline:22px}.ws-knowledge{font-size:10px}.ws-header-actions{gap:8px}}
12506
- @container(max-width:700px){.ws-body{--ws-contacts-width:210px}.ws-profile-toggle{width:30px;height:30px;padding:0;border-color:transparent}.ws-profile-toggle>span{display:none}.ws-header{padding:17px 18px;padding-inline-start:max(18px,var(--dsh-frame-leading-clearance,0px))}.ws-heading p{display:none}.ws-title-line h1{font-size:18px}.ws-header-actions .ws-knowledge{display:none}.ws-demo-note{padding:8px 18px;font-size:10px}.ws-demo-note button{display:none}.ws-conversation-head{padding:16px}.ws-messages{padding:18px 16px}.ws-replies{padding:13px 16px 0}.ws-handle{font-size:0!important;gap:0;padding:4px 7px}.ws-handle svg{width:15px}.ws-draft-note{font-size:9px}.ws-char-count{display:none}}
12507
- @container(max-width:530px){.ws-body{display:flex}.ws-contacts{width:100%;border:0}.ws-conversation{display:none;width:100%}.ws-body[data-show-chat=true]>.ws-contacts{display:none}.ws-body[data-show-chat=true]>.ws-conversation{display:flex}.ws-body[data-show-chat=false][data-profile=open]>.ws-profile{display:none}.ws-mobile-back{display:flex}.ws-brand{display:none}.ws-header{padding:15px 16px;padding-inline-start:max(16px,var(--dsh-frame-leading-clearance,0px))}.ws-header-actions .ws-button{font-size:10px!important;padding:4px 7px}.ws-demo-note{align-items:flex-start}.ws-demo-note>.ws-dot{margin-top:6px}.ws-contact{padding:14px 12px}.ws-conversation-head{min-height:76px;padding:13px 12px;gap:7px}.ws-person-title h2{font-size:15px}.ws-person-title h2>span{display:none}.ws-editor textarea{height:96px}.ws-bubble{font-size:12px}.ws-message-content{max-width:85%}.ws-connection{align-items:flex-start}.ws-connection>svg{margin-top:3px}}
12436
+ @container(max-width:1050px){.ws-body{grid-template-columns:230px minmax(0,1fr)}.ws-profile{display:none}.ws-profile-toggle{display:flex}.ws-body[data-profile=true]>.ws-profile{display:flex;position:absolute;inset:0 0 0 auto;width:272px;z-index:5;border-left:1px solid var(--ws-line)}.ws-profile-close{display:flex}.ws-header{padding:20px 22px;padding-inline-start:max(22px,var(--dsh-frame-leading-clearance,0px))}.ws-demo-note{padding-inline:22px}.ws-knowledge{font-size:10px}.ws-header-actions{gap:8px}}
12437
+ @container(max-width:700px){.ws-body{grid-template-columns:210px minmax(0,1fr)}.ws-header{padding:17px 18px;padding-inline-start:max(18px,var(--dsh-frame-leading-clearance,0px))}.ws-heading p{display:none}.ws-title-line h1{font-size:18px}.ws-header-actions .ws-knowledge{display:none}.ws-demo-note{padding:8px 18px;font-size:10px}.ws-demo-note button{display:none}.ws-conversation-head{padding:16px}.ws-messages{padding:18px 16px}.ws-replies{padding:13px 16px 0}.ws-handle{font-size:0!important;gap:0;padding:4px 7px}.ws-handle svg{width:15px}.ws-draft-note{font-size:9px}.ws-char-count{display:none}}
12438
+ @container(max-width:530px){.ws-body{display:flex}.ws-contacts{width:100%;border:0}.ws-conversation{display:none;width:100%}.ws-body[data-show-chat=true]>.ws-contacts{display:none}.ws-body[data-show-chat=true]>.ws-conversation{display:flex}.ws-mobile-back{display:flex}.ws-brand{display:none}.ws-header{padding:15px 16px;padding-inline-start:max(16px,var(--dsh-frame-leading-clearance,0px))}.ws-header-actions .ws-button{font-size:10px!important;padding:4px 7px}.ws-demo-note{align-items:flex-start}.ws-demo-note>.ws-dot{margin-top:6px}.ws-contact{padding:14px 12px}.ws-conversation-head{min-height:76px;padding:13px 12px;gap:7px}.ws-person-title h2{font-size:15px}.ws-person-title h2>span{display:none}.ws-editor textarea{height:96px}.ws-bubble{font-size:12px}.ws-message-content{max-width:85%}.ws-connection{align-items:flex-start}.ws-connection>svg{margin-top:3px}}
12508
12439
  @media(prefers-reduced-motion:reduce){.ws-page *{scroll-behavior:auto!important}}
12509
12440
 
12510
12441
  .ws-workspace,.ws-latest{display:flex;gap:8px;flex-direction:column;font-size:12px;color:var(--ws-muted);margin:8px 0}
@@ -12581,7 +12512,7 @@ function SalesIcon({ size = 18 }) {
12581
12512
  return /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "chat", size });
12582
12513
  }
12583
12514
  var EMPTY_CONTACT = { id: "", name: "", initials: "", segment: "", time: "", preview: "", status: "pending", unread: 0, product: "", budget: "", moneyAmounts: [], tags: [], facts: [], messages: [], candidates: [] };
12584
- function SalesPage({ t, useSales, useWorkspaces, dispatch, generate, loadConversation, refreshWorkspaces, wechat, useWechat, setMode, bindWechat, useUpdate, updater, updateFormDirty, runDelivery }) {
12515
+ function SalesPage({ t, useSales, useWorkspaces, dispatch, generate, loadConversation, refreshWorkspaces, back, wechat, useWechat, setMode, bindWechat, useUpdate, updater, updateFormDirty, runDelivery }) {
12585
12516
  const update = useUpdate?.((s) => s);
12586
12517
  const frozen = update?.preparing ?? false;
12587
12518
  const state = useSales((snapshot) => snapshot);
@@ -12599,14 +12530,7 @@ function SalesPage({ t, useSales, useWorkspaces, dispatch, generate, loadConvers
12599
12530
  const [sort, setSort] = (0, import_react11.useState)("recent");
12600
12531
  const [filter, setFilter] = (0, import_react11.useState)("all");
12601
12532
  const [showChat, setShowChat] = (0, import_react11.useState)(false);
12602
- const [profileVisibility, setProfileVisibility] = (0, import_react11.useState)("default");
12603
- const profileId = (0, import_react11.useId)();
12604
- const openProfileButton = (0, import_react11.useRef)(null);
12605
- const closeProfileButton = (0, import_react11.useRef)(null);
12606
- (0, import_react11.useEffect)(() => {
12607
- if (profileVisibility === "open") closeProfileButton.current?.focus({ preventScroll: true });
12608
- if (profileVisibility === "closed") openProfileButton.current?.focus({ preventScroll: true });
12609
- }, [profileVisibility]);
12533
+ const [showProfile, setShowProfile] = (0, import_react11.useState)(false);
12610
12534
  const [notice, setNotice] = (0, import_react11.useState)("");
12611
12535
  const [copyResult, setCopyResult] = (0, import_react11.useState)(null);
12612
12536
  const contact = state.contacts.find((c) => c.id === state.selectedId) ?? state.contacts[0] ?? EMPTY_CONTACT;
@@ -12769,13 +12693,13 @@ function SalesPage({ t, useSales, useWorkspaces, dispatch, generate, loadConvers
12769
12693
  const syncProgress = presentation.blocked || view.status?.phase === "authorizing" ? void 0 : view.status?.progress;
12770
12694
  const syncPercent = wechatProgressPercent({ progress: syncProgress });
12771
12695
  const syncLabel = view.error ? "wxProgressUnavailable" : view.status?.phase === "error" ? "wxProgressFailed" : view.status?.phase === "paused" ? "wxPaused" : syncActive ? "wxIncremental" : "wxRoundComplete";
12772
- return /* @__PURE__ */ import_react11.default.createElement("section", { className: "ws-page", "aria-label": t("title") }, /* @__PURE__ */ import_react11.default.createElement("style", null, styles + updateStyles), /* @__PURE__ */ import_react11.default.createElement("header", { className: "ws-header" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-heading" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-brand" }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "chat", size: 22 })), /* @__PURE__ */ import_react11.default.createElement("div", null, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-title-line" }, /* @__PURE__ */ import_react11.default.createElement("h1", null, t("title")), /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-demo-label" }, t("wxConnected"))), /* @__PURE__ */ import_react11.default.createElement("p", null, t("subtitle")))), updater && update && /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-header-actions" }, /* @__PURE__ */ import_react11.default.createElement(UpdatePanel, { client: updater, view: update, t }))), frozen && /* @__PURE__ */ import_react11.default.createElement("p", { role: "status", className: "ws-update-freeze" }, t("updateFreeze")), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-inline-sync" }, wechat && /* @__PURE__ */ import_react11.default.createElement(SyncPanel, { client: wechat, t, view, workspaceId: selectedWorkspace }), !contact.id && workspaceState.error && /* @__PURE__ */ import_react11.default.createElement("span", { role: "status" }, workspaceState.error)), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-body", "data-empty": !contact.id, "data-show-chat": showChat, "data-profile": profileVisibility }, /* @__PURE__ */ import_react11.default.createElement("aside", { className: "ws-contacts", "aria-label": t("customers") }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-contacts-head" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-intent-sortline" }, /* @__PURE__ */ import_react11.default.createElement("h2", null, t("customers")), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-intent-sort-control" }, /* @__PURE__ */ import_react11.default.createElement("select", { className: "ws-intent-sort", "aria-label": t("intentSort"), value: sort, onChange: (event) => setSort(event.currentTarget.value === "intent" ? "intent" : "recent") }, /* @__PURE__ */ import_react11.default.createElement("option", { value: "recent" }, t("intentSortRecent")), /* @__PURE__ */ import_react11.default.createElement("option", { value: "intent" }, t("intentSortHigh"))), /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "chevron", size: 12 }))), /* @__PURE__ */ import_react11.default.createElement("label", { className: "ws-search" }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "search", size: 15 }), /* @__PURE__ */ import_react11.default.createElement("input", { name: "sales-search", autoComplete: "off", "aria-label": t("search"), placeholder: t("search"), value: query, onChange: (e) => setQuery(e.target.value) })), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-filters", role: "group", "aria-label": t("customers") }, ["all", "pending", "handled"].map((value) => /* @__PURE__ */ import_react11.default.createElement("button", { key: value, type: "button", "aria-pressed": filter === value, onClick: () => setFilter(value) }, t(value), /* @__PURE__ */ import_react11.default.createElement("span", null, value === "all" ? state.contacts.length : value === "pending" ? pending : state.contacts.length - pending))))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-contact-list" }, contacts.map((c) => /* @__PURE__ */ import_react11.default.createElement("button", { key: c.id, className: `ws-contact ${c.id === contact.id ? "is-selected" : ""}`, "aria-pressed": c.id === contact.id, onClick: () => select(c.id) }, /* @__PURE__ */ import_react11.default.createElement(WechatAvatar, { client: wechat, scope: JSON.stringify([selectedWorkspace, c.wechat?.accountId]), owner: c.wechat?.chatKey ?? c.id, mediaId: c.wechat?.avatarId, fallback: c.initials }), /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-contact-content" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-contact-line" }, /* @__PURE__ */ import_react11.default.createElement("strong", { title: c.name }, c.name), /* @__PURE__ */ import_react11.default.createElement("time", { dateTime: c.time, title: c.time }, displayTime(c.time))), /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-preview" }, c.wechat && c.preview === "[image]" ? t("wxImageListPreview") : c.preview), c.wechat && /* @__PURE__ */ import_react11.default.createElement(IntentBadge, { intent: c.intent, t })))), !contacts.length && /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-empty" }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "search", size: 26 }), /* @__PURE__ */ import_react11.default.createElement("p", null, t(state.contacts.length ? "noResults" : presentation.emptyKey)), state.contacts.length > 0 && /* @__PURE__ */ import_react11.default.createElement("button", { className: "ws-text-button", onClick: () => {
12696
+ return /* @__PURE__ */ import_react11.default.createElement("section", { className: "ws-page", "aria-label": t("title") }, /* @__PURE__ */ import_react11.default.createElement("style", null, styles + updateStyles), /* @__PURE__ */ import_react11.default.createElement("header", { className: "ws-header" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-heading" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-brand" }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "chat", size: 22 })), /* @__PURE__ */ import_react11.default.createElement("div", null, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-title-line" }, /* @__PURE__ */ import_react11.default.createElement("h1", null, t("title")), /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-demo-label" }, t("wxConnected"))), /* @__PURE__ */ import_react11.default.createElement("p", null, t("subtitle")))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-header-actions" }, updater && update && /* @__PURE__ */ import_react11.default.createElement(UpdatePanel, { client: updater, view: update, t }), /* @__PURE__ */ import_react11.default.createElement("button", { className: "ws-button", onClick: back }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "arrow", size: 15 }), t("back")))), frozen && /* @__PURE__ */ import_react11.default.createElement("p", { role: "status", className: "ws-update-freeze" }, t("updateFreeze")), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-inline-sync" }, wechat && /* @__PURE__ */ import_react11.default.createElement(SyncPanel, { client: wechat, t, view, workspaceId: selectedWorkspace }), !contact.id && workspaceState.error && /* @__PURE__ */ import_react11.default.createElement("span", { role: "status" }, workspaceState.error)), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-body", "data-empty": !contact.id, "data-show-chat": showChat, "data-profile": showProfile }, /* @__PURE__ */ import_react11.default.createElement("aside", { className: "ws-contacts", "aria-label": t("customers") }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-contacts-head" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-intent-sortline" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-section-title" }, /* @__PURE__ */ import_react11.default.createElement("h2", null, t("customers")), /* @__PURE__ */ import_react11.default.createElement("span", null, state.contacts.length)), /* @__PURE__ */ import_react11.default.createElement("select", { className: "ws-intent-sort", "aria-label": t("intentSort"), value: sort, onChange: (event) => setSort(event.currentTarget.value === "intent" ? "intent" : "recent") }, /* @__PURE__ */ import_react11.default.createElement("option", { value: "recent" }, t("intentSortRecent")), /* @__PURE__ */ import_react11.default.createElement("option", { value: "intent" }, t("intentSortHigh")))), /* @__PURE__ */ import_react11.default.createElement("label", { className: "ws-search" }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "search", size: 15 }), /* @__PURE__ */ import_react11.default.createElement("input", { name: "sales-search", autoComplete: "off", "aria-label": t("search"), placeholder: t("search"), value: query, onChange: (e) => setQuery(e.target.value) })), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-filters", "aria-label": t("customers") }, ["all", "pending", "handled"].map((value) => /* @__PURE__ */ import_react11.default.createElement("button", { key: value, "aria-pressed": filter === value, onClick: () => setFilter(value) }, t(value), /* @__PURE__ */ import_react11.default.createElement("span", null, value === "all" ? state.contacts.length : value === "pending" ? pending : state.contacts.length - pending))))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-contact-list" }, contacts.map((c) => /* @__PURE__ */ import_react11.default.createElement("button", { key: c.id, className: `ws-contact ${c.id === contact.id ? "is-selected" : ""}`, "aria-pressed": c.id === contact.id, onClick: () => select(c.id) }, /* @__PURE__ */ import_react11.default.createElement(WechatAvatar, { client: wechat, scope: JSON.stringify([selectedWorkspace, c.wechat?.accountId]), owner: c.wechat?.chatKey ?? c.id, mediaId: c.wechat?.avatarId, fallback: c.initials }), /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-contact-content" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-contact-line" }, /* @__PURE__ */ import_react11.default.createElement("strong", { title: c.name }, c.name), /* @__PURE__ */ import_react11.default.createElement("time", { dateTime: c.time, title: c.time }, displayTime(c.time))), /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-preview" }, c.preview), c.wechat && /* @__PURE__ */ import_react11.default.createElement(IntentBadge, { intent: c.intent, t })))), !contacts.length && /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-empty" }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "search", size: 26 }), /* @__PURE__ */ import_react11.default.createElement("p", null, t(state.contacts.length ? "noResults" : presentation.emptyKey)), state.contacts.length > 0 && /* @__PURE__ */ import_react11.default.createElement("button", { className: "ws-text-button", onClick: () => {
12773
12697
  setQuery("");
12774
12698
  setFilter("all");
12775
- } }, t("clearSearch")))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-sync" }, state.contacts.length > 0 ? /* @__PURE__ */ import_react11.default.createElement(SyncFooter, { view, t }) : /* @__PURE__ */ import_react11.default.createElement("span", null, /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-dot" }), t("wxLocalHistory")))), /* @__PURE__ */ import_react11.default.createElement("main", { className: "ws-conversation" }, !contact.id ? /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-conversation-empty" }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "chat", size: 34 }), /* @__PURE__ */ import_react11.default.createElement("h2", null, t("wxRealTitle")), /* @__PURE__ */ import_react11.default.createElement("p", null, syncActive || syncPercent !== void 0 ? /* @__PURE__ */ import_react11.default.createElement(SyncActivity, { active: syncActive, percent: syncPercent }, t(syncActive ? "wxSyncingHint" : syncLabel)) : t(presentation.blocked ? "wxAwaitConnectionHistory" : presentation.hintKey ?? "wxSelectChat")), (syncActive || syncPercent !== void 0) && /* @__PURE__ */ import_react11.default.createElement(SyncProgressTrack, { progress: syncProgress, active: syncActive, t })) : /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-conversation-head" }, /* @__PURE__ */ import_react11.default.createElement("button", { className: "ws-icon-button ws-mobile-back", "aria-label": t("contactsBack"), onClick: () => setShowChat(false) }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "arrow" })), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-person-title" }, /* @__PURE__ */ import_react11.default.createElement("h2", null, contact.name, !contact.wechat && /* @__PURE__ */ import_react11.default.createElement("span", null, contact.segment)), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-person-meta" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-person-source" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-dot", "aria-hidden": "true" }), t("wechat"), /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-separator", "aria-hidden": "true" }, "/"), contact.wechat ? contact.crm ? t("wxBound") : t("wxUnbound") : t("sampleContact")), contact.wechat && /* @__PURE__ */ import_react11.default.createElement(IntentDetails, { key: contact.id, intent: contact.intent, t }))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-conversation-actions" }, /* @__PURE__ */ import_react11.default.createElement("button", { className: "ws-button ws-handle", disabled: frozen || contact.status === "handled", onClick: () => {
12699
+ } }, t("clearSearch")))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-sync" }, state.contacts.length > 0 ? /* @__PURE__ */ import_react11.default.createElement(SyncFooter, { view, t }) : /* @__PURE__ */ import_react11.default.createElement("span", null, /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-dot" }), t("wxLocalHistory")))), /* @__PURE__ */ import_react11.default.createElement("main", { className: "ws-conversation" }, !contact.id ? /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-conversation-empty" }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "chat", size: 34 }), /* @__PURE__ */ import_react11.default.createElement("h2", null, t("wxRealTitle")), /* @__PURE__ */ import_react11.default.createElement("p", null, syncActive || syncPercent !== void 0 ? /* @__PURE__ */ import_react11.default.createElement(SyncActivity, { active: syncActive, percent: syncPercent }, t(syncActive ? "wxSyncingHint" : syncLabel)) : t(presentation.blocked ? "wxAwaitConnectionHistory" : presentation.hintKey ?? "wxSelectChat")), (syncActive || syncPercent !== void 0) && /* @__PURE__ */ import_react11.default.createElement(SyncProgressTrack, { progress: syncProgress, active: syncActive, t })) : /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-conversation-head" }, /* @__PURE__ */ import_react11.default.createElement("button", { className: "ws-icon-button ws-mobile-back", "aria-label": t("contactsBack"), onClick: () => setShowChat(false) }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "arrow" })), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-person-title" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-intent-title" }, /* @__PURE__ */ import_react11.default.createElement("h2", null, contact.name, /* @__PURE__ */ import_react11.default.createElement("span", null, contact.segment)), contact.wechat && /* @__PURE__ */ import_react11.default.createElement(IntentDetails, { key: contact.id, intent: contact.intent, t })), /* @__PURE__ */ import_react11.default.createElement("p", null, /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-dot" }), t("wechat"), /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-separator" }, "/"), contact.wechat ? contact.crm ? t("wxBound") : t("wxUnbound") : t("sampleContact"))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-conversation-actions" }, /* @__PURE__ */ import_react11.default.createElement("button", { className: "ws-button ws-handle", disabled: frozen || contact.status === "handled", onClick: () => {
12776
12700
  dispatch({ type: "handled", id: contact.id });
12777
12701
  setNotice(t(contact.wechat ? "wxHandled" : "handledDone"));
12778
- } }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "check", size: 15 }), contact.status === "handled" ? t("handled") : t("markHandled")), /* @__PURE__ */ import_react11.default.createElement("button", { type: "button", className: "ws-button ws-profile-toggle", ref: openProfileButton, "aria-label": t("expand"), "aria-controls": profileId, "aria-expanded": profileVisibility === "open", onClick: () => setProfileVisibility("open") }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "user", size: 15 }), /* @__PURE__ */ import_react11.default.createElement("span", null, t("profile"))))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-history-wrap" }, /* @__PURE__ */ import_react11.default.createElement("div", { ref: reading.viewport, onScroll: reading.onScroll, className: "ws-messages", role: "region", tabIndex: 0, "aria-label": t("conversation") }, /* @__PURE__ */ import_react11.default.createElement("div", { ref: reading.content }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-date" }, /* @__PURE__ */ import_react11.default.createElement("span", null, contact.wechat ? t("wxHistory") : t("today"))), contact.wechat && wechat && view.contactId === contact.id ? /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, view.hasMore && /* @__PURE__ */ import_react11.default.createElement("button", { className: "ws-button ws-earlier", onClick: () => void wechat.messages(contact.id, true).catch((e) => setNotice(e.message)) }, t("wxEarlier")), view.messages.map((m) => /* @__PURE__ */ import_react11.default.createElement("div", { key: m.id, "data-message-id": m.id, className: `ws-message ${m.direction === "outbound" ? "ws-out" : ""}` }, /* @__PURE__ */ import_react11.default.createElement(WechatAvatar, { client: wechat, scope: JSON.stringify([selectedWorkspace, contact.wechat.accountId]), owner: m.direction === "outbound" ? contact.wechat.accountId : contact.wechat.chatKey, mediaId: m.direction === "outbound" ? contact.wechat.selfAvatarId : contact.wechat.avatarId, fallback: m.direction === "outbound" ? t("user") : contact.initials, className: "ws-message-avatar" }), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-message-content" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-message-meta" }, /* @__PURE__ */ import_react11.default.createElement("span", null, m.direction === "inbound" ? contact.name : m.direction === "outbound" ? t("user") : t("wxSystem")), /* @__PURE__ */ import_react11.default.createElement("time", { dateTime: m.sentAt, title: m.sentAt }, displayTime(m.sentAt, true))), /* @__PURE__ */ import_react11.default.createElement("div", { className: `ws-bubble${m.kind === "voice" || m.kind === "audio" ? " ws-voice-bubble" : ""}` }, /* @__PURE__ */ import_react11.default.createElement(WechatMessageBody, { message: m, client: wechat, revision: view.status?.revision, t })))))) : contact.messages.map((message) => /* @__PURE__ */ import_react11.default.createElement("div", { key: message.id, "data-message-id": message.id, className: `ws-message ${message.direction === "out" ? "ws-out" : ""}` }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-avatar ws-message-avatar" }, message.direction === "out" ? t("user") : contact.initials), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-message-content" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-message-meta" }, /* @__PURE__ */ import_react11.default.createElement("span", null, message.direction === "out" ? t("user") : contact.name), /* @__PURE__ */ import_react11.default.createElement("time", null, message.time)), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-bubble" }, message.text)))))), reading.unseen && /* @__PURE__ */ import_react11.default.createElement("button", { type: "button", className: "ws-latest-action", onClick: reading.goToLatest }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-latest-dot", "aria-hidden": "true" }), t("wxNewMessagesLatest"), /* @__PURE__ */ import_react11.default.createElement("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": "true" }, /* @__PURE__ */ import_react11.default.createElement("path", { d: "m6 9 6 6 6-6" })))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-replies" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-reply-heading" }, /* @__PURE__ */ import_react11.default.createElement("div", null, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "spark", size: 16 }), /* @__PURE__ */ import_react11.default.createElement("h3", null, t("reply")), /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-example-badge" }, t(replyView.key))), /* @__PURE__ */ import_react11.default.createElement("button", { className: "ws-text-button", disabled: frozen || running || !selectedWorkspace || !replyView.canGenerate, onClick: () => {
12702
+ } }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "check", size: 15 }), contact.status === "handled" ? t("handled") : t("markHandled")), /* @__PURE__ */ import_react11.default.createElement("button", { className: "ws-icon-button ws-profile-toggle", "aria-label": showProfile ? t("closeProfile") : t("expand"), onClick: () => setShowProfile((v) => !v) }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "user" })))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-history-wrap" }, /* @__PURE__ */ import_react11.default.createElement("div", { ref: reading.viewport, onScroll: reading.onScroll, className: "ws-messages", role: "region", tabIndex: 0, "aria-label": t("conversation") }, /* @__PURE__ */ import_react11.default.createElement("div", { ref: reading.content }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-date" }, /* @__PURE__ */ import_react11.default.createElement("span", null, contact.wechat ? t("wxHistory") : t("today"))), contact.wechat && wechat && view.contactId === contact.id ? /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, view.hasMore && /* @__PURE__ */ import_react11.default.createElement("button", { className: "ws-button ws-earlier", onClick: () => void wechat.messages(contact.id, true).catch((e) => setNotice(e.message)) }, t("wxEarlier")), view.messages.map((m) => /* @__PURE__ */ import_react11.default.createElement("div", { key: m.id, "data-message-id": m.id, className: `ws-message ${m.direction === "outbound" ? "ws-out" : ""}` }, /* @__PURE__ */ import_react11.default.createElement(WechatAvatar, { client: wechat, scope: JSON.stringify([selectedWorkspace, contact.wechat.accountId]), owner: m.direction === "outbound" ? contact.wechat.accountId : contact.wechat.chatKey, mediaId: m.direction === "outbound" ? contact.wechat.selfAvatarId : contact.wechat.avatarId, fallback: m.direction === "outbound" ? t("user") : contact.initials, className: "ws-message-avatar" }), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-message-content" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-message-meta" }, /* @__PURE__ */ import_react11.default.createElement("span", null, m.direction === "inbound" ? contact.name : m.direction === "outbound" ? t("user") : t("wxSystem")), /* @__PURE__ */ import_react11.default.createElement("time", { dateTime: m.sentAt, title: m.sentAt }, displayTime(m.sentAt, true))), /* @__PURE__ */ import_react11.default.createElement("div", { className: `ws-bubble${m.kind === "voice" || m.kind === "audio" ? " ws-voice-bubble" : ""}` }, /* @__PURE__ */ import_react11.default.createElement(WechatMessageBody, { message: m, client: wechat, revision: view.status?.revision, t })))))) : contact.messages.map((message) => /* @__PURE__ */ import_react11.default.createElement("div", { key: message.id, "data-message-id": message.id, className: `ws-message ${message.direction === "out" ? "ws-out" : ""}` }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-avatar ws-message-avatar" }, message.direction === "out" ? t("user") : contact.initials), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-message-content" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-message-meta" }, /* @__PURE__ */ import_react11.default.createElement("span", null, message.direction === "out" ? t("user") : contact.name), /* @__PURE__ */ import_react11.default.createElement("time", null, message.time)), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-bubble" }, message.text)))))), reading.unseen && /* @__PURE__ */ import_react11.default.createElement("button", { type: "button", className: "ws-latest-action", onClick: reading.goToLatest }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-latest-dot", "aria-hidden": "true" }), t("wxNewMessagesLatest"), /* @__PURE__ */ import_react11.default.createElement("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": "true" }, /* @__PURE__ */ import_react11.default.createElement("path", { d: "m6 9 6 6 6-6" })))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-replies" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-reply-heading" }, /* @__PURE__ */ import_react11.default.createElement("div", null, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "spark", size: 16 }), /* @__PURE__ */ import_react11.default.createElement("h3", null, t("reply")), /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-example-badge" }, t(replyView.key))), /* @__PURE__ */ import_react11.default.createElement("button", { className: "ws-text-button", disabled: frozen || running || !selectedWorkspace || !replyView.canGenerate, onClick: () => {
12779
12703
  setCopyResult(null);
12780
12704
  setNotice("");
12781
12705
  void generate(selectedWorkspace, contact.id);
@@ -12790,7 +12714,7 @@ function SalesPage({ t, useSales, useWorkspaces, dispatch, generate, loadConvers
12790
12714
  setCopyResult(null);
12791
12715
  } }), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-editor-footer" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "ws-char-count" }, draft.length, " ", t("chars")), /* @__PURE__ */ import_react11.default.createElement("button", { className: "ws-button ws-primary", disabled: frozen || running || !draft.trim() || generation?.result?.no_send, onClick: () => {
12792
12716
  void copy();
12793
- } }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: copyResult?.id === contact.id && copyResult.success ? "check" : "copy", size: 15 }), copyResult?.id === contact.id && copyResult.success ? t("copied") : t("copy"))), wechatSendingEnabled && contact.wechat && /* @__PURE__ */ import_react11.default.createElement("p", { role: "status", "aria-live": "polite" }, !delivery.available ? t("wxCuaRequired") : delivery.status === "sending" ? t("wxSending") : delivery.status === "awaiting-receipt" ? t("wxAwaitReceipt") : delivery.status === "sent" ? t("wxSent") : ["unknown", "claimed", "stopped", "blocked"].includes(delivery.status) ? t("wxSendStopped") : t("wxManualNote")), state.historyErrors?.[contact.id] && /* @__PURE__ */ import_react11.default.createElement("p", { role: "status" }, state.historyErrors[contact.id]), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-notice", role: "status" }, copyResult?.id === contact.id && !copyResult.success ? t("copyError") : notice)))), contact.id && /* @__PURE__ */ import_react11.default.createElement("aside", { id: profileId, className: "ws-profile", "aria-label": t("profile") }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-profile-head" }, /* @__PURE__ */ import_react11.default.createElement("h2", null, t("profile")), /* @__PURE__ */ import_react11.default.createElement("button", { type: "button", className: "ws-icon-button ws-profile-close", ref: closeProfileButton, "aria-label": t("closeProfile"), title: t("closeProfile"), onClick: () => setProfileVisibility("closed") }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "close", size: 17 }))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-profile-person" }, /* @__PURE__ */ import_react11.default.createElement(WechatAvatar, { client: wechat, scope: JSON.stringify([selectedWorkspace, contact.wechat?.accountId]), owner: contact.wechat?.chatKey ?? contact.id, mediaId: contact.wechat?.avatarId, fallback: contact.initials, className: "ws-profile-avatar" }), /* @__PURE__ */ import_react11.default.createElement("h3", null, contact.name), /* @__PURE__ */ import_react11.default.createElement("p", null, contact.segment), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-tags" }, contact.tags.map((tag) => /* @__PURE__ */ import_react11.default.createElement("span", { key: tag }, tag)))), contact.wechat && bindWechat && /* @__PURE__ */ import_react11.default.createElement(CrmForm, { key: contact.id, contact, t, frozen, dirty: updateFormDirty, bind: (binding) => bindWechat(selectedWorkspace, contact.id, binding) }), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-profile-section" }, /* @__PURE__ */ import_react11.default.createElement("h3", null, t("interest")), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-product" }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "chat", size: 18 }), /* @__PURE__ */ import_react11.default.createElement("div", null, /* @__PURE__ */ import_react11.default.createElement("strong", null, contact.product), /* @__PURE__ */ import_react11.default.createElement("p", null, contact.wechat ? t("wxContext") : t("contextHint")))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-budget" }, /* @__PURE__ */ import_react11.default.createElement("span", null, t("budget")), /* @__PURE__ */ import_react11.default.createElement("strong", null, contact.budget))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-profile-section" }, /* @__PURE__ */ import_react11.default.createElement("h3", null, t("facts")), /* @__PURE__ */ import_react11.default.createElement("dl", null, contact.facts.map((fact) => /* @__PURE__ */ import_react11.default.createElement("div", { key: fact.label }, /* @__PURE__ */ import_react11.default.createElement("dt", null, fact.label), /* @__PURE__ */ import_react11.default.createElement("dd", null, fact.value))))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-profile-caption" }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "spark", size: 14 }), /* @__PURE__ */ import_react11.default.createElement("span", null, contact.wechat ? t("wxSources") : t("profileNote"))))));
12717
+ } }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: copyResult?.id === contact.id && copyResult.success ? "check" : "copy", size: 15 }), copyResult?.id === contact.id && copyResult.success ? t("copied") : t("copy"))), wechatSendingEnabled && contact.wechat && /* @__PURE__ */ import_react11.default.createElement("p", { role: "status", "aria-live": "polite" }, !delivery.available ? t("wxCuaRequired") : delivery.status === "sending" ? t("wxSending") : delivery.status === "awaiting-receipt" ? t("wxAwaitReceipt") : delivery.status === "sent" ? t("wxSent") : ["unknown", "claimed", "stopped", "blocked"].includes(delivery.status) ? t("wxSendStopped") : t("wxManualNote")), state.historyErrors?.[contact.id] && /* @__PURE__ */ import_react11.default.createElement("p", { role: "status" }, state.historyErrors[contact.id]), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-notice", role: "status" }, copyResult?.id === contact.id && !copyResult.success ? t("copyError") : notice)))), contact.id && /* @__PURE__ */ import_react11.default.createElement("aside", { className: "ws-profile", "aria-label": t("profile") }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-profile-head" }, /* @__PURE__ */ import_react11.default.createElement("h2", null, t("profile")), /* @__PURE__ */ import_react11.default.createElement("button", { className: "ws-icon-button ws-profile-close", "aria-label": t("closeProfile"), onClick: () => setShowProfile(false) }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "close", size: 17 }))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-profile-person" }, /* @__PURE__ */ import_react11.default.createElement(WechatAvatar, { client: wechat, scope: JSON.stringify([selectedWorkspace, contact.wechat?.accountId]), owner: contact.wechat?.chatKey ?? contact.id, mediaId: contact.wechat?.avatarId, fallback: contact.initials, className: "ws-profile-avatar" }), /* @__PURE__ */ import_react11.default.createElement("h3", null, contact.name), /* @__PURE__ */ import_react11.default.createElement("p", null, contact.segment), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-tags" }, contact.tags.map((tag) => /* @__PURE__ */ import_react11.default.createElement("span", { key: tag }, tag)))), contact.wechat && bindWechat && /* @__PURE__ */ import_react11.default.createElement(CrmForm, { key: contact.id, contact, t, frozen, dirty: updateFormDirty, bind: (binding) => bindWechat(selectedWorkspace, contact.id, binding) }), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-profile-section" }, /* @__PURE__ */ import_react11.default.createElement("h3", null, t("interest")), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-product" }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "chat", size: 18 }), /* @__PURE__ */ import_react11.default.createElement("div", null, /* @__PURE__ */ import_react11.default.createElement("strong", null, contact.product), /* @__PURE__ */ import_react11.default.createElement("p", null, contact.wechat ? t("wxContext") : t("contextHint")))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-budget" }, /* @__PURE__ */ import_react11.default.createElement("span", null, t("budget")), /* @__PURE__ */ import_react11.default.createElement("strong", null, contact.budget))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-profile-section" }, /* @__PURE__ */ import_react11.default.createElement("h3", null, t("facts")), /* @__PURE__ */ import_react11.default.createElement("dl", null, contact.facts.map((fact) => /* @__PURE__ */ import_react11.default.createElement("div", { key: fact.label }, /* @__PURE__ */ import_react11.default.createElement("dt", null, fact.label), /* @__PURE__ */ import_react11.default.createElement("dd", null, fact.value))))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "ws-profile-caption" }, /* @__PURE__ */ import_react11.default.createElement(Glyph, { name: "spark", size: 14 }), /* @__PURE__ */ import_react11.default.createElement("span", null, contact.wechat ? t("wxSources") : t("profileNote"))))));
12794
12718
  }
12795
12719
  var inject = ["slots", "layout", "locale", "connection", "remote", "remote.session"];
12796
12720
  function apply(ctx) {