@kiva/kv-components 8.26.0 → 8.26.1

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/index.js CHANGED
@@ -4,7 +4,7 @@ import { default as l } from "./vue/KvBorrowerImage.js";
4
4
  import { default as s } from "./vue/KvButton.js";
5
5
  import { default as d } from "./vue/KvCardFrame.js";
6
6
  import { default as x } from "./vue/KvCarousel.js";
7
- import { default as n } from "./vue/KvCartModal.js";
7
+ import { default as K } from "./vue/KvCartModal.js";
8
8
  import { default as A } from "./vue/KvCartPill.js";
9
9
  import { default as C } from "./vue/KvCheckbox.js";
10
10
  import { default as c } from "./vue/KvCheckoutReceipt.js";
@@ -31,7 +31,7 @@ import { default as le } from "./vue/KvImpactDashboardHeader.js";
31
31
  import { default as se } from "./vue/KvImpactVerticalSelector.js";
32
32
  import { default as de } from "./vue/KvInlineActivityCard.js";
33
33
  import { default as xe } from "./vue/KvInlineActivityFeed.js";
34
- import { default as ne } from "./vue/KvIntroductionLoanCard.js";
34
+ import { default as Ke } from "./vue/KvIntroductionLoanCard.js";
35
35
  import { default as Ae } from "./vue/KvLendAmountButton.js";
36
36
  import { default as Ce } from "./vue/KvLendCta.js";
37
37
  import { default as ce } from "./vue/KvLightbox.js";
@@ -57,7 +57,7 @@ import { default as fo } from "./vue/KvPieChartV2.js";
57
57
  import { default as mo } from "./vue/KvPill.js";
58
58
  import { default as po } from "./vue/KvPopper.js";
59
59
  import { default as xo } from "./vue/KvProgressBar.js";
60
- import { default as no } from "./vue/KvProgressCircle.js";
60
+ import { default as Ko } from "./vue/KvProgressCircle.js";
61
61
  import { default as Ao } from "./vue/KvPulsingDot.js";
62
62
  import { default as Co } from "./vue/KvRadio.js";
63
63
  import { default as co } from "./vue/KvSelect.js";
@@ -83,7 +83,7 @@ import { default as ar } from "./vue/KvAtbModal.js";
83
83
  import { default as lr } from "./vue/KvSecondaryNav.js";
84
84
  import { default as sr } from "./vue/KvWwwHeader.js";
85
85
  import { default as dr } from "./vue/KvWwwHeaderBasic/KvWwwHeaderBasic.js";
86
- import { default as xr, Mash as Kr } from "./utils/Alea.js";
86
+ import { default as xr, Mash as nr } from "./utils/Alea.js";
87
87
  import { groupBy as vr, sortBy as Ar } from "./utils/arrayUtils.js";
88
88
  import { useAttrs as Cr } from "./utils/attrs.js";
89
89
  import { carouselUtil as cr } from "./utils/carousels.js";
@@ -92,55 +92,55 @@ import { debounce as Mr } from "./utils/debounce.js";
92
92
  import { useEventListener as Or } from "./utils/event.js";
93
93
  import { collapse as gr, expand as Pr } from "./utils/expander.js";
94
94
  import { DEFAULT_ACCEPTED_IMAGE_TYPES as Fr, cropResizeImageToDataUrl as hr, getKivaImageUrl as Dr, isLegacyPlaceholderAvatar as Br, randomizedUserAvatarClass as Vr, validateImageFile as yr } from "./utils/imageUtils.js";
