@mx-cartographer/experiences 5.0.18-alpha.JB0 → 5.0.18-alpha.JB1
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/InsightsMicroWidget-C1X8hjQ_.mjs +1659 -0
- package/dist/InsightsMicroWidget-C1X8hjQ_.mjs.map +1 -0
- package/dist/InsightsMicroWidget.es.js +1 -1
- package/dist/accounts/AccountsMiniWidget.d.ts +1 -1
- package/dist/accounts/components/AccountListItem.d.ts +1 -1
- package/dist/common/context/GlobalDataProvider.d.ts +1 -1
- package/dist/common/hooks/useCombineEvents.d.ts +1 -1
- package/dist/common/stores/GlobalStore.d.ts +11 -11
- package/dist/index.es.js +19962 -3784
- package/dist/index.es.js.map +1 -1
- package/dist/microinsights/analytics.d.ts +1 -1
- package/dist/microinsights/components/beatCard/BeatCard.d.ts +2 -2
- package/dist/microinsights/components/beaticons/BeatIcon.d.ts +2 -2
- package/dist/microinsights/components/beaticons/MonthlySpendComparisonIcon.d.ts +1 -1
- package/dist/microinsights/components/carouselheader/CarouselHeader.d.ts +2 -2
- package/dist/microinsights/components/insightsmicrowidget/InsightsMicroWidget.d.ts +2 -2
- package/dist/microinsights/components/microBeatCarousel/CarouselControls.d.ts +1 -1
- package/dist/microinsights/components/microBeatCarousel/MicroBeatCarousel.d.ts +2 -2
- package/dist/microinsights/components/microInsightCard/MicroInsightCard.d.ts +1 -1
- package/dist/microinsights/components/noRelevantInsightsCard/NoRelevantInsightsCard.d.ts +1 -1
- package/dist/microinsights/components/viewMoreMicroCard/ViewMoreMicroCard.d.ts +1 -1
- package/dist/microinsights/components/zeroStateCard/ZeroStateCard.d.ts +1 -1
- package/dist/microinsights/constants/Analytics.d.ts +1 -1
- package/dist/microinsights/interfaces.d.ts +1 -1
- package/dist/microinsights/stores/CopyStore.d.ts +2 -1
- package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
- package/dist/microinsights/types/BeatUIComponent.d.ts +1 -1
- package/dist/microinsights/utils/DataSeries.d.ts +1 -1
- package/package.json +2 -4
- package/dist/ConnectMiniWidget-ZjXGwURZ.mjs +0 -15993
- package/dist/ConnectMiniWidget-ZjXGwURZ.mjs.map +0 -1
- package/dist/ZeroStateCard-C4AH-WX2.mjs +0 -2131
- package/dist/ZeroStateCard-C4AH-WX2.mjs.map +0 -1
- package/dist/formatCurrency.d.ts +0 -1
- package/dist/formatCurrency.es.js +0 -5
- package/dist/formatCurrency.es.js.map +0 -1
|
@@ -0,0 +1,1659 @@
|
|
|
1
|
+
import { jsx as I, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import d, { useState as Ce, useEffect as Y } from "react";
|
|
3
|
+
import { observer as p } from "mobx-react-lite";
|
|
4
|
+
import we from "@mui/material/CssBaseline";
|
|
5
|
+
import { ThemeProvider as We } from "@mui/material/styles";
|
|
6
|
+
import { P as be, CategoryIcon as ve, useTokens as Z, MerchantLogo as Ye, Icon as $, createMXTheme as pe } from "@mxenabled/mxui";
|
|
7
|
+
import xe from "@mui/material/Link";
|
|
8
|
+
import Te from "@mui/material/Stack";
|
|
9
|
+
import ie from "@mui/material/Typography";
|
|
10
|
+
import Re from "@mui/icons-material/ChevronRight";
|
|
11
|
+
import X from "@mui/material/Box";
|
|
12
|
+
import { css as Q } from "@mxenabled/cssinjs";
|
|
13
|
+
import Ee from "@mui/material/IconButton";
|
|
14
|
+
import Ke from "@mui/icons-material/ChevronLeft";
|
|
15
|
+
import { useInView as de } from "react-intersection-observer";
|
|
16
|
+
import ke from "@mui/material/Card";
|
|
17
|
+
import $e from "@mui/material/CardActions";
|
|
18
|
+
import Xe from "@mui/material/CardContent";
|
|
19
|
+
import ze from "@mui/material/CardHeader";
|
|
20
|
+
import je from "@mui/material/styles/useTheme";
|
|
21
|
+
import Je from "@mui/material/CircularProgress";
|
|
22
|
+
import { makeAutoObservable as q, runInAction as le } from "mobx";
|
|
23
|
+
import { getUnixTime as te } from "date-fns/getUnixTime";
|
|
24
|
+
import Ze from "bowser";
|
|
25
|
+
import "date-fns/intlFormat";
|
|
26
|
+
import { Honeybadger as k } from "@honeybadger-io/react";
|
|
27
|
+
import "numeral";
|
|
28
|
+
import "date-fns/addMonths";
|
|
29
|
+
import "date-fns/addQuarters";
|
|
30
|
+
import "date-fns/addWeeks";
|
|
31
|
+
import "date-fns/addYears";
|
|
32
|
+
import "date-fns/getDay";
|
|
33
|
+
import "date-fns/isBefore";
|
|
34
|
+
import "date-fns/nextDay";
|
|
35
|
+
import "date-fns/setDate";
|
|
36
|
+
import "date-fns/startOfToday";
|
|
37
|
+
import "date-fns/fromUnixTime";
|
|
38
|
+
const Qe = async (e, E, i = "1.0.0", t = "Experiences") => {
|
|
39
|
+
const _ = new ra(e, E), { analytics_session: r } = await _.initializeAnalyticsSession(
|
|
40
|
+
i,
|
|
41
|
+
t
|
|
42
|
+
), s = window.location.hostname;
|
|
43
|
+
return {
|
|
44
|
+
sendAnalyticEvent: async (N) => await _.sendAnalyticEvent({
|
|
45
|
+
analytics_event: {
|
|
46
|
+
...N,
|
|
47
|
+
app_version: "widgets-v2",
|
|
48
|
+
created_at: te(/* @__PURE__ */ new Date()).toString(),
|
|
49
|
+
host: s,
|
|
50
|
+
name: N?.label || "",
|
|
51
|
+
session_id: r.guid,
|
|
52
|
+
user_agent: navigator.userAgent || "",
|
|
53
|
+
version: 2
|
|
54
|
+
}
|
|
55
|
+
}),
|
|
56
|
+
sendAnalyticsPageview: async (N) => await _.sendAnalyticsPageview({
|
|
57
|
+
analytics_pageview: {
|
|
58
|
+
...N,
|
|
59
|
+
app_version: "widgets-v2",
|
|
60
|
+
created_at: te(/* @__PURE__ */ new Date()).toString(),
|
|
61
|
+
host: s,
|
|
62
|
+
name: N.name,
|
|
63
|
+
session_id: r.guid,
|
|
64
|
+
user_agent: navigator.userAgent || ""
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
};
|
|
68
|
+
}, H = {
|
|
69
|
+
ACCOUNTS: "accounts",
|
|
70
|
+
ANALYTICS_EVENTS: "analytics_events",
|
|
71
|
+
ANALYTICS_FEATURE_VISITS: "feature_visits",
|
|
72
|
+
ANALYTICS_PAGEVIEWS: "analytics_pageviews",
|
|
73
|
+
ANALYTICS_SESSION: "analytics_sessions",
|
|
74
|
+
APP_DATA: "raja/data?type=master",
|
|
75
|
+
BEATS: "beats",
|
|
76
|
+
BUDGETS: "budgets",
|
|
77
|
+
CASHFLOW_EVENTS: "cashflow_events",
|
|
78
|
+
CASHFLOW_SEQUENCES: "cashflow_sequences",
|
|
79
|
+
CATEGORIES: "categories",
|
|
80
|
+
DATE_RANGE_CATEGORY_TOTALS: "date_range_category_totals",
|
|
81
|
+
DEVICES: "devices",
|
|
82
|
+
EMAIL_VERIFICATIONS: "email_verifications",
|
|
83
|
+
GOALS: "goals",
|
|
84
|
+
INSTITUTIONS: "institutions",
|
|
85
|
+
LOCALIZED_COPY: "localized_copies",
|
|
86
|
+
LOCALIZED_CONTENT: "localized_content",
|
|
87
|
+
MEMBERS: "members",
|
|
88
|
+
MERCHANTS: "merchants",
|
|
89
|
+
MONTHLY_CASH_FLOW_PROFILE: "monthly_cash_flow_profile",
|
|
90
|
+
MONTHLY_CATEGORY_TOTALS: "monthly_category_totals",
|
|
91
|
+
NOTIFICATION_PROFILES: "notifications_profiles",
|
|
92
|
+
NOTIFICATIONS: "notifications",
|
|
93
|
+
PHONE_VERIFICATIONS: "sms_verification",
|
|
94
|
+
RETIREMENT_GOALS: "retirement_goals",
|
|
95
|
+
RETIREMENT_GOAL_ACCOUNTS: "retirement_goal_accounts",
|
|
96
|
+
SCHEDULED_PAYMENTS: "scheduled_payments",
|
|
97
|
+
SPENDING_PLANS: "spending_plans",
|
|
98
|
+
SUPPORT_TICKETS: "support_tickets",
|
|
99
|
+
TAGGINGS: "taggings",
|
|
100
|
+
TAGS: "tags",
|
|
101
|
+
TRANSACTION_RULES: "transaction_rules",
|
|
102
|
+
TRANSACTIONS: "transactions",
|
|
103
|
+
USER: "user",
|
|
104
|
+
USER_COMMUNICATION_PROFILE: "user_communication_profile",
|
|
105
|
+
USER_FEATURES: "user_features",
|
|
106
|
+
USER_PROFILES: "user_profiles",
|
|
107
|
+
WIDGET_URLS: "widget_urls"
|
|
108
|
+
};
|
|
109
|
+
var R = /* @__PURE__ */ ((e) => (e[e.ANY = 0] = "ANY", e[e.CHECKING = 1] = "CHECKING", e[e.SAVINGS = 2] = "SAVINGS", e[e.LOAN = 3] = "LOAN", e[e.CREDIT_CARD = 4] = "CREDIT_CARD", e[e.INVESTMENT = 5] = "INVESTMENT", e[e.LINE_OF_CREDIT = 6] = "LINE_OF_CREDIT", e[e.MORTGAGE = 7] = "MORTGAGE", e[e.PROPERTY = 8] = "PROPERTY", e[e.CASH = 9] = "CASH", e[e.INSURANCE = 10] = "INSURANCE", e[e.PREPAID = 11] = "PREPAID", e[e.CHECKING_LINE_OF_CREDIT = 12] = "CHECKING_LINE_OF_CREDIT", e[e.DIGITAL_WALLET = 13] = "DIGITAL_WALLET", e))(R || {}), qe = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.MONEY_MARKET = 1] = "MONEY_MARKET", e[e.CERTIFICATE_OF_DEPOSIT = 2] = "CERTIFICATE_OF_DEPOSIT", e[e.AUTO = 3] = "AUTO", e[e.STUDENT = 4] = "STUDENT", e[e.SMALL_BUSINESS = 5] = "SMALL_BUSINESS", e[e.PERSONAL = 6] = "PERSONAL", e[e.PERSONAL_WITH_COLLATERAL = 7] = "PERSONAL_WITH_COLLATERAL", e[e.HOME_EQUITY = 8] = "HOME_EQUITY", e[e.PLAN_401_K = 9] = "PLAN_401_K", e[e.PLAN_403_B = 10] = "PLAN_403_B", e[e.PLAN_529 = 11] = "PLAN_529", e[e.IRA = 12] = "IRA", e[e.ROLLOVER_IRA = 13] = "ROLLOVER_IRA", e[e.ROTH_IRA = 14] = "ROTH_IRA", e[e.TAXABLE = 15] = "TAXABLE", e[e.NON_TAXABLE = 16] = "NON_TAXABLE", e[e.BROKERAGE = 17] = "BROKERAGE", e[e.TRUST = 18] = "TRUST", e[e.UNIFORM_GIFTS_TO_MINORS_ACT = 19] = "UNIFORM_GIFTS_TO_MINORS_ACT", e[e.PLAN_457 = 20] = "PLAN_457", e[e.PENSION = 21] = "PENSION", e[e.EMPLOYEE_STOCK_OWNERSHIP_PLAN = 22] = "EMPLOYEE_STOCK_OWNERSHIP_PLAN", e[e.SIMPLIFIED_EMPLOYEE_PENSION = 23] = "SIMPLIFIED_EMPLOYEE_PENSION", e[e.SIMPLE_IRA = 24] = "SIMPLE_IRA", e[e.BOAT = 25] = "BOAT", e[e.POWERSPORTS = 26] = "POWERSPORTS", e[e.RV = 27] = "RV", e[e.HELOC = 28] = "HELOC", e[e.PLAN_ROTH_401_K = 29] = "PLAN_ROTH_401_K", e[e.FIXED_ANNUITY = 30] = "FIXED_ANNUITY", e[e.VARIABLE_ANNUITY = 31] = "VARIABLE_ANNUITY", e[e.VEHICLE_INSURANCE = 32] = "VEHICLE_INSURANCE", e[e.DISABILITY = 33] = "DISABILITY", e[e.HEALTH = 34] = "HEALTH", e[e.LONG_TERM_CARE = 35] = "LONG_TERM_CARE", e[e.PROPERTY_AND_CASUALTY = 36] = "PROPERTY_AND_CASUALTY", e[e.UNIVERSAL_LIFE = 37] = "UNIVERSAL_LIFE", e[e.TERM_LIFE = 38] = "TERM_LIFE", e[e.WHOLE_LIFE = 39] = "WHOLE_LIFE", e[e.ACCIDENTAL_DEATH_AND_DISMEMBERMENT = 40] = "ACCIDENTAL_DEATH_AND_DISMEMBERMENT", e[e.VARIABLE_UNIVERSAL_LIFE = 41] = "VARIABLE_UNIVERSAL_LIFE", e[e.HSA = 42] = "HSA", e[e.TAX_FREE_SAVINGS_ACCOUNT = 43] = "TAX_FREE_SAVINGS_ACCOUNT", e[e.INDIVIDUAL = 44] = "INDIVIDUAL", e[e.REGISTERED_RETIREMENT_INCOME_FUND = 45] = "REGISTERED_RETIREMENT_INCOME_FUND", e[e.CASH_MANAGEMENT_ACCOUNT = 46] = "CASH_MANAGEMENT_ACCOUNT", e[e.EMPLOYEE_STOCK_PURCHASE_PLAN = 47] = "EMPLOYEE_STOCK_PURCHASE_PLAN", e[e.REGISTERED_EDUCATION_SAVINGS_PLAN = 48] = "REGISTERED_EDUCATION_SAVINGS_PLAN", e[e.PROFIT_SHARING_PLAN = 49] = "PROFIT_SHARING_PLAN", e[e.UNIFORM_TRANSFER_TO_MINORS_ACT = 50] = "UNIFORM_TRANSFER_TO_MINORS_ACT", e[e.PLAN_401_A = 51] = "PLAN_401_A", e[e.SARSEP_IRA = 52] = "SARSEP_IRA", e[e.FIXED_ANNUITY_TRADITIONAL_IRA = 53] = "FIXED_ANNUITY_TRADITIONAL_IRA", e[e.VARIABLE_ANNUITY_TRADITIONAL_IRA = 54] = "VARIABLE_ANNUITY_TRADITIONAL_IRA", e[e.SEPP_IRA = 55] = "SEPP_IRA", e[e.INHERITED_TRADITIONAL_IRA = 56] = "INHERITED_TRADITIONAL_IRA", e[e.FIXED_ANNUITY_ROTH_IRA = 57] = "FIXED_ANNUITY_ROTH_IRA", e[e.VARIABLE_ANNUITY_ROTH_IRA = 58] = "VARIABLE_ANNUITY_ROTH_IRA", e[e.INHERITED_ROTH_IRA = 59] = "INHERITED_ROTH_IRA", e[e.COVERDELL = 60] = "COVERDELL", e[e.ADVISORY_ACCOUNT = 61] = "ADVISORY_ACCOUNT", e[e.BROKERAGE_MARGIN = 62] = "BROKERAGE_MARGIN", e[e.CHARITABLE_GIFT_ACCOUNT = 63] = "CHARITABLE_GIFT_ACCOUNT", e[e.CHURCH_ACCOUNT = 64] = "CHURCH_ACCOUNT", e[e.CONSERVATORSHIP = 65] = "CONSERVATORSHIP", e[e.CUSTODIAL = 66] = "CUSTODIAL", e[e.DEFINED_BENEFIT_PLAN = 67] = "DEFINED_BENEFIT_PLAN", e[e.DEFINED_CONTRIBUTION_PLAN = 68] = "DEFINED_CONTRIBUTION_PLAN", e[e.EDUCATIONAL = 69] = "EDUCATIONAL", e[e.ESTATE = 70] = "ESTATE", e[e.EXECUTOR = 71] = "EXECUTOR", e[e.GROUP_RETIREMENT_SAVINGS_PLAN = 72] = "GROUP_RETIREMENT_SAVINGS_PLAN", e[e.GUARANTEED_INVESTMENT_CERTIFICATE = 73] = "GUARANTEED_INVESTMENT_CERTIFICATE", e[e.HRA = 74] = "HRA", e[e.INDEXED_ANNUITY = 75] = "INDEXED_ANNUITY", e[e.INVESTMENT_CLUB = 76] = "INVESTMENT_CLUB", e[e.IRREVOCABLE_TRUST = 77] = "IRREVOCABLE_TRUST", e[e.JOINT_TENANTS_BY_ENTIRITY = 78] = "JOINT_TENANTS_BY_ENTIRITY", e[e.JOINT_TENANTS_COMMUNITY_PROPERTY = 79] = "JOINT_TENANTS_COMMUNITY_PROPERTY", e[e.JOINT_TENANTS_IN_COMMON = 80] = "JOINT_TENANTS_IN_COMMON", e[e.JOINT_TENANTS_WITH_RIGHTS_OF_SURVIVORSHIP = 81] = "JOINT_TENANTS_WITH_RIGHTS_OF_SURVIVORSHIP", e[e.KEOUGH_PLAN = 82] = "KEOUGH_PLAN", e[e.LIFE_INCOME_FUND = 83] = "LIFE_INCOME_FUND", e[e.LIVING_TRUST = 84] = "LIVING_TRUST", e[e.LOCKED_IN_RETIREMENT_ACCOUNT = 85] = "LOCKED_IN_RETIREMENT_ACCOUNT", e[e.LOCKED_IN_RETIREMENT_INVESTMENT_FUND = 86] = "LOCKED_IN_RETIREMENT_INVESTMENT_FUND", e[e.LOCKED_IN_RETIREMENT_SAVINGS_ACCOUNT = 87] = "LOCKED_IN_RETIREMENT_SAVINGS_ACCOUNT", e[e.MONEY_PURCHASE_PLAN = 88] = "MONEY_PURCHASE_PLAN", e[e.PARTNERSHIP = 89] = "PARTNERSHIP", e[e.PLAN_409_A = 90] = "PLAN_409_A", e[e.PLAN_ROTH_403_B = 91] = "PLAN_ROTH_403_B", e[e.REGISTERED_DISABILITY_SAVINGS_PLAN = 92] = "REGISTERED_DISABILITY_SAVINGS_PLAN", e[e.REGISTERED_LOCKED_IN_SAVINGS_PLAN = 93] = "REGISTERED_LOCKED_IN_SAVINGS_PLAN", e[e.REGISTERED_PENSION_PLAN = 94] = "REGISTERED_PENSION_PLAN", e[e.REGISTERED_RETIREMENT_SAVINGS_PLAN = 95] = "REGISTERED_RETIREMENT_SAVINGS_PLAN", e[e.REVOCABLE_TRUST = 96] = "REVOCABLE_TRUST", e[e.ROTH_CONVERSION = 97] = "ROTH_CONVERSION", e[e.SOLE_PROPRIETORSHIP = 98] = "SOLE_PROPRIETORSHIP", e[e.SPOUSAL_IRA = 99] = "SPOUSAL_IRA", e[e.SPOUSAL_ROTH_IRA = 100] = "SPOUSAL_ROTH_IRA", e[e.TESTAMENTARY_TRUST = 101] = "TESTAMENTARY_TRUST", e[e.THRIFT_SAVINGS_PLAN = 102] = "THRIFT_SAVINGS_PLAN", e[e.INHERITED_ANNUITY = 103] = "INHERITED_ANNUITY", e[e.CORPORATE_ACCOUNT = 104] = "CORPORATE_ACCOUNT", e[e.LIMITED_LIABILITY_ACCOUNT = 105] = "LIMITED_LIABILITY_ACCOUNT", e[e.HSA_SAVINGS = 106] = "HSA_SAVINGS", e[e.HSA_CHECKING = 107] = "HSA_CHECKING", e))(qe || {}), ye = /* @__PURE__ */ ((e) => (e[e.REAL_ESTATE = 0] = "REAL_ESTATE", e[e.VEHICLE = 1] = "VEHICLE", e[e.ART = 2] = "ART", e[e.JEWELRY = 3] = "JEWELRY", e[e.FURNITURE = 4] = "FURNITURE", e[e.APPLIANCES = 5] = "APPLIANCES", e[e.COMPUTER = 6] = "COMPUTER", e[e.ELECTRONICS = 7] = "ELECTRONICS", e[e.SPORTS_EQUIPMENT = 8] = "SPORTS_EQUIPMENT", e[e.MISCELLANEOUS = 9] = "MISCELLANEOUS", e))(ye || {}), ue = /* @__PURE__ */ ((e) => (e[e.CREATED = 0] = "CREATED", e[e.PREVENTED = 1] = "PREVENTED", e[e.DENIED = 2] = "DENIED", e[e.CHALLENGED = 3] = "CHALLENGED", e[e.REJECTED = 4] = "REJECTED", e[e.LOCKED = 5] = "LOCKED", e[e.CONNECTED = 6] = "CONNECTED", e[e.IMPEDED = 7] = "IMPEDED", e[e.RECONNECTED = 8] = "RECONNECTED", e[e.DEGRADED = 9] = "DEGRADED", e[e.DISCONNECTED = 10] = "DISCONNECTED", e[e.DISCONTINUED = 11] = "DISCONTINUED", e[e.CLOSED = 12] = "CLOSED", e[e.DELAYED = 13] = "DELAYED", e[e.FAILED = 14] = "FAILED", e[e.UPDATED = 15] = "UPDATED", e[e.DISABLED = 16] = "DISABLED", e[e.IMPORTED = 17] = "IMPORTED", e[e.RESUMED = 18] = "RESUMED", e[e.EXPIRED = 19] = "EXPIRED", e[e.IMPAIRED = 20] = "IMPAIRED", e[e.PENDING = 21] = "PENDING", e))(ue || {});
|
|
110
|
+
const Li = [
|
|
111
|
+
0,
|
|
112
|
+
15,
|
|
113
|
+
18
|
|
114
|
+
/* RESUMED */
|
|
115
|
+
], ea = [
|
|
116
|
+
3,
|
|
117
|
+
4
|
|
118
|
+
/* REJECTED */
|
|
119
|
+
], aa = [
|
|
120
|
+
1,
|
|
121
|
+
2,
|
|
122
|
+
5,
|
|
123
|
+
7,
|
|
124
|
+
9,
|
|
125
|
+
10,
|
|
126
|
+
11,
|
|
127
|
+
12,
|
|
128
|
+
13,
|
|
129
|
+
14,
|
|
130
|
+
16,
|
|
131
|
+
17,
|
|
132
|
+
19,
|
|
133
|
+
20
|
|
134
|
+
/* IMPAIRED */
|
|
135
|
+
], fi = [...aa, ...ea];
|
|
136
|
+
var ia = /* @__PURE__ */ ((e) => (e.Connected = "Connected", e.Error = "Error", e.Processing = "Processing", e.RequiresMfa = "RequiresMfa", e))(ia || {});
|
|
137
|
+
const Di = {
|
|
138
|
+
3: "Challenged",
|
|
139
|
+
12: "Closed",
|
|
140
|
+
9: "Degraded",
|
|
141
|
+
13: "Delayed",
|
|
142
|
+
2: "Denied",
|
|
143
|
+
16: "Disabled",
|
|
144
|
+
10: "Disconnected",
|
|
145
|
+
11: "Discontinued",
|
|
146
|
+
19: "Expired",
|
|
147
|
+
14: "Failed",
|
|
148
|
+
20: "Impaired",
|
|
149
|
+
7: "Impeded",
|
|
150
|
+
17: "Imported",
|
|
151
|
+
5: "Locked",
|
|
152
|
+
1: "Prevented",
|
|
153
|
+
4: "Rejected"
|
|
154
|
+
}, hi = {
|
|
155
|
+
0: "Any",
|
|
156
|
+
9: "Cash",
|
|
157
|
+
1: "Checking",
|
|
158
|
+
12: "Checking Line of Credit",
|
|
159
|
+
4: "Credit Card",
|
|
160
|
+
13: "Digital Wallet",
|
|
161
|
+
10: "Insurance",
|
|
162
|
+
5: "Investment",
|
|
163
|
+
6: "Line of Credit",
|
|
164
|
+
3: "Loan",
|
|
165
|
+
7: "Mortgage",
|
|
166
|
+
11: "Prepaid",
|
|
167
|
+
8: "Property",
|
|
168
|
+
2: "Savings"
|
|
169
|
+
}, Pi = {
|
|
170
|
+
0: "account_balance",
|
|
171
|
+
9: "monetization_on",
|
|
172
|
+
1: "checkbook",
|
|
173
|
+
12: "checkbook",
|
|
174
|
+
// Checking line of credit has the same icon as checking
|
|
175
|
+
4: "credit_card",
|
|
176
|
+
13: "wallet",
|
|
177
|
+
10: "monitor_heart",
|
|
178
|
+
5: "trending_up",
|
|
179
|
+
6: "add_credit",
|
|
180
|
+
3: "loans",
|
|
181
|
+
7: "house",
|
|
182
|
+
11: "credit_card",
|
|
183
|
+
8: "key",
|
|
184
|
+
2: "savings"
|
|
185
|
+
}, gi = {
|
|
186
|
+
5: "bid_landscape"
|
|
187
|
+
}, Mi = {
|
|
188
|
+
0: "Real Estate",
|
|
189
|
+
1: "Vehicle",
|
|
190
|
+
2: "Art",
|
|
191
|
+
3: "Jewelry",
|
|
192
|
+
4: "Furniture",
|
|
193
|
+
5: "Appliances",
|
|
194
|
+
6: "Computer",
|
|
195
|
+
7: "Electronics",
|
|
196
|
+
8: "Sports Equipment",
|
|
197
|
+
9: "Miscellaneous"
|
|
198
|
+
}, mi = {
|
|
199
|
+
0: "home_work",
|
|
200
|
+
1: "directions_car",
|
|
201
|
+
2: "insert_photo",
|
|
202
|
+
3: "diamond",
|
|
203
|
+
4: "chair",
|
|
204
|
+
5: "kitchen",
|
|
205
|
+
6: "computer",
|
|
206
|
+
7: "camera_alt",
|
|
207
|
+
8: "sports_baseball",
|
|
208
|
+
9: "monetization_on"
|
|
209
|
+
}, Ui = [
|
|
210
|
+
R.ANY,
|
|
211
|
+
R.CASH,
|
|
212
|
+
R.CHECKING,
|
|
213
|
+
R.DIGITAL_WALLET,
|
|
214
|
+
R.PREPAID,
|
|
215
|
+
R.SAVINGS
|
|
216
|
+
], Gi = [
|
|
217
|
+
R.CHECKING_LINE_OF_CREDIT,
|
|
218
|
+
R.CREDIT_CARD,
|
|
219
|
+
R.LINE_OF_CREDIT,
|
|
220
|
+
R.LOAN,
|
|
221
|
+
R.MORTGAGE
|
|
222
|
+
], Hi = [
|
|
223
|
+
R.ANY,
|
|
224
|
+
R.CASH,
|
|
225
|
+
R.CHECKING,
|
|
226
|
+
R.CHECKING_LINE_OF_CREDIT,
|
|
227
|
+
R.CREDIT_CARD,
|
|
228
|
+
R.DIGITAL_WALLET,
|
|
229
|
+
R.LINE_OF_CREDIT,
|
|
230
|
+
R.PREPAID,
|
|
231
|
+
R.SAVINGS
|
|
232
|
+
], a = {
|
|
233
|
+
// Top-level categories
|
|
234
|
+
AUTO_AND_TRANSPORT: "CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874",
|
|
235
|
+
BILLS_AND_UTILITIES: "CAT-79b02f2f-2adc-88f0-ac2b-4e71ead9cfc8",
|
|
236
|
+
BUSINESS_SERVICES: "CAT-94b11142-e97b-941a-f67f-6e18d246a23f",
|
|
237
|
+
EDUCATION: "CAT-bf5c9cca-c96b-b50d-440d-38d9adfda5b0",
|
|
238
|
+
ENTERTAINMENT: "CAT-e04e9d1e-e041-c315-2e50-094143ab3f73",
|
|
239
|
+
FEES_AND_CHARGES: "CAT-d73ee74b-13a4-ac3e-4015-fc4ba9a62b2a",
|
|
240
|
+
FINANCIAL: "CAT-6c7de3f8-de6c-7061-1dd2-b093044014bf",
|
|
241
|
+
FOOD_AND_DINING: "CAT-bd56d35a-a9a7-6e10-66c1-5b9cc1b6c81a",
|
|
242
|
+
GIFTS_AND_DONATIONS: "CAT-8edf9663-623e-4735-490e-31288f0a70b0",
|
|
243
|
+
HEALTH_AND_FITNESS: "CAT-52fa4693-c088-afb2-2a99-7bc39bb23a0f",
|
|
244
|
+
HOME: "CAT-b709172b-4eb7-318e-3b5d-e0f0500b32ac",
|
|
245
|
+
INCOME: "CAT-bf9f3294-4c40-1677-d269-54fbc189faf3",
|
|
246
|
+
INVESTMENTS: "CAT-ccd42390-9e8c-3fb6-a5d9-6c31182d9c5c",
|
|
247
|
+
KIDS: "CAT-0cb1d99d-f558-99e3-2282-b31f359b411a",
|
|
248
|
+
PERSONAL_CARE: "CAT-e5154228-fe45-790d-a280-f6bf5ae5ac9f",
|
|
249
|
+
PETS: "CAT-7cccbafa-87d7-c9a6-661b-8b3402fe9e78",
|
|
250
|
+
SHOPPING: "CAT-aad51b46-d6f7-3da5-fd6e-492328b3023f",
|
|
251
|
+
TAXES: "CAT-d00fc539-aa14-009b-4ffb-7e8c7b839954",
|
|
252
|
+
TRANSFER: "CAT-bce48142-fea4-ff45-20d9-0a642d44de83",
|
|
253
|
+
TRAVEL: "CAT-ea23d844-cbd1-eb10-f6ac-0df9610e59ae",
|
|
254
|
+
UNCATEGORIZED: "CAT-d7851c65-3353-e490-1953-fb9235e681e4",
|
|
255
|
+
// Subcategories
|
|
256
|
+
LOCAL_TAX: "CAT-0bbdacce-ba14-3e73-e1aa-cc64e671575c",
|
|
257
|
+
WITHDRAWAL: "CAT-00c762a2-be42-c735-2d3f-b14a1e58453f",
|
|
258
|
+
TRADE_COMMISSIONS: "CAT-1a01ddd4-9a37-b96b-33dc-6c68457e7806",
|
|
259
|
+
BABYSITTER_DAYCARE: "CAT-2ba97a5c-a371-3b4f-d018-cba64bb9767a",
|
|
260
|
+
CHILD_SUPPORT: "CAT-2cb0a3a8-3f05-9325-1203-27ed2d619dce",
|
|
261
|
+
CREDIT_CARD_PAYMENT: "CAT-2cc9b500-e09d-88be-e3e0-0a8a82a54586",
|
|
262
|
+
STUDENT_LOAN: "CAT-2ce4972e-5620-57be-8475-d084edf88888",
|
|
263
|
+
LIFE_INSURANCE: "CAT-2cf64b94-e966-0949-0d07-b211080ddaa6",
|
|
264
|
+
PRINTING: "CAT-3b09fb0b-3296-c76c-2bbd-a2bce0012d83",
|
|
265
|
+
FINANCIAL_ADVISOR: "CAT-3db5697d-5dce-6bd9-c08f-5065b25e96c8",
|
|
266
|
+
INTEREST_INCOME: "CAT-5aa555dc-a071-c727-8d04-cb337832d342",
|
|
267
|
+
LATE_FEE: "CAT-5bfddc95-a506-b1d2-0f73-63b1afeddb91",
|
|
268
|
+
LAWN_GARDEN: "CAT-5cc7f5e2-3f2e-61ce-52e7-4acf366c2ee3",
|
|
269
|
+
FINANCE_CHARGE: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
|
|
270
|
+
FRAUD_PROTECTION: "CAT-5f7f2084-6f8a-d927-6fa7-8e699912432a",
|
|
271
|
+
MOVIES_DVDS: "CAT-6ab65efd-36e4-69ca-969a-a7304d05240a",
|
|
272
|
+
HOME_INSURANCE: "CAT-6cb40bc6-0c0d-6fae-db3b-62a6bc4bb1a2",
|
|
273
|
+
CASH: "CAT-08a5d861-2890-686e-ebaf-d7632ec88540",
|
|
274
|
+
TUITION: "CAT-8b01fafd-9bf5-7999-49c9-cb67da50b14d",
|
|
275
|
+
HEALTH_INSURANCE: "CAT-8faa2a11-f393-9c13-2885-e7d11fa6a51a",
|
|
276
|
+
DIVIDEND_CAP_GAINS: "CAT-9b21122f-bd17-97ce-ef5c-3f034e75fd6c",
|
|
277
|
+
ALCOHOL_BARS: "CAT-9d58b17b-0982-18b5-5a6e-8a76337c4f88",
|
|
278
|
+
LEGAL: "CAT-13c1e57c-3749-41b4-3bc4-b1b334adab85",
|
|
279
|
+
PUBLIC_TRANSPORTATION: "CAT-19e6ec13-83ed-5511-7f75-3688d3f97a8e",
|
|
280
|
+
MORTGAGE_RENT: "CAT-23b4b4c6-5fbb-9299-b887-4b56196e6fb4",
|
|
281
|
+
HOTEL: "CAT-28be9904-9f4c-c4af-d2b7-bb24763ae0ae",
|
|
282
|
+
TRANSFER_FOR_CASH_SPENDING: "CAT-28d5fc92-cb41-8daa-3ab7-6f7bbde118fb",
|
|
283
|
+
UTILITIES: "CAT-56a2979d-d6df-25da-f357-06282f08208e",
|
|
284
|
+
DEPOSIT: "CAT-58aced66-6d70-4024-7667-77e98b6e5805",
|
|
285
|
+
HOME_PHONE: "CAT-60d81dd3-8ac1-a6fb-b181-b736dbb42be3",
|
|
286
|
+
SERVICE_PARTS: "CAT-67a20fb1-1a61-dc27-3fff-f28fa904025f",
|
|
287
|
+
INTERNET: "CAT-78d29c63-54db-197d-9851-feeb94cf6e10",
|
|
288
|
+
BOOKS: "CAT-80a40aa1-9f7e-2393-0dfe-b222dc8099a2",
|
|
289
|
+
NEWSPAPERS_MAGAZINES: "CAT-84f5a582-f620-bea1-fb2c-a746094e9955",
|
|
290
|
+
FAST_FOOD: "CAT-88cbb033-0fc1-ff06-6532-0f357c0f5081",
|
|
291
|
+
COFFEE_SHOPS: "CAT-93ebd80b-4801-cf52-e844-91594ed4c217",
|
|
292
|
+
SELL: "CAT-095e8e70-f5fa-9e68-8187-6cac76d14f85",
|
|
293
|
+
OFFICE_SUPPLIES: "CAT-97a2b899-5a32-4196-b87c-a8e65d8a9849",
|
|
294
|
+
PET_GROOMING: "CAT-99b03e0f-c678-268b-a97c-81092e68efab",
|
|
295
|
+
AMUSEMENT: "CAT-163c92ab-5ac1-3125-6a0b-c3aff5cdbb59",
|
|
296
|
+
BOOKS_SUPPLIES: "CAT-167d816f-c68e-9988-e064-173dc6417a90",
|
|
297
|
+
VACATION: "CAT-206fbc35-a569-c89a-30be-a3b65d0fbea7",
|
|
298
|
+
SERVICE_FEE: "CAT-386e01dd-8cc0-a433-f4a9-b3a2d153abbf",
|
|
299
|
+
GIFT: "CAT-465a2e70-099b-dc43-4422-913c21311002",
|
|
300
|
+
CHARITY: "CAT-583f1ede-3608-3ec6-b39b-0874198626ed",
|
|
301
|
+
PARKING: "CAT-726da718-d572-1e4d-7c3f-0b8b5370fe71",
|
|
302
|
+
SHIPPING: "CAT-748efd05-e27a-5c79-1217-681a0ec5cc67",
|
|
303
|
+
ARTS: "CAT-967a9441-5694-9419-6b40-67f15cd55fe4",
|
|
304
|
+
PAYCHECK: "CAT-982ea9e6-3f0e-0c5b-611b-6657a10ba819",
|
|
305
|
+
FURNISHINGS: "CAT-2910e436-7fed-f922-184c-60bc1b6c5417",
|
|
306
|
+
RESTAURANTS: "CAT-006862be-64a0-e778-f035-0936445b9c16",
|
|
307
|
+
SPA_MASSAGE: "CAT-8008cdab-ba5c-26e9-310d-a3ff4afeeb62",
|
|
308
|
+
RENTAL_CAR_TAXI: "CAT-9588eaad-90a4-bb5c-66c8-1812503d0db8",
|
|
309
|
+
ALLOWANCE: "CAT-9961e379-d9e9-490c-1c4b-bfa233899167",
|
|
310
|
+
BANKING_FEE: "CAT-30283e5b-f0fb-d8ab-a9fd-de992b508eac",
|
|
311
|
+
BUY: "CAT-70215a5e-bd15-e0ac-3842-058b5e8e99b7",
|
|
312
|
+
STATE_TAX: "CAT-7248227b-303e-ee19-e30c-c4f389da169b",
|
|
313
|
+
TOYS: "CAT-7524310a-da68-ac09-2312-71ca60a40ec0",
|
|
314
|
+
KIDS_ACTIVITIES: "CAT-32012156-b11d-a1db-9697-b15432e18215",
|
|
315
|
+
RENTAL_INCOME: "CAT-67070667-8b54-b450-4e84-5f8da2d70d85",
|
|
316
|
+
VETERINARY: "CAT-71380790-762a-6e2a-d79e-d7f47689af25",
|
|
317
|
+
SPORTING_GOODS: "CAT-a9abd9b1-2e2c-4236-040d-fb414d334419",
|
|
318
|
+
LAUNDRY: "CAT-a9fb2085-ce57-a196-4cbd-338c85bae0b0",
|
|
319
|
+
CLOTHING: "CAT-a96c2e17-f69a-9805-34aa-633276a42cec",
|
|
320
|
+
PHARMACY: "CAT-a5600b35-c9b1-347d-f678-781597851104",
|
|
321
|
+
HOME_SERVICES: "CAT-a64154ee-d5e9-09c7-d5f1-59b3273c6e3c",
|
|
322
|
+
ATM_FEE: "CAT-ac2eba3a-100a-30ac-09c3-d7d88415ca1a",
|
|
323
|
+
HAIR: "CAT-af671119-50a2-636c-ddfe-c794c38e8181",
|
|
324
|
+
GROCERIES: "CAT-b1de2a04-db08-b6ed-f6fe-ca2f5b11c2d0",
|
|
325
|
+
GAS: "CAT-b6d63a19-30a7-e852-2703-bdfb4072289e",
|
|
326
|
+
FEDERAL_TAX: "CAT-b8cc4011-cdc9-10b0-b79d-bf1d534296dc",
|
|
327
|
+
HOSTING: "CAT-b74fdd98-4391-8015-eafa-e9ca0fad3bee",
|
|
328
|
+
TELEVISION: "CAT-b316e683-c898-6497-a476-6bc48d12e51d",
|
|
329
|
+
MOBILE_PHONE: "CAT-b4789667-6acc-a112-975e-15746003ed61",
|
|
330
|
+
BABY_SUPPLIES: "CAT-c9c99041-e009-4a45-4b1d-fa92daeb5dd4",
|
|
331
|
+
MUSIC: "CAT-c874ccff-d069-40df-d7c5-ddba6fbdd225",
|
|
332
|
+
MORTGAGE_PAYMENT: "CAT-c94442a5-a762-8830-4c80-2a2f6a79e627",
|
|
333
|
+
SPORTS: "CAT-cb3de962-ea82-27a9-d096-c232caeb96bd",
|
|
334
|
+
AUTO_PAYMENT: "CAT-cb93691a-684d-b326-4c32-f8abaecfde90",
|
|
335
|
+
GYM: "CAT-cd9f9f60-622d-0488-d203-044c8726a7eb",
|
|
336
|
+
REIMBURSEMENT: "CAT-ce7b7bc8-71b7-9f41-af10-b8c2d5bafc37",
|
|
337
|
+
AIR_TRAVEL: "CAT-cf82d772-fbe2-4658-303a-f4cd13d9c3c2",
|
|
338
|
+
EYECARE: "CAT-cf183729-fb60-d16a-32d0-2e1d21ff21cd",
|
|
339
|
+
HOBBIES: "CAT-d1e54c52-80cc-01ba-3907-5bbdaa0ff521",
|
|
340
|
+
SALES_TAX: "CAT-d1244982-f8d0-09b8-77bb-6495c6e0c12a",
|
|
341
|
+
ELECTRONICS_SOFTWARE: "CAT-db5d480c-5130-b42e-def4-f6dabf9c1d10",
|
|
342
|
+
DOCTOR: "CAT-db6391b3-c218-fbe5-e496-139dca993645",
|
|
343
|
+
RETURNED_PURCHASE: "CAT-dc201021-6aa2-636b-f041-8577e6f1bc73",
|
|
344
|
+
HOME_IMPROVEMENT: "CAT-ddc9b8e0-a9a1-e31e-a467-2c33e553afd9",
|
|
345
|
+
AUTO_INSURANCE: "CAT-de7c2dc7-90e6-85a2-6509-5ec10942e887",
|
|
346
|
+
PROPERTY_TAX: "CAT-dfdf9324-3c48-589d-8886-bb21bb73b5d6",
|
|
347
|
+
DOMAIN_NAMES: "CAT-e7c5ebc7-f73d-955a-db06-3724bbcf6faa",
|
|
348
|
+
HOME_SUPPLIES: "CAT-e671e3a1-b7cb-f0a9-ac6e-bc4632245c31",
|
|
349
|
+
ADVERTISING: "CAT-e6682ebe-f239-c654-8233-0970b94cc162",
|
|
350
|
+
CHECK: "CAT-ea6db36f-3985-719d-1304-ccb7eeef5ecc",
|
|
351
|
+
DENTIST: "CAT-ee48b740-c981-778b-3c02-04540dec0262",
|
|
352
|
+
BONUS: "CAT-f52f2a88-2cb6-04e4-e36a-58f7b7c6a798",
|
|
353
|
+
PET_FOOD_SUPPLIES: "CAT-fbcdb437-2533-2857-1d1a-0624c9d9e1dc"
|
|
354
|
+
}, Fi = [
|
|
355
|
+
a.CREDIT_CARD_PAYMENT,
|
|
356
|
+
a.MORTGAGE_PAYMENT,
|
|
357
|
+
a.AUTO_PAYMENT
|
|
358
|
+
], Vi = {
|
|
359
|
+
// Top-level categories
|
|
360
|
+
[a.AUTO_AND_TRANSPORT]: "Auto & Transport",
|
|
361
|
+
[a.BILLS_AND_UTILITIES]: "Bills & Utilities",
|
|
362
|
+
[a.BUSINESS_SERVICES]: "Business Services",
|
|
363
|
+
[a.EDUCATION]: "Education",
|
|
364
|
+
[a.ENTERTAINMENT]: "Entertainment",
|
|
365
|
+
[a.FEES_AND_CHARGES]: "Fees & Charges",
|
|
366
|
+
[a.FINANCIAL]: "Financial",
|
|
367
|
+
[a.FOOD_AND_DINING]: "Food & Dining",
|
|
368
|
+
[a.GIFTS_AND_DONATIONS]: "Gifts & Donations",
|
|
369
|
+
[a.HEALTH_AND_FITNESS]: "Health & Fitness",
|
|
370
|
+
[a.HOME]: "Home",
|
|
371
|
+
[a.INCOME]: "Income",
|
|
372
|
+
[a.INVESTMENTS]: "Investments",
|
|
373
|
+
[a.KIDS]: "Kids",
|
|
374
|
+
[a.PERSONAL_CARE]: "Personal Care",
|
|
375
|
+
[a.PETS]: "Pets",
|
|
376
|
+
[a.SHOPPING]: "Shopping",
|
|
377
|
+
[a.TAXES]: "Taxes",
|
|
378
|
+
[a.TRANSFER]: "Transfer",
|
|
379
|
+
[a.TRAVEL]: "Travel",
|
|
380
|
+
[a.UNCATEGORIZED]: "Uncategorized",
|
|
381
|
+
// Subcategories
|
|
382
|
+
[a.LOCAL_TAX]: "Local Tax",
|
|
383
|
+
[a.WITHDRAWAL]: "Withdrawal",
|
|
384
|
+
[a.TRADE_COMMISSIONS]: "Trade Commissions",
|
|
385
|
+
[a.BABYSITTER_DAYCARE]: "Babysitter & Daycare",
|
|
386
|
+
[a.CHILD_SUPPORT]: "Child Support",
|
|
387
|
+
[a.CREDIT_CARD_PAYMENT]: "Credit Card Payment",
|
|
388
|
+
[a.STUDENT_LOAN]: "Student Loan",
|
|
389
|
+
[a.LIFE_INSURANCE]: "Life Insurance",
|
|
390
|
+
[a.PRINTING]: "Printing",
|
|
391
|
+
[a.FINANCIAL_ADVISOR]: "Financial Advisor",
|
|
392
|
+
[a.INTEREST_INCOME]: "Interest Income",
|
|
393
|
+
[a.LATE_FEE]: "Late Fee",
|
|
394
|
+
[a.LAWN_GARDEN]: "Lawn & Garden",
|
|
395
|
+
[a.FINANCE_CHARGE]: "Finance Charge",
|
|
396
|
+
[a.FRAUD_PROTECTION]: "Fraud Protection",
|
|
397
|
+
[a.MOVIES_DVDS]: "Movies & DVDs",
|
|
398
|
+
[a.HOME_INSURANCE]: "Home Insurance",
|
|
399
|
+
[a.CASH]: "Cash",
|
|
400
|
+
[a.TUITION]: "Tuition",
|
|
401
|
+
[a.HEALTH_INSURANCE]: "Health Insurance",
|
|
402
|
+
[a.DIVIDEND_CAP_GAINS]: "Dividend & Cap Gains",
|
|
403
|
+
[a.ALCOHOL_BARS]: "Alcohol & Bars",
|
|
404
|
+
[a.LEGAL]: "Legal",
|
|
405
|
+
[a.PUBLIC_TRANSPORTATION]: "Public Transportation",
|
|
406
|
+
[a.MORTGAGE_RENT]: "Mortgage & Rent",
|
|
407
|
+
[a.HOTEL]: "Hotel",
|
|
408
|
+
[a.TRANSFER_FOR_CASH_SPENDING]: "Transfer for Cash Spending",
|
|
409
|
+
[a.UTILITIES]: "Utilities",
|
|
410
|
+
[a.DEPOSIT]: "Deposit",
|
|
411
|
+
[a.HOME_PHONE]: "Home Phone",
|
|
412
|
+
[a.SERVICE_PARTS]: "Service Parts",
|
|
413
|
+
[a.INTERNET]: "Internet",
|
|
414
|
+
[a.BOOKS]: "Books",
|
|
415
|
+
[a.NEWSPAPERS_MAGAZINES]: "Newspapers & Magazines",
|
|
416
|
+
[a.FAST_FOOD]: "Fast Food",
|
|
417
|
+
[a.COFFEE_SHOPS]: "Coffee Shops",
|
|
418
|
+
[a.SELL]: "Sell",
|
|
419
|
+
[a.OFFICE_SUPPLIES]: "Office Supplies",
|
|
420
|
+
[a.PET_GROOMING]: "Pet Grooming",
|
|
421
|
+
[a.AMUSEMENT]: "Amusement",
|
|
422
|
+
[a.BOOKS_SUPPLIES]: "Books & Supplies",
|
|
423
|
+
[a.VACATION]: "Vacation",
|
|
424
|
+
[a.SERVICE_FEE]: "Service Fee",
|
|
425
|
+
[a.GIFT]: "Gift",
|
|
426
|
+
[a.CHARITY]: "Charity",
|
|
427
|
+
[a.PARKING]: "Parking",
|
|
428
|
+
[a.SHIPPING]: "Shipping",
|
|
429
|
+
[a.ARTS]: "Arts",
|
|
430
|
+
[a.PAYCHECK]: "Paycheck",
|
|
431
|
+
[a.FURNISHINGS]: "Furnishings",
|
|
432
|
+
[a.RESTAURANTS]: "Restaurants",
|
|
433
|
+
[a.SPA_MASSAGE]: "Spa & Massage",
|
|
434
|
+
[a.RENTAL_CAR_TAXI]: "Rental Car & Taxi",
|
|
435
|
+
[a.ALLOWANCE]: "Allowance",
|
|
436
|
+
[a.BANKING_FEE]: "Banking Fee",
|
|
437
|
+
[a.BUY]: "Buy",
|
|
438
|
+
[a.STATE_TAX]: "State Tax",
|
|
439
|
+
[a.TOYS]: "Toys",
|
|
440
|
+
[a.KIDS_ACTIVITIES]: "Kids Activities",
|
|
441
|
+
[a.RENTAL_INCOME]: "Rental Income",
|
|
442
|
+
[a.VETERINARY]: "Veterinary",
|
|
443
|
+
[a.SPORTING_GOODS]: "Sporting Goods",
|
|
444
|
+
[a.LAUNDRY]: "Laundry",
|
|
445
|
+
[a.CLOTHING]: "Clothing",
|
|
446
|
+
[a.PHARMACY]: "Pharmacy",
|
|
447
|
+
[a.HOME_SERVICES]: "Home Services",
|
|
448
|
+
[a.ATM_FEE]: "ATM Fee",
|
|
449
|
+
[a.HAIR]: "Hair",
|
|
450
|
+
[a.GROCERIES]: "Groceries",
|
|
451
|
+
[a.GAS]: "Gas",
|
|
452
|
+
[a.FEDERAL_TAX]: "Federal Tax",
|
|
453
|
+
[a.HOSTING]: "Hosting",
|
|
454
|
+
[a.TELEVISION]: "Television",
|
|
455
|
+
[a.MOBILE_PHONE]: "Mobile Phone",
|
|
456
|
+
[a.BABY_SUPPLIES]: "Baby Supplies",
|
|
457
|
+
[a.MUSIC]: "Music",
|
|
458
|
+
[a.MORTGAGE_PAYMENT]: "Mortgage Payment",
|
|
459
|
+
[a.SPORTS]: "Sports",
|
|
460
|
+
[a.AUTO_PAYMENT]: "Auto Payment",
|
|
461
|
+
[a.GYM]: "Gym",
|
|
462
|
+
[a.REIMBURSEMENT]: "Reimbursement",
|
|
463
|
+
[a.AIR_TRAVEL]: "Air Travel",
|
|
464
|
+
[a.EYECARE]: "Eyecare",
|
|
465
|
+
[a.HOBBIES]: "Hobbies",
|
|
466
|
+
[a.SALES_TAX]: "Sales Tax",
|
|
467
|
+
[a.ELECTRONICS_SOFTWARE]: "Electronics & Software",
|
|
468
|
+
[a.DOCTOR]: "Doctor",
|
|
469
|
+
[a.RETURNED_PURCHASE]: "Returned Purchase",
|
|
470
|
+
[a.HOME_IMPROVEMENT]: "Home Improvement",
|
|
471
|
+
[a.AUTO_INSURANCE]: "Auto Insurance",
|
|
472
|
+
[a.PROPERTY_TAX]: "Property Tax",
|
|
473
|
+
[a.DOMAIN_NAMES]: "Domain Names",
|
|
474
|
+
[a.HOME_SUPPLIES]: "Home Supplies",
|
|
475
|
+
[a.ADVERTISING]: "Advertising",
|
|
476
|
+
[a.CHECK]: "Check",
|
|
477
|
+
[a.DENTIST]: "Dentist",
|
|
478
|
+
[a.BONUS]: "Bonus",
|
|
479
|
+
[a.PET_FOOD_SUPPLIES]: "Pet Food & Supplies"
|
|
480
|
+
}, Bi = {
|
|
481
|
+
[a.AUTO_AND_TRANSPORT]: "#4B9DBC",
|
|
482
|
+
[a.BILLS_AND_UTILITIES]: "#EF9B2C",
|
|
483
|
+
[a.BUSINESS_SERVICES]: "#B3DE8C",
|
|
484
|
+
[a.EDUCATION]: "#F8AB3A",
|
|
485
|
+
[a.ENTERTAINMENT]: "#AB5B89",
|
|
486
|
+
[a.FEES_AND_CHARGES]: "#FF9696",
|
|
487
|
+
[a.FINANCIAL]: "#6BCDDB",
|
|
488
|
+
[a.FOOD_AND_DINING]: "#58AC7B",
|
|
489
|
+
[a.GIFTS_AND_DONATIONS]: "#347AA5",
|
|
490
|
+
[a.HEALTH_AND_FITNESS]: "#5C446E",
|
|
491
|
+
[a.HOME]: "#FFD84D",
|
|
492
|
+
[a.INCOME]: "#133F49",
|
|
493
|
+
[a.INVESTMENTS]: "#FF7070",
|
|
494
|
+
[a.KIDS]: "#82D196",
|
|
495
|
+
[a.PERSONAL_CARE]: "#338B7A",
|
|
496
|
+
[a.PETS]: "#615BAB",
|
|
497
|
+
[a.SHOPPING]: "#CF5F84",
|
|
498
|
+
[a.TAXES]: "#32588D",
|
|
499
|
+
[a.TRANSFER]: "#959CA6",
|
|
500
|
+
[a.TRAVEL]: "#E37434",
|
|
501
|
+
[a.UNCATEGORIZED]: "#FA5555"
|
|
502
|
+
}, wi = {
|
|
503
|
+
[a.AUTO_AND_TRANSPORT]: "directions_car",
|
|
504
|
+
[a.BILLS_AND_UTILITIES]: "electrical_services",
|
|
505
|
+
[a.BUSINESS_SERVICES]: "business_center",
|
|
506
|
+
[a.EDUCATION]: "school",
|
|
507
|
+
[a.ENTERTAINMENT]: "stadium",
|
|
508
|
+
[a.FEES_AND_CHARGES]: "problem",
|
|
509
|
+
[a.FINANCIAL]: "price_check",
|
|
510
|
+
[a.FOOD_AND_DINING]: "grocery",
|
|
511
|
+
[a.GIFTS_AND_DONATIONS]: "featured_seasonal_and_gifts",
|
|
512
|
+
[a.HEALTH_AND_FITNESS]: "ecg_heart",
|
|
513
|
+
[a.HOME]: "cottage",
|
|
514
|
+
[a.INCOME]: "monetization_on",
|
|
515
|
+
[a.INVESTMENTS]: "bid_landscape",
|
|
516
|
+
[a.KIDS]: "face",
|
|
517
|
+
[a.PERSONAL_CARE]: "volunteer_activism",
|
|
518
|
+
[a.PETS]: "pet_supplies",
|
|
519
|
+
[a.SHOPPING]: "shopping_cart",
|
|
520
|
+
[a.TAXES]: "heap_snapshot_large",
|
|
521
|
+
[a.TRANSFER]: "compare_arrows",
|
|
522
|
+
[a.TRAVEL]: "airplane_ticket",
|
|
523
|
+
[a.UNCATEGORIZED]: "category",
|
|
524
|
+
UNKNOWN: "help"
|
|
525
|
+
}, Ea = /(?<static>.*?)(?<dynamic>(?:_\d+{(?:.*?)}))|(?<staticEnd>.+)/g, ce = (e, ...E) => {
|
|
526
|
+
if (!e) return "";
|
|
527
|
+
const i = E.some((r) => typeof r != "string"), _ = [...e.matchAll(Ea)].reduce(
|
|
528
|
+
(r, s, N) => {
|
|
529
|
+
const A = [...r], o = s.groups;
|
|
530
|
+
if (o?.static && A.push(o.static), o?.dynamic) {
|
|
531
|
+
const C = o.dynamic.indexOf("{"), c = o.dynamic.substring(C + 1, o.dynamic.length - 1), n = Number(o.dynamic.substring(1, C));
|
|
532
|
+
if (d.isValidElement(E[n - 1])) {
|
|
533
|
+
const T = E[n - 1], l = d.cloneElement(T, {
|
|
534
|
+
key: `${c}-${N}`
|
|
535
|
+
});
|
|
536
|
+
A.push(l);
|
|
537
|
+
} else
|
|
538
|
+
A.push(E[n - 1]);
|
|
539
|
+
}
|
|
540
|
+
return o?.staticEnd && A.push(o.staticEnd), A;
|
|
541
|
+
},
|
|
542
|
+
[]
|
|
543
|
+
);
|
|
544
|
+
return i ? _ : _.join("");
|
|
545
|
+
}, Wi = (e, E, i, ...t) => !e || !E ? "" : ce(i === 1 ? e : E, ...t), ta = () => (window?.app?.options?.language || document.querySelector("html")?.getAttribute("lang") || "en-US").toLowerCase();
|
|
546
|
+
class y {
|
|
547
|
+
endpoint = "/";
|
|
548
|
+
headers = {};
|
|
549
|
+
constructor(E, i) {
|
|
550
|
+
this.endpoint = E, this.headers = {
|
|
551
|
+
Accept: "application/json",
|
|
552
|
+
"Accept-Language": ta(),
|
|
553
|
+
"Content-Type": "application/json",
|
|
554
|
+
"MD-Session-Token": i
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
get = async (E) => {
|
|
558
|
+
const i = {
|
|
559
|
+
method: "GET",
|
|
560
|
+
headers: this.headers
|
|
561
|
+
};
|
|
562
|
+
return fetch(`${this.endpoint}${E}`, i).then((t) => {
|
|
563
|
+
if (t.ok)
|
|
564
|
+
return t.text();
|
|
565
|
+
throw t;
|
|
566
|
+
}).then((t) => t.length ? JSON.parse(t) : {}).then((t) => t).catch((t) => {
|
|
567
|
+
throw k.notify(t), t;
|
|
568
|
+
});
|
|
569
|
+
};
|
|
570
|
+
post = async (E, i) => {
|
|
571
|
+
const t = i ? JSON.stringify(i) : void 0, _ = {
|
|
572
|
+
method: "POST",
|
|
573
|
+
headers: this.headers,
|
|
574
|
+
body: t
|
|
575
|
+
};
|
|
576
|
+
return fetch(`${this.endpoint}${E}`, _).then((r) => {
|
|
577
|
+
if (!r.ok)
|
|
578
|
+
throw r;
|
|
579
|
+
return r.text();
|
|
580
|
+
}).then((r) => r.length ? JSON.parse(r) : {}).then((r) => r).catch((r) => {
|
|
581
|
+
throw k.notify(r), r;
|
|
582
|
+
});
|
|
583
|
+
};
|
|
584
|
+
put = async (E, i) => {
|
|
585
|
+
const t = JSON.stringify(i), _ = {
|
|
586
|
+
method: "PUT",
|
|
587
|
+
headers: this.headers,
|
|
588
|
+
body: t
|
|
589
|
+
};
|
|
590
|
+
return fetch(`${this.endpoint}${E}`, _).then((r) => r.ok ? r.text() : r.text().then((s) => {
|
|
591
|
+
throw new Error(s);
|
|
592
|
+
})).then((r) => r.length ? JSON.parse(r) : {}).then((r) => r).catch((r) => {
|
|
593
|
+
throw k.notify(r), r;
|
|
594
|
+
});
|
|
595
|
+
};
|
|
596
|
+
delete = async (E) => {
|
|
597
|
+
const i = {
|
|
598
|
+
method: "DELETE",
|
|
599
|
+
headers: this.headers
|
|
600
|
+
};
|
|
601
|
+
return fetch(`${this.endpoint}${E}`, i).then((t) => t.ok ? t.text() : t.text().then((_) => {
|
|
602
|
+
throw new Error(_);
|
|
603
|
+
})).then((t) => t.length ? JSON.parse(t) : {}).then((t) => t).catch((t) => {
|
|
604
|
+
throw k.notify(t), t;
|
|
605
|
+
});
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
class ra {
|
|
609
|
+
fetchInstance;
|
|
610
|
+
constructor(E, i) {
|
|
611
|
+
this.fetchInstance = new y(E, i);
|
|
612
|
+
}
|
|
613
|
+
initializeAnalyticsSession = async (E, i) => {
|
|
614
|
+
const t = Ze.getParser(window.navigator.userAgent), { analytics_session: _ } = await this.fetchInstance.post(H.ANALYTICS_SESSION, {
|
|
615
|
+
browser_name: t.getBrowserName() || "Unknown",
|
|
616
|
+
browser_version: t.getBrowserVersion() || "0.0.0",
|
|
617
|
+
is_first_visit: !1,
|
|
618
|
+
product_name: "Individual Widget",
|
|
619
|
+
product_version: E
|
|
620
|
+
});
|
|
621
|
+
return _ ? (this.fetchInstance.post(H.ANALYTICS_FEATURE_VISITS, {
|
|
622
|
+
feature_visit: {
|
|
623
|
+
analytics_session_guid: _.guid,
|
|
624
|
+
feature_name: i || "Experiences",
|
|
625
|
+
is_first_visit: _.is_first_visit
|
|
626
|
+
}
|
|
627
|
+
}), { analytics_session: _ }) : { analytics_session: null };
|
|
628
|
+
};
|
|
629
|
+
sendAnalyticEvent = async (E) => this.fetchInstance.post(H.ANALYTICS_EVENTS, E).catch((i) => {
|
|
630
|
+
throw i;
|
|
631
|
+
});
|
|
632
|
+
sendAnalyticsPageview = async (E) => this.fetchInstance.post(H.ANALYTICS_PAGEVIEWS, E).catch((i) => {
|
|
633
|
+
throw i;
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
class re {
|
|
637
|
+
fetchInstance;
|
|
638
|
+
constructor(E, i) {
|
|
639
|
+
this.fetchInstance = new y(E, i);
|
|
640
|
+
}
|
|
641
|
+
getBeats = async (E, i) => {
|
|
642
|
+
const t = `page=${E || 1}&per_page=${i || 5}`;
|
|
643
|
+
return this.fetchInstance.get(`${H.BEATS}?${t}`).then((_) => _.beats);
|
|
644
|
+
};
|
|
645
|
+
getBeatsWithAssociatedTransaction = async (E) => {
|
|
646
|
+
let i = "has_associated_transaction_guid=true";
|
|
647
|
+
return i += E ? `&from_date=${E}` : "", this.fetchInstance.get(`${H.BEATS}?${i}`).then((t) => t.beats);
|
|
648
|
+
};
|
|
649
|
+
updateBeat = async (E) => this.fetchInstance.put(`${H.BEATS}/${E.guid}`, E).then((i) => i.beat);
|
|
650
|
+
}
|
|
651
|
+
class _e {
|
|
652
|
+
fetchInstance;
|
|
653
|
+
constructor(E, i) {
|
|
654
|
+
this.fetchInstance = new y(E, i);
|
|
655
|
+
}
|
|
656
|
+
getGlobalCopy = async (E, i) => this.fetchInstance.post(`${H.LOCALIZED_CONTENT}/${E}`, { translation_key: i }).then((t) => t);
|
|
657
|
+
}
|
|
658
|
+
const _a = (e, E) => {
|
|
659
|
+
const { session: i } = E, t = Object.values(E).reduce((r, s) => i && s?.onAnalyticEvent && typeof s?.onAnalyticEvent == "function" ? [...r, s.onAnalyticEvent] : r, []), _ = [...e, ...t];
|
|
660
|
+
return d.useMemo(() => (r) => {
|
|
661
|
+
_.forEach((s) => {
|
|
662
|
+
i ? s(r, i) : s(r);
|
|
663
|
+
});
|
|
664
|
+
}, [e, i]);
|
|
665
|
+
}, sa = (e, E) => {
|
|
666
|
+
const { session: i } = E, t = Object.values(E).reduce((r, s) => i && s?.onAnalyticPageView && typeof s?.onAnalyticPageView == "function" ? [...r, s.onAnalyticPageView] : r, []), _ = [...e, ...t];
|
|
667
|
+
return d.useMemo(() => (r) => {
|
|
668
|
+
_.forEach((s) => {
|
|
669
|
+
i ? s(r, i) : s(r);
|
|
670
|
+
});
|
|
671
|
+
}, [e, i]);
|
|
672
|
+
};
|
|
673
|
+
class Ia {
|
|
674
|
+
copyApi = new _e("/", "");
|
|
675
|
+
copyObject = {};
|
|
676
|
+
namespace = "experiences";
|
|
677
|
+
translationKey = "micro_insights";
|
|
678
|
+
constructor() {
|
|
679
|
+
q(this);
|
|
680
|
+
}
|
|
681
|
+
initialize = async (E, i) => {
|
|
682
|
+
this.copyApi = new _e(E, i), await this.loadCopy();
|
|
683
|
+
};
|
|
684
|
+
loadCopy = async () => {
|
|
685
|
+
const E = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
|
686
|
+
le(() => {
|
|
687
|
+
this.copyObject = E[this.translationKey];
|
|
688
|
+
});
|
|
689
|
+
};
|
|
690
|
+
get cardsCopy() {
|
|
691
|
+
return this.copyObject.cards;
|
|
692
|
+
}
|
|
693
|
+
get carouselCopy() {
|
|
694
|
+
return this.copyObject.carousel;
|
|
695
|
+
}
|
|
696
|
+
get zeroStateCopy() {
|
|
697
|
+
return this.copyObject.zero_state;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
const u = {
|
|
701
|
+
BillAmountNotStandard: "BillAmountNotStandard",
|
|
702
|
+
CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
|
|
703
|
+
DuplicatePaymentV2: "DuplicatePaymentV2",
|
|
704
|
+
IntroducePulse: "IntroducePulse",
|
|
705
|
+
LargeTransaction: "LargeTransaction",
|
|
706
|
+
MonthlySpendToIncomeComparisonV2: "MonthlySpendToIncomeComparisonV2",
|
|
707
|
+
QuarterlySummary: "QuarterlySummary",
|
|
708
|
+
SpendingPlanCategorySpending: "SpendingPlanCategorySpending",
|
|
709
|
+
SubscriptionPriceIncrease: "SubscriptionPriceIncrease",
|
|
710
|
+
UncategorizedTransactionsV2: "UncategorizedTransactionsV2",
|
|
711
|
+
UpcomingBill: "UpcomingBill",
|
|
712
|
+
UnifiedDeposit: "UnifiedDeposit",
|
|
713
|
+
WeeklySpendingPlanSummary: "WeeklySpendingPlanSummary",
|
|
714
|
+
WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
|
|
715
|
+
MonthlySpendComparison: "MonthlySpendComparison",
|
|
716
|
+
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
|
717
|
+
}, L = window?.app?.clientConfig?.microwidget_instance_id || "", se = {
|
|
718
|
+
INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
|
|
719
|
+
}, Oe = (e) => `on${e}Click`, Se = (e) => `on${e}View`, Le = (e) => `on${e}ViewFirstTime`, ee = (e) => e.replace(/([a-z])([A-Z])/g, "$1 $2"), na = () => Object.values(u).reduce(
|
|
720
|
+
(e, E) => ({
|
|
721
|
+
...e,
|
|
722
|
+
[Oe(E)]: {
|
|
723
|
+
action: G.MICRO_BEAT_CLICKED,
|
|
724
|
+
category: U.BEAT_INTERACTION,
|
|
725
|
+
label: ee(E),
|
|
726
|
+
value: L
|
|
727
|
+
}
|
|
728
|
+
}),
|
|
729
|
+
{}
|
|
730
|
+
), oa = () => Object.values(u).reduce(
|
|
731
|
+
(e, E) => ({
|
|
732
|
+
...e,
|
|
733
|
+
[Se(E)]: {
|
|
734
|
+
action: G.MICRO_BEAT_DISPLAYED,
|
|
735
|
+
category: U.BEAT_INTERACTION,
|
|
736
|
+
label: ee(E),
|
|
737
|
+
value: L
|
|
738
|
+
}
|
|
739
|
+
}),
|
|
740
|
+
{}
|
|
741
|
+
), Na = () => Object.values(u).reduce(
|
|
742
|
+
(e, E) => ({
|
|
743
|
+
...e,
|
|
744
|
+
[Le(E)]: {
|
|
745
|
+
action: G.MICRO_BEAT_DISPLAYED_FIRST_TIME,
|
|
746
|
+
category: U.BEAT_INTERACTION,
|
|
747
|
+
label: ee(E),
|
|
748
|
+
value: L
|
|
749
|
+
}
|
|
750
|
+
}),
|
|
751
|
+
{}
|
|
752
|
+
), m = {
|
|
753
|
+
CARD: "Card",
|
|
754
|
+
CAROUSEL_CONTROL: "Carousel Control",
|
|
755
|
+
MICRO_WIDGET: "Micro Widget",
|
|
756
|
+
VIEW_MORE: "View More"
|
|
757
|
+
}, U = {
|
|
758
|
+
MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
|
|
759
|
+
BEAT_INTERACTION: "Beat Interaction"
|
|
760
|
+
}, h = {
|
|
761
|
+
ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
|
|
762
|
+
ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
|
|
763
|
+
ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
|
|
764
|
+
ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
|
|
765
|
+
ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
|
|
766
|
+
ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
|
|
767
|
+
}, fe = {
|
|
768
|
+
ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
|
|
769
|
+
}, G = {
|
|
770
|
+
CONTROL_BACKWARD: "Control Backward",
|
|
771
|
+
CONTROL_FORWARD: "Control Forward",
|
|
772
|
+
MICRO_BEAT_CLICKED: "Micro Beat Clicked",
|
|
773
|
+
MICRO_BEAT_DISPLAYED: "Micro Beat Displayed",
|
|
774
|
+
MICRO_BEAT_DISPLAYED_FIRST_TIME: "Micro Beat Displayed For First Time",
|
|
775
|
+
SWIPE_BACKWARD: "Swipe Backward",
|
|
776
|
+
SWIPE_FORWARD: "Swipe Forward"
|
|
777
|
+
}, w = {
|
|
778
|
+
MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
|
|
779
|
+
MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
|
|
780
|
+
MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
|
|
781
|
+
}, Ie = {
|
|
782
|
+
[w.MICRO_WIDGET_CAROUSEL]: {
|
|
783
|
+
label: m.MICRO_WIDGET,
|
|
784
|
+
name: w.MICRO_WIDGET_CAROUSEL,
|
|
785
|
+
path: se.INSIGHTS_MICRO_WIDGET,
|
|
786
|
+
value: L
|
|
787
|
+
},
|
|
788
|
+
// zero state
|
|
789
|
+
[w.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
|
|
790
|
+
label: m.MICRO_WIDGET,
|
|
791
|
+
name: w.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
|
|
792
|
+
path: se.INSIGHTS_MICRO_WIDGET,
|
|
793
|
+
value: L
|
|
794
|
+
},
|
|
795
|
+
// no relevant cards
|
|
796
|
+
[w.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
|
|
797
|
+
label: m.MICRO_WIDGET,
|
|
798
|
+
name: w.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
|
|
799
|
+
path: "/micro-widget",
|
|
800
|
+
value: L
|
|
801
|
+
}
|
|
802
|
+
}, ne = {
|
|
803
|
+
// carousel control interaction events - clicks and swipes
|
|
804
|
+
[h.ON_CAROUSEL_BACK_CLICK]: {
|
|
805
|
+
action: G.CONTROL_BACKWARD,
|
|
806
|
+
category: U.MICRO_WIDGET_INTERACTION,
|
|
807
|
+
label: m.CAROUSEL_CONTROL,
|
|
808
|
+
value: L
|
|
809
|
+
},
|
|
810
|
+
[h.ON_CAROUSEL_FORWARD_CLICK]: {
|
|
811
|
+
action: G.CONTROL_FORWARD,
|
|
812
|
+
category: U.MICRO_WIDGET_INTERACTION,
|
|
813
|
+
label: m.CAROUSEL_CONTROL,
|
|
814
|
+
value: L
|
|
815
|
+
},
|
|
816
|
+
[h.ON_CAROUSEL_BACK_SWIPE]: {
|
|
817
|
+
action: G.SWIPE_BACKWARD,
|
|
818
|
+
category: U.MICRO_WIDGET_INTERACTION,
|
|
819
|
+
label: m.CAROUSEL_CONTROL,
|
|
820
|
+
value: L
|
|
821
|
+
},
|
|
822
|
+
[h.ON_CAROUSEL_FORWARD_SWIPE]: {
|
|
823
|
+
action: G.SWIPE_FORWARD,
|
|
824
|
+
category: U.MICRO_WIDGET_INTERACTION,
|
|
825
|
+
label: m.CAROUSEL_CONTROL,
|
|
826
|
+
value: L
|
|
827
|
+
},
|
|
828
|
+
// read more card events
|
|
829
|
+
[h.ON_VIEW_MORE_CLICKED]: {
|
|
830
|
+
action: G.MICRO_BEAT_CLICKED,
|
|
831
|
+
category: U.BEAT_INTERACTION,
|
|
832
|
+
label: m.VIEW_MORE,
|
|
833
|
+
value: L
|
|
834
|
+
},
|
|
835
|
+
[fe.ON_VIEW_MORE_VIEWED]: {
|
|
836
|
+
action: G.MICRO_BEAT_DISPLAYED,
|
|
837
|
+
category: U.BEAT_INTERACTION,
|
|
838
|
+
label: m.VIEW_MORE,
|
|
839
|
+
value: L
|
|
840
|
+
},
|
|
841
|
+
...na(),
|
|
842
|
+
...oa(),
|
|
843
|
+
...Na()
|
|
844
|
+
}, oe = async (e, E) => !E || !ne[e] ? null : E.sendAnalyticEvent(ne[e]).then((i) => i).catch((i) => {
|
|
845
|
+
throw i;
|
|
846
|
+
}), Ne = async (e, E) => !E || !Ie[e] ? null : E.sendAnalyticsPageview(Ie[e]).then((i) => i).catch((i) => {
|
|
847
|
+
throw i;
|
|
848
|
+
});
|
|
849
|
+
class Aa {
|
|
850
|
+
onAnalyticEvent = oe;
|
|
851
|
+
onAnalyticPageView = Ne;
|
|
852
|
+
beatApi = new re("/", "");
|
|
853
|
+
constructor() {
|
|
854
|
+
q(this);
|
|
855
|
+
}
|
|
856
|
+
initialize = async (E, i, t) => {
|
|
857
|
+
this.onAnalyticEvent = (_, r) => {
|
|
858
|
+
oe(_, r).then((s) => s).catch((s) => {
|
|
859
|
+
throw s.status === 401 && t(), s;
|
|
860
|
+
});
|
|
861
|
+
}, this.onAnalyticPageView = (_, r) => {
|
|
862
|
+
Ne(_, r).then((s) => s).catch((s) => {
|
|
863
|
+
throw s.status === 401 && t(), s;
|
|
864
|
+
});
|
|
865
|
+
}, this.beatApi = new re(E, i);
|
|
866
|
+
};
|
|
867
|
+
updateBeat = async (E) => {
|
|
868
|
+
this.beatApi.updateBeat(E);
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
class Ca {
|
|
872
|
+
copyStore;
|
|
873
|
+
endpoint = "/";
|
|
874
|
+
insightsMicroWidgetStore;
|
|
875
|
+
session = null;
|
|
876
|
+
token = "";
|
|
877
|
+
isInitialized = !1;
|
|
878
|
+
constructor() {
|
|
879
|
+
this.copyStore = new Ia(), this.insightsMicroWidgetStore = new Aa(), q(this);
|
|
880
|
+
}
|
|
881
|
+
initialize = async (E, i, t) => {
|
|
882
|
+
await this.copyStore.initialize(E, i), await this.insightsMicroWidgetStore.initialize(E, i, t), this.session = await Qe(E, i, "1.0.0", "Micro Insights Carousel"), le(() => {
|
|
883
|
+
this.isInitialized = !0;
|
|
884
|
+
});
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
const x = d.createContext(null), Ta = ({
|
|
888
|
+
onEvent: e,
|
|
889
|
+
onPageview: E,
|
|
890
|
+
store: i,
|
|
891
|
+
children: t
|
|
892
|
+
}) => /* @__PURE__ */ I(x.Provider, { value: { onEvent: e, onPageview: E, store: i, children: t }, children: t }), De = d.forwardRef(
|
|
893
|
+
function({
|
|
894
|
+
actionText: E,
|
|
895
|
+
ariaLabel: i,
|
|
896
|
+
backgroundColor: t,
|
|
897
|
+
description: _,
|
|
898
|
+
heightOverrides: r,
|
|
899
|
+
icon: s,
|
|
900
|
+
isActiveCard: N,
|
|
901
|
+
isZeroState: A,
|
|
902
|
+
onCardClick: o = () => {
|
|
903
|
+
},
|
|
904
|
+
showIcon: C,
|
|
905
|
+
style: c = {},
|
|
906
|
+
fontColors: n = {},
|
|
907
|
+
title: T,
|
|
908
|
+
variant: l,
|
|
909
|
+
widthOverrides: O
|
|
910
|
+
}, P) {
|
|
911
|
+
const [f, V] = d.useState(2);
|
|
912
|
+
d.useEffect(() => {
|
|
913
|
+
O && O <= 325 && V(3);
|
|
914
|
+
}, [O]);
|
|
915
|
+
const { cardStyle: D, linkTextStyle: g } = c, b = l ? D : { border: "none", boxShadow: "none", ...D }, B = /* @__PURE__ */ I(
|
|
916
|
+
be,
|
|
917
|
+
{
|
|
918
|
+
className: "mx-micro-card-description",
|
|
919
|
+
color: n.textColor ? "undefined" : "text.primary",
|
|
920
|
+
sx: {
|
|
921
|
+
letterSpacing: 0.48,
|
|
922
|
+
display: "-webkit-box",
|
|
923
|
+
fontSize: 13,
|
|
924
|
+
lineHeight: "20px",
|
|
925
|
+
px: A ? 0 : 28,
|
|
926
|
+
overflow: "hidden",
|
|
927
|
+
WebkitLineClamp: f,
|
|
928
|
+
WebkitBoxOrient: "vertical",
|
|
929
|
+
wordWrap: "break-word"
|
|
930
|
+
},
|
|
931
|
+
children: _ && /* @__PURE__ */ I("span", { dangerouslySetInnerHTML: { __html: _ } })
|
|
932
|
+
}
|
|
933
|
+
);
|
|
934
|
+
return /* @__PURE__ */ I(
|
|
935
|
+
"div",
|
|
936
|
+
{
|
|
937
|
+
"aria-hidden": !N,
|
|
938
|
+
"aria-label": i,
|
|
939
|
+
onClick: () => o(),
|
|
940
|
+
ref: P,
|
|
941
|
+
role: "button",
|
|
942
|
+
style: {
|
|
943
|
+
height: "100%",
|
|
944
|
+
listStyleType: "none",
|
|
945
|
+
userSelect: "none",
|
|
946
|
+
minWidth: "100%"
|
|
947
|
+
},
|
|
948
|
+
tabIndex: N ? 0 : -1,
|
|
949
|
+
children: /* @__PURE__ */ I(
|
|
950
|
+
ke,
|
|
951
|
+
{
|
|
952
|
+
"aria-roledescription": "slide",
|
|
953
|
+
className: "mx-micro-card",
|
|
954
|
+
role: "group",
|
|
955
|
+
sx: {
|
|
956
|
+
backgroundColor: t,
|
|
957
|
+
borderRadius: "8px",
|
|
958
|
+
cursor: "pointer",
|
|
959
|
+
height: r ? "100%" : 124,
|
|
960
|
+
p: 16,
|
|
961
|
+
...b,
|
|
962
|
+
"& .MuiCardHeader-avatar": {
|
|
963
|
+
color: n.iconColor,
|
|
964
|
+
mr: "8px"
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
variant: l,
|
|
968
|
+
children: /* @__PURE__ */ F(
|
|
969
|
+
Te,
|
|
970
|
+
{
|
|
971
|
+
sx: {
|
|
972
|
+
gap: 8,
|
|
973
|
+
alignItems: "space-between"
|
|
974
|
+
},
|
|
975
|
+
children: [
|
|
976
|
+
/* @__PURE__ */ I(
|
|
977
|
+
ze,
|
|
978
|
+
{
|
|
979
|
+
avatar: C && s,
|
|
980
|
+
subheader: A && B,
|
|
981
|
+
sx: { color: n.headerColor, p: 0 },
|
|
982
|
+
title: T,
|
|
983
|
+
titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
|
|
984
|
+
}
|
|
985
|
+
),
|
|
986
|
+
/* @__PURE__ */ I(Xe, { sx: { p: 0 }, children: !A && B }),
|
|
987
|
+
!!E && /* @__PURE__ */ I($e, { sx: { padding: 0 }, children: /* @__PURE__ */ I(
|
|
988
|
+
X,
|
|
989
|
+
{
|
|
990
|
+
sx: (v) => ({
|
|
991
|
+
color: n.buttonColor ? n.buttonColor : v.palette.primary.main,
|
|
992
|
+
// TODO: Per Cameron the theme package in @mxenabled/mxui will be getting a big update and this will be theme.palette.primary_main
|
|
993
|
+
fontSize: 14,
|
|
994
|
+
fontWeight: "bold",
|
|
995
|
+
px: 28,
|
|
996
|
+
...g
|
|
997
|
+
}),
|
|
998
|
+
children: E
|
|
999
|
+
}
|
|
1000
|
+
) })
|
|
1001
|
+
]
|
|
1002
|
+
}
|
|
1003
|
+
)
|
|
1004
|
+
}
|
|
1005
|
+
)
|
|
1006
|
+
}
|
|
1007
|
+
);
|
|
1008
|
+
}
|
|
1009
|
+
), Ra = ({ beat: e }) => {
|
|
1010
|
+
const [E, i] = Ce(a.UNCATEGORIZED);
|
|
1011
|
+
return Y(() => {
|
|
1012
|
+
e.primary_category_guid ? i(e.primary_category_guid) : e.category_guids?.length && i(e.category_guids[0]);
|
|
1013
|
+
}, []), /* @__PURE__ */ I(ve, { categoryGuid: E, size: 16, sx: { minWidth: 16 } });
|
|
1014
|
+
}, da = ({ beat: e }) => {
|
|
1015
|
+
const E = Z(), i = la(E);
|
|
1016
|
+
return /* @__PURE__ */ I(
|
|
1017
|
+
Ye,
|
|
1018
|
+
{
|
|
1019
|
+
categoryGuid: e.primary_category_guid || e.category_guids && e.category_guids[0] || "",
|
|
1020
|
+
className: i,
|
|
1021
|
+
merchantGuid: e.primary_merchant_guid || e.merchant_guids[0],
|
|
1022
|
+
size: 16
|
|
1023
|
+
}
|
|
1024
|
+
);
|
|
1025
|
+
}, la = (e) => Q({
|
|
1026
|
+
marginTop: e.Spacing.XTiny,
|
|
1027
|
+
"& .kyper-categoryicon": {
|
|
1028
|
+
display: "flex"
|
|
1029
|
+
}
|
|
1030
|
+
}), ca = p(da), Oa = (e) => e ? e.data ? e.data.map((E) => {
|
|
1031
|
+
const i = {};
|
|
1032
|
+
return e.names?.map((t, _) => {
|
|
1033
|
+
i[t] = E[_];
|
|
1034
|
+
}), i;
|
|
1035
|
+
}) : [] : [], Sa = (e, E) => {
|
|
1036
|
+
const i = Oa(e), t = i.length / 2, _ = i.slice(0, t), r = i.slice(t);
|
|
1037
|
+
return !_.length || !r.length ? E.Color.Primary300 : _[0].amount > r[0].amount ? E.Color.Error300 : _[0].amount < r[0].amount ? E.Color.Success300 : E.Color.Primary300;
|
|
1038
|
+
}, La = ({ beat: e }) => {
|
|
1039
|
+
const E = Z(), i = Sa(e.data_series, E);
|
|
1040
|
+
return /* @__PURE__ */ I($, { name: "bar_chart", sx: { color: i } });
|
|
1041
|
+
}, Ae = ({ beat: e, clientColorScheme: E, color: i, type: t }) => {
|
|
1042
|
+
const _ = je(), r = E?.primary_300 ? E.primary_300 : _.palette.primary.main;
|
|
1043
|
+
return t === 0 ? /* @__PURE__ */ I($, { fill: !0, name: "error", sx: { color: i || r } }) : t === 1 && e ? /* @__PURE__ */ I(Ra, { beat: e }) : t === 2 && e ? /* @__PURE__ */ I(ca, { beat: e }) : t === 3 && e ? /* @__PURE__ */ I(La, { beat: e }) : t === 5 && e ? /* @__PURE__ */ I($, { name: "campaign" }) : /* @__PURE__ */ I(
|
|
1044
|
+
$,
|
|
1045
|
+
{
|
|
1046
|
+
fill: !0,
|
|
1047
|
+
name: "info",
|
|
1048
|
+
sx: {
|
|
1049
|
+
color: r
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
);
|
|
1053
|
+
}, bi = {
|
|
1054
|
+
LARGE: 180,
|
|
1055
|
+
STANDARD: 154,
|
|
1056
|
+
XLARGE: 200,
|
|
1057
|
+
XXLARGE: 248
|
|
1058
|
+
}, fa = 50, he = 1, W = () => {
|
|
1059
|
+
const e = d.useContext(x);
|
|
1060
|
+
if (!e)
|
|
1061
|
+
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
|
1062
|
+
return e.store.copyStore;
|
|
1063
|
+
}, Da = () => {
|
|
1064
|
+
const e = d.useContext(x);
|
|
1065
|
+
if (!e?.store?.insightsMicroWidgetStore)
|
|
1066
|
+
throw new Error(
|
|
1067
|
+
"useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
|
|
1068
|
+
);
|
|
1069
|
+
return e.store.insightsMicroWidgetStore;
|
|
1070
|
+
}, z = () => {
|
|
1071
|
+
const e = d.useContext(x);
|
|
1072
|
+
if (!e)
|
|
1073
|
+
throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
|
|
1074
|
+
return { onEvent: e.onEvent };
|
|
1075
|
+
}, vi = () => {
|
|
1076
|
+
const e = d.useContext(x);
|
|
1077
|
+
if (!e)
|
|
1078
|
+
throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
|
|
1079
|
+
return { onPageview: e.onPageview };
|
|
1080
|
+
}, ha = ({
|
|
1081
|
+
ariaLabel: e,
|
|
1082
|
+
backgroundColor: E,
|
|
1083
|
+
beat: i,
|
|
1084
|
+
clientColorScheme: t,
|
|
1085
|
+
showCTAColocatedWithText: _ = !0,
|
|
1086
|
+
heightOverrides: r,
|
|
1087
|
+
index: s,
|
|
1088
|
+
isActiveCard: N,
|
|
1089
|
+
onCardClick: A,
|
|
1090
|
+
posthog: o,
|
|
1091
|
+
showIcon: C,
|
|
1092
|
+
variant: c,
|
|
1093
|
+
widthOverrides: n
|
|
1094
|
+
}) => {
|
|
1095
|
+
const T = window.app?.config.client_guid, { ref: l, inView: O } = de({
|
|
1096
|
+
threshold: he
|
|
1097
|
+
}), { cardsCopy: P } = W(), { onEvent: f } = z(), { updateBeat: V } = Da();
|
|
1098
|
+
Y(() => {
|
|
1099
|
+
O && (i.has_been_displayed ? f(Se(i.template)) : (V({
|
|
1100
|
+
...i,
|
|
1101
|
+
has_been_displayed: !0
|
|
1102
|
+
}), f(Le(i.template))));
|
|
1103
|
+
}, [O]), Y(() => {
|
|
1104
|
+
o?.capture && O && i && T && o.capture("micro_widget_viewed_insight", {
|
|
1105
|
+
beat_guid: i.guid,
|
|
1106
|
+
insight_template: i.template,
|
|
1107
|
+
position: s,
|
|
1108
|
+
$groups: { client: T }
|
|
1109
|
+
});
|
|
1110
|
+
}, [i, T, o, s, O]);
|
|
1111
|
+
const D = () => {
|
|
1112
|
+
A && A(i), f(Oe(i.template)), o?.capture && T && o.capture("micro_widget_clicked_insight", {
|
|
1113
|
+
beat_guid: i.guid,
|
|
1114
|
+
insight_template: i.template,
|
|
1115
|
+
position: s,
|
|
1116
|
+
$groups: { client: T }
|
|
1117
|
+
});
|
|
1118
|
+
};
|
|
1119
|
+
return /* @__PURE__ */ I(
|
|
1120
|
+
De,
|
|
1121
|
+
{
|
|
1122
|
+
actionText: i.micro_call_to_action || P.micro_card_cta,
|
|
1123
|
+
ariaLabel: e,
|
|
1124
|
+
backgroundColor: E,
|
|
1125
|
+
description: i?.html_micro_description && i?.html_micro_description.length > 0 ? i.html_micro_description : i.html_description,
|
|
1126
|
+
fontColors: { buttonColor: t?.primary_300 },
|
|
1127
|
+
heightOverrides: r,
|
|
1128
|
+
icon: Ae && /* @__PURE__ */ I(
|
|
1129
|
+
Ae,
|
|
1130
|
+
{
|
|
1131
|
+
beat: i,
|
|
1132
|
+
clientColorScheme: t,
|
|
1133
|
+
color: i?.icon_color,
|
|
1134
|
+
type: i?.icon_type
|
|
1135
|
+
}
|
|
1136
|
+
),
|
|
1137
|
+
isActiveCard: N,
|
|
1138
|
+
onCardClick: D,
|
|
1139
|
+
ref: l,
|
|
1140
|
+
showCTAColocatedWithText: _,
|
|
1141
|
+
showIcon: C,
|
|
1142
|
+
title: i.micro_title && i.micro_title.length > 0 ? i.micro_title : i.title,
|
|
1143
|
+
variant: c,
|
|
1144
|
+
widthOverrides: n
|
|
1145
|
+
}
|
|
1146
|
+
);
|
|
1147
|
+
}, Pa = ({
|
|
1148
|
+
clientColorScheme: e,
|
|
1149
|
+
currentBeatIndex: E,
|
|
1150
|
+
numBeats: i,
|
|
1151
|
+
onNextClick: t,
|
|
1152
|
+
onPreviousClick: _,
|
|
1153
|
+
scrollRightBoundary: r,
|
|
1154
|
+
scrollX: s
|
|
1155
|
+
}) => {
|
|
1156
|
+
const N = ga(), { carouselCopy: A } = W(), o = Math.floor(s) > r || E === 0, C = s < 0 || i - 1 === E, c = "#BBBCBC", n = e?.primary_300 ? e?.primary_300 : "#2D64EF";
|
|
1157
|
+
return /* @__PURE__ */ F(X, { className: N, children: [
|
|
1158
|
+
/* @__PURE__ */ I(
|
|
1159
|
+
Ee,
|
|
1160
|
+
{
|
|
1161
|
+
"aria-disabled": o,
|
|
1162
|
+
"aria-label": A.previous_insight_cta_aria,
|
|
1163
|
+
disabled: o,
|
|
1164
|
+
onClick: _,
|
|
1165
|
+
children: /* @__PURE__ */ I(
|
|
1166
|
+
Ke,
|
|
1167
|
+
{
|
|
1168
|
+
style: {
|
|
1169
|
+
color: o ? c : n
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
)
|
|
1173
|
+
}
|
|
1174
|
+
),
|
|
1175
|
+
Array.from({ length: i }).map((T, l) => /* @__PURE__ */ I(
|
|
1176
|
+
"div",
|
|
1177
|
+
{
|
|
1178
|
+
className: "mx-insights-micro-carousel-dots",
|
|
1179
|
+
style: {
|
|
1180
|
+
backgroundColor: l === E ? n : c
|
|
1181
|
+
}
|
|
1182
|
+
},
|
|
1183
|
+
`carousel-button-${l}`
|
|
1184
|
+
)),
|
|
1185
|
+
/* @__PURE__ */ I(
|
|
1186
|
+
Ee,
|
|
1187
|
+
{
|
|
1188
|
+
"aria-disabled": C,
|
|
1189
|
+
"aria-label": A.next_insight_cta_aria,
|
|
1190
|
+
disabled: C,
|
|
1191
|
+
onClick: t,
|
|
1192
|
+
children: /* @__PURE__ */ I(
|
|
1193
|
+
Re,
|
|
1194
|
+
{
|
|
1195
|
+
style: {
|
|
1196
|
+
color: C ? c : n
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
)
|
|
1200
|
+
}
|
|
1201
|
+
)
|
|
1202
|
+
] });
|
|
1203
|
+
}, ga = () => Q({
|
|
1204
|
+
alignItems: "center",
|
|
1205
|
+
display: "flex",
|
|
1206
|
+
justifyContent: "center",
|
|
1207
|
+
width: "100%",
|
|
1208
|
+
// we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1
|
|
1209
|
+
"& button:first-child": {
|
|
1210
|
+
marginRight: 8
|
|
1211
|
+
},
|
|
1212
|
+
"& .mx-insights-micro-carousel-dots": {
|
|
1213
|
+
borderRadius: "50%",
|
|
1214
|
+
height: 8,
|
|
1215
|
+
padding: 0,
|
|
1216
|
+
width: 8,
|
|
1217
|
+
// we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1
|
|
1218
|
+
marginRight: 8
|
|
1219
|
+
}
|
|
1220
|
+
}), Ma = ({
|
|
1221
|
+
color: e = "currentColor",
|
|
1222
|
+
height: E,
|
|
1223
|
+
size: i = 16,
|
|
1224
|
+
styles: t,
|
|
1225
|
+
viewBox: _ = "0 0 16 16",
|
|
1226
|
+
width: r
|
|
1227
|
+
}) => /* @__PURE__ */ I(
|
|
1228
|
+
"svg",
|
|
1229
|
+
{
|
|
1230
|
+
"aria-hidden": !0,
|
|
1231
|
+
className: "kyper-icon",
|
|
1232
|
+
focusable: !1,
|
|
1233
|
+
height: E || i,
|
|
1234
|
+
style: t,
|
|
1235
|
+
viewBox: _,
|
|
1236
|
+
width: r || i,
|
|
1237
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1238
|
+
children: /* @__PURE__ */ I(
|
|
1239
|
+
"path",
|
|
1240
|
+
{
|
|
1241
|
+
d: "M16 1.5C16 0.671573 15.3284 0 14.5 0H1.5C0.671573 0 0 0.671573 0 1.5V14.5C0 15.3284 0.671573 16 1.5 16H14.5C15.3284 16 16 15.3284 16 14.5V1.5ZM12.8 5.1C13.0209 5.26568 13.0657 5.57909 12.9 5.8L9.90003 9.8C9.71746 10.0434 9.36163 10.0687 9.14648 9.85355L6.55413 7.2612L3.90003 10.8C3.73434 11.0209 3.42094 11.0657 3.20003 10.9C2.97912 10.7343 2.93434 10.4209 3.10003 10.2L6.10003 6.2C6.28259 5.95658 6.63843 5.93129 6.85358 6.14645L9.44593 8.7388L12.1 5.2C12.2657 4.97908 12.5791 4.93431 12.8 5.1Z",
|
|
1242
|
+
fill: e
|
|
1243
|
+
}
|
|
1244
|
+
)
|
|
1245
|
+
}
|
|
1246
|
+
), ma = ({
|
|
1247
|
+
isActiveCard: e,
|
|
1248
|
+
ariaLabel: E,
|
|
1249
|
+
clientColorScheme: i,
|
|
1250
|
+
heightOverrides: t,
|
|
1251
|
+
onCardClick: _,
|
|
1252
|
+
posthog: r,
|
|
1253
|
+
showIcon: s,
|
|
1254
|
+
variant: N,
|
|
1255
|
+
widthOverrides: A
|
|
1256
|
+
}) => {
|
|
1257
|
+
const o = Z(), C = window.app?.config.client_guid, { ref: c, inView: n } = de({
|
|
1258
|
+
threshold: he
|
|
1259
|
+
}), { cardsCopy: T } = W(), { onEvent: l } = z();
|
|
1260
|
+
Y(() => {
|
|
1261
|
+
n && l(fe.ON_VIEW_MORE_VIEWED);
|
|
1262
|
+
}, [n]), Y(() => {
|
|
1263
|
+
r?.capture && n && C && r.capture("micro_widget_viewed_insight", {
|
|
1264
|
+
insight_template: "read_more_card",
|
|
1265
|
+
$groups: { client: C }
|
|
1266
|
+
});
|
|
1267
|
+
}, [C, r, n]);
|
|
1268
|
+
const O = () => {
|
|
1269
|
+
_ && _(), l(h.ON_VIEW_MORE_CLICKED), r?.capture && C && r.capture("micro_widget_clicked_insight", {
|
|
1270
|
+
insight_template: "read_more_card",
|
|
1271
|
+
$groups: { client: C }
|
|
1272
|
+
});
|
|
1273
|
+
};
|
|
1274
|
+
return /* @__PURE__ */ I(
|
|
1275
|
+
De,
|
|
1276
|
+
{
|
|
1277
|
+
actionText: T.micro_card_cta,
|
|
1278
|
+
ariaLabel: E,
|
|
1279
|
+
description: T.view_more_card_description,
|
|
1280
|
+
fontColors: { buttonColor: i?.primary_300 },
|
|
1281
|
+
heightOverrides: t,
|
|
1282
|
+
icon: /* @__PURE__ */ I(
|
|
1283
|
+
Ma,
|
|
1284
|
+
{
|
|
1285
|
+
color: i?.primary_300 ? i?.primary_300 : o.Color.Primary300
|
|
1286
|
+
}
|
|
1287
|
+
),
|
|
1288
|
+
isActiveCard: e,
|
|
1289
|
+
onCardClick: O,
|
|
1290
|
+
ref: c,
|
|
1291
|
+
showIcon: s,
|
|
1292
|
+
title: T.view_more_card_title,
|
|
1293
|
+
variant: N,
|
|
1294
|
+
widthOverrides: A
|
|
1295
|
+
}
|
|
1296
|
+
);
|
|
1297
|
+
}, Ua = p(ma), Ga = ({
|
|
1298
|
+
beats: e = [],
|
|
1299
|
+
clientColorScheme: E,
|
|
1300
|
+
showCTAColocatedWithText: i,
|
|
1301
|
+
heightOverrides: t,
|
|
1302
|
+
onCardClick: _,
|
|
1303
|
+
posthog: r,
|
|
1304
|
+
showCarouselControls: s,
|
|
1305
|
+
showIcon: N,
|
|
1306
|
+
showWithMargin: A,
|
|
1307
|
+
variant: o,
|
|
1308
|
+
widthOverrides: C
|
|
1309
|
+
}) => {
|
|
1310
|
+
const c = Fa(t, A, C), n = d.useRef(null), [T, l] = d.useState(0), [O, P] = d.useState(null), [f, V] = d.useState(null), { carouselCopy: D } = W(), { onEvent: g } = z(), b = () => {
|
|
1311
|
+
g(h.ON_CAROUSEL_FORWARD_CLICK), n.current && n.current.scrollTo({
|
|
1312
|
+
left: (
|
|
1313
|
+
// Adds the flex gap to the carousel ref's width
|
|
1314
|
+
(n.current.offsetWidth + 8) * (Math.floor(T / (n.current.offsetWidth + 8)) + 1)
|
|
1315
|
+
),
|
|
1316
|
+
top: 0,
|
|
1317
|
+
behavior: "smooth"
|
|
1318
|
+
});
|
|
1319
|
+
}, B = () => {
|
|
1320
|
+
g(h.ON_CAROUSEL_BACK_CLICK), n.current && n.current.scrollTo({
|
|
1321
|
+
left: (n.current.offsetWidth + 8) * (Math.floor(T / (n.current.offsetWidth + 8)) - 1),
|
|
1322
|
+
top: 0,
|
|
1323
|
+
behavior: "smooth"
|
|
1324
|
+
});
|
|
1325
|
+
}, v = () => {
|
|
1326
|
+
n.current && l(n.current.scrollLeft);
|
|
1327
|
+
}, j = () => {
|
|
1328
|
+
if (!f || !O) return;
|
|
1329
|
+
f - O > fa ? g(h.ON_CAROUSEL_FORWARD_SWIPE) : g(h.ON_CAROUSEL_BACK_SWIPE);
|
|
1330
|
+
}, Pe = (S) => {
|
|
1331
|
+
P(S.targetTouches[0].clientX);
|
|
1332
|
+
}, ge = (S) => {
|
|
1333
|
+
P(null), V(S.targetTouches[0].clientX);
|
|
1334
|
+
}, ae = {
|
|
1335
|
+
clientColorScheme: E,
|
|
1336
|
+
showCTAColocatedWithText: i,
|
|
1337
|
+
heightOverrides: t,
|
|
1338
|
+
showIcon: N,
|
|
1339
|
+
variant: o,
|
|
1340
|
+
widthOverrides: C
|
|
1341
|
+
}, J = n.current && n.current.offsetWidth ? Math.round(T / n.current.offsetWidth) : 0, Me = n.current ? n.current.scrollWidth - n.current.offsetWidth : 0;
|
|
1342
|
+
return /* @__PURE__ */ F(
|
|
1343
|
+
"div",
|
|
1344
|
+
{
|
|
1345
|
+
"aria-label": D.carousel_title,
|
|
1346
|
+
"aria-roledescription": "carousel",
|
|
1347
|
+
className: c,
|
|
1348
|
+
role: "region",
|
|
1349
|
+
children: [
|
|
1350
|
+
/* @__PURE__ */ F(
|
|
1351
|
+
"div",
|
|
1352
|
+
{
|
|
1353
|
+
className: "mx-insights-micro-carousel-container",
|
|
1354
|
+
onScroll: v,
|
|
1355
|
+
onTouchEnd: j,
|
|
1356
|
+
onTouchMove: Pe,
|
|
1357
|
+
onTouchStart: ge,
|
|
1358
|
+
ref: n,
|
|
1359
|
+
children: [
|
|
1360
|
+
e.map((S, K) => {
|
|
1361
|
+
const me = K + 1, Ue = e.length + 1, Ge = ce(
|
|
1362
|
+
D.card_position_in_carousel_aria,
|
|
1363
|
+
me.toString(),
|
|
1364
|
+
Ue.toString()
|
|
1365
|
+
), He = S.micro_title && S.micro_title.length > 0, Fe = S.micro_description && S.micro_description.length > 0, Ve = He ? S.micro_title : S.title, Be = Fe ? S.micro_description : S.description;
|
|
1366
|
+
return /* @__PURE__ */ I(
|
|
1367
|
+
ha,
|
|
1368
|
+
{
|
|
1369
|
+
ariaLabel: `${Ge}: ${Ve}, ${Be}`,
|
|
1370
|
+
beat: S,
|
|
1371
|
+
index: K,
|
|
1372
|
+
isActiveCard: K === J,
|
|
1373
|
+
onCardClick: _,
|
|
1374
|
+
posthog: r,
|
|
1375
|
+
...ae
|
|
1376
|
+
},
|
|
1377
|
+
`${S.guid} ${K}`
|
|
1378
|
+
);
|
|
1379
|
+
}),
|
|
1380
|
+
/* @__PURE__ */ I(
|
|
1381
|
+
Ua,
|
|
1382
|
+
{
|
|
1383
|
+
isActiveCard: J === e.length,
|
|
1384
|
+
onCardClick: _,
|
|
1385
|
+
...ae
|
|
1386
|
+
}
|
|
1387
|
+
)
|
|
1388
|
+
]
|
|
1389
|
+
}
|
|
1390
|
+
),
|
|
1391
|
+
s && /* @__PURE__ */ I(
|
|
1392
|
+
Pa,
|
|
1393
|
+
{
|
|
1394
|
+
clientColorScheme: E,
|
|
1395
|
+
currentBeatIndex: J,
|
|
1396
|
+
numBeats: e.length + 1,
|
|
1397
|
+
onNextClick: b,
|
|
1398
|
+
onPreviousClick: B,
|
|
1399
|
+
scrollRightBoundary: Me,
|
|
1400
|
+
scrollX: T
|
|
1401
|
+
}
|
|
1402
|
+
)
|
|
1403
|
+
]
|
|
1404
|
+
}
|
|
1405
|
+
);
|
|
1406
|
+
}, Ha = p(Ga), Fa = (e, E = !0, i) => Q({
|
|
1407
|
+
alignItems: "center",
|
|
1408
|
+
boxSizing: "border-box",
|
|
1409
|
+
display: "flex",
|
|
1410
|
+
flexDirection: "column",
|
|
1411
|
+
height: e,
|
|
1412
|
+
width: i || "100%",
|
|
1413
|
+
"& .mx-insights-micro-carousel-container": {
|
|
1414
|
+
alignItems: "center",
|
|
1415
|
+
display: "flex",
|
|
1416
|
+
gap: 8,
|
|
1417
|
+
height: e && "100%",
|
|
1418
|
+
maxWidth: E ? "calc(100% - 32px)" : "100%",
|
|
1419
|
+
overflowX: "auto",
|
|
1420
|
+
overflowY: "hidden",
|
|
1421
|
+
scrollbarWidth: "none",
|
|
1422
|
+
"-ms-overflow-style": "none",
|
|
1423
|
+
"-webkit-overflow-scrolling": "touch",
|
|
1424
|
+
margin: 0,
|
|
1425
|
+
padding: 0,
|
|
1426
|
+
listStyleType: "none",
|
|
1427
|
+
"&::-webkit-scrollbar": {
|
|
1428
|
+
display: "none"
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
}), Va = ({
|
|
1432
|
+
clientColorScheme: e,
|
|
1433
|
+
onCardClick: E,
|
|
1434
|
+
posthog: i,
|
|
1435
|
+
widthOverrides: t
|
|
1436
|
+
}) => {
|
|
1437
|
+
const { carouselCopy: _ } = W(), { onEvent: r } = z(), s = window.app?.config.client_guid, N = () => {
|
|
1438
|
+
r && (r(h.ON_VIEW_MORE_CLICKED), i?.capture && s && (E(), i.capture("micro_widget_clicked_insight", {
|
|
1439
|
+
insight_template: "view_all",
|
|
1440
|
+
$groups: { client: s }
|
|
1441
|
+
})));
|
|
1442
|
+
};
|
|
1443
|
+
return /* @__PURE__ */ F(
|
|
1444
|
+
Te,
|
|
1445
|
+
{
|
|
1446
|
+
alignItems: "center",
|
|
1447
|
+
direction: "row",
|
|
1448
|
+
justifyContent: "space-between",
|
|
1449
|
+
spacing: 2,
|
|
1450
|
+
sx: {
|
|
1451
|
+
padding: t ? 0 : 16,
|
|
1452
|
+
width: t || void 0
|
|
1453
|
+
},
|
|
1454
|
+
children: [
|
|
1455
|
+
/* @__PURE__ */ I(
|
|
1456
|
+
ie,
|
|
1457
|
+
{
|
|
1458
|
+
sx: {
|
|
1459
|
+
fontSize: 18,
|
|
1460
|
+
fontWeight: 700,
|
|
1461
|
+
lineHeight: "24px"
|
|
1462
|
+
},
|
|
1463
|
+
variant: "h3",
|
|
1464
|
+
children: _.carousel_title
|
|
1465
|
+
}
|
|
1466
|
+
),
|
|
1467
|
+
/* @__PURE__ */ F(
|
|
1468
|
+
xe,
|
|
1469
|
+
{
|
|
1470
|
+
onClick: N,
|
|
1471
|
+
sx: {
|
|
1472
|
+
display: "flex",
|
|
1473
|
+
alignItems: "center",
|
|
1474
|
+
"&.MuiLink-underlineNone": {
|
|
1475
|
+
textDecoration: "none",
|
|
1476
|
+
":hover": {
|
|
1477
|
+
borderBottom: "none"
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
},
|
|
1481
|
+
underline: "none",
|
|
1482
|
+
children: [
|
|
1483
|
+
/* @__PURE__ */ I(
|
|
1484
|
+
ie,
|
|
1485
|
+
{
|
|
1486
|
+
sx: {
|
|
1487
|
+
color: e?.primary_300,
|
|
1488
|
+
fontSize: 15,
|
|
1489
|
+
fontWeight: 600,
|
|
1490
|
+
lineHeight: "20px"
|
|
1491
|
+
},
|
|
1492
|
+
variant: "body1",
|
|
1493
|
+
children: _.view_all_insights_in_full_feed_cta_aria
|
|
1494
|
+
}
|
|
1495
|
+
),
|
|
1496
|
+
/* @__PURE__ */ I(Re, { sx: { color: e?.primary_300, ml: "8px" } })
|
|
1497
|
+
]
|
|
1498
|
+
}
|
|
1499
|
+
)
|
|
1500
|
+
]
|
|
1501
|
+
}
|
|
1502
|
+
);
|
|
1503
|
+
}, Ba = p(Va), wa = ({
|
|
1504
|
+
heightOverrides: e,
|
|
1505
|
+
widthOverrides: E,
|
|
1506
|
+
children: i
|
|
1507
|
+
}) => {
|
|
1508
|
+
const { carouselCopy: t } = W();
|
|
1509
|
+
return /* @__PURE__ */ I(
|
|
1510
|
+
X,
|
|
1511
|
+
{
|
|
1512
|
+
"aria-label": t?.carousel_title,
|
|
1513
|
+
"aria-roledescription": "carousel",
|
|
1514
|
+
role: "group",
|
|
1515
|
+
sx: {
|
|
1516
|
+
boxSizing: "border-box",
|
|
1517
|
+
height: e ? void 0 : "100%",
|
|
1518
|
+
margin: "0 auto",
|
|
1519
|
+
width: E ? void 0 : "100%"
|
|
1520
|
+
},
|
|
1521
|
+
children: i
|
|
1522
|
+
}
|
|
1523
|
+
);
|
|
1524
|
+
}, Wa = () => /* @__PURE__ */ I(
|
|
1525
|
+
X,
|
|
1526
|
+
{
|
|
1527
|
+
sx: {
|
|
1528
|
+
alignItems: "center",
|
|
1529
|
+
display: "flex",
|
|
1530
|
+
height: "100%",
|
|
1531
|
+
justifyContent: "center",
|
|
1532
|
+
width: "100%"
|
|
1533
|
+
},
|
|
1534
|
+
children: /* @__PURE__ */ I(Je, {})
|
|
1535
|
+
}
|
|
1536
|
+
), M = new Ca(), ba = ({
|
|
1537
|
+
areBeatsLoading: e,
|
|
1538
|
+
beats: E = [],
|
|
1539
|
+
// This also determines the length of the carousel controls (beat.length + 1)
|
|
1540
|
+
clientColorScheme: i,
|
|
1541
|
+
// Allows certain icons, view all and read more button to reflect the clients color scheme. Currently only supports primary_300
|
|
1542
|
+
showCTAColocatedWithText: t = !0,
|
|
1543
|
+
endpoint: _ = "/",
|
|
1544
|
+
heightOverrides: r,
|
|
1545
|
+
logOutUser: s,
|
|
1546
|
+
onCardClick: N = () => {
|
|
1547
|
+
},
|
|
1548
|
+
onEvent: A = () => {
|
|
1549
|
+
},
|
|
1550
|
+
onPageview: o = () => {
|
|
1551
|
+
},
|
|
1552
|
+
posthog: C,
|
|
1553
|
+
showBorder: c = !0,
|
|
1554
|
+
showCarouselControls: n,
|
|
1555
|
+
showHeader: T,
|
|
1556
|
+
showIcon: l,
|
|
1557
|
+
showWithMargin: O = !0,
|
|
1558
|
+
token: P = "",
|
|
1559
|
+
useDarkMode: f,
|
|
1560
|
+
variant: V,
|
|
1561
|
+
widthOverrides: D
|
|
1562
|
+
}) => {
|
|
1563
|
+
const [g, b] = Ce(!1), B = _a([A], M), v = sa([o], M);
|
|
1564
|
+
d.useEffect(() => {
|
|
1565
|
+
M.isInitialized || M.initialize(_, P, s);
|
|
1566
|
+
}, [_, P, s, M.isInitialized]), d.useEffect(() => {
|
|
1567
|
+
b(!e && M.isInitialized);
|
|
1568
|
+
}, [e, M.isInitialized]);
|
|
1569
|
+
const j = {
|
|
1570
|
+
showCTAColocatedWithText: t,
|
|
1571
|
+
heightOverrides: r,
|
|
1572
|
+
onCardClick: N,
|
|
1573
|
+
showIcon: l,
|
|
1574
|
+
showWithMargin: O,
|
|
1575
|
+
useDarkMode: f,
|
|
1576
|
+
widthOverrides: D
|
|
1577
|
+
};
|
|
1578
|
+
return (
|
|
1579
|
+
// The Theme provider must wrap the component so that the styles don't break when imported into other applications.
|
|
1580
|
+
/* @__PURE__ */ F(We, { theme: pe(f ? "dark" : "light"), children: [
|
|
1581
|
+
/* @__PURE__ */ I(we, {}),
|
|
1582
|
+
/* @__PURE__ */ I(Ta, { onEvent: B, onPageview: v, store: M, children: /* @__PURE__ */ F(wa, { heightOverrides: r, widthOverrides: D, children: [
|
|
1583
|
+
(e || !M.isInitialized) && /* @__PURE__ */ I(Wa, {}),
|
|
1584
|
+
g && T && /* @__PURE__ */ I(
|
|
1585
|
+
Ba,
|
|
1586
|
+
{
|
|
1587
|
+
clientColorScheme: i,
|
|
1588
|
+
onCardClick: N,
|
|
1589
|
+
posthog: C,
|
|
1590
|
+
widthOverrides: D
|
|
1591
|
+
}
|
|
1592
|
+
),
|
|
1593
|
+
g && !!E.length && /* @__PURE__ */ I(
|
|
1594
|
+
Ha,
|
|
1595
|
+
{
|
|
1596
|
+
beats: E,
|
|
1597
|
+
clientColorScheme: i,
|
|
1598
|
+
showCarouselControls: n,
|
|
1599
|
+
variant: c ? V : void 0,
|
|
1600
|
+
...j
|
|
1601
|
+
}
|
|
1602
|
+
)
|
|
1603
|
+
] }) })
|
|
1604
|
+
] })
|
|
1605
|
+
);
|
|
1606
|
+
}, Yi = p(ba);
|
|
1607
|
+
export {
|
|
1608
|
+
H as A,
|
|
1609
|
+
re as B,
|
|
1610
|
+
a as C,
|
|
1611
|
+
qe as D,
|
|
1612
|
+
aa as E,
|
|
1613
|
+
y as F,
|
|
1614
|
+
_e as G,
|
|
1615
|
+
Mi as H,
|
|
1616
|
+
Yi as I,
|
|
1617
|
+
Di as J,
|
|
1618
|
+
Qe as K,
|
|
1619
|
+
Wi as L,
|
|
1620
|
+
ea as M,
|
|
1621
|
+
fi as N,
|
|
1622
|
+
Ca as O,
|
|
1623
|
+
Li as P,
|
|
1624
|
+
Ta as Q,
|
|
1625
|
+
ha as R,
|
|
1626
|
+
Hi as S,
|
|
1627
|
+
Ha as T,
|
|
1628
|
+
Ba as U,
|
|
1629
|
+
Ua as V,
|
|
1630
|
+
Ma as W,
|
|
1631
|
+
La as X,
|
|
1632
|
+
hi as a,
|
|
1633
|
+
ce as b,
|
|
1634
|
+
Bi as c,
|
|
1635
|
+
R as d,
|
|
1636
|
+
ia as e,
|
|
1637
|
+
wi as f,
|
|
1638
|
+
ta as g,
|
|
1639
|
+
Vi as h,
|
|
1640
|
+
gi as i,
|
|
1641
|
+
Pi as j,
|
|
1642
|
+
ye as k,
|
|
1643
|
+
mi as l,
|
|
1644
|
+
ue as m,
|
|
1645
|
+
Fi as n,
|
|
1646
|
+
Ui as o,
|
|
1647
|
+
Gi as p,
|
|
1648
|
+
z as q,
|
|
1649
|
+
vi as r,
|
|
1650
|
+
w as s,
|
|
1651
|
+
De as t,
|
|
1652
|
+
W as u,
|
|
1653
|
+
bi as v,
|
|
1654
|
+
h as w,
|
|
1655
|
+
ra as x,
|
|
1656
|
+
_a as y,
|
|
1657
|
+
sa as z
|
|
1658
|
+
};
|
|
1659
|
+
//# sourceMappingURL=InsightsMicroWidget-C1X8hjQ_.mjs.map
|