@getmicdrop/venue-calendar 4.3.52 → 4.3.53
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/{ArrowLeftIcon-BVz8rVy-.js → ArrowLeftIcon-BLnCtSTd.js} +1 -1
- package/dist/{Badge-n7TfNjln.js → Badge-LGtxYPTv.js} +9 -8
- package/dist/{BlockPlaceholder-BMor_G7G.js → BlockPlaceholder-BhPJo2P8.js} +2 -2
- package/dist/Button-D8b2gDS8.js +177 -0
- package/dist/{Button-klwKgfhG.js → Button-DZ_ZJIeL.js} +66 -119
- package/dist/{Calendar-c-VQOPhK.js → Calendar-D1d210pe.js} +292 -338
- package/dist/{CalendarFoundryView-Bq547Oiz.js → CalendarFoundryView-CEEJ8nkK.js} +6528 -7811
- package/dist/{CalendarIcon-B1zQMDYt.js → CalendarIcon-CLbs06CG.js} +1 -1
- package/dist/CartView-BN-EnU8O.js +2293 -0
- package/dist/ChartBlock-CQuNi0uN.js +1190 -0
- package/dist/Checkout-BLfHdJ4t.js +1832 -0
- package/dist/{Checkout-pjUaSvU6.js → Checkout-dBGyhMQD.js} +66 -65
- package/dist/{CheckoutTimer-DjYTRwVK.js → CheckoutTimer-DnHjYAv-.js} +5 -4
- package/dist/{ChevronDownIcon-8-uVEhg0.js → ChevronDownIcon-BIGPSika.js} +1 -1
- package/dist/{ClockIcon-CubuxycE.js → ClockIcon-D5mFK2c-.js} +1 -1
- package/dist/{CloseIcon-pz6eBxlB.js → CloseIcon-Bf4yqVV0.js} +1 -1
- package/dist/{CollectionView-CWwhiJHK.js → CollectionView-H_aMs6Zm.js} +12 -11
- package/dist/{CropImage-BFtvLjTE.js → CropImage-BFJ61OWR.js} +52 -51
- package/dist/EmptyState-Dak003WV.js +53 -0
- package/dist/{Event-Cj5-V360.js → Event-BYW026V7.js} +317 -313
- package/dist/{EventPage-Gh0QX1Wk.js → EventPage-DqTynzsn.js} +173 -171
- package/dist/Grid-kuP6V0GW.js +89 -0
- package/dist/{Heading-D6bWtGZA.js → Heading-BFFV1cuP.js} +4 -3
- package/dist/{Input-B0S168FA.js → Input-BlLlXJhw.js} +57 -57
- package/dist/{MailIcon-B4iLV34K.js → MailIcon-BO5Ou19Y.js} +1 -1
- package/dist/{Modal-DZ8fudB4.js → Modal-JNeuI7zx.js} +2 -2
- package/dist/{ModalFooter-T1gpnywp.js → ModalFooter-CZYeaLby.js} +66 -65
- package/dist/{ModalHeader-DkKpWKcG.js → ModalHeader-BNxKfIP7.js} +2 -2
- package/dist/{PasswordInput-Dd_mQxbp.js → PasswordInput-DaJbFgg5.js} +2 -2
- package/dist/{RecommendationsRail-D7NWOEEf.js → RecommendationsRail-DBadchEC.js} +17 -15
- package/dist/{ScarcityBadge--Rh62z2D.js → ScarcityBadge-Bi5eRig2.js} +4 -4
- package/dist/{SeriesPage-Dx0PFJkE.js → SeriesPage-DnArOhpy.js} +4 -4
- package/dist/{Spinner-D8dOJe6O.js → Spinner-UI821bAt.js} +2 -2
- package/dist/{Success-Fj5TXPWu.js → Success-BKfN0O0W.js} +43 -42
- package/dist/{TagIcon-DVXKjStU.js → TagIcon-BWLYSGkG.js} +1 -1
- package/dist/{Textarea-D24kYZAW.js → Textarea-CdxxGwCO.js} +6 -6
- package/dist/{ViewTicketsEmbed-DByaBHeq.js → ViewTicketsEmbed-saRT7Ac-.js} +47 -46
- package/dist/{WarningCircleIcon-CbNmDN5r.js → WarningCircleIcon-CyE_Th8p.js} +1 -1
- package/dist/{WarningTriIcon-CZPGuEl3.js → WarningTriIcon-D1jwyRhA.js} +1 -1
- package/dist/action-test-id-DYsZDRVM.js +145 -0
- package/dist/api/gift-cards.d.ts +11 -2
- package/dist/{api-Cbbszsig.js → api-CAGahqGT.js} +21 -20
- package/dist/{copyToClipboard-DfqOeS1-.js → copyToClipboard-NTWYm45i.js} +1 -1
- package/dist/{createErrorGate.svelte-Ct8gFqvn.js → createErrorGate.svelte-B1UBm7Je.js} +1 -1
- package/dist/{de-DdgY9gjK.js → de-Cx6vl1bo.js} +1 -1
- package/dist/{defaultLabels-C7rJdC-m.js → defaultLabels-CAOGfi3n.js} +431 -605
- package/dist/{defaults-DBpwynsR.js → defaults-CPjpHdep.js} +2 -2
- package/dist/{event-B4F3zifd.js → event-BoPSP9Wq.js} +1 -1
- package/dist/{event-transform-rUtOP2f0.js → event-transform-tDqIHrb0.js} +5 -4
- package/dist/{eventStatusStream-CeFdF0pM.js → eventStatusStream-Cw6cAXYK.js} +2 -2
- package/dist/{href-C_CnchY7.js → href-DUImPiNg.js} +3 -3
- package/dist/{i18n-CEpacwpz.js → i18n-DvVKV8xP.js} +55 -54
- package/dist/i18n-urZE8FDd.js +28 -0
- package/dist/{id-DLwaroVD.js → id-KAEn4B4Q.js} +1 -1
- package/dist/{imageOptimizer-Cf0BbZJ7.js → imageOptimizer-Bz54wwZL.js} +40 -39
- package/dist/{it-CB7RtPbU.js → it-CQcRIzL4.js} +1 -1
- package/dist/{it-BzBtirlA.js → it-DmnGZl3R.js} +2 -2
- package/dist/{ja-Bg0GgXOg.js → ja-BrzmyaoG.js} +1 -1
- package/dist/keyboard-WUqlYI2l.js +55 -0
- package/dist/{ko-CTS9jPS0.js → ko-DY6ctJAC.js} +1 -1
- package/dist/locales/4.3.53/flow/it.js +1 -0
- package/dist/locales/4.3.53/main/de.js +1 -0
- package/dist/locales/4.3.53/main/id.js +1 -0
- package/dist/locales/4.3.53/main/it.js +1 -0
- package/dist/locales/{4.3.52 → 4.3.53}/main/ja.js +1 -1
- package/dist/locales/4.3.53/main/ko.js +1 -0
- package/dist/locales/4.3.53/main/pt-br.js +1 -0
- package/dist/locales/4.3.53/main/zh.js +1 -0
- package/dist/{order-totals-c3zn-HDr.js → order-totals-2arQgl1W.js} +4 -4
- package/dist/{orders-DZbxfNI9.js → orders-DKH_Ff_F.js} +22 -21
- package/dist/{pixels-CoXwcqE_.js → pixels-CoTj8WW9.js} +3 -3
- package/dist/{promo-X_5x9P0A.js → promo-77n6yQJ5.js} +3 -3
- package/dist/{pt-br-QgRkwqJk.js → pt-br-COrMoRiG.js} +1 -1
- package/dist/{scarcity-Do5MrSwn.js → scarcity-CSQqP7r6.js} +105 -104
- package/dist/seo/HostSeoController.d.ts +92 -1
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.mjs +39 -6
- package/dist/seo/types.d.ts +13 -0
- package/dist/{serverTotals-6RxxdfwU.js → serverTotals-CygpqxZO.js} +8 -8
- package/dist/{showcase-state-options-nn-CiCd1.js → showcase-state-options-BSIYaeAC.js} +1 -1
- package/dist/{to-event-card-props-DwRTJ3x9.js → to-event-card-props-CcTZVm_k.js} +101 -186
- package/dist/{utils--rXGNV9Z.js → utils-CPYwV5uR.js} +3 -3
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +1211 -1160
- package/dist/venue-calendar.iife.js +37 -74
- package/dist/venue-calendar.umd.js +51 -51
- package/dist/{zh-CWmj934h.js → zh-Mf1aD1Qu.js} +1 -1
- package/package.json +220 -220
- package/dist/CartView-hWsZGkVQ.js +0 -2292
- package/dist/Checkout-BwxyqHY_.js +0 -1831
- package/dist/i18n-iYGbHTiH.js +0 -28
- package/dist/locales/4.3.52/flow/it.js +0 -1
- package/dist/locales/4.3.52/main/de.js +0 -1
- package/dist/locales/4.3.52/main/id.js +0 -1
- package/dist/locales/4.3.52/main/it.js +0 -1
- package/dist/locales/4.3.52/main/ko.js +0 -1
- package/dist/locales/4.3.52/main/pt-br.js +0 -1
- package/dist/locales/4.3.52/main/zh.js +0 -1
- /package/dist/locales/{4.3.52 → 4.3.53}/flow/de.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/flow/es.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/flow/id.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/flow/zh.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/main/es.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/main/fr.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/main/nl.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/main/pl.js +0 -0
- /package/dist/locales/{4.3.52 → 4.3.53}/main/tr.js +0 -0
|
@@ -0,0 +1,1190 @@
|
|
|
1
|
+
import { t as e } from "./Button-D8b2gDS8.js";
|
|
2
|
+
import { a as t, c as n, d as r, f as i, g as a, h as o, l as s, s as c, u as l, v as u } from "./action-test-id-DYsZDRVM.js";
|
|
3
|
+
import { t as d } from "./Grid-kuP6V0GW.js";
|
|
4
|
+
import { t as f } from "./EmptyState-Dak003WV.js";
|
|
5
|
+
import "svelte/internal/disclose-version";
|
|
6
|
+
import * as p from "svelte/internal/client";
|
|
7
|
+
//#region node_modules/@getmicdrop/svelte-components/dist/foundry/blocks/ChartBlock.svelte
|
|
8
|
+
var m = (e, t = p.noop) => {
|
|
9
|
+
var n = je();
|
|
10
|
+
p.each(n, 21, t, p.index, (e, t) => {
|
|
11
|
+
var n = _(), r = p.child(n), i = p.sibling(r, 2), a = p.child(i, !0);
|
|
12
|
+
p.reset(i);
|
|
13
|
+
var o = p.sibling(i, 2), s = (e) => {
|
|
14
|
+
var n = Ae(), r = p.child(n, !0);
|
|
15
|
+
p.reset(n), p.template_effect(() => p.set_text(r, p.get(t).value)), p.append(e, n);
|
|
16
|
+
};
|
|
17
|
+
p.if(o, (e) => {
|
|
18
|
+
p.get(t).value && e(s);
|
|
19
|
+
}), p.reset(n), p.template_effect(() => {
|
|
20
|
+
p.set_style(r, `background: ${p.get(t).color ?? ""}`), p.set_text(a, p.get(t).label);
|
|
21
|
+
}), p.append(e, n);
|
|
22
|
+
}), p.reset(n), p.append(e, n);
|
|
23
|
+
}, h = (e, t = p.noop) => {
|
|
24
|
+
var n = Ne();
|
|
25
|
+
p.each(n, 21, t, p.index, (e, t) => {
|
|
26
|
+
var n = Me(), r = p.child(n), i = p.sibling(r, 2), a = p.child(i, !0);
|
|
27
|
+
p.reset(i), p.reset(n), p.template_effect(() => {
|
|
28
|
+
p.set_style(r, `background: ${p.get(t).color ?? ""}`), p.set_text(a, p.get(t).label);
|
|
29
|
+
}), p.append(e, n);
|
|
30
|
+
}), p.reset(n), p.append(e, n);
|
|
31
|
+
}, g = p.from_html("<div class=\"flex h-full w-full flex-col\"><div class=\"min-h-0 flex-1\"><!></div> <!></div>"), ee = p.from_html("<div class=\"flex h-full w-full items-center justify-center px-2 text-center type-caption tone-secondary\"> </div>"), te = p.from_html("<div class=\"flex h-full w-full items-center justify-center px-2\"><!></div>"), ne = p.from_svg("<path data-testid=\"funnel-ribbon\" class=\"cursor-pointer transition-opacity\" role=\"presentation\"></path>"), re = p.from_svg("<rect rx=\"1.5\" data-testid=\"funnel-node\" class=\"cursor-pointer\" role=\"presentation\"></rect>"), ie = p.from_html("<span class=\"block truncate text-xs font-semibold text-text-primary\"> </span>"), ae = p.from_html("<div data-testid=\"funnel-stage-head\"><!> <span class=\"block truncate text-xs text-text-secondary tabular-nums\"> </span></div>"), oe = p.from_html("<div data-testid=\"funnel-zero-chip\" class=\"pointer-events-none absolute top-1/2 rounded-full bg-bg-tertiary px-1.5 py-0.5 text-xs font-semibold text-text-secondary tabular-nums\">0</div>"), se = p.from_svg("<svg class=\"block h-full w-full\" aria-hidden=\"true\"><!><!></svg><!><!>", 1), ce = p.from_html("<li><button type=\"button\" data-testid=\"funnel-a11y-button\"> </button></li>"), le = p.from_html("<span class=\"inline-flex items-center gap-1.5\" data-testid=\"funnel-legend\"><span class=\"h-2.5 w-2.5 shrink-0 rounded-full\"></span> </span>"), ue = p.from_html("<span class=\"ml-auto text-sm text-text-secondary\"><span class=\"font-semibold text-text-primary\"> </span> </span>"), de = p.from_html("<div class=\"mt-1 flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 text-xs text-text-secondary\"><!> <!></div>"), fe = p.from_html("<span class=\"h-2 w-2 shrink-0 rounded-full\"></span>"), pe = p.from_html("<div class=\"flex justify-between gap-3 tabular-nums\"><span class=\"text-text-secondary\"> </span> <span class=\"font-medium\"> </span></div>"), me = p.from_html("<div class=\"pointer-events-none absolute z-sticky -translate-x-1/2 -translate-y-full\" data-testid=\"funnel-tip\"><div class=\"rounded-lg border border-border bg-card px-2.5 py-1.5 text-xs text-text-primary shadow-lg\"><div class=\"mb-0.5 flex items-center gap-1.5 font-semibold\"><!> </div> <!></div></div>"), he = p.from_html("<div class=\"relative flex h-full w-full flex-col\"><div class=\"relative min-h-0 flex-1\"><!></div> <ul class=\"sr-only\" data-testid=\"funnel-a11y-list\"></ul> <ul class=\"sr-only\" data-testid=\"funnel-a11y-stages\"></ul> <!> <!></div>"), ge = p.from_html("<span> </span>"), _e = p.from_html("<span class=\"opacity-60\">·</span> <span> </span>", 1), ve = p.from_html("<span class=\"opacity-80\"> </span>"), ye = p.from_html("<div><span aria-hidden=\"true\">↓</span> <!> <!> <!></div>"), be = p.from_html("<div class=\"min-h-0\" data-testid=\"funnel-stage\"><div class=\"mb-1 flex items-baseline justify-between gap-x-2\"><span class=\"truncate text-sm font-semibold text-text-primary\"> </span> <span class=\"shrink-0 text-xs text-text-secondary tabular-nums\"><span class=\"font-semibold text-text-primary\"> </span> <!></span></div> <div class=\"h-2 overflow-hidden rounded-full\"><div class=\"h-full rounded-full\" data-testid=\"funnel-bar\"></div></div></div> <!>", 1), xe = p.from_html("<p class=\"mt-1 shrink-0 truncate text-sm text-text-secondary\"><span class=\"font-semibold text-text-primary\"> </span> </p>"), Se = p.from_html("<div class=\"flex h-full w-full flex-col justify-center overflow-hidden\"><!> <!></div>"), Ce = p.from_html("<div class=\"truncate px-1 text-center text-xs text-text-secondary\"> </div>"), we = p.from_html("<div data-testid=\"heatmap-cell\"> </div>"), Te = p.from_html("<div class=\"sticky left-0 z-sticky flex items-center truncate bg-card pr-2 text-xs font-medium text-text-secondary\"> </div> <!>", 1), Ee = p.from_html("<span></span>"), De = p.from_html("<div class=\"flex h-full flex-col gap-2 overflow-hidden\"><div class=\"min-h-0 flex-1 overflow-auto\"><div class=\"matrix svelte-1wt5e4g\"><div class=\"sticky left-0 z-sticky bg-card\"></div> <!> <!></div></div> <div class=\"flex shrink-0 items-center gap-2 text-xs text-text-secondary\"><span> </span> <div class=\"flex gap-0.5\"></div> <span> </span></div></div>"), Oe = p.from_html("<div data-testid=\"heatmap-tile\"><div class=\"text-lg font-bold\"> </div> <div class=\"truncate text-xs opacity-80\"> </div></div>"), ke = p.from_html("<div class=\"h-full w-full overflow-auto\"><!></div>"), Ae = p.from_html("<span class=\"shrink-0 font-semibold tabular-nums text-text-primary\"> </span>"), _ = p.from_html("<li class=\"flex min-w-0 items-center gap-2 text-xs text-text-secondary\"><span class=\"h-2.5 w-2.5 shrink-0 rounded-full\"></span> <span class=\"min-w-0 flex-1 truncate\"> </span> <!></li>"), je = p.from_html("<ul class=\"flex shrink-0 flex-col gap-1.5\"></ul>"), Me = p.from_html("<span class=\"inline-flex min-w-0 items-center gap-1.5 text-xs text-text-secondary\"><span class=\"h-2.5 w-2.5 shrink-0 rounded-full\"></span> <span class=\"truncate\"> </span></span>"), Ne = p.from_html("<div class=\"mt-1.5 flex shrink-0 flex-wrap justify-center gap-x-3 gap-y-1 px-2\"></div>"), Pe = p.from_html("<div class=\"relative h-full w-full\"><!></div>"), Fe = p.from_html("<span aria-hidden=\"true\">·</span>"), Ie = p.from_html("<span data-testid=\"chart-caption-lead\"> </span> <!>", 1), Le = p.from_html("<p data-testid=\"chart-caption\" class=\"mb-1 flex shrink-0 items-baseline gap-1 text-xs font-semibold text-text-secondary\"><!> <!></p>"), Re = p.from_html("<p class=\"shrink-0 pt-1 text-center text-xs text-text-secondary\"> </p>"), ze = p.from_html("<div class=\"flex h-full flex-col\"><div class=\"min-h-0 flex-1\"><!></div> <!></div>"), Be = p.from_html("<span class=\"text-xs font-medium text-brand-primary\"> </span>"), Ve = p.from_html("<span class=\"text-xs text-text-secondary\"> </span>"), He = p.from_html("<div><svg viewBox=\"0 0 100 54\" preserveAspectRatio=\"xMidYMax meet\" aria-hidden=\"true\"><defs><linearGradient id=\"report-gauge-grad\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\"><stop offset=\"0%\"></stop><stop offset=\"100%\"></stop></linearGradient></defs><path transform=\"translate(50,50)\"></path><path transform=\"translate(50,50)\" fill=\"url(#report-gauge-grad)\"></path></svg> <div><span class=\"text-2xl font-bold text-text-primary tabular-nums\"> </span> <!> <!></div></div>"), Ue = p.from_html("<div><div><!></div> <div><!></div></div>"), We = p.from_html("<div class=\"flex h-full min-h-0 w-full flex-col overflow-hidden\"><!> <div class=\"min-h-0 flex-1\"><!></div></div>"), Ge = p.from_html("<div class=\"h-full min-h-0 w-full\"><!></div>");
|
|
32
|
+
function v(Ae, _) {
|
|
33
|
+
p.push(_, !0);
|
|
34
|
+
let je = (e) => {
|
|
35
|
+
var t = g(), n = p.child(t), r = p.child(n);
|
|
36
|
+
{
|
|
37
|
+
let e = p.derived(void 0), t = p.derived(() => ({
|
|
38
|
+
spline: {
|
|
39
|
+
strokeWidth: 2,
|
|
40
|
+
fill: "none",
|
|
41
|
+
curve: void 0
|
|
42
|
+
},
|
|
43
|
+
points: {
|
|
44
|
+
class: "stroke-white",
|
|
45
|
+
r: 3
|
|
46
|
+
},
|
|
47
|
+
yAxis: {
|
|
48
|
+
format: p.get(k),
|
|
49
|
+
tickLabelProps: S.tick
|
|
50
|
+
},
|
|
51
|
+
xAxis: { tickLabelProps: S.tick },
|
|
52
|
+
tooltip: p.get(at),
|
|
53
|
+
highlight: {
|
|
54
|
+
points: S.highlight.points,
|
|
55
|
+
lines: S.highlight.lines
|
|
56
|
+
}
|
|
57
|
+
}));
|
|
58
|
+
(void 0)(r, {
|
|
59
|
+
get data() {
|
|
60
|
+
return p.get(jt);
|
|
61
|
+
},
|
|
62
|
+
x: "label",
|
|
63
|
+
get xScale() {
|
|
64
|
+
return p.get(e);
|
|
65
|
+
},
|
|
66
|
+
y: "value",
|
|
67
|
+
points: !0,
|
|
68
|
+
get padding() {
|
|
69
|
+
return C.valueAxis;
|
|
70
|
+
},
|
|
71
|
+
get series() {
|
|
72
|
+
return p.get(Mt);
|
|
73
|
+
},
|
|
74
|
+
legend: !1,
|
|
75
|
+
get props() {
|
|
76
|
+
return p.get(t);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
p.reset(n), h(p.sibling(n, 2), () => [{
|
|
81
|
+
label: p.get(D),
|
|
82
|
+
color: S.series
|
|
83
|
+
}, {
|
|
84
|
+
label: p.get(Ot),
|
|
85
|
+
color: S.ghost
|
|
86
|
+
}]), p.reset(t), p.append(e, t);
|
|
87
|
+
}, Me = (t) => {
|
|
88
|
+
var a = p.comment(), o = p.first_child(a), u = (e) => {
|
|
89
|
+
var t = ee(), n = p.child(t, !0);
|
|
90
|
+
p.reset(t), p.template_effect(() => p.set_text(n, p.get(ct))), p.append(e, t);
|
|
91
|
+
}, d = (t) => {
|
|
92
|
+
var a = te(), o = p.child(a);
|
|
93
|
+
f(o, {
|
|
94
|
+
get message() {
|
|
95
|
+
return p.get(ct);
|
|
96
|
+
},
|
|
97
|
+
get subtext() {
|
|
98
|
+
return p.get(w).emptySubtext;
|
|
99
|
+
},
|
|
100
|
+
children: (t, a) => {
|
|
101
|
+
var o = p.comment(), u = p.first_child(o), d = (t) => {
|
|
102
|
+
let a = p.derived(() => p.get(w).emptyAction);
|
|
103
|
+
{
|
|
104
|
+
let o = p.derived(() => r(p.get(a))), u = p.derived(() => s(p.get(a))), d = p.derived(() => n(p.get(a))), f = p.derived(() => l(p.get(a))), m = p.derived(() => Je(p.get(a).intent));
|
|
105
|
+
e(t, {
|
|
106
|
+
get variant() {
|
|
107
|
+
return p.get(o);
|
|
108
|
+
},
|
|
109
|
+
get href() {
|
|
110
|
+
return p.get(u);
|
|
111
|
+
},
|
|
112
|
+
get external() {
|
|
113
|
+
return p.get(a).external;
|
|
114
|
+
},
|
|
115
|
+
get disabled() {
|
|
116
|
+
return p.get(d);
|
|
117
|
+
},
|
|
118
|
+
get loading() {
|
|
119
|
+
return p.get(f);
|
|
120
|
+
},
|
|
121
|
+
size: "sm",
|
|
122
|
+
get "data-testid"() {
|
|
123
|
+
return p.get(m);
|
|
124
|
+
},
|
|
125
|
+
onclick: () => c(p.get(a), _.onaction),
|
|
126
|
+
children: (e, t) => {
|
|
127
|
+
p.next();
|
|
128
|
+
var n = p.text();
|
|
129
|
+
p.template_effect((e) => p.set_text(n, e), [() => i(p.get(a))]), p.append(e, n);
|
|
130
|
+
},
|
|
131
|
+
$$slots: { default: !0 }
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
p.if(u, (e) => {
|
|
136
|
+
p.get(w).emptyAction && e(d);
|
|
137
|
+
}), p.append(t, o);
|
|
138
|
+
},
|
|
139
|
+
$$slots: { default: !0 }
|
|
140
|
+
}), p.reset(a), p.append(t, a);
|
|
141
|
+
};
|
|
142
|
+
p.if(o, (e) => {
|
|
143
|
+
p.get(w).emptyVariant === "plain" ? e(u) : e(d, -1);
|
|
144
|
+
}), p.append(t, a);
|
|
145
|
+
}, Ne = (e) => {
|
|
146
|
+
var t = he(), n = p.child(t), r = p.child(n), i = (e) => {
|
|
147
|
+
v(e);
|
|
148
|
+
}, a = (e) => {
|
|
149
|
+
var t = se(), n = p.first_child(t), r = p.child(n);
|
|
150
|
+
p.each(r, 17, () => p.get(q).ribbons, p.index, (e, t) => {
|
|
151
|
+
var n = ne();
|
|
152
|
+
p.template_effect((e) => {
|
|
153
|
+
p.set_attribute(n, "d", p.get(t).path), p.set_attribute(n, "fill", p.get(t).color), p.set_attribute(n, "opacity", e);
|
|
154
|
+
}, [() => Qt(p.get(t).sourceIdx)]), p.event("pointerenter", n, (e) => Gt(p.get(t).sourceIdx, e)), p.delegated("pointermove", n, Xt), p.event("pointerleave", n, X), p.append(e, n);
|
|
155
|
+
});
|
|
156
|
+
var i = p.sibling(r);
|
|
157
|
+
p.each(i, 17, () => p.get(q).nodes, p.index, (e, t) => {
|
|
158
|
+
var n = re();
|
|
159
|
+
p.template_effect(() => {
|
|
160
|
+
p.set_attribute(n, "x", p.get(t).x), p.set_attribute(n, "y", p.get(t).y), p.set_attribute(n, "width", p.get(q).nodeW), p.set_attribute(n, "height", p.get(t).h), p.set_attribute(n, "fill", p.get(t).color);
|
|
161
|
+
}), p.event("pointerenter", n, (e) => Kt(p.get(t).stageIdx, e)), p.delegated("pointermove", n, Xt), p.event("pointerleave", n, X), p.append(e, n);
|
|
162
|
+
}), p.reset(n);
|
|
163
|
+
var a = p.sibling(n);
|
|
164
|
+
p.each(a, 17, () => p.get(H), p.index, (e, t, n) => {
|
|
165
|
+
var r = ae(), i = p.child(r), a = (e) => {
|
|
166
|
+
var n = ie(), r = p.child(n, !0);
|
|
167
|
+
p.reset(n), p.template_effect(() => p.set_text(r, p.get(t).label)), p.append(e, n);
|
|
168
|
+
};
|
|
169
|
+
p.if(i, (e) => {
|
|
170
|
+
p.get(en) && e(a);
|
|
171
|
+
});
|
|
172
|
+
var o = p.sibling(i, 2), s = p.child(o, !0);
|
|
173
|
+
p.reset(o), p.reset(r), p.template_effect((e, n, i) => {
|
|
174
|
+
p.set_attribute(r, "data-stage", p.get(t).label), p.set_class(r, 1, `pointer-events-none absolute top-0 ${e ?? ""}`, "svelte-1wt5e4g"), p.set_style(r, n), p.set_text(s, i);
|
|
175
|
+
}, [
|
|
176
|
+
() => tn(n),
|
|
177
|
+
() => $t(n, p.get(q).xs, p.get(q).padX),
|
|
178
|
+
() => O(p.get(t).value)
|
|
179
|
+
]), p.append(e, r);
|
|
180
|
+
});
|
|
181
|
+
var o = p.sibling(a);
|
|
182
|
+
p.each(o, 17, () => p.get(H), p.index, (e, t, n) => {
|
|
183
|
+
var r = p.comment(), i = p.first_child(r), a = (e) => {
|
|
184
|
+
var t = oe();
|
|
185
|
+
p.template_effect(() => p.set_style(t, `left:${p.get(q).xs[n] + p.get(q).nodeW / 2}px; transform:translate(-50%,-50%)`)), p.append(e, t);
|
|
186
|
+
};
|
|
187
|
+
p.if(i, (e) => {
|
|
188
|
+
p.get(t).value === 0 && e(a);
|
|
189
|
+
}), p.append(e, r);
|
|
190
|
+
}), p.template_effect(() => p.set_attribute(n, "viewBox", `0 0 ${p.get(W)} ${p.get(G)}`)), p.append(e, t);
|
|
191
|
+
};
|
|
192
|
+
p.if(r, (e) => {
|
|
193
|
+
p.get(K) === "tiny" ? e(i) : p.get(q) && e(a, 1);
|
|
194
|
+
}), p.reset(n);
|
|
195
|
+
var o = p.sibling(n, 2);
|
|
196
|
+
p.each(o, 21, () => p.get(Bt), p.index, (e, t) => {
|
|
197
|
+
var n = ce(), r = p.child(n), i = p.child(r, !0);
|
|
198
|
+
p.reset(r), p.reset(n), p.template_effect((e) => p.set_text(i, e), [() => Zt(p.get(t))]), p.event("focus", r, () => qt(p.get(t))), p.event("blur", r, X), p.append(e, n);
|
|
199
|
+
}), p.reset(o);
|
|
200
|
+
var s = p.sibling(o, 2);
|
|
201
|
+
p.each(s, 21, () => p.get(H), p.index, (e, t, n) => {
|
|
202
|
+
var r = ce(), i = p.child(r), a = p.child(i, !0);
|
|
203
|
+
p.reset(i), p.reset(r), p.template_effect((e) => p.set_text(a, e), [() => Yt(n)]), p.event("focus", i, () => Jt(n)), p.event("blur", i, X), p.append(e, r);
|
|
204
|
+
}), p.reset(s);
|
|
205
|
+
var c = p.sibling(s, 2), l = (e) => {
|
|
206
|
+
var t = de(), n = p.child(t);
|
|
207
|
+
p.each(n, 17, () => p.get(U), p.index, (e, t) => {
|
|
208
|
+
var n = le(), r = p.child(n), i = p.sibling(r);
|
|
209
|
+
p.reset(n), p.template_effect(() => {
|
|
210
|
+
p.set_style(r, `background: ${p.get(t).color ?? ""}`), p.set_text(i, ` ${p.get(t).label ?? ""}`);
|
|
211
|
+
}), p.append(e, n);
|
|
212
|
+
});
|
|
213
|
+
var r = p.sibling(n, 2), i = (e) => {
|
|
214
|
+
var t = ue(), n = p.child(t), r = p.child(n, !0);
|
|
215
|
+
p.reset(n);
|
|
216
|
+
var i = p.sibling(n);
|
|
217
|
+
p.reset(t), p.template_effect((e) => {
|
|
218
|
+
p.set_text(r, p.get(w).funnel.revenue), p.set_text(i, ` ${e ?? ""}`);
|
|
219
|
+
}, [() => b.reports_funnel_attributed()]), p.append(e, t);
|
|
220
|
+
};
|
|
221
|
+
p.if(r, (e) => {
|
|
222
|
+
p.get(w).funnel?.revenue && e(i);
|
|
223
|
+
}), p.reset(t), p.append(e, t);
|
|
224
|
+
};
|
|
225
|
+
p.if(c, (e) => {
|
|
226
|
+
p.get(K) !== "tiny" && e(l);
|
|
227
|
+
});
|
|
228
|
+
var u = p.sibling(c, 2), d = (e) => {
|
|
229
|
+
var t = me(), n = p.child(t), r = p.child(n), i = p.child(r), a = (e) => {
|
|
230
|
+
var t = fe();
|
|
231
|
+
p.template_effect(() => p.set_style(t, `background: ${p.get(J).color ?? ""}`)), p.append(e, t);
|
|
232
|
+
};
|
|
233
|
+
p.if(i, (e) => {
|
|
234
|
+
p.get(J).color && e(a);
|
|
235
|
+
});
|
|
236
|
+
var o = p.sibling(i);
|
|
237
|
+
p.reset(r);
|
|
238
|
+
var s = p.sibling(r, 2);
|
|
239
|
+
p.each(s, 17, () => p.get(J).rows, p.index, (e, t) => {
|
|
240
|
+
var n = p.derived(() => p.to_array(p.get(t), 2));
|
|
241
|
+
let r = () => p.get(n)[0], i = () => p.get(n)[1];
|
|
242
|
+
var a = pe(), o = p.child(a), s = p.child(o, !0);
|
|
243
|
+
p.reset(o);
|
|
244
|
+
var c = p.sibling(o, 2), l = p.child(c, !0);
|
|
245
|
+
p.reset(c), p.reset(a), p.template_effect(() => {
|
|
246
|
+
p.set_text(s, r()), p.set_text(l, i());
|
|
247
|
+
}), p.append(e, a);
|
|
248
|
+
}), p.reset(n), p.reset(t), p.template_effect(() => {
|
|
249
|
+
p.set_style(t, `left:${p.get(J).x ?? ""}px; top:${p.get(J).y - 8}px`), p.set_text(o, ` ${p.get(J).title ?? ""}`);
|
|
250
|
+
}), p.append(e, t);
|
|
251
|
+
};
|
|
252
|
+
p.if(u, (e) => {
|
|
253
|
+
p.get(J) && e(d);
|
|
254
|
+
}), p.reset(t), p.bind_this(t, (e) => p.set(Ht, e), () => p.get(Ht)), p.bind_element_size(n, "clientWidth", (e) => p.set(W, e)), p.bind_element_size(n, "clientHeight", (e) => p.set(G, e)), p.append(e, t);
|
|
255
|
+
}, v = (e) => {
|
|
256
|
+
var t = Se(), n = p.child(t);
|
|
257
|
+
p.each(n, 17, () => p.get(H), p.index, (e, t, n) => {
|
|
258
|
+
var r = be(), i = p.first_child(r), a = p.child(i), o = p.child(a), s = p.child(o, !0);
|
|
259
|
+
p.reset(o);
|
|
260
|
+
var c = p.sibling(o, 2), l = p.child(c), u = p.child(l, !0);
|
|
261
|
+
p.reset(l);
|
|
262
|
+
var d = p.sibling(l, 2), f = (e) => {
|
|
263
|
+
var n = p.text();
|
|
264
|
+
p.template_effect((e) => p.set_text(n, `· ${e ?? ""}`), [() => b.reports_funnel_pct_of_start({ pct: p.get(t).pctStart })]), p.append(e, n);
|
|
265
|
+
};
|
|
266
|
+
p.if(d, (e) => {
|
|
267
|
+
p.get(t).pctStart !== void 0 && e(f);
|
|
268
|
+
}), p.reset(c), p.reset(a);
|
|
269
|
+
var m = p.sibling(a, 2), h = p.child(m);
|
|
270
|
+
p.reset(m), p.reset(i);
|
|
271
|
+
var g = p.sibling(i, 2), ee = (e) => {
|
|
272
|
+
let t = p.derived(() => p.get(H)[n + 1]);
|
|
273
|
+
var r = ye(), i = p.sibling(p.child(r), 2), a = (e) => {
|
|
274
|
+
var n = ge(), r = p.child(n, !0);
|
|
275
|
+
p.reset(n), p.template_effect((e) => p.set_text(r, e), [() => b.reports_funnel_pct_continue({ pct: p.get(t).stepPct })]), p.append(e, n);
|
|
276
|
+
};
|
|
277
|
+
p.if(i, (e) => {
|
|
278
|
+
p.get(t).stepPct !== void 0 && e(a);
|
|
279
|
+
});
|
|
280
|
+
var o = p.sibling(i, 2), s = (e) => {
|
|
281
|
+
var n = _e(), r = p.sibling(p.first_child(n), 2), i = p.child(r, !0);
|
|
282
|
+
p.reset(r), p.template_effect((e) => p.set_text(i, e), [() => b.reports_funnel_lost({ count: O(p.get(t).lost) })]), p.append(e, n);
|
|
283
|
+
};
|
|
284
|
+
p.if(o, (e) => {
|
|
285
|
+
p.get(t).lost !== 0 && e(s);
|
|
286
|
+
});
|
|
287
|
+
var c = p.sibling(o, 2), l = (e) => {
|
|
288
|
+
var t = ve(), n = p.child(t);
|
|
289
|
+
p.reset(t), p.template_effect((e) => p.set_text(n, `· ${e ?? ""}`), [() => b.reports_funnel_biggest_drop()]), p.append(e, t);
|
|
290
|
+
};
|
|
291
|
+
p.if(c, (e) => {
|
|
292
|
+
p.get(t).isLeak && e(l);
|
|
293
|
+
}), p.reset(r), p.template_effect(() => p.set_class(r, 1, `flex items-center gap-1.5 py-1 pl-1 text-xs tabular-nums ${p.get(t).isLeak ? "font-medium text-accent-warning" : "text-text-secondary"}`)), p.append(e, r);
|
|
294
|
+
};
|
|
295
|
+
p.if(g, (e) => {
|
|
296
|
+
n < p.get(H).length - 1 && (p.get(H)[n + 1].stepPct !== void 0 || p.get(H)[n + 1].lost !== 0) && e(ee);
|
|
297
|
+
}), p.template_effect((e, n) => {
|
|
298
|
+
p.set_attribute(i, "data-stage", p.get(t).label), p.set_text(s, p.get(t).label), p.set_text(u, e), p.set_style(m, `background: color-mix(in oklch, ${S.series ?? ""} 15%, transparent)`), p.set_style(h, `background: ${S.series ?? ""}; width: ${n ?? ""}%`);
|
|
299
|
+
}, [() => O(p.get(t).value), () => n === 0 || p.get(t).stepPct === void 0 ? 100 : Math.min(100, p.get(t).stepPct)]), p.append(e, r);
|
|
300
|
+
});
|
|
301
|
+
var r = p.sibling(n, 2), i = (e) => {
|
|
302
|
+
var t = xe(), n = p.child(t), r = p.child(n, !0);
|
|
303
|
+
p.reset(n);
|
|
304
|
+
var i = p.sibling(n);
|
|
305
|
+
p.reset(t), p.template_effect((e) => {
|
|
306
|
+
p.set_text(r, p.get(w).funnel.revenue), p.set_text(i, ` ${e ?? ""}`);
|
|
307
|
+
}, [() => b.reports_funnel_attributed()]), p.append(e, t);
|
|
308
|
+
};
|
|
309
|
+
p.if(r, (e) => {
|
|
310
|
+
p.get(w).funnel?.revenue && e(i);
|
|
311
|
+
}), p.reset(t), p.append(e, t);
|
|
312
|
+
}, Ke = (e) => {
|
|
313
|
+
var t = De(), n = p.child(t), r = p.child(n);
|
|
314
|
+
let i;
|
|
315
|
+
var a = p.sibling(p.child(r), 2);
|
|
316
|
+
p.each(a, 17, () => p.get(Z), p.index, (e, t) => {
|
|
317
|
+
var n = Ce(), r = p.child(n, !0);
|
|
318
|
+
p.reset(n), p.template_effect(() => p.set_text(r, p.get(t))), p.append(e, n);
|
|
319
|
+
});
|
|
320
|
+
var o = p.sibling(a, 2);
|
|
321
|
+
p.each(o, 17, () => p.get(rn), p.index, (e, t, n) => {
|
|
322
|
+
var r = Te(), i = p.first_child(r), a = p.child(i, !0);
|
|
323
|
+
p.reset(i);
|
|
324
|
+
var o = p.sibling(i, 2);
|
|
325
|
+
p.each(o, 17, () => p.get(Z), p.index, (e, r, i) => {
|
|
326
|
+
let a = p.derived(() => p.get(an)[n]?.[i]);
|
|
327
|
+
var o = we(), s = p.child(o, !0);
|
|
328
|
+
p.reset(o), p.template_effect((e, n, i) => {
|
|
329
|
+
p.set_attribute(o, "data-row", p.get(t)), p.set_attribute(o, "data-col", p.get(r)), p.set_class(o, 1, `flex items-center justify-center overflow-hidden rounded-md px-1 text-xs font-semibold text-white ${e ?? ""}`, "svelte-1wt5e4g"), p.set_attribute(o, "title", `${p.get(t) ?? ""} · ${p.get(r) ?? ""}: ${n ?? ""}`), p.set_text(s, i);
|
|
330
|
+
}, [
|
|
331
|
+
() => un(p.get(a)),
|
|
332
|
+
() => p.get(a) === void 0 ? b.reports_builder_no_data() : O(p.get(a)),
|
|
333
|
+
() => p.get(a) === void 0 ? "" : O(p.get(a))
|
|
334
|
+
]), p.append(e, o);
|
|
335
|
+
}), p.template_effect(() => p.set_text(a, p.get(t))), p.append(e, r);
|
|
336
|
+
}), p.reset(r), p.reset(n);
|
|
337
|
+
var s = p.sibling(n, 2), c = p.child(s), l = p.child(c);
|
|
338
|
+
p.reset(c);
|
|
339
|
+
var u = p.sibling(c, 2);
|
|
340
|
+
p.each(u, 20, () => Q, (e) => e, (e, t) => {
|
|
341
|
+
var n = Ee();
|
|
342
|
+
p.template_effect(() => p.set_class(n, 1, `h-3 w-4 rounded-sm ${t ?? ""}`, "svelte-1wt5e4g")), p.append(e, n);
|
|
343
|
+
}), p.reset(u);
|
|
344
|
+
var d = p.sibling(u, 2), f = p.child(d, !0);
|
|
345
|
+
p.reset(d), p.reset(s), p.reset(t), p.template_effect((e, t) => {
|
|
346
|
+
i = p.set_style(r, "", i, {
|
|
347
|
+
"--cols": p.get(Z).length,
|
|
348
|
+
"--rows": p.get(rn).length
|
|
349
|
+
}), p.set_text(l, `${p.get(w).heatmap?.measureLabel ?? "" ?? ""} — ${e ?? ""}`), p.set_text(f, t);
|
|
350
|
+
}, [() => b.reports_heatmap_legend_soft(), () => b.reports_heatmap_legend_strong()]), p.append(e, t);
|
|
351
|
+
}, qe = (e) => {
|
|
352
|
+
var t = ke(), n = p.child(t);
|
|
353
|
+
d(n, {
|
|
354
|
+
cols: "6",
|
|
355
|
+
gap: "3",
|
|
356
|
+
children: (e, t) => {
|
|
357
|
+
var n = p.comment(), r = p.first_child(n);
|
|
358
|
+
p.each(r, 17, () => p.get(sn), p.index, (e, t) => {
|
|
359
|
+
var n = Oe(), r = p.child(n), i = p.child(r, !0);
|
|
360
|
+
p.reset(r);
|
|
361
|
+
var a = p.sibling(r, 2), o = p.child(a, !0);
|
|
362
|
+
p.reset(a), p.reset(n), p.template_effect((e, r) => {
|
|
363
|
+
p.set_attribute(n, "data-col", p.get(t).label), p.set_class(n, 1, `rounded-lg p-3 text-white ${e ?? ""}`, "svelte-1wt5e4g"), p.set_text(i, r), p.set_text(o, p.get(t).label);
|
|
364
|
+
}, [() => un(p.get(t).value), () => O(p.get(t).value)]), p.append(e, n);
|
|
365
|
+
}), p.append(e, n);
|
|
366
|
+
},
|
|
367
|
+
$$slots: { default: !0 }
|
|
368
|
+
}), p.reset(t), p.append(e, t);
|
|
369
|
+
}, y = a(), Je = t(), b = y.i18n, { chart: Ye = u } = y.skeleton ?? {}, { truncate: Xe } = y.format, { axisTickFormat: Ze, BAR_ARCHETYPE: x, barChartSeries: Qe, barDrillContext: $e, CHART: S, CHART_PADDING: C, formatMeasureValue: et, NAME_MAX: tt, reportDelta: nt } = y.chart, rt = p.prop(_, "loading", 3, !1), w = p.derived(() => _.descriptor.payload), T = p.derived(() => (p.get(w).series[0]?.points ?? []).map((e) => ({
|
|
370
|
+
label: String(e.x),
|
|
371
|
+
value: e.y
|
|
372
|
+
}))), E = p.derived(() => p.get(w).measureFormat ?? "number"), D = p.derived(() => p.get(w).series[0]?.name ?? "");
|
|
373
|
+
function O(e) {
|
|
374
|
+
return et(e, p.get(E));
|
|
375
|
+
}
|
|
376
|
+
let k = p.derived(() => Ze(p.get(E))), A = p.derived(() => ({
|
|
377
|
+
...S.tooltip,
|
|
378
|
+
item: {
|
|
379
|
+
label: p.get(D),
|
|
380
|
+
format: O
|
|
381
|
+
}
|
|
382
|
+
})), it = p.derived(() => ({
|
|
383
|
+
...S.tooltip,
|
|
384
|
+
item: { format: O }
|
|
385
|
+
})), at = p.derived(() => ({
|
|
386
|
+
...S.tooltip,
|
|
387
|
+
item: { format: O },
|
|
388
|
+
hideTotal: !0
|
|
389
|
+
})), ot = p.derived(() => p.get(w).showCaption ?? !1), j = p.derived(() => p.get(w).caption ?? ""), M = p.derived(() => p.get(w).captionLead), st = p.derived(() => p.get(M)?.tone === "positive" ? "tone-success" : p.get(M)?.tone === "negative" ? "tone-danger" : "tone-primary"), ct = p.derived(() => p.get(w).emptyMessage ?? b.foundry_chart_empty()), lt = p.derived(() => p.get(w).drill?.byLabel ?? {}), ut = p.derived(() => _.ondrill ? { class: "cursor-pointer" } : {}), dt = p.derived(() => $e(_.ondrill ? ({ label: e }) => _.ondrill?.(p.get(lt)[e] ?? {
|
|
390
|
+
id: e,
|
|
391
|
+
label: e
|
|
392
|
+
}) : void 0)), N = p.proxy({
|
|
393
|
+
width: 0,
|
|
394
|
+
height: 0
|
|
395
|
+
}), ft = p.state(0), pt = p.state(0), P = p.derived(() => p.get(ft) - p.get(pt) - 12 >= 140), mt = p.state(0), F = p.derived(() => p.get(mt) >= 180), I = p.derived(() => p.get(T).length === 1), L = p.derived(() => p.get(T).reduce((e, t) => e + t.value, 0)), ht = p.derived(() => {
|
|
396
|
+
if (p.get(T).length <= 6) return p.get(T);
|
|
397
|
+
let e = [...p.get(T)].sort((e, t) => t.value - e.value), t = e.slice(0, 5), n = e.slice(5);
|
|
398
|
+
return [...t, {
|
|
399
|
+
label: `Others (${n.length})`,
|
|
400
|
+
value: n.reduce((e, t) => e + t.value, 0)
|
|
401
|
+
}];
|
|
402
|
+
}), R = p.derived(() => p.get(w).keepOrder ? [...p.get(T)] : [...p.get(T)].sort((e, t) => t.value - e.value)), z = p.derived(() => p.get(w).negative ?? p.get(T).some((e) => e.value < 0)), gt = p.derived(() => N.height > 0 ? Math.max(3, Math.floor((N.height - 18) / 34)) : 6), _t = p.derived(() => p.get(R).slice(0, p.get(gt))), vt = p.derived(() => p.get(R).length - p.get(_t).length), yt = p.derived(() => N.width > 0 ? Math.max(3, Math.floor(N.width / 56)) : 8), bt = p.derived(() => p.get(R).slice(0, p.get(yt))), xt = p.derived(() => p.get(R).length - p.get(bt).length), St = p.derived(() => p.get(w).pacing?.expected ?? []), Ct = p.derived(() => p.get(w).pacing?.actualLen ?? Infinity), wt = p.derived(() => p.get(T).map((e, t) => ({
|
|
403
|
+
...e,
|
|
404
|
+
value: t < p.get(Ct) ? e.value : null,
|
|
405
|
+
expected: p.get(St)[t] ?? null
|
|
406
|
+
}))), Tt = p.derived(() => p.get(w).pacing?.compareLabel ?? b.foundry_chart_expected()), Et = p.derived(() => {
|
|
407
|
+
let e = p.get(w).pacing?.pointLabels ?? [], t = /* @__PURE__ */ new Map();
|
|
408
|
+
return p.get(T).forEach((n, r) => {
|
|
409
|
+
e[r] && t.set(n.label, e[r]);
|
|
410
|
+
}), (e) => t.get(String(e)) ?? String(e);
|
|
411
|
+
}), Dt = p.derived(() => ({
|
|
412
|
+
...p.get(at),
|
|
413
|
+
header: { format: p.get(Et) }
|
|
414
|
+
})), Ot = p.derived(() => p.get(w).compare?.label ?? ""), kt = p.derived(() => (p.get(w).compare?.points?.length ?? 0) > 0), At = p.derived(() => p.get(w).compare?.points ?? []), jt = p.derived(() => p.get(kt) ? p.get(T).map((e, t) => ({
|
|
415
|
+
...e,
|
|
416
|
+
compare: p.get(At)[t]?.y ?? null
|
|
417
|
+
})) : p.get(T)), Mt = p.derived(() => [{
|
|
418
|
+
key: "value",
|
|
419
|
+
label: p.get(D),
|
|
420
|
+
value: "value",
|
|
421
|
+
color: S.series
|
|
422
|
+
}, {
|
|
423
|
+
key: "compare",
|
|
424
|
+
label: p.get(Ot),
|
|
425
|
+
value: "compare",
|
|
426
|
+
color: S.ghost,
|
|
427
|
+
props: { "stroke-dasharray": "6 4" }
|
|
428
|
+
}]), B = p.derived(() => p.get(w).gauge?.value ?? 0), V = p.derived(() => p.get(w).gauge?.goal && p.get(w).gauge.goal > 0 ? p.get(B) / p.get(w).gauge.goal * 100 : null), Nt = p.derived(() => p.get(V) == null ? p.get(E) === "percent" ? Math.max(0, Math.min(100, p.get(B))) : 100 : Math.max(0, Math.min(100, p.get(V)))), Pt = p.derived(() => p.get(V) == null ? null : `${Math.round(p.get(V))}% of ${O(p.get(w).gauge?.goal)} goal`), Ft = p.derived(() => nt(p.get(B), p.get(w).gauge?.compareValue)), It = (void 0)().innerRadius(33).outerRadius(46).cornerRadius(5).startAngle(-Math.PI / 2), Lt = p.derived(() => It({ endAngle: Math.PI / 2 }) ?? ""), Rt = p.derived(() => It({ endAngle: -Math.PI / 2 + Math.PI * (p.get(Nt) / 100) }) ?? ""), zt = p.derived(() => {
|
|
429
|
+
let e = [];
|
|
430
|
+
for (let t of p.get(w).series) for (let n of t.points) {
|
|
431
|
+
let t = String(n.x), r = e.find((e) => e.label === t);
|
|
432
|
+
r ? r.value += n.y : e.push({
|
|
433
|
+
label: t,
|
|
434
|
+
value: n.y
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
return e;
|
|
438
|
+
}), H = p.derived(() => {
|
|
439
|
+
let e = p.get(zt), t = e[0]?.value ?? 0, n = -1, r = Infinity;
|
|
440
|
+
for (let t = 1; t < e.length; t++) {
|
|
441
|
+
let i = e[t - 1].value;
|
|
442
|
+
if (i <= 0) continue;
|
|
443
|
+
let a = e[t].value / i;
|
|
444
|
+
a < 1 && a < r && (r = a, n = t);
|
|
445
|
+
}
|
|
446
|
+
return e.map((r, i) => {
|
|
447
|
+
let a = i > 0 ? e[i - 1].value : r.value;
|
|
448
|
+
return {
|
|
449
|
+
label: r.label,
|
|
450
|
+
value: r.value,
|
|
451
|
+
pctStart: t > 0 ? Math.round(r.value / t * 100) : void 0,
|
|
452
|
+
stepPct: i === 0 ? 100 : a > 0 ? Math.round(r.value / a * 100) : void 0,
|
|
453
|
+
lost: i === 0 ? 0 : Math.max(0, a - r.value),
|
|
454
|
+
isLeak: i === n
|
|
455
|
+
};
|
|
456
|
+
});
|
|
457
|
+
}), Bt = p.derived(() => {
|
|
458
|
+
if (p.get(w).series.length < 2) return [];
|
|
459
|
+
let e = [];
|
|
460
|
+
for (let [t, n] of p.get(w).series.entries()) {
|
|
461
|
+
let r = p.get(H).map((e) => {
|
|
462
|
+
let t = 0;
|
|
463
|
+
for (let r of n.points) String(r.x) === e.label && (t += r.y);
|
|
464
|
+
return t;
|
|
465
|
+
}), i = e.find((e) => e.label === n.name);
|
|
466
|
+
if (i) {
|
|
467
|
+
for (let [e, t] of r.entries()) i.stages[e] += t;
|
|
468
|
+
continue;
|
|
469
|
+
}
|
|
470
|
+
e.push({
|
|
471
|
+
id: `series-${t}`,
|
|
472
|
+
label: n.name,
|
|
473
|
+
stages: r,
|
|
474
|
+
revenue: p.get(w).funnel?.sourceRevenue?.[n.name],
|
|
475
|
+
color: ""
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
let t = [];
|
|
479
|
+
for (let n of e) {
|
|
480
|
+
let e = t.findIndex((e) => e.stages[0] < n.stages[0]);
|
|
481
|
+
t.splice(e === -1 ? t.length : e, 0, n);
|
|
482
|
+
}
|
|
483
|
+
return t.map((e, t) => ({
|
|
484
|
+
...e,
|
|
485
|
+
color: S.palette[t % S.palette.length]
|
|
486
|
+
}));
|
|
487
|
+
}), U = p.derived(() => {
|
|
488
|
+
let e = p.get(Bt);
|
|
489
|
+
if (e.length === 0) return [];
|
|
490
|
+
let t = e.slice(0, 4), n = e.slice(4);
|
|
491
|
+
if (n.length > 0) {
|
|
492
|
+
let e = b.reports_funnel_source_other(), r = e;
|
|
493
|
+
for (let n = 2; t.some((e) => e.label === r) && n < t.length + 3; n++) r = `${e} (${n})`;
|
|
494
|
+
t.push({
|
|
495
|
+
id: "rollup",
|
|
496
|
+
label: r,
|
|
497
|
+
stages: p.get(H).map((e, t) => {
|
|
498
|
+
let r = 0;
|
|
499
|
+
for (let e of n) r += e.stages[t];
|
|
500
|
+
return r;
|
|
501
|
+
}),
|
|
502
|
+
revenue: void 0,
|
|
503
|
+
color: ""
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
return t.map((e, t) => ({
|
|
507
|
+
...e,
|
|
508
|
+
color: S.palette[t % S.palette.length]
|
|
509
|
+
}));
|
|
510
|
+
}), Vt = p.derived(() => p.get(Bt).length > 1), W = p.state(0), G = p.state(0), Ht = p.state(void 0), Ut = p.derived(() => {
|
|
511
|
+
let e = p.get(H).length;
|
|
512
|
+
return e < 2 || (p.get(W) - 16 - 9) / (e - 1) >= 56;
|
|
513
|
+
}), K = p.derived(() => p.get(W) < 300 || p.get(G) < 150 || !p.get(Ut) ? "tiny" : p.get(W) >= 440 && p.get(G) >= 210 ? "full" : "compact"), q = p.derived(() => {
|
|
514
|
+
let e = p.get(W), t = p.get(G), n = p.get(H).length;
|
|
515
|
+
if (p.get(K) === "tiny" || e < 40 || t < 40 || p.get(U).length === 0) return;
|
|
516
|
+
let r = p.get(K) === "full" ? 30 : 26, i = p.get(K) === "full" ? 16 : 0, a = p.get(K) === "full" ? 6 : 4, o = r + i, s = Math.max(t - o - 4, 20), c = p.get(H).map((e, t) => p.get(U).reduce((e, n) => e + (n.stages[t] ?? 0), 0)), l = Math.max(...c, 1), u = s - a * (p.get(U).length - 1), d = u / l;
|
|
517
|
+
for (let e = 0; e <= p.get(U).length; e++) {
|
|
518
|
+
let e = 0, t = 0, n = 0;
|
|
519
|
+
for (let [r] of p.get(H).entries()) {
|
|
520
|
+
let i = 0, a = 0;
|
|
521
|
+
for (let e of p.get(U)) {
|
|
522
|
+
let t = (e.stages[r] ?? 0) * d;
|
|
523
|
+
t < 1 ? i += 1 : a += t;
|
|
524
|
+
}
|
|
525
|
+
i + a > e && (e = i + a, t = i, n = a);
|
|
526
|
+
}
|
|
527
|
+
if (e <= u || n <= 0) break;
|
|
528
|
+
d *= Math.max(u - t, 1) / n;
|
|
529
|
+
}
|
|
530
|
+
let f = e - 16 - 9, m = Array.from({ length: n }, (e, t) => n === 1 ? 8 : 8 + f * t / (n - 1)), h = m.map((e, t) => {
|
|
531
|
+
let n = p.get(U).map((e) => Math.max((e.stages[t] ?? 0) * d, 1)), r = n.reduce((e, t) => e + t, 0) + a * (p.get(U).length - 1), i = o + (s - r) / 2;
|
|
532
|
+
return p.get(U).map((r, o) => {
|
|
533
|
+
let s = n[o], c = {
|
|
534
|
+
x: e,
|
|
535
|
+
y: i,
|
|
536
|
+
h: s,
|
|
537
|
+
color: r.color,
|
|
538
|
+
sourceIdx: o,
|
|
539
|
+
stageIdx: t
|
|
540
|
+
};
|
|
541
|
+
return i += s + a, c;
|
|
542
|
+
});
|
|
543
|
+
}), g = [];
|
|
544
|
+
for (let e = 0; e < n - 1; e++) for (let [t] of p.get(U).entries()) {
|
|
545
|
+
if ((p.get(U)[t].stages[e] ?? 0) <= 0) continue;
|
|
546
|
+
let n = h[e][t], r = h[e + 1][t], i = n.x + 9, a = r.x, o = (i + a) / 2;
|
|
547
|
+
g.push({
|
|
548
|
+
color: n.color,
|
|
549
|
+
sourceIdx: t,
|
|
550
|
+
path: `M ${i},${n.y} C ${o},${n.y} ${o},${r.y} ${a},${r.y} L ${a},${r.y + r.h} C ${o},${r.y + r.h} ${o},${n.y + n.h} ${i},${n.y + n.h} Z`
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
return {
|
|
554
|
+
nodes: h.flat(),
|
|
555
|
+
ribbons: g,
|
|
556
|
+
nodeW: 9,
|
|
557
|
+
padX: 8,
|
|
558
|
+
xs: m
|
|
559
|
+
};
|
|
560
|
+
}), J = p.state(void 0), Y = p.state(void 0);
|
|
561
|
+
function Wt(e) {
|
|
562
|
+
let t = p.get(Ht)?.getBoundingClientRect();
|
|
563
|
+
return {
|
|
564
|
+
x: e.clientX - (t?.left ?? 0),
|
|
565
|
+
y: e.clientY - (t?.top ?? 0)
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
function Gt(e, t) {
|
|
569
|
+
let n = p.get(U)[e];
|
|
570
|
+
p.set(Y, e, !0);
|
|
571
|
+
let r = p.get(H).map((e, t) => {
|
|
572
|
+
let r = n.stages[t] ?? 0, i = t > 0 ? n.stages[t - 1] ?? 0 : 0, a = t > 0 && i > 0 ? Math.round(r / i * 100) : 0;
|
|
573
|
+
return [t === 0 || i <= 0 ? e.label : `${e.label} (${b.reports_funnel_tip_of_stage({
|
|
574
|
+
pct: a,
|
|
575
|
+
stage: p.get(H)[t - 1].label
|
|
576
|
+
})})`, O(r)];
|
|
577
|
+
});
|
|
578
|
+
n.revenue !== void 0 && r.push([b.column_revenue(), n.revenue]), p.set(J, {
|
|
579
|
+
title: n.label,
|
|
580
|
+
color: n.color,
|
|
581
|
+
rows: r,
|
|
582
|
+
...Wt(t)
|
|
583
|
+
}, !0);
|
|
584
|
+
}
|
|
585
|
+
function Kt(e, t) {
|
|
586
|
+
let n = p.get(H)[e], r = [[b.column_total(), O(n.value)]];
|
|
587
|
+
e > 0 && n.stepPct !== void 0 && n.lost !== 0 && r.push([b.reports_funnel_tip_dropped_in(), b.reports_funnel_tip_dropped_of_prev({
|
|
588
|
+
count: O(n.lost),
|
|
589
|
+
pct: 100 - n.stepPct
|
|
590
|
+
})]), p.set(J, {
|
|
591
|
+
title: n.label,
|
|
592
|
+
rows: r,
|
|
593
|
+
...Wt(t)
|
|
594
|
+
}, !0);
|
|
595
|
+
}
|
|
596
|
+
function qt(e) {
|
|
597
|
+
let t = p.get(H).map((t, n) => {
|
|
598
|
+
let r = e.stages[n] ?? 0, i = n > 0 ? e.stages[n - 1] ?? 0 : 0, a = n > 0 && i > 0 ? Math.round(r / i * 100) : 0;
|
|
599
|
+
return [n === 0 || i <= 0 ? t.label : `${t.label} (${b.reports_funnel_tip_of_stage({
|
|
600
|
+
pct: a,
|
|
601
|
+
stage: p.get(H)[n - 1].label
|
|
602
|
+
})})`, O(r)];
|
|
603
|
+
});
|
|
604
|
+
e.revenue !== void 0 && t.push([b.column_revenue(), e.revenue]);
|
|
605
|
+
let n = p.get(U).findIndex((t) => t.id === e.id);
|
|
606
|
+
p.set(Y, n === -1 ? void 0 : n, !0), p.set(J, {
|
|
607
|
+
title: e.label,
|
|
608
|
+
color: e.color || void 0,
|
|
609
|
+
rows: t,
|
|
610
|
+
x: p.get(W) / 2,
|
|
611
|
+
y: p.get(G) / 2
|
|
612
|
+
}, !0);
|
|
613
|
+
}
|
|
614
|
+
function Jt(e) {
|
|
615
|
+
Kt(e, {
|
|
616
|
+
clientX: 0,
|
|
617
|
+
clientY: 0
|
|
618
|
+
}), p.set(Y, void 0), p.set(J, p.get(J) && {
|
|
619
|
+
...p.get(J),
|
|
620
|
+
x: p.get(W) / 2,
|
|
621
|
+
y: p.get(G) / 2
|
|
622
|
+
}, !0);
|
|
623
|
+
}
|
|
624
|
+
function Yt(e) {
|
|
625
|
+
let t = p.get(H)[e], n = [`${t.label} ${O(t.value)}`];
|
|
626
|
+
return e > 0 && t.stepPct !== void 0 && t.lost !== 0 && n.push(b.reports_funnel_tip_dropped_of_prev({
|
|
627
|
+
count: O(t.lost),
|
|
628
|
+
pct: 100 - t.stepPct
|
|
629
|
+
})), n.join(", ");
|
|
630
|
+
}
|
|
631
|
+
function Xt(e) {
|
|
632
|
+
p.get(J) && p.set(J, {
|
|
633
|
+
...p.get(J),
|
|
634
|
+
...Wt(e)
|
|
635
|
+
}, !0);
|
|
636
|
+
}
|
|
637
|
+
function X() {
|
|
638
|
+
p.set(J, void 0), p.set(Y, void 0);
|
|
639
|
+
}
|
|
640
|
+
function Zt(e) {
|
|
641
|
+
let t = [e.label];
|
|
642
|
+
for (let [n, r] of p.get(H).entries()) t.push(`${r.label} ${O(e.stages[n] ?? 0)}`);
|
|
643
|
+
return e.revenue !== void 0 && t.push(`${b.column_revenue()} ${e.revenue}`), t.join(", ");
|
|
644
|
+
}
|
|
645
|
+
function Qt(e) {
|
|
646
|
+
return p.get(Y) === void 0 ? .42 : e === p.get(Y) ? .78 : .14;
|
|
647
|
+
}
|
|
648
|
+
function $t(e, t, n) {
|
|
649
|
+
let r = p.get(H).length - 1;
|
|
650
|
+
if (t.length < 2) return `left:${n}px`;
|
|
651
|
+
let i = t[1] - t[0], a = Math.max(i - 8, 24), o = Math.max(i / 2 - 8, 24);
|
|
652
|
+
return e === 0 ? `max-width:${o}px;left:${n}px` : e === r ? `max-width:${o}px;right:${n}px` : `max-width:${a}px;left:${t[e] + 9 / 2}px; transform:translateX(-50%)`;
|
|
653
|
+
}
|
|
654
|
+
let en = p.derived(() => p.get(K) === "full");
|
|
655
|
+
function tn(e) {
|
|
656
|
+
return e === 0 ? "text-left" : e === p.get(H).length - 1 ? "text-right" : "text-center";
|
|
657
|
+
}
|
|
658
|
+
let nn = p.derived(() => p.get(w).heatmap?.matrix === !0), rn = p.derived(() => p.get(w).series.map((e) => e.name)), Z = p.derived(() => {
|
|
659
|
+
let e = [];
|
|
660
|
+
for (let t of p.get(w).series) for (let n of t.points) {
|
|
661
|
+
let t = String(n.x);
|
|
662
|
+
e.includes(t) || e.push(t);
|
|
663
|
+
}
|
|
664
|
+
return e;
|
|
665
|
+
}), an = p.derived(() => p.get(w).series.map((e) => p.get(Z).map((t) => e.points.find((e) => String(e.x) === t)?.y))), on = p.derived(() => p.get(w).series.flatMap((e) => e.points.map((e) => e.y))), sn = p.derived(() => p.get(w).series.flatMap((e) => e.points.map((e) => ({
|
|
666
|
+
label: String(e.x),
|
|
667
|
+
value: e.y
|
|
668
|
+
})))), cn = p.derived(() => ({
|
|
669
|
+
min: Math.min(...p.get(on)),
|
|
670
|
+
max: Math.max(...p.get(on))
|
|
671
|
+
})), Q = [
|
|
672
|
+
"bg-rose-500",
|
|
673
|
+
"bg-orange-500",
|
|
674
|
+
"bg-amber-500",
|
|
675
|
+
"bg-lime-600",
|
|
676
|
+
"bg-emerald-600"
|
|
677
|
+
];
|
|
678
|
+
function ln(e) {
|
|
679
|
+
return e >= 85 ? "bg-emerald-600" : e >= 75 ? "bg-lime-600" : e >= 60 ? "bg-amber-500" : e >= 45 ? "bg-orange-500" : "bg-rose-500";
|
|
680
|
+
}
|
|
681
|
+
function un(e) {
|
|
682
|
+
if (e === void 0) return "bg-bg-secondary";
|
|
683
|
+
if (p.get(E) === "percent") return ln(e);
|
|
684
|
+
let { min: t, max: n } = p.get(cn), r = n > t ? (e - t) / (n - t) : 1;
|
|
685
|
+
return Q[Math.min(Q.length - 1, Math.floor(r * Q.length))];
|
|
686
|
+
}
|
|
687
|
+
let dn = p.derived(() => {
|
|
688
|
+
switch (p.get(w).kind) {
|
|
689
|
+
case "gauge": return !1;
|
|
690
|
+
case "breakdown":
|
|
691
|
+
case "pie": return p.get(L) === 0;
|
|
692
|
+
case "funnel": return p.get(H).every((e) => e.value <= 0);
|
|
693
|
+
case "heatmap": return p.get(on).length === 0;
|
|
694
|
+
case "trend":
|
|
695
|
+
case "area":
|
|
696
|
+
case "ranking":
|
|
697
|
+
case "column":
|
|
698
|
+
case "pacing": return p.get(T).length === 0;
|
|
699
|
+
default: return !1;
|
|
700
|
+
}
|
|
701
|
+
});
|
|
702
|
+
var $ = Ge(), fn = p.child($), pn = (e) => {
|
|
703
|
+
var t = Pe(), n = p.child(t);
|
|
704
|
+
Ye(n, { height: "h-full" }), p.reset(t), p.append(e, t);
|
|
705
|
+
}, mn = (e) => {
|
|
706
|
+
var t = We(), n = p.child(t), r = (e) => {
|
|
707
|
+
var t = Le(), n = p.child(t), r = (e) => {
|
|
708
|
+
var t = Ie(), n = p.first_child(t), r = p.child(n, !0);
|
|
709
|
+
p.reset(n);
|
|
710
|
+
var i = p.sibling(n, 2), a = (e) => {
|
|
711
|
+
var t = Fe();
|
|
712
|
+
p.append(e, t);
|
|
713
|
+
};
|
|
714
|
+
p.if(i, (e) => {
|
|
715
|
+
p.get(j) && e(a);
|
|
716
|
+
}), p.template_effect(() => {
|
|
717
|
+
p.set_class(n, 1, p.clsx(p.get(st)), "svelte-1wt5e4g"), p.set_text(r, p.get(M).text);
|
|
718
|
+
}), p.append(e, t);
|
|
719
|
+
};
|
|
720
|
+
p.if(n, (e) => {
|
|
721
|
+
p.get(M) && e(r);
|
|
722
|
+
});
|
|
723
|
+
var i = p.sibling(n, 2), a = (e) => {
|
|
724
|
+
var t = ge(), n = p.child(t, !0);
|
|
725
|
+
p.reset(t), p.template_effect(() => p.set_text(n, p.get(j))), p.append(e, t);
|
|
726
|
+
};
|
|
727
|
+
p.if(i, (e) => {
|
|
728
|
+
p.get(j) && e(a);
|
|
729
|
+
}), p.reset(t), p.append(e, t);
|
|
730
|
+
};
|
|
731
|
+
p.if(n, (e) => {
|
|
732
|
+
p.get(ot) && (p.get(j) || p.get(M)) && e(r);
|
|
733
|
+
});
|
|
734
|
+
var i = p.sibling(n, 2), a = p.child(i), s = (e) => {
|
|
735
|
+
Me(e);
|
|
736
|
+
}, c = (e) => {
|
|
737
|
+
var t = p.comment(), n = p.first_child(t), r = (e) => {
|
|
738
|
+
je(e);
|
|
739
|
+
}, i = (e) => {
|
|
740
|
+
{
|
|
741
|
+
let t = p.derived(void 0), n = p.derived(() => ({
|
|
742
|
+
spline: {
|
|
743
|
+
stroke: S.series,
|
|
744
|
+
strokeWidth: 2,
|
|
745
|
+
fill: "none",
|
|
746
|
+
curve: void 0
|
|
747
|
+
},
|
|
748
|
+
points: {
|
|
749
|
+
fill: S.series,
|
|
750
|
+
class: "stroke-white",
|
|
751
|
+
r: p.get(I) ? 5 : 3
|
|
752
|
+
},
|
|
753
|
+
labels: {
|
|
754
|
+
format: O,
|
|
755
|
+
class: "fill-text-primary text-xs font-semibold"
|
|
756
|
+
},
|
|
757
|
+
yAxis: {
|
|
758
|
+
format: p.get(k),
|
|
759
|
+
tickLabelProps: S.tick
|
|
760
|
+
},
|
|
761
|
+
xAxis: { tickLabelProps: S.tick },
|
|
762
|
+
tooltip: p.get(A),
|
|
763
|
+
highlight: {
|
|
764
|
+
points: S.highlight.points,
|
|
765
|
+
lines: S.highlight.lines
|
|
766
|
+
}
|
|
767
|
+
}));
|
|
768
|
+
(void 0)(e, {
|
|
769
|
+
get data() {
|
|
770
|
+
return p.get(T);
|
|
771
|
+
},
|
|
772
|
+
x: "label",
|
|
773
|
+
get xScale() {
|
|
774
|
+
return p.get(t);
|
|
775
|
+
},
|
|
776
|
+
y: "value",
|
|
777
|
+
points: !0,
|
|
778
|
+
get labels() {
|
|
779
|
+
return p.get(I);
|
|
780
|
+
},
|
|
781
|
+
get padding() {
|
|
782
|
+
return C.valueAxis;
|
|
783
|
+
},
|
|
784
|
+
get props() {
|
|
785
|
+
return p.get(n);
|
|
786
|
+
}
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
};
|
|
790
|
+
p.if(n, (e) => {
|
|
791
|
+
p.get(kt) ? e(r) : e(i, -1);
|
|
792
|
+
}), p.append(e, t);
|
|
793
|
+
}, l = (e) => {
|
|
794
|
+
var t = p.comment(), n = p.first_child(t), r = (e) => {
|
|
795
|
+
je(e);
|
|
796
|
+
}, i = (e) => {
|
|
797
|
+
{
|
|
798
|
+
let t = (e) => {
|
|
799
|
+
{
|
|
800
|
+
let t = p.derived(() => [
|
|
801
|
+
["0%", `color-mix(in oklch, ${S.series} 45%, transparent)`],
|
|
802
|
+
["55%", `color-mix(in oklch, ${S.series} 18%, transparent)`],
|
|
803
|
+
["100%", "transparent"]
|
|
804
|
+
]);
|
|
805
|
+
(void 0)(e, {
|
|
806
|
+
id: "report-area-grad",
|
|
807
|
+
vertical: !0,
|
|
808
|
+
get stops() {
|
|
809
|
+
return p.get(t);
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
}, n = p.derived(void 0), r = p.derived(() => ({
|
|
814
|
+
area: {
|
|
815
|
+
fill: "url(#report-area-grad)",
|
|
816
|
+
stroke: S.series,
|
|
817
|
+
strokeWidth: 2,
|
|
818
|
+
curve: void 0
|
|
819
|
+
},
|
|
820
|
+
points: {
|
|
821
|
+
fill: S.series,
|
|
822
|
+
class: "stroke-white",
|
|
823
|
+
r: 5
|
|
824
|
+
},
|
|
825
|
+
labels: {
|
|
826
|
+
format: O,
|
|
827
|
+
class: "fill-text-primary text-xs font-semibold"
|
|
828
|
+
},
|
|
829
|
+
yAxis: {
|
|
830
|
+
format: p.get(k),
|
|
831
|
+
tickLabelProps: S.tick
|
|
832
|
+
},
|
|
833
|
+
xAxis: { tickLabelProps: S.tick },
|
|
834
|
+
tooltip: p.get(A),
|
|
835
|
+
highlight: {
|
|
836
|
+
points: S.highlight.points,
|
|
837
|
+
lines: S.highlight.lines
|
|
838
|
+
}
|
|
839
|
+
}));
|
|
840
|
+
(void 0)(e, {
|
|
841
|
+
get data() {
|
|
842
|
+
return p.get(T);
|
|
843
|
+
},
|
|
844
|
+
x: "label",
|
|
845
|
+
get xScale() {
|
|
846
|
+
return p.get(n);
|
|
847
|
+
},
|
|
848
|
+
y: "value",
|
|
849
|
+
get points() {
|
|
850
|
+
return p.get(I);
|
|
851
|
+
},
|
|
852
|
+
get labels() {
|
|
853
|
+
return p.get(I);
|
|
854
|
+
},
|
|
855
|
+
get padding() {
|
|
856
|
+
return C.valueAxis;
|
|
857
|
+
},
|
|
858
|
+
get props() {
|
|
859
|
+
return p.get(r);
|
|
860
|
+
},
|
|
861
|
+
belowMarks: t,
|
|
862
|
+
$$slots: { belowMarks: !0 }
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
p.if(n, (e) => {
|
|
867
|
+
p.get(kt) ? e(r) : e(i, -1);
|
|
868
|
+
}), p.append(e, t);
|
|
869
|
+
}, u = (e) => {
|
|
870
|
+
var t = ze(), n = p.child(t), r = p.child(n);
|
|
871
|
+
{
|
|
872
|
+
let e = (e) => {
|
|
873
|
+
{
|
|
874
|
+
let t = p.derived(() => [["0%", S.barGradient[1]], ["100%", S.barGradient[0]]]);
|
|
875
|
+
(void 0)(e, {
|
|
876
|
+
id: "report-bar-h",
|
|
877
|
+
get stops() {
|
|
878
|
+
return p.get(t);
|
|
879
|
+
}
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
}, t = p.derived(() => Qe(p.get(_t), p.get(D), p.get(z))), n = p.derived(() => ({
|
|
883
|
+
bars: {
|
|
884
|
+
radius: S.barRadius,
|
|
885
|
+
rounded: S.barRounded,
|
|
886
|
+
strokeWidth: 0,
|
|
887
|
+
...p.get(z) ? {} : { fill: "url(#report-bar-h)" },
|
|
888
|
+
...p.get(ut)
|
|
889
|
+
},
|
|
890
|
+
labels: { class: "fill-text-primary text-xs font-semibold" },
|
|
891
|
+
yAxis: {
|
|
892
|
+
tickLabelProps: S.nameTick,
|
|
893
|
+
format: (e) => Xe(String(e), tt.ranking, "…")
|
|
894
|
+
},
|
|
895
|
+
...p.get(z) ? { rule: { class: "stroke-text-secondary" } } : {},
|
|
896
|
+
tooltip: {
|
|
897
|
+
...p.get(A),
|
|
898
|
+
context: p.get(dt)
|
|
899
|
+
},
|
|
900
|
+
highlight: { area: !1 }
|
|
901
|
+
}));
|
|
902
|
+
(void 0)(r, {
|
|
903
|
+
get data() {
|
|
904
|
+
return p.get(_t);
|
|
905
|
+
},
|
|
906
|
+
x: "value",
|
|
907
|
+
y: "label",
|
|
908
|
+
get orientation() {
|
|
909
|
+
return x.ranking.orientation;
|
|
910
|
+
},
|
|
911
|
+
axis: "y",
|
|
912
|
+
get padding() {
|
|
913
|
+
return x.ranking.padding;
|
|
914
|
+
},
|
|
915
|
+
labels: {
|
|
916
|
+
placement: "outside",
|
|
917
|
+
format: O
|
|
918
|
+
},
|
|
919
|
+
get series() {
|
|
920
|
+
return p.get(t);
|
|
921
|
+
},
|
|
922
|
+
get props() {
|
|
923
|
+
return p.get(n);
|
|
924
|
+
},
|
|
925
|
+
belowMarks: e,
|
|
926
|
+
$$slots: { belowMarks: !0 }
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
p.reset(n);
|
|
930
|
+
var i = p.sibling(n, 2), a = (e) => {
|
|
931
|
+
var t = Re(), n = p.child(t, !0);
|
|
932
|
+
p.reset(t), p.template_effect((e) => p.set_text(n, e), [() => b.foundry_more_count({ count: p.get(vt) })]), p.append(e, t);
|
|
933
|
+
};
|
|
934
|
+
p.if(i, (e) => {
|
|
935
|
+
p.get(vt) > 0 && e(a);
|
|
936
|
+
}), p.reset(t), p.append(e, t);
|
|
937
|
+
}, d = (e) => {
|
|
938
|
+
var t = ze(), n = p.child(t), r = p.child(n);
|
|
939
|
+
{
|
|
940
|
+
let e = (e) => {
|
|
941
|
+
{
|
|
942
|
+
let t = p.derived(() => [["0%", S.barGradient[0]], ["100%", S.barGradient[1]]]);
|
|
943
|
+
(void 0)(e, {
|
|
944
|
+
id: "report-bar-v",
|
|
945
|
+
vertical: !0,
|
|
946
|
+
get stops() {
|
|
947
|
+
return p.get(t);
|
|
948
|
+
}
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
}, t = p.derived(() => ({
|
|
952
|
+
placement: "outside",
|
|
953
|
+
format: p.get(k)
|
|
954
|
+
})), n = p.derived(() => Qe(p.get(bt), p.get(D), p.get(z))), i = p.derived(() => ({
|
|
955
|
+
bars: {
|
|
956
|
+
radius: S.barRadius,
|
|
957
|
+
rounded: S.barRounded,
|
|
958
|
+
strokeWidth: 0,
|
|
959
|
+
...p.get(z) ? {} : { fill: "url(#report-bar-v)" },
|
|
960
|
+
...p.get(ut)
|
|
961
|
+
},
|
|
962
|
+
labels: {
|
|
963
|
+
class: "fill-text-secondary font-medium",
|
|
964
|
+
fontSize: 12
|
|
965
|
+
},
|
|
966
|
+
xAxis: {
|
|
967
|
+
tickLabelProps: S.nameTick,
|
|
968
|
+
format: (e) => Xe(String(e), tt.column, "…")
|
|
969
|
+
},
|
|
970
|
+
...p.get(z) ? { rule: { class: "stroke-text-secondary" } } : {},
|
|
971
|
+
tooltip: {
|
|
972
|
+
...p.get(A),
|
|
973
|
+
context: p.get(dt)
|
|
974
|
+
},
|
|
975
|
+
highlight: { area: !1 }
|
|
976
|
+
}));
|
|
977
|
+
(void 0)(r, {
|
|
978
|
+
get data() {
|
|
979
|
+
return p.get(bt);
|
|
980
|
+
},
|
|
981
|
+
x: "label",
|
|
982
|
+
y: "value",
|
|
983
|
+
get orientation() {
|
|
984
|
+
return x.column.orientation;
|
|
985
|
+
},
|
|
986
|
+
axis: "x",
|
|
987
|
+
get padding() {
|
|
988
|
+
return x.column.padding;
|
|
989
|
+
},
|
|
990
|
+
get labels() {
|
|
991
|
+
return p.get(t);
|
|
992
|
+
},
|
|
993
|
+
get series() {
|
|
994
|
+
return p.get(n);
|
|
995
|
+
},
|
|
996
|
+
get props() {
|
|
997
|
+
return p.get(i);
|
|
998
|
+
},
|
|
999
|
+
belowMarks: e,
|
|
1000
|
+
$$slots: { belowMarks: !0 }
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
p.reset(n);
|
|
1004
|
+
var i = p.sibling(n, 2), a = (e) => {
|
|
1005
|
+
var t = Re(), n = p.child(t, !0);
|
|
1006
|
+
p.reset(t), p.template_effect((e) => p.set_text(n, e), [() => b.foundry_more_count({ count: p.get(xt) })]), p.append(e, t);
|
|
1007
|
+
};
|
|
1008
|
+
p.if(i, (e) => {
|
|
1009
|
+
p.get(xt) > 0 && e(a);
|
|
1010
|
+
}), p.reset(t), p.append(e, t);
|
|
1011
|
+
}, f = (e) => {
|
|
1012
|
+
var t = He(), n = p.child(t), r = p.child(n), i = p.child(r), a = p.child(i), o = p.sibling(a);
|
|
1013
|
+
p.reset(i), p.reset(r);
|
|
1014
|
+
var s = p.sibling(r), c = p.sibling(s);
|
|
1015
|
+
p.reset(n);
|
|
1016
|
+
var l = p.sibling(n, 2), u = p.child(l), d = p.child(u, !0);
|
|
1017
|
+
p.reset(u);
|
|
1018
|
+
var f = p.sibling(u, 2), m = (e) => {
|
|
1019
|
+
var t = Be(), n = p.child(t, !0);
|
|
1020
|
+
p.reset(t), p.template_effect(() => p.set_text(n, p.get(Pt))), p.append(e, t);
|
|
1021
|
+
};
|
|
1022
|
+
p.if(f, (e) => {
|
|
1023
|
+
p.get(Pt) && e(m);
|
|
1024
|
+
});
|
|
1025
|
+
var h = p.sibling(f, 2), g = (e) => {
|
|
1026
|
+
var t = Ve(), n = p.child(t, !0);
|
|
1027
|
+
p.reset(t), p.template_effect(() => p.set_text(n, p.get(Ft).text)), p.append(e, t);
|
|
1028
|
+
};
|
|
1029
|
+
p.if(h, (e) => {
|
|
1030
|
+
p.get(Ft) && e(g);
|
|
1031
|
+
}), p.reset(l), p.reset(t), p.template_effect((e) => {
|
|
1032
|
+
p.set_class(t, 1, `flex h-full w-full overflow-hidden ${p.get(F) ? "flex-col items-center justify-center" : "flex-row items-center justify-center gap-3"}`), p.set_class(n, 0, `block ${p.get(F) ? "w-full max-w-[230px]" : "h-full max-h-full w-auto"}`), p.set_attribute(a, "stop-color", S.barGradient[0]), p.set_attribute(o, "stop-color", S.barGradient[1]), p.set_attribute(s, "d", p.get(Lt)), p.set_attribute(s, "fill", S.track), p.set_attribute(c, "d", p.get(Rt)), p.set_class(l, 1, `flex flex-col ${p.get(F) ? "-mt-4 items-center text-center" : "items-start text-left"}`), p.set_text(d, e);
|
|
1033
|
+
}, [() => O(p.get(B))]), p.bind_element_size(t, "clientHeight", (e) => p.set(mt, e)), p.append(e, t);
|
|
1034
|
+
}, ee = (e) => {
|
|
1035
|
+
var t = Ue(), n = p.child(t), r = p.child(n);
|
|
1036
|
+
{
|
|
1037
|
+
let e = p.derived(() => p.get(w).innerRadius ?? (p.get(w).kind === "breakdown" ? -25 : 0)), t = p.derived(() => ({ tooltip: p.get(it) }));
|
|
1038
|
+
(void 0)(r, {
|
|
1039
|
+
get data() {
|
|
1040
|
+
return p.get(ht);
|
|
1041
|
+
},
|
|
1042
|
+
key: "label",
|
|
1043
|
+
value: "value",
|
|
1044
|
+
c: "label",
|
|
1045
|
+
get cRange() {
|
|
1046
|
+
return S.palette;
|
|
1047
|
+
},
|
|
1048
|
+
get innerRadius() {
|
|
1049
|
+
return p.get(e);
|
|
1050
|
+
},
|
|
1051
|
+
legend: !1,
|
|
1052
|
+
get props() {
|
|
1053
|
+
return p.get(t);
|
|
1054
|
+
}
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
p.reset(n);
|
|
1058
|
+
var i = p.sibling(n, 2), a = p.child(i);
|
|
1059
|
+
{
|
|
1060
|
+
let e = p.derived(() => p.get(ht).map((e, t) => ({
|
|
1061
|
+
label: e.label,
|
|
1062
|
+
color: S.palette[t % S.palette.length],
|
|
1063
|
+
value: p.get(L) > 0 ? `${Math.round(e.value / p.get(L) * 100)}%` : void 0
|
|
1064
|
+
})));
|
|
1065
|
+
m(a, () => p.get(e));
|
|
1066
|
+
}
|
|
1067
|
+
p.reset(i), p.reset(t), p.template_effect(() => {
|
|
1068
|
+
p.set_class(t, 1, `flex h-full w-full items-center justify-center gap-3 overflow-hidden ${p.get(P) ? "flex-row" : "flex-col"}`), p.set_class(n, 1, `aspect-square max-h-full max-w-full ${p.get(P) ? "h-full w-auto" : "min-h-0 w-full flex-1"}`), p.set_class(i, 1, p.clsx(p.get(P) ? "min-w-0 flex-1" : "w-full shrink-0"));
|
|
1069
|
+
}), p.bind_element_size(t, "clientWidth", (e) => p.set(ft, e)), p.bind_element_size(t, "clientHeight", (e) => p.set(pt, e)), p.append(e, t);
|
|
1070
|
+
}, te = (e) => {
|
|
1071
|
+
var t = g(), n = p.child(t), r = p.child(n);
|
|
1072
|
+
{
|
|
1073
|
+
let e = p.derived(void 0), t = p.derived(() => [{
|
|
1074
|
+
key: "value",
|
|
1075
|
+
label: b.foundry_chart_this_run(),
|
|
1076
|
+
value: "value",
|
|
1077
|
+
color: S.series
|
|
1078
|
+
}, {
|
|
1079
|
+
key: "expected",
|
|
1080
|
+
label: p.get(Tt),
|
|
1081
|
+
value: "expected",
|
|
1082
|
+
color: S.ghost,
|
|
1083
|
+
props: { "stroke-dasharray": "6 4" }
|
|
1084
|
+
}]), n = p.derived(() => ({
|
|
1085
|
+
spline: {
|
|
1086
|
+
strokeWidth: 2,
|
|
1087
|
+
fill: "none",
|
|
1088
|
+
curve: void 0
|
|
1089
|
+
},
|
|
1090
|
+
points: {
|
|
1091
|
+
class: "stroke-white",
|
|
1092
|
+
r: 5
|
|
1093
|
+
},
|
|
1094
|
+
labels: {
|
|
1095
|
+
format: O,
|
|
1096
|
+
class: "fill-text-primary text-xs font-semibold"
|
|
1097
|
+
},
|
|
1098
|
+
yAxis: {
|
|
1099
|
+
format: p.get(k),
|
|
1100
|
+
tickLabelProps: S.tick
|
|
1101
|
+
},
|
|
1102
|
+
xAxis: { tickLabelProps: S.tick },
|
|
1103
|
+
tooltip: p.get(Dt),
|
|
1104
|
+
highlight: {
|
|
1105
|
+
points: S.highlight.points,
|
|
1106
|
+
lines: S.highlight.lines
|
|
1107
|
+
}
|
|
1108
|
+
}));
|
|
1109
|
+
(void 0)(r, {
|
|
1110
|
+
get data() {
|
|
1111
|
+
return p.get(wt);
|
|
1112
|
+
},
|
|
1113
|
+
x: "label",
|
|
1114
|
+
get xScale() {
|
|
1115
|
+
return p.get(e);
|
|
1116
|
+
},
|
|
1117
|
+
y: "value",
|
|
1118
|
+
get points() {
|
|
1119
|
+
return p.get(I);
|
|
1120
|
+
},
|
|
1121
|
+
get labels() {
|
|
1122
|
+
return p.get(I);
|
|
1123
|
+
},
|
|
1124
|
+
get padding() {
|
|
1125
|
+
return C.valueAxis;
|
|
1126
|
+
},
|
|
1127
|
+
get series() {
|
|
1128
|
+
return p.get(t);
|
|
1129
|
+
},
|
|
1130
|
+
legend: !1,
|
|
1131
|
+
get props() {
|
|
1132
|
+
return p.get(n);
|
|
1133
|
+
}
|
|
1134
|
+
});
|
|
1135
|
+
}
|
|
1136
|
+
p.reset(n);
|
|
1137
|
+
var i = p.sibling(n, 2);
|
|
1138
|
+
{
|
|
1139
|
+
let e = p.derived(() => [{
|
|
1140
|
+
label: b.foundry_chart_this_run(),
|
|
1141
|
+
color: S.series
|
|
1142
|
+
}, {
|
|
1143
|
+
label: p.get(Tt),
|
|
1144
|
+
color: S.ghost
|
|
1145
|
+
}]);
|
|
1146
|
+
h(i, () => p.get(e));
|
|
1147
|
+
}
|
|
1148
|
+
p.reset(t), p.append(e, t);
|
|
1149
|
+
}, ne = (e) => {
|
|
1150
|
+
var t = p.comment(), n = p.first_child(t), r = (e) => {
|
|
1151
|
+
Ne(e);
|
|
1152
|
+
}, i = (e) => {
|
|
1153
|
+
v(e);
|
|
1154
|
+
};
|
|
1155
|
+
p.if(n, (e) => {
|
|
1156
|
+
p.get(Vt) ? e(r) : e(i, -1);
|
|
1157
|
+
}), p.append(e, t);
|
|
1158
|
+
}, re = (e) => {
|
|
1159
|
+
var t = p.comment(), n = p.first_child(t), r = (e) => {
|
|
1160
|
+
Ke(e);
|
|
1161
|
+
}, i = (e) => {
|
|
1162
|
+
qe(e);
|
|
1163
|
+
};
|
|
1164
|
+
p.if(n, (e) => {
|
|
1165
|
+
p.get(nn) ? e(r) : e(i, -1);
|
|
1166
|
+
}), p.append(e, t);
|
|
1167
|
+
}, ie = (e) => {
|
|
1168
|
+
{
|
|
1169
|
+
let t = p.derived(() => b.foundry_no_renderer({ tag: `chart/${String(p.get(w).kind)}` }));
|
|
1170
|
+
o(e, {
|
|
1171
|
+
get descriptor() {
|
|
1172
|
+
return _.descriptor;
|
|
1173
|
+
},
|
|
1174
|
+
get reason() {
|
|
1175
|
+
return p.get(t);
|
|
1176
|
+
}
|
|
1177
|
+
});
|
|
1178
|
+
}
|
|
1179
|
+
};
|
|
1180
|
+
p.if(a, (e) => {
|
|
1181
|
+
p.get(dn) ? e(s) : p.get(w).kind === "trend" ? e(c, 1) : p.get(w).kind === "area" ? e(l, 2) : p.get(w).kind === "ranking" ? e(u, 3) : p.get(w).kind === "column" ? e(d, 4) : p.get(w).kind === "gauge" ? e(f, 5) : p.get(w).kind === "breakdown" || p.get(w).kind === "pie" ? e(ee, 6) : p.get(w).kind === "pacing" ? e(te, 7) : p.get(w).kind === "funnel" ? e(ne, 8) : p.get(w).kind === "heatmap" ? e(re, 9) : e(ie, -1);
|
|
1182
|
+
}), p.reset(i), p.reset(t), p.bind_element_size(i, "clientHeight", (e) => N.height = e), p.bind_element_size(i, "clientWidth", (e) => N.width = e), p.append(e, t);
|
|
1183
|
+
};
|
|
1184
|
+
p.if(fn, (e) => {
|
|
1185
|
+
rt() ? e(pn) : e(mn, -1);
|
|
1186
|
+
}), p.reset($), p.append(Ae, $), p.pop();
|
|
1187
|
+
}
|
|
1188
|
+
p.delegate(["pointermove"]);
|
|
1189
|
+
//#endregion
|
|
1190
|
+
export { v as default };
|