95
- import { LOAN_CALLOUTS_FRAGMENT as br, LOAN_GEOCODE_FRAGMENT as kr, LOAN_PROGRESS_FRAGMENT as wr, loanCardComputedProperties as Wr, loanCardMethods as Hr } from "./utils/loanCard.js";
96
- import { BALANCE_CAMPAIGN as jr, BASE_CAMPAIGN as Qr, ERL_COOKIE_NAME as Yr, NO_BALANCE_CAMPAIGN as Zr, TOP_UP_CAMPAIGN as qr, getDropdownPriceArray as Jr, getLendCtaSelectedOption as Xr, isBetween25And50 as $r, isLessThan25 as et, truncateStringByWords as ot } from "./utils/loanUtils.js";
97
- import { animationCoordinator as tt, computeMapCenter as at, computeMapZoom as ft, generateMapMarkers as lt, getCoordinatesBetween as mt, getCountryColor as st, getLoansIntervals as pt } from "./utils/mapUtils.js";
98
- import { lockPrintSingleEl as ut, unlockPrintSingleEl as xt } from "./utils/printing.js";
99
- import { lockScroll as nt, lockScrollSmallOnly as vt, unlockScroll as At, unlockScrollSmallOnly as it } from "./utils/scrollLock.js";
100
- import { buildTailwindClassName as _t, headerNumberCase as ct, kebabCase as Tt, removeObjectProperty as Lt } from "./utils/themeUtils.js";
101
- import { throttle as Et } from "./utils/throttle.js";
102
- import { isTargetElement as Mt, offBodyTouchstart as It, onBodyTouchstart as Ot } from "./utils/touchEvents.js";
103
- import { getTreemap as gt } from "./utils/treemap.js";
104
- import { KvBlueskyIcon as Gt } from "./assets/icons/bluesky.js";
105
- import { KV_CLASSIC_LOAN_CARD_FRAGMENT as ht, KV_CLASSIC_LOAN_CARD_USER_FRAGMET as Dt } from "./vue/KvClassicLoanCard2.js";
106
- import { KV_COMPACT_LOAN_CARD_FRAGMENT as Vt, KV_COMPACT_LOAN_CARD_USER_FRAGMENT as yt } from "./vue/KvCompactLoanCard2.js";
107
- import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as bt, KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT as kt } from "./vue/KvIntroductionLoanCard2.js";
108
- import { KV_LEND_CTA_FRAGMENT as Wt, KV_LEND_CTA_USER_FRAGMENT as Ht } from "./vue/KvLendCta2.js";
109
- import { KV_LOAN_ACTIVITIES_FRAGMENT as jt } from "./vue/KvLoanActivities2.js";
110
- import { KV_LOAN_BOOKMARK_FRAGMENT as Yt } from "./vue/KvLoanBookmark2.js";
111
- import { KV_LOAN_TAG_FRAGMENT as qt } from "./vue/KvLoanTag2.js";
112
- import { KV_LOAN_USE_FRAGMENT as Xt } from "./vue/KvLoanUse2.js";
113
- import { KV_WIDE_LOAN_CARD_FRAGMENT as ea, KV_WIDE_LOAN_CARD_USER_FRAGMENT as oa } from "./vue/KvWideLoanCard2.js";
95
+ import { LOAN_CALLOUTS_FRAGMENT as br, LOAN_GEOCODE_FRAGMENT as kr, LOAN_PROGRESS_FRAGMENT as wr, loanCardComputedProperties as Wr, loanCardMethods as Hr, useLocationTruncation as zr } from "./utils/loanCard.js";
96
+ import { BALANCE_CAMPAIGN as Qr, BASE_CAMPAIGN as Yr, ERL_COOKIE_NAME as Zr, NO_BALANCE_CAMPAIGN as qr, TOP_UP_CAMPAIGN as Jr, getDropdownPriceArray as Xr, getLendCtaSelectedOption as $r, isBetween25And50 as et, isLessThan25 as ot, truncateStringByWords as rt } from "./utils/loanUtils.js";
97
+ import { animationCoordinator as at, computeMapCenter as ft, computeMapZoom as lt, generateMapMarkers as mt, getCoordinatesBetween as st, getCountryColor as pt, getLoansIntervals as dt } from "./utils/mapUtils.js";
98
+ import { lockPrintSingleEl as xt, unlockPrintSingleEl as nt } from "./utils/printing.js";
99
+ import { lockScroll as vt, lockScrollSmallOnly as At, unlockScroll as it, unlockScrollSmallOnly as Ct } from "./utils/scrollLock.js";
100
+ import { buildTailwindClassName as ct, headerNumberCase as Tt, kebabCase as Lt, removeObjectProperty as Nt } from "./utils/themeUtils.js";
101
+ import { throttle as Rt } from "./utils/throttle.js";
102
+ import { isTargetElement as It, offBodyTouchstart as Ot, onBodyTouchstart as St } from "./utils/touchEvents.js";
103
+ import { getTreemap as Pt } from "./utils/treemap.js";
104
+ import { KvBlueskyIcon as Ft } from "./assets/icons/bluesky.js";
105
+ import { KV_CLASSIC_LOAN_CARD_FRAGMENT as Dt, KV_CLASSIC_LOAN_CARD_USER_FRAGMET as Bt } from "./vue/KvClassicLoanCard2.js";
106
+ import { KV_COMPACT_LOAN_CARD_FRAGMENT as yt, KV_COMPACT_LOAN_CARD_USER_FRAGMENT as Ut } from "./vue/KvCompactLoanCard2.js";
107
+ import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as kt, KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT as wt } from "./vue/KvIntroductionLoanCard2.js";
108
+ import { KV_LEND_CTA_FRAGMENT as Ht, KV_LEND_CTA_USER_FRAGMENT as zt } from "./vue/KvLendCta2.js";
109
+ import { KV_LOAN_ACTIVITIES_FRAGMENT as Qt } from "./vue/KvLoanActivities2.js";
110
+ import { KV_LOAN_BOOKMARK_FRAGMENT as Zt } from "./vue/KvLoanBookmark2.js";
111
+ import { KV_LOAN_TAG_FRAGMENT as Jt } from "./vue/KvLoanTag2.js";
112
+ import { KV_LOAN_USE_FRAGMENT as $t } from "./vue/KvLoanUse2.js";
113
+ import { KV_WIDE_LOAN_CARD_FRAGMENT as oa, KV_WIDE_LOAN_CARD_USER_FRAGMENT as ra } from "./vue/KvWideLoanCard2.js";
114
114
  export {
115
115
  xr as Alea,
116
- jr as BALANCE_CAMPAIGN,
117
- Qr as BASE_CAMPAIGN,
116
+ Qr as BALANCE_CAMPAIGN,
117
+ Yr as BASE_CAMPAIGN,
118
118
  Fr as DEFAULT_ACCEPTED_IMAGE_TYPES,
119
- Yr as ERL_COOKIE_NAME,
120
- ht as KV_CLASSIC_LOAN_CARD_FRAGMENT,
121
- Dt as KV_CLASSIC_LOAN_CARD_USER_FRAGMET,
122
- Vt as KV_COMPACT_LOAN_CARD_FRAGMENT,
123
- yt as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
124
- bt as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
125
- kt as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
126
- Wt as KV_LEND_CTA_FRAGMENT,
127
- Ht as KV_LEND_CTA_USER_FRAGMENT,
128
- jt as KV_LOAN_ACTIVITIES_FRAGMENT,
129
- Yt as KV_LOAN_BOOKMARK_FRAGMENT,
119
+ Zr as ERL_COOKIE_NAME,
120
+ Dt as KV_CLASSIC_LOAN_CARD_FRAGMENT,
121
+ Bt as KV_CLASSIC_LOAN_CARD_USER_FRAGMET,
122
+ yt as KV_COMPACT_LOAN_CARD_FRAGMENT,
123
+ Ut as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
124
+ kt as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
125
+ wt as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
126
+ Ht as KV_LEND_CTA_FRAGMENT,
127
+ zt as KV_LEND_CTA_USER_FRAGMENT,
128
+ Qt as KV_LOAN_ACTIVITIES_FRAGMENT,
129
+ Zt as KV_LOAN_BOOKMARK_FRAGMENT,
130
130
  ge as KV_LOAN_INFO_CARD_FRAGMENT,
131
- qt as KV_LOAN_TAG_FRAGMENT,
132
- Xt as KV_LOAN_USE_FRAGMENT,
133
- ea as KV_WIDE_LOAN_CARD_FRAGMENT,
134
- oa as KV_WIDE_LOAN_CARD_USER_FRAGMENT,
131
+ Jt as KV_LOAN_TAG_FRAGMENT,
132
+ $t as KV_LOAN_USE_FRAGMENT,
133
+ oa as KV_WIDE_LOAN_CARD_FRAGMENT,
134
+ ra as KV_WIDE_LOAN_CARD_USER_FRAGMENT,
135
135
  r as KvAccordionItem,
136
136
  a as KvActivityRow,
137
137
  ar as KvAtbModal,
138
- Gt as KvBlueskyIcon,
138
+ Ft as KvBlueskyIcon,
139
139
  l as KvBorrowerImage,
140
140
  s as KvButton,
141
141
  d as KvCardFrame,
142
142
  x as KvCarousel,
143
- n as KvCartModal,
143
+ K as KvCartModal,
144
144
  A as KvCartPill,
145
145
  C as KvCheckbox,
146
146
  c as KvCheckoutReceipt,
@@ -167,7 +167,7 @@ export {
167
167
  se as KvImpactVerticalSelector,
168
168
  de as KvInlineActivityCard,
169
169
  xe as KvInlineActivityFeed,
170
- ne as KvIntroductionLoanCard,
170
+ Ke as KvIntroductionLoanCard,
171
171
  Ae as KvLendAmountButton,
172
172
  Ce as KvLendCta,
173
173
  ce as KvLightbox,
@@ -192,7 +192,7 @@ export {
192
192
  mo as KvPill,
193
193
  po as KvPopper,
194
194
  xo as KvProgressBar,
195
- no as KvProgressCircle,
195
+ Ko as KvProgressCircle,
196
196
  Ao as KvPulsingDot,
197
197
  Co as KvRadio,
198
198
  lr as KvSecondaryNav,
@@ -221,52 +221,53 @@ export {
221
221
  br as LOAN_CALLOUTS_FRAGMENT,
222
222
  kr as LOAN_GEOCODE_FRAGMENT,
223
223
  wr as LOAN_PROGRESS_FRAGMENT,
224
- Kr as Mash,
225
- Zr as NO_BALANCE_CAMPAIGN,
226
- qr as TOP_UP_CAMPAIGN,
224
+ nr as Mash,
225
+ qr as NO_BALANCE_CAMPAIGN,
226
+ Jr as TOP_UP_CAMPAIGN,
227
227
  Lr as abc,
228
- tt as animationCoordinator,
229
- _t as buildTailwindClassName,
228
+ at as animationCoordinator,
229
+ ct as buildTailwindClassName,
230
230
  cr as carouselUtil,
231
231
  gr as collapse,
232
- at as computeMapCenter,
233
- ft as computeMapZoom,
232
+ ft as computeMapCenter,
233
+ lt as computeMapZoom,
234
234
  hr as cropResizeImageToDataUrl,
235
235
  Mr as debounce,
236
236
  Pr as expand,
237
- lt as generateMapMarkers,
238
- mt as getCoordinatesBetween,
239
- st as getCountryColor,
240
- Jr as getDropdownPriceArray,
237
+ mt as generateMapMarkers,
238
+ st as getCoordinatesBetween,
239
+ pt as getCountryColor,
240
+ Xr as getDropdownPriceArray,
241
241
  Dr as getKivaImageUrl,
242
- Xr as getLendCtaSelectedOption,
243
- pt as getLoansIntervals,
244
- gt as getTreemap,
242
+ $r as getLendCtaSelectedOption,
243
+ dt as getLoansIntervals,
244
+ Pt as getTreemap,
245
245
  vr as groupBy,
246
- ct as headerNumberCase,
246
+ Tt as headerNumberCase,
247
247
  Nr as indexIn,
248
- $r as isBetween25And50,
248
+ et as isBetween25And50,
249
249
  Br as isLegacyPlaceholderAvatar,
250
- et as isLessThan25,
251
- Mt as isTargetElement,
252
- Tt as kebabCase,
250
+ ot as isLessThan25,
251
+ It as isTargetElement,
252
+ Lt as kebabCase,
253
253
  Wr as loanCardComputedProperties,
254
254
  Hr as loanCardMethods,
255
- ut as lockPrintSingleEl,
256
- nt as lockScroll,
257
- vt as lockScrollSmallOnly,
258
- It as offBodyTouchstart,
259
- Ot as onBodyTouchstart,
255
+ xt as lockPrintSingleEl,
256
+ vt as lockScroll,
257
+ At as lockScrollSmallOnly,
258
+ Ot as offBodyTouchstart,
259
+ St as onBodyTouchstart,
260
260
  Vr as randomizedUserAvatarClass,
261
- Lt as removeObjectProperty,
261
+ Nt as removeObjectProperty,
262
262
  Ar as sortBy,
263
263
  Er as startsWith,
264
- Et as throttle,
265
- ot as truncateStringByWords,
266
- xt as unlockPrintSingleEl,
267
- At as unlockScroll,
268
- it as unlockScrollSmallOnly,
264
+ Rt as throttle,
265
+ rt as truncateStringByWords,
266
+ nt as unlockPrintSingleEl,
267
+ it as unlockScroll,
268
+ Ct as unlockScrollSmallOnly,
269
269
  Cr as useAttrs,
270
270
  Or as useEventListener,
271
+ zr as useLocationTruncation,
271
272
  yr as validateImageFile
272
273
  };
@@ -1,9 +1,9 @@
1
- import R from "graphql-tag";
2
- import oe from "numeral";
3
- import { toRefs as re, computed as n } from "vue";
4
- import { mdiMapMarker as Le } from "@mdi/js";
5
- import Ue from "./Alea.js";
6
- const Ne = "N/A", ne = "ECO-FRIENDLY", le = "SUSTAINABLE AG", se = "SINGLE PARENT", be = "REFUGEES/DISPLACED", P = (c, f) => (c == null ? void 0 : c.find((p) => p.name.replace("#", "").toUpperCase() === f.toUpperCase())) ?? {}, Se = R`
1
+ import P from "graphql-tag";
2
+ import ne from "numeral";
3
+ import { toRefs as ue, computed as a, ref as ae, onMounted as Ue, nextTick as Ne, onBeforeUnmount as be } from "vue";
4
+ import { mdiMapMarker as Ie } from "@mdi/js";
5
+ import Re from "./Alea.js";
6
+ const Pe = "N/A", le = "ECO-FRIENDLY", se = "SUSTAINABLE AG", re = "SINGLE PARENT", Te = "REFUGEES/DISPLACED", R = (i, d) => (i == null ? void 0 : i.find((s) => s.name.replace("#", "").toUpperCase() === d.toUpperCase())) ?? {}, De = P`
7
7
  fragment LoanCallouts on LoanBasic {
8
8
  id
9
9
  activity {
@@ -20,7 +20,7 @@ const Ne = "N/A", ne = "ECO-FRIENDLY", le = "SUSTAINABLE AG", se = "SINGLE PAREN
20
20
  themes
21
21
  }
22
22
  }
23
- `, Me = R`
23
+ `, Oe = P`
24
24
  fragment LoanGeocode on LoanBasic {
25
25
  id
26
26
  geocode {
@@ -32,7 +32,7 @@ const Ne = "N/A", ne = "ECO-FRIENDLY", le = "SUSTAINABLE AG", se = "SINGLE PAREN
32
32
  }
33
33
  }
34
34
  }
35
- `, Te = R`
35
+ `, ke = P`
36
36
  fragment LoanProgress on LoanBasic {
37
37
  id
38
38
  loanAmount
@@ -43,125 +43,141 @@ const Ne = "N/A", ne = "ECO-FRIENDLY", le = "SUSTAINABLE AG", se = "SINGLE PAREN
43
43
  }
44
44
  }
45
45
  `;
46
- function Ge(c, f = !1) {
46
+ function we(i, d = !1) {
47
47
  const {
48
- externalLinks: p,
49
- customLoanDetails: m,
48
+ externalLinks: s,
49
+ customLoanDetails: c,
50
50
  loanId: g,
51
51
  loan: t,
52
- categoryPageName: v,
52
+ categoryPageName: m,
53
53
  customCallouts: E,
54
- customHref: F
55
- } = re(c), ue = n(() => p.value ? "a" : "router-link"), ie = n(() => p.value && F.value ? F.value : m != null && m.value ? "" : `/lend/${g.value}`), _ = n(() => !g.value || !t.value), ce = n(() => {
54
+ customHref: T
55
+ } = ue(i), ie = a(() => s.value ? "a" : "router-link"), ce = a(() => s.value && T.value ? T.value : c != null && c.value ? "" : `/lend/${g.value}`), F = a(() => !g.value || !t.value), de = a(() => {
56
56
  var e;
57
57
  return ((e = t.value) == null ? void 0 : e.name) || "";
58
- }), h = n(() => {
59
- var e, a, l;
60
- return ((l = (a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.country) == null ? void 0 : l.name) || "";
61
- }), de = n(() => {
62
- var e, a, l;
63
- return ((l = (a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.country) == null ? void 0 : l.isoCode) || "";
64
- }), L = n(() => {
65
- var e, a;
66
- return ((a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.city) || "";
67
- }), S = n(() => {
68
- var e, a;
69
- return ((a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.state) || "";
70
- }), M = n(() => {
58
+ }), h = a(() => {
59
+ var e, o, l;
60
+ return ((l = (o = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : o.country) == null ? void 0 : l.name) || "";
61
+ }), pe = a(() => {
62
+ var e, o, l;
63
+ return ((l = (o = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : o.country) == null ? void 0 : l.isoCode) || "";
64
+ }), y = a(() => {
65
+ var e, o;
66
+ return ((o = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : o.city) || "";
67
+ }), _ = a(() => {
68
+ var e, o;
69
+ return ((o = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : o.state) || "";
70
+ }), M = a(() => {
71
71
  var e;
72
72
  return ((e = t.value) == null ? void 0 : e.distributionModel) || "";
73
- }), pe = n(() => {
74
- var e, a;
75
- return ((a = (e = t.value) == null ? void 0 : e.image) == null ? void 0 : a.hash) ?? "";
76
- }), U = n(() => {
77
- var e, a, l, u, d;
78
- return typeof ((e = t.value) == null ? void 0 : e.loanAmount) < "u" && typeof ((l = (a = t.value) == null ? void 0 : a.loanFundraisingInfo) == null ? void 0 : l.fundedAmount) < "u" && typeof ((d = (u = t.value) == null ? void 0 : u.loanFundraisingInfo) == null ? void 0 : d.reservedAmount) < "u";
79
- }), ve = n(() => !_.value && U.value), fe = n(() => {
73
+ }), ve = a(() => {
74
+ var e, o;
75
+ return ((o = (e = t.value) == null ? void 0 : e.image) == null ? void 0 : o.hash) ?? "";
76
+ }), U = a(() => {
77
+ var e, o, l, p, f;
78
+ return typeof ((e = t.value) == null ? void 0 : e.loanAmount) < "u" && typeof ((l = (o = t.value) == null ? void 0 : o.loanFundraisingInfo) == null ? void 0 : l.fundedAmount) < "u" && typeof ((f = (p = t.value) == null ? void 0 : p.loanFundraisingInfo) == null ? void 0 : f.reservedAmount) < "u";
79
+ }), fe = a(() => !F.value && U.value), me = a(() => {
80
80
  if (M.value === "direct") {
81
- const e = f && h.value.toLowerCase() === "united states" ? "" : `, ${h.value}`;
82
- return `${L.value}, ${S.value}${e}`;
81
+ const e = d && h.value.toLowerCase() === "united states" ? "" : `, ${h.value}`;
82
+ return `${y.value}, ${_.value}${e}`;
83
83
  }
84
- return h.value === "Puerto Rico" ? `${L.value}, PR` : h.value;
85
- }), me = n(() => {
84
+ return h.value === "Puerto Rico" ? `${y.value}, PR` : h.value;
85
+ }), ge = a(() => {
86
86
  var e;
87
87
  return ((e = t.value) == null ? void 0 : e.use) ?? "";
88
- }), ge = n(() => {
88
+ }), he = a(() => {
89
89
  var e;
90
90
  return ((e = t.value) == null ? void 0 : e.status) ?? "";
91
- }), A = n(() => {
91
+ }), L = a(() => {
92
92
  var e;
93
93
  return ((e = t.value) == null ? void 0 : e.loanAmount) ?? "0";
94
- }), N = n(() => {
95
- var e, a, l, u;
96
- return oe(((a = (e = t.value) == null ? void 0 : e.loanFundraisingInfo) == null ? void 0 : a.reservedAmount) ?? "0").add(((u = (l = t.value) == null ? void 0 : l.loanFundraisingInfo) == null ? void 0 : u.fundedAmount) ?? "0");
97
- }), T = n(() => N.value.clone().divide(A.value).value()), G = n(() => U.value && A.value - N.value.value() > 0), he = n(() => G.value ? oe(A.value).subtract(N.value.value()).format("0.00") : "0"), Ce = n(() => {
94
+ }), N = a(() => {
95
+ var e, o, l, p;
96
+ return ne(((o = (e = t.value) == null ? void 0 : e.loanFundraisingInfo) == null ? void 0 : o.reservedAmount) ?? "0").add(((p = (l = t.value) == null ? void 0 : l.loanFundraisingInfo) == null ? void 0 : p.fundedAmount) ?? "0");
97
+ }), S = a(() => N.value.clone().divide(L.value).value()), G = a(() => U.value && L.value - N.value.value() > 0), Ce = a(() => G.value ? ne(L.value).subtract(N.value.value()).format("0.00") : "0"), Le = a(() => {
98
98
  var e;
99
99
  return ((e = t.value) == null ? void 0 : e.borrowerCount) ?? 0;
100
- }), Ae = n(() => {
101
- var Y, B, $, w, K, x, H, q, j, z, J, Q, V, W, X, Z, ee, te, ae;
102
- const e = [], a = Ue(g.value, T.value), l = ((B = (Y = t.value) == null ? void 0 : Y.activity) == null ? void 0 : B.name) ?? "", u = ((w = ($ = t.value) == null ? void 0 : $.activity) == null ? void 0 : w.id) ?? null, d = ((x = (K = t.value) == null ? void 0 : K.sector) == null ? void 0 : x.name) ?? "", D = ((q = (H = t.value) == null ? void 0 : H.sector) == null ? void 0 : q.id) ?? null, i = ((z = (j = t.value) == null ? void 0 : j.tags) == null ? void 0 : z.filter((o) => o.charAt(0) === "#").map((o) => o.substring(1))) ?? [], y = ((J = t.value) == null ? void 0 : J.themes) ?? [], b = {
103
- ecoFriendly: !!i.filter((o) => o.toUpperCase() === ne || o.toUpperCase() === le).length,
104
- refugeesIdps: !!y.filter((o) => o.toUpperCase() === be).length,
105
- singleParents: !!i.filter((o) => o.toUpperCase() === se).length
106
- }, O = (V = (Q = t.value) == null ? void 0 : Q.partnerName) == null ? void 0 : V.toUpperCase().includes(Ne), k = ((W = t.value) == null ? void 0 : W.tagsData) ?? [], ye = ((X = t.value) == null ? void 0 : X.themesData) ?? [];
107
- if (O && i.length) {
108
- const o = Math.floor(a() * i.length), s = i[o], r = P(k, s), C = (r == null ? void 0 : r.id) ?? null;
109
- e.push({ label: s, type: "tag", id: C });
100
+ }), Ae = a(() => {
101
+ var w, B, Y, $, K, x, z, H, W, q, j, J, Q, V, X, Z, ee, te, oe;
102
+ const e = [], o = Re(g.value, S.value), l = ((B = (w = t.value) == null ? void 0 : w.activity) == null ? void 0 : B.name) ?? "", p = (($ = (Y = t.value) == null ? void 0 : Y.activity) == null ? void 0 : $.id) ?? null, f = ((x = (K = t.value) == null ? void 0 : K.sector) == null ? void 0 : x.name) ?? "", D = ((H = (z = t.value) == null ? void 0 : z.sector) == null ? void 0 : H.id) ?? null, v = ((q = (W = t.value) == null ? void 0 : W.tags) == null ? void 0 : q.filter((n) => n.charAt(0) === "#").map((n) => n.substring(1))) ?? [], A = ((j = t.value) == null ? void 0 : j.themes) ?? [], b = {
103
+ ecoFriendly: !!v.filter((n) => n.toUpperCase() === le || n.toUpperCase() === se).length,
104
+ refugeesIdps: !!A.filter((n) => n.toUpperCase() === Te).length,
105
+ singleParents: !!v.filter((n) => n.toUpperCase() === re).length
106
+ }, O = (Q = (J = t.value) == null ? void 0 : J.partnerName) == null ? void 0 : Q.toUpperCase().includes(Pe), k = ((V = t.value) == null ? void 0 : V.tagsData) ?? [], Ee = ((X = t.value) == null ? void 0 : X.themesData) ?? [];
107
+ if (O && v.length) {
108
+ const n = Math.floor(o() * v.length), r = v[n], u = R(k, r), C = (u == null ? void 0 : u.id) ?? null;
109
+ e.push({ label: r, type: "tag", id: C });
110
110
  }
111
- if (v.value || (b.ecoFriendly && !e.find((o) => o.label.toUpperCase() === ne || o.label.toUpperCase() === le) ? e.push({ label: "Eco-friendly", type: "tag", id: 9 }) : b.refugeesIdps ? e.push({ label: "Refugees and IDPs", type: "attribute", id: 28 }) : b.singleParents && !e.find((o) => o.label.toUpperCase() === se) && e.push({ label: "Single Parent", type: "tag", id: 17 })), l && u && ((Z = v.value) == null ? void 0 : Z.toUpperCase()) !== l.toUpperCase() && e.push({ id: u, label: l, type: "activity" }), d && D && l.toUpperCase() !== d.toUpperCase() && d.toUpperCase() !== ((ee = v.value) == null ? void 0 : ee.toUpperCase()) && e.length < 2 && e.push({ id: D, label: d, type: "sector" }), i.length && e.length < 2) {
112
- const o = Math.floor(a() * i.length), s = i[o], r = P(k, s), C = (r == null ? void 0 : r.id) ?? null;
113
- e.filter((I) => I.label.toUpperCase() === s.toUpperCase()).length || e.push({ label: s, type: "tag", id: C });
111
+ if (m.value || (b.ecoFriendly && !e.find((n) => n.label.toUpperCase() === le || n.label.toUpperCase() === se) ? e.push({ label: "Eco-friendly", type: "tag", id: 9 }) : b.refugeesIdps ? e.push({ label: "Refugees and IDPs", type: "attribute", id: 28 }) : b.singleParents && !e.find((n) => n.label.toUpperCase() === re) && e.push({ label: "Single Parent", type: "tag", id: 17 })), l && p && ((Z = m.value) == null ? void 0 : Z.toUpperCase()) !== l.toUpperCase() && e.push({ id: p, label: l, type: "activity" }), f && D && l.toUpperCase() !== f.toUpperCase() && f.toUpperCase() !== ((ee = m.value) == null ? void 0 : ee.toUpperCase()) && e.length < 2 && e.push({ id: D, label: f, type: "sector" }), v.length && e.length < 2) {
112
+ const n = Math.floor(o() * v.length), r = v[n], u = R(k, r), C = (u == null ? void 0 : u.id) ?? null;
113
+ e.filter((I) => I.label.toUpperCase() === r.toUpperCase()).length || e.push({ label: r, type: "tag", id: C });
114
114
  }
115
- if (y.length && e.length < 2) {
116
- const o = Math.floor(a() * y.length), s = y[o], r = P(ye, s), C = (r == null ? void 0 : r.id) ?? null;
117
- !e.filter((I) => I.label.toUpperCase() === s.toUpperCase()).length && s.toUpperCase() !== ((te = v.value) == null ? void 0 : te.toUpperCase()) && e.push({ label: s, type: "attribute", id: C });
115
+ if (A.length && e.length < 2) {
116
+ const n = Math.floor(o() * A.length), r = A[n], u = R(Ee, r), C = (u == null ? void 0 : u.id) ?? null;
117
+ !e.filter((I) => I.label.toUpperCase() === r.toUpperCase()).length && r.toUpperCase() !== ((te = m.value) == null ? void 0 : te.toUpperCase()) && e.push({ label: r, type: "attribute", id: C });
118
118
  }
119
119
  if (O && e.length > 1) return [e.shift()];
120
- const Ee = ((ae = E.value) == null ? void 0 : ae.map((o) => ({ label: o }))) ?? [];
121
- return e.push(...Ee), e;
120
+ const ye = ((oe = E.value) == null ? void 0 : oe.map((n) => ({ label: n }))) ?? [];
121
+ return e.push(...ye), e;
122
122
  });
123
123
  return {
124
- tag: ue,
125
- readMorePath: ie,
126
- isLoading: _,
127
- borrowerName: ce,
124
+ tag: ie,
125
+ readMorePath: ce,
126
+ isLoading: F,
127
+ borrowerName: de,
128
128
  countryName: h,
129
- countryCode: de,
130
- city: L,
131
- state: S,
129
+ countryCode: pe,
130
+ city: y,
131
+ state: _,
132
132
  distributionModel: M,
133
- imageHash: pe,
133
+ imageHash: ve,
134
134
  hasProgressData: U,
135
- allDataLoaded: ve,
136
- fundraisingPercent: T,
137
- unreservedAmount: he,
135
+ allDataLoaded: fe,
136
+ fundraisingPercent: S,
137
+ unreservedAmount: Ce,
138
138
  sharesAvailable: G,
139
- formattedLocation: fe,
140
- loanUse: me,
141
- loanStatus: ge,
142
- loanAmount: A,
143
- loanBorrowerCount: Ce,
144
- mdiMapMarker: Le,
139
+ formattedLocation: me,
140
+ loanUse: ge,
141
+ loanStatus: he,
142
+ loanAmount: L,
143
+ loanBorrowerCount: Le,
144
+ mdiMapMarker: Ie,
145
145
  loanCallouts: Ae
146
146
  };
147
147
  }
148
- function De(c, f) {
148
+ function Be() {
149
+ const i = ae(null), d = ae(!1), s = () => {
150
+ const c = i.value;
151
+ d.value = !!c && c.scrollWidth > c.clientWidth;
152
+ };
153
+ return Ue(() => {
154
+ Ne(s), window.addEventListener("resize", s);
155
+ }), be(() => {
156
+ window.removeEventListener("resize", s);
157
+ }), {
158
+ locationRef: i,
159
+ isLocationTruncated: d,
160
+ checkLocationTruncation: s
161
+ };
162
+ }
163
+ function Ye(i, d) {
149
164
  const {
150
- loanId: p,
151
- customLoanDetails: m,
165
+ loanId: s,
166
+ customLoanDetails: c,
152
167
  kvTrackFunction: g
153
- } = re(c);
154
- function t(v, E) {
155
- g.value("Lending", "click-Read more", v, p.value), m.value && (E.preventDefault(), f("show-loan-details"));
168
+ } = ue(i);
169
+ function t(m, E) {
170
+ g.value("Lending", "click-Read more", m, s.value), c.value && (E.preventDefault(), d("show-loan-details"));
156
171
  }
157
172
  return {
158
173
  clickReadMore: t
159
174
  };
160
175
  }
161
176
  export {
162
- Se as LOAN_CALLOUTS_FRAGMENT,
163
- Me as LOAN_GEOCODE_FRAGMENT,
164
- Te as LOAN_PROGRESS_FRAGMENT,
165
- Ge as loanCardComputedProperties,
166
- De as loanCardMethods
177
+ De as LOAN_CALLOUTS_FRAGMENT,
178
+ Oe as LOAN_GEOCODE_FRAGMENT,
179
+ ke as LOAN_PROGRESS_FRAGMENT,
180
+ we as loanCardComputedProperties,
181
+ Ye as loanCardMethods,
182
+ Be as useLocationTruncation
167
183
  };
@@ -1 +1 @@
1
- .loan-card-use[data-v-907918f9]:hover,.loan-card-use[data-v-907918f9]:focus{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1))}.loan-card-active-hover:hover .loan-card-use[data-v-907918f9]{text-decoration-line:underline}.loan-card-progress[data-v-907918f9]:hover,.loan-card-progress[data-v-907918f9]:focus{text-decoration-line:none}
1
+ .loan-card-use[data-v-44561e04]:hover,.loan-card-use[data-v-44561e04]:focus{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1))}.loan-card-active-hover:hover .loan-card-use[data-v-44561e04]{text-decoration-line:underline}.loan-card-progress[data-v-44561e04]:hover,.loan-card-progress[data-v-44561e04]:focus{text-decoration-line:none}