@eshal-bot/chat-widget 0.1.86 → 0.1.88
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/{chat-widget-MarkdownRenderer-CtuwhhE4.esm.js → chat-widget-MarkdownRenderer-BeXE7g2f.esm.js} +5 -5
- package/dist/chat-widget-index-LvRlCTWS.esm.js +20 -0
- package/dist/chat-widget-markdown-chunk.js +877 -54
- package/dist/chat-widget-markdown-chunk.min.js +9 -9
- package/dist/chat-widget.esm.js +1 -1
- package/dist/chat-widget.js +48 -30
- package/dist/chat-widget.min.js +2 -2
- package/dist/chat-widget.umd.js +6 -6
- package/package.json +2 -1
- package/dist/chat-widget-index-DNzS3N-C.esm.js +0 -20
|
@@ -20764,7 +20764,7 @@
|
|
|
20764
20764
|
function exitCodeText(token) {
|
|
20765
20765
|
let value = this.resume();
|
|
20766
20766
|
if (this.data.inTable) {
|
|
20767
|
-
value = value.replace(/\\([\\|])/g, replace);
|
|
20767
|
+
value = value.replace(/\\([\\|])/g, replace$1);
|
|
20768
20768
|
}
|
|
20769
20769
|
const node = this.stack[this.stack.length - 1];
|
|
20770
20770
|
ok$2(node.type === 'inlineCode');
|
|
@@ -20777,7 +20777,7 @@
|
|
|
20777
20777
|
* @param {string} $1
|
|
20778
20778
|
* @returns {string}
|
|
20779
20779
|
*/
|
|
20780
|
-
function replace($0, $1) {
|
|
20780
|
+
function replace$1($0, $1) {
|
|
20781
20781
|
// Pipes work, backslashes don’t (but can’t escape pipes).
|
|
20782
20782
|
return $1 === '|' ? $1 : $0;
|
|
20783
20783
|
}
|
|
@@ -23860,6 +23860,61 @@
|
|
|
23860
23860
|
toMarkdownExtensions.push(gfmToMarkdown(settings));
|
|
23861
23861
|
}
|
|
23862
23862
|
|
|
23863
|
+
/**
|
|
23864
|
+
* @typedef {import('mdast').Nodes} Nodes
|
|
23865
|
+
* @typedef {import('mdast-util-find-and-replace').ReplaceFunction} ReplaceFunction
|
|
23866
|
+
*/
|
|
23867
|
+
|
|
23868
|
+
|
|
23869
|
+
/**
|
|
23870
|
+
* Turn normal line endings into hard breaks.
|
|
23871
|
+
*
|
|
23872
|
+
* @param {Nodes} tree
|
|
23873
|
+
* Tree to change.
|
|
23874
|
+
* @returns {undefined}
|
|
23875
|
+
* Nothing.
|
|
23876
|
+
*/
|
|
23877
|
+
function newlineToBreak(tree) {
|
|
23878
|
+
findAndReplace(tree, [/\r?\n|\r/g, replace]);
|
|
23879
|
+
}
|
|
23880
|
+
|
|
23881
|
+
/**
|
|
23882
|
+
* Replace line endings.
|
|
23883
|
+
*
|
|
23884
|
+
* @type {ReplaceFunction}
|
|
23885
|
+
*/
|
|
23886
|
+
function replace() {
|
|
23887
|
+
return {
|
|
23888
|
+
type: 'break'
|
|
23889
|
+
};
|
|
23890
|
+
}
|
|
23891
|
+
|
|
23892
|
+
/**
|
|
23893
|
+
* @typedef {import('mdast').Root} Root
|
|
23894
|
+
*/
|
|
23895
|
+
|
|
23896
|
+
|
|
23897
|
+
/**
|
|
23898
|
+
* Support hard breaks without needing spaces or escapes (turns enters into
|
|
23899
|
+
* `<br>`s).
|
|
23900
|
+
*
|
|
23901
|
+
* @returns
|
|
23902
|
+
* Transform.
|
|
23903
|
+
*/
|
|
23904
|
+
function remarkBreaks() {
|
|
23905
|
+
/**
|
|
23906
|
+
* Transform.
|
|
23907
|
+
*
|
|
23908
|
+
* @param {Root} tree
|
|
23909
|
+
* Tree.
|
|
23910
|
+
* @returns {undefined}
|
|
23911
|
+
* Nothing.
|
|
23912
|
+
*/
|
|
23913
|
+
return function (tree) {
|
|
23914
|
+
newlineToBreak(tree);
|
|
23915
|
+
};
|
|
23916
|
+
}
|
|
23917
|
+
|
|
23863
23918
|
function _objectWithoutPropertiesLoose$l(r, e) {
|
|
23864
23919
|
if (null == r) return {};
|
|
23865
23920
|
var t = {};
|
|
@@ -88048,6 +88103,36 @@
|
|
|
88048
88103
|
isDark: isDark,
|
|
88049
88104
|
onButtonClick: onButtonClick
|
|
88050
88105
|
});
|
|
88106
|
+
// Cross-industry primitives (14-08-2026) - mirrors
|
|
88107
|
+
// packages/frontend/src/components/charts/A2uiBlock.tsx's menu/profile/
|
|
88108
|
+
// timeline/rating/comparison/gallery additions.
|
|
88109
|
+
if (t === 'menu') return /*#__PURE__*/jsxRuntimeExports.jsx(Menu, {
|
|
88110
|
+
spec: spec,
|
|
88111
|
+
isDark: isDark,
|
|
88112
|
+
onButtonClick: onButtonClick
|
|
88113
|
+
});
|
|
88114
|
+
if (t === 'profile') return /*#__PURE__*/jsxRuntimeExports.jsx(Profile, {
|
|
88115
|
+
spec: spec,
|
|
88116
|
+
isDark: isDark,
|
|
88117
|
+
onButtonClick: onButtonClick
|
|
88118
|
+
});
|
|
88119
|
+
if (t === 'timeline') return /*#__PURE__*/jsxRuntimeExports.jsx(Timeline, {
|
|
88120
|
+
spec: spec,
|
|
88121
|
+
isDark: isDark
|
|
88122
|
+
});
|
|
88123
|
+
if (t === 'rating') return /*#__PURE__*/jsxRuntimeExports.jsx(Rating, {
|
|
88124
|
+
spec: spec,
|
|
88125
|
+
isDark: isDark
|
|
88126
|
+
});
|
|
88127
|
+
if (t === 'comparison') return /*#__PURE__*/jsxRuntimeExports.jsx(Comparison, {
|
|
88128
|
+
spec: spec,
|
|
88129
|
+
isDark: isDark,
|
|
88130
|
+
onButtonClick: onButtonClick
|
|
88131
|
+
});
|
|
88132
|
+
if (t === 'gallery') return /*#__PURE__*/jsxRuntimeExports.jsx(Gallery, {
|
|
88133
|
+
spec: spec,
|
|
88134
|
+
isDark: isDark
|
|
88135
|
+
});
|
|
88051
88136
|
|
|
88052
88137
|
// Unrecognised type - render the data (if any) as a labeled list. Never
|
|
88053
88138
|
// fall through to raw JSON; that's the bug we're fixing.
|
|
@@ -88243,33 +88328,33 @@
|
|
|
88243
88328
|
isDark
|
|
88244
88329
|
} = _ref10;
|
|
88245
88330
|
const lvl = String(spec.level || 'info').toLowerCase();
|
|
88331
|
+
// EV-2258 Status Message Spec v1 - same --status-success/warning/error/info
|
|
88332
|
+
// tokens as packages/frontend/src/app/globals.css. This file styles via JS
|
|
88333
|
+
// objects rather than Tailwind classes/CSS vars, so the locked hsl() values
|
|
88334
|
+
// are inlined directly instead of the previous ad-hoc blue/amber/red hexes.
|
|
88246
88335
|
const palette = {
|
|
88247
88336
|
info: {
|
|
88248
|
-
bg: isDark ? '
|
|
88249
|
-
border: '
|
|
88250
|
-
text: isDark ? '#
|
|
88337
|
+
bg: isDark ? 'hsl(204 33% 14%)' : 'hsl(204 100% 97%)',
|
|
88338
|
+
border: isDark ? 'hsl(199 89% 58%)' : 'hsl(199 89% 48%)',
|
|
88339
|
+
text: isDark ? '#bae6fd' : '#0c4a6e'
|
|
88251
88340
|
},
|
|
88252
88341
|
warn: {
|
|
88253
|
-
bg: isDark ? '
|
|
88254
|
-
border: '
|
|
88255
|
-
text: isDark ? '#fde68a' : '#
|
|
88256
|
-
},
|
|
88257
|
-
warning: {
|
|
88258
|
-
bg: isDark ? '#3d2e0a' : '#fef3c7',
|
|
88259
|
-
border: '#f59e0b',
|
|
88260
|
-
text: isDark ? '#fde68a' : '#92400e'
|
|
88342
|
+
bg: isDark ? 'hsl(36 33% 14%)' : 'hsl(34 100% 95%)',
|
|
88343
|
+
border: isDark ? 'hsl(38 92% 60%)' : 'hsl(35 100% 50%)',
|
|
88344
|
+
text: isDark ? '#fde68a' : '#663c00'
|
|
88261
88345
|
},
|
|
88262
88346
|
error: {
|
|
88263
|
-
bg: isDark ? '
|
|
88264
|
-
border: '
|
|
88265
|
-
text: isDark ? '#
|
|
88347
|
+
bg: isDark ? 'hsl(356 33% 16%)' : 'hsl(356 100% 97%)',
|
|
88348
|
+
border: isDark ? 'hsl(350 89% 65%)' : 'hsl(350 89% 60%)',
|
|
88349
|
+
text: isDark ? '#fecdd3' : '#9f1239'
|
|
88266
88350
|
},
|
|
88267
88351
|
success: {
|
|
88268
|
-
bg: isDark ? '
|
|
88269
|
-
border: '
|
|
88352
|
+
bg: isDark ? 'hsl(152 36% 14%)' : 'hsl(152 81% 96%)',
|
|
88353
|
+
border: isDark ? 'hsl(158 64% 52%)' : 'hsl(160 84% 39%)',
|
|
88270
88354
|
text: isDark ? '#a7f3d0' : '#065f46'
|
|
88271
88355
|
}
|
|
88272
88356
|
};
|
|
88357
|
+
palette.warning = palette.warn;
|
|
88273
88358
|
const p = palette[lvl] || palette.info;
|
|
88274
88359
|
return /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88275
88360
|
style: _objectSpread2(_objectSpread2({}, card(isDark)), {}, {
|
|
@@ -88439,6 +88524,740 @@
|
|
|
88439
88524
|
});
|
|
88440
88525
|
}
|
|
88441
88526
|
|
|
88527
|
+
// ── Cross-industry primitives (14-08-2026) ──────────────────────────────
|
|
88528
|
+
// menu/catalog, person profile, status timeline, rating/review, pricing
|
|
88529
|
+
// comparison, image gallery. Plain inline styles + isDark ternaries, same
|
|
88530
|
+
// convention as everything above - mirrors
|
|
88531
|
+
// packages/frontend/src/components/charts/A2uiBlock.tsx's Tailwind
|
|
88532
|
+
// versions but hand-rolled here (no Tailwind runtime in the widget bundle).
|
|
88533
|
+
|
|
88534
|
+
const BRAND_BLUE = '#2563eb';
|
|
88535
|
+
function tagChipStyle(isDark) {
|
|
88536
|
+
return {
|
|
88537
|
+
display: 'inline-flex',
|
|
88538
|
+
alignItems: 'center',
|
|
88539
|
+
borderRadius: 999,
|
|
88540
|
+
padding: '2px 8px',
|
|
88541
|
+
fontSize: 10,
|
|
88542
|
+
fontWeight: 600,
|
|
88543
|
+
background: isDark ? 'rgba(37,99,235,0.20)' : '#eff6ff',
|
|
88544
|
+
color: isDark ? '#93c5fd' : '#1d4ed8'
|
|
88545
|
+
};
|
|
88546
|
+
}
|
|
88547
|
+
function primaryButtonStyle(isDark, disabled) {
|
|
88548
|
+
return {
|
|
88549
|
+
display: 'inline-flex',
|
|
88550
|
+
alignItems: 'center',
|
|
88551
|
+
justifyContent: 'center',
|
|
88552
|
+
padding: '6px 12px',
|
|
88553
|
+
borderRadius: 6,
|
|
88554
|
+
fontSize: 12,
|
|
88555
|
+
fontWeight: 600,
|
|
88556
|
+
border: 'none',
|
|
88557
|
+
background: BRAND_BLUE,
|
|
88558
|
+
color: '#ffffff',
|
|
88559
|
+
cursor: disabled ? 'default' : 'pointer',
|
|
88560
|
+
opacity: disabled ? 0.5 : 1
|
|
88561
|
+
};
|
|
88562
|
+
}
|
|
88563
|
+
function secondaryButtonStyle(isDark, disabled) {
|
|
88564
|
+
return {
|
|
88565
|
+
display: 'inline-flex',
|
|
88566
|
+
alignItems: 'center',
|
|
88567
|
+
justifyContent: 'center',
|
|
88568
|
+
padding: '6px 12px',
|
|
88569
|
+
borderRadius: 6,
|
|
88570
|
+
fontSize: 12,
|
|
88571
|
+
fontWeight: 600,
|
|
88572
|
+
border: '1px solid ' + (isDark ? '#374151' : '#d1d5db'),
|
|
88573
|
+
background: isDark ? '#1f2937' : '#ffffff',
|
|
88574
|
+
color: isDark ? '#f3f4f6' : '#111827',
|
|
88575
|
+
textDecoration: 'none',
|
|
88576
|
+
cursor: disabled ? 'default' : 'pointer',
|
|
88577
|
+
opacity: disabled ? 0.5 : 1
|
|
88578
|
+
};
|
|
88579
|
+
}
|
|
88580
|
+
function StarRow(_ref19) {
|
|
88581
|
+
let {
|
|
88582
|
+
score,
|
|
88583
|
+
maxScore = 5,
|
|
88584
|
+
size = 14,
|
|
88585
|
+
isDark
|
|
88586
|
+
} = _ref19;
|
|
88587
|
+
const stars = [];
|
|
88588
|
+
for (let i = 0; i < maxScore; i += 1) {
|
|
88589
|
+
const filled = score >= i + 1;
|
|
88590
|
+
const half = !filled && score > i && score < i + 1;
|
|
88591
|
+
stars.push(/*#__PURE__*/jsxRuntimeExports.jsxs("svg", {
|
|
88592
|
+
width: size,
|
|
88593
|
+
height: size,
|
|
88594
|
+
viewBox: "0 0 24 24",
|
|
88595
|
+
fill: filled ? '#fbbf24' : half ? "url(#a2ui-half-star-".concat(i, ")") : 'none',
|
|
88596
|
+
stroke: filled || half ? '#fbbf24' : isDark ? '#4b5563' : '#d1d5db',
|
|
88597
|
+
strokeWidth: "1.5",
|
|
88598
|
+
children: [half && /*#__PURE__*/jsxRuntimeExports.jsx("defs", {
|
|
88599
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsxs("linearGradient", {
|
|
88600
|
+
id: "a2ui-half-star-".concat(i),
|
|
88601
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx("stop", {
|
|
88602
|
+
offset: "50%",
|
|
88603
|
+
stopColor: "#fbbf24"
|
|
88604
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx("stop", {
|
|
88605
|
+
offset: "50%",
|
|
88606
|
+
stopColor: "transparent"
|
|
88607
|
+
})]
|
|
88608
|
+
})
|
|
88609
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx("polygon", {
|
|
88610
|
+
points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
|
|
88611
|
+
})]
|
|
88612
|
+
}, i));
|
|
88613
|
+
}
|
|
88614
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88615
|
+
style: {
|
|
88616
|
+
display: 'flex',
|
|
88617
|
+
alignItems: 'center',
|
|
88618
|
+
gap: 1
|
|
88619
|
+
},
|
|
88620
|
+
children: stars
|
|
88621
|
+
});
|
|
88622
|
+
}
|
|
88623
|
+
|
|
88624
|
+
// ── 1. Menu (catalog / product / service list) ──
|
|
88625
|
+
|
|
88626
|
+
function Menu(_ref20) {
|
|
88627
|
+
let {
|
|
88628
|
+
spec,
|
|
88629
|
+
isDark,
|
|
88630
|
+
onButtonClick
|
|
88631
|
+
} = _ref20;
|
|
88632
|
+
const items = Array.isArray(spec.items) ? spec.items : [];
|
|
88633
|
+
if (items.length === 0) return null;
|
|
88634
|
+
const border = isDark ? '1px solid #374151' : '1px solid #e5e7eb';
|
|
88635
|
+
const subColor = isDark ? '#9ca3af' : '#6b7280';
|
|
88636
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88637
|
+
style: {
|
|
88638
|
+
margin: '8px 0'
|
|
88639
|
+
},
|
|
88640
|
+
children: [(spec.title || spec.subtitle) && /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88641
|
+
style: {
|
|
88642
|
+
marginBottom: 8
|
|
88643
|
+
},
|
|
88644
|
+
children: [spec.title && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88645
|
+
style: {
|
|
88646
|
+
fontSize: 13,
|
|
88647
|
+
fontWeight: 700
|
|
88648
|
+
},
|
|
88649
|
+
children: spec.title
|
|
88650
|
+
}), spec.subtitle && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88651
|
+
style: {
|
|
88652
|
+
fontSize: 11,
|
|
88653
|
+
color: subColor
|
|
88654
|
+
},
|
|
88655
|
+
children: spec.subtitle
|
|
88656
|
+
})]
|
|
88657
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88658
|
+
style: {
|
|
88659
|
+
display: 'grid',
|
|
88660
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(160px, 1fr))',
|
|
88661
|
+
gap: 10
|
|
88662
|
+
},
|
|
88663
|
+
children: items.map((item, i) => /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88664
|
+
style: {
|
|
88665
|
+
border,
|
|
88666
|
+
borderRadius: 10,
|
|
88667
|
+
overflow: 'hidden',
|
|
88668
|
+
background: isDark ? '#1f2937' : '#ffffff',
|
|
88669
|
+
display: 'flex',
|
|
88670
|
+
flexDirection: 'column'
|
|
88671
|
+
},
|
|
88672
|
+
children: [item.image && /*#__PURE__*/jsxRuntimeExports.jsx("img", {
|
|
88673
|
+
src: item.image,
|
|
88674
|
+
alt: item.name || '',
|
|
88675
|
+
referrerPolicy: "no-referrer",
|
|
88676
|
+
onError: e => {
|
|
88677
|
+
e.currentTarget.style.display = 'none';
|
|
88678
|
+
},
|
|
88679
|
+
style: {
|
|
88680
|
+
height: 96,
|
|
88681
|
+
width: '100%',
|
|
88682
|
+
objectFit: 'cover',
|
|
88683
|
+
background: isDark ? '#111827' : '#f9fafb'
|
|
88684
|
+
}
|
|
88685
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88686
|
+
style: {
|
|
88687
|
+
padding: 10,
|
|
88688
|
+
display: 'flex',
|
|
88689
|
+
flexDirection: 'column',
|
|
88690
|
+
gap: 6,
|
|
88691
|
+
flex: 1
|
|
88692
|
+
},
|
|
88693
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88694
|
+
style: {
|
|
88695
|
+
display: 'flex',
|
|
88696
|
+
justifyContent: 'space-between',
|
|
88697
|
+
gap: 6,
|
|
88698
|
+
alignItems: 'flex-start'
|
|
88699
|
+
},
|
|
88700
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88701
|
+
style: {
|
|
88702
|
+
fontSize: 12,
|
|
88703
|
+
fontWeight: 700,
|
|
88704
|
+
minWidth: 0
|
|
88705
|
+
},
|
|
88706
|
+
children: item.name
|
|
88707
|
+
}), item.price && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88708
|
+
style: {
|
|
88709
|
+
fontSize: 12,
|
|
88710
|
+
fontWeight: 700,
|
|
88711
|
+
color: BRAND_BLUE,
|
|
88712
|
+
flexShrink: 0
|
|
88713
|
+
},
|
|
88714
|
+
children: item.price
|
|
88715
|
+
})]
|
|
88716
|
+
}), item.description && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88717
|
+
style: {
|
|
88718
|
+
fontSize: 11,
|
|
88719
|
+
color: subColor,
|
|
88720
|
+
lineHeight: 1.4
|
|
88721
|
+
},
|
|
88722
|
+
children: item.description
|
|
88723
|
+
}), Array.isArray(item.tags) && item.tags.length > 0 && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88724
|
+
style: {
|
|
88725
|
+
display: 'flex',
|
|
88726
|
+
flexWrap: 'wrap',
|
|
88727
|
+
gap: 4
|
|
88728
|
+
},
|
|
88729
|
+
children: item.tags.map((t, ti) => /*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
88730
|
+
style: tagChipStyle(isDark),
|
|
88731
|
+
children: t
|
|
88732
|
+
}, ti))
|
|
88733
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88734
|
+
style: {
|
|
88735
|
+
flex: 1
|
|
88736
|
+
}
|
|
88737
|
+
}), item.actionLabel && /*#__PURE__*/jsxRuntimeExports.jsx("button", {
|
|
88738
|
+
type: "button",
|
|
88739
|
+
onClick: onButtonClick ? () => {
|
|
88740
|
+
var _item$value;
|
|
88741
|
+
return onButtonClick(String((_item$value = item.value) !== null && _item$value !== void 0 ? _item$value : item.actionLabel), String(item.actionLabel));
|
|
88742
|
+
} : undefined,
|
|
88743
|
+
disabled: !onButtonClick,
|
|
88744
|
+
style: _objectSpread2(_objectSpread2({}, primaryButtonStyle(isDark, !onButtonClick)), {}, {
|
|
88745
|
+
alignSelf: 'flex-start',
|
|
88746
|
+
marginTop: 4
|
|
88747
|
+
}),
|
|
88748
|
+
children: item.actionLabel
|
|
88749
|
+
})]
|
|
88750
|
+
})]
|
|
88751
|
+
}, i))
|
|
88752
|
+
})]
|
|
88753
|
+
});
|
|
88754
|
+
}
|
|
88755
|
+
|
|
88756
|
+
// ── 2. Profile (person card: doctor / agent / seller) ──
|
|
88757
|
+
|
|
88758
|
+
function Profile(_ref21) {
|
|
88759
|
+
let {
|
|
88760
|
+
spec,
|
|
88761
|
+
isDark,
|
|
88762
|
+
onButtonClick
|
|
88763
|
+
} = _ref21;
|
|
88764
|
+
const tags = Array.isArray(spec.tags) ? spec.tags : [];
|
|
88765
|
+
const actions = Array.isArray(spec.actions) ? spec.actions : [];
|
|
88766
|
+
const subColor = isDark ? '#9ca3af' : '#6b7280';
|
|
88767
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88768
|
+
style: card(isDark),
|
|
88769
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88770
|
+
style: {
|
|
88771
|
+
display: 'flex',
|
|
88772
|
+
gap: 10,
|
|
88773
|
+
alignItems: 'flex-start'
|
|
88774
|
+
},
|
|
88775
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88776
|
+
style: {
|
|
88777
|
+
flexShrink: 0,
|
|
88778
|
+
height: 44,
|
|
88779
|
+
width: 44,
|
|
88780
|
+
borderRadius: '50%',
|
|
88781
|
+
overflow: 'hidden',
|
|
88782
|
+
background: isDark ? 'rgba(37,99,235,0.20)' : '#eff6ff',
|
|
88783
|
+
color: isDark ? '#93c5fd' : BRAND_BLUE,
|
|
88784
|
+
display: 'flex',
|
|
88785
|
+
alignItems: 'center',
|
|
88786
|
+
justifyContent: 'center',
|
|
88787
|
+
fontWeight: 700,
|
|
88788
|
+
fontSize: 16
|
|
88789
|
+
},
|
|
88790
|
+
children: spec.avatar ? /*#__PURE__*/jsxRuntimeExports.jsx("img", {
|
|
88791
|
+
src: spec.avatar,
|
|
88792
|
+
alt: spec.name || '',
|
|
88793
|
+
referrerPolicy: "no-referrer",
|
|
88794
|
+
onError: e => {
|
|
88795
|
+
e.currentTarget.style.display = 'none';
|
|
88796
|
+
},
|
|
88797
|
+
style: {
|
|
88798
|
+
height: '100%',
|
|
88799
|
+
width: '100%',
|
|
88800
|
+
objectFit: 'cover'
|
|
88801
|
+
}
|
|
88802
|
+
}) : String(spec.name || '').charAt(0).toUpperCase()
|
|
88803
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88804
|
+
style: {
|
|
88805
|
+
minWidth: 0,
|
|
88806
|
+
flex: 1
|
|
88807
|
+
},
|
|
88808
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88809
|
+
style: {
|
|
88810
|
+
fontSize: 13,
|
|
88811
|
+
fontWeight: 700
|
|
88812
|
+
},
|
|
88813
|
+
children: spec.name
|
|
88814
|
+
}), spec.role && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88815
|
+
style: {
|
|
88816
|
+
fontSize: 11,
|
|
88817
|
+
color: subColor
|
|
88818
|
+
},
|
|
88819
|
+
children: spec.role
|
|
88820
|
+
}), typeof spec.rating === 'number' && /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88821
|
+
style: {
|
|
88822
|
+
marginTop: 4,
|
|
88823
|
+
display: 'flex',
|
|
88824
|
+
alignItems: 'center',
|
|
88825
|
+
gap: 6
|
|
88826
|
+
},
|
|
88827
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx(StarRow, {
|
|
88828
|
+
score: spec.rating,
|
|
88829
|
+
size: 11,
|
|
88830
|
+
isDark: isDark
|
|
88831
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsxs("span", {
|
|
88832
|
+
style: {
|
|
88833
|
+
fontSize: 10,
|
|
88834
|
+
color: subColor
|
|
88835
|
+
},
|
|
88836
|
+
children: [spec.rating.toFixed(1), typeof spec.reviewCount === 'number' ? " (".concat(spec.reviewCount, ")") : '']
|
|
88837
|
+
})]
|
|
88838
|
+
})]
|
|
88839
|
+
})]
|
|
88840
|
+
}), tags.length > 0 && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88841
|
+
style: {
|
|
88842
|
+
display: 'flex',
|
|
88843
|
+
flexWrap: 'wrap',
|
|
88844
|
+
gap: 4,
|
|
88845
|
+
marginTop: 8
|
|
88846
|
+
},
|
|
88847
|
+
children: tags.map((t, i) => /*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
88848
|
+
style: tagChipStyle(isDark),
|
|
88849
|
+
children: t
|
|
88850
|
+
}, i))
|
|
88851
|
+
}), spec.bio && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88852
|
+
style: {
|
|
88853
|
+
marginTop: 8,
|
|
88854
|
+
fontSize: 12,
|
|
88855
|
+
lineHeight: 1.5
|
|
88856
|
+
},
|
|
88857
|
+
children: spec.bio
|
|
88858
|
+
}), actions.length > 0 && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88859
|
+
style: {
|
|
88860
|
+
display: 'flex',
|
|
88861
|
+
flexWrap: 'wrap',
|
|
88862
|
+
gap: 6,
|
|
88863
|
+
marginTop: 10
|
|
88864
|
+
},
|
|
88865
|
+
children: actions.map((a, i) => {
|
|
88866
|
+
const primary = a.variant !== 'secondary';
|
|
88867
|
+
if (a.url) {
|
|
88868
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx("a", {
|
|
88869
|
+
href: a.url,
|
|
88870
|
+
target: "_blank",
|
|
88871
|
+
rel: "noopener noreferrer",
|
|
88872
|
+
style: secondaryButtonStyle(isDark, false),
|
|
88873
|
+
children: a.label
|
|
88874
|
+
}, i);
|
|
88875
|
+
}
|
|
88876
|
+
const value = a.value || a.label;
|
|
88877
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx("button", {
|
|
88878
|
+
type: "button",
|
|
88879
|
+
onClick: onButtonClick ? () => onButtonClick(String(value), String(a.label)) : undefined,
|
|
88880
|
+
disabled: !onButtonClick,
|
|
88881
|
+
style: primary ? primaryButtonStyle(isDark, !onButtonClick) : secondaryButtonStyle(isDark, !onButtonClick),
|
|
88882
|
+
children: a.label
|
|
88883
|
+
}, i);
|
|
88884
|
+
})
|
|
88885
|
+
})]
|
|
88886
|
+
});
|
|
88887
|
+
}
|
|
88888
|
+
|
|
88889
|
+
// ── 3. Timeline (status stepper: order tracking, appointment stages) ──
|
|
88890
|
+
|
|
88891
|
+
function Timeline(_ref22) {
|
|
88892
|
+
let {
|
|
88893
|
+
spec,
|
|
88894
|
+
isDark
|
|
88895
|
+
} = _ref22;
|
|
88896
|
+
const steps = Array.isArray(spec.steps) ? spec.steps : [];
|
|
88897
|
+
if (steps.length === 0) return null;
|
|
88898
|
+
const lineColor = isDark ? '#374151' : '#e5e7eb';
|
|
88899
|
+
const subColor = isDark ? '#6b7280' : '#9ca3af';
|
|
88900
|
+
const dotStyle = status => {
|
|
88901
|
+
if (status === 'done') return {
|
|
88902
|
+
background: '#10b981',
|
|
88903
|
+
border: '2px solid #10b981'
|
|
88904
|
+
};
|
|
88905
|
+
if (status === 'active') return {
|
|
88906
|
+
background: BRAND_BLUE,
|
|
88907
|
+
border: "2px solid ".concat(BRAND_BLUE),
|
|
88908
|
+
boxShadow: isDark ? '0 0 0 4px rgba(37,99,235,0.25)' : '0 0 0 4px #dbeafe'
|
|
88909
|
+
};
|
|
88910
|
+
return {
|
|
88911
|
+
background: isDark ? '#1f2937' : '#ffffff',
|
|
88912
|
+
border: '2px solid ' + (isDark ? '#4b5563' : '#d1d5db')
|
|
88913
|
+
};
|
|
88914
|
+
};
|
|
88915
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88916
|
+
style: card(isDark),
|
|
88917
|
+
children: [spec.title && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88918
|
+
style: {
|
|
88919
|
+
fontWeight: 700,
|
|
88920
|
+
fontSize: 13,
|
|
88921
|
+
marginBottom: 10
|
|
88922
|
+
},
|
|
88923
|
+
children: spec.title
|
|
88924
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88925
|
+
children: steps.map((s, i) => {
|
|
88926
|
+
const status = s.status || (i === 0 ? 'done' : 'pending');
|
|
88927
|
+
const isLast = i === steps.length - 1;
|
|
88928
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88929
|
+
style: {
|
|
88930
|
+
display: 'flex',
|
|
88931
|
+
gap: 10
|
|
88932
|
+
},
|
|
88933
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88934
|
+
style: {
|
|
88935
|
+
display: 'flex',
|
|
88936
|
+
flexDirection: 'column',
|
|
88937
|
+
alignItems: 'center'
|
|
88938
|
+
},
|
|
88939
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88940
|
+
style: _objectSpread2({
|
|
88941
|
+
height: 12,
|
|
88942
|
+
width: 12,
|
|
88943
|
+
borderRadius: '50%',
|
|
88944
|
+
flexShrink: 0
|
|
88945
|
+
}, dotStyle(status))
|
|
88946
|
+
}), !isLast && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88947
|
+
style: {
|
|
88948
|
+
width: 1,
|
|
88949
|
+
flex: 1,
|
|
88950
|
+
background: lineColor,
|
|
88951
|
+
minHeight: 16,
|
|
88952
|
+
margin: '2px 0'
|
|
88953
|
+
}
|
|
88954
|
+
})]
|
|
88955
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88956
|
+
style: {
|
|
88957
|
+
minWidth: 0,
|
|
88958
|
+
flex: 1,
|
|
88959
|
+
paddingBottom: isLast ? 0 : 12
|
|
88960
|
+
},
|
|
88961
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
88962
|
+
style: {
|
|
88963
|
+
display: 'flex',
|
|
88964
|
+
justifyContent: 'space-between',
|
|
88965
|
+
gap: 6
|
|
88966
|
+
},
|
|
88967
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
88968
|
+
style: {
|
|
88969
|
+
fontSize: 12,
|
|
88970
|
+
fontWeight: 600,
|
|
88971
|
+
color: status === 'pending' ? subColor : isDark ? '#f3f4f6' : '#111827'
|
|
88972
|
+
},
|
|
88973
|
+
children: s.label
|
|
88974
|
+
}), s.timestamp && /*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
88975
|
+
style: {
|
|
88976
|
+
fontSize: 10,
|
|
88977
|
+
color: subColor,
|
|
88978
|
+
flexShrink: 0
|
|
88979
|
+
},
|
|
88980
|
+
children: s.timestamp
|
|
88981
|
+
})]
|
|
88982
|
+
}), s.description && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
88983
|
+
style: {
|
|
88984
|
+
fontSize: 11,
|
|
88985
|
+
color: isDark ? '#9ca3af' : '#6b7280',
|
|
88986
|
+
marginTop: 2
|
|
88987
|
+
},
|
|
88988
|
+
children: s.description
|
|
88989
|
+
})]
|
|
88990
|
+
})]
|
|
88991
|
+
}, i);
|
|
88992
|
+
})
|
|
88993
|
+
})]
|
|
88994
|
+
});
|
|
88995
|
+
}
|
|
88996
|
+
|
|
88997
|
+
// ── 4. Rating (score + review) ──
|
|
88998
|
+
|
|
88999
|
+
function Rating(_ref23) {
|
|
89000
|
+
let {
|
|
89001
|
+
spec,
|
|
89002
|
+
isDark
|
|
89003
|
+
} = _ref23;
|
|
89004
|
+
const maxScore = spec.maxScore || 5;
|
|
89005
|
+
const subColor = isDark ? '#9ca3af' : '#6b7280';
|
|
89006
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
89007
|
+
style: card(isDark),
|
|
89008
|
+
children: [spec.title && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
89009
|
+
style: {
|
|
89010
|
+
fontSize: 11,
|
|
89011
|
+
textTransform: 'uppercase',
|
|
89012
|
+
letterSpacing: '0.05em',
|
|
89013
|
+
color: subColor,
|
|
89014
|
+
marginBottom: 4
|
|
89015
|
+
},
|
|
89016
|
+
children: spec.title
|
|
89017
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
89018
|
+
style: {
|
|
89019
|
+
display: 'flex',
|
|
89020
|
+
alignItems: 'center',
|
|
89021
|
+
gap: 8
|
|
89022
|
+
},
|
|
89023
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
89024
|
+
style: {
|
|
89025
|
+
fontSize: 22,
|
|
89026
|
+
fontWeight: 700
|
|
89027
|
+
},
|
|
89028
|
+
children: Number(spec.score).toFixed(1)
|
|
89029
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx(StarRow, {
|
|
89030
|
+
score: spec.score,
|
|
89031
|
+
maxScore: maxScore,
|
|
89032
|
+
size: 15,
|
|
89033
|
+
isDark: isDark
|
|
89034
|
+
}), typeof spec.reviewCount === 'number' && /*#__PURE__*/jsxRuntimeExports.jsxs("span", {
|
|
89035
|
+
style: {
|
|
89036
|
+
fontSize: 11,
|
|
89037
|
+
color: subColor
|
|
89038
|
+
},
|
|
89039
|
+
children: ["(", spec.reviewCount, " review", spec.reviewCount === 1 ? '' : 's', ")"]
|
|
89040
|
+
})]
|
|
89041
|
+
}), spec.review && /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
89042
|
+
style: {
|
|
89043
|
+
marginTop: 8,
|
|
89044
|
+
borderLeft: '2px solid ' + (isDark ? '#1e40af' : '#bfdbfe'),
|
|
89045
|
+
paddingLeft: 10,
|
|
89046
|
+
fontSize: 12,
|
|
89047
|
+
fontStyle: 'italic',
|
|
89048
|
+
color: isDark ? '#d1d5db' : '#374151',
|
|
89049
|
+
lineHeight: 1.5
|
|
89050
|
+
},
|
|
89051
|
+
children: ["\"", spec.review, "\"", spec.author && /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
89052
|
+
style: {
|
|
89053
|
+
marginTop: 4,
|
|
89054
|
+
fontStyle: 'normal',
|
|
89055
|
+
fontSize: 10,
|
|
89056
|
+
color: subColor
|
|
89057
|
+
},
|
|
89058
|
+
children: ["- ", spec.author]
|
|
89059
|
+
})]
|
|
89060
|
+
})]
|
|
89061
|
+
});
|
|
89062
|
+
}
|
|
89063
|
+
|
|
89064
|
+
// ── 5. Comparison (pricing tiers / plan comparison) ──
|
|
89065
|
+
|
|
89066
|
+
function Comparison(_ref24) {
|
|
89067
|
+
let {
|
|
89068
|
+
spec,
|
|
89069
|
+
isDark,
|
|
89070
|
+
onButtonClick
|
|
89071
|
+
} = _ref24;
|
|
89072
|
+
const plans = Array.isArray(spec.plans) ? spec.plans : [];
|
|
89073
|
+
if (plans.length === 0) return null;
|
|
89074
|
+
const subColor = isDark ? '#9ca3af' : '#6b7280';
|
|
89075
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
89076
|
+
style: {
|
|
89077
|
+
margin: '8px 0'
|
|
89078
|
+
},
|
|
89079
|
+
children: [spec.title && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
89080
|
+
style: {
|
|
89081
|
+
fontWeight: 700,
|
|
89082
|
+
fontSize: 13,
|
|
89083
|
+
marginBottom: 8
|
|
89084
|
+
},
|
|
89085
|
+
children: spec.title
|
|
89086
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
89087
|
+
style: {
|
|
89088
|
+
display: 'grid',
|
|
89089
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(150px, 1fr))',
|
|
89090
|
+
gap: 10
|
|
89091
|
+
},
|
|
89092
|
+
children: plans.map((p, i) => /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
89093
|
+
style: {
|
|
89094
|
+
border: p.highlight ? "1px solid ".concat(BRAND_BLUE) : '1px solid ' + (isDark ? '#374151' : '#e5e7eb'),
|
|
89095
|
+
background: p.highlight ? isDark ? 'rgba(37,99,235,0.10)' : '#eff6ff' : isDark ? '#1f2937' : '#ffffff',
|
|
89096
|
+
borderRadius: 10,
|
|
89097
|
+
padding: 12,
|
|
89098
|
+
display: 'flex',
|
|
89099
|
+
flexDirection: 'column'
|
|
89100
|
+
},
|
|
89101
|
+
children: [p.highlight && /*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
89102
|
+
style: {
|
|
89103
|
+
alignSelf: 'flex-start',
|
|
89104
|
+
marginBottom: 6,
|
|
89105
|
+
background: BRAND_BLUE,
|
|
89106
|
+
color: '#ffffff',
|
|
89107
|
+
fontSize: 9,
|
|
89108
|
+
fontWeight: 700,
|
|
89109
|
+
padding: '2px 7px',
|
|
89110
|
+
borderRadius: 999
|
|
89111
|
+
},
|
|
89112
|
+
children: "Recommended"
|
|
89113
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
89114
|
+
style: {
|
|
89115
|
+
fontSize: 13,
|
|
89116
|
+
fontWeight: 700
|
|
89117
|
+
},
|
|
89118
|
+
children: p.name
|
|
89119
|
+
}), p.price && /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
89120
|
+
style: {
|
|
89121
|
+
marginTop: 2,
|
|
89122
|
+
display: 'flex',
|
|
89123
|
+
alignItems: 'baseline',
|
|
89124
|
+
gap: 3
|
|
89125
|
+
},
|
|
89126
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
89127
|
+
style: {
|
|
89128
|
+
fontSize: 18,
|
|
89129
|
+
fontWeight: 700
|
|
89130
|
+
},
|
|
89131
|
+
children: p.price
|
|
89132
|
+
}), p.period && /*#__PURE__*/jsxRuntimeExports.jsxs("span", {
|
|
89133
|
+
style: {
|
|
89134
|
+
fontSize: 11,
|
|
89135
|
+
color: subColor
|
|
89136
|
+
},
|
|
89137
|
+
children: ["/", p.period]
|
|
89138
|
+
})]
|
|
89139
|
+
}), Array.isArray(p.features) && p.features.length > 0 && /*#__PURE__*/jsxRuntimeExports.jsx("ul", {
|
|
89140
|
+
style: {
|
|
89141
|
+
listStyle: 'none',
|
|
89142
|
+
padding: 0,
|
|
89143
|
+
margin: '8px 0 0',
|
|
89144
|
+
display: 'flex',
|
|
89145
|
+
flexDirection: 'column',
|
|
89146
|
+
gap: 6,
|
|
89147
|
+
flex: 1
|
|
89148
|
+
},
|
|
89149
|
+
children: p.features.map((f, fi) => /*#__PURE__*/jsxRuntimeExports.jsxs("li", {
|
|
89150
|
+
style: {
|
|
89151
|
+
display: 'flex',
|
|
89152
|
+
gap: 6,
|
|
89153
|
+
alignItems: 'flex-start',
|
|
89154
|
+
fontSize: 11,
|
|
89155
|
+
color: isDark ? '#d1d5db' : '#374151'
|
|
89156
|
+
},
|
|
89157
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx("svg", {
|
|
89158
|
+
width: "12",
|
|
89159
|
+
height: "12",
|
|
89160
|
+
viewBox: "0 0 24 24",
|
|
89161
|
+
fill: "none",
|
|
89162
|
+
stroke: "#10b981",
|
|
89163
|
+
strokeWidth: "3",
|
|
89164
|
+
strokeLinecap: "round",
|
|
89165
|
+
strokeLinejoin: "round",
|
|
89166
|
+
style: {
|
|
89167
|
+
marginTop: 2,
|
|
89168
|
+
flexShrink: 0
|
|
89169
|
+
},
|
|
89170
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx("polyline", {
|
|
89171
|
+
points: "20 6 9 17 4 12"
|
|
89172
|
+
})
|
|
89173
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
89174
|
+
children: f
|
|
89175
|
+
})]
|
|
89176
|
+
}, fi))
|
|
89177
|
+
}), p.actionLabel && /*#__PURE__*/jsxRuntimeExports.jsx("button", {
|
|
89178
|
+
type: "button",
|
|
89179
|
+
onClick: onButtonClick ? () => {
|
|
89180
|
+
var _p$value;
|
|
89181
|
+
return onButtonClick(String((_p$value = p.value) !== null && _p$value !== void 0 ? _p$value : p.actionLabel), String(p.actionLabel));
|
|
89182
|
+
} : undefined,
|
|
89183
|
+
disabled: !onButtonClick,
|
|
89184
|
+
style: _objectSpread2(_objectSpread2({}, p.highlight ? primaryButtonStyle(isDark, !onButtonClick) : secondaryButtonStyle(isDark, !onButtonClick)), {}, {
|
|
89185
|
+
marginTop: 10
|
|
89186
|
+
}),
|
|
89187
|
+
children: p.actionLabel
|
|
89188
|
+
})]
|
|
89189
|
+
}, i))
|
|
89190
|
+
})]
|
|
89191
|
+
});
|
|
89192
|
+
}
|
|
89193
|
+
|
|
89194
|
+
// ── 6. Gallery (horizontal image strip) ──
|
|
89195
|
+
|
|
89196
|
+
function Gallery(_ref25) {
|
|
89197
|
+
let {
|
|
89198
|
+
spec,
|
|
89199
|
+
isDark
|
|
89200
|
+
} = _ref25;
|
|
89201
|
+
const images = Array.isArray(spec.images) ? spec.images : [];
|
|
89202
|
+
if (images.length === 0) return null;
|
|
89203
|
+
const subColor = isDark ? '#9ca3af' : '#6b7280';
|
|
89204
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
89205
|
+
style: {
|
|
89206
|
+
margin: '8px 0'
|
|
89207
|
+
},
|
|
89208
|
+
children: [spec.title && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
89209
|
+
style: {
|
|
89210
|
+
fontWeight: 700,
|
|
89211
|
+
fontSize: 13,
|
|
89212
|
+
marginBottom: 8
|
|
89213
|
+
},
|
|
89214
|
+
children: spec.title
|
|
89215
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
89216
|
+
className: "slim-scrollbar-x",
|
|
89217
|
+
style: {
|
|
89218
|
+
display: 'flex',
|
|
89219
|
+
gap: 8,
|
|
89220
|
+
overflowX: 'auto',
|
|
89221
|
+
paddingBottom: 4
|
|
89222
|
+
},
|
|
89223
|
+
children: images.map((img, i) => /*#__PURE__*/jsxRuntimeExports.jsxs("figure", {
|
|
89224
|
+
style: {
|
|
89225
|
+
flexShrink: 0,
|
|
89226
|
+
width: 140,
|
|
89227
|
+
margin: 0,
|
|
89228
|
+
borderRadius: 8,
|
|
89229
|
+
overflow: 'hidden',
|
|
89230
|
+
border: '1px solid ' + (isDark ? '#374151' : '#e5e7eb'),
|
|
89231
|
+
background: isDark ? '#111827' : '#f9fafb'
|
|
89232
|
+
},
|
|
89233
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx("img", {
|
|
89234
|
+
src: img.url,
|
|
89235
|
+
alt: img.caption || "Image ".concat(i + 1),
|
|
89236
|
+
referrerPolicy: "no-referrer",
|
|
89237
|
+
onError: e => {
|
|
89238
|
+
e.currentTarget.style.display = 'none';
|
|
89239
|
+
},
|
|
89240
|
+
style: {
|
|
89241
|
+
height: 96,
|
|
89242
|
+
width: '100%',
|
|
89243
|
+
objectFit: 'cover'
|
|
89244
|
+
}
|
|
89245
|
+
}), img.caption && /*#__PURE__*/jsxRuntimeExports.jsx("figcaption", {
|
|
89246
|
+
style: {
|
|
89247
|
+
padding: '5px 8px',
|
|
89248
|
+
fontSize: 10,
|
|
89249
|
+
color: subColor,
|
|
89250
|
+
whiteSpace: 'nowrap',
|
|
89251
|
+
overflow: 'hidden',
|
|
89252
|
+
textOverflow: 'ellipsis'
|
|
89253
|
+
},
|
|
89254
|
+
children: img.caption
|
|
89255
|
+
})]
|
|
89256
|
+
}, i))
|
|
89257
|
+
})]
|
|
89258
|
+
});
|
|
89259
|
+
}
|
|
89260
|
+
|
|
88442
89261
|
// ── Bug 1 + Bug 3 helpers (2026-06-16) ───────────────────────────────────
|
|
88443
89262
|
// PORTED from packages/frontend/src/components/charts/eshal-chart/
|
|
88444
89263
|
// chartShared.tsx. Duplicated rather than shared because the widget is
|
|
@@ -88560,10 +89379,10 @@
|
|
|
88560
89379
|
|
|
88561
89380
|
// ── Lucide-style SVG icons (sharp, monoline, inherit color via currentColor)
|
|
88562
89381
|
|
|
88563
|
-
function IconTrendingUp(
|
|
89382
|
+
function IconTrendingUp(_ref26) {
|
|
88564
89383
|
let {
|
|
88565
89384
|
size = 14
|
|
88566
|
-
} =
|
|
89385
|
+
} = _ref26;
|
|
88567
89386
|
return /*#__PURE__*/jsxRuntimeExports.jsxs("svg", {
|
|
88568
89387
|
width: size,
|
|
88569
89388
|
height: size,
|
|
@@ -88581,10 +89400,10 @@
|
|
|
88581
89400
|
})]
|
|
88582
89401
|
});
|
|
88583
89402
|
}
|
|
88584
|
-
function IconScale(
|
|
89403
|
+
function IconScale(_ref27) {
|
|
88585
89404
|
let {
|
|
88586
89405
|
size = 14
|
|
88587
|
-
} =
|
|
89406
|
+
} = _ref27;
|
|
88588
89407
|
return /*#__PURE__*/jsxRuntimeExports.jsxs("svg", {
|
|
88589
89408
|
width: size,
|
|
88590
89409
|
height: size,
|
|
@@ -88610,10 +89429,10 @@
|
|
|
88610
89429
|
})]
|
|
88611
89430
|
});
|
|
88612
89431
|
}
|
|
88613
|
-
function IconGitCompare(
|
|
89432
|
+
function IconGitCompare(_ref28) {
|
|
88614
89433
|
let {
|
|
88615
89434
|
size = 14
|
|
88616
|
-
} =
|
|
89435
|
+
} = _ref28;
|
|
88617
89436
|
return /*#__PURE__*/jsxRuntimeExports.jsxs("svg", {
|
|
88618
89437
|
width: size,
|
|
88619
89438
|
height: size,
|
|
@@ -88639,10 +89458,10 @@
|
|
|
88639
89458
|
})]
|
|
88640
89459
|
});
|
|
88641
89460
|
}
|
|
88642
|
-
function IconZap(
|
|
89461
|
+
function IconZap(_ref29) {
|
|
88643
89462
|
let {
|
|
88644
89463
|
size = 14
|
|
88645
|
-
} =
|
|
89464
|
+
} = _ref29;
|
|
88646
89465
|
return /*#__PURE__*/jsxRuntimeExports.jsx("svg", {
|
|
88647
89466
|
width: size,
|
|
88648
89467
|
height: size,
|
|
@@ -88658,10 +89477,10 @@
|
|
|
88658
89477
|
})
|
|
88659
89478
|
});
|
|
88660
89479
|
}
|
|
88661
|
-
function IconLightbulb(
|
|
89480
|
+
function IconLightbulb(_ref30) {
|
|
88662
89481
|
let {
|
|
88663
89482
|
size = 14
|
|
88664
|
-
} =
|
|
89483
|
+
} = _ref30;
|
|
88665
89484
|
return /*#__PURE__*/jsxRuntimeExports.jsxs("svg", {
|
|
88666
89485
|
width: size,
|
|
88667
89486
|
height: size,
|
|
@@ -88681,10 +89500,10 @@
|
|
|
88681
89500
|
})]
|
|
88682
89501
|
});
|
|
88683
89502
|
}
|
|
88684
|
-
function IconTarget(
|
|
89503
|
+
function IconTarget(_ref31) {
|
|
88685
89504
|
let {
|
|
88686
89505
|
size = 14
|
|
88687
|
-
} =
|
|
89506
|
+
} = _ref31;
|
|
88688
89507
|
return /*#__PURE__*/jsxRuntimeExports.jsxs("svg", {
|
|
88689
89508
|
width: size,
|
|
88690
89509
|
height: size,
|
|
@@ -88733,7 +89552,7 @@
|
|
|
88733
89552
|
|
|
88734
89553
|
// ── Shared shell for all six insight cards ──
|
|
88735
89554
|
|
|
88736
|
-
function InsightShell(
|
|
89555
|
+
function InsightShell(_ref32) {
|
|
88737
89556
|
let {
|
|
88738
89557
|
type,
|
|
88739
89558
|
icon,
|
|
@@ -88741,7 +89560,7 @@
|
|
|
88741
89560
|
count,
|
|
88742
89561
|
isDark,
|
|
88743
89562
|
children
|
|
88744
|
-
} =
|
|
89563
|
+
} = _ref32;
|
|
88745
89564
|
const {
|
|
88746
89565
|
accent,
|
|
88747
89566
|
iconBg,
|
|
@@ -88820,11 +89639,11 @@
|
|
|
88820
89639
|
if (s.startsWith('-') || s.startsWith('−')) return 'dn';
|
|
88821
89640
|
return 'flat';
|
|
88822
89641
|
}
|
|
88823
|
-
function DeltaTag(
|
|
89642
|
+
function DeltaTag(_ref33) {
|
|
88824
89643
|
let {
|
|
88825
89644
|
delta,
|
|
88826
89645
|
isDark
|
|
88827
|
-
} =
|
|
89646
|
+
} = _ref33;
|
|
88828
89647
|
if (!delta) return null;
|
|
88829
89648
|
const tone = deltaToneInsights(delta);
|
|
88830
89649
|
const map = isDark ? {
|
|
@@ -88868,11 +89687,11 @@
|
|
|
88868
89687
|
children: delta
|
|
88869
89688
|
});
|
|
88870
89689
|
}
|
|
88871
|
-
function MetricChipsInsights(
|
|
89690
|
+
function MetricChipsInsights(_ref34) {
|
|
88872
89691
|
let {
|
|
88873
89692
|
items,
|
|
88874
89693
|
isDark
|
|
88875
|
-
} =
|
|
89694
|
+
} = _ref34;
|
|
88876
89695
|
if (!items || !items.length) return null;
|
|
88877
89696
|
const border = isDark ? '1px solid #374151' : '1px solid #e5e7eb';
|
|
88878
89697
|
const labelCol = isDark ? '#9ca3af' : '#64748b';
|
|
@@ -88919,11 +89738,11 @@
|
|
|
88919
89738
|
|
|
88920
89739
|
// ── 1. Revenue Insights ──
|
|
88921
89740
|
|
|
88922
|
-
function RevenueInsightsCard(
|
|
89741
|
+
function RevenueInsightsCard(_ref35) {
|
|
88923
89742
|
let {
|
|
88924
89743
|
spec,
|
|
88925
89744
|
isDark
|
|
88926
|
-
} =
|
|
89745
|
+
} = _ref35;
|
|
88927
89746
|
const totals = Array.isArray(spec.totals) ? spec.totals : [];
|
|
88928
89747
|
const narrCol = isDark ? '#9ca3af' : '#64748b';
|
|
88929
89748
|
return /*#__PURE__*/jsxRuntimeExports.jsxs(InsightShell, {
|
|
@@ -88983,12 +89802,12 @@
|
|
|
88983
89802
|
|
|
88984
89803
|
// ── 2. Impact Analysis ──
|
|
88985
89804
|
|
|
88986
|
-
function ImpactGroupBlock(
|
|
89805
|
+
function ImpactGroupBlock(_ref36) {
|
|
88987
89806
|
let {
|
|
88988
89807
|
items,
|
|
88989
89808
|
sentiment,
|
|
88990
89809
|
isDark
|
|
88991
|
-
} =
|
|
89810
|
+
} = _ref36;
|
|
88992
89811
|
if (!items || items.length === 0) return null;
|
|
88993
89812
|
const label = sentiment === 'positive' ? 'Positive impact' : sentiment === 'negative' ? 'Negative impact' : 'Neutral';
|
|
88994
89813
|
const subColor = isDark ? '#9ca3af' : '#64748b';
|
|
@@ -89054,11 +89873,11 @@
|
|
|
89054
89873
|
}, i))]
|
|
89055
89874
|
});
|
|
89056
89875
|
}
|
|
89057
|
-
function ImpactAnalysisCard(
|
|
89876
|
+
function ImpactAnalysisCard(_ref37) {
|
|
89058
89877
|
let {
|
|
89059
89878
|
spec,
|
|
89060
89879
|
isDark
|
|
89061
|
-
} =
|
|
89880
|
+
} = _ref37;
|
|
89062
89881
|
return /*#__PURE__*/jsxRuntimeExports.jsxs(InsightShell, {
|
|
89063
89882
|
type: "impact-analysis",
|
|
89064
89883
|
icon: /*#__PURE__*/jsxRuntimeExports.jsx(IconScale, {}),
|
|
@@ -89083,11 +89902,11 @@
|
|
|
89083
89902
|
|
|
89084
89903
|
// ── 3. Deviation Analysis ──
|
|
89085
89904
|
|
|
89086
|
-
function DeviationAnalysisCard(
|
|
89905
|
+
function DeviationAnalysisCard(_ref38) {
|
|
89087
89906
|
let {
|
|
89088
89907
|
spec,
|
|
89089
89908
|
isDark
|
|
89090
|
-
} =
|
|
89909
|
+
} = _ref38;
|
|
89091
89910
|
const rows = Array.isArray(spec.deviations) ? spec.deviations : [];
|
|
89092
89911
|
const border = isDark ? '1px solid #374151' : '1px solid #e5e7eb';
|
|
89093
89912
|
const headColor = isDark ? '#9ca3af' : '#64748b';
|
|
@@ -89199,11 +90018,11 @@
|
|
|
89199
90018
|
|
|
89200
90019
|
// ── 4. Main Drivers ──
|
|
89201
90020
|
|
|
89202
|
-
function MainDriversCard(
|
|
90021
|
+
function MainDriversCard(_ref39) {
|
|
89203
90022
|
let {
|
|
89204
90023
|
spec,
|
|
89205
90024
|
isDark
|
|
89206
|
-
} =
|
|
90025
|
+
} = _ref39;
|
|
89207
90026
|
const sec = Array.isArray(spec.secondary) ? spec.secondary : [];
|
|
89208
90027
|
const evidenceColor = isDark ? '#9ca3af' : '#64748b';
|
|
89209
90028
|
const subColor = isDark ? '#9ca3af' : '#64748b';
|
|
@@ -89298,7 +90117,7 @@
|
|
|
89298
90117
|
|
|
89299
90118
|
// ── Shared item-row for Observations & Recommendations ──
|
|
89300
90119
|
|
|
89301
|
-
function InsightItem(
|
|
90120
|
+
function InsightItem(_ref40) {
|
|
89302
90121
|
let {
|
|
89303
90122
|
rankBgFg,
|
|
89304
90123
|
rank,
|
|
@@ -89308,7 +90127,7 @@
|
|
|
89308
90127
|
metrics,
|
|
89309
90128
|
impactPill,
|
|
89310
90129
|
isDark
|
|
89311
|
-
} =
|
|
90130
|
+
} = _ref40;
|
|
89312
90131
|
const narrCol = isDark ? '#9ca3af' : '#64748b';
|
|
89313
90132
|
const dashedBorder = isDark ? '1px dashed #374151' : '1px dashed #e5e7eb';
|
|
89314
90133
|
return /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
@@ -89365,11 +90184,11 @@
|
|
|
89365
90184
|
|
|
89366
90185
|
// ── 5. Key Observations ──
|
|
89367
90186
|
|
|
89368
|
-
function KeyObservationsCard(
|
|
90187
|
+
function KeyObservationsCard(_ref41) {
|
|
89369
90188
|
let {
|
|
89370
90189
|
spec,
|
|
89371
90190
|
isDark
|
|
89372
|
-
} =
|
|
90191
|
+
} = _ref41;
|
|
89373
90192
|
const items = Array.isArray(spec.items) ? [...spec.items].sort((a, b) => (a.rank || 0) - (b.rank || 0)) : [];
|
|
89374
90193
|
const rankBgFg = isDark ? {
|
|
89375
90194
|
bg: '#064e3b',
|
|
@@ -89425,11 +90244,11 @@
|
|
|
89425
90244
|
|
|
89426
90245
|
// ── 6. Recommendations ──
|
|
89427
90246
|
|
|
89428
|
-
function RecommendationsCard(
|
|
90247
|
+
function RecommendationsCard(_ref42) {
|
|
89429
90248
|
let {
|
|
89430
90249
|
spec,
|
|
89431
90250
|
isDark
|
|
89432
|
-
} =
|
|
90251
|
+
} = _ref42;
|
|
89433
90252
|
const items = Array.isArray(spec.items) ? [...spec.items].sort((a, b) => (a.rank || 0) - (b.rank || 0)) : [];
|
|
89434
90253
|
const rankBgFg = isDark ? {
|
|
89435
90254
|
bg: '#312e81',
|
|
@@ -90417,8 +91236,12 @@
|
|
|
90417
91236
|
provideCitations = true
|
|
90418
91237
|
} = _ref;
|
|
90419
91238
|
return /*#__PURE__*/jsxRuntimeExports.jsx(Markdown, {
|
|
90420
|
-
className: "max-w-none [&>*:last-child]:!mb-0 [&>*:first-child]:!mt-0"
|
|
90421
|
-
|
|
91239
|
+
className: "max-w-none [&>*:last-child]:!mb-0 [&>*:first-child]:!mt-0"
|
|
91240
|
+
// remarkBreaks turns single `\n` line breaks into <br> instead of a
|
|
91241
|
+
// markdown soft break (rendered as a space) - keeps agent-authored
|
|
91242
|
+
// field-per-line summaries readable (EV-2699).
|
|
91243
|
+
,
|
|
91244
|
+
remarkPlugins: [remarkGfm, remarkBreaks]
|
|
90422
91245
|
// Skip the rehypeCitations plugin when the org opted out -
|
|
90423
91246
|
// markers then render as plain text so nothing squeaks
|
|
90424
91247
|
// through as a placeholder pill.
|